next 15.3.0-canary.0 → 15.3.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/next +1 -1
- package/dist/build/build-context.d.ts +1 -0
- package/dist/build/build-context.js.map +1 -1
- package/dist/build/index.js +25 -2
- package/dist/build/index.js.map +1 -1
- package/dist/build/swc/index.js +1 -1
- package/dist/build/webpack/plugins/define-env-plugin.d.ts +2 -1
- package/dist/build/webpack/plugins/define-env-plugin.js +23 -2
- package/dist/build/webpack/plugins/define-env-plugin.js.map +1 -1
- package/dist/build/webpack-build/impl.js +1 -0
- package/dist/build/webpack-build/impl.js.map +1 -1
- package/dist/build/webpack-config.d.ts +2 -1
- package/dist/build/webpack-config.js +5 -4
- package/dist/build/webpack-config.js.map +1 -1
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js +8 -8
- package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
- package/dist/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +1 -1
- package/dist/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.js +1 -1
- package/dist/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js +1 -1
- package/dist/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.production.js +1 -1
- package/dist/esm/build/build-context.js.map +1 -1
- package/dist/esm/build/index.js +25 -2
- package/dist/esm/build/index.js.map +1 -1
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/webpack/plugins/define-env-plugin.js +23 -2
- package/dist/esm/build/webpack/plugins/define-env-plugin.js.map +1 -1
- package/dist/esm/build/webpack-build/impl.js +1 -0
- package/dist/esm/build/webpack-build/impl.js.map +1 -1
- package/dist/esm/build/webpack-config.js +5 -4
- package/dist/esm/build/webpack-config.js.map +1 -1
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/lib/inline-static-env.js +122 -0
- package/dist/esm/lib/inline-static-env.js.map +1 -0
- package/dist/esm/server/base-server.js +8 -0
- package/dist/esm/server/base-server.js.map +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/router-utils/setup-dev-bundler.js +10 -2
- package/dist/esm/server/lib/router-utils/setup-dev-bundler.js.map +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/shared/lib/canary-only.js +1 -1
- package/dist/lib/inline-static-env.d.ts +7 -0
- package/dist/lib/inline-static-env.js +149 -0
- package/dist/lib/inline-static-env.js.map +1 -0
- package/dist/server/base-server.js +8 -0
- package/dist/server/base-server.js.map +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/router-utils/setup-dev-bundler.js +8 -0
- package/dist/server/lib/router-utils/setup-dev-bundler.js.map +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/shared/lib/canary-only.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/build.d.ts +1 -1
- package/dist/telemetry/events/build.js.map +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +15 -15
@@ -6,28 +6,28 @@
|
|
6
6
|
*
|
7
7
|
* This source code is licensed under the MIT license found in the
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
|
-
*/var r={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},n=Object.assign,i={};function a(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}function s(){}function o(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},s.prototype=a.prototype;var l=o.prototype=new s;l.constructor=o,n(l,a.prototype),l.isPureReactComponent=!0,Object.prototype.hasOwnProperty,"function"==typeof reportError&&reportError},"../../node_modules/.pnpm/react@19.1.0-canary-0ca3deeb-20250311/node_modules/react/index.js":(e,t,r)=>{"use strict";e.exports=r("../../node_modules/.pnpm/react@19.1.0-canary-0ca3deeb-20250311/node_modules/react/cjs/react.production.js")},"../next-env/dist/index.js":(e,t,r)=>{(()=>{var t={383:e=>{"use strict";e.exports.j=function(e){let t=e.ignoreProcessEnv?{}:process.env;for(let r in e.parsed){let n=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.parsed[r];e.parsed[r]=(function e(t,r,n){let i=function(e,t){let r=Array.from(e.matchAll(t));return r.length>0?r.slice(-1)[0].index:-1}(t,/(?!(?<=\\))\$/g);if(-1===i)return t;let a=t.slice(i).match(/((?!(?<=\\))\${?([\w]+)(?::-([^}\\]*))?}?)/);if(null!=a){let[,i,s,o]=a;return e(t.replace(i,r[s]||o||n.parsed[s]||""),r,n)}return t})(n,t,e).replace(/\\\$/g,"$")}for(let r in e.parsed)t[r]=e.parsed[r];return e}},234:(e,t,r)=>{let n=r(147),i=r(17),a=r(37),s=r(113),o=r(803).version,l=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function u(e){console.log(`[dotenv@${o}][DEBUG] ${e}`)}function c(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function d(e){let t=i.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}let h={configDotenv:function(e){let t=i.resolve(process.cwd(),".env"),r="utf8",s=!!(e&&e.debug);if(e){if(null!=e.path){var o;t="~"===(o=e.path)[0]?i.join(a.homedir(),o.slice(1)):o}null!=e.encoding&&(r=e.encoding)}try{let i=h.parse(n.readFileSync(t,{encoding:r})),a=process.env;return e&&null!=e.processEnv&&(a=e.processEnv),h.populate(a,i,e),{parsed:i}}catch(e){return s&&u(`Failed to load ${t} ${e.message}`),{error:e}}},_configVault:function(e){console.log(`[dotenv@${o}][INFO] Loading env from encrypted .env.vault`);let t=h._parseVault(e),r=process.env;return e&&null!=e.processEnv&&(r=e.processEnv),h.populate(r,t,e),{parsed:t}},_parseVault:function(e){let t;let r=d(e),n=h.configDotenv({path:r});if(!n.parsed)throw Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);let i=c(e).split(","),a=i.length;for(let e=0;e<a;e++)try{let r=i[e].trim(),a=function(e,t){let r;try{r=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code)throw Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development");throw e}let n=r.password;if(!n)throw Error("INVALID_DOTENV_KEY: Missing key part");let i=r.searchParams.get("environment");if(!i)throw Error("INVALID_DOTENV_KEY: Missing environment part");let a=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[a];if(!s)throw Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);return{ciphertext:s,key:n}}(n,r);t=h.decrypt(a.ciphertext,a.key);break}catch(t){if(e+1>=a)throw t}return h.parse(t)},config:function(e){let t=d(e);if(0===c(e).length)return h.configDotenv(e);if(!n.existsSync(t)){var r;return r=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${o}][WARN] ${r}`),h.configDotenv(e)}return h._configVault(e)},decrypt:function(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.slice(0,12),a=n.slice(-16);n=n.slice(12,-16);try{let e=s.createDecipheriv("aes-256-gcm",r,i);return e.setAuthTag(a),`${e.update(n)}${e.final()}`}catch(n){let e=n instanceof RangeError,t="Invalid key length"===n.message,r="Unsupported state or unable to authenticate data"===n.message;if(e||t)throw Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");if(r)throw Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw console.error("Error: ",n.code),console.error("Error: ",n.message),n}},parse:function(e){let t;let r={},n=e.toString();for(n=n.replace(/\r\n?/gm,"\n");null!=(t=l.exec(n));){let e=t[1],n=t[2]||"",i=(n=n.trim())[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),'"'===i&&(n=(n=n.replace(/\\n/g,"\n")).replace(/\\r/g,"\r")),r[e]=n}return r},populate:function(e,t,r={}){let n=!!(r&&r.debug),i=!!(r&&r.override);if("object"!=typeof t)throw Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let r of Object.keys(t))Object.prototype.hasOwnProperty.call(e,r)?(!0===i&&(e[r]=t[r]),n&&(!0===i?u(`"${r}" is already defined and WAS overwritten`):u(`"${r}" is already defined and was NOT overwritten`))):e[r]=t[r]}};e.exports.configDotenv=h.configDotenv,e.exports._configVault=h._configVault,e.exports._parseVault=h._parseVault,e.exports.config=h.config,e.exports.decrypt=h.decrypt,e.exports.parse=h.parse,e.exports.populate=h.populate,e.exports=h},113:e=>{"use strict";e.exports=r("crypto")},147:e=>{"use strict";e.exports=r("fs")},37:e=>{"use strict";e.exports=r("os")},17:e=>{"use strict";e.exports=r("path")},803:e=>{"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.3.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","lint-readme":"standard-markdown","pretest":"npm run lint && npm run dts-check","test":"tap tests/*.js --100 -Rspec","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"funding":"https://github.com/motdotla/dotenv?sponsor=1","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3","decache":"^4.6.1","sinon":"^14.0.1","standard":"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0","tap":"^16.3.0","tar":"^6.1.11","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}},s=!0;try{t[e](a,a.exports,i),s=!1}finally{s&&delete n[e]}return a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.ab=__dirname+"/";var a={};(()=>{"use strict";let e,t,r;i.r(a),i.d(a,{initialEnv:()=>e,updateInitialEnv:()=>d,processEnv:()=>p,resetEnv:()=>f,loadEnvConfig:()=>m});var n=i(147);i.n(n);var s=i(17);i.n(s);var o=i(234);i.n(o);var l=i(383);let u=[],c=[];function d(t){Object.assign(e||{},t)}function h(e){Object.keys(process.env).forEach(t=>{t.startsWith("__NEXT_PRIVATE")||void 0!==e[t]&&""!==e[t]||delete process.env[t]}),Object.entries(e).forEach(([e,t])=>{process.env[e]=t})}function p(t,r,n=console,i=!1,a){var u;if(e||(e=Object.assign({},process.env)),!i&&(process.env.__NEXT_PROCESSED_ENV||0===t.length))return[process.env];process.env.__NEXT_PROCESSED_ENV="true";let d=Object.assign({},e),h={};for(let e of t)try{let t={};for(let r of(t.parsed=o.parse(e.contents),(t=(0,l.j)(t)).parsed&&!c.some(t=>t.contents===e.contents&&t.path===e.path)&&(null==a||a(e.path)),Object.keys(t.parsed||{})))void 0===h[r]&&void 0===d[r]&&(h[r]=null===(u=t.parsed)||void 0===u?void 0:u[r]);e.env=t.parsed||{}}catch(t){n.error(`Failed to load env from ${s.join(r||"",e.path)}`,t)}return[Object.assign(process.env,h),h]}function f(){e&&h(e)}function m(i,a,o=console,l=!1,d){if(e||(e=Object.assign({},process.env)),t&&!l)return{combinedEnv:t,parsedEnv:r,loadedEnvFiles:u};h(e),c=u,u=[];let f=a?"development":"production";for(let e of[`.env.${f}.local`,"test"!==f&&".env.local",`.env.${f}`,".env"].filter(Boolean)){let t=s.join(i,e);try{let r=n.statSync(t);if(!r.isFile()&&!r.isFIFO())continue;let i=n.readFileSync(t,"utf8");u.push({path:e,contents:i,env:{}})}catch(t){"ENOENT"!==t.code&&o.error(`Failed to load env from ${e}`,t)}}return[t,r]=p(u,i,o,l,d),{combinedEnv:t,parsedEnv:r,loadedEnvFiles:u}}})(),e.exports=a})()},"./dist/compiled/@edge-runtime/cookies/index.js":e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a={};function s(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function o(e){let t=/* @__PURE__ */new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,i]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=i?i:"true"))}catch{}}return t}function l(e){var t,r;if(!e)return;let[[n,i],...a]=o(e),{domain:s,expires:l,httponly:d,maxage:h,path:p,samesite:f,secure:m,partitioned:g,priority:v}=Object.fromEntries(a.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));return function(e){let t={};for(let r in e)e[r]&&(t[r]=e[r]);return t}({name:n,value:decodeURIComponent(i),domain:s,...l&&{expires:new Date(l)},...d&&{httpOnly:!0},..."string"==typeof h&&{maxAge:Number(h)},path:p,...f&&{sameSite:u.includes(t=(t=f).toLowerCase())?t:void 0},...m&&{secure:!0},...v&&{priority:c.includes(r=(r=v).toLowerCase())?r:void 0},...g&&{partitioned:!0}})}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(a,{RequestCookies:()=>d,ResponseCookies:()=>h,parseCookie:()=>o,parseSetCookie:()=>l,stringifyCookie:()=>s}),e.exports=((e,a,s,o)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of n(a))i.call(e,l)||l===s||t(e,l,{get:()=>a[l],enumerable:!(o=r(a,l))||o.enumerable});return e})(t({},"__esModule",{value:!0}),a);var u=["strict","lax","none"],c=["low","medium","high"],d=class{constructor(e){this._parsed=/* @__PURE__ */new Map,this._headers=e;let t=e.get("cookie");if(t)for(let[e,r]of o(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>s(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>s(t)).join("; ")),r}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(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},h=class{constructor(e){var t,r,n;this._parsed=/* @__PURE__ */new Map,this._headers=e;let i=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(let e of Array.isArray(i)?i:function(e){if(!e)return[];var t,r,n,i,a,s=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,a=!1;l();)if(","===(r=e.charAt(o))){for(n=o,o+=1,l(),i=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(a=!0,o=i,s.push(e.substring(t,n)),t=o):o=n+1}else o+=1;(!a||o>=e.length)&&s.push(e.substring(t,e.length))}return s}(i)){let t=l(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,i=this._parsed;return i.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=s(r);t.append("set-cookie",e)}}(i,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,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(s).join("; ")}}},"./dist/compiled/cookie/index.js":e=>{(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{/*!
|
9
|
+
*/var r={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},n=Object.assign,i={};function s(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}function a(){}function o(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}s.prototype.isReactComponent={},s.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},s.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},a.prototype=s.prototype;var l=o.prototype=new a;l.constructor=o,n(l,s.prototype),l.isPureReactComponent=!0,Object.prototype.hasOwnProperty,"function"==typeof reportError&&reportError},"../../node_modules/.pnpm/react@19.1.0-canary-0ca3deeb-20250311/node_modules/react/index.js":(e,t,r)=>{"use strict";e.exports=r("../../node_modules/.pnpm/react@19.1.0-canary-0ca3deeb-20250311/node_modules/react/cjs/react.production.js")},"../next-env/dist/index.js":(e,t,r)=>{(()=>{var t={383:e=>{"use strict";e.exports.j=function(e){let t=e.ignoreProcessEnv?{}:process.env;for(let r in e.parsed){let n=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.parsed[r];e.parsed[r]=(function e(t,r,n){let i=function(e,t){let r=Array.from(e.matchAll(t));return r.length>0?r.slice(-1)[0].index:-1}(t,/(?!(?<=\\))\$/g);if(-1===i)return t;let s=t.slice(i).match(/((?!(?<=\\))\${?([\w]+)(?::-([^}\\]*))?}?)/);if(null!=s){let[,i,a,o]=s;return e(t.replace(i,r[a]||o||n.parsed[a]||""),r,n)}return t})(n,t,e).replace(/\\\$/g,"$")}for(let r in e.parsed)t[r]=e.parsed[r];return e}},234:(e,t,r)=>{let n=r(147),i=r(17),s=r(37),a=r(113),o=r(803).version,l=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function c(e){console.log(`[dotenv@${o}][DEBUG] ${e}`)}function u(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function h(e){let t=i.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}let d={configDotenv:function(e){let t=i.resolve(process.cwd(),".env"),r="utf8",a=!!(e&&e.debug);if(e){if(null!=e.path){var o;t="~"===(o=e.path)[0]?i.join(s.homedir(),o.slice(1)):o}null!=e.encoding&&(r=e.encoding)}try{let i=d.parse(n.readFileSync(t,{encoding:r})),s=process.env;return e&&null!=e.processEnv&&(s=e.processEnv),d.populate(s,i,e),{parsed:i}}catch(e){return a&&c(`Failed to load ${t} ${e.message}`),{error:e}}},_configVault:function(e){console.log(`[dotenv@${o}][INFO] Loading env from encrypted .env.vault`);let t=d._parseVault(e),r=process.env;return e&&null!=e.processEnv&&(r=e.processEnv),d.populate(r,t,e),{parsed:t}},_parseVault:function(e){let t;let r=h(e),n=d.configDotenv({path:r});if(!n.parsed)throw Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);let i=u(e).split(","),s=i.length;for(let e=0;e<s;e++)try{let r=i[e].trim(),s=function(e,t){let r;try{r=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code)throw Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development");throw e}let n=r.password;if(!n)throw Error("INVALID_DOTENV_KEY: Missing key part");let i=r.searchParams.get("environment");if(!i)throw Error("INVALID_DOTENV_KEY: Missing environment part");let s=`DOTENV_VAULT_${i.toUpperCase()}`,a=e.parsed[s];if(!a)throw Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);return{ciphertext:a,key:n}}(n,r);t=d.decrypt(s.ciphertext,s.key);break}catch(t){if(e+1>=s)throw t}return d.parse(t)},config:function(e){let t=h(e);if(0===u(e).length)return d.configDotenv(e);if(!n.existsSync(t)){var r;return r=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${o}][WARN] ${r}`),d.configDotenv(e)}return d._configVault(e)},decrypt:function(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.slice(0,12),s=n.slice(-16);n=n.slice(12,-16);try{let e=a.createDecipheriv("aes-256-gcm",r,i);return e.setAuthTag(s),`${e.update(n)}${e.final()}`}catch(n){let e=n instanceof RangeError,t="Invalid key length"===n.message,r="Unsupported state or unable to authenticate data"===n.message;if(e||t)throw Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");if(r)throw Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw console.error("Error: ",n.code),console.error("Error: ",n.message),n}},parse:function(e){let t;let r={},n=e.toString();for(n=n.replace(/\r\n?/gm,"\n");null!=(t=l.exec(n));){let e=t[1],n=t[2]||"",i=(n=n.trim())[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),'"'===i&&(n=(n=n.replace(/\\n/g,"\n")).replace(/\\r/g,"\r")),r[e]=n}return r},populate:function(e,t,r={}){let n=!!(r&&r.debug),i=!!(r&&r.override);if("object"!=typeof t)throw Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let r of Object.keys(t))Object.prototype.hasOwnProperty.call(e,r)?(!0===i&&(e[r]=t[r]),n&&(!0===i?c(`"${r}" is already defined and WAS overwritten`):c(`"${r}" is already defined and was NOT overwritten`))):e[r]=t[r]}};e.exports.configDotenv=d.configDotenv,e.exports._configVault=d._configVault,e.exports._parseVault=d._parseVault,e.exports.config=d.config,e.exports.decrypt=d.decrypt,e.exports.parse=d.parse,e.exports.populate=d.populate,e.exports=d},113:e=>{"use strict";e.exports=r("crypto")},147:e=>{"use strict";e.exports=r("fs")},37:e=>{"use strict";e.exports=r("os")},17:e=>{"use strict";e.exports=r("path")},803:e=>{"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.3.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","lint-readme":"standard-markdown","pretest":"npm run lint && npm run dts-check","test":"tap tests/*.js --100 -Rspec","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"funding":"https://github.com/motdotla/dotenv?sponsor=1","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3","decache":"^4.6.1","sinon":"^14.0.1","standard":"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0","tap":"^16.3.0","tar":"^6.1.11","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var s=n[e]={exports:{}},a=!0;try{t[e](s,s.exports,i),a=!1}finally{a&&delete n[e]}return s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.ab=__dirname+"/";var s={};(()=>{"use strict";let e,t,r;i.r(s),i.d(s,{initialEnv:()=>e,updateInitialEnv:()=>h,processEnv:()=>p,resetEnv:()=>f,loadEnvConfig:()=>m});var n=i(147);i.n(n);var a=i(17);i.n(a);var o=i(234);i.n(o);var l=i(383);let c=[],u=[];function h(t){Object.assign(e||{},t)}function d(e){Object.keys(process.env).forEach(t=>{t.startsWith("__NEXT_PRIVATE")||void 0!==e[t]&&""!==e[t]||delete process.env[t]}),Object.entries(e).forEach(([e,t])=>{process.env[e]=t})}function p(t,r,n=console,i=!1,s){var c;if(e||(e=Object.assign({},process.env)),!i&&(process.env.__NEXT_PROCESSED_ENV||0===t.length))return[process.env];process.env.__NEXT_PROCESSED_ENV="true";let h=Object.assign({},e),d={};for(let e of t)try{let t={};for(let r of(t.parsed=o.parse(e.contents),(t=(0,l.j)(t)).parsed&&!u.some(t=>t.contents===e.contents&&t.path===e.path)&&(null==s||s(e.path)),Object.keys(t.parsed||{})))void 0===d[r]&&void 0===h[r]&&(d[r]=null===(c=t.parsed)||void 0===c?void 0:c[r]);e.env=t.parsed||{}}catch(t){n.error(`Failed to load env from ${a.join(r||"",e.path)}`,t)}return[Object.assign(process.env,d),d]}function f(){e&&d(e)}function m(i,s,o=console,l=!1,h){if(e||(e=Object.assign({},process.env)),t&&!l)return{combinedEnv:t,parsedEnv:r,loadedEnvFiles:c};d(e),u=c,c=[];let f=s?"development":"production";for(let e of[`.env.${f}.local`,"test"!==f&&".env.local",`.env.${f}`,".env"].filter(Boolean)){let t=a.join(i,e);try{let r=n.statSync(t);if(!r.isFile()&&!r.isFIFO())continue;let i=n.readFileSync(t,"utf8");c.push({path:e,contents:i,env:{}})}catch(t){"ENOENT"!==t.code&&o.error(`Failed to load env from ${e}`,t)}}return[t,r]=p(c,i,o,l,h),{combinedEnv:t,parsedEnv:r,loadedEnvFiles:c}}})(),e.exports=s})()},"./dist/compiled/@edge-runtime/cookies/index.js":e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};function a(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function o(e){let t=/* @__PURE__ */new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,i]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=i?i:"true"))}catch{}}return t}function l(e){var t,r;if(!e)return;let[[n,i],...s]=o(e),{domain:a,expires:l,httponly:h,maxage:d,path:p,samesite:f,secure:m,partitioned:g,priority:v}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));return function(e){let t={};for(let r in e)e[r]&&(t[r]=e[r]);return t}({name:n,value:decodeURIComponent(i),domain:a,...l&&{expires:new Date(l)},...h&&{httpOnly:!0},..."string"==typeof d&&{maxAge:Number(d)},path:p,...f&&{sameSite:c.includes(t=(t=f).toLowerCase())?t:void 0},...m&&{secure:!0},...v&&{priority:u.includes(r=(r=v).toLowerCase())?r:void 0},...g&&{partitioned:!0}})}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(s,{RequestCookies:()=>h,ResponseCookies:()=>d,parseCookie:()=>o,parseSetCookie:()=>l,stringifyCookie:()=>a}),e.exports=((e,s,a,o)=>{if(s&&"object"==typeof s||"function"==typeof s)for(let l of n(s))i.call(e,l)||l===a||t(e,l,{get:()=>s[l],enumerable:!(o=r(s,l))||o.enumerable});return e})(t({},"__esModule",{value:!0}),s);var c=["strict","lax","none"],u=["low","medium","high"],h=class{constructor(e){this._parsed=/* @__PURE__ */new Map,this._headers=e;let t=e.get("cookie");if(t)for(let[e,r]of o(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>a(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>a(t)).join("; ")),r}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(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},d=class{constructor(e){var t,r,n;this._parsed=/* @__PURE__ */new Map,this._headers=e;let i=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(let e of Array.isArray(i)?i:function(e){if(!e)return[];var t,r,n,i,s,a=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(r=e.charAt(o))){for(n=o,o+=1,l(),i=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=i,a.push(e.substring(t,n)),t=o):o=n+1}else o+=1;(!s||o>=e.length)&&a.push(e.substring(t,e.length))}return a}(i)){let t=l(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,i=this._parsed;return i.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=a(r);t.append("set-cookie",e)}}(i,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,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(a).join("; ")}}},"./dist/compiled/async-sema/index.js":(e,t,r)=>{(()=>{"use strict";var t={490:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(r(361));function s(e){var t;return t=(Math.min(Math.max(16,e),0x40000000)>>>0)-1,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,(t|=t>>16)+1}class a{constructor(e){this._capacity=s(e),this._length=0,this._front=0,this.arr=[]}push(e){let t=this._length;this.checkCapacity(t+1);let r=this._front+t&this._capacity-1;return this.arr[r]=e,this._length=t+1,t+1}pop(){let e=this._length;if(0===e)return;let t=this._front+e-1&this._capacity-1,r=this.arr[t];return this.arr[t]=void 0,this._length=e-1,r}shift(){let e=this._length;if(0===e)return;let t=this._front,r=this.arr[t];return this.arr[t]=void 0,this._front=t+1&this._capacity-1,this._length=e-1,r}get length(){return this._length}checkCapacity(e){this._capacity<e&&this.resizeTo(s(1.5*this._capacity+16))}resizeTo(e){let t=this._capacity;this._capacity=e;let r=this._front,n=this._length;r+n>t&&function(e,t,r,n,i){for(let t=0;t<i;++t)r[t+n]=e[t+0],e[t+0]=void 0}(this.arr,0,this.arr,t,r+n&t-1)}}class o extends i.default{}function l(e){return"function"==typeof e}function c(){return"1"}class u{constructor(e,{initFn:t=c,pauseFn:r,resumeFn:n,capacity:i=10}={}){if(l(r)!==l(n))throw Error("pauseFn and resumeFn must be both set for pausing");this.nrTokens=e,this.free=new a(e),this.waiting=new a(i),this.releaseEmitter=new o,this.noTokens=t===c,this.pauseFn=r,this.resumeFn=n,this.paused=!1,this.releaseEmitter.on("release",e=>{let t=this.waiting.shift();t?t.resolve(e):(this.resumeFn&&this.paused&&(this.paused=!1,this.resumeFn()),this.free.push(e))});for(let r=0;r<e;r++)this.free.push(t())}async acquire(){let e=this.free.pop();return void 0!==e?e:new Promise((e,t)=>{this.pauseFn&&!this.paused&&(this.paused=!0,this.pauseFn()),this.waiting.push({resolve:e,reject:t})})}release(e){this.releaseEmitter.emit("release",this.noTokens?"1":e)}drain(){let e=Array(this.nrTokens);for(let t=0;t<this.nrTokens;t++)e[t]=this.acquire();return Promise.all(e)}nrWaiting(){return this.waiting.length}}t.Sema=u,t.RateLimit=function(e,{timeUnit:t=1e3,uniformDistribution:r=!1}={}){let n=new u(r?1:e),i=r?t/e:t;return async function(){await n.acquire(),setTimeout(()=>n.release(),i)}}},361:e=>{e.exports=r("events")}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var s=n[e]={exports:{}},a=!0;try{t[e].call(s.exports,s,s.exports,i),a=!1}finally{a&&delete n[e]}return s.exports}i.ab=__dirname+"/";var s=i(490);e.exports=s})()},"./dist/compiled/cookie/index.js":e=>{(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{/*!
|
10
10
|
* cookie
|
11
11
|
* Copyright(c) 2012-2014 Roman Shtylman
|
12
12
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
13
13
|
* MIT Licensed
|
14
|
-
*/t.parse=function(t,r){if("string"!=typeof t)throw TypeError("argument str must be a string");for(var i={},
|
14
|
+
*/t.parse=function(t,r){if("string"!=typeof t)throw TypeError("argument str must be a string");for(var i={},s=t.split(n),a=(r||{}).decode||e,o=0;o<s.length;o++){var l=s[o],c=l.indexOf("=");if(!(c<0)){var u=l.substr(0,c).trim(),h=l.substr(++c,l.length).trim();'"'==h[0]&&(h=h.slice(1,-1)),void 0==i[u]&&(i[u]=function(e,t){try{return t(e)}catch(t){return e}}(h,a))}}return i},t.serialize=function(e,t,n){var s=n||{},a=s.encode||r;if("function"!=typeof a)throw TypeError("option encode is invalid");if(!i.test(e))throw TypeError("argument name is invalid");var o=a(t);if(o&&!i.test(o))throw TypeError("argument val is invalid");var l=e+"="+o;if(null!=s.maxAge){var c=s.maxAge-0;if(isNaN(c)||!isFinite(c))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(c)}if(s.domain){if(!i.test(s.domain))throw TypeError("option domain is invalid");l+="; Domain="+s.domain}if(s.path){if(!i.test(s.path))throw TypeError("option path is invalid");l+="; Path="+s.path}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw TypeError("option expires is invalid");l+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(l+="; HttpOnly"),s.secure&&(l+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return l};var e=decodeURIComponent,r=encodeURIComponent,n=/; */,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/})(),e.exports=t})()},"./dist/compiled/data-uri-to-buffer/index.js":e=>{(()=>{"use strict";var t={151:e=>{e.exports=function(e){if(!/^data:/i.test(e))throw TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');let t=(e=e.replace(/\r?\n/g,"")).indexOf(",");if(-1===t||t<=4)throw TypeError("malformed data: URI");let r=e.substring(5,t).split(";"),n="",i=!1,s=r[0]||"text/plain",a=s;for(let e=1;e<r.length;e++)"base64"===r[e]?i=!0:(a+=`;${r[e]}`,0===r[e].indexOf("charset=")&&(n=r[e].substring(8)));r[0]||n.length||(a+=";charset=US-ASCII",n="US-ASCII");let o=i?"base64":"ascii",l=unescape(e.substring(t+1)),c=Buffer.from(l,o);return c.type=s,c.typeFull=a,c.charset=n,c}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={exports:{}},a=!0;try{t[e](s,s.exports,n),a=!1}finally{a&&delete r[e]}return s.exports}n.ab=__dirname+"/";var i=n(151);e.exports=i})()},"./dist/compiled/fresh/index.js":e=>{(()=>{"use strict";var t={695:e=>{/*!
|
15
15
|
* fresh
|
16
16
|
* Copyright(c) 2012 TJ Holowaychuk
|
17
17
|
* Copyright(c) 2016-2017 Douglas Christopher Wilson
|
18
18
|
* MIT Licensed
|
19
|
-
*/var t=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function r(e){var t=e&&Date.parse(e);return"number"==typeof t?t:NaN}e.exports=function(e,n){var i=e["if-modified-since"],a=e["if-none-match"];if(!i&&!a)return!1;var s=e["cache-control"];if(s&&t.test(s))return!1;if(a&&"*"!==a){var o=n.etag;if(!o)return!1;for(var l=!0,u=function(e){for(var t=0,r=[],n=0,i=0,a=e.length;i<a;i++)switch(e.charCodeAt(i)){case 32:n===t&&(n=t=i+1);break;case 44:r.push(e.substring(n,t)),n=t=i+1;break;default:t=i+1}return r.push(e.substring(n,t)),r}(a),c=0;c<u.length;c++){var d=u[c];if(d===o||d==="W/"+o||"W/"+d===o){l=!1;break}}if(l)return!1}if(i){var h=n["last-modified"];if(!h||!(r(h)<=r(i)))return!1}return!0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}},s=!0;try{t[e](a,a.exports,n),s=!1}finally{s&&delete r[e]}return a.exports}n.ab=__dirname+"/";var i=n(695);e.exports=i})()},"./dist/compiled/p-queue/index.js":e=>{(()=>{"use strict";var t={993:e=>{var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var o=new i(n,a||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),o.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,s=Array(a);i<a;i++)s[i]=n[i].fn;return s},o.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},o.prototype.emit=function(e,t,n,i,a,s){var o=r?r+e:e;if(!this._events[o])return!1;var l,u,c=this._events[o],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,s),!0}for(u=1,l=Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!l)for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},o.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},o.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},o.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||s(this,a);else{for(var l=0,u=[],c=o.length;l<c;l++)(o[l].fn!==t||i&&!o[l].once||n&&o[l].context!==n)&&u.push(o[l]);u.length?this._events[a]=1===u.length?u[0]:u:s(this,a)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o},213:e=>{e.exports=(e,t)=>(t=t||(()=>{}),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:!0}),t.default=function(e,t,r){let n=0,i=e.length;for(;i>0;){let a=i/2|0,s=n+a;0>=r(e[s],t)?(n=++s,i-=a+1):i=a}return n}},821:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});let n=r(574);t.default=class{constructor(){this._queue=[]}enqueue(e,t){let r={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(r);return}let i=n.default(this._queue,r,(e,t)=>t.priority-e.priority);this._queue.splice(i,0,r)}dequeue(){let e=this._queue.shift();return null==e?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}}},816:(e,t,r)=>{let n=r(213);class i extends Error{constructor(e){super(e),this.name="TimeoutError"}}let a=(e,t,r)=>new Promise((a,s)=>{if("number"!=typeof t||t<0)throw TypeError("Expected `milliseconds` to be a positive number");if(t===1/0){a(e);return}let o=setTimeout(()=>{if("function"==typeof r){try{a(r())}catch(e){s(e)}return}let n="string"==typeof r?r:`Promise timed out after ${t} milliseconds`,o=r instanceof Error?r:new i(n);"function"==typeof e.cancel&&e.cancel(),s(o)},t);n(e.then(a,s),()=>{clearTimeout(o)})});e.exports=a,e.exports.default=a,e.exports.TimeoutError=i}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}},s=!0;try{t[e](a,a.exports,n),s=!1}finally{s&&delete r[e]}return a.exports}n.ab=__dirname+"/";var i={};(()=>{Object.defineProperty(i,"__esModule",{value:!0});let e=n(993),t=n(816),r=n(821),a=()=>{},s=new t.TimeoutError;i.default=class extends e{constructor(e){var t,n,i,s;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=a,this._resolveIdle=a,!("number"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:r.default},e)).intervalCap&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(s=null===(i=e.interval)||void 0===i?void 0:i.toString())&&void 0!==s?s:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,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=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=a,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=a,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){let e=Date.now();if(void 0===this._intervalId){let t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},t)),!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 e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&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(e){if(!("number"==typeof e&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,r={}){return new Promise((n,i)=>{let a=async()=>{this._pendingCount++,this._intervalCount++;try{let a=void 0===this._timeout&&void 0===r.timeout?e():t.default(Promise.resolve(e()),void 0===r.timeout?this._timeout:r.timeout,()=>{(void 0===r.throwOnTimeout?this._throwOnTimeout:r.throwOnTimeout)&&i(s)});n(await a)}catch(e){i(e)}this._next()};this._queue.enqueue(a,r),this._tryToStartAnother(),this.emit("add")})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}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(e=>{let t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}})}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise(e=>{let 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.exports=i})()},"./dist/compiled/path-to-regexp/index.js":e=>{(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{function e(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"===n||"+"===n||"?"===n){t.push({type:"MODIFIER",index:r,value:e[r++]});continue}if("\\"===n){t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});continue}if("{"===n){t.push({type:"OPEN",index:r,value:e[r++]});continue}if("}"===n){t.push({type:"CLOSE",index:r,value:e[r++]});continue}if(":"===n){for(var i="",a=r+1;a<e.length;){var s=e.charCodeAt(a);if(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s){i+=e[a++];continue}break}if(!i)throw TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:i}),r=a;continue}if("("===n){var o=1,l="",a=r+1;if("?"===e[a])throw TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;){if("\\"===e[a]){l+=e[a++]+e[a++];continue}if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw TypeError("Capturing groups are not allowed at "+a);l+=e[a++]}if(o)throw TypeError("Unbalanced pattern at "+r);if(!l)throw TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:l}),r=a;continue}t.push({type:"CHAR",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,a=void 0===n?"./":n,s="[^"+i(t.delimiter||"/#?")+"]+?",o=[],l=0,u=0,c="",d=function(e){if(u<r.length&&r[u].type===e)return r[u++].value},h=function(e){var t=d(e);if(void 0!==t)return t;var n=r[u];throw TypeError("Unexpected "+n.type+" at "+n.index+", expected "+e)},p=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t};u<r.length;){var f=d("CHAR"),m=d("NAME"),g=d("PATTERN");if(m||g){var v=f||"";-1===a.indexOf(v)&&(c+=v,v=""),c&&(o.push(c),c=""),o.push({name:m||l++,prefix:v,suffix:"",pattern:g||s,modifier:d("MODIFIER")||""});continue}var y=f||d("ESCAPED_CHAR");if(y){c+=y;continue}if(c&&(o.push(c),c=""),d("OPEN")){var v=p(),b=d("NAME")||"",E=d("PATTERN")||"",_=p();h("CLOSE"),o.push({name:b||(E?l++:""),pattern:b&&!E?s:E,prefix:v,suffix:_,modifier:d("MODIFIER")||""});continue}h("END")}return o}function r(e,t){void 0===t&&(t={});var r=a(t),n=t.encode,i=void 0===n?function(e){return e}:n,s=t.validate,o=void 0===s||s,l=e.map(function(e){if("object"==typeof e)return RegExp("^(?:"+e.pattern+")$",r)});return function(t){for(var r="",n=0;n<e.length;n++){var a=e[n];if("string"==typeof a){r+=a;continue}var s=t?t[a.name]:void 0,u="?"===a.modifier||"*"===a.modifier,c="*"===a.modifier||"+"===a.modifier;if(Array.isArray(s)){if(!c)throw TypeError('Expected "'+a.name+'" to not repeat, but got an array');if(0===s.length){if(u)continue;throw TypeError('Expected "'+a.name+'" to not be empty')}for(var d=0;d<s.length;d++){var h=i(s[d],a);if(o&&!l[n].test(h))throw TypeError('Expected all "'+a.name+'" to match "'+a.pattern+'", but got "'+h+'"');r+=a.prefix+h+a.suffix}continue}if("string"==typeof s||"number"==typeof s){var h=i(String(s),a);if(o&&!l[n].test(h))throw TypeError('Expected "'+a.name+'" to match "'+a.pattern+'", but got "'+h+'"');r+=a.prefix+h+a.suffix;continue}if(!u){var p=c?"an array":"a string";throw TypeError('Expected "'+a.name+'" to be '+p)}}return r}}function n(e,t,r){void 0===r&&(r={});var n=r.decode,i=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var a=n[0],s=n.index,o=Object.create(null),l=1;l<n.length;l++)!function(e){if(void 0!==n[e]){var r=t[e-1];"*"===r.modifier||"+"===r.modifier?o[r.name]=n[e].split(r.prefix+r.suffix).map(function(e){return i(e,r)}):o[r.name]=i(n[e],r)}}(l);return{path:a,index:s,params:o}}}function i(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function a(e){return e&&e.sensitive?"":"i"}function s(e,t,r){void 0===r&&(r={});for(var n=r.strict,s=void 0!==n&&n,o=r.start,l=r.end,u=r.encode,c=void 0===u?function(e){return e}:u,d="["+i(r.endsWith||"")+"]|$",h="["+i(r.delimiter||"/#?")+"]",p=void 0===o||o?"^":"",f=0;f<e.length;f++){var m=e[f];if("string"==typeof m)p+=i(c(m));else{var g=i(c(m.prefix)),v=i(c(m.suffix));if(m.pattern){if(t&&t.push(m),g||v){if("+"===m.modifier||"*"===m.modifier){var y="*"===m.modifier?"?":"";p+="(?:"+g+"((?:"+m.pattern+")(?:"+v+g+"(?:"+m.pattern+"))*)"+v+")"+y}else p+="(?:"+g+"("+m.pattern+")"+v+")"+m.modifier}else p+="("+m.pattern+")"+m.modifier}else p+="(?:"+g+v+")"+m.modifier}}if(void 0===l||l)s||(p+=h+"?"),p+=r.endsWith?"(?="+d+")":"$";else{var b=e[e.length-1],E="string"==typeof b?h.indexOf(b[b.length-1])>-1:void 0===b;s||(p+="(?:"+h+"(?="+d+"))?"),E||(p+="(?="+h+"|"+d+")")}return new RegExp(p,a(r))}function o(t,r,n){return t instanceof RegExp?function(e,t){if(!t)return e;var r=e.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)t.push({name:n,prefix:"",suffix:"",modifier:"",pattern:""});return e}(t,r):Array.isArray(t)?RegExp("(?:"+t.map(function(e){return o(e,r,n).source}).join("|")+")",a(n)):s(e(t,n),r,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=e,t.compile=function(t,n){return r(e(t,n),n)},t.tokensToFunction=r,t.match=function(e,t){var r=[];return n(o(e,r,t),r,t)},t.regexpToFunction=n,t.tokensToRegexp=s,t.pathToRegexp=o})(),e.exports=t})()},"./dist/compiled/shell-quote/index.js":e=>{(()=>{"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{t.quote=function(e){return e.map(function(e){return e&&"object"==typeof e?e.op.replace(/(.)/g,"\\$1"):/["\s]/.test(e)&&!/'/.test(e)?"'"+e.replace(/(['\\])/g,"\\$1")+"'":/["'\s]/.test(e)?'"'+e.replace(/(["\\$`!])/g,"\\$1")+'"':String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g,"$1\\$2")}).join(" ")};for(var e="(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|>>|>\\&|[&;()|<>])",r="|&;()<> \\t",n="(\\\\['\""+r+"]|[^\\s'\""+r+"])+",i="",a=0;a<4;a++)i+=(0x100000000*Math.random()).toString(16);t.parse=function(t,r,a){var s,o,l,u,c,d=(s=r,o=a,l=RegExp(["("+e+")","("+n+"|\"((\\\\\"|[^\"])*?)\"|'((\\\\'|[^'])*?)')*"].join("|"),"g"),u=t.match(l).filter(Boolean),c=!1,u?(s||(s={}),o||(o={}),u.map(function(t,r){if(!c){if(RegExp("^"+e+"$").test(t))return{op:t};for(var n=o.escape||"\\",a=!1,l=!1,d="",h=!1,p=0,f=t.length;p<f;p++){var m=t.charAt(p);if(h=h||!a&&("*"===m||"?"===m),l)d+=m,l=!1;else if(a)m===a?a=!1:"'"==a?d+=m:m===n?(p+=1,'"'===(m=t.charAt(p))||m===n||"$"===m?d+=m:d+=n+m):"$"===m?d+=g():d+=m;else if('"'===m||"'"===m)a=m;else if(RegExp("^"+e+"$").test(m))return{op:t};else if(RegExp("^#$").test(m)){if(c=!0,d.length)return[d,{comment:t.slice(p+1)+u.slice(r+1).join(" ")}];return[{comment:t.slice(p+1)+u.slice(r+1).join(" ")}]}else m===n?l=!0:"$"===m?d+=g():d+=m}return h?{op:"glob",pattern:d}:d}function g(){var e,r,n,a;if(p+=1,"{"===t.charAt(p)){if(p+=1,"}"===t.charAt(p))throw Error("Bad substitution: "+t.substr(p-2,3));if((e=t.indexOf("}",p))<0)throw Error("Bad substitution: "+t.substr(p));r=t.substr(p,e-p),p=e}else/[*@#?$!_\-]/.test(t.charAt(p))?(r=t.charAt(p),p+=1):(e=t.substr(p).match(/[^\w\d_]/))?(r=t.substr(p,e.index),p+=e.index-1):(r=t.substr(p),p=t.length);return n=r,(void 0===(a="function"==typeof s?s(n):s[n])&&""!=n?a="":void 0===a&&(a="$"),"object"==typeof a)?""+i+JSON.stringify(a)+i:""+a}}).reduce(function(e,t){return void 0===t?e:e.concat(t)},[])):[]);return"function"!=typeof r?d:d.reduce(function(e,t){if("object"==typeof t)return e.concat(t);var r=t.split(RegExp("("+i+".*?"+i+")","g"));return 1===r.length?e.concat(r[0]):e.concat(r.filter(Boolean).map(function(e){return RegExp("^"+i).test(e)?JSON.parse(e.split(i)[1]):e}))},[])}})(),e.exports=t})()},"./dist/esm/lib/constants.js":(e,t,r)=>{"use strict";r.d(t,{AA:()=>n,AR:()=>b,EP:()=>p,Hw:()=>E,RM:()=>d,VC:()=>f,c1:()=>g,gs:()=>v,h:()=>i,kz:()=>s,li:()=>_,mH:()=>u,pu:()=>l,qF:()=>y,r4:()=>o,tz:()=>c,vS:()=>m,vx:()=>a,x3:()=>h});let n="nxtP",i="nxtI",a="x-matched-path",s="x-prerender-revalidate",o="x-prerender-revalidate-if-generated",l=".prefetch.rsc",u=".segments",c=".segment.rsc",d=".rsc",h=".json",p=".meta",f="x-next-cache-tags",m="x-next-revalidated-tags",g="x-next-revalidate-tag-token",v="next-resume",y=31536e3,b=0xfffffffe,E="instrumentation",_={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},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"};({...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]}})},"./dist/esm/server sync recursive":e=>{function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id="./dist/esm/server sync recursive",e.exports=t},"./dist/esm/server/api-utils/index.js":(e,t,r)=>{"use strict";r.d(t,{Gx:()=>a,Ic:()=>s,M_:()=>u,PW:()=>l,Uc:()=>o,wE:()=>c});var n=r("./dist/esm/server/web/spec-extension/adapters/headers.js"),i=r("./dist/esm/lib/constants.js");function a(e,t){let r=n.o.from(e.headers);return{isOnDemandRevalidate:r.get(i.kz)===t.previewModeId,revalidateOnlyGenerated:r.has(i.r4)}}r("./lib/trace/tracer"),r("./dist/esm/server/lib/trace/constants.js");let s="__prerender_bypass",o="__next_preview_data",l=Symbol(o),u=Symbol(s);function c(e,t={}){if(u in e)return e;let{serialize:n}=r("./dist/compiled/cookie/index.js"),i=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof i?[i]:Array.isArray(i)?i:[],n(s,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0}),n(o,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0})]),Object.defineProperty(e,u,{value:!0,enumerable:!1}),e}},"./dist/esm/server/api-utils/node/try-get-preview-data.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{tryGetPreviewData:()=>s});var n=r("./dist/esm/server/api-utils/index.js"),i=r("./dist/esm/server/web/spec-extension/cookies.js"),a=r("./dist/esm/server/web/spec-extension/adapters/headers.js");function s(e,t,s,o){var l,u;let c;if(s&&(0,n.Gx)(e,s).isOnDemandRevalidate)return!1;if(n.PW in e)return e[n.PW];let d=a.o.from(e.headers),h=new i.tm(d),p=null==(l=h.get(n.Ic))?void 0:l.value,f=null==(u=h.get(n.Uc))?void 0:u.value;if(p&&!f&&p===s.previewModeId){let t={};return Object.defineProperty(e,n.PW,{value:t,enumerable:!1}),t}if(!p&&!f)return!1;if(!p||!f||p!==s.previewModeId)return o||(0,n.wE)(t),!1;try{c=r("next/dist/compiled/jsonwebtoken").verify(f,s.previewModeSigningKey)}catch{return(0,n.wE)(t),!1}let{decryptWithSecret:m}=r("./dist/esm/server/crypto-utils.js"),g=m(Buffer.from(s.previewModeEncryptionKey),c.data);try{let t=JSON.parse(g);return Object.defineProperty(e,n.PW,{value:t,enumerable:!1}),t}catch{return!1}}},"./dist/esm/server/crypto-utils.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptWithSecret:()=>o,encryptWithSecret:()=>s});var n=r("crypto"),i=/*#__PURE__*/r.n(n);let a="aes-256-gcm";function s(e,t){let r=i().randomBytes(16),n=i().randomBytes(64),s=i().pbkdf2Sync(e,n,1e5,32,"sha512"),o=i().createCipheriv(a,s,r),l=Buffer.concat([o.update(t,"utf8"),o.final()]),u=o.getAuthTag();return Buffer.concat([n,r,u,l]).toString("hex")}function o(e,t){let r=Buffer.from(t,"hex"),n=r.slice(0,64),s=r.slice(64,80),o=r.slice(80,96),l=r.slice(96),u=i().pbkdf2Sync(e,n,1e5,32,"sha512"),c=i().createDecipheriv(a,u,s);return c.setAuthTag(o),c.update(l)+c.final("utf8")}},"./dist/esm/server/lib/trace/constants.js":(e,t,r)=>{"use strict";r.d(t,{Fx:()=>s,Li:()=>n,p2:()=>i});var n=/*#__PURE__*/function(e){return e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404",e}(n||{}),i=/*#__PURE__*/function(e){return e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents",e}(i||{}),a=/*#__PURE__*/function(e){return e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer",e}(a||{}),s=/*#__PURE__*/function(e){return e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch",e}(s||{}),o=/*#__PURE__*/function(e){return e.startServer="startServer.startServer",e}(o||{}),l=/*#__PURE__*/function(e){return e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult",e}(l||{}),u=/*#__PURE__*/function(e){return e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch",e}(u||{}),c=/*#__PURE__*/function(e){return e.executeRoute="Router.executeRoute",e}(c||{}),d=/*#__PURE__*/function(e){return e.runHandler="Node.runHandler",e}(d||{}),h=/*#__PURE__*/function(e){return e.runHandler="AppRouteRouteHandlers.runHandler",e}(h||{}),p=/*#__PURE__*/function(e){return e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport",e}(p||{}),f=/*#__PURE__*/function(e){return e.execute="Middleware.execute",e}(f||{})},"./dist/esm/server/node-environment-baseline.js":(e,t,r)=>{if("function"!=typeof globalThis.AsyncLocalStorage){let{AsyncLocalStorage:e}=r("async_hooks");globalThis.AsyncLocalStorage=e}"function"!=typeof globalThis.WebSocket&&Object.defineProperty(globalThis,"WebSocket",{configurable:!0,get:()=>r("next/dist/compiled/ws").WebSocket,set(e){Object.defineProperty(globalThis,"WebSocket",{configurable:!0,writable:!0,value:e})}})},"./dist/esm/server/node-polyfill-crypto.js":(e,t,r)=>{if(!global.crypto){let e;Object.defineProperty(global,"crypto",{enumerable:!1,configurable:!0,get:()=>(e||(e=r("node:crypto").webcrypto),e),set(t){e=t}})}},"./dist/esm/server/web/spec-extension/adapters/headers.js":(e,t,r)=>{"use strict";r.d(t,{o:()=>a});var n=r("./dist/esm/server/web/spec-extension/adapters/reflect.js");class i extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new i}}class a extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,i){if("symbol"==typeof r)return n.l.get(t,r,i);let a=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===a);if(void 0!==s)return n.l.get(t,s,i)},set(t,r,i,a){if("symbol"==typeof r)return n.l.set(t,r,i,a);let s=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===s);return n.l.set(t,o??r,i,a)},has(t,r){if("symbol"==typeof r)return n.l.has(t,r);let i=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0!==a&&n.l.has(t,a)},deleteProperty(t,r){if("symbol"==typeof r)return n.l.deleteProperty(t,r);let i=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0===a||n.l.deleteProperty(t,a)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return i.callable;default:return n.l.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new a(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}},"./dist/esm/server/web/spec-extension/adapters/reflect.js":(e,t,r)=>{"use strict";r.d(t,{l:()=>n});class n{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},"./dist/esm/server/web/spec-extension/cookies.js":(e,t,r)=>{"use strict";r.d(t,{Ud:()=>n.stringifyCookie,VO:()=>n.ResponseCookies,tm:()=>n.RequestCookies});var n=r("./dist/compiled/@edge-runtime/cookies/index.js")},"./dist/esm/shared/lib/isomorphic/path.js":(e,t,r)=>{let n;n=r("path"),e.exports=n},"./dist/esm/shared/lib/modern-browserslist-target.js":e=>{e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},"./lib/trace/tracer":e=>{"use strict";e.exports=require("next/dist/server/lib/trace/tracer")},"./web/sandbox":e=>{"use strict";e.exports=require("next/dist/server/web/sandbox")},async_hooks:e=>{"use strict";e.exports=require("async_hooks")},crypto:e=>{"use strict";e.exports=require("crypto")},fs:e=>{"use strict";e.exports=require("fs")},module:e=>{"use strict";e.exports=require("module")},"next/dist/compiled/jsonwebtoken":e=>{"use strict";e.exports=require("next/dist/compiled/jsonwebtoken")},"next/dist/compiled/ws":e=>{"use strict";e.exports=require("next/dist/compiled/ws")},"next/dist/experimental/testmode/server-edge":e=>{"use strict";e.exports=require("next/dist/experimental/testmode/server-edge")},"node:crypto":e=>{"use strict";e.exports=require("node:crypto")},os:e=>{"use strict";e.exports=require("os")},path:e=>{"use strict";e.exports=require("path")}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";let e,t;r.r(n),r.d(n,{NoFallbackError:()=>nm,WrappedBuildError:()=>ng,default:()=>n2});var i,a,s={};r.r(s),r.d(s,{bootstrap:()=>eF,error:()=>eU,event:()=>eG,info:()=>eB,prefixes:()=>eL,ready:()=>eW,trace:()=>eV,wait:()=>ez,warn:()=>eX,warnOnce:()=>eJ}),r("./dist/esm/server/node-environment-baseline.js");var o=r("module"),l=r("path"),u=/*#__PURE__*/r.n(l);let c=require("url"),d=require("next/dist/compiled/source-map");var h=r("fs"),p=/*#__PURE__*/r.n(h);require("next/dist/compiled/source-map08"),require("fs/promises"),r("./dist/compiled/data-uri-to-buffer/index.js");let{env:f,stdout:m}=(null==(i=globalThis)?void 0:i.process)??{},g=f&&!f.NO_COLOR&&(f.FORCE_COLOR||(null==m?void 0:m.isTTY)&&!f.CI&&"dumb"!==f.TERM),v=(e,t,r,n)=>{let i=e.substring(0,n)+r,a=e.substring(n+t.length),s=a.indexOf(t);return~s?i+v(a,t,r,s):i+a},y=(e,t,r=e)=>g?n=>{let i=""+n,a=i.indexOf(t,e.length);return~a?e+v(i,t,r,a)+t:e+i+t}:String,b=y("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m");y("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),y("\x1b[3m","\x1b[23m"),y("\x1b[4m","\x1b[24m"),y("\x1b[7m","\x1b[27m"),y("\x1b[8m","\x1b[28m"),y("\x1b[9m","\x1b[29m"),y("\x1b[30m","\x1b[39m");let E=y("\x1b[31m","\x1b[39m"),_=y("\x1b[32m","\x1b[39m"),R=y("\x1b[33m","\x1b[39m");y("\x1b[34m","\x1b[39m");let w=y("\x1b[35m","\x1b[39m");y("\x1b[38;2;173;127;168m","\x1b[39m"),y("\x1b[36m","\x1b[39m");let x=y("\x1b[37m","\x1b[39m");y("\x1b[90m","\x1b[39m"),y("\x1b[40m","\x1b[49m"),y("\x1b[41m","\x1b[49m"),y("\x1b[42m","\x1b[49m"),y("\x1b[43m","\x1b[49m"),y("\x1b[44m","\x1b[49m"),y("\x1b[45m","\x1b[49m"),y("\x1b[46m","\x1b[49m"),y("\x1b[47m","\x1b[49m"),require("child_process"),r("os"),r("./dist/compiled/shell-quote/index.js"),require("next/dist/compiled/babel/code-frame"),require("util");let C=require("next/dist/compiled/stacktrace-parser");Symbol.for("NextjsError");let P=["Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:","A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:"];function O(e){return P.some(t=>e.startsWith(t))}let T=[/^In HTML, (.+?) cannot be a child of <(.+?)>\.(.*)\nThis will cause a hydration error\.(.*)/,/^In HTML, (.+?) cannot be a descendant of <(.+?)>\.\nThis will cause a hydration error\.(.*)/,/^In HTML, text nodes cannot be a child of <(.+?)>\.\nThis will cause a hydration error\./,/^In HTML, whitespace text nodes cannot be a child of <(.+?)>\. Make sure you don't have any extra whitespace between tags on each line of your source code\.\nThis will cause a hydration error\./,/^Expected server HTML to contain a matching <(.+?)> in <(.+?)>\.(.*)/,/^Did not expect server HTML to contain a <(.+?)> in <(.+?)>\.(.*)/,/^Expected server HTML to contain a matching text node for "(.+?)" in <(.+?)>\.(.*)/,/^Did not expect server HTML to contain the text node "(.+?)" in <(.+?)>\.(.*)/,/^Text content did not match\. Server: "(.+?)" Client: "(.+?)"(.*)/],S=/\/_next(\/static\/.+)/,D=require("next/dist/server/app-render/work-unit-async-storage.external.js"),A=()=>void 0;function N(e){let t,r=null!==e.lineNumber?`:${e.lineNumber}`:"";return null!==e.column&&""!==r&&(r+=`:${e.column}`),null!==e.file&&e.file.startsWith("file://")&&URL.canParse(e.file)?t=l.relative(process.cwd(),c.fileURLToPath(e.file)):t=null!==e.file&&e.file.startsWith("/")?l.relative(process.cwd(),e.file):e.file,e.methodName?` at ${e.methodName} (${t}${r})`:` at ${t}${r}`}function j(e){return e.name||"Error"}function k(e,t){let r=j(e)+": "+(e.message||"");for(let e=0;e<t.length;e++)r+="\n at "+t[e].toString();return r}function I(e){return e.startsWith("node:")||e.includes("node_modules")}function M(e){return{stack:{arguments:e.arguments,column:e.column,file:e.file,lineNumber:e.lineNumber,methodName:e.methodName,ignored:I(e.file)},code:null}}!function(e){let t=Symbol.for("nodejs.util.inspect.custom");e.prepareStackTrace=k,e.prototype[t]=function(e,r,n){return D.workUnitAsyncStorage.exit(()=>{let i=function(e,t){let r=void 0!==e.cause?Object.defineProperty(Error(e.message,{cause:e.cause}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}):Object.defineProperty(Error(e.message),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});for(let t in r.stack=function(e,t){let r=String(e.stack),n=j(e),i=r.indexOf("react-stack-bottom-frame");-1!==i&&(i=r.lastIndexOf("\n",i)),-1!==i&&(r=r.slice(0,i));let a=function(e){if(!e)return[];let t=e.replace(/^Error: /,"");if(O(t)){let{stack:r}=function(e){var t;let r="string"==typeof(t=e=(e=e.replace(/^Error: /,"")).replace("Warning: ",""))&&!!t&&(t.startsWith("Warning: ")&&(t=t.slice(9)),T.some(e=>e.test(t)));if(!O(e)&&!r)return{message:null,stack:e,diff:""};if(r){let[t,r]=e.split("\n\n");return{message:t.trim(),stack:"",diff:(r||"").trim()}}let n=e.indexOf("\n"),[i,a]=(e=e.slice(n+1).trim()).split("https://react.dev/link/hydration-mismatch"),s=i.trim();if(!a||!(a.length>1))return{message:s,stack:a};{let e=[],t=[];return a.split("\n").forEach(r=>{""!==r.trim()&&(r.trim().startsWith("at ")?e.push(r):t.push(r))}),{message:s,diff:t.join("\n"),stack:e.join("\n")}}}(t);r&&(e=r)}return e=e.split("\n").map(e=>(e.includes("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/\(eval at [^()]* \(/,"(file://").replace(/\),.*$/g,")")),e)).join("\n"),(0,C.parse)(e).map(e=>{try{let n=new URL(e.file),i=S.exec(n.pathname);if(i){var t,r;let a=null==(r=process.env.__NEXT_DIST_DIR)?void 0:null==(t=r.replace(/\\/g,"/"))?void 0:t.replace(/\/$/,"");a&&(e.file="file://"+a.concat(i.pop())+n.search)}}catch(e){}return e})}(r),s=new Map,l="";for(let e of a)if(null===e.file)l+="\n"+N(e);else{let t=function(e,t,r){var n,i,a;let s,l;let u=t.get(e.file);if(void 0===u){let r,n=e.file;n.startsWith("/")&&(n=c.pathToFileURL(e.file).toString());try{let e=(0,o.findSourceMap)(n);r=null==e?void 0:e.payload}catch(t){return console.error(`${n}: Invalid source map. Only conformant source maps can be used to find the original code. Cause: ${t}`),M(e)}if(void 0===r&&(r=A(n)),void 0===r)return M(e);l=r;try{s=new d.SourceMapConsumer(l)}catch(t){return console.error(`${n}: Invalid source map. Only conformant source maps can be used to find the original code. Cause: ${t}`),M(e)}t.set(e.file,{map:s,payload:l})}else s=u.map,l=u.payload;let h=s.originalPositionFor({column:e.column??0,line:e.lineNumber??1});if(null===h.source)return{stack:{arguments:e.arguments,column:e.column,file:e.file,lineNumber:e.lineNumber,methodName:e.methodName,ignored:I(e.file)},code:null};s.sourceContentFor(h.source,!0);let p=function(e,t){if(!("sections"in t))return t;{let r=e.lineNumber??0,n=e.column??0,i=t.sections[0];for(let e=0;e<t.sections.length&&t.sections[e].offset.line<=r&&t.sections[e].offset.column<=n;e++)i=t.sections[e];return void 0===i?void 0:i.map}}(e,l),f=!1;if(void 0===p)console.error("No applicable source map found in sections for frame",e);else if(h.source.includes("node_modules"))f=!0;else{let e=p.sources.indexOf(h.source);f=(null==(a=p.ignoreList)?void 0:a.includes(e))??!1}let m={methodName:null==(i=e.methodName)?void 0:null==(n=i.replace("__WEBPACK_DEFAULT_EXPORT__","default"))?void 0:n.replace("__webpack_exports__.",""),column:h.column,file:h.source,lineNumber:h.line,arguments:[],ignored:f};return{stack:m,code:null}}(e,s,0);t.stack.ignored||(l+="\n"+N(t.stack))}return n+": "+e.message+l}(e,0),e)Object.prototype.hasOwnProperty.call(r,t)||(r[t]=e[t]);return r}(this,0),a=i[t];Object.defineProperty(i,t,{value:void 0,enumerable:!1,writable:!0});try{return n(i,{...r,depth:(r.depth??2)-e})}finally{i[t]=a}})}}(globalThis.Error);let q=require("next/dist/server/app-render/work-async-storage.external.js");if(r("../../node_modules/.pnpm/react@19.1.0-canary-0ca3deeb-20250311/node_modules/react/index.js").unstable_postpone,!1===function(e){return e.includes("needs to bail out of prerendering at this point because it used")&&e.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 __next_metadata_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_viewport_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_outlet_boundary__[\\n\\s]`);class L extends Error{constructor(e,t){super("Invariant: "+(e.endsWith(".")?e:e+".")+" This is a bug in Next.js.",t),this.name="InvariantError"}}function $(e,t){let r=D.workUnitAsyncStorage.getStore();if(r){if("prerender"===r.type){let n=q.workAsyncStorage.getStore();if(n){let i;switch(t){case"time":i=`Route "${n.route}" used ${e} instead of using \`performance\` or without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-current-time`;break;case"random":i=`Route "${n.route}" used ${e} outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random`;break;case"crypto":i=`Route "${n.route}" used ${e} outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-crypto`;break;default:throw Object.defineProperty(new L("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}let a=Object.defineProperty(Error(i),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});!function(e,t,r,n){let i=n.dynamicTracking;i&&null===i.syncDynamicErrorWithStack&&(i.syncDynamicExpression=t,i.syncDynamicErrorWithStack=r),function(e,t,r){let n=function(e){let t=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t.digest="NEXT_PRERENDER_INTERRUPTED",t}(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`);r.controller.abort(n);let i=r.dynamicTracking;i&&i.dynamicAccesses.push({stack:i.isDebugDynamicAccesses?Error().stack:void 0,expression:t})}(e,t,n)}(n.route,e,a,r)}}else"request"===r.type&&!0===r.prerenderPhase&&(r.prerenderPhase=!1)}}let H="`Math.random()`";try{let e=Math.random;Math.random=(function(){return $(H,"random"),e.apply(null,arguments)}).bind(null),Object.defineProperty(Math.random,"name",{value:"random"})}catch{console.error(`Failed to install ${H} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}try{Date=function(e){var t;let r=Object.getOwnPropertyDescriptors(e);r.now.value=(t=e.now,({now:function(){return $("`Date.now()`","time"),t()}})["now".slice()].bind(null));let n=Reflect.apply,i=Reflect.construct,a=Object.defineProperties(function(){return new.target===void 0?($("`Date()`","time"),n(e,void 0,arguments)):(0==arguments.length&&$("`new Date()`","time"),i(e,arguments,new.target))},r);return Object.defineProperty(e.prototype,"constructor",{value:a}),a}(Date)}catch{console.error("Failed to install `Date` class extension. When using `experimental.dynamicIO`, APIs that read the current time will not correctly trigger dynamic behavior.")}"undefined"==typeof crypto?e=r("node:crypto").webcrypto:e=crypto;let F="`crypto.getRandomValues()`";try{let t=e.getRandomValues;e.getRandomValues=function(){return $(F,"crypto"),t.apply(e,arguments)}}catch{console.error(`Failed to install ${F} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}try{let t=e.randomUUID;e.randomUUID=function(){return $("`crypto.randomUUID()`","crypto"),t.apply(e,arguments)}}catch{console.error(`Failed to install ${F} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}{let e=r("node:crypto"),t="`require('node:crypto').randomUUID()`";try{let r=e.randomUUID;e.randomUUID=function(){return $(t,"random"),r.apply(this,arguments)}}catch{console.error(`Failed to install ${t} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}let n="`require('node:crypto').randomBytes(size)`";try{let t=e.randomBytes;e.randomBytes=function(){return"function"!=typeof arguments[1]&&$(n,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${n} extension. When using \`experimental.dynamicIO\` calling this function without a callback argument will not correctly trigger dynamic behavior.`)}let i="`require('node:crypto').randomFillSync(...)`";try{let t=e.randomFillSync;e.randomFillSync=function(){return $(i,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${i} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}try{let t=e.randomInt;e.randomInt=function(){return"function"!=typeof arguments[2]&&$("`require('node:crypto').randomInt(min, max)`","random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${n} extension. When using \`experimental.dynamicIO\` calling this function without a callback argument will not correctly trigger dynamic behavior.`)}let a="`require('node:crypto').generatePrimeSync(...)`";try{let t=e.generatePrimeSync;e.generatePrimeSync=function(){return $(a,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${a} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}let s="`require('node:crypto').generateKeyPairSync(...)`";try{let t=e.generateKeyPairSync;e.generateKeyPairSync=function(){return $(s,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${s} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}let o="`require('node:crypto').generateKeySync(...)`";try{let t=e.generateKeySync;e.generateKeySync=function(){return $(o,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${o} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}}let z=r("path"),U=r("module"),X=U.prototype.require,W=U._resolveFilename,B=require.resolve,G=new Map;function V(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}(function(e=[]){for(let[t,r]of e)G.set(t,r)})(Object.entries({"styled-jsx":z.dirname(B("styled-jsx/package.json")),"styled-jsx/style":B("styled-jsx/style"),"styled-jsx/style.js":B("styled-jsx/style")}).map(([e,t])=>[e,B(t)])),U._resolveFilename=(function(e,t,r,n,i,a){let s=t.get(r);return s&&(r=s),e.call(U,r,n,i,a)}).bind(null,W,G),U.prototype.require=function(e){return e.endsWith(".shared-runtime")?X.call(this,`next/dist/server/route-modules/pages/vendored/contexts/${z.basename(e,".shared-runtime")}`):X.call(this,e)},r("./dist/esm/server/node-polyfill-crypto.js"),"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class K extends Error{}class J extends Error{}class Y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class Q extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}function Z(e){let{re:t,groups:r}=e;return e=>{let n=t.exec(e);if(!n)return!1;let i=e=>{try{return decodeURIComponent(e)}catch(e){throw Object.defineProperty(new K("failed to decode param"),"__NEXT_ERROR_CODE",{value:"E528",enumerable:!1,configurable:!0})}},a={};for(let[e,t]of Object.entries(r)){let r=n[t.pos];void 0!==r&&(t.repeat?a[e]=r.split("/").map(e=>i(e)):a[e]=i(r))}return a}}let ee=Symbol.for("NextInternalRequestMeta");function et(e,t){let r=e[ee]||{};return"string"==typeof t?r[t]:r}function er(e,t,r){let n=et(e);return n[t]=r,e[ee]=n,n}function en(e,t){let r=et(e);return delete r[t],e[ee]=r,r}r("./dist/esm/shared/lib/modern-browserslist-target.js");let ei={client:"client",server:"server",edgeServer:"edge-server"};ei.client,ei.server,ei.edgeServer;let ea="/_not-found",es=""+ea+"/page",eo="pages-manifest.json",el="app-paths-manifest.json",eu="server",ec=["/_document","/_app","/_error"];Symbol("polyfills");let ed=["/500"];function eh(e,t){let r=u().join(e,t);return p().existsSync(r)?r:(r=u().join(e,"src",t),p().existsSync(r))?r:null}var ep=r("./dist/esm/server/api-utils/index.js"),ef=/*#__PURE__*/function(e){return e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e}({});function em(e){return function(){let{cookie:t}=e;if(!t)return{};let{parse:n}=r("./dist/compiled/cookie/index.js");return n(Array.isArray(t)?t.join("; "):t)}}class eg{constructor(e,t,r){this.method=e,this.url=t,this.body=r}get cookies(){return this._cookies?this._cookies:this._cookies=em(this.headers)()}}class ev{constructor(e){this.destination=e}redirect(e,t){return this.setHeader("Location",e),this.statusCode=t,t===ef.PermanentRedirect&&this.setHeader("Refresh",`0;url=${e}`),this}}class ey extends eg{static #e=a=ee;constructor(e){var t;super(e.method.toUpperCase(),e.url,e),this._req=e,this.headers=this._req.headers,this.fetchMetrics=null==(t=this._req)?void 0:t.fetchMetrics,this[a]=this._req[ee]||{},this.streaming=!1}get originalRequest(){return this._req[ee]=this[ee],this._req.url=this.url,this._req.cookies=this.cookies,this._req}set originalRequest(e){this._req=e}stream(){if(this.streaming)throw Object.defineProperty(Error("Invariant: NodeNextRequest.stream() can only be called once"),"__NEXT_ERROR_CODE",{value:"E467",enumerable:!1,configurable:!0});return this.streaming=!0,new ReadableStream({start:e=>{this._req.on("data",t=>{e.enqueue(new Uint8Array(t))}),this._req.on("end",()=>{e.close()}),this._req.on("error",t=>{e.error(t)})}})}}class eb extends ev{get originalResponse(){return ep.M_ in this&&(this._res[ep.M_]=this[ep.M_]),this._res}constructor(e){super(e),this._res=e,this.textBody=void 0}get sent(){return this._res.finished||this._res.headersSent}get statusCode(){return this._res.statusCode}set statusCode(e){this._res.statusCode=e}get statusMessage(){return this._res.statusMessage}set statusMessage(e){this._res.statusMessage=e}setHeader(e,t){return this._res.setHeader(e,t),this}removeHeader(e){return this._res.removeHeader(e),this}getHeaderValues(e){let t=this._res.getHeader(e);if(void 0!==t)return(Array.isArray(t)?t:[t]).map(e=>e.toString())}hasHeader(e){return this._res.hasHeader(e)}getHeader(e){let t=this.getHeaderValues(e);return Array.isArray(t)?t.join(","):void 0}getHeaders(){return this._res.getHeaders()}appendHeader(e,t){let r=this.getHeaderValues(e)??[];return r.includes(t)||this._res.setHeader(e,[...r,t]),this}body(e){return this.textBody=e,this}send(){this._res.end(this.textBody)}onClose(e){this.originalResponse.on("close",e)}}let eE=e=>{let t=e.length,r=0,n=0,i=8997,a=0,s=33826,o=0,l=40164,u=0,c=52210;for(;r<t;)i^=e.charCodeAt(r++),n=435*i,a=435*s,o=435*l,u=435*c,o+=i<<8,u+=s<<8,a+=n>>>16,i=65535&n,o+=a>>>16,s=65535&a,c=u+(o>>>16)&65535,l=65535&o;return(15&c)*0x1000000000000+0x100000000*l+65536*s+(i^c>>4)},e_=(e,t=!1)=>(t?'W/"':'"')+eE(e).toString(36)+e.length.toString(36)+'"';var eR=r("./dist/compiled/fresh/index.js"),ew=/*#__PURE__*/r.n(eR),ex=r("./dist/esm/lib/constants.js");function eC({revalidate:e,expire:t}){let r="number"==typeof e&&void 0!==t&&e<t?`, stale-while-revalidate=${t-e}`:"";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}${r}`:`s-maxage=${ex.qF}${r}`}let eP="Next-Action",eO="Next-Router-State-Tree",eT="Next-Router-Prefetch",eS="Next-Router-Segment-Prefetch",eD="Next-Url",eA=["RSC",eO,eT,"Next-HMR-Refresh",eS],eN="_rsc",ej="x-nextjs-postponed";async function ek({req:e,res:t,result:r,type:n,generateEtags:i,poweredByHeader:a,cacheControl:s}){if(t.finished||t.headersSent)return;a&&"html"===n&&t.setHeader("X-Powered-By","Next.js"),s&&!t.getHeader("Cache-Control")&&t.setHeader("Cache-Control",eC(s));let o=r.isDynamic?null:r.toUnchunkedString();if(i&&null!==o){let r=e_(o);if(r&&t.setHeader("ETag",r),ew()(e.headers,{etag:r})&&(t.statusCode=304,t.end(),1))return}if(t.getHeader("Content-Type")||t.setHeader("Content-Type",r.contentType?r.contentType:"rsc"===n?"text/x-component":"json"===n?"application/json":"text/html; charset=utf-8"),o&&t.setHeader("Content-Length",Buffer.byteLength(o)),"HEAD"===e.method){t.end(null);return}if(null!==o){t.end(o);return}await r.pipeToNodeResponse(t)}function eI(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function eM(e){if(e.startsWith("/"))return function(e,t,r){void 0===r&&(r=!0);let n=new URL("http://n"),i=e.startsWith(".")?new URL("http://n"):n,{pathname:a,searchParams:s,search:o,hash:l,href:u,origin:c}=new URL(e,i);if(c!==n.origin)throw Object.defineProperty(Error("invariant: invalid relative URL, router received "+e),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{pathname:a,query:r?eI(s):void 0,search:o,hash:l,href:u.slice(c.length)}}(e);let t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:eI(t.searchParams),search:t.search}}class eq{constructor(e,t){this.cache=new Map,this.sizes=new Map,this.totalSize=0,this.maxSize=e,this.calculateSize=t||(()=>1)}set(e,t){if(!e||!t)return;let r=this.calculateSize(t);if(r>this.maxSize){console.warn("Single item size exceeds maxSize");return}this.cache.has(e)&&(this.totalSize-=this.sizes.get(e)||0),this.cache.set(e,t),this.sizes.set(e,r),this.totalSize+=r,this.touch(e)}has(e){return!!e&&(this.touch(e),!!this.cache.get(e))}get(e){if(!e)return;let t=this.cache.get(e);if(void 0!==t)return this.touch(e),t}touch(e){let t=this.cache.get(e);void 0!==t&&(this.cache.delete(e),this.cache.set(e,t),this.evictIfNecessary())}evictIfNecessary(){for(;this.totalSize>this.maxSize&&this.cache.size>0;)this.evictLeastRecentlyUsed()}evictLeastRecentlyUsed(){let e=this.cache.keys().next().value;if(void 0!==e){let t=this.sizes.get(e)||0;this.totalSize-=t,this.cache.delete(e),this.sizes.delete(e)}}reset(){this.cache.clear(),this.sizes.clear(),this.totalSize=0}keys(){return[...this.cache.keys()]}remove(e){this.cache.has(e)&&(this.totalSize-=this.sizes.get(e)||0,this.cache.delete(e),this.sizes.delete(e))}clear(){this.cache.clear(),this.sizes.clear(),this.totalSize=0}get size(){return this.cache.size}get currentSize(){return this.totalSize}}let eL={wait:x(b("○")),error:E(b("⨯")),warn:R(b("⚠")),ready:"▲",info:x(b(" ")),event:_(b("✓")),trace:w(b("»"))},e$={log:"log",warn:"warn",error:"error"};function eH(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in e$?e$[e]:"log",n=eL[e];0===t.length?console[r](""):1===t.length&&"string"==typeof t[0]?console[r](" "+n+" "+t[0]):console[r](" "+n,...t)}function eF(...e){console.log(" "+e.join(" "))}function ez(...e){eH("wait",...e)}function eU(...e){eH("error",...e)}function eX(...e){eH("warn",...e)}function eW(...e){eH("ready",...e)}function eB(...e){eH("info",...e)}function eG(...e){eH("event",...e)}function eV(...e){eH("trace",...e)}let eK=new eq(1e4,e=>e.length);function eJ(...e){let t=e.join(" ");eK.has(t)||(eK.set(t,t),eX(...e))}function eY(e){return e.startsWith("/")?e:"/"+e}function eQ(e){return eY(e.split("/").reduce((e,t,r,n)=>!t||"("===t[0]&&t.endsWith(")")||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function eZ(e){return e.replace(/\.rsc($|\?)/,"$1")}let e0=["(..)(..)","(.)","(..)","(...)"];function e1(e){return void 0!==e.split("/").find(e=>e0.find(t=>e.startsWith(t)))}let e4=/[|\\{}()[\]^$+*?.-]/,e2=/[|\\{}()[\]^$+*?.-]/g;function e3(e){return e4.test(e)?e.replace(e2,"\\$&"):e}function e8(e){return e.replace(/\/$/,"")||"/"}let e5=/^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;function e9(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function e6(e,t){let{includeSuffix:r=!1,includePrefix:n=!1,excludeOptionalTrailingSlash:i=!1}=void 0===t?{}:t,{parameterizedRoute:a,groups:s}=function(e,t,r){let n={},i=1,a=[];for(let s of e8(e).slice(1).split("/")){let e=e0.find(e=>s.startsWith(e)),o=s.match(e5);if(e&&o&&o[2]){let{key:t,optional:r,repeat:s}=e9(o[2]);n[t]={pos:i++,repeat:s,optional:r},a.push("/"+e3(e)+"([^/]+?)")}else if(o&&o[2]){let{key:e,repeat:t,optional:s}=e9(o[2]);n[e]={pos:i++,repeat:t,optional:s},r&&o[1]&&a.push("/"+e3(o[1]));let l=t?s?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)";r&&o[1]&&(l=l.substring(1)),a.push(l)}else a.push("/"+e3(s));t&&o&&o[3]&&a.push(e3(o[3]))}return{parameterizedRoute:a.join(""),groups:n}}(e,r,n),o=a;return i||(o+="(?:/)?"),{re:RegExp("^"+o+"$"),groups:s}}function e7(e){let t,{interceptionMarker:r,getSafeRouteKey:n,segment:i,routeKeys:a,keyPrefix:s,backreferenceDuplicateKeys:o}=e,{key:l,optional:u,repeat:c}=e9(i),d=l.replace(/\W/g,"");s&&(d=""+s+d);let h=!1;(0===d.length||d.length>30)&&(h=!0),isNaN(parseInt(d.slice(0,1)))||(h=!0),h&&(d=n());let p=d in a;s?a[d]=""+s+l:a[d]=l;let f=r?e3(r):"";return t=p&&o?"\\k<"+d+">":c?"(?<"+d+">.+?)":"(?<"+d+">[^/]+?)",u?"(?:/"+f+t+")?":"/"+f+t}class te{constructor(){let e,t;this.promise=new Promise((r,n)=>{e=r,t=n}),this.resolve=e,this.reject=t}}class tt{constructor(e,t=e=>e()){this.cacheKeyFn=e,this.schedulerFn=t,this.pending=new Map}static create(e){return new tt(null==e?void 0:e.cacheKeyFn,null==e?void 0:e.schedulerFn)}async batch(e,t){let r=this.cacheKeyFn?await this.cacheKeyFn(e):e;if(null===r)return t(r,Promise.resolve);let n=this.pending.get(r);if(n)return n;let{promise:i,resolve:a,reject:s}=new te;return this.pending.set(r,i),this.schedulerFn(async()=>{try{let e=await t(r,a);a(e)}catch(e){s(e)}finally{this.pending.delete(r)}}),i}}let tr=e=>{Promise.resolve().then(()=>{process.nextTick(e)})};var tn=/*#__PURE__*/function(e){return e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.PAGES="PAGES",e.FETCH="FETCH",e.REDIRECT="REDIRECT",e.IMAGE="IMAGE",e}({}),ti=/*#__PURE__*/function(e){return e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.PAGES="PAGES",e.FETCH="FETCH",e.IMAGE="IMAGE",e}({}),ta=r("./lib/trace/tracer"),ts=r("./dist/esm/server/lib/trace/constants.js");function to(){}new Uint8Array([60,104,116,109,108]),new Uint8Array([60,98,111,100,121]),new Uint8Array([60,47,104,101,97,100,62]),new Uint8Array([60,47,98,111,100,121,62]),new Uint8Array([60,47,104,116,109,108,62]),new Uint8Array([60,47,98,111,100,121,62,60,47,104,116,109,108,62]);let tl=new TextEncoder;function tu(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function tc(e){let t=e.getReader(),r=[];for(;;){let{done:e,value:n}=await t.read();if(e)break;r.push(n)}return Buffer.concat(r)}async function td(e,t){let r=new TextDecoder("utf-8",{fatal:!0}),n="";for await(let i of e){if(null==t?void 0:t.aborted)return n;n+=r.decode(i,{stream:!0})}return n+r.decode()}function th(e){let t=new Headers;for(let[r,n]of Object.entries(e))for(let e of Array.isArray(n)?n:[n])void 0!==e&&("number"==typeof e&&(e=e.toString()),t.append(r,e));return t}function tp(e){var t,r,n,i,a,s=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,a=!1;l();)if(","===(r=e.charAt(o))){for(n=o,o+=1,l(),i=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(a=!0,o=i,s.push(e.substring(t,n)),t=o):o=n+1}else o+=1;(!a||o>=e.length)&&s.push(e.substring(t,e.length))}return s}function tf(e){let t={},r=[];if(e)for(let[n,i]of e.entries())"set-cookie"===n.toLowerCase()?(r.push(...tp(i)),t[n]=1===r.length?r[0]:r):t[n]=i;return t}function tm(e){try{return String(new URL(String(e)))}catch(t){throw Object.defineProperty(Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t}),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}function tg(e){for(let t of[ex.AA,ex.h])if(e!==t&&e.startsWith(t))return e.substring(t.length);return null}function tv(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r<t);return n||t>-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}function ty(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=tv(e);return""+t+r+n+i}function tb(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=tv(e);return""+r+t+n+i}function tE(e,t){if("string"!=typeof e)return!1;let{pathname:r}=tv(e);return r===t||r.startsWith(t+"/")}function t_(e,t){let r;if((null==t?void 0:t.host)&&!Array.isArray(t.host))r=t.host.toString().split(":",1)[0];else{if(!e.hostname)return;r=e.hostname}return r.toLowerCase()}let tR=new WeakMap;function tw(e,t){let r;if(!t)return{pathname:e};let n=tR.get(t);n||(n=t.map(e=>e.toLowerCase()),tR.set(t,n));let i=e.split("/",2);if(!i[1])return{pathname:e};let a=i[1].toLowerCase(),s=n.indexOf(a);return s<0?{pathname:e}:(r=t[s],{pathname:e=e.slice(r.length+1)||"/",detectedLocale:r})}function tx(e,t){if(!tE(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}function tC(e,t){var r,n;let{basePath:i,i18n:a,trailingSlash:s}=null!=(r=t.nextConfig)?r:{},o={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):s};i&&tE(o.pathname,i)&&(o.pathname=tx(o.pathname,i),o.basePath=i);let l=o.pathname;if(o.pathname.startsWith("/_next/data/")&&o.pathname.endsWith(".json")){let e=o.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];o.buildId=r,l="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(o.pathname=l)}if(a){let e=t.i18nProvider?t.i18nProvider.analyze(o.pathname):tw(o.pathname,a.locales);o.locale=e.detectedLocale,o.pathname=null!=(n=e.pathname)?n:o.pathname,!e.detectedLocale&&o.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(l):tw(l,a.locales)).detectedLocale&&(o.locale=e.detectedLocale)}return o}let tP=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function tO(e,t){return new URL(String(e).replace(tP,"localhost"),t&&String(t).replace(tP,"localhost"))}let tT=Symbol("NextURLInternal");class tS{constructor(e,t,r){let n,i;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,i=r||{}):i=r||t||{},this[tT]={url:tO(e,n??i.base),options:i,basePath:""},this.analyze()}analyze(){var e,t,r,n,i;let a=tC(this[tT].url.pathname,{nextConfig:this[tT].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[tT].options.i18nProvider}),s=t_(this[tT].url,this[tT].options.headers);this[tT].domainLocale=this[tT].options.i18nProvider?this[tT].options.i18nProvider.detectDomainLocale(s):function(e,t,r){if(e)for(let a of(r&&(r=r.toLowerCase()),e)){var n,i;if(t===(null==(n=a.domain)?void 0:n.split(":",1)[0].toLowerCase())||r===a.defaultLocale.toLowerCase()||(null==(i=a.locales)?void 0:i.some(e=>e.toLowerCase()===r)))return a}}(null==(t=this[tT].options.nextConfig)?void 0:null==(e=t.i18n)?void 0:e.domains,s);let o=(null==(r=this[tT].domainLocale)?void 0:r.defaultLocale)||(null==(i=this[tT].options.nextConfig)?void 0:null==(n=i.i18n)?void 0:n.defaultLocale);this[tT].url.pathname=a.pathname,this[tT].defaultLocale=o,this[tT].basePath=a.basePath??"",this[tT].buildId=a.buildId,this[tT].locale=a.locale??o,this[tT].trailingSlash=a.trailingSlash}formatPathname(){var e;let t;return t=function(e,t,r,n){if(!t||t===r)return e;let i=e.toLowerCase();return!n&&(tE(i,"/api")||tE(i,"/"+t.toLowerCase()))?e:ty(e,"/"+t)}((e={basePath:this[tT].basePath,buildId:this[tT].buildId,defaultLocale:this[tT].options.forceLocale?void 0:this[tT].defaultLocale,locale:this[tT].locale,pathname:this[tT].url.pathname,trailingSlash:this[tT].trailingSlash}).pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix),(e.buildId||!e.trailingSlash)&&(t=e8(t)),e.buildId&&(t=tb(ty(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=ty(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:tb(t,"/"):e8(t)}formatSearch(){return this[tT].url.search}get buildId(){return this[tT].buildId}set buildId(e){this[tT].buildId=e}get locale(){return this[tT].locale??""}set locale(e){var t,r;if(!this[tT].locale||!(null==(r=this[tT].options.nextConfig)?void 0:null==(t=r.i18n)?void 0:t.locales.includes(e)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${e}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[tT].locale=e}get defaultLocale(){return this[tT].defaultLocale}get domainLocale(){return this[tT].domainLocale}get searchParams(){return this[tT].url.searchParams}get host(){return this[tT].url.host}set host(e){this[tT].url.host=e}get hostname(){return this[tT].url.hostname}set hostname(e){this[tT].url.hostname=e}get port(){return this[tT].url.port}set port(e){this[tT].url.port=e}get protocol(){return this[tT].url.protocol}set protocol(e){this[tT].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[tT].url=tO(e),this.analyze()}get origin(){return this[tT].url.origin}get pathname(){return this[tT].url.pathname}set pathname(e){this[tT].url.pathname=e}get hash(){return this[tT].url.hash}set hash(e){this[tT].url.hash=e}get search(){return this[tT].url.search}set search(e){this[tT].url.search=e}get password(){return this[tT].url.password}set password(e){this[tT].url.password=e}get username(){return this[tT].url.username}set username(e){this[tT].url.username=e}get basePath(){return this[tT].basePath}set basePath(e){this[tT].basePath=e.startsWith("/")?e:`/${e}`}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 tS(String(this),this[tT].options)}}class tD extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
|
19
|
+
*/var t=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function r(e){var t=e&&Date.parse(e);return"number"==typeof t?t:NaN}e.exports=function(e,n){var i=e["if-modified-since"],s=e["if-none-match"];if(!i&&!s)return!1;var a=e["cache-control"];if(a&&t.test(a))return!1;if(s&&"*"!==s){var o=n.etag;if(!o)return!1;for(var l=!0,c=function(e){for(var t=0,r=[],n=0,i=0,s=e.length;i<s;i++)switch(e.charCodeAt(i)){case 32:n===t&&(n=t=i+1);break;case 44:r.push(e.substring(n,t)),n=t=i+1;break;default:t=i+1}return r.push(e.substring(n,t)),r}(s),u=0;u<c.length;u++){var h=c[u];if(h===o||h==="W/"+o||"W/"+h===o){l=!1;break}}if(l)return!1}if(i){var d=n["last-modified"];if(!d||!(r(d)<=r(i)))return!1}return!0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={exports:{}},a=!0;try{t[e](s,s.exports,n),a=!1}finally{a&&delete r[e]}return s.exports}n.ab=__dirname+"/";var i=n(695);e.exports=i})()},"./dist/compiled/glob/glob.js":(e,t,r)=>{(()=>{var t={218:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var s=n(e,t,i);return s&&{start:s[0],end:s[1],pre:i.slice(0,s[0]),body:i.slice(s[0]+e.length,s[1]),post:i.slice(s[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,s,a,o,l=r.indexOf(e),c=r.indexOf(t,l+1),u=l;if(l>=0&&c>0){if(e===t)return[l,c];for(n=[],s=r.length;u>=0&&!o;)u==l?(n.push(u),l=r.indexOf(e,u+1)):1==n.length?o=[n.pop(),c]:((i=n.pop())<s&&(s=i,a=c),c=r.indexOf(t,u+1)),u=l<c&&l>=0?l:c;n.length&&(o=[s,a])}return o}e.exports=t,t.range=n},800:(e,t,r)=>{var n=r(381),i=r(218);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),(function e(t,r){var s=[],a=i("{","}",t);if(!a||/\$$/.test(a.pre))return[t];var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),h=l||c,g=a.body.indexOf(",")>=0;if(!h&&!g)return a.post.match(/,.*\}/)?e(t=a.pre+"{"+a.body+o+a.post):[t];if(h)b=a.body.split(/\.\./);else if(1===(b=function e(t){if(!t)return[""];var r=[],n=i("{","}",t);if(!n)return t.split(",");var s=n.pre,a=n.body,o=n.post,l=s.split(",");l[l.length-1]+="{"+a+"}";var c=e(o);return o.length&&(l[l.length-1]+=c.shift(),l.push.apply(l,c)),r.push.apply(r,l),r}(a.body)).length&&1===(b=e(b[0],!1).map(d)).length){var v=a.post.length?e(a.post,!1):[""];return v.map(function(e){return a.pre+b[0]+e})}var y=a.pre,v=a.post.length?e(a.post,!1):[""];if(h){var b,E,_,w=u(b[0]),x=u(b[1]),R=Math.max(b[0].length,b[1].length),O=3==b.length?Math.abs(u(b[2])):1,C=f;x<w&&(O*=-1,C=m);var P=b.some(p);E=[];for(var S=w;C(S,x);S+=O){if(c)"\\"===(_=String.fromCharCode(S))&&(_="");else if(_=String(S),P){var T=R-_.length;if(T>0){var A=Array(T+1).join("0");_=S<0?"-"+A+_.slice(1):A+_}}E.push(_)}}else E=n(b,function(t){return e(t,!1)});for(var j=0;j<E.length;j++)for(var D=0;D<v.length;D++){var N=y+E[j]+v[D];(!r||h||N)&&s.push(N)}return s})(e.split("\\\\").join(s).split("\\{").join(a).split("\\}").join(o).split("\\,").join(l).split("\\.").join(c),!0).map(h)):[]};var s="\0SLASH"+Math.random()+"\0",a="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",l="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function h(e){return e.split(s).join("\\").split(a).join("{").split(o).join("}").split(l).join(",").split(c).join(".")}function d(e){return"{"+e+"}"}function p(e){return/^-?0\d/.test(e)}function f(e,t){return e<=t}function m(e,t){return e>=t}},381:e=>{e.exports=function(e,r){for(var n=[],i=0;i<e.length;i++){var s=r(e[i],i);t(s)?n.push.apply(n,s):n.push(s)}return n};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},981:(e,t,r)=>{e.exports=u,u.realpath=u,u.sync=h,u.realpathSync=h,u.monkeypatch=function(){n.realpath=u,n.realpathSync=h},u.unmonkeypatch=function(){n.realpath=i,n.realpathSync=s};var n=r(147),i=n.realpath,s=n.realpathSync,a=process.version,o=/^v[0-5]\./.test(a),l=r(623);function c(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function u(e,t,r){if(o)return i(e,t,r);"function"==typeof t&&(r=t,t=null),i(e,t,function(n,i){c(n)?l.realpath(e,t,r):r(n,i)})}function h(e,t){if(o)return s(e,t);try{return s(e,t)}catch(r){if(c(r))return l.realpathSync(e,t);throw r}}},623:(e,t,r)=>{var n=r(17),i="win32"===process.platform,s=r(147),a=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);if(n.normalize,i)var o=/(.*?)(?:[\/\\]+|$)/g;else var o=/(.*?)(?:[\/]+|$)/g;if(i)var l=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else var l=/^[\/]*/;t.realpathSync=function(e,t){if(e=n.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var r=e,a={},c={};function u(){var t=l.exec(e);h=t[0].length,d=t[0],p=t[0],f="",i&&!c[p]&&(s.lstatSync(p),c[p]=!0)}for(u();h<e.length;){o.lastIndex=h;var h,d,p,f,m,g=o.exec(e);if(f=d,d+=g[0],p=f+g[1],h=o.lastIndex,!c[p]&&(!t||t[p]!==p)){if(t&&Object.prototype.hasOwnProperty.call(t,p))m=t[p];else{var v=s.lstatSync(p);if(!v.isSymbolicLink()){c[p]=!0,t&&(t[p]=p);continue}var y=null;if(!i){var b=v.dev.toString(32)+":"+v.ino.toString(32);a.hasOwnProperty(b)&&(y=a[b])}null===y&&(s.statSync(p),y=s.readlinkSync(p)),m=n.resolve(f,y),t&&(t[p]=m),i||(a[b]=y)}e=n.resolve(m,e.slice(h)),u()}}return t&&(t[r]=e),e},t.realpath=function(e,t,r){if("function"!=typeof r){var c;r="function"==typeof(c=t)?c:function(){var e;if(a){var t=Error();e=function(e){e&&(t.message=e.message,r(e=t))}}else e=r;return e;function r(e){if(e){if(process.throwDeprecation)throw e;if(!process.noDeprecation){var t="fs: missing callback "+(e.stack||e.message);process.traceDeprecation?console.trace(t):console.error(t)}}}}(),t=null}if(e=n.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return process.nextTick(r.bind(null,null,t[e]));var u,h,d,p,f=e,m={},g={};function v(){var t=l.exec(e);u=t[0].length,h=t[0],d=t[0],p="",i&&!g[d]?s.lstat(d,function(e){if(e)return r(e);g[d]=!0,y()}):process.nextTick(y)}function y(){if(u>=e.length)return t&&(t[f]=e),r(null,e);o.lastIndex=u;var n=o.exec(e);return(p=h,h+=n[0],d=p+n[1],u=o.lastIndex,g[d]||t&&t[d]===d)?process.nextTick(y):t&&Object.prototype.hasOwnProperty.call(t,d)?_(t[d]):s.lstat(d,b)}function b(e,n){if(e)return r(e);if(!n.isSymbolicLink())return g[d]=!0,t&&(t[d]=d),process.nextTick(y);if(!i){var a=n.dev.toString(32)+":"+n.ino.toString(32);if(m.hasOwnProperty(a))return E(null,m[a],d)}s.stat(d,function(e){if(e)return r(e);s.readlink(d,function(e,t){i||(m[a]=t),E(e,t)})})}function E(e,i,s){if(e)return r(e);var a=n.resolve(p,i);t&&(t[s]=a),_(a)}function _(t){e=n.resolve(t,e.slice(u)),v()}v()}},129:(e,t,r)=>{function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.setopts=function(e,t,r){if(r||(r={}),r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar)throw Error("base matching requires globstar");t="**/"+t}e.silent=!!r.silent,e.pattern=t,e.strict=!1!==r.strict,e.realpath=!!r.realpath,e.realpathCache=r.realpathCache||Object.create(null),e.follow=!!r.follow,e.dot=!!r.dot,e.mark=!!r.mark,e.nodir=!!r.nodir,e.nodir&&(e.mark=!0),e.sync=!!r.sync,e.nounique=!!r.nounique,e.nonull=!!r.nonull,e.nosort=!!r.nosort,e.nocase=!!r.nocase,e.stat=!!r.stat,e.noprocess=!!r.noprocess,e.absolute=!!r.absolute,e.maxLength=r.maxLength||1/0,e.cache=r.cache||Object.create(null),e.statCache=r.statCache||Object.create(null),e.symlinks=r.symlinks||Object.create(null),s=r,e.ignore=s.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(c)),e.changedCwd=!1;var s,l=process.cwd();n(r,"cwd")?(e.cwd=i.resolve(r.cwd),e.changedCwd=e.cwd!==l):e.cwd=l,e.root=r.root||i.resolve(e.cwd,"/"),e.root=i.resolve(e.root),"win32"===process.platform&&(e.root=e.root.replace(/\\/g,"/")),e.cwdAbs=a(e.cwd)?e.cwd:u(e,e.cwd),"win32"===process.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),e.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,e.minimatch=new o(t,r),e.options=e.minimatch.options},t.ownProp=n,t.makeAbs=u,t.finish=function(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,i=e.matches.length;n<i;n++){var s=e.matches[n];if(s&&0!==Object.keys(s).length){var a=Object.keys(s);t?r.push.apply(r,a):a.forEach(function(e){r[e]=!0})}else if(e.nonull){var o=e.minimatch.globSet[n];t?r.push(o):r[o]=!0}}if(t||(r=Object.keys(r)),e.nosort||(r=r.sort(l)),e.mark){for(var n=0;n<r.length;n++)r[n]=e._mark(r[n]);e.nodir&&(r=r.filter(function(t){var r=!/\/$/.test(t),n=e.cache[t]||e.cache[u(e,t)];return r&&n&&(r="DIR"!==n&&!Array.isArray(n)),r}))}e.ignore.length&&(r=r.filter(function(t){return!h(e,t)})),e.found=r},t.mark=function(e,t){var r=u(e,t),n=e.cache[r],i=t;if(n){var s="DIR"===n||Array.isArray(n),a="/"===t.slice(-1);if(s&&!a?i+="/":!s&&a&&(i=i.slice(0,-1)),i!==t){var o=u(e,i);e.statCache[o]=e.statCache[r],e.cache[o]=e.cache[r]}}return i},t.isIgnored=h,t.childrenIgnored=function(e,t){return!!e.ignore.length&&e.ignore.some(function(e){return!!(e.gmatcher&&e.gmatcher.match(t))})};var i=r(17),s=r(923),a=r(230),o=s.Minimatch;function l(e,t){return e.localeCompare(t,"en")}function c(e){var t=null;return"/**"===e.slice(-3)&&(t=new o(e.replace(/(\/\*\*)+$/,""),{dot:!0})),{matcher:new o(e,{dot:!0}),gmatcher:t}}function u(e,t){var r=t;return r="/"===t.charAt(0)?i.join(e.root,t):a(t)||""===t?t:e.changedCwd?i.resolve(e.cwd,t):i.resolve(t),"win32"===process.platform&&(r=r.replace(/\\/g,"/")),r}function h(e,t){return!!e.ignore.length&&e.ignore.some(function(e){return e.matcher.match(t)||!!(e.gmatcher&&e.gmatcher.match(t))})}},346:(e,t,r)=>{e.exports=b;var n=r(147),i=r(981),s=r(923);s.Minimatch;var a=r(842),o=r(361).EventEmitter,l=r(17),c=r(491),u=r(230),h=r(447),d=r(129),p=d.setopts,f=d.ownProp,m=r(143);r(837);var g=d.childrenIgnored,v=d.isIgnored,y=r(852);function b(e,t,r){if("function"==typeof t&&(r=t,t={}),t||(t={}),t.sync){if(r)throw TypeError("callback provided to sync glob");return h(e,t)}return new _(e,t,r)}b.sync=h;var E=b.GlobSync=h.GlobSync;function _(e,t,r){if("function"==typeof t&&(r=t,t=null),t&&t.sync){if(r)throw TypeError("callback provided to sync glob");return new E(e,t)}if(!(this instanceof _))return new _(e,t,r);p(this,e,t),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=Array(n),"function"==typeof r&&(r=y(r),this.on("error",r),this.on("end",function(e){r(null,e)}));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return o();for(var s=!0,a=0;a<n;a++)this._process(this.minimatch.set[a],a,!1,o);function o(){--i._processing,i._processing<=0&&(s?process.nextTick(function(){i._finish()}):i._finish())}s=!1}b.glob=b,b.hasMagic=function(e,t){var r=function(e,t){if(null===t||"object"!=typeof t)return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}({},t);r.noprocess=!0;var n=new _(e,r).minimatch.set;if(!e)return!1;if(n.length>1)return!0;for(var i=0;i<n[0].length;i++)if("string"!=typeof n[0][i])return!0;return!1},b.Glob=_,a(_,o),_.prototype._finish=function(){if(c(this instanceof _),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();d.finish(this),this.emit("end",this.found)}},_.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var e=this.matches.length;if(0===e)return this._finish();for(var t=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n)}function n(){0==--e&&t._finish()}},_.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var n=Object.keys(r),s=this,a=n.length;if(0===a)return t();var o=this.matches[e]=Object.create(null);n.forEach(function(r,n){r=s._makeAbs(r),i.realpath(r,s.realpathCache,function(n,i){n?"stat"===n.syscall?o[r]=!0:s.emit("error",n):o[i]=!0,0==--a&&(s.matches[e]=o,t())})})},_.prototype._mark=function(e){return d.mark(this,e)},_.prototype._makeAbs=function(e){return d.makeAbs(this,e)},_.prototype.abort=function(){this.aborted=!0,this.emit("abort")},_.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},_.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<n.length;t++){var i=n[t];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},_.prototype._process=function(e,t,r,n){if(c(this instanceof _),c("function"==typeof n),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,t,r,n]);return}for(var i,a,o=0;"string"==typeof e[o];)o++;switch(o){case e.length:this._processSimple(e.join("/"),t,n);return;case 0:i=null;break;default:i=e.slice(0,o).join("/")}var l=e.slice(o);null===i?a=".":((u(i)||u(e.join("/")))&&(!i||!u(i))&&(i="/"+i),a=i);var h=this._makeAbs(a);if(g(this,a))return n();l[0]===s.GLOBSTAR?this._processGlobStar(i,a,h,l,t,r,n):this._processReaddir(i,a,h,l,t,r,n)}},_.prototype._processReaddir=function(e,t,r,n,i,s,a){var o=this;this._readdir(r,s,function(l,c){return o._processReaddir2(e,t,r,n,i,s,c,a)})},_.prototype._processReaddir2=function(e,t,r,n,i,s,a,o){if(!a)return o();for(var c=n[0],u=!!this.minimatch.negate,h=c._glob,d=this.dot||"."===h.charAt(0),p=[],f=0;f<a.length;f++){var m=a[f];("."!==m.charAt(0)||d)&&(u&&!e?!m.match(c):m.match(c))&&p.push(m)}var g=p.length;if(0===g)return o();if(1===n.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var f=0;f<g;f++){var m=p[f];e&&(m="/"!==e?e+"/"+m:e+m),"/"!==m.charAt(0)||this.nomount||(m=l.join(this.root,m)),this._emitMatch(i,m)}return o()}n.shift();for(var f=0;f<g;f++){var m=p[f];e&&(m="/"!==e?e+"/"+m:e+m),this._process([m].concat(n),i,s,o)}o()},_.prototype._emitMatch=function(e,t){if(!(this.aborted||v(this,t))){if(this.paused){this._emitQueue.push([e,t]);return}var r=u(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[e][t]=!0;var i=this.statCache[r];i&&this.emit("stat",t,i),this.emit("match",t)}}},_.prototype._readdirInGlobStar=function(e,t){if(!this.aborted){if(this.follow)return this._readdir(e,!1,t);var r=this,i=m("lstat\0"+e,function(n,i){if(n&&"ENOENT"===n.code)return t();var s=i&&i.isSymbolicLink();r.symlinks[e]=s,s||!i||i.isDirectory()?r._readdir(e,!1,t):(r.cache[e]="FILE",t())});i&&n.lstat(e,i)}},_.prototype._readdir=function(e,t,r){if(!this.aborted&&(r=m("readdir\0"+e+"\0"+t,r))){if(t&&!f(this.symlinks,e))return this._readdirInGlobStar(e,r);if(f(this.cache,e)){var i,s,a=this.cache[e];if(!a||"FILE"===a)return r();if(Array.isArray(a))return r(null,a)}n.readdir(e,(i=this,s=r,function(t,r){t?i._readdirError(e,t,s):i._readdirEntries(e,r,s)}))}},_.prototype._readdirEntries=function(e,t,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<t.length;n++){var i=t[n];i="/"===e?e+i:e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,r(null,t)}},_.prototype._readdirError=function(e,t,r){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var i=Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=t.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t)}return r()}},_.prototype._processGlobStar=function(e,t,r,n,i,s,a){var o=this;this._readdir(r,s,function(l,c){o._processGlobStar2(e,t,r,n,i,s,c,a)})},_.prototype._processGlobStar2=function(e,t,r,n,i,s,a,o){if(!a)return o();var l=n.slice(1),c=e?[e]:[],u=c.concat(l);this._process(u,i,!1,o);var h=this.symlinks[r],d=a.length;if(h&&s)return o();for(var p=0;p<d;p++)if("."!==a[p].charAt(0)||this.dot){var f=c.concat(a[p],l);this._process(f,i,!0,o);var m=c.concat(a[p],n);this._process(m,i,!0,o)}o()},_.prototype._processSimple=function(e,t,r){var n=this;this._stat(e,function(i,s){n._processSimple2(e,t,i,s,r)})},_.prototype._processSimple2=function(e,t,r,n,i){if(this.matches[t]||(this.matches[t]=Object.create(null)),!n)return i();if(e&&u(e)&&!this.nomount){var s=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=l.join(this.root,e):(e=l.resolve(this.root,e),s&&(e+="/"))}"win32"===process.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),i()},_.prototype._stat=function(e,t){var r=this._makeAbs(e),i="/"===e.slice(-1);if(e.length>this.maxLength)return t();if(!this.stat&&f(this.cache,r)){var s=this.cache[r];if(Array.isArray(s)&&(s="DIR"),!i||"DIR"===s)return t(null,s);if(i&&"FILE"===s)return t()}var a=this.statCache[r];if(void 0!==a){if(!1===a)return t(null,a);var o=a.isDirectory()?"DIR":"FILE";return i&&"FILE"===o?t():t(null,o,a)}var l=this,c=m("stat\0"+r,function(i,s){if(s&&s.isSymbolicLink())return n.stat(r,function(n,i){n?l._stat2(e,r,null,s,t):l._stat2(e,r,n,i,t)});l._stat2(e,r,i,s,t)});c&&n.lstat(r,c)},_.prototype._stat2=function(e,t,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[t]=!1,i();var s="/"===e.slice(-1);if(this.statCache[t]=n,"/"===t.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var a=!0;return(n&&(a=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||a,s&&"FILE"===a)?i():i(null,a,n)}},447:(e,t,r)=>{e.exports=f,f.GlobSync=m;var n=r(147),i=r(981),s=r(923);s.Minimatch,r(346).Glob,r(837);var a=r(17),o=r(491),l=r(230),c=r(129),u=c.setopts,h=c.ownProp,d=c.childrenIgnored,p=c.isIgnored;function f(e,t){if("function"==typeof t||3==arguments.length)throw TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new m(e,t).found}function m(e,t){if(!e)throw Error("must provide pattern");if("function"==typeof t||3==arguments.length)throw TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof m))return new m(e,t);if(u(this,e,t),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}m.prototype._finish=function(){if(o(this instanceof m),this.realpath){var e=this;this.matches.forEach(function(t,r){var n=e.matches[r]=Object.create(null);for(var s in t)try{s=e._makeAbs(s),n[i.realpathSync(s,e.realpathCache)]=!0}catch(t){if("stat"===t.syscall)n[e._makeAbs(s)]=!0;else throw t}})}c.finish(this)},m.prototype._process=function(e,t,r){o(this instanceof m);for(var n,i,a=0;"string"==typeof e[a];)a++;switch(a){case e.length:this._processSimple(e.join("/"),t);return;case 0:n=null;break;default:n=e.slice(0,a).join("/")}var c=e.slice(a);null===n?i=".":((l(n)||l(e.join("/")))&&(!n||!l(n))&&(n="/"+n),i=n);var u=this._makeAbs(i);d(this,i)||(c[0]===s.GLOBSTAR?this._processGlobStar(n,i,u,c,t,r):this._processReaddir(n,i,u,c,t,r))},m.prototype._processReaddir=function(e,t,r,n,i,s){var o=this._readdir(r,s);if(o){for(var l=n[0],c=!!this.minimatch.negate,u=l._glob,h=this.dot||"."===u.charAt(0),d=[],p=0;p<o.length;p++){var f=o[p];("."!==f.charAt(0)||h)&&(c&&!e?!f.match(l):f.match(l))&&d.push(f)}var m=d.length;if(0!==m){if(1===n.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var p=0;p<m;p++){var f=d[p];e&&(f="/"!==e.slice(-1)?e+"/"+f:e+f),"/"!==f.charAt(0)||this.nomount||(f=a.join(this.root,f)),this._emitMatch(i,f)}return}n.shift();for(var p=0;p<m;p++){var g,f=d[p];g=e?[e,f]:[f],this._process(g.concat(n),i,s)}}}},m.prototype._emitMatch=function(e,t){if(!p(this,t)){var r=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}},m.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);try{r=n.lstatSync(e)}catch(e){if("ENOENT"===e.code)return null}var t,r,i=r&&r.isSymbolicLink();return this.symlinks[e]=i,i||!r||r.isDirectory()?t=this._readdir(e,!1):this.cache[e]="FILE",t},m.prototype._readdir=function(e,t){if(t&&!h(this.symlinks,e))return this._readdirInGlobStar(e);if(h(this.cache,e)){var r=this.cache[e];if(!r||"FILE"===r)return null;if(Array.isArray(r))return r}try{return this._readdirEntries(e,n.readdirSync(e))}catch(t){return this._readdirError(e,t),null}},m.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var n=t[r];n="/"===e?e+n:e+"/"+n,this.cache[n]=!0}return this.cache[e]=t,t},m.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var n=Error(t.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=t.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t)}},m.prototype._processGlobStar=function(e,t,r,n,i,s){var a=this._readdir(r,s);if(a){var o=n.slice(1),l=e?[e]:[],c=l.concat(o);this._process(c,i,!1);var u=a.length;if(!this.symlinks[r]||!s){for(var h=0;h<u;h++)if("."!==a[h].charAt(0)||this.dot){var d=l.concat(a[h],o);this._process(d,i,!0);var p=l.concat(a[h],n);this._process(p,i,!0)}}}},m.prototype._processSimple=function(e,t){var r=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),r){if(e&&l(e)&&!this.nomount){var n=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=a.join(this.root,e):(e=a.resolve(this.root,e),n&&(e+="/"))}"win32"===process.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}},m.prototype._stat=function(e){var t,r=this._makeAbs(e),i="/"===e.slice(-1);if(e.length>this.maxLength)return!1;if(!this.stat&&h(this.cache,r)){var s=this.cache[r];if(Array.isArray(s)&&(s="DIR"),!i||"DIR"===s)return s;if(i&&"FILE"===s)return!1}var a=this.statCache[r];if(!a){try{t=n.lstatSync(r)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[r]=!1,!1}if(t&&t.isSymbolicLink())try{a=n.statSync(r)}catch(e){a=t}else a=t}this.statCache[r]=a;var s=!0;return a&&(s=a.isDirectory()?"DIR":"FILE"),this.cache[r]=this.cache[r]||s,(!i||"FILE"!==s)&&s},m.prototype._mark=function(e){return c.mark(this,e)},m.prototype._makeAbs=function(e){return c.makeAbs(this,e)}},143:(e,t,r)=>{var n=r(270),i=Object.create(null),s=r(852);e.exports=n(function(e,t){return i[e]?(i[e].push(t),null):(i[e]=[t],s(function t(){var r=i[e],n=r.length,s=function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n]=e[n];return r}(arguments);try{for(var a=0;a<n;a++)r[a].apply(null,s)}finally{r.length>n?(r.splice(0,n),process.nextTick(function(){t.apply(null,s)})):delete i[e]}}))})},842:(e,t,r)=>{try{var n=r(837);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(782)}},782:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},923:(e,t,r)=>{e.exports=d,d.Minimatch=p;var n=function(){try{return r(17)}catch(e){}}()||{sep:"/"};d.sep=n.sep;var i=d.GLOBSTAR=p.GLOBSTAR={},s=r(800),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},o="[^/]",l=o+"*?",c="().*{}+?[]^$\\!".split("").reduce(function(e,t){return e[t]=!0,e},{}),u=/\/+/;function h(e,t){t=t||{};var r={};return Object.keys(e).forEach(function(t){r[t]=e[t]}),Object.keys(t).forEach(function(e){r[e]=t[e]}),r}function d(e,t,r){return m(t),r||(r={}),(!!r.nocomment||"#"!==t.charAt(0))&&new p(t,r).match(e)}function p(e,t){if(!(this instanceof p))return new p(e,t);m(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===n.sep||(e=e.split(n.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function f(e,t){return(t||(t=this instanceof p?this.options:{}),m(e=void 0===e?this.pattern:e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e))?[e]:s(e)}d.filter=function(e,t){return t=t||{},function(r,n,i){return d(r,e,t)}},d.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return d;var t=d,r=function(r,n,i){return t(r,n,h(e,i))};return r.Minimatch=function(r,n){return new t.Minimatch(r,h(e,n))},r.Minimatch.defaults=function(r){return t.defaults(h(e,r)).Minimatch},r.filter=function(r,n){return t.filter(r,h(e,n))},r.defaults=function(r){return t.defaults(h(e,r))},r.makeRe=function(r,n){return t.makeRe(r,h(e,n))},r.braceExpand=function(r,n){return t.braceExpand(r,h(e,n))},r.match=function(r,n,i){return t.match(r,n,h(e,i))},r},p.defaults=function(e){return d.defaults(e).Minimatch},p.prototype.debug=function(){},p.prototype.make=function(){var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0)){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(u)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return -1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r},p.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,s=e.length;i<s&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}},d.braceExpand=function(e,t){return f(e,t)},p.prototype.braceExpand=f;var m=function(e){if("string"!=typeof e)throw TypeError("invalid pattern");if(e.length>65536)throw TypeError("pattern is too long")};p.prototype.parse=function(e,t){m(e);var r=this.options;if("**"===e){if(!r.noglobstar)return i;e="*"}if(""===e)return"";var n="",s=!!r.nocase,u=!1,h=[],d=[],p=!1,f=-1,v=-1,y="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",b=this;function E(){if(_){switch(_){case"*":n+=l,s=!0;break;case"?":n+=o,s=!0;break;default:n+="\\"+_}b.debug("clearStateChar %j %j",_,n),_=!1}}for(var _,w,x=0,R=e.length;x<R&&(w=e.charAt(x));x++){if(this.debug("%s %s %s %j",e,x,n,w),u&&c[w]){n+="\\"+w,u=!1;continue}switch(w){case"/":return!1;case"\\":E(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,x,n,w),p){this.debug(" in class"),"!"===w&&x===v+1&&(w="^"),n+=w;continue}b.debug("call clearStateChar %j",_),E(),_=w,r.noext&&E();continue;case"(":if(p){n+="(";continue}if(!_){n+="\\(";continue}h.push({type:_,start:x-1,reStart:n.length,open:a[_].open,close:a[_].close}),n+="!"===_?"(?:(?!(?:":"(?:",this.debug("plType %j %j",_,n),_=!1;continue;case")":if(p||!h.length){n+="\\)";continue}E(),s=!0;var O=h.pop();n+=O.close,"!"===O.type&&d.push(O),O.reEnd=n.length;continue;case"|":if(p||!h.length||u){n+="\\|",u=!1;continue}E(),n+="|";continue;case"[":if(E(),p){n+="\\"+w;continue}p=!0,v=x,f=n.length,n+=w;continue;case"]":if(x===v+1||!p){n+="\\"+w,u=!1;continue}var C=e.substring(v+1,x);try{RegExp("["+C+"]")}catch(e){var P=this.parse(C,g);n=n.substr(0,f)+"\\["+P[0]+"\\]",s=s||P[1],p=!1;continue}s=!0,p=!1,n+=w;continue;default:E(),u?u=!1:c[w]&&!("^"===w&&p)&&(n+="\\"),n+=w}}for(p&&(C=e.substr(v+1),P=this.parse(C,g),n=n.substr(0,f)+"\\["+P[0],s=s||P[1]),O=h.pop();O;O=h.pop()){var S=n.slice(O.reStart+O.open.length);this.debug("setting tail",n,O),S=S.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",S,S,O,n);var T="*"===O.type?l:"?"===O.type?o:"\\"+O.type;s=!0,n=n.slice(0,O.reStart)+T+"\\("+S}E(),u&&(n+="\\\\");var A=!1;switch(n.charAt(0)){case"[":case".":case"(":A=!0}for(var j=d.length-1;j>-1;j--){var D=d[j],N=n.slice(0,D.reStart),k=n.slice(D.reStart,D.reEnd-8),I=n.slice(D.reEnd-8,D.reEnd),M=n.slice(D.reEnd);I+=M;var L=N.split("(").length-1,q=M;for(x=0;x<L;x++)q=q.replace(/\)[+*?]?/,"");var $="";""===(M=q)&&t!==g&&($="$"),n=N+k+M+$+I}if(""!==n&&s&&(n="(?=.)"+n),A&&(n=y+n),t===g)return[n,s];if(!s)return e.replace(/\\(.)/g,"$1");var F=r.nocase?"i":"";try{var H=RegExp("^"+n+"$",F)}catch(e){return RegExp("$.")}return H._glob=e,H._src=n,H};var g={};d.makeRe=function(e,t){return new p(e,t||{}).makeRe()},p.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?l:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=t.nocase?"i":"",s=e.map(function(e){return e.map(function(e){return e===i?r:"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch(e){this.regexp=!1}return this.regexp},d.match=function(e,t,r){var n=new p(t,r=r||{});return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},p.prototype.match=function(e,t){if(void 0===t&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r,i,s=this.options;"/"!==n.sep&&(e=e.split(n.sep).join("/")),e=e.split(u),this.debug(this.pattern,"split",e);var a=this.set;for(this.debug(this.pattern,"set",a),i=e.length-1;i>=0&&!(r=e[i]);i--);for(i=0;i<a.length;i++){var o=a[i],l=e;if(s.matchBase&&1===o.length&&(l=[r]),this.matchOne(l,o,t)){if(s.flipNegate)return!0;return!this.negate}}return!s.flipNegate&&this.negate},p.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var s=0,a=0,o=e.length,l=t.length;s<o&&a<l;s++,a++){this.debug("matchOne loop");var c,u=t[a],h=e[s];if(this.debug(t,u,h),!1===u)return!1;if(u===i){this.debug("GLOBSTAR",[t,u,h]);var d=s,p=a+1;if(p===l){for(this.debug("** at the end");s<o;s++)if("."===e[s]||".."===e[s]||!n.dot&&"."===e[s].charAt(0))return!1;return!0}for(;d<o;){var f=e[d];if(this.debug("\nglobstar while",e,d,t,p,f),this.matchOne(e.slice(d),t.slice(p),r))return this.debug("globstar found match!",d,o,f),!0;if("."===f||".."===f||!n.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue"),d++}if(r&&(this.debug("\n>>> no match, partial?",e,d,t,p),d===o))return!0;return!1}if("string"==typeof u?(c=h===u,this.debug("string match",u,h,c)):(c=h.match(u),this.debug("pattern match",u,h,c)),!c)return!1}if(s===o&&a===l)return!0;if(s===o)return r;if(a===l)return s===o-1&&""===e[s];throw Error("wtf?")}},852:(e,t,r)=>{var n=r(270);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function s(e){var t=function(){if(t.called)throw Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(s),i.proto=i(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})})},230:e=>{"use strict";function t(e){return"/"===e.charAt(0)}function r(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),r=t[1]||"",n=!!(r&&":"!==r.charAt(1));return!!(t[2]||n)}e.exports="win32"===process.platform?r:t,e.exports.posix=t,e.exports.win32=r},270:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw TypeError("need wrapper function");return Object.keys(t).forEach(function(e){n[e]=t[e]}),n;function n(){for(var e=Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach(function(e){n[e]=i[e]}),n}}},491:e=>{"use strict";e.exports=r("assert")},361:e=>{"use strict";e.exports=r("events")},147:e=>{"use strict";e.exports=r("fs")},17:e=>{"use strict";e.exports=r("path")},837:e=>{"use strict";e.exports=r("util")}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var s=n[e]={exports:{}},a=!0;try{t[e](s,s.exports,i),a=!1}finally{a&&delete n[e]}return s.exports}i.ab=__dirname+"/";var s=i(346);e.exports=s})()},"./dist/compiled/p-queue/index.js":e=>{(()=>{"use strict";var t={993:e=>{var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,n,s,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var o=new i(n,s||e,a),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),o.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,a=Array(s);i<s;i++)a[i]=n[i].fn;return a},o.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},o.prototype.emit=function(e,t,n,i,s,a){var o=r?r+e:e;if(!this._events[o])return!1;var l,c,u=this._events[o],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,i),!0;case 5:return u.fn.call(u.context,t,n,i,s),!0;case 6:return u.fn.call(u.context,t,n,i,s,a),!0}for(c=1,l=Array(h-1);c<h;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var d,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,i);break;default:if(!l)for(d=1,l=Array(h-1);d<h;d++)l[d-1]=arguments[d];u[c].fn.apply(u[c].context,l)}}return!0},o.prototype.on=function(e,t,r){return s(this,e,t,r,!1)},o.prototype.once=function(e,t,r){return s(this,e,t,r,!0)},o.prototype.removeListener=function(e,t,n,i){var s=r?r+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||a(this,s);else{for(var l=0,c=[],u=o.length;l<u;l++)(o[l].fn!==t||i&&!o[l].once||n&&o[l].context!==n)&&c.push(o[l]);c.length?this._events[s]=1===c.length?c[0]:c:a(this,s)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o},213:e=>{e.exports=(e,t)=>(t=t||(()=>{}),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:!0}),t.default=function(e,t,r){let n=0,i=e.length;for(;i>0;){let s=i/2|0,a=n+s;0>=r(e[a],t)?(n=++a,i-=s+1):i=s}return n}},821:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});let n=r(574);t.default=class{constructor(){this._queue=[]}enqueue(e,t){let r={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(r);return}let i=n.default(this._queue,r,(e,t)=>t.priority-e.priority);this._queue.splice(i,0,r)}dequeue(){let e=this._queue.shift();return null==e?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}}},816:(e,t,r)=>{let n=r(213);class i extends Error{constructor(e){super(e),this.name="TimeoutError"}}let s=(e,t,r)=>new Promise((s,a)=>{if("number"!=typeof t||t<0)throw TypeError("Expected `milliseconds` to be a positive number");if(t===1/0){s(e);return}let o=setTimeout(()=>{if("function"==typeof r){try{s(r())}catch(e){a(e)}return}let n="string"==typeof r?r:`Promise timed out after ${t} milliseconds`,o=r instanceof Error?r:new i(n);"function"==typeof e.cancel&&e.cancel(),a(o)},t);n(e.then(s,a),()=>{clearTimeout(o)})});e.exports=s,e.exports.default=s,e.exports.TimeoutError=i}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={exports:{}},a=!0;try{t[e](s,s.exports,n),a=!1}finally{a&&delete r[e]}return s.exports}n.ab=__dirname+"/";var i={};(()=>{Object.defineProperty(i,"__esModule",{value:!0});let e=n(993),t=n(816),r=n(821),s=()=>{},a=new t.TimeoutError;i.default=class extends e{constructor(e){var t,n,i,a;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=s,this._resolveIdle=s,!("number"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:r.default},e)).intervalCap&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(a=null===(i=e.interval)||void 0===i?void 0:i.toString())&&void 0!==a?a:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,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=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=s,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=s,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){let e=Date.now();if(void 0===this._intervalId){let t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},t)),!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 e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&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(e){if(!("number"==typeof e&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,r={}){return new Promise((n,i)=>{let s=async()=>{this._pendingCount++,this._intervalCount++;try{let s=void 0===this._timeout&&void 0===r.timeout?e():t.default(Promise.resolve(e()),void 0===r.timeout?this._timeout:r.timeout,()=>{(void 0===r.throwOnTimeout?this._throwOnTimeout:r.throwOnTimeout)&&i(a)});n(await s)}catch(e){i(e)}this._next()};this._queue.enqueue(s,r),this._tryToStartAnother(),this.emit("add")})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}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(e=>{let t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}})}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise(e=>{let 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.exports=i})()},"./dist/compiled/path-to-regexp/index.js":e=>{(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{function e(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"===n||"+"===n||"?"===n){t.push({type:"MODIFIER",index:r,value:e[r++]});continue}if("\\"===n){t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});continue}if("{"===n){t.push({type:"OPEN",index:r,value:e[r++]});continue}if("}"===n){t.push({type:"CLOSE",index:r,value:e[r++]});continue}if(":"===n){for(var i="",s=r+1;s<e.length;){var a=e.charCodeAt(s);if(a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||95===a){i+=e[s++];continue}break}if(!i)throw TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:i}),r=s;continue}if("("===n){var o=1,l="",s=r+1;if("?"===e[s])throw TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;){if("\\"===e[s]){l+=e[s++]+e[s++];continue}if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw TypeError("Capturing groups are not allowed at "+s);l+=e[s++]}if(o)throw TypeError("Unbalanced pattern at "+r);if(!l)throw TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:l}),r=s;continue}t.push({type:"CHAR",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,s=void 0===n?"./":n,a="[^"+i(t.delimiter||"/#?")+"]+?",o=[],l=0,c=0,u="",h=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=h(e);if(void 0!==t)return t;var n=r[c];throw TypeError("Unexpected "+n.type+" at "+n.index+", expected "+e)},p=function(){for(var e,t="";e=h("CHAR")||h("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=h("CHAR"),m=h("NAME"),g=h("PATTERN");if(m||g){var v=f||"";-1===s.indexOf(v)&&(u+=v,v=""),u&&(o.push(u),u=""),o.push({name:m||l++,prefix:v,suffix:"",pattern:g||a,modifier:h("MODIFIER")||""});continue}var y=f||h("ESCAPED_CHAR");if(y){u+=y;continue}if(u&&(o.push(u),u=""),h("OPEN")){var v=p(),b=h("NAME")||"",E=h("PATTERN")||"",_=p();d("CLOSE"),o.push({name:b||(E?l++:""),pattern:b&&!E?a:E,prefix:v,suffix:_,modifier:h("MODIFIER")||""});continue}d("END")}return o}function r(e,t){void 0===t&&(t={});var r=s(t),n=t.encode,i=void 0===n?function(e){return e}:n,a=t.validate,o=void 0===a||a,l=e.map(function(e){if("object"==typeof e)return RegExp("^(?:"+e.pattern+")$",r)});return function(t){for(var r="",n=0;n<e.length;n++){var s=e[n];if("string"==typeof s){r+=s;continue}var a=t?t[s.name]:void 0,c="?"===s.modifier||"*"===s.modifier,u="*"===s.modifier||"+"===s.modifier;if(Array.isArray(a)){if(!u)throw TypeError('Expected "'+s.name+'" to not repeat, but got an array');if(0===a.length){if(c)continue;throw TypeError('Expected "'+s.name+'" to not be empty')}for(var h=0;h<a.length;h++){var d=i(a[h],s);if(o&&!l[n].test(d))throw TypeError('Expected all "'+s.name+'" to match "'+s.pattern+'", but got "'+d+'"');r+=s.prefix+d+s.suffix}continue}if("string"==typeof a||"number"==typeof a){var d=i(String(a),s);if(o&&!l[n].test(d))throw TypeError('Expected "'+s.name+'" to match "'+s.pattern+'", but got "'+d+'"');r+=s.prefix+d+s.suffix;continue}if(!c){var p=u?"an array":"a string";throw TypeError('Expected "'+s.name+'" to be '+p)}}return r}}function n(e,t,r){void 0===r&&(r={});var n=r.decode,i=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var s=n[0],a=n.index,o=Object.create(null),l=1;l<n.length;l++)!function(e){if(void 0!==n[e]){var r=t[e-1];"*"===r.modifier||"+"===r.modifier?o[r.name]=n[e].split(r.prefix+r.suffix).map(function(e){return i(e,r)}):o[r.name]=i(n[e],r)}}(l);return{path:s,index:a,params:o}}}function i(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function s(e){return e&&e.sensitive?"":"i"}function a(e,t,r){void 0===r&&(r={});for(var n=r.strict,a=void 0!==n&&n,o=r.start,l=r.end,c=r.encode,u=void 0===c?function(e){return e}:c,h="["+i(r.endsWith||"")+"]|$",d="["+i(r.delimiter||"/#?")+"]",p=void 0===o||o?"^":"",f=0;f<e.length;f++){var m=e[f];if("string"==typeof m)p+=i(u(m));else{var g=i(u(m.prefix)),v=i(u(m.suffix));if(m.pattern){if(t&&t.push(m),g||v){if("+"===m.modifier||"*"===m.modifier){var y="*"===m.modifier?"?":"";p+="(?:"+g+"((?:"+m.pattern+")(?:"+v+g+"(?:"+m.pattern+"))*)"+v+")"+y}else p+="(?:"+g+"("+m.pattern+")"+v+")"+m.modifier}else p+="("+m.pattern+")"+m.modifier}else p+="(?:"+g+v+")"+m.modifier}}if(void 0===l||l)a||(p+=d+"?"),p+=r.endsWith?"(?="+h+")":"$";else{var b=e[e.length-1],E="string"==typeof b?d.indexOf(b[b.length-1])>-1:void 0===b;a||(p+="(?:"+d+"(?="+h+"))?"),E||(p+="(?="+d+"|"+h+")")}return new RegExp(p,s(r))}function o(t,r,n){return t instanceof RegExp?function(e,t){if(!t)return e;var r=e.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)t.push({name:n,prefix:"",suffix:"",modifier:"",pattern:""});return e}(t,r):Array.isArray(t)?RegExp("(?:"+t.map(function(e){return o(e,r,n).source}).join("|")+")",s(n)):a(e(t,n),r,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=e,t.compile=function(t,n){return r(e(t,n),n)},t.tokensToFunction=r,t.match=function(e,t){var r=[];return n(o(e,r,t),r,t)},t.regexpToFunction=n,t.tokensToRegexp=a,t.pathToRegexp=o})(),e.exports=t})()},"./dist/compiled/shell-quote/index.js":e=>{(()=>{"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{t.quote=function(e){return e.map(function(e){return e&&"object"==typeof e?e.op.replace(/(.)/g,"\\$1"):/["\s]/.test(e)&&!/'/.test(e)?"'"+e.replace(/(['\\])/g,"\\$1")+"'":/["'\s]/.test(e)?'"'+e.replace(/(["\\$`!])/g,"\\$1")+'"':String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g,"$1\\$2")}).join(" ")};for(var e="(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|>>|>\\&|[&;()|<>])",r="|&;()<> \\t",n="(\\\\['\""+r+"]|[^\\s'\""+r+"])+",i="",s=0;s<4;s++)i+=(0x100000000*Math.random()).toString(16);t.parse=function(t,r,s){var a,o,l,c,u,h=(a=r,o=s,l=RegExp(["("+e+")","("+n+"|\"((\\\\\"|[^\"])*?)\"|'((\\\\'|[^'])*?)')*"].join("|"),"g"),c=t.match(l).filter(Boolean),u=!1,c?(a||(a={}),o||(o={}),c.map(function(t,r){if(!u){if(RegExp("^"+e+"$").test(t))return{op:t};for(var n=o.escape||"\\",s=!1,l=!1,h="",d=!1,p=0,f=t.length;p<f;p++){var m=t.charAt(p);if(d=d||!s&&("*"===m||"?"===m),l)h+=m,l=!1;else if(s)m===s?s=!1:"'"==s?h+=m:m===n?(p+=1,'"'===(m=t.charAt(p))||m===n||"$"===m?h+=m:h+=n+m):"$"===m?h+=g():h+=m;else if('"'===m||"'"===m)s=m;else if(RegExp("^"+e+"$").test(m))return{op:t};else if(RegExp("^#$").test(m)){if(u=!0,h.length)return[h,{comment:t.slice(p+1)+c.slice(r+1).join(" ")}];return[{comment:t.slice(p+1)+c.slice(r+1).join(" ")}]}else m===n?l=!0:"$"===m?h+=g():h+=m}return d?{op:"glob",pattern:h}:h}function g(){var e,r,n,s;if(p+=1,"{"===t.charAt(p)){if(p+=1,"}"===t.charAt(p))throw Error("Bad substitution: "+t.substr(p-2,3));if((e=t.indexOf("}",p))<0)throw Error("Bad substitution: "+t.substr(p));r=t.substr(p,e-p),p=e}else/[*@#?$!_\-]/.test(t.charAt(p))?(r=t.charAt(p),p+=1):(e=t.substr(p).match(/[^\w\d_]/))?(r=t.substr(p,e.index),p+=e.index-1):(r=t.substr(p),p=t.length);return n=r,(void 0===(s="function"==typeof a?a(n):a[n])&&""!=n?s="":void 0===s&&(s="$"),"object"==typeof s)?""+i+JSON.stringify(s)+i:""+s}}).reduce(function(e,t){return void 0===t?e:e.concat(t)},[])):[]);return"function"!=typeof r?h:h.reduce(function(e,t){if("object"==typeof t)return e.concat(t);var r=t.split(RegExp("("+i+".*?"+i+")","g"));return 1===r.length?e.concat(r[0]):e.concat(r.filter(Boolean).map(function(e){return RegExp("^"+i).test(e)?JSON.parse(e.split(i)[1]):e}))},[])}})(),e.exports=t})()},"./dist/esm/lib/constants.js":(e,t,r)=>{"use strict";r.d(t,{AA:()=>n,AR:()=>b,EP:()=>p,Hw:()=>E,RM:()=>h,VC:()=>f,c1:()=>g,gs:()=>v,h:()=>i,kz:()=>a,li:()=>_,mH:()=>c,pu:()=>l,qF:()=>y,r4:()=>o,tz:()=>u,vS:()=>m,vx:()=>s,x3:()=>d});let n="nxtP",i="nxtI",s="x-matched-path",a="x-prerender-revalidate",o="x-prerender-revalidate-if-generated",l=".prefetch.rsc",c=".segments",u=".segment.rsc",h=".rsc",d=".json",p=".meta",f="x-next-cache-tags",m="x-next-revalidated-tags",g="x-next-revalidate-tag-token",v="next-resume",y=31536e3,b=0xfffffffe,E="instrumentation",_={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},w={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"};({...w,GROUP:{builtinReact:[w.reactServerComponents,w.actionBrowser],serverOnly:[w.reactServerComponents,w.actionBrowser,w.instrument,w.middleware],neutralTarget:[w.apiNode,w.apiEdge],clientOnly:[w.serverSideRendering,w.appPagesBrowser],bundled:[w.reactServerComponents,w.actionBrowser,w.serverSideRendering,w.appPagesBrowser,w.shared,w.instrument,w.middleware],appPages:[w.reactServerComponents,w.serverSideRendering,w.appPagesBrowser,w.actionBrowser]}})},"./dist/esm/lib/inline-static-env.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{inlineStaticEnv:()=>y,populateStaticEnv:()=>v});var n=r("fs"),i=/*#__PURE__*/r.n(n),s=r("path"),a=/*#__PURE__*/r.n(s),o=r("crypto"),l=/*#__PURE__*/r.n(o),c=r("util"),u=r("./dist/compiled/glob/glob.js"),h=/*#__PURE__*/r.n(u);function d(e){let t={},r=e.env;for(let n in r){let i=r[n];null!=i&&(!function(e,t){let r=/^(?:NODE_.+)|^(?:__.+)$/i.test(t),n="NEXT_RUNTIME"===t;if(r||n)throw Object.defineProperty(Error(`The key "${t}" under "env" in ${e.configFileName} is not allowed. https://nextjs.org/docs/messages/env-key-not-allowed`),"__NEXT_ERROR_CODE",{value:"E170",enumerable:!1,configurable:!0})}(e,n),t[`process.env.${n}`]=i)}return t}require("next/dist/compiled/webpack/webpack");var p=r("./dist/compiled/async-sema/index.js"),f=r("./dist/esm/shared/lib/constants.js");let m=(0,c.promisify)(h()),g=e=>({...function(){let e={};for(let t in process.env)if(t.startsWith("NEXT_PUBLIC_")){let r=process.env[t];null!=r&&(e[`process.env.${t}`]=r)}return e}(),...d(e),"process.env.NEXT_DEPLOYMENT_ID":e.deploymentId||""});function v(e){let t=g(e);for(let e in t){let r=e.split(".").pop()||"";process.env[r]||(process.env[r]=t[e]||"")}}async function y({distDir:e,config:t,buildId:r}){let n=d(t),s=g(t),o=a().join(e,"server"),c=await m("**/*.js",{cwd:o}),u=a().join(e,"static"),h=await m("**/*.js",{cwd:u}),v=h.find(e=>e.match(/webpack-[a-z0-9]{16}/));if(!v)throw Object.defineProperty(Error("Invariant failed to find webpack runtime chunk"),"__NEXT_ERROR_CODE",{value:"E662",enumerable:!1,configurable:!0});let y=new p.Sema(8),b=Object.keys(n).map(e=>e.split("process.env.").pop()),E=RegExp(`[\\w]{1,}(\\.env)?\\.(?:NEXT_PUBLIC_[\\w]{1,}${b.length?"|"+b.join("|"):""})`,"g"),_=[];for(let[e,t]of[[o,c],[u,h]])await Promise.all(t.map(async t=>{await y.acquire();let r=a().join(e,t),n=await i().promises.readFile(r,"utf8"),o=n.replace(E,e=>{let t=`process.env.${e.split(".").pop()}`;return s[t]?JSON.stringify(s[t]):e});await i().promises.writeFile(r,o),n!==o&&e===u&&_.push({file:t,content:o}),y.release()}));let w=[];for(let{file:e,content:t}of _){var x;let r=(null==(x=e.match(/([a-z0-9]{16})\./))?void 0:x[1])||"";if(!r)throw Object.defineProperty(Error(`Invariant: client chunk changed but failed to detect hash ${e}`),"__NEXT_ERROR_CODE",{value:"E663",enumerable:!1,configurable:!0});let n=l().createHash("sha256").update(t).digest("hex").substring(0,16);w.push({originalHash:r,newHash:n});let s=a().join(u,e);await i().promises.rename(s,s.replace(r,n))}for(let t of[a().join(e,f.xA),a().join(e,"static",v),a().join(e,"static",r,"_buildManifest.js")]){let e=await i().promises.readFile(t,"utf-8"),r=e;for(let{originalHash:e,newHash:t}of w)r=r.replaceAll(e,t);e!==r&&await i().promises.writeFile(t,r)}}},"./dist/esm/server sync recursive":e=>{function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id="./dist/esm/server sync recursive",e.exports=t},"./dist/esm/server/api-utils/index.js":(e,t,r)=>{"use strict";r.d(t,{Gx:()=>s,Ic:()=>a,M_:()=>c,PW:()=>l,Uc:()=>o,wE:()=>u});var n=r("./dist/esm/server/web/spec-extension/adapters/headers.js"),i=r("./dist/esm/lib/constants.js");function s(e,t){let r=n.o.from(e.headers);return{isOnDemandRevalidate:r.get(i.kz)===t.previewModeId,revalidateOnlyGenerated:r.has(i.r4)}}r("./lib/trace/tracer"),r("./dist/esm/server/lib/trace/constants.js");let a="__prerender_bypass",o="__next_preview_data",l=Symbol(o),c=Symbol(a);function u(e,t={}){if(c in e)return e;let{serialize:n}=r("./dist/compiled/cookie/index.js"),i=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof i?[i]:Array.isArray(i)?i:[],n(a,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0}),n(o,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0})]),Object.defineProperty(e,c,{value:!0,enumerable:!1}),e}},"./dist/esm/server/api-utils/node/try-get-preview-data.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{tryGetPreviewData:()=>a});var n=r("./dist/esm/server/api-utils/index.js"),i=r("./dist/esm/server/web/spec-extension/cookies.js"),s=r("./dist/esm/server/web/spec-extension/adapters/headers.js");function a(e,t,a,o){var l,c;let u;if(a&&(0,n.Gx)(e,a).isOnDemandRevalidate)return!1;if(n.PW in e)return e[n.PW];let h=s.o.from(e.headers),d=new i.tm(h),p=null==(l=d.get(n.Ic))?void 0:l.value,f=null==(c=d.get(n.Uc))?void 0:c.value;if(p&&!f&&p===a.previewModeId){let t={};return Object.defineProperty(e,n.PW,{value:t,enumerable:!1}),t}if(!p&&!f)return!1;if(!p||!f||p!==a.previewModeId)return o||(0,n.wE)(t),!1;try{u=r("next/dist/compiled/jsonwebtoken").verify(f,a.previewModeSigningKey)}catch{return(0,n.wE)(t),!1}let{decryptWithSecret:m}=r("./dist/esm/server/crypto-utils.js"),g=m(Buffer.from(a.previewModeEncryptionKey),u.data);try{let t=JSON.parse(g);return Object.defineProperty(e,n.PW,{value:t,enumerable:!1}),t}catch{return!1}}},"./dist/esm/server/crypto-utils.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptWithSecret:()=>o,encryptWithSecret:()=>a});var n=r("crypto"),i=/*#__PURE__*/r.n(n);let s="aes-256-gcm";function a(e,t){let r=i().randomBytes(16),n=i().randomBytes(64),a=i().pbkdf2Sync(e,n,1e5,32,"sha512"),o=i().createCipheriv(s,a,r),l=Buffer.concat([o.update(t,"utf8"),o.final()]),c=o.getAuthTag();return Buffer.concat([n,r,c,l]).toString("hex")}function o(e,t){let r=Buffer.from(t,"hex"),n=r.slice(0,64),a=r.slice(64,80),o=r.slice(80,96),l=r.slice(96),c=i().pbkdf2Sync(e,n,1e5,32,"sha512"),u=i().createDecipheriv(s,c,a);return u.setAuthTag(o),u.update(l)+u.final("utf8")}},"./dist/esm/server/lib/trace/constants.js":(e,t,r)=>{"use strict";r.d(t,{Fx:()=>a,Li:()=>n,p2:()=>i});var n=/*#__PURE__*/function(e){return e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404",e}(n||{}),i=/*#__PURE__*/function(e){return e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents",e}(i||{}),s=/*#__PURE__*/function(e){return e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer",e}(s||{}),a=/*#__PURE__*/function(e){return e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch",e}(a||{}),o=/*#__PURE__*/function(e){return e.startServer="startServer.startServer",e}(o||{}),l=/*#__PURE__*/function(e){return e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult",e}(l||{}),c=/*#__PURE__*/function(e){return e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch",e}(c||{}),u=/*#__PURE__*/function(e){return e.executeRoute="Router.executeRoute",e}(u||{}),h=/*#__PURE__*/function(e){return e.runHandler="Node.runHandler",e}(h||{}),d=/*#__PURE__*/function(e){return e.runHandler="AppRouteRouteHandlers.runHandler",e}(d||{}),p=/*#__PURE__*/function(e){return e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport",e}(p||{}),f=/*#__PURE__*/function(e){return e.execute="Middleware.execute",e}(f||{})},"./dist/esm/server/node-environment-baseline.js":(e,t,r)=>{if("function"!=typeof globalThis.AsyncLocalStorage){let{AsyncLocalStorage:e}=r("async_hooks");globalThis.AsyncLocalStorage=e}"function"!=typeof globalThis.WebSocket&&Object.defineProperty(globalThis,"WebSocket",{configurable:!0,get:()=>r("next/dist/compiled/ws").WebSocket,set(e){Object.defineProperty(globalThis,"WebSocket",{configurable:!0,writable:!0,value:e})}})},"./dist/esm/server/node-polyfill-crypto.js":(e,t,r)=>{if(!global.crypto){let e;Object.defineProperty(global,"crypto",{enumerable:!1,configurable:!0,get:()=>(e||(e=r("node:crypto").webcrypto),e),set(t){e=t}})}},"./dist/esm/server/web/spec-extension/adapters/headers.js":(e,t,r)=>{"use strict";r.d(t,{o:()=>s});var n=r("./dist/esm/server/web/spec-extension/adapters/reflect.js");class i extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new i}}class s extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,i){if("symbol"==typeof r)return n.l.get(t,r,i);let s=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===s);if(void 0!==a)return n.l.get(t,a,i)},set(t,r,i,s){if("symbol"==typeof r)return n.l.set(t,r,i,s);let a=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===a);return n.l.set(t,o??r,i,s)},has(t,r){if("symbol"==typeof r)return n.l.has(t,r);let i=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0!==s&&n.l.has(t,s)},deleteProperty(t,r){if("symbol"==typeof r)return n.l.deleteProperty(t,r);let i=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0===s||n.l.deleteProperty(t,s)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return i.callable;default:return n.l.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new s(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}},"./dist/esm/server/web/spec-extension/adapters/reflect.js":(e,t,r)=>{"use strict";r.d(t,{l:()=>n});class n{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},"./dist/esm/server/web/spec-extension/cookies.js":(e,t,r)=>{"use strict";r.d(t,{Ud:()=>n.stringifyCookie,VO:()=>n.ResponseCookies,tm:()=>n.RequestCookies});var n=r("./dist/compiled/@edge-runtime/cookies/index.js")},"./dist/esm/shared/lib/constants.js":(e,t,r)=>{"use strict";r.d(t,{B:()=>O,E5:()=>d,Fy:()=>o,Ie:()=>i,J2:()=>f,Kf:()=>m,NO:()=>s,P_:()=>h,UD:()=>y,XB:()=>l,_i:()=>_,aC:()=>x,cG:()=>R,iU:()=>w,k4:()=>v,ms:()=>E,pP:()=>g,qY:()=>b,sY:()=>p,vY:()=>u,xA:()=>c,zP:()=>a}),r("./dist/esm/shared/lib/modern-browserslist-target.js");let n={client:"client",server:"server",edgeServer:"edge-server"};n.client,n.server,n.edgeServer;let i="/_not-found",s=""+i+"/page",a="phase-production-build",o="pages-manifest.json",l="app-paths-manifest.json",c="build-manifest.json",u="functions-config-manifest.json",h="subresource-integrity-manifest",d="next-font-manifest",p="prerender-manifest.json",f="routes-manifest.json",m="middleware-manifest.json",g="react-loadable-manifest.json",v="server",y="BUILD_ID",b=["/_document","/_app","/_error"],E="public",_="__NEXT_BUILTIN_DOCUMENT__",w="client-reference-manifest",x="server-reference-manifest",R="dynamic-css-manifest";Symbol("polyfills");let O=["/500"]},"./dist/esm/shared/lib/isomorphic/path.js":(e,t,r)=>{let n;n=r("path"),e.exports=n},"./dist/esm/shared/lib/modern-browserslist-target.js":e=>{e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},"./lib/trace/tracer":e=>{"use strict";e.exports=require("next/dist/server/lib/trace/tracer")},"./web/sandbox":e=>{"use strict";e.exports=require("next/dist/server/web/sandbox")},assert:e=>{"use strict";e.exports=require("assert")},async_hooks:e=>{"use strict";e.exports=require("async_hooks")},crypto:e=>{"use strict";e.exports=require("crypto")},events:e=>{"use strict";e.exports=require("events")},fs:e=>{"use strict";e.exports=require("fs")},module:e=>{"use strict";e.exports=require("module")},"next/dist/compiled/jsonwebtoken":e=>{"use strict";e.exports=require("next/dist/compiled/jsonwebtoken")},"next/dist/compiled/ws":e=>{"use strict";e.exports=require("next/dist/compiled/ws")},"next/dist/experimental/testmode/server-edge":e=>{"use strict";e.exports=require("next/dist/experimental/testmode/server-edge")},"node:crypto":e=>{"use strict";e.exports=require("node:crypto")},os:e=>{"use strict";e.exports=require("os")},path:e=>{"use strict";e.exports=require("path")},util:e=>{"use strict";e.exports=require("util")}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";let e,t;r.r(n),r.d(n,{NoFallbackError:()=>nl,WrappedBuildError:()=>nc,default:()=>nJ});var i,s,a={};r.r(a),r.d(a,{bootstrap:()=>ek,error:()=>eM,event:()=>eF,info:()=>e$,prefixes:()=>ej,ready:()=>eq,trace:()=>eH,wait:()=>eI,warn:()=>eL,warnOnce:()=>eU}),r("./dist/esm/server/node-environment-baseline.js");var o=r("module"),l=r("path"),c=/*#__PURE__*/r.n(l);let u=require("url"),h=require("next/dist/compiled/source-map");var d=r("fs"),p=/*#__PURE__*/r.n(d);require("next/dist/compiled/source-map08"),require("fs/promises"),r("./dist/compiled/data-uri-to-buffer/index.js");let{env:f,stdout:m}=(null==(i=globalThis)?void 0:i.process)??{},g=f&&!f.NO_COLOR&&(f.FORCE_COLOR||(null==m?void 0:m.isTTY)&&!f.CI&&"dumb"!==f.TERM),v=(e,t,r,n)=>{let i=e.substring(0,n)+r,s=e.substring(n+t.length),a=s.indexOf(t);return~a?i+v(s,t,r,a):i+s},y=(e,t,r=e)=>g?n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+v(i,t,r,s)+t:e+i+t}:String,b=y("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m");y("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),y("\x1b[3m","\x1b[23m"),y("\x1b[4m","\x1b[24m"),y("\x1b[7m","\x1b[27m"),y("\x1b[8m","\x1b[28m"),y("\x1b[9m","\x1b[29m"),y("\x1b[30m","\x1b[39m");let E=y("\x1b[31m","\x1b[39m"),_=y("\x1b[32m","\x1b[39m"),w=y("\x1b[33m","\x1b[39m");y("\x1b[34m","\x1b[39m");let x=y("\x1b[35m","\x1b[39m");y("\x1b[38;2;173;127;168m","\x1b[39m"),y("\x1b[36m","\x1b[39m");let R=y("\x1b[37m","\x1b[39m");y("\x1b[90m","\x1b[39m"),y("\x1b[40m","\x1b[49m"),y("\x1b[41m","\x1b[49m"),y("\x1b[42m","\x1b[49m"),y("\x1b[43m","\x1b[49m"),y("\x1b[44m","\x1b[49m"),y("\x1b[45m","\x1b[49m"),y("\x1b[46m","\x1b[49m"),y("\x1b[47m","\x1b[49m"),require("child_process"),r("os"),r("./dist/compiled/shell-quote/index.js"),require("next/dist/compiled/babel/code-frame"),r("util");let O=require("next/dist/compiled/stacktrace-parser");Symbol.for("NextjsError");let C=["Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:","A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:"];function P(e){return C.some(t=>e.startsWith(t))}let S=[/^In HTML, (.+?) cannot be a child of <(.+?)>\.(.*)\nThis will cause a hydration error\.(.*)/,/^In HTML, (.+?) cannot be a descendant of <(.+?)>\.\nThis will cause a hydration error\.(.*)/,/^In HTML, text nodes cannot be a child of <(.+?)>\.\nThis will cause a hydration error\./,/^In HTML, whitespace text nodes cannot be a child of <(.+?)>\. Make sure you don't have any extra whitespace between tags on each line of your source code\.\nThis will cause a hydration error\./,/^Expected server HTML to contain a matching <(.+?)> in <(.+?)>\.(.*)/,/^Did not expect server HTML to contain a <(.+?)> in <(.+?)>\.(.*)/,/^Expected server HTML to contain a matching text node for "(.+?)" in <(.+?)>\.(.*)/,/^Did not expect server HTML to contain the text node "(.+?)" in <(.+?)>\.(.*)/,/^Text content did not match\. Server: "(.+?)" Client: "(.+?)"(.*)/],T=/\/_next(\/static\/.+)/,A=require("next/dist/server/app-render/work-unit-async-storage.external.js"),j=()=>void 0;function D(e){let t,r=null!==e.lineNumber?`:${e.lineNumber}`:"";return null!==e.column&&""!==r&&(r+=`:${e.column}`),null!==e.file&&e.file.startsWith("file://")&&URL.canParse(e.file)?t=l.relative(process.cwd(),u.fileURLToPath(e.file)):t=null!==e.file&&e.file.startsWith("/")?l.relative(process.cwd(),e.file):e.file,e.methodName?` at ${e.methodName} (${t}${r})`:` at ${t}${r}`}function N(e){return e.name||"Error"}function k(e,t){let r=N(e)+": "+(e.message||"");for(let e=0;e<t.length;e++)r+="\n at "+t[e].toString();return r}function I(e){return e.startsWith("node:")||e.includes("node_modules")}function M(e){return{stack:{arguments:e.arguments,column:e.column,file:e.file,lineNumber:e.lineNumber,methodName:e.methodName,ignored:I(e.file)},code:null}}!function(e){let t=Symbol.for("nodejs.util.inspect.custom");e.prepareStackTrace=k,e.prototype[t]=function(e,r,n){return A.workUnitAsyncStorage.exit(()=>{let i=function(e,t){let r=void 0!==e.cause?Object.defineProperty(Error(e.message,{cause:e.cause}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}):Object.defineProperty(Error(e.message),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});for(let t in r.stack=function(e,t){let r=String(e.stack),n=N(e),i=r.indexOf("react-stack-bottom-frame");-1!==i&&(i=r.lastIndexOf("\n",i)),-1!==i&&(r=r.slice(0,i));let s=function(e){if(!e)return[];let t=e.replace(/^Error: /,"");if(P(t)){let{stack:r}=function(e){var t;let r="string"==typeof(t=e=(e=e.replace(/^Error: /,"")).replace("Warning: ",""))&&!!t&&(t.startsWith("Warning: ")&&(t=t.slice(9)),S.some(e=>e.test(t)));if(!P(e)&&!r)return{message:null,stack:e,diff:""};if(r){let[t,r]=e.split("\n\n");return{message:t.trim(),stack:"",diff:(r||"").trim()}}let n=e.indexOf("\n"),[i,s]=(e=e.slice(n+1).trim()).split("https://react.dev/link/hydration-mismatch"),a=i.trim();if(!s||!(s.length>1))return{message:a,stack:s};{let e=[],t=[];return s.split("\n").forEach(r=>{""!==r.trim()&&(r.trim().startsWith("at ")?e.push(r):t.push(r))}),{message:a,diff:t.join("\n"),stack:e.join("\n")}}}(t);r&&(e=r)}return e=e.split("\n").map(e=>(e.includes("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/\(eval at [^()]* \(/,"(file://").replace(/\),.*$/g,")")),e)).join("\n"),(0,O.parse)(e).map(e=>{try{let n=new URL(e.file),i=T.exec(n.pathname);if(i){var t,r;let s=null==(r=process.env.__NEXT_DIST_DIR)?void 0:null==(t=r.replace(/\\/g,"/"))?void 0:t.replace(/\/$/,"");s&&(e.file="file://"+s.concat(i.pop())+n.search)}}catch(e){}return e})}(r),a=new Map,l="";for(let e of s)if(null===e.file)l+="\n"+D(e);else{let t=function(e,t,r){var n,i,s;let a,l;let c=t.get(e.file);if(void 0===c){let r,n=e.file;n.startsWith("/")&&(n=u.pathToFileURL(e.file).toString());try{let e=(0,o.findSourceMap)(n);r=null==e?void 0:e.payload}catch(t){return console.error(`${n}: Invalid source map. Only conformant source maps can be used to find the original code. Cause: ${t}`),M(e)}if(void 0===r&&(r=j(n)),void 0===r)return M(e);l=r;try{a=new h.SourceMapConsumer(l)}catch(t){return console.error(`${n}: Invalid source map. Only conformant source maps can be used to find the original code. Cause: ${t}`),M(e)}t.set(e.file,{map:a,payload:l})}else a=c.map,l=c.payload;let d=a.originalPositionFor({column:e.column??0,line:e.lineNumber??1});if(null===d.source)return{stack:{arguments:e.arguments,column:e.column,file:e.file,lineNumber:e.lineNumber,methodName:e.methodName,ignored:I(e.file)},code:null};a.sourceContentFor(d.source,!0);let p=function(e,t){if(!("sections"in t))return t;{let r=e.lineNumber??0,n=e.column??0,i=t.sections[0];for(let e=0;e<t.sections.length&&t.sections[e].offset.line<=r&&t.sections[e].offset.column<=n;e++)i=t.sections[e];return void 0===i?void 0:i.map}}(e,l),f=!1;if(void 0===p)console.error("No applicable source map found in sections for frame",e);else if(d.source.includes("node_modules"))f=!0;else{let e=p.sources.indexOf(d.source);f=(null==(s=p.ignoreList)?void 0:s.includes(e))??!1}let m={methodName:null==(i=e.methodName)?void 0:null==(n=i.replace("__WEBPACK_DEFAULT_EXPORT__","default"))?void 0:n.replace("__webpack_exports__.",""),column:d.column,file:d.source,lineNumber:d.line,arguments:[],ignored:f};return{stack:m,code:null}}(e,a,0);t.stack.ignored||(l+="\n"+D(t.stack))}return n+": "+e.message+l}(e,0),e)Object.prototype.hasOwnProperty.call(r,t)||(r[t]=e[t]);return r}(this,0),s=i[t];Object.defineProperty(i,t,{value:void 0,enumerable:!1,writable:!0});try{return n(i,{...r,depth:(r.depth??2)-e})}finally{i[t]=s}})}}(globalThis.Error);let L=require("next/dist/server/app-render/work-async-storage.external.js");if(r("../../node_modules/.pnpm/react@19.1.0-canary-0ca3deeb-20250311/node_modules/react/index.js").unstable_postpone,!1===function(e){return e.includes("needs to bail out of prerendering at this point because it used")&&e.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 __next_metadata_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_viewport_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_outlet_boundary__[\\n\\s]`);class q extends Error{constructor(e,t){super("Invariant: "+(e.endsWith(".")?e:e+".")+" This is a bug in Next.js.",t),this.name="InvariantError"}}function $(e,t){let r=A.workUnitAsyncStorage.getStore();if(r){if("prerender"===r.type){let n=L.workAsyncStorage.getStore();if(n){let i;switch(t){case"time":i=`Route "${n.route}" used ${e} instead of using \`performance\` or without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-current-time`;break;case"random":i=`Route "${n.route}" used ${e} outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random`;break;case"crypto":i=`Route "${n.route}" used ${e} outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-crypto`;break;default:throw Object.defineProperty(new q("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}let s=Object.defineProperty(Error(i),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});!function(e,t,r,n){let i=n.dynamicTracking;i&&null===i.syncDynamicErrorWithStack&&(i.syncDynamicExpression=t,i.syncDynamicErrorWithStack=r),function(e,t,r){let n=function(e){let t=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t.digest="NEXT_PRERENDER_INTERRUPTED",t}(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`);r.controller.abort(n);let i=r.dynamicTracking;i&&i.dynamicAccesses.push({stack:i.isDebugDynamicAccesses?Error().stack:void 0,expression:t})}(e,t,n)}(n.route,e,s,r)}}else"request"===r.type&&!0===r.prerenderPhase&&(r.prerenderPhase=!1)}}let F="`Math.random()`";try{let e=Math.random;Math.random=(function(){return $(F,"random"),e.apply(null,arguments)}).bind(null),Object.defineProperty(Math.random,"name",{value:"random"})}catch{console.error(`Failed to install ${F} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}try{Date=function(e){var t;let r=Object.getOwnPropertyDescriptors(e);r.now.value=(t=e.now,({now:function(){return $("`Date.now()`","time"),t()}})["now".slice()].bind(null));let n=Reflect.apply,i=Reflect.construct,s=Object.defineProperties(function(){return new.target===void 0?($("`Date()`","time"),n(e,void 0,arguments)):(0==arguments.length&&$("`new Date()`","time"),i(e,arguments,new.target))},r);return Object.defineProperty(e.prototype,"constructor",{value:s}),s}(Date)}catch{console.error("Failed to install `Date` class extension. When using `experimental.dynamicIO`, APIs that read the current time will not correctly trigger dynamic behavior.")}"undefined"==typeof crypto?e=r("node:crypto").webcrypto:e=crypto;let H="`crypto.getRandomValues()`";try{let t=e.getRandomValues;e.getRandomValues=function(){return $(H,"crypto"),t.apply(e,arguments)}}catch{console.error(`Failed to install ${H} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}try{let t=e.randomUUID;e.randomUUID=function(){return $("`crypto.randomUUID()`","crypto"),t.apply(e,arguments)}}catch{console.error(`Failed to install ${H} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}{let e=r("node:crypto"),t="`require('node:crypto').randomUUID()`";try{let r=e.randomUUID;e.randomUUID=function(){return $(t,"random"),r.apply(this,arguments)}}catch{console.error(`Failed to install ${t} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}let n="`require('node:crypto').randomBytes(size)`";try{let t=e.randomBytes;e.randomBytes=function(){return"function"!=typeof arguments[1]&&$(n,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${n} extension. When using \`experimental.dynamicIO\` calling this function without a callback argument will not correctly trigger dynamic behavior.`)}let i="`require('node:crypto').randomFillSync(...)`";try{let t=e.randomFillSync;e.randomFillSync=function(){return $(i,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${i} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}try{let t=e.randomInt;e.randomInt=function(){return"function"!=typeof arguments[2]&&$("`require('node:crypto').randomInt(min, max)`","random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${n} extension. When using \`experimental.dynamicIO\` calling this function without a callback argument will not correctly trigger dynamic behavior.`)}let s="`require('node:crypto').generatePrimeSync(...)`";try{let t=e.generatePrimeSync;e.generatePrimeSync=function(){return $(s,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${s} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}let a="`require('node:crypto').generateKeyPairSync(...)`";try{let t=e.generateKeyPairSync;e.generateKeyPairSync=function(){return $(a,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${a} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}let o="`require('node:crypto').generateKeySync(...)`";try{let t=e.generateKeySync;e.generateKeySync=function(){return $(o,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${o} extension. When using \`experimental.dynamicIO\` calling this function will not correctly trigger dynamic behavior.`)}}let z=r("path"),U=r("module"),X=U.prototype.require,W=U._resolveFilename,B=require.resolve,G=new Map;function V(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}(function(e=[]){for(let[t,r]of e)G.set(t,r)})(Object.entries({"styled-jsx":z.dirname(B("styled-jsx/package.json")),"styled-jsx/style":B("styled-jsx/style"),"styled-jsx/style.js":B("styled-jsx/style")}).map(([e,t])=>[e,B(t)])),U._resolveFilename=(function(e,t,r,n,i,s){let a=t.get(r);return a&&(r=a),e.call(U,r,n,i,s)}).bind(null,W,G),U.prototype.require=function(e){return e.endsWith(".shared-runtime")?X.call(this,`next/dist/server/route-modules/pages/vendored/contexts/${z.basename(e,".shared-runtime")}`):X.call(this,e)},r("./dist/esm/server/node-polyfill-crypto.js"),"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class K extends Error{}class J extends Error{}class Y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class Q extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}function Z(e){let{re:t,groups:r}=e;return e=>{let n=t.exec(e);if(!n)return!1;let i=e=>{try{return decodeURIComponent(e)}catch(e){throw Object.defineProperty(new K("failed to decode param"),"__NEXT_ERROR_CODE",{value:"E528",enumerable:!1,configurable:!0})}},s={};for(let[e,t]of Object.entries(r)){let r=n[t.pos];void 0!==r&&(t.repeat?s[e]=r.split("/").map(e=>i(e)):s[e]=i(r))}return s}}let ee=Symbol.for("NextInternalRequestMeta");function et(e,t){let r=e[ee]||{};return"string"==typeof t?r[t]:r}function er(e,t,r){let n=et(e);return n[t]=r,e[ee]=n,n}function en(e,t){let r=et(e);return delete r[t],e[ee]=r,r}var ei=r("./dist/esm/shared/lib/constants.js");function es(e,t){let r=c().join(e,t);return p().existsSync(r)?r:(r=c().join(e,"src",t),p().existsSync(r))?r:null}var ea=r("./dist/esm/server/api-utils/index.js"),eo=/*#__PURE__*/function(e){return e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e}({});function el(e){return function(){let{cookie:t}=e;if(!t)return{};let{parse:n}=r("./dist/compiled/cookie/index.js");return n(Array.isArray(t)?t.join("; "):t)}}class ec{constructor(e,t,r){this.method=e,this.url=t,this.body=r}get cookies(){return this._cookies?this._cookies:this._cookies=el(this.headers)()}}class eu{constructor(e){this.destination=e}redirect(e,t){return this.setHeader("Location",e),this.statusCode=t,t===eo.PermanentRedirect&&this.setHeader("Refresh",`0;url=${e}`),this}}class eh extends ec{static #e=s=ee;constructor(e){var t;super(e.method.toUpperCase(),e.url,e),this._req=e,this.headers=this._req.headers,this.fetchMetrics=null==(t=this._req)?void 0:t.fetchMetrics,this[s]=this._req[ee]||{},this.streaming=!1}get originalRequest(){return this._req[ee]=this[ee],this._req.url=this.url,this._req.cookies=this.cookies,this._req}set originalRequest(e){this._req=e}stream(){if(this.streaming)throw Object.defineProperty(Error("Invariant: NodeNextRequest.stream() can only be called once"),"__NEXT_ERROR_CODE",{value:"E467",enumerable:!1,configurable:!0});return this.streaming=!0,new ReadableStream({start:e=>{this._req.on("data",t=>{e.enqueue(new Uint8Array(t))}),this._req.on("end",()=>{e.close()}),this._req.on("error",t=>{e.error(t)})}})}}class ed extends eu{get originalResponse(){return ea.M_ in this&&(this._res[ea.M_]=this[ea.M_]),this._res}constructor(e){super(e),this._res=e,this.textBody=void 0}get sent(){return this._res.finished||this._res.headersSent}get statusCode(){return this._res.statusCode}set statusCode(e){this._res.statusCode=e}get statusMessage(){return this._res.statusMessage}set statusMessage(e){this._res.statusMessage=e}setHeader(e,t){return this._res.setHeader(e,t),this}removeHeader(e){return this._res.removeHeader(e),this}getHeaderValues(e){let t=this._res.getHeader(e);if(void 0!==t)return(Array.isArray(t)?t:[t]).map(e=>e.toString())}hasHeader(e){return this._res.hasHeader(e)}getHeader(e){let t=this.getHeaderValues(e);return Array.isArray(t)?t.join(","):void 0}getHeaders(){return this._res.getHeaders()}appendHeader(e,t){let r=this.getHeaderValues(e)??[];return r.includes(t)||this._res.setHeader(e,[...r,t]),this}body(e){return this.textBody=e,this}send(){this._res.end(this.textBody)}onClose(e){this.originalResponse.on("close",e)}}let ep=e=>{let t=e.length,r=0,n=0,i=8997,s=0,a=33826,o=0,l=40164,c=0,u=52210;for(;r<t;)i^=e.charCodeAt(r++),n=435*i,s=435*a,o=435*l,c=435*u,o+=i<<8,c+=a<<8,s+=n>>>16,i=65535&n,o+=s>>>16,a=65535&s,u=c+(o>>>16)&65535,l=65535&o;return(15&u)*0x1000000000000+0x100000000*l+65536*a+(i^u>>4)},ef=(e,t=!1)=>(t?'W/"':'"')+ep(e).toString(36)+e.length.toString(36)+'"';var em=r("./dist/compiled/fresh/index.js"),eg=/*#__PURE__*/r.n(em),ev=r("./dist/esm/lib/constants.js");function ey({revalidate:e,expire:t}){let r="number"==typeof e&&void 0!==t&&e<t?`, stale-while-revalidate=${t-e}`:"";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}${r}`:`s-maxage=${ev.qF}${r}`}let eb="Next-Action",eE="Next-Router-State-Tree",e_="Next-Router-Prefetch",ew="Next-Router-Segment-Prefetch",ex="Next-Url",eR=["RSC",eE,e_,"Next-HMR-Refresh",ew],eO="_rsc",eC="x-nextjs-postponed";async function eP({req:e,res:t,result:r,type:n,generateEtags:i,poweredByHeader:s,cacheControl:a}){if(t.finished||t.headersSent)return;s&&"html"===n&&t.setHeader("X-Powered-By","Next.js"),a&&!t.getHeader("Cache-Control")&&t.setHeader("Cache-Control",ey(a));let o=r.isDynamic?null:r.toUnchunkedString();if(i&&null!==o){let r=ef(o);if(r&&t.setHeader("ETag",r),eg()(e.headers,{etag:r})&&(t.statusCode=304,t.end(),1))return}if(t.getHeader("Content-Type")||t.setHeader("Content-Type",r.contentType?r.contentType:"rsc"===n?"text/x-component":"json"===n?"application/json":"text/html; charset=utf-8"),o&&t.setHeader("Content-Length",Buffer.byteLength(o)),"HEAD"===e.method){t.end(null);return}if(null!==o){t.end(o);return}await r.pipeToNodeResponse(t)}function eS(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function eT(e){if(e.startsWith("/"))return function(e,t,r){void 0===r&&(r=!0);let n=new URL("http://n"),i=e.startsWith(".")?new URL("http://n"):n,{pathname:s,searchParams:a,search:o,hash:l,href:c,origin:u}=new URL(e,i);if(u!==n.origin)throw Object.defineProperty(Error("invariant: invalid relative URL, router received "+e),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{pathname:s,query:r?eS(a):void 0,search:o,hash:l,href:c.slice(u.length)}}(e);let t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:eS(t.searchParams),search:t.search}}class eA{constructor(e,t){this.cache=new Map,this.sizes=new Map,this.totalSize=0,this.maxSize=e,this.calculateSize=t||(()=>1)}set(e,t){if(!e||!t)return;let r=this.calculateSize(t);if(r>this.maxSize){console.warn("Single item size exceeds maxSize");return}this.cache.has(e)&&(this.totalSize-=this.sizes.get(e)||0),this.cache.set(e,t),this.sizes.set(e,r),this.totalSize+=r,this.touch(e)}has(e){return!!e&&(this.touch(e),!!this.cache.get(e))}get(e){if(!e)return;let t=this.cache.get(e);if(void 0!==t)return this.touch(e),t}touch(e){let t=this.cache.get(e);void 0!==t&&(this.cache.delete(e),this.cache.set(e,t),this.evictIfNecessary())}evictIfNecessary(){for(;this.totalSize>this.maxSize&&this.cache.size>0;)this.evictLeastRecentlyUsed()}evictLeastRecentlyUsed(){let e=this.cache.keys().next().value;if(void 0!==e){let t=this.sizes.get(e)||0;this.totalSize-=t,this.cache.delete(e),this.sizes.delete(e)}}reset(){this.cache.clear(),this.sizes.clear(),this.totalSize=0}keys(){return[...this.cache.keys()]}remove(e){this.cache.has(e)&&(this.totalSize-=this.sizes.get(e)||0,this.cache.delete(e),this.sizes.delete(e))}clear(){this.cache.clear(),this.sizes.clear(),this.totalSize=0}get size(){return this.cache.size}get currentSize(){return this.totalSize}}let ej={wait:R(b("○")),error:E(b("⨯")),warn:w(b("⚠")),ready:"▲",info:R(b(" ")),event:_(b("✓")),trace:x(b("»"))},eD={log:"log",warn:"warn",error:"error"};function eN(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in eD?eD[e]:"log",n=ej[e];0===t.length?console[r](""):1===t.length&&"string"==typeof t[0]?console[r](" "+n+" "+t[0]):console[r](" "+n,...t)}function ek(...e){console.log(" "+e.join(" "))}function eI(...e){eN("wait",...e)}function eM(...e){eN("error",...e)}function eL(...e){eN("warn",...e)}function eq(...e){eN("ready",...e)}function e$(...e){eN("info",...e)}function eF(...e){eN("event",...e)}function eH(...e){eN("trace",...e)}let ez=new eA(1e4,e=>e.length);function eU(...e){let t=e.join(" ");ez.has(t)||(ez.set(t,t),eL(...e))}function eX(e){return e.startsWith("/")?e:"/"+e}function eW(e){return eX(e.split("/").reduce((e,t,r,n)=>!t||"("===t[0]&&t.endsWith(")")||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function eB(e){return e.replace(/\.rsc($|\?)/,"$1")}let eG=["(..)(..)","(.)","(..)","(...)"];function eV(e){return void 0!==e.split("/").find(e=>eG.find(t=>e.startsWith(t)))}let eK=/[|\\{}()[\]^$+*?.-]/,eJ=/[|\\{}()[\]^$+*?.-]/g;function eY(e){return eK.test(e)?e.replace(eJ,"\\$&"):e}function eQ(e){return e.replace(/\/$/,"")||"/"}let eZ=/^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;function e0(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function e1(e,t){let{includeSuffix:r=!1,includePrefix:n=!1,excludeOptionalTrailingSlash:i=!1}=void 0===t?{}:t,{parameterizedRoute:s,groups:a}=function(e,t,r){let n={},i=1,s=[];for(let a of eQ(e).slice(1).split("/")){let e=eG.find(e=>a.startsWith(e)),o=a.match(eZ);if(e&&o&&o[2]){let{key:t,optional:r,repeat:a}=e0(o[2]);n[t]={pos:i++,repeat:a,optional:r},s.push("/"+eY(e)+"([^/]+?)")}else if(o&&o[2]){let{key:e,repeat:t,optional:a}=e0(o[2]);n[e]={pos:i++,repeat:t,optional:a},r&&o[1]&&s.push("/"+eY(o[1]));let l=t?a?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)";r&&o[1]&&(l=l.substring(1)),s.push(l)}else s.push("/"+eY(a));t&&o&&o[3]&&s.push(eY(o[3]))}return{parameterizedRoute:s.join(""),groups:n}}(e,r,n),o=s;return i||(o+="(?:/)?"),{re:RegExp("^"+o+"$"),groups:a}}function e4(e){let t,{interceptionMarker:r,getSafeRouteKey:n,segment:i,routeKeys:s,keyPrefix:a,backreferenceDuplicateKeys:o}=e,{key:l,optional:c,repeat:u}=e0(i),h=l.replace(/\W/g,"");a&&(h=""+a+h);let d=!1;(0===h.length||h.length>30)&&(d=!0),isNaN(parseInt(h.slice(0,1)))||(d=!0),d&&(h=n());let p=h in s;a?s[h]=""+a+l:s[h]=l;let f=r?eY(r):"";return t=p&&o?"\\k<"+h+">":u?"(?<"+h+">.+?)":"(?<"+h+">[^/]+?)",c?"(?:/"+f+t+")?":"/"+f+t}class e2{constructor(){let e,t;this.promise=new Promise((r,n)=>{e=r,t=n}),this.resolve=e,this.reject=t}}class e3{constructor(e,t=e=>e()){this.cacheKeyFn=e,this.schedulerFn=t,this.pending=new Map}static create(e){return new e3(null==e?void 0:e.cacheKeyFn,null==e?void 0:e.schedulerFn)}async batch(e,t){let r=this.cacheKeyFn?await this.cacheKeyFn(e):e;if(null===r)return t(r,Promise.resolve);let n=this.pending.get(r);if(n)return n;let{promise:i,resolve:s,reject:a}=new e2;return this.pending.set(r,i),this.schedulerFn(async()=>{try{let e=await t(r,s);s(e)}catch(e){a(e)}finally{this.pending.delete(r)}}),i}}let e8=e=>{Promise.resolve().then(()=>{process.nextTick(e)})};var e5=/*#__PURE__*/function(e){return e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.PAGES="PAGES",e.FETCH="FETCH",e.REDIRECT="REDIRECT",e.IMAGE="IMAGE",e}({}),e6=/*#__PURE__*/function(e){return e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.PAGES="PAGES",e.FETCH="FETCH",e.IMAGE="IMAGE",e}({}),e9=r("./lib/trace/tracer"),e7=r("./dist/esm/server/lib/trace/constants.js");function te(){}new Uint8Array([60,104,116,109,108]),new Uint8Array([60,98,111,100,121]),new Uint8Array([60,47,104,101,97,100,62]),new Uint8Array([60,47,98,111,100,121,62]),new Uint8Array([60,47,104,116,109,108,62]),new Uint8Array([60,47,98,111,100,121,62,60,47,104,116,109,108,62]);let tt=new TextEncoder;function tr(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function tn(e){let t=e.getReader(),r=[];for(;;){let{done:e,value:n}=await t.read();if(e)break;r.push(n)}return Buffer.concat(r)}async function ti(e,t){let r=new TextDecoder("utf-8",{fatal:!0}),n="";for await(let i of e){if(null==t?void 0:t.aborted)return n;n+=r.decode(i,{stream:!0})}return n+r.decode()}function ts(e){let t=new Headers;for(let[r,n]of Object.entries(e))for(let e of Array.isArray(n)?n:[n])void 0!==e&&("number"==typeof e&&(e=e.toString()),t.append(r,e));return t}function ta(e){var t,r,n,i,s,a=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(r=e.charAt(o))){for(n=o,o+=1,l(),i=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=i,a.push(e.substring(t,n)),t=o):o=n+1}else o+=1;(!s||o>=e.length)&&a.push(e.substring(t,e.length))}return a}function to(e){let t={},r=[];if(e)for(let[n,i]of e.entries())"set-cookie"===n.toLowerCase()?(r.push(...ta(i)),t[n]=1===r.length?r[0]:r):t[n]=i;return t}function tl(e){try{return String(new URL(String(e)))}catch(t){throw Object.defineProperty(Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t}),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}function tc(e){for(let t of[ev.AA,ev.h])if(e!==t&&e.startsWith(t))return e.substring(t.length);return null}function tu(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r<t);return n||t>-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}function th(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=tu(e);return""+t+r+n+i}function td(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=tu(e);return""+r+t+n+i}function tp(e,t){if("string"!=typeof e)return!1;let{pathname:r}=tu(e);return r===t||r.startsWith(t+"/")}function tf(e,t){let r;if((null==t?void 0:t.host)&&!Array.isArray(t.host))r=t.host.toString().split(":",1)[0];else{if(!e.hostname)return;r=e.hostname}return r.toLowerCase()}let tm=new WeakMap;function tg(e,t){let r;if(!t)return{pathname:e};let n=tm.get(t);n||(n=t.map(e=>e.toLowerCase()),tm.set(t,n));let i=e.split("/",2);if(!i[1])return{pathname:e};let s=i[1].toLowerCase(),a=n.indexOf(s);return a<0?{pathname:e}:(r=t[a],{pathname:e=e.slice(r.length+1)||"/",detectedLocale:r})}function tv(e,t){if(!tp(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}function ty(e,t){var r,n;let{basePath:i,i18n:s,trailingSlash:a}=null!=(r=t.nextConfig)?r:{},o={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):a};i&&tp(o.pathname,i)&&(o.pathname=tv(o.pathname,i),o.basePath=i);let l=o.pathname;if(o.pathname.startsWith("/_next/data/")&&o.pathname.endsWith(".json")){let e=o.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];o.buildId=r,l="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(o.pathname=l)}if(s){let e=t.i18nProvider?t.i18nProvider.analyze(o.pathname):tg(o.pathname,s.locales);o.locale=e.detectedLocale,o.pathname=null!=(n=e.pathname)?n:o.pathname,!e.detectedLocale&&o.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(l):tg(l,s.locales)).detectedLocale&&(o.locale=e.detectedLocale)}return o}let tb=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function tE(e,t){return new URL(String(e).replace(tb,"localhost"),t&&String(t).replace(tb,"localhost"))}let t_=Symbol("NextURLInternal");class tw{constructor(e,t,r){let n,i;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,i=r||{}):i=r||t||{},this[t_]={url:tE(e,n??i.base),options:i,basePath:""},this.analyze()}analyze(){var e,t,r,n,i;let s=ty(this[t_].url.pathname,{nextConfig:this[t_].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[t_].options.i18nProvider}),a=tf(this[t_].url,this[t_].options.headers);this[t_].domainLocale=this[t_].options.i18nProvider?this[t_].options.i18nProvider.detectDomainLocale(a):function(e,t,r){if(e)for(let s of(r&&(r=r.toLowerCase()),e)){var n,i;if(t===(null==(n=s.domain)?void 0:n.split(":",1)[0].toLowerCase())||r===s.defaultLocale.toLowerCase()||(null==(i=s.locales)?void 0:i.some(e=>e.toLowerCase()===r)))return s}}(null==(t=this[t_].options.nextConfig)?void 0:null==(e=t.i18n)?void 0:e.domains,a);let o=(null==(r=this[t_].domainLocale)?void 0:r.defaultLocale)||(null==(i=this[t_].options.nextConfig)?void 0:null==(n=i.i18n)?void 0:n.defaultLocale);this[t_].url.pathname=s.pathname,this[t_].defaultLocale=o,this[t_].basePath=s.basePath??"",this[t_].buildId=s.buildId,this[t_].locale=s.locale??o,this[t_].trailingSlash=s.trailingSlash}formatPathname(){var e;let t;return t=function(e,t,r,n){if(!t||t===r)return e;let i=e.toLowerCase();return!n&&(tp(i,"/api")||tp(i,"/"+t.toLowerCase()))?e:th(e,"/"+t)}((e={basePath:this[t_].basePath,buildId:this[t_].buildId,defaultLocale:this[t_].options.forceLocale?void 0:this[t_].defaultLocale,locale:this[t_].locale,pathname:this[t_].url.pathname,trailingSlash:this[t_].trailingSlash}).pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix),(e.buildId||!e.trailingSlash)&&(t=eQ(t)),e.buildId&&(t=td(th(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=th(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:td(t,"/"):eQ(t)}formatSearch(){return this[t_].url.search}get buildId(){return this[t_].buildId}set buildId(e){this[t_].buildId=e}get locale(){return this[t_].locale??""}set locale(e){var t,r;if(!this[t_].locale||!(null==(r=this[t_].options.nextConfig)?void 0:null==(t=r.i18n)?void 0:t.locales.includes(e)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${e}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[t_].locale=e}get defaultLocale(){return this[t_].defaultLocale}get domainLocale(){return this[t_].domainLocale}get searchParams(){return this[t_].url.searchParams}get host(){return this[t_].url.host}set host(e){this[t_].url.host=e}get hostname(){return this[t_].url.hostname}set hostname(e){this[t_].url.hostname=e}get port(){return this[t_].url.port}set port(e){this[t_].url.port=e}get protocol(){return this[t_].url.protocol}set protocol(e){this[t_].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[t_].url=tE(e),this.analyze()}get origin(){return this[t_].url.origin}get pathname(){return this[t_].url.pathname}set pathname(e){this[t_].url.pathname=e}get hash(){return this[t_].url.hash}set hash(e){this[t_].url.hash=e}get search(){return this[t_].url.search}set search(e){this[t_].url.search=e}get password(){return this[t_].url.password}set password(e){this[t_].url.password=e}get username(){return this[t_].url.username}set username(e){this[t_].url.username=e}get basePath(){return this[t_].basePath}set basePath(e){this[t_].basePath=e.startsWith("/")?e:`/${e}`}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 tw(String(this),this[t_].options)}}class tx extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
|
20
20
|
|
21
21
|
export function middleware(request, event) {
|
22
22
|
return NextResponse.redirect('/new-location')
|
23
23
|
}
|
24
24
|
|
25
25
|
Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
26
|
-
`)}}class
|
26
|
+
`)}}class tR extends Error{constructor(){super(`The request.page has been deprecated in favour of \`URLPattern\`.
|
27
27
|
Read more: https://nextjs.org/docs/messages/middleware-request-page
|
28
|
-
`)}}class
|
28
|
+
`)}}class tO extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function.
|
29
29
|
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
30
|
-
`)}}var tj=r("./dist/esm/server/web/spec-extension/cookies.js");let tk=Symbol("internal request");class tI extends Request{constructor(e,t={}){let r="string"!=typeof e&&"url"in e?e.url:String(e);tm(r),t.body&&"half"!==t.duplex&&(t.duplex="half"),e instanceof Request?super(e,t):super(r,t);let n=new tS(r,{headers:tf(this.headers),nextConfig:t.nextConfig});this[tk]={cookies:new tj.tm(this.headers),nextUrl:n,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?r:n.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[tk].cookies}get nextUrl(){return this[tk].nextUrl}get page(){throw new tA}get ua(){throw new tN}get url(){return this[tk].url}}let tM=e=>!0,tq=e=>!0,tL="ResponseAborted";class t$ extends Error{constructor(...e){super(...e),this.name=tL}}function tH(e){let t=new AbortController;return e.once("close",()=>{e.writableFinished||t.abort(new t$)}),t}class tF{static fromBaseNextRequest(e,t){if(tM(e))return tF.fromNodeNextRequest(e,t);throw Object.defineProperty(Error("Invariant: Unsupported NextRequest type"),"__NEXT_ERROR_CODE",{value:"E345",enumerable:!1,configurable:!0})}static fromNodeNextRequest(e,t){let r,n=null;if("GET"!==e.method&&"HEAD"!==e.method&&e.body&&(n=e.body),e.url.startsWith("http"))r=new URL(e.url);else{let t=et(e,"initURL");r=t&&t.startsWith("http")?new URL(e.url,t):new URL(e.url,"http://n")}return new tI(r,{method:e.method,headers:th(e.headers),duplex:"half",signal:t,...t.aborted?{}:{body:n}})}static fromWebNextRequest(e){let t=null;return"GET"!==e.method&&"HEAD"!==e.method&&(t=e.body),new tI(e.url,{method:e.method,headers:th(e.headers),duplex:"half",signal:e.request.signal,...e.request.signal.aborted?{}:{body:t}})}}let tz=0,tU=0,tX=0;function tW(e){return(null==e?void 0:e.name)==="AbortError"||(null==e?void 0:e.name)===tL}async function tB(e,t,r){try{let{errored:n,destroyed:i}=t;if(n||i)return;let a=tH(t),s=function(e,t){let r=!1,n=new te;function i(){n.resolve()}e.on("drain",i),e.once("close",()=>{e.off("drain",i),n.resolve()});let a=new te;return e.once("finish",()=>{a.resolve()}),new WritableStream({write:async t=>{if(!r){if(r=!0,"performance"in globalThis&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX){let e=function(e={}){let t=0===tz?void 0:{clientComponentLoadStart:tz,clientComponentLoadTimes:tU,clientComponentLoadCount:tX};return e.reset&&(tz=0,tU=0,tX=0),t}();e&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,{start:e.clientComponentLoadStart,end:e.clientComponentLoadStart+e.clientComponentLoadTimes})}e.flushHeaders(),(0,ta.getTracer)().trace(ts.Fx.startResponse,{spanName:"start response"},()=>void 0)}try{let r=e.write(t);"flush"in e&&"function"==typeof e.flush&&e.flush(),r||(await n.promise,n=new te)}catch(t){throw e.end(),Object.defineProperty(Error("failed to write chunk to response",{cause:t}),"__NEXT_ERROR_CODE",{value:"E321",enumerable:!1,configurable:!0})}},abort:t=>{e.writableFinished||e.destroy(t)},close:async()=>{if(t&&await t,!e.writableFinished)return e.end(),a.promise}})}(t,r);await e.pipeTo(s,{signal:a.signal})}catch(e){if(tW(e))return;throw Object.defineProperty(Error("failed to pipe response",{cause:e}),"__NEXT_ERROR_CODE",{value:"E180",enumerable:!1,configurable:!0})}}class tG{static fromStatic(e){return new tG(e,{metadata:{}})}constructor(e,{contentType:t,waitUntil:r,metadata:n}){this.response=e,this.contentType=t,this.metadata=n,this.waitUntil=r}assignMetadata(e){Object.assign(this.metadata,e)}get isNull(){return null===this.response}get isDynamic(){return"string"!=typeof this.response}toUnchunkedBuffer(e=!1){if(null===this.response)throw Object.defineProperty(Error("Invariant: null responses cannot be unchunked"),"__NEXT_ERROR_CODE",{value:"E274",enumerable:!1,configurable:!0});if("string"!=typeof this.response){if(!e)throw Object.defineProperty(Error("Invariant: dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E81",enumerable:!1,configurable:!0});return tc(this.readable)}return Buffer.from(this.response)}toUnchunkedString(e=!1){if(null===this.response)throw Object.defineProperty(Error("Invariant: null responses cannot be unchunked"),"__NEXT_ERROR_CODE",{value:"E274",enumerable:!1,configurable:!0});if("string"!=typeof this.response){if(!e)throw Object.defineProperty(Error("Invariant: dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E81",enumerable:!1,configurable:!0});return td(this.readable)}return this.response}get readable(){if(null===this.response)throw Object.defineProperty(Error("Invariant: null responses cannot be streamed"),"__NEXT_ERROR_CODE",{value:"E14",enumerable:!1,configurable:!0});if("string"==typeof this.response)throw Object.defineProperty(Error("Invariant: static responses cannot be streamed"),"__NEXT_ERROR_CODE",{value:"E151",enumerable:!1,configurable:!0});return Buffer.isBuffer(this.response)?tu(this.response):Array.isArray(this.response)?function(...e){if(0===e.length)throw Object.defineProperty(Error("Invariant: chainStreams requires at least one stream"),"__NEXT_ERROR_CODE",{value:"E437",enumerable:!1,configurable:!0});if(1===e.length)return e[0];let{readable:t,writable:r}=new TransformStream,n=e[0].pipeTo(r,{preventClose:!0}),i=1;for(;i<e.length-1;i++){let t=e[i];n=n.then(()=>t.pipeTo(r,{preventClose:!0}))}let a=e[i];return(n=n.then(()=>a.pipeTo(r))).catch(to),t}(...this.response):this.response}chain(e){var t;let r;if(null===this.response)throw Object.defineProperty(Error("Invariant: response is null. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E258",enumerable:!1,configurable:!0});"string"==typeof this.response?r=[(t=this.response,new ReadableStream({start(e){e.enqueue(tl.encode(t)),e.close()}}))]:Array.isArray(this.response)?r=this.response:Buffer.isBuffer(this.response)?r=[tu(this.response)]:r=[this.response],r.push(e),this.response=r}async pipeTo(e){try{await this.readable.pipeTo(e,{preventClose:!0}),this.waitUntil&&await this.waitUntil,await e.close()}catch(t){if(tW(t)){await e.abort(t);return}throw t}}async pipeToNodeResponse(e){await tB(this.readable,e,this.waitUntil)}}var tV=/*#__PURE__*/function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({});async function tK(e){var t,r;return{...e,value:(null==(t=e.value)?void 0:t.kind)===tn.PAGES?{kind:tn.PAGES,html:await e.value.html.toUnchunkedString(!0),pageData:e.value.pageData,headers:e.value.headers,status:e.value.status}:(null==(r=e.value)?void 0:r.kind)===tn.APP_PAGE?{kind:tn.APP_PAGE,html:await e.value.html.toUnchunkedString(!0),postponed:e.value.postponed,rscData:e.value.rscData,headers:e.value.headers,status:e.value.status,segmentData:e.value.segmentData}:e.value}}async function tJ(e){var t,r;return e?{isMiss:e.isMiss,isStale:e.isStale,cacheControl:e.cacheControl,isFallback:e.isFallback,value:(null==(t=e.value)?void 0:t.kind)===tn.PAGES?{kind:tn.PAGES,html:tG.fromStatic(e.value.html),pageData:e.value.pageData,headers:e.value.headers,status:e.value.status}:(null==(r=e.value)?void 0:r.kind)===tn.APP_PAGE?{kind:tn.APP_PAGE,html:tG.fromStatic(e.value.html),rscData:e.value.rscData,headers:e.value.headers,status:e.value.status,postponed:e.value.postponed,segmentData:e.value.segmentData}:e.value}:null}class tY{constructor(e){this.batcher=tt.create({cacheKeyFn:({key:e,isOnDemandRevalidate:t})=>`${e}-${t?"1":"0"}`,schedulerFn:tr}),this.minimalMode=e}async get(e,t,r){if(!e)return t({hasResolved:!1,previousCacheEntry:null});let{incrementalCache:n,isOnDemandRevalidate:i=!1,isFallback:a=!1,isRoutePPREnabled:s=!1}=r;return tJ(await this.batcher.batch({key:e,isOnDemandRevalidate:i},async(o,l)=>{var u;if((null==(u=this.previousCacheItem)?void 0:u.key)===o&&this.previousCacheItem.expiresAt>Date.now())return this.previousCacheItem.entry;!function(e){switch(e){case tV.PAGES:return ti.PAGES;case tV.APP_PAGE:return ti.APP_PAGE;case tV.IMAGE:return ti.IMAGE;case tV.APP_ROUTE:return ti.APP_ROUTE;default:throw Object.defineProperty(Error(`Unexpected route kind ${e}`),"__NEXT_ERROR_CODE",{value:"E64",enumerable:!1,configurable:!0})}}(r.routeKind);let c=!1,d=null;try{d=null;let e=await t({hasResolved:c,previousCacheEntry:d,isRevalidating:!0});if(!e)return this.previousCacheItem=void 0,null;let r=await tK({...e,isMiss:!d});if(!r)return this.previousCacheItem=void 0,null;return i||c||(l(r),c=!0),r.cacheControl&&(this.previousCacheItem={key:o,entry:r,expiresAt:Date.now()+1e3}),r}catch(t){if(null==d?void 0:d.cacheControl){let t=Math.min(Math.max(d.cacheControl.revalidate||3,3),30),r=void 0===d.cacheControl.expire?void 0:Math.max(t+3,d.cacheControl.expire);await n.set(e,d.value,{cacheControl:{revalidate:t,expire:r},isRoutePPREnabled:s,isFallback:a})}if(c)return console.error(t),null;throw t}}))}}let tQ="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",tZ=`(${tQ}[.]){3}${tQ}`,t0="(?:[0-9a-fA-F]{1,4})",t1=RegExp(`^((?:${t0}:){7}(?:${t0}|:)|(?:${t0}:){6}(?:${tZ}|:${t0}|:)|(?:${t0}:){5}(?::${tZ}|(:${t0}){1,2}|:)|(?:${t0}:){4}(?:(:${t0}){0,1}:${tZ}|(:${t0}){1,3}|:)|(?:${t0}:){3}(?:(:${t0}){0,2}:${tZ}|(:${t0}){1,4}|:)|(?:${t0}:){2}(?:(:${t0}){0,3}:${tZ}|(:${t0}){1,5}|:)|(?:${t0}:){1}(?:(:${t0}){0,4}:${tZ}|(:${t0}){1,6}|:)|(?::((?::${t0}){0,5}:${tZ}|(?::${t0}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?$`),t4=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,t2=/\/\[[^/]+\](?=\/|$)/;function t3(e,t){return(void 0===t&&(t=!0),e1(e)&&(e=function(e){let t,r,n;for(let i of e.split("/"))if(r=e0.find(e=>i.startsWith(e))){[t,n]=e.split(r,2);break}if(!t||!r||!n)throw Object.defineProperty(Error("Invalid interception route: "+e+". Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>"),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(t=eQ(t),r){case"(.)":n="/"===t?"/"+n:t+"/"+n;break;case"(..)":if("/"===t)throw Object.defineProperty(Error("Invalid interception route: "+e+". Cannot use (..) marker at the root level, use (.) instead."),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});n=t.split("/").slice(0,-1).concat(n).join("/");break;case"(...)":n="/"+n;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Object.defineProperty(Error("Invalid interception route: "+e+". Cannot use (..)(..) marker at the root level or one level up."),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});n=i.slice(0,-2).concat(n).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:t,interceptedRoute:n}}(e).interceptedRoute),t)?t2.test(e):t4.test(e)}let t8=require("next/dist/shared/lib/runtime-config.external.js"),t5=/Mediapartners-Google|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview/i,t9=/Googlebot|Google-PageRenderer|AdsBot-Google|googleweblight|Storebot-Google/i,t6=t5.source;function t7(e){return t9.test(e)||t5.test(e)}function re(e){return t9.test(e)?"dom":t5.test(e)?"html":void 0}function rt(e){let t=e.replace(/\\/g,"/");return t.startsWith("/index/")&&!t3(t)?t.slice(6):"/index"!==t?t:"/"}var rr=r("./dist/compiled/path-to-regexp/index.js");function rn(e,t){let r=[],n=(0,rr.pathToRegexp)(e,r,{delimiter:"/",sensitive:"boolean"==typeof(null==t?void 0:t.sensitive)&&t.sensitive,strict:null==t?void 0:t.strict}),i=(0,rr.regexpToFunction)((null==t?void 0:t.regexModifier)?new RegExp(t.regexModifier(n.source),n.flags):n,r);return(e,n)=>{if("string"!=typeof e)return!1;let a=i(e);if(!a)return!1;if(null==t?void 0:t.removeUnnamedParams)for(let e of r)"number"==typeof e.name&&delete a.params[e.name];return{...n,...a.params}}}function ri(e){return e.replace(/__ESC_COLON_/gi,":")}function ra(e,t,r,n){void 0===r&&(r=[]),void 0===n&&(n=[]);let i={},a=r=>{let n;let a=r.key;switch(r.type){case"header":a=a.toLowerCase(),n=e.headers[a];break;case"cookie":n="cookies"in e?e.cookies[r.key]:em(e.headers)()[r.key];break;case"query":n=t[a];break;case"host":{let{host:t}=(null==e?void 0:e.headers)||{};n=null==t?void 0:t.split(":",1)[0].toLowerCase()}}if(!r.value&&n)return i[function(e){let t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);(n>64&&n<91||n>96&&n<123)&&(t+=e[r])}return t}(a)]=n,!0;if(n){let e=RegExp("^"+r.value+"$"),t=Array.isArray(n)?n.slice(-1)[0].match(e):n.match(e);if(t)return Array.isArray(t)&&(t.groups?Object.keys(t.groups).forEach(e=>{i[e]=t.groups[e]}):"host"===r.type&&t[0]&&(i.host=t[0])),!0}return!1};return!!r.every(e=>a(e))&&!n.some(e=>a(e))&&i}function rs(e,t){if(!e.includes(":"))return e;for(let r of Object.keys(t))e.includes(":"+r)&&(e=e.replace(RegExp(":"+r+"\\*","g"),":"+r+"--ESCAPED_PARAM_ASTERISKS").replace(RegExp(":"+r+"\\?","g"),":"+r+"--ESCAPED_PARAM_QUESTION").replace(RegExp(":"+r+"\\+","g"),":"+r+"--ESCAPED_PARAM_PLUS").replace(RegExp(":"+r+"(?!\\w)","g"),"--ESCAPED_PARAM_COLON"+r));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),(0,rr.compile)("/"+e,{validate:!1})(t).slice(1)}function ro(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function rl(e){return ro(e)?e:Object.defineProperty(Error(!function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}(e)?e+"":function(e){let t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))return"[Circular]";t.add(r)}return r})}(e)),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}class ru{constructor(e){this.provider=e}normalize(e){return this.provider.analyze(e).pathname}}class rc{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").'),"__NEXT_ERROR_CODE",{value:"E458",enumerable:!1,configurable:!0});r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Object.defineProperty(Error("Catch-all must be the last part of the URL."),"__NEXT_ERROR_CODE",{value:"E392",enumerable:!1,configurable:!0});let n=e[0];if(n.startsWith("[")&&n.endsWith("]")){let a=n.slice(1,-1),s=!1;if(a.startsWith("[")&&a.endsWith("]")&&(a=a.slice(1,-1),s=!0),a.startsWith("…"))throw Object.defineProperty(Error("Detected a three-dot character ('…') at ('"+a+"'). Did you mean ('...')?"),"__NEXT_ERROR_CODE",{value:"E147",enumerable:!1,configurable:!0});if(a.startsWith("...")&&(a=a.substring(3),r=!0),a.startsWith("[")||a.endsWith("]"))throw Object.defineProperty(Error("Segment names may not start or end with extra brackets ('"+a+"')."),"__NEXT_ERROR_CODE",{value:"E421",enumerable:!1,configurable:!0});if(a.startsWith("."))throw Object.defineProperty(Error("Segment names may not start with erroneous periods ('"+a+"')."),"__NEXT_ERROR_CODE",{value:"E288",enumerable:!1,configurable:!0});function i(e,r){if(null!==e&&e!==r)throw Object.defineProperty(Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"')."),"__NEXT_ERROR_CODE",{value:"E337",enumerable:!1,configurable:!0});t.forEach(e=>{if(e===r)throw Object.defineProperty(Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E247",enumerable:!1,configurable:!0});if(e.replace(/\W/g,"")===n.replace(/\W/g,""))throw Object.defineProperty(Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E499",enumerable:!1,configurable:!0})}),t.push(r)}if(r){if(s){if(null!=this.restSlugName)throw Object.defineProperty(Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).'),"__NEXT_ERROR_CODE",{value:"E299",enumerable:!1,configurable:!0});i(this.optionalRestSlugName,a),this.optionalRestSlugName=a,n="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").'),"__NEXT_ERROR_CODE",{value:"E300",enumerable:!1,configurable:!0});i(this.restSlugName,a),this.restSlugName=a,n="[...]"}}else{if(s)throw Object.defineProperty(Error('Optional route parameters are not yet supported ("'+e[0]+'").'),"__NEXT_ERROR_CODE",{value:"E435",enumerable:!1,configurable:!0});i(this.slugName,a),this.slugName=a,n="[]"}}this.children.has(n)||this.children.set(n,new rc),this.children.get(n)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}class rd{constructor(e){this.definition=e,t3(e.pathname)&&(this.dynamic=Z(e6(e.pathname)))}get identity(){return this.definition.pathname}get isDynamic(){return void 0!==this.dynamic}match(e){let t=this.test(e);return t?{definition:this.definition,params:t.params}:null}test(e){if(this.dynamic){let t=this.dynamic(e);return t?{params:t}:null}return e===this.definition.pathname?{}:null}}class rh extends rd{get identity(){var e;return`${this.definition.pathname}?__nextLocale=${null==(e=this.definition.i18n)?void 0:e.locale}`}match(e,t){var r,n;let i=this.test(e,t);return i?{definition:this.definition,params:i.params,detectedLocale:(null==t?void 0:null==(r=t.i18n)?void 0:r.detectedLocale)??(null==(n=this.definition.i18n)?void 0:n.locale)}:null}test(e,t){return this.definition.i18n&&(null==t?void 0:t.i18n)?this.definition.i18n.locale&&t.i18n.detectedLocale&&this.definition.i18n.locale!==t.i18n.detectedLocale?null:super.test(t.i18n.pathname):super.test(e)}}class rp{get compilationID(){return this.providers.length}async waitTillReady(){this.waitTillReadyPromise&&(await this.waitTillReadyPromise,delete this.waitTillReadyPromise)}async reload(){let{promise:e,resolve:t,reject:r}=new te;this.waitTillReadyPromise=e;let n=this.compilationID;try{let e=[],t=await Promise.all(this.providers.map(e=>e.matchers())),r=new Map,i={};for(let n of t)for(let t of n){t.duplicated&&delete t.duplicated;let n=r.get(t.definition.pathname);if(n){let e=i[t.definition.pathname]??[n];e.push(t),i[t.definition.pathname]=e,n.duplicated=e,t.duplicated=e}e.push(t),r.set(t.definition.pathname,t)}if(this.matchers.duplicates=i,this.previousMatchers.length===e.length&&this.previousMatchers.every((t,r)=>t===e[r]))return;this.previousMatchers=e,this.matchers.static=e.filter(e=>!e.isDynamic);let a=e.filter(e=>e.isDynamic),s=new Map,o=[];for(let e=0;e<a.length;e++){let t=a[e].definition.pathname,r=s.get(t)??[];r.push(e),1===r.length&&(s.set(t,r),o.push(t))}let l=function(e){let t=new rc;return e.forEach(e=>t.insert(e)),t.smoosh()}(o),u=[];for(let e of l){let t=s.get(e);if(!Array.isArray(t))throw Object.defineProperty(Error("Invariant: expected to find identity in indexes map"),"__NEXT_ERROR_CODE",{value:"E271",enumerable:!1,configurable:!0});let r=t.map(e=>a[e]);u.push(...r)}if(this.matchers.dynamic=u,this.compilationID!==n)throw Object.defineProperty(Error("Invariant: expected compilation to finish before new matchers were added, possible missing await"),"__NEXT_ERROR_CODE",{value:"E242",enumerable:!1,configurable:!0})}catch(e){r(e)}finally{this.lastCompilationID=n,t()}}push(e){this.providers.push(e)}async test(e,t){return null!==await this.match(e,t)}async match(e,t){for await(let r of this.matchAll(e,t))return r;return null}validate(e,t,r){var n;return t instanceof rh?t.match(e,r):(null==(n=r.i18n)?void 0:n.inferredFromDefault)?t.match(r.i18n.pathname):t.match(e)}async *matchAll(e,t){if(this.lastCompilationID!==this.compilationID)throw Object.defineProperty(Error("Invariant: expected routes to have been loaded before match"),"__NEXT_ERROR_CODE",{value:"E235",enumerable:!1,configurable:!0});if(!t3(e=eY(e)))for(let r of this.matchers.static){let n=this.validate(e,r,t);n&&(yield n)}if(null==t?void 0:t.skipDynamic)return null;for(let r of this.matchers.dynamic){let n=this.validate(e,r,t);n&&(yield n)}return null}constructor(){this.providers=[],this.matchers={static:[],dynamic:[],duplicates:{}},this.lastCompilationID=this.compilationID,this.previousMatchers=[]}}class rf{constructor(e=[]){this.normalizers=e}push(e){this.normalizers.push(e)}normalize(e){return this.normalizers.reduce((e,t)=>t.normalize(e),e)}}var rm=r("./dist/esm/shared/lib/isomorphic/path.js"),rg=/*#__PURE__*/r.n(rm);class rv{constructor(...e){this.prefix=rg().posix.join(...e)}normalize(e){return rg().posix.join(this.prefix,e)}}function ry(e){let t=/^\/index(\/|$)/.test(e)&&!t3(e)?"/index"+e:"/"===e?"/index":eY(e);{let{posix:e}=r("path"),n=e.normalize(t);if(n!==t)throw new J("Requested and resolved page mismatch: "+t+" "+n)}return t}class rb extends rv{constructor(){super("app")}normalize(e){return super.normalize(ry(e))}}class rE extends rv{constructor(e){super(e,eu)}normalize(e){return super.normalize(e)}}function r_(e){return{normalize:e}}class rR{normalize(e){return e.replace(/%5F/g,"_")}}class rw extends rf{constructor(){super([r_(eQ),new rR])}normalize(e){return super.normalize(e)}}class rx{constructor(e){this.filename=new rE(e),this.pathname=new rw,this.bundlePath=new rb}}class rC extends rd{get identity(){return`${this.definition.pathname}?__nextPage=${this.definition.page}`}}class rP{constructor(e){this.loader=e,this.cached=[]}async matchers(){let e=await this.loader.load();if(!e)return[];if(this.data&&this.loader.compare(this.data,e))return this.cached;this.data=e;let t=await this.transform(e);return this.cached=t,t}}class rO extends rP{constructor(e,t){super({load:async()=>t.load(e),compare:(e,t)=>e===t})}}class rT extends rO{constructor(e,t){super(el,t),this.normalizers=new rx(e)}async transform(e){let t=Object.keys(e).filter(e=>e.endsWith("/page")),r={};for(let e of t){let t=this.normalizers.pathname.normalize(e);t in r?r[t].push(e):r[t]=[e]}let n=[];for(let[t,i]of Object.entries(r)){let r=i[0],a=this.normalizers.filename.normalize(e[r]),s=this.normalizers.bundlePath.normalize(r);n.push(new rC({kind:tV.APP_PAGE,pathname:t,page:r,bundlePath:s,filename:a,appPaths:i}))}return n}}class rS extends rd{}class rD extends rO{constructor(e,t){super(el,t),this.normalizers=new rx(e)}async transform(e){let t=Object.keys(e).filter(e=>e.endsWith("/route")),r=[];for(let n of t){let t=this.normalizers.filename.normalize(e[n]),i=this.normalizers.pathname.normalize(n),a=this.normalizers.bundlePath.normalize(n);r.push(new rS({kind:tV.APP_ROUTE,pathname:i,page:n,bundlePath:a,filename:t}))}return r}}function rA(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}class rN extends rd{}class rj extends rh{}class rk extends rf{constructor(){super([r_(ry),new rv("pages")])}normalize(e){return super.normalize(e)}}class rI extends rv{constructor(e){super(e,eu)}normalize(e){return super.normalize(e)}}class rM{constructor(e){this.filename=new rI(e),this.bundlePath=new rk}}class rq extends rO{constructor(e,t,r){super(eo,t),this.i18nProvider=r,this.normalizers=new rM(e)}async transform(e){let t=Object.keys(e).filter(e=>rA(e)),r=[];for(let n of t)if(this.i18nProvider){let{detectedLocale:t,pathname:i}=this.i18nProvider.analyze(n);r.push(new rj({kind:tV.PAGES_API,pathname:i,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n]),i18n:{locale:t}}))}else r.push(new rN({kind:tV.PAGES_API,pathname:n,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n])}));return r}}class rL extends rd{}class r$ extends rh{}class rH extends rO{constructor(e,t,r){super(eo,t),this.i18nProvider=r,this.normalizers=new rM(e)}async transform(e){let t=Object.keys(e).filter(e=>!rA(e)).filter(e=>{var t;let r=(null==(t=this.i18nProvider)?void 0:t.analyze(e).pathname)??e;return!ec.includes(r)}),r=[];for(let n of t)if(this.i18nProvider){let{detectedLocale:t,pathname:i}=this.i18nProvider.analyze(n);r.push(new r$({kind:tV.PAGES,pathname:i,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n]),i18n:{locale:t}}))}else r.push(new rL({kind:tV.PAGES,pathname:n,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n])}));return r}}class rF{constructor(e){this.getter=e}load(e){return this.getter(e)}}class rz{constructor(e){var t;if(this.config=e,!e.locales.length)throw Object.defineProperty(Error("Invariant: No locales provided"),"__NEXT_ERROR_CODE",{value:"E510",enumerable:!1,configurable:!0});this.lowerCaseLocales=e.locales.map(e=>e.toLowerCase()),this.lowerCaseDomains=null==(t=e.domains)?void 0:t.map(e=>{var t;let r=e.domain.toLowerCase();return{defaultLocale:e.defaultLocale.toLowerCase(),hostname:r.split(":",1)[0],domain:r,locales:null==(t=e.locales)?void 0:t.map(e=>e.toLowerCase()),http:e.http}})}detectDomainLocale(e,t){if(e&&this.lowerCaseDomains&&this.config.domains){t&&(t=t.toLowerCase());for(let n=0;n<this.lowerCaseDomains.length;n++){var r;let i=this.lowerCaseDomains[n];if(i.hostname===e||(null==(r=i.locales)?void 0:r.some(e=>e===t)))return this.config.domains[n]}}}fromRequest(e,t){let r=et(e,"locale");if(r){let e=this.analyze(t);if(e.detectedLocale){if(e.detectedLocale!==r)throw Object.defineProperty(Error(`Invariant: The detected locale does not match the locale in the query. Expected to find '${r}' in '${t}' but found '${e.detectedLocale}'}`),"__NEXT_ERROR_CODE",{value:"E517",enumerable:!1,configurable:!0});t=e.pathname}}return{pathname:t,detectedLocale:r,inferredFromDefault:et(e,"localeInferredFromDefault")??!1}}analyze(e,t={}){let r=t.defaultLocale,n="string"==typeof r,i=e.split("/",2);if(!i[1])return{detectedLocale:r,pathname:e,inferredFromDefault:n};let a=i[1].toLowerCase(),s=this.lowerCaseLocales.indexOf(a);return s<0||(r=this.config.locales[s],n=!1,e=e.slice(r.length+1)||"/"),{detectedLocale:r,pathname:e,inferredFromDefault:n}}}async function rU(e,t,r,n){if(tq(t)){var i;t.statusCode=r.status,t.statusMessage=r.statusText;let a=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(i=r.headers)||i.forEach((e,r)=>{if("x-middleware-set-cookie"!==r.toLowerCase()){if("set-cookie"===r.toLowerCase())for(let n of tp(e))t.appendHeader(r,n);else{let n=void 0!==t.getHeader(r);(a.includes(r.toLowerCase())||!n)&&t.appendHeader(r,e)}}});let{originalResponse:s}=t;r.body&&"HEAD"!==e.method?await tB(r.body,s,n):s.end()}}let rX=rn("/_next/data/:path*");function rW(e){return e.split("/").map(e=>{try{e=decodeURIComponent(e).replace(RegExp("([/#?]|%(2f|23|3f|5c))","gi"),e=>encodeURIComponent(e))}catch(e){throw Object.defineProperty(new K("Failed to decode path param(s)."),"__NEXT_ERROR_CODE",{value:"E539",enumerable:!1,configurable:!0})}return e}).join("/")}class rB{constructor(e){this.suffix=e}match(e){return!!e.endsWith(this.suffix)}normalize(e,t){return t||this.match(e)?e.substring(0,e.length-this.suffix.length):e}}class rG extends rB{constructor(){super(ex.RM)}}function rV(e){for(let t of eA)delete e[t.toLowerCase()]}function rK(e){return e.definition.kind===tV.APP_PAGE}function rJ(e){return e.definition.kind===tV.PAGES}class rY extends rB{constructor(){super(ex.pu)}match(e){return e==="/__index"+ex.pu||super.match(e)}normalize(e,t){return e==="/__index"+ex.pu?"/":super.normalize(e,t)}}class rQ{constructor(e){if(this.prefix=e,e.endsWith("/"))throw Object.defineProperty(Error(`PrefixPathnameNormalizer: prefix "${e}" should not end with a slash`),"__NEXT_ERROR_CODE",{value:"E219",enumerable:!1,configurable:!0})}match(e){return!!(e===this.prefix||e.startsWith(this.prefix+"/"))}normalize(e,t){return t||this.match(e)?e.length===this.prefix.length?"/":e.substring(this.prefix.length):e}}class rZ{constructor(e){if(this.suffix=new rB(".json"),!e)throw Object.defineProperty(Error("Invariant: buildID is required"),"__NEXT_ERROR_CODE",{value:"E200",enumerable:!1,configurable:!0});this.prefix=new rQ(`/_next/data/${e}`)}match(e){return this.prefix.match(e)&&this.suffix.match(e)}normalize(e,t){return t||this.match(e)?(e=this.prefix.normalize(e,!0),rt(e=this.suffix.normalize(e,!0))):e}}function r0(e){return e.replace(/(?:\/index)?\/?$/,"")||"/"}let r1=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0}),r4="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage,r2=Symbol.for("@next/request-context");Symbol("response"),Symbol("passThrough"),Symbol("waitUntil");var r3=r("./dist/esm/server/web/spec-extension/adapters/reflect.js");let r8=Symbol("internal response"),r5=new Set([301,302,303,307,308]);function r9(e,t){var r;if(null==e?void 0:null==(r=e.request)?void 0:r.headers){if(!(e.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 r=[];for(let[n,i]of e.request.headers)t.set("x-middleware-request-"+n,i),r.push(n);t.set("x-middleware-override-headers",r.join(","))}}class r6 extends Response{constructor(e,t={}){super(e,t);let r=this.headers,n=new Proxy(new tj.VO(r),{get(e,n,i){switch(n){case"delete":case"set":return(...i)=>{let a=Reflect.apply(e[n],e,i),s=new Headers(r);return a instanceof tj.VO&&r.set("x-middleware-set-cookie",a.getAll().map(e=>(0,tj.Ud)(e)).join(",")),r9(t,s),a};default:return r3.l.get(e,n,i)}}});this[r8]={cookies:n,url:t.url?new tS(t.url,{headers:tf(r),nextConfig:t.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[r8].cookies}static json(e,t){let r=Response.json(e,t);return new r6(r.body,r)}static redirect(e,t){let r="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!r5.has(r))throw Object.defineProperty(RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,configurable:!0});let n="object"==typeof t?t:{},i=new Headers(null==n?void 0:n.headers);return i.set("Location",tm(e)),new r6(null,{...n,headers:i,status:r})}static rewrite(e,t){let r=new Headers(null==t?void 0:t.headers);return r.set("x-middleware-rewrite",tm(e)),r9(t,r),new r6(null,{...t,headers:r})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),r9(e,t),new r6(null,{...e,headers:t})}}r("./dist/esm/server/web/spec-extension/adapters/headers.js");class r7 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 r7}}Symbol.for("next.mutated.cookies"),r("./dist/compiled/p-queue/index.js"),require("next/dist/server/app-render/after-task-async-storage.external.js");class ne extends tI{constructor(e){super(e.input,e.init),this.sourcePage=e.page}get request(){throw Object.defineProperty(new tD({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}respondWith(){throw Object.defineProperty(new tD({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}waitUntil(){throw Object.defineProperty(new tD({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}}function nt(e){return e.isOnDemandRevalidate?"on-demand":e.isRevalidate?"stale":void 0}var nr=/*#__PURE__*/function(e){return e.BLOCKING_STATIC_RENDER="BLOCKING_STATIC_RENDER",e.PRERENDER="PRERENDER",e.NOT_FOUND="NOT_FOUND",e}({});let nn=RegExp(`^(/.*)${ex.mH}(/.*)${ex.tz}$`);class ni{match(e){return nn.test(e)}extract(e){let t=e.match(nn);return t?{originalPathname:t[1],segmentPath:t[2]}:null}normalize(e){let t=this.extract(e);return t?t.originalPathname:e}}let na=require("next/dist/server/lib/incremental-cache/tags-manifest.external.js"),ns=new eq(0x3200000,e=>e.size),no=new Map,nl={async get(e,t){await no.get(e);let r=ns.get(e);if(!r)return;let n=r.entry;if(performance.timeOrigin+performance.now()>n.timestamp+1e3*n.revalidate||(0,na.isTagStale)(n.tags,n.timestamp)||(0,na.isTagStale)(t,n.timestamp))return;let[i,a]=n.value.tee();return n.value=a,{...n,value:i}},async set(e,t){let r=()=>{},n=new Promise(e=>{r=e});no.set(e,n);let i=await t,a=0;try{let[t,r]=i.value.tee();i.value=t;let n=r.getReader();for(let e;!(e=await n.read()).done;)a+=Buffer.from(e.value).byteLength;ns.set(e,{entry:i,isErrored:!1,errorRetryCount:0,size:a})}catch{}finally{r(),no.delete(e)}},async expireTags(...e){for(let t of e)na.tagsManifest.items[t]||(na.tagsManifest.items[t]={}),na.tagsManifest.items[t].revalidatedAt=Date.now()},async receiveExpiredTags(...e){return this.expireTags(...e)}},nu=process.env.NEXT_PRIVATE_DEBUG_USE_CACHE?(e,...t)=>{console.log(`use-cache[${process.pid}]: ${e}`,...t)}:()=>{},nc=Symbol.for("@next/cache-handlers"),nd=Symbol.for("@next/cache-handlers-map"),nh=Symbol.for("@next/cache-handlers-set"),np=globalThis;function nf(){if(np[nh])return np[nh].values()}class nm extends Error{}class ng extends Error{constructor(e){super(),this.innerError=e}}class nv{getServerComponentsHmrCache(){return this.nextConfig.experimental.serverComponentsHmrCache?globalThis.__serverComponentsHmrCache:void 0}constructor(e){var t,n,i;this.handleRSCRequest=(e,t,r)=>{var n,i,a;if(!r.pathname)return!1;if(null==(n=this.normalizers.segmentPrefetchRSC)?void 0:n.match(r.pathname)){let t=this.normalizers.segmentPrefetchRSC.extract(r.pathname);if(!t)return!1;let{originalPathname:n,segmentPath:i}=t;r.pathname=n,e.headers["RSC".toLowerCase()]="1",e.headers[eT.toLowerCase()]="1",e.headers[eS.toLowerCase()]=i,er(e,"isRSCRequest",!0),er(e,"isPrefetchRSCRequest",!0),er(e,"segmentPrefetchRSCRequest",i)}else if(null==(i=this.normalizers.prefetchRSC)?void 0:i.match(r.pathname))r.pathname=this.normalizers.prefetchRSC.normalize(r.pathname,!0),e.headers["RSC".toLowerCase()]="1",e.headers[eT.toLowerCase()]="1",er(e,"isRSCRequest",!0),er(e,"isPrefetchRSCRequest",!0);else if(null==(a=this.normalizers.rsc)?void 0:a.match(r.pathname))r.pathname=this.normalizers.rsc.normalize(r.pathname,!0),e.headers["RSC".toLowerCase()]="1",er(e,"isRSCRequest",!0);else if(e.headers["x-now-route-matches"])return rV(e.headers),!1;else if("1"!==e.headers.rsc)return!1;else if(er(e,"isRSCRequest",!0),"1"===e.headers[eT.toLowerCase()]){er(e,"isPrefetchRSCRequest",!0);let t=e.headers[eS.toLowerCase()];"string"==typeof t&&er(e,"segmentPrefetchRSCRequest",t)}if(e.url){let t=(0,c.parse)(e.url);t.pathname=r.pathname,e.url=(0,c.format)(t)}return!1},this.handleNextDataRequest=async(e,t,r)=>{let n=await this.getMiddleware(),i=function(e){return"string"==typeof e&&rX(e)}(r.pathname);if(!i||!i.path)return!1;if(i.path[0]!==this.buildId)return!et(e,"middlewareInvoke")&&(await this.render404(e,t,r),!0);i.path.shift();let a=i.path[i.path.length-1];if("string"!=typeof a||!a.endsWith(".json"))return await this.render404(e,t,r),!0;let s=`/${i.path.join("/")}`;if(s=function(e,t){return void 0===t&&(t=""),e=e.replace(/\\/g,"/"),(e=t&&e.endsWith(t)?e.slice(0,-t.length):e).startsWith("/index/")&&!t3(e)?e=e.slice(6):"/index"===e&&(e="/"),e}(s,".json"),n&&(this.nextConfig.trailingSlash&&!s.endsWith("/")&&(s+="/"),!this.nextConfig.trailingSlash&&s.length>1&&s.endsWith("/")&&(s=s.substring(0,s.length-1))),this.i18nProvider){var o;let i=null==e?void 0:null==(o=e.headers.host)?void 0:o.split(":",1)[0].toLowerCase(),a=this.i18nProvider.detectDomainLocale(i),l=(null==a?void 0:a.defaultLocale)??this.i18nProvider.config.defaultLocale,u=this.i18nProvider.analyze(s);if(u.detectedLocale&&(s=u.pathname),er(e,"locale",u.detectedLocale),er(e,"defaultLocale",l),u.detectedLocale||en(e,"localeInferredFromDefault"),!u.detectedLocale&&!n)return er(e,"locale",l),await this.render404(e,t,r),!0}return r.pathname=s,er(e,"isNextDataReq",!0),!1},this.handleNextImageRequest=()=>!1,this.handleCatchallRenderRequest=()=>!1,this.handleCatchallMiddlewareRequest=()=>!1,this.normalize=e=>{let t=[];for(let r of(this.normalizers.data&&t.push(this.normalizers.data),this.normalizers.segmentPrefetchRSC&&t.push(this.normalizers.segmentPrefetchRSC),this.normalizers.prefetchRSC&&t.push(this.normalizers.prefetchRSC),this.normalizers.rsc&&t.push(this.normalizers.rsc),t))if(r.match(e))return r.normalize(e,!0);return e},this.normalizeAndAttachMetadata=async(e,t,r)=>{let n=await this.handleNextImageRequest(e,t,r);return!!(n||this.enabledDirectories.pages&&(n=await this.handleNextDataRequest(e,t,r)))},this.prepared=!1,this.preparedPromise=null,this.customErrorNo404Warn=function(e){let t,r=!1;return function(){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];return r||(r=!0,t=e(...i)),t}}(()=>{eX(`You have added a custom /_error page without a custom /404 page. This prevents the 404 page from being auto statically optimized.
|
31
|
-
See here for info: https://nextjs.org/docs/messages/custom-error-no-custom-404`)});let{dir:a=".",quiet:s=!1,conf:o,dev:l=!1,minimalMode:u=!1,hostname:d,port:h,experimentalTestProxy:p}=e;this.experimentalTestProxy=p,this.serverOptions=e,this.dir=r("path").resolve(a),this.quiet=s,this.loadEnvConfig({dev:l}),this.nextConfig=o,this.hostname=d,this.hostname&&(this.fetchHostname=function(e){return t1.test(e)?`[${e}]`:e}(this.hostname)),this.port=h,this.distDir=r("path").join(this.dir,this.nextConfig.distDir),this.publicDir=this.getPublicDir(),this.hasStaticDir=!u&&this.getHasStaticDir(),this.i18nProvider=(null==(t=this.nextConfig.i18n)?void 0:t.locales)?new rz(this.nextConfig.i18n):void 0,this.localeNormalizer=this.i18nProvider?new ru(this.i18nProvider):void 0;let{serverRuntimeConfig:f={},publicRuntimeConfig:m,assetPrefix:g,generateEtags:v}=this.nextConfig;this.buildId=this.getBuildId(),this.minimalMode=u||!!process.env.NEXT_PRIVATE_MINIMAL_MODE,this.enabledDirectories=this.getEnabledDirectories(l),this.isAppPPREnabled=this.enabledDirectories.app&&function(e){return void 0!==e&&("boolean"==typeof e?e:"incremental"===e)}(this.nextConfig.experimental.ppr),this.isAppSegmentPrefetchEnabled=this.enabledDirectories.app&&!0===this.nextConfig.experimental.clientSegmentCache,this.normalizers={rsc:this.enabledDirectories.app?new rG:void 0,prefetchRSC:this.isAppPPREnabled?new rY:void 0,segmentPrefetchRSC:this.isAppSegmentPrefetchEnabled?new ni:void 0,data:this.enabledDirectories.pages?new rZ(this.buildId):void 0},this.nextFontManifest=this.getNextFontManifest(),process.env.NEXT_DEPLOYMENT_ID=this.nextConfig.deploymentId||"",this.renderOpts={supportsDynamicResponse:!0,trailingSlash:this.nextConfig.trailingSlash,deploymentId:this.nextConfig.deploymentId,strictNextHead:this.nextConfig.experimental.strictNextHead??!0,poweredByHeader:this.nextConfig.poweredByHeader,canonicalBase:this.nextConfig.amp.canonicalBase||"",generateEtags:v,previewProps:this.getPrerenderManifest().preview,ampOptimizerConfig:null==(n=this.nextConfig.experimental.amp)?void 0:n.optimizer,basePath:this.nextConfig.basePath,images:this.nextConfig.images,optimizeCss:this.nextConfig.experimental.optimizeCss,nextConfigOutput:this.nextConfig.output,nextScriptWorkers:this.nextConfig.experimental.nextScriptWorkers,disableOptimizedLoading:this.nextConfig.experimental.disableOptimizedLoading,domainLocales:null==(i=this.nextConfig.i18n)?void 0:i.domains,distDir:this.distDir,serverComponents:this.enabledDirectories.app,cacheLifeProfiles:this.nextConfig.experimental.cacheLife,enableTainting:this.nextConfig.experimental.taint,crossOrigin:this.nextConfig.crossOrigin?this.nextConfig.crossOrigin:void 0,largePageDataBytes:this.nextConfig.experimental.largePageDataBytes,runtimeConfig:Object.keys(m).length>0?m:void 0,isExperimentalCompile:this.nextConfig.experimental.isExperimentalCompile,htmlLimitedBots:this.nextConfig.htmlLimitedBots,experimental:{expireTime:this.nextConfig.expireTime,clientTraceMetadata:this.nextConfig.experimental.clientTraceMetadata,dynamicIO:this.nextConfig.experimental.dynamicIO??!1,clientSegmentCache:this.nextConfig.experimental.clientSegmentCache??!1,inlineCss:this.nextConfig.experimental.inlineCss??!1,authInterrupts:!!this.nextConfig.experimental.authInterrupts},onInstrumentationRequestError:this.instrumentationOnRequestError.bind(this),reactMaxHeadersLength:this.nextConfig.reactMaxHeadersLength},(0,t8.setConfig)({serverRuntimeConfig:f,publicRuntimeConfig:m}),this.pagesManifest=this.getPagesManifest(),this.appPathsManifest=this.getAppPathsManifest(),this.appPathRoutes=this.getAppPathRoutes(),this.interceptionRoutePatterns=this.getinterceptionRoutePatterns(),this.matchers=this.getRouteMatchers(),this.matchers.reload(),this.setAssetPrefix(g),this.responseCache=this.getResponseCache({dev:l})}reloadMatchers(){return this.matchers.reload()}getRouteMatchers(){let e=new rF(e=>{switch(e){case eo:return this.getPagesManifest()??null;case el:return this.getAppPathsManifest()??null;default:return null}}),t=new rp;return t.push(new rH(this.distDir,e,this.i18nProvider)),t.push(new rq(this.distDir,e,this.i18nProvider)),this.enabledDirectories.app&&(t.push(new rT(this.distDir,e)),t.push(new rD(this.distDir,e))),t}async instrumentationOnRequestError(...e){let[t,r,n]=e;if(this.instrumentation)try{await (null==this.instrumentation.onRequestError?void 0:this.instrumentation.onRequestError.call(this.instrumentation,t,{path:r.url||"",method:r.method||"GET",headers:r instanceof ne?Object.fromEntries(r.headers.entries()):r.headers},n))}catch(e){console.error("Error in instrumentation.onRequestError:",e)}}logError(e){this.quiet||eU(e)}async handleRequest(e,t,r){await this.prepare();let n=e.method.toUpperCase(),i=(0,ta.getTracer)();return i.withPropagatedContext(e.headers,()=>i.trace(ts.Li.handleRequest,{spanName:`${n} ${e.url}`,kind:ta.SpanKind.SERVER,attributes:{"http.method":n,"http.target":e.url}},async a=>this.handleRequestImpl(e,t,r).finally(()=>{if(!a)return;let r=et(e,"isRSCRequest")??!1;a.setAttributes({"http.status_code":t.statusCode,"next.rsc":r});let s=i.getRootSpanAttributes();if(!s)return;if(s.get("next.span_type")!==ts.Li.handleRequest){console.warn(`Unexpected root span type '${s.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);return}let o=s.get("next.route");if(o){let e=r?`RSC ${n} ${o}`:`${n} ${o}`;a.setAttributes({"next.route":o,"http.route":o,"next.span_name":e}),a.updateName(e)}else a.updateName(r?`RSC ${n} ${e.url}`:`${n} ${e.url}`)})))}async handleRequestImpl(e,t,r){try{var n,i,a,s,o,l,u,d,h;await this.matchers.waitTillReady(),function(e,t){let r=t.setHeader.bind(t);t.setHeader=(n,i)=>{if("headersSent"in t&&t.headersSent)return t;if("set-cookie"===n.toLowerCase()){let t=et(e,"middlewareCookie");t&&Array.isArray(i)&&i.every((e,r)=>e===t[r])||(i=[...new Set([...t||[],..."string"==typeof i?[i]:Array.isArray(i)?i:[]])])}return r(n,i)}}(e,tq(t)?t.originalResponse:t);let p=(e.url||"").split("?",1)[0];if(null==p?void 0:p.match(/(\\|\/\/)/)){let r=V(e.url);t.redirect(r,308).body(r).send();return}if(!r||"object"!=typeof r){if(!e.url)throw Object.defineProperty(Error("Invariant: url can not be undefined"),"__NEXT_ERROR_CODE",{value:"E123",enumerable:!1,configurable:!0});r=(0,c.parse)(e.url,!0)}if(!r.pathname)throw Object.defineProperty(Error("Invariant: pathname can't be empty"),"__NEXT_ERROR_CODE",{value:"E412",enumerable:!1,configurable:!0});"string"==typeof r.query&&(r.query=Object.fromEntries(new URLSearchParams(r.query)));let{originalRequest:f=null}=tM(e)?e:{},m=null==f?void 0:f.headers["x-forwarded-proto"],g=m?"https"===m:!!(null==f?void 0:null==(n=f.socket)?void 0:n.encrypted);e.headers["x-forwarded-host"]??=e.headers.host??this.hostname,e.headers["x-forwarded-port"]??=this.port?this.port.toString():g?"443":"80",e.headers["x-forwarded-proto"]??=g?"https":"http",e.headers["x-forwarded-for"]??=null==f?void 0:null==(i=f.socket)?void 0:i.remoteAddress,this.attachRequestMeta(e,r);let v=await this.handleRSCRequest(e,t,r);if(v)return;let y=null==(a=this.i18nProvider)?void 0:a.detectDomainLocale(t_(r,e.headers)),b=(null==y?void 0:y.defaultLocale)||(null==(s=this.nextConfig.i18n)?void 0:s.defaultLocale);er(e,"defaultLocale",b);let E=eM(e.url.replace(/^\/+/,"/")),_=tC(E.pathname,{nextConfig:this.nextConfig,i18nProvider:this.i18nProvider});E.pathname=_.pathname,_.basePath&&(e.url=tx(e.url,this.nextConfig.basePath));let R="string"==typeof e.headers[ex.vx];if(R)try{this.enabledDirectories.app&&(e.url.match(/^\/index($|\?)/)&&(e.url=e.url.replace(/^\/index/,"/")),r.pathname="/index"===r.pathname?"/":r.pathname);let{pathname:n}=new URL(e.headers[ex.vx],"http://localhost"),{pathname:i}=new URL(e.url,"http://localhost");if(null==(o=this.normalizers.data)?void 0:o.match(i))er(e,"isNextDataReq",!0);else if(this.isAppPPREnabled&&"1"===e.headers[ex.gs]&&"POST"===e.method){let t=[];for await(let r of e.body)t.push(r);let r=Buffer.concat(t).toString("utf8");er(e,"postponed",r)}n=this.normalize(n);let a=this.stripNextDataPath(i),s=null==(l=this.i18nProvider)?void 0:l.analyze(n,{defaultLocale:b});s&&(er(e,"locale",s.detectedLocale),s.inferredFromDefault?er(e,"localeInferredFromDefault",!0):en(e,"localeInferredFromDefault"));let h=n=rt(n),p=t3(h);if(!p){let e=await this.matchers.match(h,{i18n:s});e&&(h=e.definition.pathname,p=void 0!==e.params)}s&&(n=s.pathname);let f=function({page:e,i18n:t,basePath:r,rewrites:n,pageIsDynamic:i,trailingSlash:a,caseSensitive:s}){let o,l,u;return i&&(u=(l=Z(o=function(e,t){var r,n,i;let a=function(e,t,r,n,i){let a;let s=(a=0,()=>{let e="",t=++a;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),o={},l=[];for(let a of e8(e).slice(1).split("/")){let e=e0.some(e=>a.startsWith(e)),u=a.match(e5);if(e&&u&&u[2])l.push(e7({getSafeRouteKey:s,interceptionMarker:u[1],segment:u[2],routeKeys:o,keyPrefix:t?ex.h:void 0,backreferenceDuplicateKeys:i}));else if(u&&u[2]){n&&u[1]&&l.push("/"+e3(u[1]));let e=e7({getSafeRouteKey:s,segment:u[2],routeKeys:o,keyPrefix:t?ex.AA:void 0,backreferenceDuplicateKeys:i});n&&u[1]&&(e=e.substring(1)),l.push(e)}else l.push("/"+e3(a));r&&u&&u[3]&&l.push(e3(u[3]))}return{namedParameterizedRoute:l.join(""),routeKeys:o}}(e,t.prefixRouteKeys,null!=(r=t.includeSuffix)&&r,null!=(n=t.includePrefix)&&n,null!=(i=t.backreferenceDuplicateKeys)&&i),s=a.namedParameterizedRoute;return t.excludeOptionalTrailingSlash||(s+="(?:/)?"),{...e6(e,t),namedRegex:"^"+s+"$",routeKeys:a.routeKeys}}(e,{prefixRouteKeys:!1})))(e)),{handleRewrites:function(o,u){let c={},d=u.pathname,h=n=>{let h=rn(n.source+(a?"(/)?":""),{removeUnnamedParams:!0,strict:!0,sensitive:!!s});if(!u.pathname)return!1;let p=h(u.pathname);if((n.has||n.missing)&&p){let e=ra(o,u.query,n.has,n.missing);e?Object.assign(p,e):p=!1}if(p){let{parsedDestination:a,destQuery:s}=function(e){let t,r;let n=Object.assign({},e.query);delete n[eN];let i=function(e){let t=e.destination;for(let r of Object.keys({...e.params,...e.query}))r&&(t=t.replace(RegExp(":"+e3(r),"g"),"__ESC_COLON_"+r));let r=eM(t),n=r.pathname;n&&(n=ri(n));let i=r.href;i&&(i=ri(i));let a=r.hostname;a&&(a=ri(a));let s=r.hash;return s&&(s=ri(s)),{...r,pathname:n,hostname:a,href:i,hash:s}}(e),{hostname:a,query:s}=i,o=i.pathname;i.hash&&(o=""+o+i.hash);let l=[],u=[];for(let e of((0,rr.pathToRegexp)(o,u),u))l.push(e.name);if(a){let e=[];for(let t of((0,rr.pathToRegexp)(a,e),e))l.push(t.name)}let c=(0,rr.compile)(o,{validate:!1});for(let[r,n]of(a&&(t=(0,rr.compile)(a,{validate:!1})),Object.entries(s)))Array.isArray(n)?s[r]=n.map(t=>rs(ri(t),e.params)):"string"==typeof n&&(s[r]=rs(ri(n),e.params));let d=Object.keys(e.params).filter(e=>"nextInternalLocale"!==e);if(e.appendParamsToQuery&&!d.some(e=>l.includes(e)))for(let t of d)t in s||(s[t]=e.params[t]);if(e1(o))for(let t of o.split("/")){let r=e0.find(e=>t.startsWith(e));if(r){"(..)(..)"===r?(e.params["0"]="(..)",e.params["1"]="(..)"):e.params["0"]=r;break}}try{let[n,a]=(r=c(e.params)).split("#",2);t&&(i.hostname=t(e.params)),i.pathname=n,i.hash=(a?"#":"")+(a||""),delete i.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw Object.defineProperty(Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match"),"__NEXT_ERROR_CODE",{value:"E329",enumerable:!1,configurable:!0});throw e}return i.query={...n,...i.query},{newUrl:r,destQuery:s,parsedDestination:i}}({appendParamsToQuery:!0,destination:n.destination,params:p,query:u.query});if(a.protocol)return!0;if(Object.assign(c,s,p),Object.assign(u.query,a.query),delete a.query,Object.assign(u,a),!(d=u.pathname))return!1;if(r&&(d=d.replace(RegExp(`^${r}`),"")||"/"),t){let e=tw(d,t.locales);d=e.pathname,u.query.nextInternalLocale=e.detectedLocale||p.nextInternalLocale}if(d===e)return!0;if(i&&l){let e=l(d);if(e)return u.query={...u.query,...e},!0}}return!1};for(let e of n.beforeFiles||[])h(e);if(d!==e){let t=!1;for(let e of n.afterFiles||[])if(t=h(e))break;if(!t&&!(()=>{let t=e8(d||"");return t===e8(e)||(null==l?void 0:l(t))})()){for(let e of n.fallback||[])if(t=h(e))break}}return c},defaultRouteRegex:o,dynamicRouteMatcher:l,defaultRouteMatches:u,getParamsFromRouteMatches:function(e){if(!o)return null;let{groups:t,routeKeys:r}=o;return Z({re:{exec:e=>{let n=Object.fromEntries(new URLSearchParams(e));for(let[e,t]of Object.entries(n)){let r=tg(e);r&&(n[r]=t,delete n[e])}let i={};for(let e of Object.keys(r)){let a=r[e];if(!a)continue;let s=t[a],o=n[e];if(!s.optional&&!o)return null;i[s.pos]=o}return i}},groups:t})(e)||null},normalizeDynamicRouteParams:(e,t)=>o&&u?function(e,t,r,n){let i={};for(let a of Object.keys(t.groups)){let s=e[a];"string"==typeof s?s=eZ(s):Array.isArray(s)&&(s=s.map(eZ));let o=r[a],l=t.groups[a].optional;if((Array.isArray(o)?o.some(e=>Array.isArray(s)?s.some(t=>t.includes(e)):null==s?void 0:s.includes(e)):null==s?void 0:s.includes(o))||void 0===s&&!(l&&n))return{params:{},hasValidParams:!1};l&&(!s||Array.isArray(s)&&1===s.length&&("index"===s[0]||s[0]===`[[...${a}]]`))&&(s=void 0,delete e[a]),s&&"string"==typeof s&&t.groups[a].repeat&&(s=s.split("/")),s&&(i[a]=s)}return{params:i,hasValidParams:!0}}(e,o,u,t):{params:{},hasValidParams:!1},normalizeVercelUrl:(e,t)=>(function(e,t,r){let n=(0,c.parse)(e.url,!0);for(let e of(delete n.search,Object.keys(n.query))){let i=e!==ex.AA&&e.startsWith(ex.AA),a=e!==ex.h&&e.startsWith(ex.h);(i||a||t.includes(e)||r&&Object.keys(r.groups).includes(e))&&delete n.query[e]}e.url=(0,c.format)(n)})(e,t,o),interpolateDynamicPath:(e,t)=>(function(e,t,r){if(!r)return e;for(let n of Object.keys(r.groups)){let i;let{optional:a,repeat:s}=r.groups[n],o=`[${s?"...":""}${n}]`;a&&(o=`[${o}]`);let l=t[n];i=Array.isArray(l)?l.map(e=>e&&encodeURIComponent(e)).join("/"):l?encodeURIComponent(l):"",e=e.replaceAll(o,i)}return e})(e,t,o)}}({pageIsDynamic:p,page:h,i18n:this.nextConfig.i18n,basePath:this.nextConfig.basePath,rewrites:(null==(u=this.getRoutesManifest())?void 0:u.rewrites)||{beforeFiles:[],afterFiles:[],fallback:[]},caseSensitive:!!this.nextConfig.experimental.caseSensitiveRoutes});b&&!_.locale&&(r.pathname=`/${b}${r.pathname}`);let m=r.pathname,g=Object.keys(f.handleRewrites(e,r)),y=m!==r.pathname;y&&r.pathname&&er(e,"rewroteURL",r.pathname);let R={...r.query};for(let[e,t]of Object.entries(r.query)){let n=tg(e);n&&(delete r.query[e],void 0!==t&&(R[n]=t))}if(p){let t={},r=f.normalizeDynamicRouteParams(R,!1);if(!r.hasValidParams&&!t3(a)){let e=null==f.dynamicRouteMatcher?void 0:f.dynamicRouteMatcher.call(f,a);e&&(f.normalizeDynamicRouteParams(e,!1),Object.assign(r.params,e),r.hasValidParams=!0)}if("/index"!==n&&!r.hasValidParams&&!t3(n)){let e=null==f.dynamicRouteMatcher?void 0:f.dynamicRouteMatcher.call(f,n);if(e){let n=f.normalizeDynamicRouteParams(e,!1);n.hasValidParams&&(Object.assign(t,e),r=n)}}r.hasValidParams&&(t=r.params);let i=e.headers["x-now-route-matches"];if("string"==typeof i&&i&&t3(n)&&!r.hasValidParams){let e=f.getParamsFromRouteMatches(i);e&&(r=f.normalizeDynamicRouteParams(e,!0)).hasValidParams&&(t=r.params)}if(!r.hasValidParams&&(r=f.normalizeDynamicRouteParams(R,!0)).hasValidParams&&(t=r.params),!f.defaultRouteMatches||a!==h||r.hasValidParams||f.normalizeDynamicRouteParams({...t},!0).hasValidParams||(t=f.defaultRouteMatches,er(e,"didSetDefaultRouteMatches",!0)),t){n=f.interpolateDynamicPath(h,t),e.url=f.interpolateDynamicPath(e.url,t);let r=et(e,"segmentPrefetchRSCRequest");r&&t3(r,!1)&&(r=f.interpolateDynamicPath(r,t),e.headers[eS.toLowerCase()]=r,er(e,"segmentPrefetchRSCRequest",r))}}if((p||y)&&f.normalizeVercelUrl(e,[...g,...Object.keys((null==(d=f.defaultRouteRegex)?void 0:d.groups)||{})]),r.pathname=n,E.pathname=r.pathname,v=await this.normalizeAndAttachMetadata(e,t,r))return}catch(r){if(r instanceof K||r instanceof J)return t.statusCode=400,this.renderError(null,e,t,"/_error",{});throw r}if(er(e,"isLocaleDomain",!!y),_.locale&&(e.url=(0,c.format)(E),er(e,"didStripLocale",!0)),!et(e,"locale")&&(_.locale?er(e,"locale",_.locale):b&&(er(e,"locale",b),er(e,"localeInferredFromDefault",!0))),!this.serverOptions.webServerConfig&&!et(e,"incrementalCache")){let t="https:";try{t=new URL(et(e,"initURL")||"/","http://n").protocol}catch{}let r=await this.getIncrementalCache({requestHeaders:Object.assign({},e.headers),requestProtocol:t.substring(0,t.length-1)});r.resetRequestCache(),er(e,"incrementalCache",r),globalThis.__incrementalCache=r}let w=nf();if(w){let t=e.headers[ex.vS],r="string"==typeof t?t.split(","):[],n=[];for(let e of w)n.push(e.receiveExpiredTags(...r));n.length>0&&await Promise.all(n)}et(e,"serverComponentsHmrCache")||er(e,"serverComponentsHmrCache",this.getServerComponentsHmrCache());let x=et(e,"invokePath");if(!R&&x){let n=et(e,"invokeStatus");if(n){let i=et(e,"invokeQuery");i&&Object.assign(r.query,i),t.statusCode=n;let a=et(e,"invokeError")||null;return this.renderError(a,e,t,"/_error",r.query)}let i=new URL(x||"/","http://n"),a=tC(i.pathname,{nextConfig:this.nextConfig,parseData:!1});a.locale&&er(e,"locale",a.locale),r.pathname!==i.pathname&&(r.pathname=i.pathname,er(e,"rewroteURL",a.pathname));let s=tw(tx(r.pathname,this.nextConfig.basePath||""),null==(h=this.nextConfig.i18n)?void 0:h.locales);for(let t of(s.detectedLocale&&er(e,"locale",s.detectedLocale),r.pathname=s.pathname,Object.keys(r.query)))delete r.query[t];let o=et(e,"invokeQuery");if(o&&Object.assign(r.query,o),v=await this.normalizeAndAttachMetadata(e,t,r))return;await this.handleCatchallRenderRequest(e,t,r);return}if(et(e,"middlewareInvoke")){if((v=await this.normalizeAndAttachMetadata(e,t,r))||(v=await this.handleCatchallMiddlewareRequest(e,t,r)))return;let n=Error();throw n.result={response:new Response(null,{headers:{"x-middleware-next":"1"}})},n.bubble=!0,n}return!R&&_.basePath&&(r.pathname=tx(r.pathname,_.basePath)),t.statusCode=200,await this.run(e,t,r)}catch(r){if(r instanceof nm)throw r;if(r&&"object"==typeof r&&"ERR_INVALID_URL"===r.code||r instanceof K||r instanceof J)return t.statusCode=400,this.renderError(null,e,t,"/_error",{});throw r}}getRequestHandlerWithMetadata(e){let t=this.getRequestHandler();return(r,n,i)=>(r[ee]=e,t(r,n,i))}getRequestHandler(){return this.handleRequest.bind(this)}setAssetPrefix(e){this.renderOpts.assetPrefix=e?e.replace(/\/$/,""):""}async prepare(){if(!this.prepared)return null===this.preparedPromise&&(this.instrumentation=await this.loadInstrumentationModule(),this.preparedPromise=this.prepareImpl().then(()=>{this.prepared=!0,this.preparedPromise=null})),this.preparedPromise}async prepareImpl(){}async loadInstrumentationModule(){}async close(){}getAppPathRoutes(){let e={};return Object.keys(this.appPathsManifest||{}).forEach(t=>{let r=eQ(t);e[r]||(e[r]=[]),e[r].push(t)}),e}async run(e,t,r){return(0,ta.getTracer)().trace(ts.Li.run,async()=>this.runImpl(e,t,r))}async runImpl(e,t,r){await this.handleCatchallRenderRequest(e,t,r)}async pipe(e,t){return(0,ta.getTracer)().trace(ts.Li.pipe,async()=>this.pipeImpl(e,t))}async pipeImpl(e,t){let r=t.req.headers["user-agent"]||"",n=t7(r),i={...t,renderOpts:{...this.renderOpts,supportsDynamicResponse:!n,botType:re(r),serveStreamingMetadata:function(e,t){let r=RegExp(t||t6,"i");return!!e&&!r.test(e)}(r,this.nextConfig.htmlLimitedBots)}},a=await e(i);if(null===a)return;let{req:s,res:o}=i,l=o.statusCode,{body:u,type:c}=a,{cacheControl:d}=a;if(!o.sent){let{generateEtags:e,poweredByHeader:t,dev:r}=this.renderOpts;r&&(o.setHeader("Cache-Control","no-store, must-revalidate"),d=void 0),d&&void 0===d.expire&&(d.expire=this.nextConfig.expireTime),await this.sendRenderResult(s,o,{result:u,type:c,generateEtags:e,poweredByHeader:t,cacheControl:d}),o.statusCode=l}}async getStaticHTML(e,t){let r={...t,renderOpts:{...this.renderOpts,supportsDynamicResponse:!1}},n=await e(r);return null===n?null:n.body.toUnchunkedString()}async render(e,t,r,n={},i,a=!1){return(0,ta.getTracer)().trace(ts.Li.render,async()=>this.renderImpl(e,t,r,n,i,a))}getWaitUntil(){let e=function(){let e=globalThis[r2];return null==e?void 0:e.get()}();if(e)return e.waitUntil}getInternalWaitUntil(){}async renderImpl(e,t,r,n={},i,a=!1){var s;return r.startsWith("/")||console.warn(`Cannot render page with path "${r}", did you mean "/${r}"?. See more info here: https://nextjs.org/docs/messages/render-no-starting-slash`),this.serverOptions.customServer&&"/index"===r&&!await this.hasPage("/index")&&(r="/"),(s=r,ec.includes(s))?this.render404(e,t,i):this.pipe(e=>this.renderToResponse(e),{req:e,res:t,pathname:r,query:n})}async getStaticPaths({pathname:e}){var t;return{staticPaths:void 0,fallbackMode:function(e){if("string"==typeof e)return"PRERENDER";if(null===e)return"BLOCKING_STATIC_RENDER";if(!1===e)return"NOT_FOUND";if(void 0!==e)throw Object.defineProperty(Error(`Invalid fallback option: ${e}. Fallback option must be a string, null, undefined, or false.`),"__NEXT_ERROR_CODE",{value:"E285",enumerable:!1,configurable:!0})}(null==(t=this.getPrerenderManifest().dynamicRoutes[e])?void 0:t.fallback)}}async renderToResponseWithComponents(e,t){return(0,ta.getTracer)().trace(ts.Li.renderToResponseWithComponents,async()=>this.renderToResponseWithComponentsImpl(e,t))}pathCouldBeIntercepted(e){return e1(e)||this.interceptionRoutePatterns.some(t=>t.test(e))}setVaryHeader(e,t,r,n){let i=`RSC, ${eO}, ${eT}, ${eS}`,a=et(e,"isRSCRequest")??!1,s=!1;r&&this.pathCouldBeIntercepted(n)?(t.appendHeader("vary",`${i}, ${eD}`),s=!0):(r||a)&&t.appendHeader("vary",i),s||delete e.headers[eD]}async renderToResponseWithComponentsImpl({req:e,res:t,pathname:n,renderOpts:i},{components:a,query:s}){var o,l,u,d,h,p,f,m,g,v,y,b;let E,_,R,w;n===ea&&(n="/404");let x="/_error"===n,C="/404"===n||x&&404===t.statusCode,P="/500"===n||x&&500===t.statusCode,O=!0===a.isAppPath,T=!!a.getServerSideProps,S=!!a.getStaticPaths,D=function(e){let t,r;e.headers instanceof Headers?(t=e.headers.get(eP.toLowerCase())??null,r=e.headers.get("content-type")):(t=e.headers[eP.toLowerCase()]??null,r=e.headers["content-type"]??null);let n=!!("POST"===e.method&&"application/x-www-form-urlencoded"===r),i=!!("POST"===e.method&&(null==r?void 0:r.startsWith("multipart/form-data"))),a=!!(void 0!==t&&"string"==typeof t&&"POST"===e.method);return{actionId:t,isURLEncodedAction:n,isMultipartAction:i,isFetchAction:a,isServerAction:!!(a||n||i)}}(e).isServerAction,A=!!(null==(o=a.Component)?void 0:o.getInitialProps),N=!!a.getStaticProps,j=(0,c.parse)(e.url||"").pathname||"/",k=et(e,"rewroteURL")||j;this.setVaryHeader(e,t,O,k);let I=!1,M=t3(a.page),q=this.getPrerenderManifest();if(O&&M){let t=await this.getStaticPaths({pathname:n,page:a.page,isAppPath:O,requestHeaders:e.headers});if(E=t.staticPaths,I=void 0!==(_=t.fallbackMode),"export"===this.nextConfig.output){let e=a.page;if(!E)throw Object.defineProperty(Error(`Page "${e}" is missing exported function "generateStaticParams()", which is required with "output: export" config.`),"__NEXT_ERROR_CODE",{value:"E353",enumerable:!1,configurable:!0});let t=e8(k);if(!E.includes(t))throw Object.defineProperty(Error(`Page "${e}" is missing param "${t}" in "generateStaticParams()", which is required with "output: export" config.`),"__NEXT_ERROR_CODE",{value:"E443",enumerable:!1,configurable:!0})}I&&(S=!0)}I||(null==E?void 0:E.includes(k))||e.headers["x-now-route-matches"]?N=!0:N||=!!q.routes[r0(n)];let $=!!(et(e,"isNextDataReq")||e.headers["x-nextjs-data"]&&this.serverOptions.webServerConfig)&&(N||T),H=et(e,"isPrefetchRSCRequest")??!1,F=et(e,"isRSCRequest")??!1;if(!N&&e.headers["x-middleware-prefetch"]&&!(C||"/_error"===n))return t.setHeader(ex.vx,n),t.setHeader("x-middleware-skip","1"),t.setHeader("cache-control","private, no-cache, no-store, max-age=0, must-revalidate"),t.body("{}").send(),null;N&&e.headers[ex.vx]&&e.url.startsWith("/_next/data")&&(e.url=this.stripNextDataPath(e.url));let z=et(e,"locale"),U=N?null==(l=this.nextConfig.i18n)?void 0:l.defaultLocale:et(e,"defaultLocale");e.headers["x-nextjs-data"]&&(!t.statusCode||200===t.statusCode)&&t.setHeader("x-nextjs-matched-path",`${z?`/${z}`:""}${n}`),a.routeModule&&(R=a.routeModule);let X=this.isAppPPREnabled&&void 0!==R&&rK(R),W="1"===process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING&&void 0!==s.__nextppronly&&X,B=W&&"fallback"===s.__nextppronly,G=X&&((null==(u=q.routes[n]??q.dynamicRoutes[n])?void 0:u.renderingMode)==="PARTIALLY_STATIC"||W&&!0===this.experimentalTestProxy),K=W&&G,J=K&&!1,Y=B&&G,Q=G?et(e,"postponed"):void 0,ee=G&&F&&!H,en=et(e,"segmentPrefetchRSCRequest"),ei="html"===re(e.headers["user-agent"]||"");if(ei&&G&&(N=!1,this.renderOpts.serveStreamingMetadata=!1),!C||$||F||(t.statusCode=404),ed.includes(n)&&(t.statusCode=parseInt(n.slice(1),10)),!D&&!Q&&!C&&!P&&"/_error"!==n&&"HEAD"!==e.method&&"GET"!==e.method&&("string"==typeof a.Component||N))return t.statusCode=405,t.setHeader("Allow",["GET","HEAD"]),t.body("Method Not Allowed").send(),null;if("string"==typeof a.Component)return{type:"html",body:tG.fromStatic(a.Component)};if("amp"in s&&!s.amp&&delete s.amp,!0===i.supportsDynamicResponse){let t=t7(e.headers["user-agent"]||""),r="function"!=typeof(null==(p=a.Document)?void 0:p.getInitialProps)||"__NEXT_BUILTIN_DOCUMENT__"in a.Document;i.supportsDynamicResponse=!N&&!t&&!s.amp&&r}!$&&O&&i.dev&&(i.supportsDynamicResponse=!0);let es=null==(d=this.nextConfig.i18n)?void 0:d.locales,eo=!1;if(T||N||O){let{tryGetPreviewData:n}=r("./dist/esm/server/api-utils/node/try-get-preview-data.js");eo=!1!==n(e,t,this.renderOpts.previewProps,!!this.nextConfig.experimental.multiZoneDraftMode)}O&&!i.dev&&!eo&&N&&F&&!ee&&(!((b=i.runtime)===ex.li.experimentalEdge||b===ex.li.edge)||this.serverOptions.webServerConfig)&&rV(e.headers);let{isOnDemandRevalidate:el,revalidateOnlyGenerated:eu}=(0,ep.Gx)(e,this.renderOpts.previewProps);N&&e.headers[ex.vx]&&(k=j),j=e8(j),k=e8(k),this.localeNormalizer&&(k=this.localeNormalizer.normalize(k)),$&&(k=this.stripNextDataPath(k),j=this.stripNextDataPath(j));let ec=null;eo||!N||i.supportsDynamicResponse||D||Q||ee||(ec=`${z?`/${z}`:""}${("/"===n||"/"===k)&&z?"":k}${s.amp?".amp":""}`),(C||P)&&N&&(ec=`${z?`/${z}`:""}${n}${s.amp?".amp":""}`),ec&&(ec="/index"===(ec=rW(ec))&&"/"===n?"/":ec);let eh="https:";try{eh=new URL(et(e,"initURL")||"/","http://n").protocol}catch{}let em=globalThis.__incrementalCache||await this.getIncrementalCache({requestHeaders:Object.assign({},e.headers),requestProtocol:eh.substring(0,eh.length-1)});em.resetRequestCache();let eg=async({postponed:r,pagesFallback:o=!1,fallbackRouteParams:l})=>{let u,d=!$&&!0===i.dev||!N&&!S||"string"==typeof r||ee,h=(0,c.parse)(e.url||"",!0).query;i.params&&Object.keys(i.params).forEach(e=>{delete h[e]});let p="/"!==j&&this.nextConfig.trailingSlash,f=(0,c.format)({pathname:`${k}${p?"/":""}`,query:h}),m=ei&&G,g={...a,...i,...O?{incrementalCache:em,isRevalidate:N&&!r&&!ee,serverActions:this.nextConfig.experimental.serverActions}:{},isNextDataRequest:$,resolvedUrl:f,locale:z,locales:es,defaultLocale:U,multiZoneDraftMode:this.nextConfig.experimental.multiZoneDraftMode,resolvedAsPath:T||A?(0,c.format)({pathname:`${j}${p?"/":""}`,query:h}):f,experimental:{...i.experimental,isRoutePPREnabled:G},supportsDynamicResponse:d,shouldWaitOnAllReady:m,isOnDemandRevalidate:el,isDraftMode:eo,isServerAction:D,postponed:r,waitUntil:this.getWaitUntil(),onClose:t.onClose.bind(t),onAfterTaskError:void 0,setIsrStatus:this.setIsrStatus};if((K||J)&&(d=!1,g.nextExport=!0,g.supportsDynamicResponse=!1,g.isStaticGeneration=!0,g.isRevalidate=!0,g.isDebugDynamicAccesses=J),R){if(R.definition.kind===tV.APP_ROUTE){var v;if(!tM(e)||!tq(t))throw Object.defineProperty(Error("Invariant: App Route Route Modules cannot be used in the edge runtime"),"__NEXT_ERROR_CODE",{value:"E130",enumerable:!1,configurable:!0});let r={params:i.params,prerenderManifest:q,renderOpts:{experimental:{dynamicIO:g.experimental.dynamicIO,authInterrupts:g.experimental.authInterrupts},supportsDynamicResponse:d,incrementalCache:em,cacheLifeProfiles:null==(v=this.nextConfig.experimental)?void 0:v.cacheLife,isRevalidate:N,waitUntil:this.getWaitUntil(),onClose:t.onClose.bind(t),onAfterTaskError:void 0,onInstrumentationRequestError:this.renderOpts.onInstrumentationRequestError},sharedContext:{buildId:this.buildId}};try{let n=tF.fromNodeNextRequest(e,function(e){let{errored:t,destroyed:r}=e;if(t||r)return AbortSignal.abort(t??new t$);let{signal:n}=tH(e);return n}(t.originalResponse)),i=await R.handle(n,r);e.fetchMetrics=r.renderOpts.fetchMetrics;let a=r.renderOpts.collectedTags;if(N){let e=await i.blob(),t=tf(i.headers);a&&(t[ex.VC]=a),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==r.renderOpts.collectedRevalidate&&!(r.renderOpts.collectedRevalidate>=ex.AR)&&r.renderOpts.collectedRevalidate,s=void 0===r.renderOpts.collectedExpire||r.renderOpts.collectedExpire>=ex.AR?void 0:r.renderOpts.collectedExpire;return{value:{kind:tn.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:s},isFallback:!1}}let s=r.renderOpts.pendingWaitUntil;return s&&r.renderOpts.waitUntil&&(r.renderOpts.waitUntil(s),s=void 0),await rU(e,t,i,r.renderOpts.pendingWaitUntil),null}catch(r){if(await this.instrumentationOnRequestError(r,e,{routerKind:"App Router",routePath:n,routeType:"route",revalidateReason:nt(g)}),N)throw r;return eU(r),await rU(e,t,new Response(null,{status:500})),null}}else if(rJ(R)||rK(R)){if("OPTIONS"===e.method&&!C)return await rU(e,t,new Response(null,{status:400})),null;if(rJ(R)){g.nextFontManifest=this.nextFontManifest,g.clientReferenceManifest=a.clientReferenceManifest;let r=tM(e)?e.originalRequest:e,l=tq(t)?t.originalResponse:t;try{u=await R.render(r,l,{page:n,params:i.params,query:s,renderOpts:g,sharedContext:{buildId:this.buildId,deploymentId:this.nextConfig.deploymentId,customServer:this.serverOptions.customServer||void 0},renderContext:{isFallback:o,isDraftMode:g.isDraftMode,developmentNotFoundSourcePage:et(e,"developmentNotFoundSourcePage")}})}catch(t){throw await this.instrumentationOnRequestError(t,e,{routerKind:"Pages Router",routePath:n,routeType:"render",revalidateReason:nt({isRevalidate:N,isOnDemandRevalidate:g.isOnDemandRevalidate})}),t}}else{let r=a.routeModule;g.nextFontManifest=this.nextFontManifest;let o={page:C?"/404":n,params:i.params,query:s,fallbackRouteParams:l,renderOpts:g,serverComponentsHmrCache:this.getServerComponentsHmrCache(),sharedContext:{buildId:this.buildId}};this.nextConfig.experimental.dynamicIO,u=await r.render(e,t,o)}}else throw Object.defineProperty(Error("Invariant: Unknown route module type"),"__NEXT_ERROR_CODE",{value:"E450",enumerable:!1,configurable:!0})}else u=await this.renderHTML(e,t,n,s,g);let{metadata:y}=u,{cacheControl:b,headers:E={},fetchTags:_}=y;if(_&&(E[ex.VC]=_),e.fetchMetrics=y.fetchMetrics,O&&N&&(null==b?void 0:b.revalidate)===0&&!G){let e=y.staticBailoutInfo,t=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${j}${(null==e?void 0:e.description)?`, reason: ${e.description}`:""}
|
32
|
-
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==e?void 0:e.stack){let r=e.stack;t.stack=t.message+r.substring(r.indexOf("\n"))}throw t}return"isNotFound"in y&&y.isNotFound?{value:null,cacheControl:b,isFallback:!1}:y.isRedirect?{value:{kind:tn.REDIRECT,props:y.pageData??y.flightData},cacheControl:b,isFallback:!1}:u.isNull?null:O?{value:{kind:tn.APP_PAGE,html:u,headers:E,rscData:y.flightData,postponed:y.postponed,status:t.statusCode,segmentData:y.segmentData},cacheControl:b,isFallback:!!l}:{value:{kind:tn.PAGES,html:u,pageData:y.pageData??y.flightData,headers:E,status:O?t.statusCode:void 0},cacheControl:b,isFallback:o}},ev=async({hasResolved:r,previousCacheEntry:o,isRevalidating:l})=>{if(r||t.sent,!E&&M){if(S){let t=await this.getStaticPaths({pathname:n,requestHeaders:e.headers,isAppPath:O,page:a.page});E=t.staticPaths,_=t.fallbackMode}else E=void 0,_=nr.NOT_FOUND}_===nr.PRERENDER&&t7(e.headers["user-agent"]||"")&&(_=nr.BLOCKING_STATIC_RENDER),(null==o?void 0:o.isStale)===-1&&(el=!0),el&&(_!==nr.NOT_FOUND||o)&&(_=nr.BLOCKING_STATIC_RENDER);let u=ec;!u&&i.dev&&O&&(u=rW(k)),u&&s.amp&&(u=u.replace(/\.amp$/,"")),u&&(null==E||E.includes(u)),this.nextConfig.experimental.isExperimentalCompile&&(_=nr.BLOCKING_STATIC_RENDER);let c=el||l||!Q?void 0:Q;return(K||J)&&void 0!==c?{cacheControl:{revalidate:1,expire:void 0},isFallback:!1,value:{kind:tn.PAGES,html:tG.fromStatic(""),pageData:{},headers:void 0,status:void 0}}:eg({postponed:c,pagesFallback:void 0,fallbackRouteParams:M&&G&&(et(e,"didSetDefaultRouteMatches")||Y)?function(e){let t;if(0===(t="string"==typeof e?Object.keys(Z(e6(e))(e)):e).length)return null;let r=new Map,n=Math.random().toString(16).slice(2);for(let e of t)r.set(e,`%%drp:${e}:${n}%%`);return r}(n):null})},ey=await this.responseCache.get(ec,ev,{routeKind:(null==R?void 0:R.definition.kind)??(O?tV.APP_PAGE:tV.PAGES),incrementalCache:em,isOnDemandRevalidate:el,isPrefetch:"prefetch"===e.headers.purpose,isRoutePPREnabled:G});if(eo&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),!ey){if(ec&&!(el&&eu))throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}let eb=(null==(h=ey.value)?void 0:h.kind)===tn.APP_PAGE&&"string"==typeof ey.value.postponed;N&&!ee&&(!eb||H)&&t.setHeader("x-nextjs-prerender","1");let{value:eE}=ey;if("string"==typeof en&&(null==eE?void 0:eE.kind)===tn.APP_PAGE&&eE.segmentData){t.setHeader(ej,"2");let e=eE.segmentData.get(en);return void 0!==e?{type:"rsc",body:tG.fromStatic(e),cacheControl:ey.cacheControl}:(t.statusCode=204,{type:"rsc",body:tG.fromStatic(""),cacheControl:null==ey?void 0:ey.cacheControl})}if((null==eE?void 0:eE.kind)===tn.IMAGE)throw Object.defineProperty(new L("SSG should not return an image cache value"),"__NEXT_ERROR_CODE",{value:"E659",enumerable:!1,configurable:!0});if(Q)w={revalidate:0,expire:void 0};else if(F&&!H&&G)w={revalidate:0,expire:void 0};else if(1){if(eo)w={revalidate:0,expire:void 0};else if(N){if(C){let t=et(e,"notFoundRevalidate");w={revalidate:void 0===t?0:t,expire:void 0}}else if(P)w={revalidate:0,expire:void 0};else if(ey.cacheControl){if("number"==typeof ey.cacheControl.revalidate){if(ey.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${ey.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});w={revalidate:ey.cacheControl.revalidate,expire:(null==(f=ey.cacheControl)?void 0:f.expire)??this.nextConfig.expireTime}}else w={revalidate:ex.qF,expire:void 0}}}else t.getHeader("Cache-Control")||(w={revalidate:0,expire:void 0})}ey.cacheControl=w;let e_=et(e,"onCacheEntry");if(e_&&await e_({...ey,value:{...ey.value,kind:(null==(m=ey.value)?void 0:m.kind)===tn.APP_PAGE?"PAGE":null==(g=ey.value)?void 0:g.kind}},{url:et(e,"initURL")}))return null;if(eE){if(eE.kind===tn.REDIRECT)return(ey.cacheControl&&!t.getHeader("Cache-Control")&&t.setHeader("Cache-Control",eC(ey.cacheControl)),$)?{type:"json",body:tG.fromStatic(JSON.stringify(eE.props)),cacheControl:ey.cacheControl}:(await (e=>{let r={destination:e.pageProps.__N_REDIRECT,statusCode:e.pageProps.__N_REDIRECT_STATUS,basePath:e.pageProps.__N_REDIRECT_BASE_PATH},n=r.statusCode||(r.permanent?ef.PermanentRedirect:ef.TemporaryRedirect),{basePath:i}=this.nextConfig;i&&!1!==r.basePath&&r.destination.startsWith("/")&&(r.destination=`${i}${r.destination}`),r.destination.startsWith("/")&&(r.destination=V(r.destination)),t.redirect(r.destination,n).body(r.destination).send()})(eE.props),null);if(eE.kind===tn.APP_ROUTE){let r=th(eE.headers);return N||r.delete(ex.VC),!ey.cacheControl||t.getHeader("Cache-Control")||r.get("Cache-Control")||r.set("Cache-Control",eC(ey.cacheControl)),await rU(e,t,new Response(eE.body,{headers:r,status:eE.status||200})),null}if(eE.kind===tn.APP_PAGE){if(eb&&Q)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(eE.headers){let e={...eE.headers};for(let[r,n]of(N||delete e[ex.VC],Object.entries(e)))if(void 0!==n){if(Array.isArray(n))for(let e of n)t.appendHeader(r,e);else"number"==typeof n&&(n=n.toString()),t.appendHeader(r,n)}}if(N&&(null==(y=eE.headers)?void 0:y[ex.VC])&&t.setHeader(ex.VC,eE.headers[ex.VC]),!eE.status||F&&G||(t.statusCode=eE.status),eb&&t.setHeader(ej,"1"),F&&!eo){if(void 0===eE.rscData){if(eE.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return{type:"rsc",body:eE.html,cacheControl:ee?{revalidate:0,expire:void 0}:ey.cacheControl}}return{type:"rsc",body:tG.fromStatic(eE.rscData),cacheControl:ey.cacheControl}}return{type:"html",body:eE.html,cacheControl:ey.cacheControl}}return $?{type:"json",body:tG.fromStatic(JSON.stringify(eE.pageData)),cacheControl:ey.cacheControl}:{type:"html",body:eE.html,cacheControl:ey.cacheControl}}return(er(e,"notFoundRevalidate",null==(v=ey.cacheControl)?void 0:v.revalidate),ey.cacheControl&&!t.getHeader("Cache-Control")&&t.setHeader("Cache-Control",eC(ey.cacheControl)),$)?(t.statusCode=404,t.body('{"notFound":true}').send()):await this.render404(e,t,{pathname:n,query:s},!1),null}stripNextDataPath(e,t=!0){return(e.includes(this.buildId)&&(e=rt(e.substring(e.indexOf(this.buildId)+this.buildId.length).replace(/\.json$/,""))),this.localeNormalizer&&t)?this.localeNormalizer.normalize(e):e}getOriginalAppPaths(e){if(this.enabledDirectories.app){var t;return(null==(t=this.appPathRoutes)?void 0:t[e])||null}return null}async renderPageComponent(e,t){var r;let{query:n,pathname:i}=e,a=this.getOriginalAppPaths(i),s=Array.isArray(a),o=i;s&&(o=a[a.length-1]);let l=await this.findPageComponents({locale:et(e.req,"locale"),page:o,query:n,params:e.renderOpts.params||{},isAppPath:s,sriEnabled:!!(null==(r=this.nextConfig.experimental.sri)?void 0:r.algorithm),appPaths:a,shouldEnsure:!1});if(l){(0,ta.getTracer)().setRootSpanAttribute("next.route",i);try{return await this.renderToResponseWithComponents(e,l)}catch(r){let e=r instanceof nm;if(!e||e&&t)throw r}}return!1}async renderToResponse(e){return(0,ta.getTracer)().trace(ts.Li.renderToResponse,{spanName:"rendering page",attributes:{"next.route":e.pathname}},async()=>this.renderToResponseImpl(e))}async renderToResponseImpl(e){var t;let{req:r,res:n,query:i,pathname:a}=e,s=et(e.req,"bubbleNoFallback")??!1;delete i[eN];let o={i18n:null==(t=this.i18nProvider)?void 0:t.fromRequest(r,a)};try{for await(let t of this.matchers.matchAll(a,o)){et(e.req,"invokeOutput");let r=await this.renderPageComponent({...e,pathname:t.definition.pathname,renderOpts:{...e.renderOpts,params:t.params}},s);if(!1!==r)return r}if(this.serverOptions.webServerConfig){e.pathname=this.serverOptions.webServerConfig.page;let t=await this.renderPageComponent(e,s);if(!1!==t)return t}}catch(i){let t=rl(i);if(i instanceof Q)throw console.error("Invariant: failed to load static page",JSON.stringify({page:a,url:e.req.url,matchedPath:e.req.headers[ex.vx],initUrl:et(e.req,"initURL"),didRewrite:!!et(e.req,"rewroteURL"),rewroteUrl:et(e.req,"rewroteURL")},null,2)),t;if(t instanceof nm&&s)throw t;if(t instanceof K||t instanceof J)return n.statusCode=400,await this.renderErrorToResponse(e,t);n.statusCode=500,await this.hasPage("/500")&&(er(e.req,"customErrorRender",!0),await this.renderErrorToResponse(e,t),en(e.req,"customErrorRender"));let r=t instanceof ng;if(!r)throw ro(t)&&(t.page=a),t;return await this.renderErrorToResponse(e,r?t.innerError:t)}if(await this.getMiddleware()&&e.req.headers["x-nextjs-data"]&&(!n.statusCode||200===n.statusCode||404===n.statusCode)){let e=et(r,"locale");return n.setHeader("x-nextjs-matched-path",`${e?`/${e}`:""}${a}`),n.statusCode=200,n.setHeader("content-type","application/json"),n.body("{}"),n.send(),null}return n.statusCode=404,this.renderErrorToResponse(e,null)}async renderToHTML(e,t,r,n={}){return(0,ta.getTracer)().trace(ts.Li.renderToHTML,async()=>this.renderToHTMLImpl(e,t,r,n))}async renderToHTMLImpl(e,t,r,n={}){return this.getStaticHTML(e=>this.renderToResponse(e),{req:e,res:t,pathname:r,query:n})}async renderError(e,t,r,n,i={},a=!0){return(0,ta.getTracer)().trace(ts.Li.renderError,async()=>this.renderErrorImpl(e,t,r,n,i,a))}async renderErrorImpl(e,t,r,n,i={},a=!0){return a&&r.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),this.pipe(async t=>{let n=await this.renderErrorToResponse(t,e);if(500===r.statusCode)throw e;return n},{req:t,res:r,pathname:n,query:i})}async renderErrorToResponse(e,t){return(0,ta.getTracer)().trace(ts.Li.renderErrorToResponse,async()=>this.renderErrorToResponseImpl(e,t))}async renderErrorToResponseImpl(e,t){let{res:r,query:n}=e;try{let i=null;404===r.statusCode&&(this.enabledDirectories.app&&(i=await this.findPageComponents({locale:et(e.req,"locale"),page:es,query:n,params:{},isAppPath:!0,shouldEnsure:!0,url:e.req.url})),!i&&await this.hasPage("/404")&&(i=await this.findPageComponents({locale:et(e.req,"locale"),page:"/404",query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url})));let a=`/${r.statusCode}`;if(!et(e.req,"customErrorRender")&&!i&&ed.includes(a)&&(i=await this.findPageComponents({locale:et(e.req,"locale"),page:a,query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url})),i||(i=await this.findPageComponents({locale:et(e.req,"locale"),page:"/_error",query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url}),a="/_error"),!i)throw new ng(Object.defineProperty(Error("missing required error components"),"__NEXT_ERROR_CODE",{value:"E60",enumerable:!1,configurable:!0}));i.components.routeModule?er(e.req,"match",{definition:i.components.routeModule.definition,params:void 0}):en(e.req,"match");try{return await this.renderToResponseWithComponents({...e,pathname:a,renderOpts:{...e.renderOpts,err:t}},i)}catch(e){if(e instanceof nm)throw Object.defineProperty(Error("invariant: failed to render error page"),"__NEXT_ERROR_CODE",{value:"E55",enumerable:!1,configurable:!0});throw e}}catch(s){let t=rl(s),i=t instanceof ng;i||this.logError(t),r.statusCode=500;let a=await this.getFallbackErrorComponents(e.req.url);if(a)return er(e.req,"match",{definition:a.routeModule.definition,params:void 0}),this.renderToResponseWithComponents({...e,pathname:"/_error",renderOpts:{...e.renderOpts,err:i?t.innerError:t}},{query:n,components:a});return{type:"html",body:tG.fromStatic("Internal Server Error")}}}async renderErrorToHTML(e,t,r,n,i={}){return this.getStaticHTML(t=>this.renderErrorToResponse(t,e),{req:t,res:r,pathname:n,query:i})}async render404(e,t,r,n=!0){let{pathname:i,query:a}=r||(0,c.parse)(e.url,!0);return this.nextConfig.i18n&&(et(e,"locale")||er(e,"locale",this.nextConfig.i18n.defaultLocale),er(e,"defaultLocale",this.nextConfig.i18n.defaultLocale)),t.statusCode=404,this.renderError(null,e,t,i,a,n)}}let ny=require("vm");function nb(e){if(Object.isFrozen(e))return e;if(Array.isArray(e)){for(let t of e)t&&"object"==typeof t&&nb(t);return Object.freeze(e)}for(let t of Object.values(e))t&&"object"==typeof t&&nb(t);return Object.freeze(e)}let nE=new Map;function n_(e,t=!0,r=nE){let n=t&&r.get(e);if(n)return n;let i=JSON.parse((0,h.readFileSync)(e,"utf8"));return t&&(i=nb(i)),t&&r.set(e,i),i}let nR=new eq(1e3);function nw(e,t,r,n){let i;let a=`${e}:${t}:${r}:${n}`,s=null==nR?void 0:nR.get(a);if(s)return s;let o=u().join(t,eu);n&&(i=n_(u().join(o,el),!0));let l=n_(u().join(o,eo),!0);try{e=rt(ry(e))}catch(t){throw console.error(t),new Y(e)}let c=t=>{let n=t[e];if(!t[n]&&r){let i={};for(let e of Object.keys(t))i[tw(e,r).pathname]=l[e];n=i[e]}return n};return(i&&(s=c(i)),s||(s=c(l)),s)?(s=u().join(o,s),null==nR||nR.set(a,s),s):(null==nR||nR.set(a,null),null)}function nx(e,t,r,n){let i=nw(e,t,r,n);if(!i)throw new Y(e);return i}async function nC(e,t,r){let n=nx(e,t,void 0,r);if(n.endsWith(".html"))return h.promises.readFile(n,"utf8").catch(t=>{throw new Q(e,t.message)});try{return process.env.__NEXT_PRIVATE_RUNTIME_TYPE=r?"app":"pages",require(n)}finally{process.env.__NEXT_PRIVATE_RUNTIME_TYPE=""}}function nP(e){return e.default||e}async function nO(e){return new Promise(t=>setTimeout(t,e))}let nT=Symbol.for("next.server.action-manifests");async function nS(e,t=3){for(;;)try{return n_(e)}catch(e){if(--t<=0)throw e;await nO(100)}}async function nD(e,t=3){try{return await nS(e,t)}catch(e){return}}async function nA(e,t=3){for(;;)try{return function(e,t=!0,r=nE){let n=t&&r.get(e);if(n)return n;let i=(0,h.readFileSync)(e,"utf8");if(0===i.length)throw Object.defineProperty(Error("Manifest file is empty"),"__NEXT_ERROR_CODE",{value:"E328",enumerable:!1,configurable:!0});let a={};return(0,ny.runInNewContext)(i,a),t&&(a=nb(a)),t&&r.set(e,a),a}(e)}catch(e){if(--t<=0)throw e;await nO(100)}}async function nN(e,t,r){try{return(await nA(e,r)).__RSC_MANIFEST[t]}catch(e){return}}async function nj({distDir:e,page:t,isAppPath:r,isDev:n,sriEnabled:i}){let a,s={},o={};r||([s,o]=await Promise.all([nC("/_document",e,!1),nC("/_app",e,!1)]));let u=n?3:1;a=(0,l.join)(e,"react-loadable-manifest.json");let[c,d,h,p,f,m]=await Promise.all([nS((0,l.join)(e,"build-manifest.json"),u),nD(a,u),r?void 0:nS((0,l.join)(e,"dynamic-css-manifest.json"),u).catch(()=>void 0),r?nN((0,l.join)(e,"server","app",t.replace(/%5F/g,"_")+"_client-reference-manifest.js"),t.replace(/%5F/g,"_"),u):void 0,r?nS((0,l.join)(e,"server","server-reference-manifest.json"),u).catch(()=>null):null,i?nS((0,l.join)(e,"server","subresource-integrity-manifest.json")).catch(()=>void 0):void 0]);f&&p&&function({page:e,clientReferenceManifest:t,serverActionsManifest:r,serverModuleMap:n}){var i;let a=null==(i=globalThis[nT])?void 0:i.clientReferenceManifestsPerPage;globalThis[nT]={clientReferenceManifestsPerPage:{...a,[eQ(e)]:t},serverActionsManifest:r,serverModuleMap:n}}({page:t,clientReferenceManifest:p,serverActionsManifest:f,serverModuleMap:function({serverActionsManifest:e}){return new Proxy({},{get:(t,r)=>{var n;let i;let a=e.node[r].workers,s=q.workAsyncStorage.getStore();if(!(i=s?a[tE(n=s.page,"app")?n:"app"+n]:Object.values(a).at(0)))return;let{moduleId:o,async:l}=i;return{id:o,name:r,chunks:[],async:l}}})}({serverActionsManifest:f})});let g=await nC(t,e,r),v=nP(g),y=nP(s),b=nP(o),{getServerSideProps:E,getStaticProps:_,getStaticPaths:R,routeModule:w}=g;return{App:b,Document:y,Component:v,buildManifest:c,subresourceIntegrityManifest:m,reactLoadableManifest:d||{},dynamicCssManifest:h,pageConfig:g.config||{},ComponentMod:g,getServerSideProps:E,getStaticProps:_,getStaticPaths:R,clientReferenceManifest:p,serverActionsManifest:f,isAppPath:r,page:t,routeModule:w}}let nk=(0,ta.getTracer)().wrap(ts.p2.loadComponents,nj);function nI(e){return(t,r,n)=>{for(let i of e)if(new RegExp(i.regexp).exec(t)&&(!i.has&&!i.missing||ra(r,n,i.has,i.missing)))return!0;return!1}}var nM=r("../next-env/dist/index.js");let nq=require("stream");var nL=/*#__PURE__*/r.n(nq);class n${constructor(e){this.fs=e,this.tasks=[]}findOrCreateTask(e){for(let t of this.tasks)if(t[0]===e)return t;let t=this.fs.mkdir(e);t.catch(()=>{});let r=[e,t,[]];return this.tasks.push(r),r}append(e,t){let r=this.findOrCreateTask(rg().dirname(e)),n=r[1].then(()=>this.fs.writeFile(e,t));n.catch(()=>{}),r[2].push(n)}wait(){return Promise.all(this.tasks.flatMap(e=>e[2]))}}class nH{constructor(e){this.fs=e.fs,this.flushToDisk=e.flushToDisk,this.serverDistDir=e.serverDistDir,this.revalidatedTags=e.revalidatedTags,this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE,e.maxMemoryCacheSize?t||(this.debug&&console.log("using memory store for fetch cache"),t=new eq(e.maxMemoryCacheSize,function({value:e}){var t;if(!e)return 25;if(e.kind===tn.REDIRECT)return JSON.stringify(e.props).length;if(e.kind===tn.IMAGE)throw Object.defineProperty(Error("invariant image should not be incremental-cache"),"__NEXT_ERROR_CODE",{value:"E501",enumerable:!1,configurable:!0});return e.kind===tn.FETCH?JSON.stringify(e.data||"").length:e.kind===tn.APP_ROUTE?e.body.length:e.html.length+((null==(t=JSON.stringify(e.kind===tn.APP_PAGE?e.rscData:e.pageData))?void 0:t.length)||0)})):this.debug&&console.log("not using memory store for fetch cache")}resetRequestCache(){}async revalidateTag(...e){let[t]=e;if(t="string"==typeof t?[t]:t,this.debug&&console.log("revalidateTag",t),0!==t.length)for(let e of t){let t=na.tagsManifest.items[e]||{};t.revalidatedAt=Date.now(),na.tagsManifest.items[e]=t}}async get(...e){var r,n,i,a,s,o;let[l,u]=e,{kind:c}=u,d=null==t?void 0:t.get(l);if(this.debug&&(c===ti.FETCH?console.log("get",l,u.tags,c,!!d):console.log("get",l,c,!!d)),!d){if(c===ti.APP_ROUTE)try{let e=this.getFilePath(`${l}.body`,ti.APP_ROUTE),t=await this.fs.readFile(e),{mtime:r}=await this.fs.stat(e),n=JSON.parse(await this.fs.readFile(e.replace(/\.body$/,ex.EP),"utf8"));return{lastModified:r.getTime(),value:{kind:tn.APP_ROUTE,body:t,headers:n.headers,status:n.status}}}catch{return null}try{let e=this.getFilePath(c===ti.FETCH?l:`${l}.html`,c),r=await this.fs.readFile(e,"utf8"),{mtime:n}=await this.fs.stat(e);if(c===ti.FETCH){let{tags:e,fetchIdx:t,fetchUrl:i}=u;if(!this.flushToDisk)return null;let o=n.getTime(),c=JSON.parse(r);if(d={lastModified:o,value:c},(null==(a=d.value)?void 0:a.kind)===tn.FETCH){let r=null==(s=d.value)?void 0:s.tags;(null==e?void 0:e.every(e=>null==r?void 0:r.includes(e)))||(this.debug&&console.log("tags vs storedTags mismatch",e,r),await this.set(l,d.value,{fetchCache:!0,tags:e,fetchIdx:t,fetchUrl:i}))}}else if(c===ti.APP_PAGE){let t,i,a;try{t=JSON.parse(await this.fs.readFile(e.replace(/\.html$/,ex.EP),"utf8"))}catch{}if(null==t?void 0:t.segmentPaths){let e=new Map;i=e;let r=l+ex.mH;await Promise.all(t.segmentPaths.map(async t=>{let n=this.getFilePath(r+t+ex.tz,ti.APP_PAGE);try{e.set(t,await this.fs.readFile(n))}catch{}}))}u.isFallback||(a=await this.fs.readFile(this.getFilePath(`${l}${u.isRoutePPREnabled?ex.pu:ex.RM}`,ti.APP_PAGE))),d={lastModified:n.getTime(),value:{kind:tn.APP_PAGE,html:r,rscData:a,postponed:null==t?void 0:t.postponed,headers:null==t?void 0:t.headers,status:null==t?void 0:t.status,segmentData:i}}}else if(c===ti.PAGES){let e;let t={};u.isFallback||(t=JSON.parse(await this.fs.readFile(this.getFilePath(`${l}${ex.x3}`,ti.PAGES),"utf8"))),d={lastModified:n.getTime(),value:{kind:tn.PAGES,html:r,pageData:t,headers:null==e?void 0:e.headers,status:null==e?void 0:e.status}}}else throw Object.defineProperty(Error(`Invariant: Unexpected route kind ${c} in file system cache.`),"__NEXT_ERROR_CODE",{value:"E445",enumerable:!1,configurable:!0});d&&(null==t||t.set(l,d))}catch{return null}}if((null==d?void 0:null==(r=d.value)?void 0:r.kind)===tn.APP_PAGE||(null==d?void 0:null==(n=d.value)?void 0:n.kind)===tn.PAGES){let e;let t=null==(o=d.value.headers)?void 0:o[ex.VC];if("string"==typeof t&&(e=t.split(",")),(null==e?void 0:e.length)&&e.some(e=>{var t;return(null==na.tagsManifest?void 0:null==(t=na.tagsManifest.items[e])?void 0:t.revalidatedAt)&&(null==na.tagsManifest?void 0:na.tagsManifest.items[e].revalidatedAt)>=((null==d?void 0:d.lastModified)||Date.now())}))return null}else(null==d?void 0:null==(i=d.value)?void 0:i.kind)===tn.FETCH&&(u.kind===ti.FETCH?[...u.tags||[],...u.softTags||[]]:[]).some(e=>{var t;return!!this.revalidatedTags.includes(e)||(null==na.tagsManifest?void 0:null==(t=na.tagsManifest.items[e])?void 0:t.revalidatedAt)&&(null==na.tagsManifest?void 0:na.tagsManifest.items[e].revalidatedAt)>=((null==d?void 0:d.lastModified)||Date.now())})&&(d=void 0);return d??null}async set(e,r,n){if(null==t||t.set(e,{value:r,lastModified:Date.now()}),this.debug&&console.log("set",e),!this.flushToDisk||!r)return;let i=new n$(this.fs);if(r.kind===tn.APP_ROUTE){let t=this.getFilePath(`${e}.body`,ti.APP_ROUTE);i.append(t,r.body);let n={headers:r.headers,status:r.status,postponed:void 0,segmentPaths:void 0};i.append(t.replace(/\.body$/,ex.EP),JSON.stringify(n,null,2))}else if(r.kind===tn.PAGES||r.kind===tn.APP_PAGE){let t=r.kind===tn.APP_PAGE,a=this.getFilePath(`${e}.html`,t?ti.APP_PAGE:ti.PAGES);if(i.append(a,r.html),n.fetchCache||n.isFallback||i.append(this.getFilePath(`${e}${t?n.isRoutePPREnabled?ex.pu:ex.RM:ex.x3}`,t?ti.APP_PAGE:ti.PAGES),t?r.rscData:JSON.stringify(r.pageData)),(null==r?void 0:r.kind)===tn.APP_PAGE){let e;if(r.segmentData){e=[];let t=a.replace(/\.html$/,ex.mH);for(let[n,a]of r.segmentData){e.push(n);let r=t+n+ex.tz;i.append(r,a)}}let t={headers:r.headers,status:r.status,postponed:r.postponed,segmentPaths:e};i.append(a.replace(/\.html$/,ex.EP),JSON.stringify(t))}}else if(r.kind===tn.FETCH){let t=this.getFilePath(e,ti.FETCH);i.append(t,JSON.stringify({...r,tags:n.fetchCache?n.tags:[]}))}await i.wait()}getFilePath(e,t){switch(t){case ti.FETCH:return rg().join(this.serverDistDir,"..","cache","fetch-cache",e);case ti.PAGES:return rg().join(this.serverDistDir,"pages",e);case ti.IMAGE:case ti.APP_PAGE:case ti.APP_ROUTE:return rg().join(this.serverDistDir,"app",e);default:throw Object.defineProperty(Error(`Unexpected file path kind: ${t}`),"__NEXT_ERROR_CODE",{value:"E479",enumerable:!1,configurable:!0})}}}class nF{static #e=this.cacheControls=new Map;constructor(e){this.prerenderManifest=e}get(e){let t=nF.cacheControls.get(e);if(t)return t;let r=this.prerenderManifest.routes[e];if(r){let{initialRevalidateSeconds:e,initialExpireSeconds:t}=r;if(void 0!==e)return{revalidate:e,expire:t}}let n=this.prerenderManifest.dynamicRoutes[e];if(n){let{fallbackRevalidate:e,fallbackExpire:t}=n;if(void 0!==e)return{revalidate:e,expire:t}}}set(e,t){nF.cacheControls.set(e,t)}clear(){nF.cacheControls.clear()}}let nz=r4?new r4:new class{disable(){throw r1}getStore(){}run(){throw r1}exit(){throw r1}enterWith(){throw r1}static bind(e){return e}};class nU{constructor({fs:e,dev:t,flushToDisk:r,minimalMode:n,serverDistDir:i,requestHeaders:a,requestProtocol:s,maxMemoryCacheSize:o,getPrerenderManifest:l,fetchCacheKeyPrefix:u,CurCacheHandler:c,allowedRevalidateHeaderKeys:d}){var h,p,f,m;this.locks=new Map;let g=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;this.hasCustomCacheHandler=!!c;let v=Symbol.for("@next/cache-handlers"),y=globalThis;if(c)g&&console.log("using custom cache handler",c.name);else{let t=y[v];(null==t?void 0:t.FetchCache)?c=t.FetchCache:e&&i&&(g&&console.log("using filesystem cache handler"),c=nH)}process.env.__NEXT_TEST_MAX_ISR_CACHE&&(o=parseInt(process.env.__NEXT_TEST_MAX_ISR_CACHE,10)),this.dev=t,this.disableForTestmode="true"===process.env.NEXT_PRIVATE_TEST_PROXY,this.minimalMode=n,this.requestHeaders=a,this.requestProtocol=s,this.allowedRevalidateHeaderKeys=d,this.prerenderManifest=l(),this.cacheControls=new nF(this.prerenderManifest),this.fetchCacheKeyPrefix=u;let b=[];a[ex.kz]===(null==(p=this.prerenderManifest)?void 0:null==(h=p.preview)?void 0:h.previewModeId)&&(this.isOnDemandRevalidate=!0),n&&"string"==typeof a[ex.vS]&&a[ex.c1]===(null==(m=this.prerenderManifest)?void 0:null==(f=m.preview)?void 0:f.previewModeId)&&(b=a[ex.vS].split(",")),c&&(this.cacheHandler=new c({dev:t,fs:e,flushToDisk:r,serverDistDir:i,revalidatedTags:b,maxMemoryCacheSize:o,_requestHeaders:a,fetchCacheKeyPrefix:u}))}calculateRevalidate(e,t,r,n){if(r)return Math.floor(performance.timeOrigin+performance.now()-1e3);let i=this.cacheControls.get(r0(e)),a=i?i.revalidate:!n&&1;return"number"==typeof a?1e3*a+t:a}_getPathname(e,t){return t?e:ry(e)}resetRequestCache(){var e,t;null==(t=this.cacheHandler)||null==(e=t.resetRequestCache)||e.call(t)}async lock(e){let t=()=>Promise.resolve(),r=this.locks.get(e);r&&await r;let n=new Promise(r=>{t=async()=>{r(),this.locks.delete(e)}});return this.locks.set(e,n),t}async revalidateTag(e){var t;let r=[];(null==(t=this.cacheHandler)?void 0:t.revalidateTag)&&r.push(this.cacheHandler.revalidateTag(e));let n=nf();if(n)for(let t of(e=Array.isArray(e)?e:[e],n))r.push(t.expireTags(...e));await Promise.all(r)}async generateCacheKey(e,t={}){let n=[],i=new TextEncoder,a=new TextDecoder;if(t.body){if("function"==typeof t.body.getReader){let e=t.body,r=[];try{await e.pipeTo(new WritableStream({write(e){"string"==typeof e?(r.push(i.encode(e)),n.push(e)):(r.push(e),n.push(a.decode(e,{stream:!0})))}})),n.push(a.decode());let s=r.reduce((e,t)=>e+t.length,0),o=new Uint8Array(s),l=0;for(let e of r)o.set(e,l),l+=e.length;t._ogBody=o}catch(e){console.error("Problem reading body",e)}}else if("function"==typeof t.body.keys){let e=t.body;for(let r of(t._ogBody=t.body,new Set([...e.keys()]))){let t=e.getAll(r);n.push(`${r}=${(await Promise.all(t.map(async e=>"string"==typeof e?e:await e.text()))).join(",")}`)}}else if("function"==typeof t.body.arrayBuffer){let e=t.body,r=await e.arrayBuffer();n.push(await e.text()),t._ogBody=new Blob([r],{type:e.type})}else"string"==typeof t.body&&(n.push(t.body),t._ogBody=t.body)}let s="function"==typeof(t.headers||{}).keys?Object.fromEntries(t.headers):Object.assign({},t.headers);"traceparent"in s&&delete s.traceparent,"tracestate"in s&&delete s.tracestate;let o=JSON.stringify(["v3",this.fetchCacheKeyPrefix||"",e,t.method,s,t.mode,t.redirect,t.credentials,t.referrer,t.referrerPolicy,t.integrity,t.cache,n]);return r("crypto").createHash("sha256").update(o).digest("hex")}async get(e,t){var r,n,i,a;let s,o;if(t.kind===ti.FETCH){let t=nz.getStore(),r=t?(0,D.getRenderResumeDataCache)(t):null;if(r){let t=r.fetch.get(e);if((null==t?void 0:t.kind)===tn.FETCH)return{isStale:!1,value:t}}}if(this.disableForTestmode||this.dev&&(t.kind!==ti.FETCH||"no-cache"===this.requestHeaders["cache-control"]))return null;e=this._getPathname(e,t.kind===ti.FETCH);let l=await (null==(r=this.cacheHandler)?void 0:r.get(e,t));if(t.kind===ti.FETCH){if(!l)return null;if((null==(i=l.value)?void 0:i.kind)!==tn.FETCH)throw Object.defineProperty(new L(`Expected cached value for cache key ${JSON.stringify(e)} to be a "FETCH" kind, got ${JSON.stringify(null==(a=l.value)?void 0:a.kind)} instead.`),"__NEXT_ERROR_CODE",{value:"E653",enumerable:!1,configurable:!0});if([...t.tags||[],...t.softTags||[]].some(e=>{var t;return null==(t=this.revalidatedTags)?void 0:t.includes(e)}))return null;let r=t.revalidate||l.value.revalidate,n=(performance.timeOrigin+performance.now()-(l.lastModified||0))/1e3,s=l.value.data;return{isStale:n>r,value:{kind:tn.FETCH,data:s,revalidate:r}}}if((null==l?void 0:null==(n=l.value)?void 0:n.kind)===tn.FETCH)throw Object.defineProperty(new L(`Expected cached value for cache key ${JSON.stringify(e)} not to be a ${JSON.stringify(t.kind)} kind, got "FETCH" instead.`),"__NEXT_ERROR_CODE",{value:"E652",enumerable:!1,configurable:!0});let u=null,{isFallback:c}=t,d=this.cacheControls.get(r0(e));return(null==l?void 0:l.lastModified)===-1?(s=-1,o=-1*ex.qF):s=!!(!1!==(o=this.calculateRevalidate(e,(null==l?void 0:l.lastModified)||performance.timeOrigin+performance.now(),this.dev??!1,t.isFallback))&&o<performance.timeOrigin+performance.now())||void 0,l&&(u={isStale:s,cacheControl:d,revalidateAfter:o,value:l.value,isFallback:c}),!l&&this.prerenderManifest.notFoundRoutes.includes(e)&&(u={isStale:s,value:null,cacheControl:d,revalidateAfter:o,isFallback:c},this.set(e,u.value,{...t,cacheControl:d})),u}async set(e,t,r){if((null==t?void 0:t.kind)===tn.FETCH){let r=nz.getStore(),n=r?(0,D.getPrerenderResumeDataCache)(r):null;n&&n.fetch.set(e,t)}if(this.disableForTestmode||this.dev&&!r.fetchCache)return;e=this._getPathname(e,r.fetchCache);let n=JSON.stringify(t).length;if(r.fetchCache&&!this.hasCustomCacheHandler&&n>2097152){if(this.dev)throw Object.defineProperty(Error(`Failed to set Next.js data cache, items over 2MB can not be cached (${n} bytes)`),"__NEXT_ERROR_CODE",{value:"E86",enumerable:!1,configurable:!0});return}try{var i;!r.fetchCache&&r.cacheControl&&this.cacheControls.set(r0(e),r.cacheControl),await (null==(i=this.cacheHandler)?void 0:i.set(e,t,r))}catch(t){console.warn("Failed to update prerender cache for",e,t)}}}let nX=require("http"),nW=require("https"),nB={existsSync:p().existsSync,readFile:p().promises.readFile,readFileSync:p().readFileSync,writeFile:(e,t)=>p().promises.writeFile(e,t),mkdir:e=>p().promises.mkdir(e,{recursive:!0}),stat:e=>p().promises.stat(e)};class nG extends nL().Readable{constructor({url:e,headers:t,method:r,socket:n=null,readable:i}){super(),this.httpVersion="1.0",this.httpVersionMajor=1,this.httpVersionMinor=0,this.socket=new Proxy({},{get:(e,t)=>{if("encrypted"!==t&&"remoteAddress"!==t)throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0});if("remoteAddress"!==t)return!1}}),this.url=e,this.headers=t,this.method=r,i&&(this.bodyReadable=i,this.bodyReadable.on("end",()=>this.emit("end")),this.bodyReadable.on("close",()=>this.emit("close"))),n&&(this.socket=n)}get headersDistinct(){let e={};for(let[t,r]of Object.entries(this.headers))r&&(e[t]=Array.isArray(r)?r:[r]);return e}_read(e){if(this.bodyReadable)return this.bodyReadable._read(e);this.emit("end"),this.emit("close")}get connection(){return this.socket}get aborted(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get complete(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get trailers(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get trailersDistinct(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get rawTrailers(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get rawHeaders(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setTimeout(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}}class nV extends nL().Writable{constructor(e={}){super(),this.statusMessage="",this.finished=!1,this.headersSent=!1,this.buffers=[],this.statusCode=e.statusCode??200,this.socket=e.socket??null,this.headers=e.headers?th(e.headers):new Headers,this.headPromise=new Promise(e=>{this.headPromiseResolve=e}),this.hasStreamed=new Promise((e,t)=>{this.on("finish",()=>e(!0)),this.on("end",()=>e(!0)),this.on("error",e=>t(e))}).then(e=>(null==this.headPromiseResolve||this.headPromiseResolve.call(this),e)),e.resWriter&&(this.resWriter=e.resWriter)}appendHeader(e,t){for(let r of Array.isArray(t)?t:[t])this.headers.append(e,r);return this}get isSent(){return this.finished||this.headersSent}get connection(){return this.socket}write(e){return this.resWriter?this.resWriter(e):(this.buffers.push(Buffer.isBuffer(e)?e:Buffer.from(e)),!0)}end(){return this.finished=!0,super.end(...arguments)}_implicitHeader(){}_write(e,t,r){this.write(e),r()}writeHead(e,t,r){if(r||"string"==typeof t?"string"==typeof t&&t.length>0&&(this.statusMessage=t):r=t,r){if(Array.isArray(r))for(let e=0;e<r.length;e+=2)this.setHeader(r[e],r[e+1]);else for(let[e,t]of Object.entries(r))void 0!==t&&this.setHeader(e,t)}return this.statusCode=e,this.headersSent=!0,null==this.headPromiseResolve||this.headPromiseResolve.call(this),this}hasHeader(e){return this.headers.has(e)}getHeader(e){return this.headers.get(e)??void 0}getHeaders(){return tf(this.headers)}getHeaderNames(){return Array.from(this.headers.keys())}setHeader(e,t){if(Array.isArray(t))for(let r of(this.headers.delete(e),t))this.headers.append(e,r);else"number"==typeof t?this.headers.set(e,t.toString()):this.headers.set(e,t);return this}removeHeader(e){this.headers.delete(e)}flushHeaders(){}get strictContentLength(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeEarlyHints(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get req(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}assignSocket(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}detachSocket(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeContinue(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeProcessing(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get upgrading(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get chunkedEncoding(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get shouldKeepAlive(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get useChunkedEncodingByDefault(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get sendDate(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setTimeout(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}addTrailers(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setHeaders(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}}class nK{async load(e){return await require(e)}}class nJ{static async load(e,t=new nK){let r=await t.load(e);if("routeModule"in r)return r.routeModule;throw Object.defineProperty(Error(`Module "${e}" does not export a routeModule.`),"__NEXT_ERROR_CODE",{value:"E53",enumerable:!1,configurable:!0})}}let nY=(e,t)=>{let r=u().isAbsolute(t)?t:u().join(e,t);return(0,c.pathToFileURL)(r).toString()};function nQ(e){var t,r;return(null==(r=e.has)?void 0:null==(t=r[0])?void 0:t.key)===eD}class nZ{add(e){this.callbacks.push(e)}async runAll(){if(!this.callbacks.length)return;let e=this.callbacks;this.callbacks=[],await Promise.allSettled(e.map(async e=>e()))}constructor(){this.callbacks=[]}}let n0=e=>import(e).then(e=>e.default||e),n1=require,n4=new WeakMap;class n2 extends nv{constructor(e){var t,r;super(e),this.registeredInstrumentation=!1,this.cleanupListeners=new nZ,this.handleNextImageRequest=async(e,t,r)=>!(!r.pathname||!r.pathname.startsWith("/_next/image")||et(e,"middlewareInvoke"))&&(t.statusCode=400,t.body("Bad Request").send(),!0),this.handleCatchallRenderRequest=async(e,t,r)=>{let{pathname:n,query:i}=r;if(!n)throw Object.defineProperty(Error("Invariant: pathname is undefined"),"__NEXT_ERROR_CODE",{value:"E409",enumerable:!1,configurable:!0});er(e,"bubbleNoFallback",!0);try{var a;n=e8(n);let s={i18n:null==(a=this.i18nProvider)?void 0:a.fromRequest(e,n)},o=await this.matchers.match(n,s);if(!o)return await this.render(e,t,n,i,r,!0),!0;for(let n of(er(e,"match",o),this.getEdgeFunctionsPages()))if(n===o.definition.page){if("export"===this.nextConfig.output)return await this.render404(e,t,r),!0;delete i[eN];try{if(await this.runEdgeFunction({req:e,res:t,query:i,params:o.params,page:o.definition.page,match:o,appPaths:null}))return!0}catch(t){throw await this.instrumentationOnRequestError(t,e,{routePath:o.definition.page,routerKind:"Pages Router",routeType:"route",revalidateReason:void 0}),t}}if(o.definition.kind===tV.PAGES_API){if("export"===this.nextConfig.output)return await this.render404(e,t,r),!0;if(await this.handleApiRequest(e,t,i,o))return!0}return await this.render(e,t,n,i,r,!0),!0}catch(r){if(r instanceof nm)throw r;try{return this.logError(r),t.statusCode=500,await this.renderError(r,e,t,n,i),!0}catch{}throw r}},this.handleCatchallMiddlewareRequest=async(e,t,r)=>{let n;let i=et(e,"middlewareInvoke");if(!i)return!1;let a=()=>(er(e,"middlewareInvoke",!0),t.body("").send(),!0),s=await this.getMiddleware();if(!s)return a();let o=eM(et(e,"initURL")),l=tC(o.pathname,{nextConfig:this.nextConfig,i18nProvider:this.i18nProvider});o.pathname=l.pathname;let u=e8(r.pathname||"");if(!s.match(u,e,o.query))return a();let c=!1;try{if(await this.ensureMiddleware(e.url),n=await this.runMiddleware({request:e,response:t,parsedUrl:o,parsed:r}),"response"in n){if(i)throw c=!0,Object.defineProperty(new ta.BubbledError(!0,n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});for(let[e,r]of Object.entries(tf(n.response.headers)))"content-encoding"!==e&&void 0!==r&&t.setHeader(e,r);t.statusCode=n.response.status;let{originalResponse:e}=t;return n.response.body?await tB(n.response.body,e):e.end(),!0}}catch(i){if(c)throw i;if(ro(i)&&"ENOENT"===i.code)return await this.render404(e,t,r),!0;if(i instanceof K)return t.statusCode=400,await this.renderError(i,e,t,r.pathname||""),!0;let n=rl(i);return console.error(n),t.statusCode=500,await this.renderError(n,e,t,r.pathname||""),!0}return n.finished},this.isDev=e.dev??!1,this.sriEnabled=!!(null==(r=e.conf.experimental)?void 0:null==(t=r.sri)?void 0:t.algorithm),this.renderOpts.optimizeCss&&(process.env.__NEXT_OPTIMIZE_CSS=JSON.stringify(!0)),this.renderOpts.nextScriptWorkers&&(process.env.__NEXT_SCRIPT_WORKERS=JSON.stringify(!0)),process.env.NEXT_DEPLOYMENT_ID=this.nextConfig.deploymentId||"";let{appDocumentPreloading:n}=this.nextConfig.experimental;if(e.dev||!0!==n&&void 0===n||(nk({distDir:this.distDir,page:"/_document",isAppPath:!1,isDev:this.isDev,sriEnabled:this.sriEnabled}).catch(()=>{}),nk({distDir:this.distDir,page:"/_app",isAppPath:!1,isDev:this.isDev,sriEnabled:this.sriEnabled}).catch(()=>{})),e.dev,!e.dev){let{dynamicRoutes:e=[]}=this.getRoutesManifest()??{};this.dynamicRoutes=e.map(e=>{let t=e6(e.page);return{match:Z(t),page:e.page,re:t.re}})}(function(e){if(!globalThis.__NEXT_HTTP_AGENT){if(!e)throw Object.defineProperty(Error("Expected config.httpAgentOptions to be an object"),"__NEXT_ERROR_CODE",{value:"E204",enumerable:!1,configurable:!0});globalThis.__NEXT_HTTP_AGENT_OPTIONS=e.httpAgentOptions,globalThis.__NEXT_HTTP_AGENT=new nX.Agent(e.httpAgentOptions),globalThis.__NEXT_HTTPS_AGENT=new nW.Agent(e.httpAgentOptions)}})(this.nextConfig),this.middlewareManifestPath=(0,l.join)(this.serverDistDir,"middleware-manifest.json"),e.dev||this.prepare().catch(e=>{console.error("Failed to prepare server",e)})}async unstable_preloadEntries(){let e=this.getAppPathsManifest(),t=this.getPagesManifest();for(let e of(await this.loadCustomCacheHandlers(),Object.keys(t||{})))await nk({distDir:this.distDir,page:e,isAppPath:!1,isDev:this.isDev,sriEnabled:this.sriEnabled}).catch(()=>{});for(let t of Object.keys(e||{}))await nk({distDir:this.distDir,page:t,isAppPath:!0,isDev:this.isDev,sriEnabled:this.sriEnabled}).then(async({ComponentMod:e})=>{e.patchFetch();let t=e.__next_app__.require;if(null==t?void 0:t.m)for(let e of Object.keys(t.m))await t(e)}).catch(()=>{})}async handleUpgrade(){}async loadInstrumentationModule(){if(!this.serverOptions.dev)try{this.instrumentation=await n1((0,l.resolve)(this.serverOptions.dir||".",this.serverOptions.conf.distDir,"server",ex.Hw))}catch(e){if("MODULE_NOT_FOUND"!==e.code)throw Object.defineProperty(Error("An error occurred while loading the instrumentation hook",{cause:e}),"__NEXT_ERROR_CODE",{value:"E92",enumerable:!1,configurable:!0})}return this.instrumentation}async prepareImpl(){await super.prepareImpl(),await this.runInstrumentationHookIfAvailable()}async runInstrumentationHookIfAvailable(){var e,t;this.registeredInstrumentation||(this.registeredInstrumentation=!0,await (null==(t=this.instrumentation)?void 0:null==(e=t.register)?void 0:e.call(t)))}loadEnvConfig({dev:e,forceReload:t,silent:r}){(0,nM.loadEnvConfig)(this.dir,e,r?{info:()=>{},error:()=>{}}:s,t)}async loadCustomCacheHandlers(){let{cacheHandlers:e}=this.nextConfig.experimental;if(e&&function(){if(np[nd])return nu("cache handlers already initialized"),!1;if(nu("initializing cache handlers"),np[nd]=new Map,np[nc]){let e;np[nc].DefaultCache?(nu('setting "default" cache handler from symbol'),e=np[nc].DefaultCache):(nu('setting "default" cache handler from default'),e=nl),np[nd].set("default",e),np[nc].RemoteCache?(nu('setting "remote" cache handler from symbol'),np[nd].set("remote",np[nc].RemoteCache)):(nu('setting "remote" cache handler from default'),np[nd].set("remote",e))}else nu('setting "default" cache handler from default'),np[nd].set("default",nl),nu('setting "remote" cache handler from default'),np[nd].set("remote",nl);return np[nh]=new Set(np[nd].values()),!0}())for(let[t,r]of Object.entries(e))r&&function(e,t){if(!np[nd]||!np[nh])throw Object.defineProperty(Error("Cache handlers not initialized"),"__NEXT_ERROR_CODE",{value:"E649",enumerable:!1,configurable:!0});nu('setting cache handler for "%s"',e),np[nd].set(e,t),np[nh].add(t)}(t,nP(await n0(nY(this.distDir,r))))}async getIncrementalCache({requestHeaders:e,requestProtocol:t}){let r;let{cacheHandler:n}=this.nextConfig;return n&&(r=nP(await n0(nY(this.distDir,n)))),await this.loadCustomCacheHandlers(),new nU({fs:this.getCacheFilesystem(),dev:!1,requestHeaders:e,requestProtocol:t,allowedRevalidateHeaderKeys:this.nextConfig.experimental.allowedRevalidateHeaderKeys,minimalMode:!0,serverDistDir:this.serverDistDir,fetchCacheKeyPrefix:this.nextConfig.experimental.fetchCacheKeyPrefix,maxMemoryCacheSize:this.nextConfig.cacheMaxMemorySize,flushToDisk:!1,getPrerenderManifest:()=>this.getPrerenderManifest(),CurCacheHandler:r})}getResponseCache(){return new tY(!0)}getPublicDir(){return(0,l.join)(this.dir,"public")}getHasStaticDir(){return p().existsSync((0,l.join)(this.dir,"static"))}getPagesManifest(){return n_((0,l.join)(this.serverDistDir,eo))}getAppPathsManifest(){if(this.enabledDirectories.app)return n_((0,l.join)(this.serverDistDir,el))}getinterceptionRoutePatterns(){if(!this.enabledDirectories.app)return[];let e=this.getRoutesManifest();return(null==e?void 0:e.rewrites.beforeFiles.filter(nQ).map(e=>new RegExp(e.regex)))??[]}async hasPage(e){var t;return!!nw(e,this.distDir,null==(t=this.nextConfig.i18n)?void 0:t.locales,this.enabledDirectories.app)}getBuildId(){let e=(0,l.join)(this.distDir,"BUILD_ID");try{return p().readFileSync(e,"utf8").trim()}catch(e){if("ENOENT"===e.code)throw Object.defineProperty(Error(`Could not find a production build in the '${this.distDir}' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id`),"__NEXT_ERROR_CODE",{value:"E427",enumerable:!1,configurable:!0});throw e}}getEnabledDirectories(e){let t=e?this.dir:this.serverDistDir;return{app:!!eh(t,"app"),pages:!!eh(t,"pages")}}sendRenderResult(e,t,r){return ek({req:e.originalRequest,res:t.originalResponse,result:r.result,type:r.type,generateEtags:r.generateEtags,poweredByHeader:r.poweredByHeader,cacheControl:r.cacheControl})}async runApi(e,t,r,n){for(let i of this.getEdgeFunctionsPages())if(i===n.definition.pathname&&await this.runEdgeFunction({req:e,res:t,query:r,params:n.params,page:n.definition.pathname,appPaths:null}))return!0;let i=await nJ.load(n.definition.filename);return r={...r,...n.params},await i.render(e.originalRequest,t.originalResponse,{previewProps:this.renderOpts.previewProps,revalidate:this.revalidate.bind(this),trustHostHeader:this.nextConfig.experimental.trustHostHeader,allowedRevalidateHeaderKeys:this.nextConfig.experimental.allowedRevalidateHeaderKeys,hostname:this.fetchHostname,minimalMode:!0,dev:!1,query:r,params:n.params,page:n.definition.pathname,onError:this.instrumentationOnRequestError.bind(this),multiZoneDraftMode:this.nextConfig.experimental.multiZoneDraftMode}),!0}async renderHTML(e,t,r,n,i){return(0,ta.getTracer)().trace(ts.Fx.renderHTML,async()=>this.renderHTMLImpl(e,t,r,n,i))}async renderHTMLImpl(e,t,r,n,i){throw Object.defineProperty(Error("Invariant: renderHTML should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E472",enumerable:!1,configurable:!0})}async imageOptimizer(e,t,r,n){throw Object.defineProperty(Error("invariant: imageOptimizer should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E506",enumerable:!1,configurable:!0})}getPagePath(e,t){return nx(e,this.distDir,t,this.enabledDirectories.app)}async renderPageComponent(e,t){let r=this.getEdgeFunctionsPages()||[];if(r.length){let t=this.getOriginalAppPaths(e.pathname),n=Array.isArray(t),i=e.pathname;for(let a of(n&&(i=t[0]),r))if(a===i)return await this.runEdgeFunction({req:e.req,res:e.res,query:e.query,params:e.renderOpts.params,page:i,appPaths:t}),null}return super.renderPageComponent(e,t)}async findPageComponents({locale:e,page:t,query:r,params:n,isAppPath:i,url:a}){return(0,ta.getTracer)().trace(ts.Fx.findPageComponents,{spanName:"resolve page components",attributes:{"next.route":i?eQ(t):t}},()=>this.findPageComponentsImpl({locale:e,page:t,query:r,params:n,isAppPath:i,url:a}))}async findPageComponentsImpl({locale:e,page:t,query:r,params:n,isAppPath:i,url:a}){let s=[t];for(let a of(r.amp&&s.unshift((i?eQ(t):ry(t))+".amp"),e&&s.unshift(...s.map(t=>`/${e}${"/"===t?"":t}`)),s))try{let t=await nk({distDir:this.distDir,page:a,isAppPath:i,isDev:this.isDev,sriEnabled:this.sriEnabled});if(e&&"string"==typeof t.Component&&!a.startsWith(`/${e}/`)&&a!==`/${e}`)continue;return{components:t,query:{...!this.renderOpts.isExperimentalCompile&&t.getStaticProps?{amp:r.amp}:r,...(i?{}:n)||{}}}}catch(e){if(!(e instanceof Y))throw e}return null}getNextFontManifest(){return n_((0,l.join)(this.distDir,"server","next-font-manifest.json"))}logErrorWithOriginalStack(e,t){throw Object.defineProperty(Error("Invariant: logErrorWithOriginalStack can only be called on the development server"),"__NEXT_ERROR_CODE",{value:"E6",enumerable:!1,configurable:!0})}async ensurePage(e){throw Object.defineProperty(Error("Invariant: ensurePage can only be called on the development server"),"__NEXT_ERROR_CODE",{value:"E291",enumerable:!1,configurable:!0})}async handleApiRequest(e,t,r,n){return this.runApi(e,t,r,n)}getCacheFilesystem(){return nB}normalizeReq(e){return e instanceof ey?e:new ey(e)}normalizeRes(e){return e instanceof eb?e:new eb(e)}getRequestHandler(){return this.makeRequestHandler()}makeRequestHandler(){this.prepare().catch(e=>{console.error("Failed to prepare server",e)});let e=super.getRequestHandler();return(t,r,n)=>e(this.normalizeReq(t),this.normalizeRes(r),n)}async revalidate({urlPath:e,revalidateHeaders:t,opts:r}){let n=function({url:e,headers:t={},method:r="GET",bodyReadable:n,resWriter:i,socket:a=null}){return{req:new nG({url:e,headers:t,method:r,socket:a,readable:n}),res:new nV({socket:a,resWriter:i})}}({url:e,headers:t}),i=this.getRequestHandler();if(await i(new ey(n.req),new eb(n.res)),await n.res.hasStreamed,"REVALIDATED"!==n.res.getHeader("x-nextjs-cache")&&200!==n.res.statusCode&&!(404===n.res.statusCode&&r.unstable_onlyGenerated))throw Object.defineProperty(Error(`Invalid response ${n.res.statusCode}`),"__NEXT_ERROR_CODE",{value:"E175",enumerable:!1,configurable:!0})}async render(e,t,r,n,i,a=!1){return super.render(this.normalizeReq(e),this.normalizeRes(t),r,n,i,a)}async renderToHTML(e,t,r,n){return super.renderToHTML(this.normalizeReq(e),this.normalizeRes(t),r,n)}async renderErrorToResponseImpl(e,t){let{req:r,res:n,query:i}=e;return 404===n.statusCode&&this.enabledDirectories.app&&this.getEdgeFunctionsPages().includes(es)?(await this.runEdgeFunction({req:r,res:n,query:i||{},params:{},page:es,appPaths:null}),null):super.renderErrorToResponseImpl(e,t)}async renderError(e,t,r,n,i,a){return super.renderError(e,this.normalizeReq(t),this.normalizeRes(r),n,i,a)}async renderErrorToHTML(e,t,r,n,i){return super.renderErrorToHTML(e,this.normalizeReq(t),this.normalizeRes(r),n,i)}async render404(e,t,r,n){return super.render404(this.normalizeReq(e),this.normalizeRes(t),r,n)}getMiddlewareManifest(){return null}async getMiddleware(){var e,t;let r=this.getMiddlewareManifest(),n=null==r?void 0:null==(e=r.middleware)?void 0:e["/"];if(!n){let e=await this.loadNodeMiddleware();return e?{match:nI((null==(t=e.config)?void 0:t.matchers)||[{regexp:".*",originalSource:"/:path*"}]),page:"/"}:void 0}return{match:function(e){let t=n4.get(e);if(t)return t;if(!Array.isArray(e.matchers))throw Object.defineProperty(Error(`Invariant: invalid matchers for middleware ${JSON.stringify(e)}`),"__NEXT_ERROR_CODE",{value:"E257",enumerable:!1,configurable:!0});let r=nI(e.matchers);return n4.set(e,r),r}(n),page:"/"}}getEdgeFunctionsPages(){let e=this.getMiddlewareManifest();return e?Object.keys(e.functions):[]}getEdgeFunctionInfo(e){let t;let r=this.getMiddlewareManifest();if(!r)return null;try{t=rt(ry(e.page))}catch(e){return null}let n=e.middleware?r.middleware[t]:r.functions[t];if(!n){if(!e.middleware)throw new Y(t);return null}return{name:n.name,paths:n.files.map(e=>(0,l.join)(this.distDir,e)),wasm:(n.wasm??[]).map(e=>({...e,filePath:(0,l.join)(this.distDir,e.filePath)})),assets:n.assets&&n.assets.map(e=>({...e,filePath:(0,l.join)(this.distDir,e.filePath)})),env:n.env}}async loadNodeMiddleware(){if(this.nextConfig.experimental.nodeMiddleware)try{var e;let t=r("./dist/esm/server sync recursive")((0,l.join)(this.distDir,"server","functions-config-manifest.json"));if(null==t?void 0:null==(e=t.functions)?void 0:e["/_middleware"])return r("./dist/esm/server sync recursive")((0,l.join)(this.distDir,"server","middleware.js"))}catch(e){if(ro(e)&&"ENOENT"!==e.code&&"MODULE_NOT_FOUND"!==e.code)throw e}}async hasMiddleware(e){let t=this.getEdgeFunctionInfo({page:e,middleware:!0}),r=await this.loadNodeMiddleware();return!t&&!!r||!!(t&&t.paths.length>0)}async ensureMiddleware(e){}async ensureEdgeFunction(e){}async runMiddleware(e){throw Object.defineProperty(Error("invariant: runMiddleware should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E276",enumerable:!1,configurable:!0})}getPrerenderManifest(){var e;return this._cachedPreviewManifest||((this.renderOpts,(null==(e=this.serverOptions)?void 0:e.dev)||"phase-production-build"===process.env.NEXT_PHASE)?this._cachedPreviewManifest={version:4,routes:{},dynamicRoutes:{},notFoundRoutes:[],preview:{previewModeId:r("crypto").randomBytes(16).toString("hex"),previewModeSigningKey:r("crypto").randomBytes(32).toString("hex"),previewModeEncryptionKey:r("crypto").randomBytes(32).toString("hex")}}:this._cachedPreviewManifest=n_((0,l.join)(this.distDir,"prerender-manifest.json"))),this._cachedPreviewManifest}getRoutesManifest(){return(0,ta.getTracer)().trace(ts.Fx.getRoutesManifest,()=>{let e=n_((0,l.join)(this.distDir,"routes-manifest.json")),t=e.rewrites??{beforeFiles:[],afterFiles:[],fallback:[]};return Array.isArray(t)&&(t={beforeFiles:[],afterFiles:t,fallback:[]}),{...e,rewrites:t}})}attachRequestMeta(e,t,r){var n;let i=(null==(n=e.headers["x-forwarded-proto"])?void 0:n.includes("https"))?"https":"http",a=this.fetchHostname&&this.port?`${i}://${this.fetchHostname}:${this.port}${e.url}`:this.nextConfig.experimental.trustHostHeader?`https://${e.headers.host||"localhost"}${e.url}`:e.url;er(e,"initURL",a),er(e,"initQuery",{...t.query}),er(e,"initProtocol",i),r||er(e,"clonableBody",function(e){let t=null,r=new Promise((t,r)=>{e.on("end",t),e.on("error",r)}).catch(e=>({error:e}));return{async finalize(){if(t){let n=await r;if(n&&"object"==typeof n&&n.error)throw n.error;(function(e,t){for(let r in t){let n=t[r];"function"==typeof n&&(n=n.bind(e)),e[r]=n}})(e,t),t=e}},cloneBodyStream(){let r=t??e,n=new nq.PassThrough,i=new nq.PassThrough;return r.on("data",e=>{n.push(e),i.push(e)}),r.on("end",()=>{n.push(null),i.push(null)}),t=i,n}}}(e.originalRequest))}async runEdgeFunction(e){throw Object.defineProperty(Error("Middleware is not supported in minimal mode. Please remove the `NEXT_MINIMAL` environment variable."),"__NEXT_ERROR_CODE",{value:"E58",enumerable:!1,configurable:!0})}get serverDistDir(){if(this._serverDistDir)return this._serverDistDir;let e=(0,l.join)(this.distDir,eu);return this._serverDistDir=e,e}async getFallbackErrorComponents(e){return null}async instrumentationOnRequestError(...e){await super.instrumentationOnRequestError(...e),this.logError(e[0])}onServerClose(e){this.cleanupListeners.add(e)}async close(){await this.cleanupListeners.runAll()}getInternalWaitUntil(){return this.internalWaitUntil??=this.createInternalWaitUntil(),this.internalWaitUntil}createInternalWaitUntil(){throw Object.defineProperty(new L("createInternalWaitUntil should never be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E540",enumerable:!1,configurable:!0})}}})(),module.exports=n})();
|
30
|
+
`)}}var tC=r("./dist/esm/server/web/spec-extension/cookies.js");let tP=Symbol("internal request");class tS extends Request{constructor(e,t={}){let r="string"!=typeof e&&"url"in e?e.url:String(e);tl(r),t.body&&"half"!==t.duplex&&(t.duplex="half"),e instanceof Request?super(e,t):super(r,t);let n=new tw(r,{headers:to(this.headers),nextConfig:t.nextConfig});this[tP]={cookies:new tC.tm(this.headers),nextUrl:n,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?r:n.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[tP].cookies}get nextUrl(){return this[tP].nextUrl}get page(){throw new tR}get ua(){throw new tO}get url(){return this[tP].url}}let tT=e=>!0,tA=e=>!0,tj="ResponseAborted";class tD extends Error{constructor(...e){super(...e),this.name=tj}}function tN(e){let t=new AbortController;return e.once("close",()=>{e.writableFinished||t.abort(new tD)}),t}class tk{static fromBaseNextRequest(e,t){if(tT(e))return tk.fromNodeNextRequest(e,t);throw Object.defineProperty(Error("Invariant: Unsupported NextRequest type"),"__NEXT_ERROR_CODE",{value:"E345",enumerable:!1,configurable:!0})}static fromNodeNextRequest(e,t){let r,n=null;if("GET"!==e.method&&"HEAD"!==e.method&&e.body&&(n=e.body),e.url.startsWith("http"))r=new URL(e.url);else{let t=et(e,"initURL");r=t&&t.startsWith("http")?new URL(e.url,t):new URL(e.url,"http://n")}return new tS(r,{method:e.method,headers:ts(e.headers),duplex:"half",signal:t,...t.aborted?{}:{body:n}})}static fromWebNextRequest(e){let t=null;return"GET"!==e.method&&"HEAD"!==e.method&&(t=e.body),new tS(e.url,{method:e.method,headers:ts(e.headers),duplex:"half",signal:e.request.signal,...e.request.signal.aborted?{}:{body:t}})}}let tI=0,tM=0,tL=0;function tq(e){return(null==e?void 0:e.name)==="AbortError"||(null==e?void 0:e.name)===tj}async function t$(e,t,r){try{let{errored:n,destroyed:i}=t;if(n||i)return;let s=tN(t),a=function(e,t){let r=!1,n=new e2;function i(){n.resolve()}e.on("drain",i),e.once("close",()=>{e.off("drain",i),n.resolve()});let s=new e2;return e.once("finish",()=>{s.resolve()}),new WritableStream({write:async t=>{if(!r){if(r=!0,"performance"in globalThis&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX){let e=function(e={}){let t=0===tI?void 0:{clientComponentLoadStart:tI,clientComponentLoadTimes:tM,clientComponentLoadCount:tL};return e.reset&&(tI=0,tM=0,tL=0),t}();e&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,{start:e.clientComponentLoadStart,end:e.clientComponentLoadStart+e.clientComponentLoadTimes})}e.flushHeaders(),(0,e9.getTracer)().trace(e7.Fx.startResponse,{spanName:"start response"},()=>void 0)}try{let r=e.write(t);"flush"in e&&"function"==typeof e.flush&&e.flush(),r||(await n.promise,n=new e2)}catch(t){throw e.end(),Object.defineProperty(Error("failed to write chunk to response",{cause:t}),"__NEXT_ERROR_CODE",{value:"E321",enumerable:!1,configurable:!0})}},abort:t=>{e.writableFinished||e.destroy(t)},close:async()=>{if(t&&await t,!e.writableFinished)return e.end(),s.promise}})}(t,r);await e.pipeTo(a,{signal:s.signal})}catch(e){if(tq(e))return;throw Object.defineProperty(Error("failed to pipe response",{cause:e}),"__NEXT_ERROR_CODE",{value:"E180",enumerable:!1,configurable:!0})}}class tF{static fromStatic(e){return new tF(e,{metadata:{}})}constructor(e,{contentType:t,waitUntil:r,metadata:n}){this.response=e,this.contentType=t,this.metadata=n,this.waitUntil=r}assignMetadata(e){Object.assign(this.metadata,e)}get isNull(){return null===this.response}get isDynamic(){return"string"!=typeof this.response}toUnchunkedBuffer(e=!1){if(null===this.response)throw Object.defineProperty(Error("Invariant: null responses cannot be unchunked"),"__NEXT_ERROR_CODE",{value:"E274",enumerable:!1,configurable:!0});if("string"!=typeof this.response){if(!e)throw Object.defineProperty(Error("Invariant: dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E81",enumerable:!1,configurable:!0});return tn(this.readable)}return Buffer.from(this.response)}toUnchunkedString(e=!1){if(null===this.response)throw Object.defineProperty(Error("Invariant: null responses cannot be unchunked"),"__NEXT_ERROR_CODE",{value:"E274",enumerable:!1,configurable:!0});if("string"!=typeof this.response){if(!e)throw Object.defineProperty(Error("Invariant: dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E81",enumerable:!1,configurable:!0});return ti(this.readable)}return this.response}get readable(){if(null===this.response)throw Object.defineProperty(Error("Invariant: null responses cannot be streamed"),"__NEXT_ERROR_CODE",{value:"E14",enumerable:!1,configurable:!0});if("string"==typeof this.response)throw Object.defineProperty(Error("Invariant: static responses cannot be streamed"),"__NEXT_ERROR_CODE",{value:"E151",enumerable:!1,configurable:!0});return Buffer.isBuffer(this.response)?tr(this.response):Array.isArray(this.response)?function(...e){if(0===e.length)throw Object.defineProperty(Error("Invariant: chainStreams requires at least one stream"),"__NEXT_ERROR_CODE",{value:"E437",enumerable:!1,configurable:!0});if(1===e.length)return e[0];let{readable:t,writable:r}=new TransformStream,n=e[0].pipeTo(r,{preventClose:!0}),i=1;for(;i<e.length-1;i++){let t=e[i];n=n.then(()=>t.pipeTo(r,{preventClose:!0}))}let s=e[i];return(n=n.then(()=>s.pipeTo(r))).catch(te),t}(...this.response):this.response}chain(e){var t;let r;if(null===this.response)throw Object.defineProperty(Error("Invariant: response is null. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E258",enumerable:!1,configurable:!0});"string"==typeof this.response?r=[(t=this.response,new ReadableStream({start(e){e.enqueue(tt.encode(t)),e.close()}}))]:Array.isArray(this.response)?r=this.response:Buffer.isBuffer(this.response)?r=[tr(this.response)]:r=[this.response],r.push(e),this.response=r}async pipeTo(e){try{await this.readable.pipeTo(e,{preventClose:!0}),this.waitUntil&&await this.waitUntil,await e.close()}catch(t){if(tq(t)){await e.abort(t);return}throw t}}async pipeToNodeResponse(e){await t$(this.readable,e,this.waitUntil)}}var tH=/*#__PURE__*/function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({});async function tz(e){var t,r;return{...e,value:(null==(t=e.value)?void 0:t.kind)===e5.PAGES?{kind:e5.PAGES,html:await e.value.html.toUnchunkedString(!0),pageData:e.value.pageData,headers:e.value.headers,status:e.value.status}:(null==(r=e.value)?void 0:r.kind)===e5.APP_PAGE?{kind:e5.APP_PAGE,html:await e.value.html.toUnchunkedString(!0),postponed:e.value.postponed,rscData:e.value.rscData,headers:e.value.headers,status:e.value.status,segmentData:e.value.segmentData}:e.value}}async function tU(e){var t,r;return e?{isMiss:e.isMiss,isStale:e.isStale,cacheControl:e.cacheControl,isFallback:e.isFallback,value:(null==(t=e.value)?void 0:t.kind)===e5.PAGES?{kind:e5.PAGES,html:tF.fromStatic(e.value.html),pageData:e.value.pageData,headers:e.value.headers,status:e.value.status}:(null==(r=e.value)?void 0:r.kind)===e5.APP_PAGE?{kind:e5.APP_PAGE,html:tF.fromStatic(e.value.html),rscData:e.value.rscData,headers:e.value.headers,status:e.value.status,postponed:e.value.postponed,segmentData:e.value.segmentData}:e.value}:null}class tX{constructor(e){this.batcher=e3.create({cacheKeyFn:({key:e,isOnDemandRevalidate:t})=>`${e}-${t?"1":"0"}`,schedulerFn:e8}),this.minimalMode=e}async get(e,t,r){if(!e)return t({hasResolved:!1,previousCacheEntry:null});let{incrementalCache:n,isOnDemandRevalidate:i=!1,isFallback:s=!1,isRoutePPREnabled:a=!1}=r;return tU(await this.batcher.batch({key:e,isOnDemandRevalidate:i},async(o,l)=>{var c;if((null==(c=this.previousCacheItem)?void 0:c.key)===o&&this.previousCacheItem.expiresAt>Date.now())return this.previousCacheItem.entry;!function(e){switch(e){case tH.PAGES:return e6.PAGES;case tH.APP_PAGE:return e6.APP_PAGE;case tH.IMAGE:return e6.IMAGE;case tH.APP_ROUTE:return e6.APP_ROUTE;default:throw Object.defineProperty(Error(`Unexpected route kind ${e}`),"__NEXT_ERROR_CODE",{value:"E64",enumerable:!1,configurable:!0})}}(r.routeKind);let u=!1,h=null;try{h=null;let e=await t({hasResolved:u,previousCacheEntry:h,isRevalidating:!0});if(!e)return this.previousCacheItem=void 0,null;let r=await tz({...e,isMiss:!h});if(!r)return this.previousCacheItem=void 0,null;return i||u||(l(r),u=!0),r.cacheControl&&(this.previousCacheItem={key:o,entry:r,expiresAt:Date.now()+1e3}),r}catch(t){if(null==h?void 0:h.cacheControl){let t=Math.min(Math.max(h.cacheControl.revalidate||3,3),30),r=void 0===h.cacheControl.expire?void 0:Math.max(t+3,h.cacheControl.expire);await n.set(e,h.value,{cacheControl:{revalidate:t,expire:r},isRoutePPREnabled:a,isFallback:s})}if(u)return console.error(t),null;throw t}}))}}let tW="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",tB=`(${tW}[.]){3}${tW}`,tG="(?:[0-9a-fA-F]{1,4})",tV=RegExp(`^((?:${tG}:){7}(?:${tG}|:)|(?:${tG}:){6}(?:${tB}|:${tG}|:)|(?:${tG}:){5}(?::${tB}|(:${tG}){1,2}|:)|(?:${tG}:){4}(?:(:${tG}){0,1}:${tB}|(:${tG}){1,3}|:)|(?:${tG}:){3}(?:(:${tG}){0,2}:${tB}|(:${tG}){1,4}|:)|(?:${tG}:){2}(?:(:${tG}){0,3}:${tB}|(:${tG}){1,5}|:)|(?:${tG}:){1}(?:(:${tG}){0,4}:${tB}|(:${tG}){1,6}|:)|(?::((?::${tG}){0,5}:${tB}|(?::${tG}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?$`),tK=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,tJ=/\/\[[^/]+\](?=\/|$)/;function tY(e,t){return(void 0===t&&(t=!0),eV(e)&&(e=function(e){let t,r,n;for(let i of e.split("/"))if(r=eG.find(e=>i.startsWith(e))){[t,n]=e.split(r,2);break}if(!t||!r||!n)throw Object.defineProperty(Error("Invalid interception route: "+e+". Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>"),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(t=eW(t),r){case"(.)":n="/"===t?"/"+n:t+"/"+n;break;case"(..)":if("/"===t)throw Object.defineProperty(Error("Invalid interception route: "+e+". Cannot use (..) marker at the root level, use (.) instead."),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});n=t.split("/").slice(0,-1).concat(n).join("/");break;case"(...)":n="/"+n;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Object.defineProperty(Error("Invalid interception route: "+e+". Cannot use (..)(..) marker at the root level or one level up."),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});n=i.slice(0,-2).concat(n).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:t,interceptedRoute:n}}(e).interceptedRoute),t)?tJ.test(e):tK.test(e)}let tQ=require("next/dist/shared/lib/runtime-config.external.js"),tZ=/Mediapartners-Google|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview/i,t0=/Googlebot|Google-PageRenderer|AdsBot-Google|googleweblight|Storebot-Google/i,t1=tZ.source;function t4(e){return t0.test(e)||tZ.test(e)}function t2(e){return t0.test(e)?"dom":tZ.test(e)?"html":void 0}function t3(e){let t=e.replace(/\\/g,"/");return t.startsWith("/index/")&&!tY(t)?t.slice(6):"/index"!==t?t:"/"}var t8=r("./dist/compiled/path-to-regexp/index.js");function t5(e,t){let r=[],n=(0,t8.pathToRegexp)(e,r,{delimiter:"/",sensitive:"boolean"==typeof(null==t?void 0:t.sensitive)&&t.sensitive,strict:null==t?void 0:t.strict}),i=(0,t8.regexpToFunction)((null==t?void 0:t.regexModifier)?new RegExp(t.regexModifier(n.source),n.flags):n,r);return(e,n)=>{if("string"!=typeof e)return!1;let s=i(e);if(!s)return!1;if(null==t?void 0:t.removeUnnamedParams)for(let e of r)"number"==typeof e.name&&delete s.params[e.name];return{...n,...s.params}}}function t6(e){return e.replace(/__ESC_COLON_/gi,":")}function t9(e,t,r,n){void 0===r&&(r=[]),void 0===n&&(n=[]);let i={},s=r=>{let n;let s=r.key;switch(r.type){case"header":s=s.toLowerCase(),n=e.headers[s];break;case"cookie":n="cookies"in e?e.cookies[r.key]:el(e.headers)()[r.key];break;case"query":n=t[s];break;case"host":{let{host:t}=(null==e?void 0:e.headers)||{};n=null==t?void 0:t.split(":",1)[0].toLowerCase()}}if(!r.value&&n)return i[function(e){let t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);(n>64&&n<91||n>96&&n<123)&&(t+=e[r])}return t}(s)]=n,!0;if(n){let e=RegExp("^"+r.value+"$"),t=Array.isArray(n)?n.slice(-1)[0].match(e):n.match(e);if(t)return Array.isArray(t)&&(t.groups?Object.keys(t.groups).forEach(e=>{i[e]=t.groups[e]}):"host"===r.type&&t[0]&&(i.host=t[0])),!0}return!1};return!!r.every(e=>s(e))&&!n.some(e=>s(e))&&i}function t7(e,t){if(!e.includes(":"))return e;for(let r of Object.keys(t))e.includes(":"+r)&&(e=e.replace(RegExp(":"+r+"\\*","g"),":"+r+"--ESCAPED_PARAM_ASTERISKS").replace(RegExp(":"+r+"\\?","g"),":"+r+"--ESCAPED_PARAM_QUESTION").replace(RegExp(":"+r+"\\+","g"),":"+r+"--ESCAPED_PARAM_PLUS").replace(RegExp(":"+r+"(?!\\w)","g"),"--ESCAPED_PARAM_COLON"+r));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),(0,t8.compile)("/"+e,{validate:!1})(t).slice(1)}function re(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function rt(e){return re(e)?e:Object.defineProperty(Error(!function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}(e)?e+"":function(e){let t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))return"[Circular]";t.add(r)}return r})}(e)),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}class rr{constructor(e){this.provider=e}normalize(e){return this.provider.analyze(e).pathname}}class rn{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").'),"__NEXT_ERROR_CODE",{value:"E458",enumerable:!1,configurable:!0});r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Object.defineProperty(Error("Catch-all must be the last part of the URL."),"__NEXT_ERROR_CODE",{value:"E392",enumerable:!1,configurable:!0});let n=e[0];if(n.startsWith("[")&&n.endsWith("]")){let s=n.slice(1,-1),a=!1;if(s.startsWith("[")&&s.endsWith("]")&&(s=s.slice(1,-1),a=!0),s.startsWith("…"))throw Object.defineProperty(Error("Detected a three-dot character ('…') at ('"+s+"'). Did you mean ('...')?"),"__NEXT_ERROR_CODE",{value:"E147",enumerable:!1,configurable:!0});if(s.startsWith("...")&&(s=s.substring(3),r=!0),s.startsWith("[")||s.endsWith("]"))throw Object.defineProperty(Error("Segment names may not start or end with extra brackets ('"+s+"')."),"__NEXT_ERROR_CODE",{value:"E421",enumerable:!1,configurable:!0});if(s.startsWith("."))throw Object.defineProperty(Error("Segment names may not start with erroneous periods ('"+s+"')."),"__NEXT_ERROR_CODE",{value:"E288",enumerable:!1,configurable:!0});function i(e,r){if(null!==e&&e!==r)throw Object.defineProperty(Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"')."),"__NEXT_ERROR_CODE",{value:"E337",enumerable:!1,configurable:!0});t.forEach(e=>{if(e===r)throw Object.defineProperty(Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E247",enumerable:!1,configurable:!0});if(e.replace(/\W/g,"")===n.replace(/\W/g,""))throw Object.defineProperty(Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E499",enumerable:!1,configurable:!0})}),t.push(r)}if(r){if(a){if(null!=this.restSlugName)throw Object.defineProperty(Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).'),"__NEXT_ERROR_CODE",{value:"E299",enumerable:!1,configurable:!0});i(this.optionalRestSlugName,s),this.optionalRestSlugName=s,n="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").'),"__NEXT_ERROR_CODE",{value:"E300",enumerable:!1,configurable:!0});i(this.restSlugName,s),this.restSlugName=s,n="[...]"}}else{if(a)throw Object.defineProperty(Error('Optional route parameters are not yet supported ("'+e[0]+'").'),"__NEXT_ERROR_CODE",{value:"E435",enumerable:!1,configurable:!0});i(this.slugName,s),this.slugName=s,n="[]"}}this.children.has(n)||this.children.set(n,new rn),this.children.get(n)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}class ri{constructor(e){this.definition=e,tY(e.pathname)&&(this.dynamic=Z(e1(e.pathname)))}get identity(){return this.definition.pathname}get isDynamic(){return void 0!==this.dynamic}match(e){let t=this.test(e);return t?{definition:this.definition,params:t.params}:null}test(e){if(this.dynamic){let t=this.dynamic(e);return t?{params:t}:null}return e===this.definition.pathname?{}:null}}class rs extends ri{get identity(){var e;return`${this.definition.pathname}?__nextLocale=${null==(e=this.definition.i18n)?void 0:e.locale}`}match(e,t){var r,n;let i=this.test(e,t);return i?{definition:this.definition,params:i.params,detectedLocale:(null==t?void 0:null==(r=t.i18n)?void 0:r.detectedLocale)??(null==(n=this.definition.i18n)?void 0:n.locale)}:null}test(e,t){return this.definition.i18n&&(null==t?void 0:t.i18n)?this.definition.i18n.locale&&t.i18n.detectedLocale&&this.definition.i18n.locale!==t.i18n.detectedLocale?null:super.test(t.i18n.pathname):super.test(e)}}class ra{get compilationID(){return this.providers.length}async waitTillReady(){this.waitTillReadyPromise&&(await this.waitTillReadyPromise,delete this.waitTillReadyPromise)}async reload(){let{promise:e,resolve:t,reject:r}=new e2;this.waitTillReadyPromise=e;let n=this.compilationID;try{let e=[],t=await Promise.all(this.providers.map(e=>e.matchers())),r=new Map,i={};for(let n of t)for(let t of n){t.duplicated&&delete t.duplicated;let n=r.get(t.definition.pathname);if(n){let e=i[t.definition.pathname]??[n];e.push(t),i[t.definition.pathname]=e,n.duplicated=e,t.duplicated=e}e.push(t),r.set(t.definition.pathname,t)}if(this.matchers.duplicates=i,this.previousMatchers.length===e.length&&this.previousMatchers.every((t,r)=>t===e[r]))return;this.previousMatchers=e,this.matchers.static=e.filter(e=>!e.isDynamic);let s=e.filter(e=>e.isDynamic),a=new Map,o=[];for(let e=0;e<s.length;e++){let t=s[e].definition.pathname,r=a.get(t)??[];r.push(e),1===r.length&&(a.set(t,r),o.push(t))}let l=function(e){let t=new rn;return e.forEach(e=>t.insert(e)),t.smoosh()}(o),c=[];for(let e of l){let t=a.get(e);if(!Array.isArray(t))throw Object.defineProperty(Error("Invariant: expected to find identity in indexes map"),"__NEXT_ERROR_CODE",{value:"E271",enumerable:!1,configurable:!0});let r=t.map(e=>s[e]);c.push(...r)}if(this.matchers.dynamic=c,this.compilationID!==n)throw Object.defineProperty(Error("Invariant: expected compilation to finish before new matchers were added, possible missing await"),"__NEXT_ERROR_CODE",{value:"E242",enumerable:!1,configurable:!0})}catch(e){r(e)}finally{this.lastCompilationID=n,t()}}push(e){this.providers.push(e)}async test(e,t){return null!==await this.match(e,t)}async match(e,t){for await(let r of this.matchAll(e,t))return r;return null}validate(e,t,r){var n;return t instanceof rs?t.match(e,r):(null==(n=r.i18n)?void 0:n.inferredFromDefault)?t.match(r.i18n.pathname):t.match(e)}async *matchAll(e,t){if(this.lastCompilationID!==this.compilationID)throw Object.defineProperty(Error("Invariant: expected routes to have been loaded before match"),"__NEXT_ERROR_CODE",{value:"E235",enumerable:!1,configurable:!0});if(!tY(e=eX(e)))for(let r of this.matchers.static){let n=this.validate(e,r,t);n&&(yield n)}if(null==t?void 0:t.skipDynamic)return null;for(let r of this.matchers.dynamic){let n=this.validate(e,r,t);n&&(yield n)}return null}constructor(){this.providers=[],this.matchers={static:[],dynamic:[],duplicates:{}},this.lastCompilationID=this.compilationID,this.previousMatchers=[]}}class ro{constructor(e=[]){this.normalizers=e}push(e){this.normalizers.push(e)}normalize(e){return this.normalizers.reduce((e,t)=>t.normalize(e),e)}}var rl=r("./dist/esm/shared/lib/isomorphic/path.js"),rc=/*#__PURE__*/r.n(rl);class ru{constructor(...e){this.prefix=rc().posix.join(...e)}normalize(e){return rc().posix.join(this.prefix,e)}}function rh(e){let t=/^\/index(\/|$)/.test(e)&&!tY(e)?"/index"+e:"/"===e?"/index":eX(e);{let{posix:e}=r("path"),n=e.normalize(t);if(n!==t)throw new J("Requested and resolved page mismatch: "+t+" "+n)}return t}class rd extends ru{constructor(){super("app")}normalize(e){return super.normalize(rh(e))}}class rp extends ru{constructor(e){super(e,ei.k4)}normalize(e){return super.normalize(e)}}function rf(e){return{normalize:e}}class rm{normalize(e){return e.replace(/%5F/g,"_")}}class rg extends ro{constructor(){super([rf(eW),new rm])}normalize(e){return super.normalize(e)}}class rv{constructor(e){this.filename=new rp(e),this.pathname=new rg,this.bundlePath=new rd}}class ry extends ri{get identity(){return`${this.definition.pathname}?__nextPage=${this.definition.page}`}}class rb{constructor(e){this.loader=e,this.cached=[]}async matchers(){let e=await this.loader.load();if(!e)return[];if(this.data&&this.loader.compare(this.data,e))return this.cached;this.data=e;let t=await this.transform(e);return this.cached=t,t}}class rE extends rb{constructor(e,t){super({load:async()=>t.load(e),compare:(e,t)=>e===t})}}class r_ extends rE{constructor(e,t){super(ei.XB,t),this.normalizers=new rv(e)}async transform(e){let t=Object.keys(e).filter(e=>e.endsWith("/page")),r={};for(let e of t){let t=this.normalizers.pathname.normalize(e);t in r?r[t].push(e):r[t]=[e]}let n=[];for(let[t,i]of Object.entries(r)){let r=i[0],s=this.normalizers.filename.normalize(e[r]),a=this.normalizers.bundlePath.normalize(r);n.push(new ry({kind:tH.APP_PAGE,pathname:t,page:r,bundlePath:a,filename:s,appPaths:i}))}return n}}class rw extends ri{}class rx extends rE{constructor(e,t){super(ei.XB,t),this.normalizers=new rv(e)}async transform(e){let t=Object.keys(e).filter(e=>e.endsWith("/route")),r=[];for(let n of t){let t=this.normalizers.filename.normalize(e[n]),i=this.normalizers.pathname.normalize(n),s=this.normalizers.bundlePath.normalize(n);r.push(new rw({kind:tH.APP_ROUTE,pathname:i,page:n,bundlePath:s,filename:t}))}return r}}function rR(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}class rO extends ri{}class rC extends rs{}class rP extends ro{constructor(){super([rf(rh),new ru("pages")])}normalize(e){return super.normalize(e)}}class rS extends ru{constructor(e){super(e,ei.k4)}normalize(e){return super.normalize(e)}}class rT{constructor(e){this.filename=new rS(e),this.bundlePath=new rP}}class rA extends rE{constructor(e,t,r){super(ei.Fy,t),this.i18nProvider=r,this.normalizers=new rT(e)}async transform(e){let t=Object.keys(e).filter(e=>rR(e)),r=[];for(let n of t)if(this.i18nProvider){let{detectedLocale:t,pathname:i}=this.i18nProvider.analyze(n);r.push(new rC({kind:tH.PAGES_API,pathname:i,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n]),i18n:{locale:t}}))}else r.push(new rO({kind:tH.PAGES_API,pathname:n,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n])}));return r}}class rj extends ri{}class rD extends rs{}class rN extends rE{constructor(e,t,r){super(ei.Fy,t),this.i18nProvider=r,this.normalizers=new rT(e)}async transform(e){let t=Object.keys(e).filter(e=>!rR(e)).filter(e=>{var t;let r=(null==(t=this.i18nProvider)?void 0:t.analyze(e).pathname)??e;return!ei.qY.includes(r)}),r=[];for(let n of t)if(this.i18nProvider){let{detectedLocale:t,pathname:i}=this.i18nProvider.analyze(n);r.push(new rD({kind:tH.PAGES,pathname:i,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n]),i18n:{locale:t}}))}else r.push(new rj({kind:tH.PAGES,pathname:n,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n])}));return r}}class rk{constructor(e){this.getter=e}load(e){return this.getter(e)}}class rI{constructor(e){var t;if(this.config=e,!e.locales.length)throw Object.defineProperty(Error("Invariant: No locales provided"),"__NEXT_ERROR_CODE",{value:"E510",enumerable:!1,configurable:!0});this.lowerCaseLocales=e.locales.map(e=>e.toLowerCase()),this.lowerCaseDomains=null==(t=e.domains)?void 0:t.map(e=>{var t;let r=e.domain.toLowerCase();return{defaultLocale:e.defaultLocale.toLowerCase(),hostname:r.split(":",1)[0],domain:r,locales:null==(t=e.locales)?void 0:t.map(e=>e.toLowerCase()),http:e.http}})}detectDomainLocale(e,t){if(e&&this.lowerCaseDomains&&this.config.domains){t&&(t=t.toLowerCase());for(let n=0;n<this.lowerCaseDomains.length;n++){var r;let i=this.lowerCaseDomains[n];if(i.hostname===e||(null==(r=i.locales)?void 0:r.some(e=>e===t)))return this.config.domains[n]}}}fromRequest(e,t){let r=et(e,"locale");if(r){let e=this.analyze(t);if(e.detectedLocale){if(e.detectedLocale!==r)throw Object.defineProperty(Error(`Invariant: The detected locale does not match the locale in the query. Expected to find '${r}' in '${t}' but found '${e.detectedLocale}'}`),"__NEXT_ERROR_CODE",{value:"E517",enumerable:!1,configurable:!0});t=e.pathname}}return{pathname:t,detectedLocale:r,inferredFromDefault:et(e,"localeInferredFromDefault")??!1}}analyze(e,t={}){let r=t.defaultLocale,n="string"==typeof r,i=e.split("/",2);if(!i[1])return{detectedLocale:r,pathname:e,inferredFromDefault:n};let s=i[1].toLowerCase(),a=this.lowerCaseLocales.indexOf(s);return a<0||(r=this.config.locales[a],n=!1,e=e.slice(r.length+1)||"/"),{detectedLocale:r,pathname:e,inferredFromDefault:n}}}async function rM(e,t,r,n){if(tA(t)){var i;t.statusCode=r.status,t.statusMessage=r.statusText;let s=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(i=r.headers)||i.forEach((e,r)=>{if("x-middleware-set-cookie"!==r.toLowerCase()){if("set-cookie"===r.toLowerCase())for(let n of ta(e))t.appendHeader(r,n);else{let n=void 0!==t.getHeader(r);(s.includes(r.toLowerCase())||!n)&&t.appendHeader(r,e)}}});let{originalResponse:a}=t;r.body&&"HEAD"!==e.method?await t$(r.body,a,n):a.end()}}let rL=t5("/_next/data/:path*");function rq(e){return e.split("/").map(e=>{try{e=decodeURIComponent(e).replace(RegExp("([/#?]|%(2f|23|3f|5c))","gi"),e=>encodeURIComponent(e))}catch(e){throw Object.defineProperty(new K("Failed to decode path param(s)."),"__NEXT_ERROR_CODE",{value:"E539",enumerable:!1,configurable:!0})}return e}).join("/")}class r${constructor(e){this.suffix=e}match(e){return!!e.endsWith(this.suffix)}normalize(e,t){return t||this.match(e)?e.substring(0,e.length-this.suffix.length):e}}class rF extends r${constructor(){super(ev.RM)}}function rH(e){for(let t of eR)delete e[t.toLowerCase()]}function rz(e){return e.definition.kind===tH.APP_PAGE}function rU(e){return e.definition.kind===tH.PAGES}class rX extends r${constructor(){super(ev.pu)}match(e){return e==="/__index"+ev.pu||super.match(e)}normalize(e,t){return e==="/__index"+ev.pu?"/":super.normalize(e,t)}}class rW{constructor(e){if(this.prefix=e,e.endsWith("/"))throw Object.defineProperty(Error(`PrefixPathnameNormalizer: prefix "${e}" should not end with a slash`),"__NEXT_ERROR_CODE",{value:"E219",enumerable:!1,configurable:!0})}match(e){return!!(e===this.prefix||e.startsWith(this.prefix+"/"))}normalize(e,t){return t||this.match(e)?e.length===this.prefix.length?"/":e.substring(this.prefix.length):e}}class rB{constructor(e){if(this.suffix=new r$(".json"),!e)throw Object.defineProperty(Error("Invariant: buildID is required"),"__NEXT_ERROR_CODE",{value:"E200",enumerable:!1,configurable:!0});this.prefix=new rW(`/_next/data/${e}`)}match(e){return this.prefix.match(e)&&this.suffix.match(e)}normalize(e,t){return t||this.match(e)?(e=this.prefix.normalize(e,!0),t3(e=this.suffix.normalize(e,!0))):e}}function rG(e){return e.replace(/(?:\/index)?\/?$/,"")||"/"}let rV=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0}),rK="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage,rJ=Symbol.for("@next/request-context");Symbol("response"),Symbol("passThrough"),Symbol("waitUntil");var rY=r("./dist/esm/server/web/spec-extension/adapters/reflect.js");let rQ=Symbol("internal response"),rZ=new Set([301,302,303,307,308]);function r0(e,t){var r;if(null==e?void 0:null==(r=e.request)?void 0:r.headers){if(!(e.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 r=[];for(let[n,i]of e.request.headers)t.set("x-middleware-request-"+n,i),r.push(n);t.set("x-middleware-override-headers",r.join(","))}}class r1 extends Response{constructor(e,t={}){super(e,t);let r=this.headers,n=new Proxy(new tC.VO(r),{get(e,n,i){switch(n){case"delete":case"set":return(...i)=>{let s=Reflect.apply(e[n],e,i),a=new Headers(r);return s instanceof tC.VO&&r.set("x-middleware-set-cookie",s.getAll().map(e=>(0,tC.Ud)(e)).join(",")),r0(t,a),s};default:return rY.l.get(e,n,i)}}});this[rQ]={cookies:n,url:t.url?new tw(t.url,{headers:to(r),nextConfig:t.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[rQ].cookies}static json(e,t){let r=Response.json(e,t);return new r1(r.body,r)}static redirect(e,t){let r="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!rZ.has(r))throw Object.defineProperty(RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,configurable:!0});let n="object"==typeof t?t:{},i=new Headers(null==n?void 0:n.headers);return i.set("Location",tl(e)),new r1(null,{...n,headers:i,status:r})}static rewrite(e,t){let r=new Headers(null==t?void 0:t.headers);return r.set("x-middleware-rewrite",tl(e)),r0(t,r),new r1(null,{...t,headers:r})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),r0(e,t),new r1(null,{...e,headers:t})}}r("./dist/esm/server/web/spec-extension/adapters/headers.js");class r4 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 r4}}Symbol.for("next.mutated.cookies"),r("./dist/compiled/p-queue/index.js"),require("next/dist/server/app-render/after-task-async-storage.external.js");class r2 extends tS{constructor(e){super(e.input,e.init),this.sourcePage=e.page}get request(){throw Object.defineProperty(new tx({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}respondWith(){throw Object.defineProperty(new tx({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}waitUntil(){throw Object.defineProperty(new tx({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}}function r3(e){return e.isOnDemandRevalidate?"on-demand":e.isRevalidate?"stale":void 0}var r8=/*#__PURE__*/function(e){return e.BLOCKING_STATIC_RENDER="BLOCKING_STATIC_RENDER",e.PRERENDER="PRERENDER",e.NOT_FOUND="NOT_FOUND",e}({});let r5=RegExp(`^(/.*)${ev.mH}(/.*)${ev.tz}$`);class r6{match(e){return r5.test(e)}extract(e){let t=e.match(r5);return t?{originalPathname:t[1],segmentPath:t[2]}:null}normalize(e){let t=this.extract(e);return t?t.originalPathname:e}}let r9=require("next/dist/server/lib/incremental-cache/tags-manifest.external.js"),r7=new eA(0x3200000,e=>e.size),ne=new Map,nt={async get(e,t){await ne.get(e);let r=r7.get(e);if(!r)return;let n=r.entry;if(performance.timeOrigin+performance.now()>n.timestamp+1e3*n.revalidate||(0,r9.isTagStale)(n.tags,n.timestamp)||(0,r9.isTagStale)(t,n.timestamp))return;let[i,s]=n.value.tee();return n.value=s,{...n,value:i}},async set(e,t){let r=()=>{},n=new Promise(e=>{r=e});ne.set(e,n);let i=await t,s=0;try{let[t,r]=i.value.tee();i.value=t;let n=r.getReader();for(let e;!(e=await n.read()).done;)s+=Buffer.from(e.value).byteLength;r7.set(e,{entry:i,isErrored:!1,errorRetryCount:0,size:s})}catch{}finally{r(),ne.delete(e)}},async expireTags(...e){for(let t of e)r9.tagsManifest.items[t]||(r9.tagsManifest.items[t]={}),r9.tagsManifest.items[t].revalidatedAt=Date.now()},async receiveExpiredTags(...e){return this.expireTags(...e)}},nr=process.env.NEXT_PRIVATE_DEBUG_USE_CACHE?(e,...t)=>{console.log(`use-cache[${process.pid}]: ${e}`,...t)}:()=>{},nn=Symbol.for("@next/cache-handlers"),ni=Symbol.for("@next/cache-handlers-map"),ns=Symbol.for("@next/cache-handlers-set"),na=globalThis;function no(){if(na[ns])return na[ns].values()}class nl extends Error{}class nc extends Error{constructor(e){super(),this.innerError=e}}class nu{getServerComponentsHmrCache(){return this.nextConfig.experimental.serverComponentsHmrCache?globalThis.__serverComponentsHmrCache:void 0}constructor(e){var t,n,i;this.handleRSCRequest=(e,t,r)=>{var n,i,s;if(!r.pathname)return!1;if(null==(n=this.normalizers.segmentPrefetchRSC)?void 0:n.match(r.pathname)){let t=this.normalizers.segmentPrefetchRSC.extract(r.pathname);if(!t)return!1;let{originalPathname:n,segmentPath:i}=t;r.pathname=n,e.headers["RSC".toLowerCase()]="1",e.headers[e_.toLowerCase()]="1",e.headers[ew.toLowerCase()]=i,er(e,"isRSCRequest",!0),er(e,"isPrefetchRSCRequest",!0),er(e,"segmentPrefetchRSCRequest",i)}else if(null==(i=this.normalizers.prefetchRSC)?void 0:i.match(r.pathname))r.pathname=this.normalizers.prefetchRSC.normalize(r.pathname,!0),e.headers["RSC".toLowerCase()]="1",e.headers[e_.toLowerCase()]="1",er(e,"isRSCRequest",!0),er(e,"isPrefetchRSCRequest",!0);else if(null==(s=this.normalizers.rsc)?void 0:s.match(r.pathname))r.pathname=this.normalizers.rsc.normalize(r.pathname,!0),e.headers["RSC".toLowerCase()]="1",er(e,"isRSCRequest",!0);else if(e.headers["x-now-route-matches"])return rH(e.headers),!1;else if("1"!==e.headers.rsc)return!1;else if(er(e,"isRSCRequest",!0),"1"===e.headers[e_.toLowerCase()]){er(e,"isPrefetchRSCRequest",!0);let t=e.headers[ew.toLowerCase()];"string"==typeof t&&er(e,"segmentPrefetchRSCRequest",t)}if(e.url){let t=(0,u.parse)(e.url);t.pathname=r.pathname,e.url=(0,u.format)(t)}return!1},this.handleNextDataRequest=async(e,t,r)=>{let n=await this.getMiddleware(),i=function(e){return"string"==typeof e&&rL(e)}(r.pathname);if(!i||!i.path)return!1;if(i.path[0]!==this.buildId)return!et(e,"middlewareInvoke")&&(await this.render404(e,t,r),!0);i.path.shift();let s=i.path[i.path.length-1];if("string"!=typeof s||!s.endsWith(".json"))return await this.render404(e,t,r),!0;let a=`/${i.path.join("/")}`;if(a=function(e,t){return void 0===t&&(t=""),e=e.replace(/\\/g,"/"),(e=t&&e.endsWith(t)?e.slice(0,-t.length):e).startsWith("/index/")&&!tY(e)?e=e.slice(6):"/index"===e&&(e="/"),e}(a,".json"),n&&(this.nextConfig.trailingSlash&&!a.endsWith("/")&&(a+="/"),!this.nextConfig.trailingSlash&&a.length>1&&a.endsWith("/")&&(a=a.substring(0,a.length-1))),this.i18nProvider){var o;let i=null==e?void 0:null==(o=e.headers.host)?void 0:o.split(":",1)[0].toLowerCase(),s=this.i18nProvider.detectDomainLocale(i),l=(null==s?void 0:s.defaultLocale)??this.i18nProvider.config.defaultLocale,c=this.i18nProvider.analyze(a);if(c.detectedLocale&&(a=c.pathname),er(e,"locale",c.detectedLocale),er(e,"defaultLocale",l),c.detectedLocale||en(e,"localeInferredFromDefault"),!c.detectedLocale&&!n)return er(e,"locale",l),await this.render404(e,t,r),!0}return r.pathname=a,er(e,"isNextDataReq",!0),!1},this.handleNextImageRequest=()=>!1,this.handleCatchallRenderRequest=()=>!1,this.handleCatchallMiddlewareRequest=()=>!1,this.normalize=e=>{let t=[];for(let r of(this.normalizers.data&&t.push(this.normalizers.data),this.normalizers.segmentPrefetchRSC&&t.push(this.normalizers.segmentPrefetchRSC),this.normalizers.prefetchRSC&&t.push(this.normalizers.prefetchRSC),this.normalizers.rsc&&t.push(this.normalizers.rsc),t))if(r.match(e))return r.normalize(e,!0);return e},this.normalizeAndAttachMetadata=async(e,t,r)=>{let n=await this.handleNextImageRequest(e,t,r);return!!(n||this.enabledDirectories.pages&&(n=await this.handleNextDataRequest(e,t,r)))},this.prepared=!1,this.preparedPromise=null,this.customErrorNo404Warn=function(e){let t,r=!1;return function(){for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return r||(r=!0,t=e(...i)),t}}(()=>{eL(`You have added a custom /_error page without a custom /404 page. This prevents the 404 page from being auto statically optimized.
|
31
|
+
See here for info: https://nextjs.org/docs/messages/custom-error-no-custom-404`)});let{dir:s=".",quiet:a=!1,conf:o,dev:l=!1,minimalMode:c=!1,hostname:h,port:d,experimentalTestProxy:p}=e;this.experimentalTestProxy=p,this.serverOptions=e,this.dir=r("path").resolve(s),this.quiet=a,this.loadEnvConfig({dev:l}),this.nextConfig=o,this.hostname=h,this.hostname&&(this.fetchHostname=function(e){return tV.test(e)?`[${e}]`:e}(this.hostname)),this.port=d,this.distDir=r("path").join(this.dir,this.nextConfig.distDir),this.publicDir=this.getPublicDir(),this.hasStaticDir=!c&&this.getHasStaticDir(),this.i18nProvider=(null==(t=this.nextConfig.i18n)?void 0:t.locales)?new rI(this.nextConfig.i18n):void 0,this.localeNormalizer=this.i18nProvider?new rr(this.i18nProvider):void 0;let{serverRuntimeConfig:f={},publicRuntimeConfig:m,assetPrefix:g,generateEtags:v}=this.nextConfig;this.buildId=this.getBuildId(),this.minimalMode=c||!!process.env.NEXT_PRIVATE_MINIMAL_MODE,this.enabledDirectories=this.getEnabledDirectories(l),this.isAppPPREnabled=this.enabledDirectories.app&&function(e){return void 0!==e&&("boolean"==typeof e?e:"incremental"===e)}(this.nextConfig.experimental.ppr),this.isAppSegmentPrefetchEnabled=this.enabledDirectories.app&&!0===this.nextConfig.experimental.clientSegmentCache,this.normalizers={rsc:this.enabledDirectories.app?new rF:void 0,prefetchRSC:this.isAppPPREnabled?new rX:void 0,segmentPrefetchRSC:this.isAppSegmentPrefetchEnabled?new r6:void 0,data:this.enabledDirectories.pages?new rB(this.buildId):void 0},this.nextFontManifest=this.getNextFontManifest(),process.env.NEXT_DEPLOYMENT_ID=this.nextConfig.deploymentId||"",this.renderOpts={supportsDynamicResponse:!0,trailingSlash:this.nextConfig.trailingSlash,deploymentId:this.nextConfig.deploymentId,strictNextHead:this.nextConfig.experimental.strictNextHead??!0,poweredByHeader:this.nextConfig.poweredByHeader,canonicalBase:this.nextConfig.amp.canonicalBase||"",generateEtags:v,previewProps:this.getPrerenderManifest().preview,ampOptimizerConfig:null==(n=this.nextConfig.experimental.amp)?void 0:n.optimizer,basePath:this.nextConfig.basePath,images:this.nextConfig.images,optimizeCss:this.nextConfig.experimental.optimizeCss,nextConfigOutput:this.nextConfig.output,nextScriptWorkers:this.nextConfig.experimental.nextScriptWorkers,disableOptimizedLoading:this.nextConfig.experimental.disableOptimizedLoading,domainLocales:null==(i=this.nextConfig.i18n)?void 0:i.domains,distDir:this.distDir,serverComponents:this.enabledDirectories.app,cacheLifeProfiles:this.nextConfig.experimental.cacheLife,enableTainting:this.nextConfig.experimental.taint,crossOrigin:this.nextConfig.crossOrigin?this.nextConfig.crossOrigin:void 0,largePageDataBytes:this.nextConfig.experimental.largePageDataBytes,runtimeConfig:Object.keys(m).length>0?m:void 0,isExperimentalCompile:this.nextConfig.experimental.isExperimentalCompile,htmlLimitedBots:this.nextConfig.htmlLimitedBots,experimental:{expireTime:this.nextConfig.expireTime,clientTraceMetadata:this.nextConfig.experimental.clientTraceMetadata,dynamicIO:this.nextConfig.experimental.dynamicIO??!1,clientSegmentCache:this.nextConfig.experimental.clientSegmentCache??!1,inlineCss:this.nextConfig.experimental.inlineCss??!1,authInterrupts:!!this.nextConfig.experimental.authInterrupts},onInstrumentationRequestError:this.instrumentationOnRequestError.bind(this),reactMaxHeadersLength:this.nextConfig.reactMaxHeadersLength};{let{populateStaticEnv:e}=r("./dist/esm/lib/inline-static-env.js");this.renderOpts.isExperimentalCompile&&e(this.nextConfig)}(0,tQ.setConfig)({serverRuntimeConfig:f,publicRuntimeConfig:m}),this.pagesManifest=this.getPagesManifest(),this.appPathsManifest=this.getAppPathsManifest(),this.appPathRoutes=this.getAppPathRoutes(),this.interceptionRoutePatterns=this.getinterceptionRoutePatterns(),this.matchers=this.getRouteMatchers(),this.matchers.reload(),this.setAssetPrefix(g),this.responseCache=this.getResponseCache({dev:l})}reloadMatchers(){return this.matchers.reload()}getRouteMatchers(){let e=new rk(e=>{switch(e){case ei.Fy:return this.getPagesManifest()??null;case ei.XB:return this.getAppPathsManifest()??null;default:return null}}),t=new ra;return t.push(new rN(this.distDir,e,this.i18nProvider)),t.push(new rA(this.distDir,e,this.i18nProvider)),this.enabledDirectories.app&&(t.push(new r_(this.distDir,e)),t.push(new rx(this.distDir,e))),t}async instrumentationOnRequestError(...e){let[t,r,n]=e;if(this.instrumentation)try{await (null==this.instrumentation.onRequestError?void 0:this.instrumentation.onRequestError.call(this.instrumentation,t,{path:r.url||"",method:r.method||"GET",headers:r instanceof r2?Object.fromEntries(r.headers.entries()):r.headers},n))}catch(e){console.error("Error in instrumentation.onRequestError:",e)}}logError(e){this.quiet||eM(e)}async handleRequest(e,t,r){await this.prepare();let n=e.method.toUpperCase(),i=(0,e9.getTracer)();return i.withPropagatedContext(e.headers,()=>i.trace(e7.Li.handleRequest,{spanName:`${n} ${e.url}`,kind:e9.SpanKind.SERVER,attributes:{"http.method":n,"http.target":e.url}},async s=>this.handleRequestImpl(e,t,r).finally(()=>{if(!s)return;let r=et(e,"isRSCRequest")??!1;s.setAttributes({"http.status_code":t.statusCode,"next.rsc":r});let a=i.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==e7.Li.handleRequest){console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);return}let o=a.get("next.route");if(o){let e=r?`RSC ${n} ${o}`:`${n} ${o}`;s.setAttributes({"next.route":o,"http.route":o,"next.span_name":e}),s.updateName(e)}else s.updateName(r?`RSC ${n} ${e.url}`:`${n} ${e.url}`)})))}async handleRequestImpl(e,t,r){try{var n,i,s,a,o,l,c,h,d;await this.matchers.waitTillReady(),function(e,t){let r=t.setHeader.bind(t);t.setHeader=(n,i)=>{if("headersSent"in t&&t.headersSent)return t;if("set-cookie"===n.toLowerCase()){let t=et(e,"middlewareCookie");t&&Array.isArray(i)&&i.every((e,r)=>e===t[r])||(i=[...new Set([...t||[],..."string"==typeof i?[i]:Array.isArray(i)?i:[]])])}return r(n,i)}}(e,tA(t)?t.originalResponse:t);let p=(e.url||"").split("?",1)[0];if(null==p?void 0:p.match(/(\\|\/\/)/)){let r=V(e.url);t.redirect(r,308).body(r).send();return}if(!r||"object"!=typeof r){if(!e.url)throw Object.defineProperty(Error("Invariant: url can not be undefined"),"__NEXT_ERROR_CODE",{value:"E123",enumerable:!1,configurable:!0});r=(0,u.parse)(e.url,!0)}if(!r.pathname)throw Object.defineProperty(Error("Invariant: pathname can't be empty"),"__NEXT_ERROR_CODE",{value:"E412",enumerable:!1,configurable:!0});"string"==typeof r.query&&(r.query=Object.fromEntries(new URLSearchParams(r.query)));let{originalRequest:f=null}=tT(e)?e:{},m=null==f?void 0:f.headers["x-forwarded-proto"],g=m?"https"===m:!!(null==f?void 0:null==(n=f.socket)?void 0:n.encrypted);e.headers["x-forwarded-host"]??=e.headers.host??this.hostname,e.headers["x-forwarded-port"]??=this.port?this.port.toString():g?"443":"80",e.headers["x-forwarded-proto"]??=g?"https":"http",e.headers["x-forwarded-for"]??=null==f?void 0:null==(i=f.socket)?void 0:i.remoteAddress,this.attachRequestMeta(e,r);let v=await this.handleRSCRequest(e,t,r);if(v)return;let y=null==(s=this.i18nProvider)?void 0:s.detectDomainLocale(tf(r,e.headers)),b=(null==y?void 0:y.defaultLocale)||(null==(a=this.nextConfig.i18n)?void 0:a.defaultLocale);er(e,"defaultLocale",b);let E=eT(e.url.replace(/^\/+/,"/")),_=ty(E.pathname,{nextConfig:this.nextConfig,i18nProvider:this.i18nProvider});E.pathname=_.pathname,_.basePath&&(e.url=tv(e.url,this.nextConfig.basePath));let w="string"==typeof e.headers[ev.vx];if(w)try{this.enabledDirectories.app&&(e.url.match(/^\/index($|\?)/)&&(e.url=e.url.replace(/^\/index/,"/")),r.pathname="/index"===r.pathname?"/":r.pathname);let{pathname:n}=new URL(e.headers[ev.vx],"http://localhost"),{pathname:i}=new URL(e.url,"http://localhost");if(null==(o=this.normalizers.data)?void 0:o.match(i))er(e,"isNextDataReq",!0);else if(this.isAppPPREnabled&&"1"===e.headers[ev.gs]&&"POST"===e.method){let t=[];for await(let r of e.body)t.push(r);let r=Buffer.concat(t).toString("utf8");er(e,"postponed",r)}n=this.normalize(n);let s=this.stripNextDataPath(i),a=null==(l=this.i18nProvider)?void 0:l.analyze(n,{defaultLocale:b});a&&(er(e,"locale",a.detectedLocale),a.inferredFromDefault?er(e,"localeInferredFromDefault",!0):en(e,"localeInferredFromDefault"));let d=n=t3(n),p=tY(d);if(!p){let e=await this.matchers.match(d,{i18n:a});e&&(d=e.definition.pathname,p=void 0!==e.params)}a&&(n=a.pathname);let f=function({page:e,i18n:t,basePath:r,rewrites:n,pageIsDynamic:i,trailingSlash:s,caseSensitive:a}){let o,l,c;return i&&(c=(l=Z(o=function(e,t){var r,n,i;let s=function(e,t,r,n,i){let s;let a=(s=0,()=>{let e="",t=++s;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),o={},l=[];for(let s of eQ(e).slice(1).split("/")){let e=eG.some(e=>s.startsWith(e)),c=s.match(eZ);if(e&&c&&c[2])l.push(e4({getSafeRouteKey:a,interceptionMarker:c[1],segment:c[2],routeKeys:o,keyPrefix:t?ev.h:void 0,backreferenceDuplicateKeys:i}));else if(c&&c[2]){n&&c[1]&&l.push("/"+eY(c[1]));let e=e4({getSafeRouteKey:a,segment:c[2],routeKeys:o,keyPrefix:t?ev.AA:void 0,backreferenceDuplicateKeys:i});n&&c[1]&&(e=e.substring(1)),l.push(e)}else l.push("/"+eY(s));r&&c&&c[3]&&l.push(eY(c[3]))}return{namedParameterizedRoute:l.join(""),routeKeys:o}}(e,t.prefixRouteKeys,null!=(r=t.includeSuffix)&&r,null!=(n=t.includePrefix)&&n,null!=(i=t.backreferenceDuplicateKeys)&&i),a=s.namedParameterizedRoute;return t.excludeOptionalTrailingSlash||(a+="(?:/)?"),{...e1(e,t),namedRegex:"^"+a+"$",routeKeys:s.routeKeys}}(e,{prefixRouteKeys:!1})))(e)),{handleRewrites:function(o,c){let u={},h=c.pathname,d=n=>{let d=t5(n.source+(s?"(/)?":""),{removeUnnamedParams:!0,strict:!0,sensitive:!!a});if(!c.pathname)return!1;let p=d(c.pathname);if((n.has||n.missing)&&p){let e=t9(o,c.query,n.has,n.missing);e?Object.assign(p,e):p=!1}if(p){let{parsedDestination:s,destQuery:a}=function(e){let t,r;let n=Object.assign({},e.query);delete n[eO];let i=function(e){let t=e.destination;for(let r of Object.keys({...e.params,...e.query}))r&&(t=t.replace(RegExp(":"+eY(r),"g"),"__ESC_COLON_"+r));let r=eT(t),n=r.pathname;n&&(n=t6(n));let i=r.href;i&&(i=t6(i));let s=r.hostname;s&&(s=t6(s));let a=r.hash;return a&&(a=t6(a)),{...r,pathname:n,hostname:s,href:i,hash:a}}(e),{hostname:s,query:a}=i,o=i.pathname;i.hash&&(o=""+o+i.hash);let l=[],c=[];for(let e of((0,t8.pathToRegexp)(o,c),c))l.push(e.name);if(s){let e=[];for(let t of((0,t8.pathToRegexp)(s,e),e))l.push(t.name)}let u=(0,t8.compile)(o,{validate:!1});for(let[r,n]of(s&&(t=(0,t8.compile)(s,{validate:!1})),Object.entries(a)))Array.isArray(n)?a[r]=n.map(t=>t7(t6(t),e.params)):"string"==typeof n&&(a[r]=t7(t6(n),e.params));let h=Object.keys(e.params).filter(e=>"nextInternalLocale"!==e);if(e.appendParamsToQuery&&!h.some(e=>l.includes(e)))for(let t of h)t in a||(a[t]=e.params[t]);if(eV(o))for(let t of o.split("/")){let r=eG.find(e=>t.startsWith(e));if(r){"(..)(..)"===r?(e.params["0"]="(..)",e.params["1"]="(..)"):e.params["0"]=r;break}}try{let[n,s]=(r=u(e.params)).split("#",2);t&&(i.hostname=t(e.params)),i.pathname=n,i.hash=(s?"#":"")+(s||""),delete i.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw Object.defineProperty(Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match"),"__NEXT_ERROR_CODE",{value:"E329",enumerable:!1,configurable:!0});throw e}return i.query={...n,...i.query},{newUrl:r,destQuery:a,parsedDestination:i}}({appendParamsToQuery:!0,destination:n.destination,params:p,query:c.query});if(s.protocol)return!0;if(Object.assign(u,a,p),Object.assign(c.query,s.query),delete s.query,Object.assign(c,s),!(h=c.pathname))return!1;if(r&&(h=h.replace(RegExp(`^${r}`),"")||"/"),t){let e=tg(h,t.locales);h=e.pathname,c.query.nextInternalLocale=e.detectedLocale||p.nextInternalLocale}if(h===e)return!0;if(i&&l){let e=l(h);if(e)return c.query={...c.query,...e},!0}}return!1};for(let e of n.beforeFiles||[])d(e);if(h!==e){let t=!1;for(let e of n.afterFiles||[])if(t=d(e))break;if(!t&&!(()=>{let t=eQ(h||"");return t===eQ(e)||(null==l?void 0:l(t))})()){for(let e of n.fallback||[])if(t=d(e))break}}return u},defaultRouteRegex:o,dynamicRouteMatcher:l,defaultRouteMatches:c,getParamsFromRouteMatches:function(e){if(!o)return null;let{groups:t,routeKeys:r}=o;return Z({re:{exec:e=>{let n=Object.fromEntries(new URLSearchParams(e));for(let[e,t]of Object.entries(n)){let r=tc(e);r&&(n[r]=t,delete n[e])}let i={};for(let e of Object.keys(r)){let s=r[e];if(!s)continue;let a=t[s],o=n[e];if(!a.optional&&!o)return null;i[a.pos]=o}return i}},groups:t})(e)||null},normalizeDynamicRouteParams:(e,t)=>o&&c?function(e,t,r,n){let i={};for(let s of Object.keys(t.groups)){let a=e[s];"string"==typeof a?a=eB(a):Array.isArray(a)&&(a=a.map(eB));let o=r[s],l=t.groups[s].optional;if((Array.isArray(o)?o.some(e=>Array.isArray(a)?a.some(t=>t.includes(e)):null==a?void 0:a.includes(e)):null==a?void 0:a.includes(o))||void 0===a&&!(l&&n))return{params:{},hasValidParams:!1};l&&(!a||Array.isArray(a)&&1===a.length&&("index"===a[0]||a[0]===`[[...${s}]]`))&&(a=void 0,delete e[s]),a&&"string"==typeof a&&t.groups[s].repeat&&(a=a.split("/")),a&&(i[s]=a)}return{params:i,hasValidParams:!0}}(e,o,c,t):{params:{},hasValidParams:!1},normalizeVercelUrl:(e,t)=>(function(e,t,r){let n=(0,u.parse)(e.url,!0);for(let e of(delete n.search,Object.keys(n.query))){let i=e!==ev.AA&&e.startsWith(ev.AA),s=e!==ev.h&&e.startsWith(ev.h);(i||s||t.includes(e)||r&&Object.keys(r.groups).includes(e))&&delete n.query[e]}e.url=(0,u.format)(n)})(e,t,o),interpolateDynamicPath:(e,t)=>(function(e,t,r){if(!r)return e;for(let n of Object.keys(r.groups)){let i;let{optional:s,repeat:a}=r.groups[n],o=`[${a?"...":""}${n}]`;s&&(o=`[${o}]`);let l=t[n];i=Array.isArray(l)?l.map(e=>e&&encodeURIComponent(e)).join("/"):l?encodeURIComponent(l):"",e=e.replaceAll(o,i)}return e})(e,t,o)}}({pageIsDynamic:p,page:d,i18n:this.nextConfig.i18n,basePath:this.nextConfig.basePath,rewrites:(null==(c=this.getRoutesManifest())?void 0:c.rewrites)||{beforeFiles:[],afterFiles:[],fallback:[]},caseSensitive:!!this.nextConfig.experimental.caseSensitiveRoutes});b&&!_.locale&&(r.pathname=`/${b}${r.pathname}`);let m=r.pathname,g=Object.keys(f.handleRewrites(e,r)),y=m!==r.pathname;y&&r.pathname&&er(e,"rewroteURL",r.pathname);let w={...r.query};for(let[e,t]of Object.entries(r.query)){let n=tc(e);n&&(delete r.query[e],void 0!==t&&(w[n]=t))}if(p){let t={},r=f.normalizeDynamicRouteParams(w,!1);if(!r.hasValidParams&&!tY(s)){let e=null==f.dynamicRouteMatcher?void 0:f.dynamicRouteMatcher.call(f,s);e&&(f.normalizeDynamicRouteParams(e,!1),Object.assign(r.params,e),r.hasValidParams=!0)}if("/index"!==n&&!r.hasValidParams&&!tY(n)){let e=null==f.dynamicRouteMatcher?void 0:f.dynamicRouteMatcher.call(f,n);if(e){let n=f.normalizeDynamicRouteParams(e,!1);n.hasValidParams&&(Object.assign(t,e),r=n)}}r.hasValidParams&&(t=r.params);let i=e.headers["x-now-route-matches"];if("string"==typeof i&&i&&tY(n)&&!r.hasValidParams){let e=f.getParamsFromRouteMatches(i);e&&(r=f.normalizeDynamicRouteParams(e,!0)).hasValidParams&&(t=r.params)}if(!r.hasValidParams&&(r=f.normalizeDynamicRouteParams(w,!0)).hasValidParams&&(t=r.params),!f.defaultRouteMatches||s!==d||r.hasValidParams||f.normalizeDynamicRouteParams({...t},!0).hasValidParams||(t=f.defaultRouteMatches,er(e,"didSetDefaultRouteMatches",!0)),t){n=f.interpolateDynamicPath(d,t),e.url=f.interpolateDynamicPath(e.url,t);let r=et(e,"segmentPrefetchRSCRequest");r&&tY(r,!1)&&(r=f.interpolateDynamicPath(r,t),e.headers[ew.toLowerCase()]=r,er(e,"segmentPrefetchRSCRequest",r))}}if((p||y)&&f.normalizeVercelUrl(e,[...g,...Object.keys((null==(h=f.defaultRouteRegex)?void 0:h.groups)||{})]),r.pathname=n,E.pathname=r.pathname,v=await this.normalizeAndAttachMetadata(e,t,r))return}catch(r){if(r instanceof K||r instanceof J)return t.statusCode=400,this.renderError(null,e,t,"/_error",{});throw r}if(er(e,"isLocaleDomain",!!y),_.locale&&(e.url=(0,u.format)(E),er(e,"didStripLocale",!0)),!et(e,"locale")&&(_.locale?er(e,"locale",_.locale):b&&(er(e,"locale",b),er(e,"localeInferredFromDefault",!0))),!this.serverOptions.webServerConfig&&!et(e,"incrementalCache")){let t="https:";try{t=new URL(et(e,"initURL")||"/","http://n").protocol}catch{}let r=await this.getIncrementalCache({requestHeaders:Object.assign({},e.headers),requestProtocol:t.substring(0,t.length-1)});r.resetRequestCache(),er(e,"incrementalCache",r),globalThis.__incrementalCache=r}let x=no();if(x){let t=e.headers[ev.vS],r="string"==typeof t?t.split(","):[],n=[];for(let e of x)n.push(e.receiveExpiredTags(...r));n.length>0&&await Promise.all(n)}et(e,"serverComponentsHmrCache")||er(e,"serverComponentsHmrCache",this.getServerComponentsHmrCache());let R=et(e,"invokePath");if(!w&&R){let n=et(e,"invokeStatus");if(n){let i=et(e,"invokeQuery");i&&Object.assign(r.query,i),t.statusCode=n;let s=et(e,"invokeError")||null;return this.renderError(s,e,t,"/_error",r.query)}let i=new URL(R||"/","http://n"),s=ty(i.pathname,{nextConfig:this.nextConfig,parseData:!1});s.locale&&er(e,"locale",s.locale),r.pathname!==i.pathname&&(r.pathname=i.pathname,er(e,"rewroteURL",s.pathname));let a=tg(tv(r.pathname,this.nextConfig.basePath||""),null==(d=this.nextConfig.i18n)?void 0:d.locales);for(let t of(a.detectedLocale&&er(e,"locale",a.detectedLocale),r.pathname=a.pathname,Object.keys(r.query)))delete r.query[t];let o=et(e,"invokeQuery");if(o&&Object.assign(r.query,o),v=await this.normalizeAndAttachMetadata(e,t,r))return;await this.handleCatchallRenderRequest(e,t,r);return}if(et(e,"middlewareInvoke")){if((v=await this.normalizeAndAttachMetadata(e,t,r))||(v=await this.handleCatchallMiddlewareRequest(e,t,r)))return;let n=Error();throw n.result={response:new Response(null,{headers:{"x-middleware-next":"1"}})},n.bubble=!0,n}return!w&&_.basePath&&(r.pathname=tv(r.pathname,_.basePath)),t.statusCode=200,await this.run(e,t,r)}catch(r){if(r instanceof nl)throw r;if(r&&"object"==typeof r&&"ERR_INVALID_URL"===r.code||r instanceof K||r instanceof J)return t.statusCode=400,this.renderError(null,e,t,"/_error",{});throw r}}getRequestHandlerWithMetadata(e){let t=this.getRequestHandler();return(r,n,i)=>(r[ee]=e,t(r,n,i))}getRequestHandler(){return this.handleRequest.bind(this)}setAssetPrefix(e){this.renderOpts.assetPrefix=e?e.replace(/\/$/,""):""}async prepare(){if(!this.prepared)return null===this.preparedPromise&&(this.instrumentation=await this.loadInstrumentationModule(),this.preparedPromise=this.prepareImpl().then(()=>{this.prepared=!0,this.preparedPromise=null})),this.preparedPromise}async prepareImpl(){}async loadInstrumentationModule(){}async close(){}getAppPathRoutes(){let e={};return Object.keys(this.appPathsManifest||{}).forEach(t=>{let r=eW(t);e[r]||(e[r]=[]),e[r].push(t)}),e}async run(e,t,r){return(0,e9.getTracer)().trace(e7.Li.run,async()=>this.runImpl(e,t,r))}async runImpl(e,t,r){await this.handleCatchallRenderRequest(e,t,r)}async pipe(e,t){return(0,e9.getTracer)().trace(e7.Li.pipe,async()=>this.pipeImpl(e,t))}async pipeImpl(e,t){let r=t.req.headers["user-agent"]||"",n=t4(r),i={...t,renderOpts:{...this.renderOpts,supportsDynamicResponse:!n,botType:t2(r),serveStreamingMetadata:function(e,t){let r=RegExp(t||t1,"i");return!!e&&!r.test(e)}(r,this.nextConfig.htmlLimitedBots)}},s=await e(i);if(null===s)return;let{req:a,res:o}=i,l=o.statusCode,{body:c,type:u}=s,{cacheControl:h}=s;if(!o.sent){let{generateEtags:e,poweredByHeader:t,dev:r}=this.renderOpts;r&&(o.setHeader("Cache-Control","no-store, must-revalidate"),h=void 0),h&&void 0===h.expire&&(h.expire=this.nextConfig.expireTime),await this.sendRenderResult(a,o,{result:c,type:u,generateEtags:e,poweredByHeader:t,cacheControl:h}),o.statusCode=l}}async getStaticHTML(e,t){let r={...t,renderOpts:{...this.renderOpts,supportsDynamicResponse:!1}},n=await e(r);return null===n?null:n.body.toUnchunkedString()}async render(e,t,r,n={},i,s=!1){return(0,e9.getTracer)().trace(e7.Li.render,async()=>this.renderImpl(e,t,r,n,i,s))}getWaitUntil(){let e=function(){let e=globalThis[rJ];return null==e?void 0:e.get()}();if(e)return e.waitUntil}getInternalWaitUntil(){}async renderImpl(e,t,r,n={},i,s=!1){var a;return r.startsWith("/")||console.warn(`Cannot render page with path "${r}", did you mean "/${r}"?. See more info here: https://nextjs.org/docs/messages/render-no-starting-slash`),this.serverOptions.customServer&&"/index"===r&&!await this.hasPage("/index")&&(r="/"),(a=r,ei.qY.includes(a))?this.render404(e,t,i):this.pipe(e=>this.renderToResponse(e),{req:e,res:t,pathname:r,query:n})}async getStaticPaths({pathname:e}){var t;return{staticPaths:void 0,fallbackMode:function(e){if("string"==typeof e)return"PRERENDER";if(null===e)return"BLOCKING_STATIC_RENDER";if(!1===e)return"NOT_FOUND";if(void 0!==e)throw Object.defineProperty(Error(`Invalid fallback option: ${e}. Fallback option must be a string, null, undefined, or false.`),"__NEXT_ERROR_CODE",{value:"E285",enumerable:!1,configurable:!0})}(null==(t=this.getPrerenderManifest().dynamicRoutes[e])?void 0:t.fallback)}}async renderToResponseWithComponents(e,t){return(0,e9.getTracer)().trace(e7.Li.renderToResponseWithComponents,async()=>this.renderToResponseWithComponentsImpl(e,t))}pathCouldBeIntercepted(e){return eV(e)||this.interceptionRoutePatterns.some(t=>t.test(e))}setVaryHeader(e,t,r,n){let i=`RSC, ${eE}, ${e_}, ${ew}`,s=et(e,"isRSCRequest")??!1,a=!1;r&&this.pathCouldBeIntercepted(n)?(t.appendHeader("vary",`${i}, ${ex}`),a=!0):(r||s)&&t.appendHeader("vary",i),a||delete e.headers[ex]}async renderToResponseWithComponentsImpl({req:e,res:t,pathname:n,renderOpts:i},{components:s,query:a}){var o,l,c,h,d,p,f,m,g,v,y,b;let E,_,w,x;n===ei.Ie&&(n="/404");let R="/_error"===n,O="/404"===n||R&&404===t.statusCode,C="/500"===n||R&&500===t.statusCode,P=!0===s.isAppPath,S=!!s.getServerSideProps,T=!!s.getStaticPaths,A=function(e){let t,r;e.headers instanceof Headers?(t=e.headers.get(eb.toLowerCase())??null,r=e.headers.get("content-type")):(t=e.headers[eb.toLowerCase()]??null,r=e.headers["content-type"]??null);let n=!!("POST"===e.method&&"application/x-www-form-urlencoded"===r),i=!!("POST"===e.method&&(null==r?void 0:r.startsWith("multipart/form-data"))),s=!!(void 0!==t&&"string"==typeof t&&"POST"===e.method);return{actionId:t,isURLEncodedAction:n,isMultipartAction:i,isFetchAction:s,isServerAction:!!(s||n||i)}}(e).isServerAction,j=!!(null==(o=s.Component)?void 0:o.getInitialProps),D=!!s.getStaticProps,N=(0,u.parse)(e.url||"").pathname||"/",k=et(e,"rewroteURL")||N;this.setVaryHeader(e,t,P,k);let I=!1,M=tY(s.page),L=this.getPrerenderManifest();if(P&&M){let t=await this.getStaticPaths({pathname:n,page:s.page,isAppPath:P,requestHeaders:e.headers});if(E=t.staticPaths,I=void 0!==(_=t.fallbackMode),"export"===this.nextConfig.output){let e=s.page;if(!E)throw Object.defineProperty(Error(`Page "${e}" is missing exported function "generateStaticParams()", which is required with "output: export" config.`),"__NEXT_ERROR_CODE",{value:"E353",enumerable:!1,configurable:!0});let t=eQ(k);if(!E.includes(t))throw Object.defineProperty(Error(`Page "${e}" is missing param "${t}" in "generateStaticParams()", which is required with "output: export" config.`),"__NEXT_ERROR_CODE",{value:"E443",enumerable:!1,configurable:!0})}I&&(T=!0)}I||(null==E?void 0:E.includes(k))||e.headers["x-now-route-matches"]?D=!0:D||=!!L.routes[rG(n)];let $=!!(et(e,"isNextDataReq")||e.headers["x-nextjs-data"]&&this.serverOptions.webServerConfig)&&(D||S),F=et(e,"isPrefetchRSCRequest")??!1,H=et(e,"isRSCRequest")??!1;if(!D&&e.headers["x-middleware-prefetch"]&&!(O||"/_error"===n))return t.setHeader(ev.vx,n),t.setHeader("x-middleware-skip","1"),t.setHeader("cache-control","private, no-cache, no-store, max-age=0, must-revalidate"),t.body("{}").send(),null;D&&e.headers[ev.vx]&&e.url.startsWith("/_next/data")&&(e.url=this.stripNextDataPath(e.url));let z=et(e,"locale"),U=D?null==(l=this.nextConfig.i18n)?void 0:l.defaultLocale:et(e,"defaultLocale");e.headers["x-nextjs-data"]&&(!t.statusCode||200===t.statusCode)&&t.setHeader("x-nextjs-matched-path",`${z?`/${z}`:""}${n}`),s.routeModule&&(w=s.routeModule);let X=this.isAppPPREnabled&&void 0!==w&&rz(w),W="1"===process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING&&void 0!==a.__nextppronly&&X,B=W&&"fallback"===a.__nextppronly,G=X&&((null==(c=L.routes[n]??L.dynamicRoutes[n])?void 0:c.renderingMode)==="PARTIALLY_STATIC"||W&&!0===this.experimentalTestProxy),K=W&&G,J=K&&!1,Y=B&&G,Q=G?et(e,"postponed"):void 0,ee=G&&H&&!F,en=et(e,"segmentPrefetchRSCRequest"),es="html"===t2(e.headers["user-agent"]||"");if(es&&G&&(D=!1,this.renderOpts.serveStreamingMetadata=!1),!O||$||H||(t.statusCode=404),ei.B.includes(n)&&(t.statusCode=parseInt(n.slice(1),10)),!A&&!Q&&!O&&!C&&"/_error"!==n&&"HEAD"!==e.method&&"GET"!==e.method&&("string"==typeof s.Component||D))return t.statusCode=405,t.setHeader("Allow",["GET","HEAD"]),t.body("Method Not Allowed").send(),null;if("string"==typeof s.Component)return{type:"html",body:tF.fromStatic(s.Component)};if("amp"in a&&!a.amp&&delete a.amp,!0===i.supportsDynamicResponse){let t=t4(e.headers["user-agent"]||""),r="function"!=typeof(null==(p=s.Document)?void 0:p.getInitialProps)||ei._i in s.Document;i.supportsDynamicResponse=!D&&!t&&!a.amp&&r}!$&&P&&i.dev&&(i.supportsDynamicResponse=!0);let el=null==(h=this.nextConfig.i18n)?void 0:h.locales,ec=!1;if(S||D||P){let{tryGetPreviewData:n}=r("./dist/esm/server/api-utils/node/try-get-preview-data.js");ec=!1!==n(e,t,this.renderOpts.previewProps,!!this.nextConfig.experimental.multiZoneDraftMode)}P&&!i.dev&&!ec&&D&&H&&!ee&&(!((b=i.runtime)===ev.li.experimentalEdge||b===ev.li.edge)||this.serverOptions.webServerConfig)&&rH(e.headers);let{isOnDemandRevalidate:eu,revalidateOnlyGenerated:eh}=(0,ea.Gx)(e,this.renderOpts.previewProps);D&&e.headers[ev.vx]&&(k=N),N=eQ(N),k=eQ(k),this.localeNormalizer&&(k=this.localeNormalizer.normalize(k)),$&&(k=this.stripNextDataPath(k),N=this.stripNextDataPath(N));let ed=null;ec||!D||i.supportsDynamicResponse||A||Q||ee||(ed=`${z?`/${z}`:""}${("/"===n||"/"===k)&&z?"":k}${a.amp?".amp":""}`),(O||C)&&D&&(ed=`${z?`/${z}`:""}${n}${a.amp?".amp":""}`),ed&&(ed="/index"===(ed=rq(ed))&&"/"===n?"/":ed);let ep="https:";try{ep=new URL(et(e,"initURL")||"/","http://n").protocol}catch{}let ef=globalThis.__incrementalCache||await this.getIncrementalCache({requestHeaders:Object.assign({},e.headers),requestProtocol:ep.substring(0,ep.length-1)});ef.resetRequestCache();let em=async({postponed:r,pagesFallback:o=!1,fallbackRouteParams:l})=>{let c,h=!$&&!0===i.dev||!D&&!T||"string"==typeof r||ee,d=(0,u.parse)(e.url||"",!0).query;i.params&&Object.keys(i.params).forEach(e=>{delete d[e]});let p="/"!==N&&this.nextConfig.trailingSlash,f=(0,u.format)({pathname:`${k}${p?"/":""}`,query:d}),m=es&&G,g={...s,...i,...P?{incrementalCache:ef,isRevalidate:D&&!r&&!ee,serverActions:this.nextConfig.experimental.serverActions}:{},isNextDataRequest:$,resolvedUrl:f,locale:z,locales:el,defaultLocale:U,multiZoneDraftMode:this.nextConfig.experimental.multiZoneDraftMode,resolvedAsPath:S||j?(0,u.format)({pathname:`${N}${p?"/":""}`,query:d}):f,experimental:{...i.experimental,isRoutePPREnabled:G},supportsDynamicResponse:h,shouldWaitOnAllReady:m,isOnDemandRevalidate:eu,isDraftMode:ec,isServerAction:A,postponed:r,waitUntil:this.getWaitUntil(),onClose:t.onClose.bind(t),onAfterTaskError:void 0,setIsrStatus:this.setIsrStatus};if((K||J)&&(h=!1,g.nextExport=!0,g.supportsDynamicResponse=!1,g.isStaticGeneration=!0,g.isRevalidate=!0,g.isDebugDynamicAccesses=J),w){if(w.definition.kind===tH.APP_ROUTE){var v;if(!tT(e)||!tA(t))throw Object.defineProperty(Error("Invariant: App Route Route Modules cannot be used in the edge runtime"),"__NEXT_ERROR_CODE",{value:"E130",enumerable:!1,configurable:!0});let r={params:i.params,prerenderManifest:L,renderOpts:{experimental:{dynamicIO:g.experimental.dynamicIO,authInterrupts:g.experimental.authInterrupts},supportsDynamicResponse:h,incrementalCache:ef,cacheLifeProfiles:null==(v=this.nextConfig.experimental)?void 0:v.cacheLife,isRevalidate:D,waitUntil:this.getWaitUntil(),onClose:t.onClose.bind(t),onAfterTaskError:void 0,onInstrumentationRequestError:this.renderOpts.onInstrumentationRequestError},sharedContext:{buildId:this.buildId}};try{let n=tk.fromNodeNextRequest(e,function(e){let{errored:t,destroyed:r}=e;if(t||r)return AbortSignal.abort(t??new tD);let{signal:n}=tN(e);return n}(t.originalResponse)),i=await w.handle(n,r);e.fetchMetrics=r.renderOpts.fetchMetrics;let s=r.renderOpts.collectedTags;if(D){let e=await i.blob(),t=to(i.headers);s&&(t[ev.VC]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==r.renderOpts.collectedRevalidate&&!(r.renderOpts.collectedRevalidate>=ev.AR)&&r.renderOpts.collectedRevalidate,a=void 0===r.renderOpts.collectedExpire||r.renderOpts.collectedExpire>=ev.AR?void 0:r.renderOpts.collectedExpire;return{value:{kind:e5.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a},isFallback:!1}}let a=r.renderOpts.pendingWaitUntil;return a&&r.renderOpts.waitUntil&&(r.renderOpts.waitUntil(a),a=void 0),await rM(e,t,i,r.renderOpts.pendingWaitUntil),null}catch(r){if(await this.instrumentationOnRequestError(r,e,{routerKind:"App Router",routePath:n,routeType:"route",revalidateReason:r3(g)}),D)throw r;return eM(r),await rM(e,t,new Response(null,{status:500})),null}}else if(rU(w)||rz(w)){if("OPTIONS"===e.method&&!O)return await rM(e,t,new Response(null,{status:400})),null;if(rU(w)){g.nextFontManifest=this.nextFontManifest,g.clientReferenceManifest=s.clientReferenceManifest;let r=tT(e)?e.originalRequest:e,l=tA(t)?t.originalResponse:t;try{c=await w.render(r,l,{page:n,params:i.params,query:a,renderOpts:g,sharedContext:{buildId:this.buildId,deploymentId:this.nextConfig.deploymentId,customServer:this.serverOptions.customServer||void 0},renderContext:{isFallback:o,isDraftMode:g.isDraftMode,developmentNotFoundSourcePage:et(e,"developmentNotFoundSourcePage")}})}catch(t){throw await this.instrumentationOnRequestError(t,e,{routerKind:"Pages Router",routePath:n,routeType:"render",revalidateReason:r3({isRevalidate:D,isOnDemandRevalidate:g.isOnDemandRevalidate})}),t}}else{let r=s.routeModule;g.nextFontManifest=this.nextFontManifest;let o={page:O?"/404":n,params:i.params,query:a,fallbackRouteParams:l,renderOpts:g,serverComponentsHmrCache:this.getServerComponentsHmrCache(),sharedContext:{buildId:this.buildId}};this.nextConfig.experimental.dynamicIO,c=await r.render(e,t,o)}}else throw Object.defineProperty(Error("Invariant: Unknown route module type"),"__NEXT_ERROR_CODE",{value:"E450",enumerable:!1,configurable:!0})}else c=await this.renderHTML(e,t,n,a,g);let{metadata:y}=c,{cacheControl:b,headers:E={},fetchTags:_}=y;if(_&&(E[ev.VC]=_),e.fetchMetrics=y.fetchMetrics,P&&D&&(null==b?void 0:b.revalidate)===0&&!G){let e=y.staticBailoutInfo,t=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${N}${(null==e?void 0:e.description)?`, reason: ${e.description}`:""}
|
32
|
+
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==e?void 0:e.stack){let r=e.stack;t.stack=t.message+r.substring(r.indexOf("\n"))}throw t}return"isNotFound"in y&&y.isNotFound?{value:null,cacheControl:b,isFallback:!1}:y.isRedirect?{value:{kind:e5.REDIRECT,props:y.pageData??y.flightData},cacheControl:b,isFallback:!1}:c.isNull?null:P?{value:{kind:e5.APP_PAGE,html:c,headers:E,rscData:y.flightData,postponed:y.postponed,status:t.statusCode,segmentData:y.segmentData},cacheControl:b,isFallback:!!l}:{value:{kind:e5.PAGES,html:c,pageData:y.pageData??y.flightData,headers:E,status:P?t.statusCode:void 0},cacheControl:b,isFallback:o}},eg=async({hasResolved:r,previousCacheEntry:o,isRevalidating:l})=>{if(r||t.sent,!E&&M){if(T){let t=await this.getStaticPaths({pathname:n,requestHeaders:e.headers,isAppPath:P,page:s.page});E=t.staticPaths,_=t.fallbackMode}else E=void 0,_=r8.NOT_FOUND}_===r8.PRERENDER&&t4(e.headers["user-agent"]||"")&&(_=r8.BLOCKING_STATIC_RENDER),(null==o?void 0:o.isStale)===-1&&(eu=!0),eu&&(_!==r8.NOT_FOUND||o)&&(_=r8.BLOCKING_STATIC_RENDER);let c=ed;!c&&i.dev&&P&&(c=rq(k)),c&&a.amp&&(c=c.replace(/\.amp$/,"")),c&&(null==E||E.includes(c)),this.nextConfig.experimental.isExperimentalCompile&&(_=r8.BLOCKING_STATIC_RENDER);let u=eu||l||!Q?void 0:Q;return(K||J)&&void 0!==u?{cacheControl:{revalidate:1,expire:void 0},isFallback:!1,value:{kind:e5.PAGES,html:tF.fromStatic(""),pageData:{},headers:void 0,status:void 0}}:em({postponed:u,pagesFallback:void 0,fallbackRouteParams:M&&G&&(et(e,"didSetDefaultRouteMatches")||Y)?function(e){let t;if(0===(t="string"==typeof e?Object.keys(Z(e1(e))(e)):e).length)return null;let r=new Map,n=Math.random().toString(16).slice(2);for(let e of t)r.set(e,`%%drp:${e}:${n}%%`);return r}(n):null})},eE=await this.responseCache.get(ed,eg,{routeKind:(null==w?void 0:w.definition.kind)??(P?tH.APP_PAGE:tH.PAGES),incrementalCache:ef,isOnDemandRevalidate:eu,isPrefetch:"prefetch"===e.headers.purpose,isRoutePPREnabled:G});if(ec&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),!eE){if(ed&&!(eu&&eh))throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}let e_=(null==(d=eE.value)?void 0:d.kind)===e5.APP_PAGE&&"string"==typeof eE.value.postponed;D&&!ee&&(!e_||F)&&t.setHeader("x-nextjs-prerender","1");let{value:ew}=eE;if("string"==typeof en&&(null==ew?void 0:ew.kind)===e5.APP_PAGE&&ew.segmentData){t.setHeader(eC,"2");let e=ew.segmentData.get(en);return void 0!==e?{type:"rsc",body:tF.fromStatic(e),cacheControl:eE.cacheControl}:(t.statusCode=204,{type:"rsc",body:tF.fromStatic(""),cacheControl:null==eE?void 0:eE.cacheControl})}if((null==ew?void 0:ew.kind)===e5.IMAGE)throw Object.defineProperty(new q("SSG should not return an image cache value"),"__NEXT_ERROR_CODE",{value:"E659",enumerable:!1,configurable:!0});if(Q)x={revalidate:0,expire:void 0};else if(H&&!F&&G)x={revalidate:0,expire:void 0};else if(1){if(ec)x={revalidate:0,expire:void 0};else if(D){if(O){let t=et(e,"notFoundRevalidate");x={revalidate:void 0===t?0:t,expire:void 0}}else if(C)x={revalidate:0,expire:void 0};else if(eE.cacheControl){if("number"==typeof eE.cacheControl.revalidate){if(eE.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${eE.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});x={revalidate:eE.cacheControl.revalidate,expire:(null==(f=eE.cacheControl)?void 0:f.expire)??this.nextConfig.expireTime}}else x={revalidate:ev.qF,expire:void 0}}}else t.getHeader("Cache-Control")||(x={revalidate:0,expire:void 0})}eE.cacheControl=x;let ex=et(e,"onCacheEntry");if(ex&&await ex({...eE,value:{...eE.value,kind:(null==(m=eE.value)?void 0:m.kind)===e5.APP_PAGE?"PAGE":null==(g=eE.value)?void 0:g.kind}},{url:et(e,"initURL")}))return null;if(ew){if(ew.kind===e5.REDIRECT)return(eE.cacheControl&&!t.getHeader("Cache-Control")&&t.setHeader("Cache-Control",ey(eE.cacheControl)),$)?{type:"json",body:tF.fromStatic(JSON.stringify(ew.props)),cacheControl:eE.cacheControl}:(await (e=>{let r={destination:e.pageProps.__N_REDIRECT,statusCode:e.pageProps.__N_REDIRECT_STATUS,basePath:e.pageProps.__N_REDIRECT_BASE_PATH},n=r.statusCode||(r.permanent?eo.PermanentRedirect:eo.TemporaryRedirect),{basePath:i}=this.nextConfig;i&&!1!==r.basePath&&r.destination.startsWith("/")&&(r.destination=`${i}${r.destination}`),r.destination.startsWith("/")&&(r.destination=V(r.destination)),t.redirect(r.destination,n).body(r.destination).send()})(ew.props),null);if(ew.kind===e5.APP_ROUTE){let r=ts(ew.headers);return D||r.delete(ev.VC),!eE.cacheControl||t.getHeader("Cache-Control")||r.get("Cache-Control")||r.set("Cache-Control",ey(eE.cacheControl)),await rM(e,t,new Response(ew.body,{headers:r,status:ew.status||200})),null}if(ew.kind===e5.APP_PAGE){if(e_&&Q)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(ew.headers){let e={...ew.headers};for(let[r,n]of(D||delete e[ev.VC],Object.entries(e)))if(void 0!==n){if(Array.isArray(n))for(let e of n)t.appendHeader(r,e);else"number"==typeof n&&(n=n.toString()),t.appendHeader(r,n)}}if(D&&(null==(y=ew.headers)?void 0:y[ev.VC])&&t.setHeader(ev.VC,ew.headers[ev.VC]),!ew.status||H&&G||(t.statusCode=ew.status),e_&&t.setHeader(eC,"1"),H&&!ec){if(void 0===ew.rscData){if(ew.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return{type:"rsc",body:ew.html,cacheControl:ee?{revalidate:0,expire:void 0}:eE.cacheControl}}return{type:"rsc",body:tF.fromStatic(ew.rscData),cacheControl:eE.cacheControl}}return{type:"html",body:ew.html,cacheControl:eE.cacheControl}}return $?{type:"json",body:tF.fromStatic(JSON.stringify(ew.pageData)),cacheControl:eE.cacheControl}:{type:"html",body:ew.html,cacheControl:eE.cacheControl}}return(er(e,"notFoundRevalidate",null==(v=eE.cacheControl)?void 0:v.revalidate),eE.cacheControl&&!t.getHeader("Cache-Control")&&t.setHeader("Cache-Control",ey(eE.cacheControl)),$)?(t.statusCode=404,t.body('{"notFound":true}').send()):await this.render404(e,t,{pathname:n,query:a},!1),null}stripNextDataPath(e,t=!0){return(e.includes(this.buildId)&&(e=t3(e.substring(e.indexOf(this.buildId)+this.buildId.length).replace(/\.json$/,""))),this.localeNormalizer&&t)?this.localeNormalizer.normalize(e):e}getOriginalAppPaths(e){if(this.enabledDirectories.app){var t;return(null==(t=this.appPathRoutes)?void 0:t[e])||null}return null}async renderPageComponent(e,t){var r;let{query:n,pathname:i}=e,s=this.getOriginalAppPaths(i),a=Array.isArray(s),o=i;a&&(o=s[s.length-1]);let l=await this.findPageComponents({locale:et(e.req,"locale"),page:o,query:n,params:e.renderOpts.params||{},isAppPath:a,sriEnabled:!!(null==(r=this.nextConfig.experimental.sri)?void 0:r.algorithm),appPaths:s,shouldEnsure:!1});if(l){(0,e9.getTracer)().setRootSpanAttribute("next.route",i);try{return await this.renderToResponseWithComponents(e,l)}catch(r){let e=r instanceof nl;if(!e||e&&t)throw r}}return!1}async renderToResponse(e){return(0,e9.getTracer)().trace(e7.Li.renderToResponse,{spanName:"rendering page",attributes:{"next.route":e.pathname}},async()=>this.renderToResponseImpl(e))}async renderToResponseImpl(e){var t;let{req:r,res:n,query:i,pathname:s}=e,a=et(e.req,"bubbleNoFallback")??!1;delete i[eO];let o={i18n:null==(t=this.i18nProvider)?void 0:t.fromRequest(r,s)};try{for await(let t of this.matchers.matchAll(s,o)){et(e.req,"invokeOutput");let r=await this.renderPageComponent({...e,pathname:t.definition.pathname,renderOpts:{...e.renderOpts,params:t.params}},a);if(!1!==r)return r}if(this.serverOptions.webServerConfig){e.pathname=this.serverOptions.webServerConfig.page;let t=await this.renderPageComponent(e,a);if(!1!==t)return t}}catch(i){let t=rt(i);if(i instanceof Q)throw console.error("Invariant: failed to load static page",JSON.stringify({page:s,url:e.req.url,matchedPath:e.req.headers[ev.vx],initUrl:et(e.req,"initURL"),didRewrite:!!et(e.req,"rewroteURL"),rewroteUrl:et(e.req,"rewroteURL")},null,2)),t;if(t instanceof nl&&a)throw t;if(t instanceof K||t instanceof J)return n.statusCode=400,await this.renderErrorToResponse(e,t);n.statusCode=500,await this.hasPage("/500")&&(er(e.req,"customErrorRender",!0),await this.renderErrorToResponse(e,t),en(e.req,"customErrorRender"));let r=t instanceof nc;if(!r)throw re(t)&&(t.page=s),t;return await this.renderErrorToResponse(e,r?t.innerError:t)}if(await this.getMiddleware()&&e.req.headers["x-nextjs-data"]&&(!n.statusCode||200===n.statusCode||404===n.statusCode)){let e=et(r,"locale");return n.setHeader("x-nextjs-matched-path",`${e?`/${e}`:""}${s}`),n.statusCode=200,n.setHeader("content-type","application/json"),n.body("{}"),n.send(),null}return n.statusCode=404,this.renderErrorToResponse(e,null)}async renderToHTML(e,t,r,n={}){return(0,e9.getTracer)().trace(e7.Li.renderToHTML,async()=>this.renderToHTMLImpl(e,t,r,n))}async renderToHTMLImpl(e,t,r,n={}){return this.getStaticHTML(e=>this.renderToResponse(e),{req:e,res:t,pathname:r,query:n})}async renderError(e,t,r,n,i={},s=!0){return(0,e9.getTracer)().trace(e7.Li.renderError,async()=>this.renderErrorImpl(e,t,r,n,i,s))}async renderErrorImpl(e,t,r,n,i={},s=!0){return s&&r.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),this.pipe(async t=>{let n=await this.renderErrorToResponse(t,e);if(500===r.statusCode)throw e;return n},{req:t,res:r,pathname:n,query:i})}async renderErrorToResponse(e,t){return(0,e9.getTracer)().trace(e7.Li.renderErrorToResponse,async()=>this.renderErrorToResponseImpl(e,t))}async renderErrorToResponseImpl(e,t){let{res:r,query:n}=e;try{let i=null;404===r.statusCode&&(this.enabledDirectories.app&&(i=await this.findPageComponents({locale:et(e.req,"locale"),page:ei.NO,query:n,params:{},isAppPath:!0,shouldEnsure:!0,url:e.req.url})),!i&&await this.hasPage("/404")&&(i=await this.findPageComponents({locale:et(e.req,"locale"),page:"/404",query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url})));let s=`/${r.statusCode}`;if(!et(e.req,"customErrorRender")&&!i&&ei.B.includes(s)&&(i=await this.findPageComponents({locale:et(e.req,"locale"),page:s,query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url})),i||(i=await this.findPageComponents({locale:et(e.req,"locale"),page:"/_error",query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url}),s="/_error"),!i)throw new nc(Object.defineProperty(Error("missing required error components"),"__NEXT_ERROR_CODE",{value:"E60",enumerable:!1,configurable:!0}));i.components.routeModule?er(e.req,"match",{definition:i.components.routeModule.definition,params:void 0}):en(e.req,"match");try{return await this.renderToResponseWithComponents({...e,pathname:s,renderOpts:{...e.renderOpts,err:t}},i)}catch(e){if(e instanceof nl)throw Object.defineProperty(Error("invariant: failed to render error page"),"__NEXT_ERROR_CODE",{value:"E55",enumerable:!1,configurable:!0});throw e}}catch(a){let t=rt(a),i=t instanceof nc;i||this.logError(t),r.statusCode=500;let s=await this.getFallbackErrorComponents(e.req.url);if(s)return er(e.req,"match",{definition:s.routeModule.definition,params:void 0}),this.renderToResponseWithComponents({...e,pathname:"/_error",renderOpts:{...e.renderOpts,err:i?t.innerError:t}},{query:n,components:s});return{type:"html",body:tF.fromStatic("Internal Server Error")}}}async renderErrorToHTML(e,t,r,n,i={}){return this.getStaticHTML(t=>this.renderErrorToResponse(t,e),{req:t,res:r,pathname:n,query:i})}async render404(e,t,r,n=!0){let{pathname:i,query:s}=r||(0,u.parse)(e.url,!0);return this.nextConfig.i18n&&(et(e,"locale")||er(e,"locale",this.nextConfig.i18n.defaultLocale),er(e,"defaultLocale",this.nextConfig.i18n.defaultLocale)),t.statusCode=404,this.renderError(null,e,t,i,s,n)}}let nh=require("vm");function nd(e){if(Object.isFrozen(e))return e;if(Array.isArray(e)){for(let t of e)t&&"object"==typeof t&&nd(t);return Object.freeze(e)}for(let t of Object.values(e))t&&"object"==typeof t&&nd(t);return Object.freeze(e)}let np=new Map;function nf(e,t=!0,r=np){let n=t&&r.get(e);if(n)return n;let i=JSON.parse((0,d.readFileSync)(e,"utf8"));return t&&(i=nd(i)),t&&r.set(e,i),i}let nm=new eA(1e3);function ng(e,t,r,n){let i;let s=`${e}:${t}:${r}:${n}`,a=null==nm?void 0:nm.get(s);if(a)return a;let o=c().join(t,ei.k4);n&&(i=nf(c().join(o,ei.XB),!0));let l=nf(c().join(o,ei.Fy),!0);try{e=t3(rh(e))}catch(t){throw console.error(t),new Y(e)}let u=t=>{let n=t[e];if(!t[n]&&r){let i={};for(let e of Object.keys(t))i[tg(e,r).pathname]=l[e];n=i[e]}return n};return(i&&(a=u(i)),a||(a=u(l)),a)?(a=c().join(o,a),null==nm||nm.set(s,a),a):(null==nm||nm.set(s,null),null)}function nv(e,t,r,n){let i=ng(e,t,r,n);if(!i)throw new Y(e);return i}async function ny(e,t,r){let n=nv(e,t,void 0,r);if(n.endsWith(".html"))return d.promises.readFile(n,"utf8").catch(t=>{throw new Q(e,t.message)});try{return process.env.__NEXT_PRIVATE_RUNTIME_TYPE=r?"app":"pages",require(n)}finally{process.env.__NEXT_PRIVATE_RUNTIME_TYPE=""}}function nb(e){return e.default||e}async function nE(e){return new Promise(t=>setTimeout(t,e))}let n_=Symbol.for("next.server.action-manifests");async function nw(e,t=3){for(;;)try{return nf(e)}catch(e){if(--t<=0)throw e;await nE(100)}}async function nx(e,t=3){try{return await nw(e,t)}catch(e){return}}async function nR(e,t=3){for(;;)try{return function(e,t=!0,r=np){let n=t&&r.get(e);if(n)return n;let i=(0,d.readFileSync)(e,"utf8");if(0===i.length)throw Object.defineProperty(Error("Manifest file is empty"),"__NEXT_ERROR_CODE",{value:"E328",enumerable:!1,configurable:!0});let s={};return(0,nh.runInNewContext)(i,s),t&&(s=nd(s)),t&&r.set(e,s),s}(e)}catch(e){if(--t<=0)throw e;await nE(100)}}async function nO(e,t,r){try{return(await nR(e,r)).__RSC_MANIFEST[t]}catch(e){return}}async function nC({distDir:e,page:t,isAppPath:r,isDev:n,sriEnabled:i}){let s,a={},o={};r||([a,o]=await Promise.all([ny("/_document",e,!1),ny("/_app",e,!1)]));let c=n?3:1;s=(0,l.join)(e,ei.pP);let[u,h,d,p,f,m]=await Promise.all([nw((0,l.join)(e,ei.xA),c),nx(s,c),r?void 0:nw((0,l.join)(e,`${ei.cG}.json`),c).catch(()=>void 0),r?nO((0,l.join)(e,"server","app",t.replace(/%5F/g,"_")+"_"+ei.iU+".js"),t.replace(/%5F/g,"_"),c):void 0,r?nw((0,l.join)(e,"server",ei.aC+".json"),c).catch(()=>null):null,i?nw((0,l.join)(e,"server",ei.P_+".json")).catch(()=>void 0):void 0]);f&&p&&function({page:e,clientReferenceManifest:t,serverActionsManifest:r,serverModuleMap:n}){var i;let s=null==(i=globalThis[n_])?void 0:i.clientReferenceManifestsPerPage;globalThis[n_]={clientReferenceManifestsPerPage:{...s,[eW(e)]:t},serverActionsManifest:r,serverModuleMap:n}}({page:t,clientReferenceManifest:p,serverActionsManifest:f,serverModuleMap:function({serverActionsManifest:e}){return new Proxy({},{get:(t,r)=>{var n;let i;let s=e.node[r].workers,a=L.workAsyncStorage.getStore();if(!(i=a?s[tp(n=a.page,"app")?n:"app"+n]:Object.values(s).at(0)))return;let{moduleId:o,async:l}=i;return{id:o,name:r,chunks:[],async:l}}})}({serverActionsManifest:f})});let g=await ny(t,e,r),v=nb(g),y=nb(a),b=nb(o),{getServerSideProps:E,getStaticProps:_,getStaticPaths:w,routeModule:x}=g;return{App:b,Document:y,Component:v,buildManifest:u,subresourceIntegrityManifest:m,reactLoadableManifest:h||{},dynamicCssManifest:d,pageConfig:g.config||{},ComponentMod:g,getServerSideProps:E,getStaticProps:_,getStaticPaths:w,clientReferenceManifest:p,serverActionsManifest:f,isAppPath:r,page:t,routeModule:x}}let nP=(0,e9.getTracer)().wrap(e7.p2.loadComponents,nC);function nS(e){return(t,r,n)=>{for(let i of e)if(new RegExp(i.regexp).exec(t)&&(!i.has&&!i.missing||t9(r,n,i.has,i.missing)))return!0;return!1}}var nT=r("../next-env/dist/index.js");let nA=require("stream");var nj=/*#__PURE__*/r.n(nA);class nD{constructor(e){this.fs=e,this.tasks=[]}findOrCreateTask(e){for(let t of this.tasks)if(t[0]===e)return t;let t=this.fs.mkdir(e);t.catch(()=>{});let r=[e,t,[]];return this.tasks.push(r),r}append(e,t){let r=this.findOrCreateTask(rc().dirname(e)),n=r[1].then(()=>this.fs.writeFile(e,t));n.catch(()=>{}),r[2].push(n)}wait(){return Promise.all(this.tasks.flatMap(e=>e[2]))}}class nN{constructor(e){this.fs=e.fs,this.flushToDisk=e.flushToDisk,this.serverDistDir=e.serverDistDir,this.revalidatedTags=e.revalidatedTags,this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE,e.maxMemoryCacheSize?t||(this.debug&&console.log("using memory store for fetch cache"),t=new eA(e.maxMemoryCacheSize,function({value:e}){var t;if(!e)return 25;if(e.kind===e5.REDIRECT)return JSON.stringify(e.props).length;if(e.kind===e5.IMAGE)throw Object.defineProperty(Error("invariant image should not be incremental-cache"),"__NEXT_ERROR_CODE",{value:"E501",enumerable:!1,configurable:!0});return e.kind===e5.FETCH?JSON.stringify(e.data||"").length:e.kind===e5.APP_ROUTE?e.body.length:e.html.length+((null==(t=JSON.stringify(e.kind===e5.APP_PAGE?e.rscData:e.pageData))?void 0:t.length)||0)})):this.debug&&console.log("not using memory store for fetch cache")}resetRequestCache(){}async revalidateTag(...e){let[t]=e;if(t="string"==typeof t?[t]:t,this.debug&&console.log("revalidateTag",t),0!==t.length)for(let e of t){let t=r9.tagsManifest.items[e]||{};t.revalidatedAt=Date.now(),r9.tagsManifest.items[e]=t}}async get(...e){var r,n,i,s,a,o;let[l,c]=e,{kind:u}=c,h=null==t?void 0:t.get(l);if(this.debug&&(u===e6.FETCH?console.log("get",l,c.tags,u,!!h):console.log("get",l,u,!!h)),!h){if(u===e6.APP_ROUTE)try{let e=this.getFilePath(`${l}.body`,e6.APP_ROUTE),t=await this.fs.readFile(e),{mtime:r}=await this.fs.stat(e),n=JSON.parse(await this.fs.readFile(e.replace(/\.body$/,ev.EP),"utf8"));return{lastModified:r.getTime(),value:{kind:e5.APP_ROUTE,body:t,headers:n.headers,status:n.status}}}catch{return null}try{let e=this.getFilePath(u===e6.FETCH?l:`${l}.html`,u),r=await this.fs.readFile(e,"utf8"),{mtime:n}=await this.fs.stat(e);if(u===e6.FETCH){let{tags:e,fetchIdx:t,fetchUrl:i}=c;if(!this.flushToDisk)return null;let o=n.getTime(),u=JSON.parse(r);if(h={lastModified:o,value:u},(null==(s=h.value)?void 0:s.kind)===e5.FETCH){let r=null==(a=h.value)?void 0:a.tags;(null==e?void 0:e.every(e=>null==r?void 0:r.includes(e)))||(this.debug&&console.log("tags vs storedTags mismatch",e,r),await this.set(l,h.value,{fetchCache:!0,tags:e,fetchIdx:t,fetchUrl:i}))}}else if(u===e6.APP_PAGE){let t,i,s;try{t=JSON.parse(await this.fs.readFile(e.replace(/\.html$/,ev.EP),"utf8"))}catch{}if(null==t?void 0:t.segmentPaths){let e=new Map;i=e;let r=l+ev.mH;await Promise.all(t.segmentPaths.map(async t=>{let n=this.getFilePath(r+t+ev.tz,e6.APP_PAGE);try{e.set(t,await this.fs.readFile(n))}catch{}}))}c.isFallback||(s=await this.fs.readFile(this.getFilePath(`${l}${c.isRoutePPREnabled?ev.pu:ev.RM}`,e6.APP_PAGE))),h={lastModified:n.getTime(),value:{kind:e5.APP_PAGE,html:r,rscData:s,postponed:null==t?void 0:t.postponed,headers:null==t?void 0:t.headers,status:null==t?void 0:t.status,segmentData:i}}}else if(u===e6.PAGES){let e;let t={};c.isFallback||(t=JSON.parse(await this.fs.readFile(this.getFilePath(`${l}${ev.x3}`,e6.PAGES),"utf8"))),h={lastModified:n.getTime(),value:{kind:e5.PAGES,html:r,pageData:t,headers:null==e?void 0:e.headers,status:null==e?void 0:e.status}}}else throw Object.defineProperty(Error(`Invariant: Unexpected route kind ${u} in file system cache.`),"__NEXT_ERROR_CODE",{value:"E445",enumerable:!1,configurable:!0});h&&(null==t||t.set(l,h))}catch{return null}}if((null==h?void 0:null==(r=h.value)?void 0:r.kind)===e5.APP_PAGE||(null==h?void 0:null==(n=h.value)?void 0:n.kind)===e5.PAGES){let e;let t=null==(o=h.value.headers)?void 0:o[ev.VC];if("string"==typeof t&&(e=t.split(",")),(null==e?void 0:e.length)&&e.some(e=>{var t;return(null==r9.tagsManifest?void 0:null==(t=r9.tagsManifest.items[e])?void 0:t.revalidatedAt)&&(null==r9.tagsManifest?void 0:r9.tagsManifest.items[e].revalidatedAt)>=((null==h?void 0:h.lastModified)||Date.now())}))return null}else(null==h?void 0:null==(i=h.value)?void 0:i.kind)===e5.FETCH&&(c.kind===e6.FETCH?[...c.tags||[],...c.softTags||[]]:[]).some(e=>{var t;return!!this.revalidatedTags.includes(e)||(null==r9.tagsManifest?void 0:null==(t=r9.tagsManifest.items[e])?void 0:t.revalidatedAt)&&(null==r9.tagsManifest?void 0:r9.tagsManifest.items[e].revalidatedAt)>=((null==h?void 0:h.lastModified)||Date.now())})&&(h=void 0);return h??null}async set(e,r,n){if(null==t||t.set(e,{value:r,lastModified:Date.now()}),this.debug&&console.log("set",e),!this.flushToDisk||!r)return;let i=new nD(this.fs);if(r.kind===e5.APP_ROUTE){let t=this.getFilePath(`${e}.body`,e6.APP_ROUTE);i.append(t,r.body);let n={headers:r.headers,status:r.status,postponed:void 0,segmentPaths:void 0};i.append(t.replace(/\.body$/,ev.EP),JSON.stringify(n,null,2))}else if(r.kind===e5.PAGES||r.kind===e5.APP_PAGE){let t=r.kind===e5.APP_PAGE,s=this.getFilePath(`${e}.html`,t?e6.APP_PAGE:e6.PAGES);if(i.append(s,r.html),n.fetchCache||n.isFallback||i.append(this.getFilePath(`${e}${t?n.isRoutePPREnabled?ev.pu:ev.RM:ev.x3}`,t?e6.APP_PAGE:e6.PAGES),t?r.rscData:JSON.stringify(r.pageData)),(null==r?void 0:r.kind)===e5.APP_PAGE){let e;if(r.segmentData){e=[];let t=s.replace(/\.html$/,ev.mH);for(let[n,s]of r.segmentData){e.push(n);let r=t+n+ev.tz;i.append(r,s)}}let t={headers:r.headers,status:r.status,postponed:r.postponed,segmentPaths:e};i.append(s.replace(/\.html$/,ev.EP),JSON.stringify(t))}}else if(r.kind===e5.FETCH){let t=this.getFilePath(e,e6.FETCH);i.append(t,JSON.stringify({...r,tags:n.fetchCache?n.tags:[]}))}await i.wait()}getFilePath(e,t){switch(t){case e6.FETCH:return rc().join(this.serverDistDir,"..","cache","fetch-cache",e);case e6.PAGES:return rc().join(this.serverDistDir,"pages",e);case e6.IMAGE:case e6.APP_PAGE:case e6.APP_ROUTE:return rc().join(this.serverDistDir,"app",e);default:throw Object.defineProperty(Error(`Unexpected file path kind: ${t}`),"__NEXT_ERROR_CODE",{value:"E479",enumerable:!1,configurable:!0})}}}class nk{static #e=this.cacheControls=new Map;constructor(e){this.prerenderManifest=e}get(e){let t=nk.cacheControls.get(e);if(t)return t;let r=this.prerenderManifest.routes[e];if(r){let{initialRevalidateSeconds:e,initialExpireSeconds:t}=r;if(void 0!==e)return{revalidate:e,expire:t}}let n=this.prerenderManifest.dynamicRoutes[e];if(n){let{fallbackRevalidate:e,fallbackExpire:t}=n;if(void 0!==e)return{revalidate:e,expire:t}}}set(e,t){nk.cacheControls.set(e,t)}clear(){nk.cacheControls.clear()}}let nI=rK?new rK:new class{disable(){throw rV}getStore(){}run(){throw rV}exit(){throw rV}enterWith(){throw rV}static bind(e){return e}};class nM{constructor({fs:e,dev:t,flushToDisk:r,minimalMode:n,serverDistDir:i,requestHeaders:s,requestProtocol:a,maxMemoryCacheSize:o,getPrerenderManifest:l,fetchCacheKeyPrefix:c,CurCacheHandler:u,allowedRevalidateHeaderKeys:h}){var d,p,f,m;this.locks=new Map;let g=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;this.hasCustomCacheHandler=!!u;let v=Symbol.for("@next/cache-handlers"),y=globalThis;if(u)g&&console.log("using custom cache handler",u.name);else{let t=y[v];(null==t?void 0:t.FetchCache)?u=t.FetchCache:e&&i&&(g&&console.log("using filesystem cache handler"),u=nN)}process.env.__NEXT_TEST_MAX_ISR_CACHE&&(o=parseInt(process.env.__NEXT_TEST_MAX_ISR_CACHE,10)),this.dev=t,this.disableForTestmode="true"===process.env.NEXT_PRIVATE_TEST_PROXY,this.minimalMode=n,this.requestHeaders=s,this.requestProtocol=a,this.allowedRevalidateHeaderKeys=h,this.prerenderManifest=l(),this.cacheControls=new nk(this.prerenderManifest),this.fetchCacheKeyPrefix=c;let b=[];s[ev.kz]===(null==(p=this.prerenderManifest)?void 0:null==(d=p.preview)?void 0:d.previewModeId)&&(this.isOnDemandRevalidate=!0),n&&"string"==typeof s[ev.vS]&&s[ev.c1]===(null==(m=this.prerenderManifest)?void 0:null==(f=m.preview)?void 0:f.previewModeId)&&(b=s[ev.vS].split(",")),u&&(this.cacheHandler=new u({dev:t,fs:e,flushToDisk:r,serverDistDir:i,revalidatedTags:b,maxMemoryCacheSize:o,_requestHeaders:s,fetchCacheKeyPrefix:c}))}calculateRevalidate(e,t,r,n){if(r)return Math.floor(performance.timeOrigin+performance.now()-1e3);let i=this.cacheControls.get(rG(e)),s=i?i.revalidate:!n&&1;return"number"==typeof s?1e3*s+t:s}_getPathname(e,t){return t?e:rh(e)}resetRequestCache(){var e,t;null==(t=this.cacheHandler)||null==(e=t.resetRequestCache)||e.call(t)}async lock(e){let t=()=>Promise.resolve(),r=this.locks.get(e);r&&await r;let n=new Promise(r=>{t=async()=>{r(),this.locks.delete(e)}});return this.locks.set(e,n),t}async revalidateTag(e){var t;let r=[];(null==(t=this.cacheHandler)?void 0:t.revalidateTag)&&r.push(this.cacheHandler.revalidateTag(e));let n=no();if(n)for(let t of(e=Array.isArray(e)?e:[e],n))r.push(t.expireTags(...e));await Promise.all(r)}async generateCacheKey(e,t={}){let n=[],i=new TextEncoder,s=new TextDecoder;if(t.body){if("function"==typeof t.body.getReader){let e=t.body,r=[];try{await e.pipeTo(new WritableStream({write(e){"string"==typeof e?(r.push(i.encode(e)),n.push(e)):(r.push(e),n.push(s.decode(e,{stream:!0})))}})),n.push(s.decode());let a=r.reduce((e,t)=>e+t.length,0),o=new Uint8Array(a),l=0;for(let e of r)o.set(e,l),l+=e.length;t._ogBody=o}catch(e){console.error("Problem reading body",e)}}else if("function"==typeof t.body.keys){let e=t.body;for(let r of(t._ogBody=t.body,new Set([...e.keys()]))){let t=e.getAll(r);n.push(`${r}=${(await Promise.all(t.map(async e=>"string"==typeof e?e:await e.text()))).join(",")}`)}}else if("function"==typeof t.body.arrayBuffer){let e=t.body,r=await e.arrayBuffer();n.push(await e.text()),t._ogBody=new Blob([r],{type:e.type})}else"string"==typeof t.body&&(n.push(t.body),t._ogBody=t.body)}let a="function"==typeof(t.headers||{}).keys?Object.fromEntries(t.headers):Object.assign({},t.headers);"traceparent"in a&&delete a.traceparent,"tracestate"in a&&delete a.tracestate;let o=JSON.stringify(["v3",this.fetchCacheKeyPrefix||"",e,t.method,a,t.mode,t.redirect,t.credentials,t.referrer,t.referrerPolicy,t.integrity,t.cache,n]);return r("crypto").createHash("sha256").update(o).digest("hex")}async get(e,t){var r,n,i,s;let a,o;if(t.kind===e6.FETCH){let t=nI.getStore(),r=t?(0,A.getRenderResumeDataCache)(t):null;if(r){let t=r.fetch.get(e);if((null==t?void 0:t.kind)===e5.FETCH)return{isStale:!1,value:t}}}if(this.disableForTestmode||this.dev&&(t.kind!==e6.FETCH||"no-cache"===this.requestHeaders["cache-control"]))return null;e=this._getPathname(e,t.kind===e6.FETCH);let l=await (null==(r=this.cacheHandler)?void 0:r.get(e,t));if(t.kind===e6.FETCH){if(!l)return null;if((null==(i=l.value)?void 0:i.kind)!==e5.FETCH)throw Object.defineProperty(new q(`Expected cached value for cache key ${JSON.stringify(e)} to be a "FETCH" kind, got ${JSON.stringify(null==(s=l.value)?void 0:s.kind)} instead.`),"__NEXT_ERROR_CODE",{value:"E653",enumerable:!1,configurable:!0});if([...t.tags||[],...t.softTags||[]].some(e=>{var t;return null==(t=this.revalidatedTags)?void 0:t.includes(e)}))return null;let r=t.revalidate||l.value.revalidate,n=(performance.timeOrigin+performance.now()-(l.lastModified||0))/1e3,a=l.value.data;return{isStale:n>r,value:{kind:e5.FETCH,data:a,revalidate:r}}}if((null==l?void 0:null==(n=l.value)?void 0:n.kind)===e5.FETCH)throw Object.defineProperty(new q(`Expected cached value for cache key ${JSON.stringify(e)} not to be a ${JSON.stringify(t.kind)} kind, got "FETCH" instead.`),"__NEXT_ERROR_CODE",{value:"E652",enumerable:!1,configurable:!0});let c=null,{isFallback:u}=t,h=this.cacheControls.get(rG(e));return(null==l?void 0:l.lastModified)===-1?(a=-1,o=-1*ev.qF):a=!!(!1!==(o=this.calculateRevalidate(e,(null==l?void 0:l.lastModified)||performance.timeOrigin+performance.now(),this.dev??!1,t.isFallback))&&o<performance.timeOrigin+performance.now())||void 0,l&&(c={isStale:a,cacheControl:h,revalidateAfter:o,value:l.value,isFallback:u}),!l&&this.prerenderManifest.notFoundRoutes.includes(e)&&(c={isStale:a,value:null,cacheControl:h,revalidateAfter:o,isFallback:u},this.set(e,c.value,{...t,cacheControl:h})),c}async set(e,t,r){if((null==t?void 0:t.kind)===e5.FETCH){let r=nI.getStore(),n=r?(0,A.getPrerenderResumeDataCache)(r):null;n&&n.fetch.set(e,t)}if(this.disableForTestmode||this.dev&&!r.fetchCache)return;e=this._getPathname(e,r.fetchCache);let n=JSON.stringify(t).length;if(r.fetchCache&&!this.hasCustomCacheHandler&&n>2097152){if(this.dev)throw Object.defineProperty(Error(`Failed to set Next.js data cache, items over 2MB can not be cached (${n} bytes)`),"__NEXT_ERROR_CODE",{value:"E86",enumerable:!1,configurable:!0});return}try{var i;!r.fetchCache&&r.cacheControl&&this.cacheControls.set(rG(e),r.cacheControl),await (null==(i=this.cacheHandler)?void 0:i.set(e,t,r))}catch(t){console.warn("Failed to update prerender cache for",e,t)}}}let nL=require("http"),nq=require("https"),n$={existsSync:p().existsSync,readFile:p().promises.readFile,readFileSync:p().readFileSync,writeFile:(e,t)=>p().promises.writeFile(e,t),mkdir:e=>p().promises.mkdir(e,{recursive:!0}),stat:e=>p().promises.stat(e)};class nF extends nj().Readable{constructor({url:e,headers:t,method:r,socket:n=null,readable:i}){super(),this.httpVersion="1.0",this.httpVersionMajor=1,this.httpVersionMinor=0,this.socket=new Proxy({},{get:(e,t)=>{if("encrypted"!==t&&"remoteAddress"!==t)throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0});if("remoteAddress"!==t)return!1}}),this.url=e,this.headers=t,this.method=r,i&&(this.bodyReadable=i,this.bodyReadable.on("end",()=>this.emit("end")),this.bodyReadable.on("close",()=>this.emit("close"))),n&&(this.socket=n)}get headersDistinct(){let e={};for(let[t,r]of Object.entries(this.headers))r&&(e[t]=Array.isArray(r)?r:[r]);return e}_read(e){if(this.bodyReadable)return this.bodyReadable._read(e);this.emit("end"),this.emit("close")}get connection(){return this.socket}get aborted(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get complete(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get trailers(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get trailersDistinct(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get rawTrailers(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get rawHeaders(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setTimeout(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}}class nH extends nj().Writable{constructor(e={}){super(),this.statusMessage="",this.finished=!1,this.headersSent=!1,this.buffers=[],this.statusCode=e.statusCode??200,this.socket=e.socket??null,this.headers=e.headers?ts(e.headers):new Headers,this.headPromise=new Promise(e=>{this.headPromiseResolve=e}),this.hasStreamed=new Promise((e,t)=>{this.on("finish",()=>e(!0)),this.on("end",()=>e(!0)),this.on("error",e=>t(e))}).then(e=>(null==this.headPromiseResolve||this.headPromiseResolve.call(this),e)),e.resWriter&&(this.resWriter=e.resWriter)}appendHeader(e,t){for(let r of Array.isArray(t)?t:[t])this.headers.append(e,r);return this}get isSent(){return this.finished||this.headersSent}get connection(){return this.socket}write(e){return this.resWriter?this.resWriter(e):(this.buffers.push(Buffer.isBuffer(e)?e:Buffer.from(e)),!0)}end(){return this.finished=!0,super.end(...arguments)}_implicitHeader(){}_write(e,t,r){this.write(e),r()}writeHead(e,t,r){if(r||"string"==typeof t?"string"==typeof t&&t.length>0&&(this.statusMessage=t):r=t,r){if(Array.isArray(r))for(let e=0;e<r.length;e+=2)this.setHeader(r[e],r[e+1]);else for(let[e,t]of Object.entries(r))void 0!==t&&this.setHeader(e,t)}return this.statusCode=e,this.headersSent=!0,null==this.headPromiseResolve||this.headPromiseResolve.call(this),this}hasHeader(e){return this.headers.has(e)}getHeader(e){return this.headers.get(e)??void 0}getHeaders(){return to(this.headers)}getHeaderNames(){return Array.from(this.headers.keys())}setHeader(e,t){if(Array.isArray(t))for(let r of(this.headers.delete(e),t))this.headers.append(e,r);else"number"==typeof t?this.headers.set(e,t.toString()):this.headers.set(e,t);return this}removeHeader(e){this.headers.delete(e)}flushHeaders(){}get strictContentLength(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeEarlyHints(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get req(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}assignSocket(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}detachSocket(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeContinue(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeProcessing(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get upgrading(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get chunkedEncoding(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get shouldKeepAlive(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get useChunkedEncodingByDefault(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get sendDate(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setTimeout(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}addTrailers(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setHeaders(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}}class nz{async load(e){return await require(e)}}class nU{static async load(e,t=new nz){let r=await t.load(e);if("routeModule"in r)return r.routeModule;throw Object.defineProperty(Error(`Module "${e}" does not export a routeModule.`),"__NEXT_ERROR_CODE",{value:"E53",enumerable:!1,configurable:!0})}}let nX=(e,t)=>{let r=c().isAbsolute(t)?t:c().join(e,t);return(0,u.pathToFileURL)(r).toString()};function nW(e){var t,r;return(null==(r=e.has)?void 0:null==(t=r[0])?void 0:t.key)===ex}class nB{add(e){this.callbacks.push(e)}async runAll(){if(!this.callbacks.length)return;let e=this.callbacks;this.callbacks=[],await Promise.allSettled(e.map(async e=>e()))}constructor(){this.callbacks=[]}}let nG=e=>import(e).then(e=>e.default||e),nV=require,nK=new WeakMap;class nJ extends nu{constructor(e){var t,r;super(e),this.registeredInstrumentation=!1,this.cleanupListeners=new nB,this.handleNextImageRequest=async(e,t,r)=>!(!r.pathname||!r.pathname.startsWith("/_next/image")||et(e,"middlewareInvoke"))&&(t.statusCode=400,t.body("Bad Request").send(),!0),this.handleCatchallRenderRequest=async(e,t,r)=>{let{pathname:n,query:i}=r;if(!n)throw Object.defineProperty(Error("Invariant: pathname is undefined"),"__NEXT_ERROR_CODE",{value:"E409",enumerable:!1,configurable:!0});er(e,"bubbleNoFallback",!0);try{var s;n=eQ(n);let a={i18n:null==(s=this.i18nProvider)?void 0:s.fromRequest(e,n)},o=await this.matchers.match(n,a);if(!o)return await this.render(e,t,n,i,r,!0),!0;for(let n of(er(e,"match",o),this.getEdgeFunctionsPages()))if(n===o.definition.page){if("export"===this.nextConfig.output)return await this.render404(e,t,r),!0;delete i[eO];try{if(await this.runEdgeFunction({req:e,res:t,query:i,params:o.params,page:o.definition.page,match:o,appPaths:null}))return!0}catch(t){throw await this.instrumentationOnRequestError(t,e,{routePath:o.definition.page,routerKind:"Pages Router",routeType:"route",revalidateReason:void 0}),t}}if(o.definition.kind===tH.PAGES_API){if("export"===this.nextConfig.output)return await this.render404(e,t,r),!0;if(await this.handleApiRequest(e,t,i,o))return!0}return await this.render(e,t,n,i,r,!0),!0}catch(r){if(r instanceof nl)throw r;try{return this.logError(r),t.statusCode=500,await this.renderError(r,e,t,n,i),!0}catch{}throw r}},this.handleCatchallMiddlewareRequest=async(e,t,r)=>{let n;let i=et(e,"middlewareInvoke");if(!i)return!1;let s=()=>(er(e,"middlewareInvoke",!0),t.body("").send(),!0),a=await this.getMiddleware();if(!a)return s();let o=eT(et(e,"initURL")),l=ty(o.pathname,{nextConfig:this.nextConfig,i18nProvider:this.i18nProvider});o.pathname=l.pathname;let c=eQ(r.pathname||"");if(!a.match(c,e,o.query))return s();let u=!1;try{if(await this.ensureMiddleware(e.url),n=await this.runMiddleware({request:e,response:t,parsedUrl:o,parsed:r}),"response"in n){if(i)throw u=!0,Object.defineProperty(new e9.BubbledError(!0,n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});for(let[e,r]of Object.entries(to(n.response.headers)))"content-encoding"!==e&&void 0!==r&&t.setHeader(e,r);t.statusCode=n.response.status;let{originalResponse:e}=t;return n.response.body?await t$(n.response.body,e):e.end(),!0}}catch(i){if(u)throw i;if(re(i)&&"ENOENT"===i.code)return await this.render404(e,t,r),!0;if(i instanceof K)return t.statusCode=400,await this.renderError(i,e,t,r.pathname||""),!0;let n=rt(i);return console.error(n),t.statusCode=500,await this.renderError(n,e,t,r.pathname||""),!0}return n.finished},this.isDev=e.dev??!1,this.sriEnabled=!!(null==(r=e.conf.experimental)?void 0:null==(t=r.sri)?void 0:t.algorithm),this.renderOpts.optimizeCss&&(process.env.__NEXT_OPTIMIZE_CSS=JSON.stringify(!0)),this.renderOpts.nextScriptWorkers&&(process.env.__NEXT_SCRIPT_WORKERS=JSON.stringify(!0)),process.env.NEXT_DEPLOYMENT_ID=this.nextConfig.deploymentId||"";let{appDocumentPreloading:n}=this.nextConfig.experimental;if(e.dev||!0!==n&&void 0===n||(nP({distDir:this.distDir,page:"/_document",isAppPath:!1,isDev:this.isDev,sriEnabled:this.sriEnabled}).catch(()=>{}),nP({distDir:this.distDir,page:"/_app",isAppPath:!1,isDev:this.isDev,sriEnabled:this.sriEnabled}).catch(()=>{})),e.dev,!e.dev){let{dynamicRoutes:e=[]}=this.getRoutesManifest()??{};this.dynamicRoutes=e.map(e=>{let t=e1(e.page);return{match:Z(t),page:e.page,re:t.re}})}(function(e){if(!globalThis.__NEXT_HTTP_AGENT){if(!e)throw Object.defineProperty(Error("Expected config.httpAgentOptions to be an object"),"__NEXT_ERROR_CODE",{value:"E204",enumerable:!1,configurable:!0});globalThis.__NEXT_HTTP_AGENT_OPTIONS=e.httpAgentOptions,globalThis.__NEXT_HTTP_AGENT=new nL.Agent(e.httpAgentOptions),globalThis.__NEXT_HTTPS_AGENT=new nq.Agent(e.httpAgentOptions)}})(this.nextConfig),this.middlewareManifestPath=(0,l.join)(this.serverDistDir,ei.Kf),e.dev||this.prepare().catch(e=>{console.error("Failed to prepare server",e)})}async unstable_preloadEntries(){let e=this.getAppPathsManifest(),t=this.getPagesManifest();for(let e of(await this.loadCustomCacheHandlers(),Object.keys(t||{})))await nP({distDir:this.distDir,page:e,isAppPath:!1,isDev:this.isDev,sriEnabled:this.sriEnabled}).catch(()=>{});for(let t of Object.keys(e||{}))await nP({distDir:this.distDir,page:t,isAppPath:!0,isDev:this.isDev,sriEnabled:this.sriEnabled}).then(async({ComponentMod:e})=>{e.patchFetch();let t=e.__next_app__.require;if(null==t?void 0:t.m)for(let e of Object.keys(t.m))await t(e)}).catch(()=>{})}async handleUpgrade(){}async loadInstrumentationModule(){if(!this.serverOptions.dev)try{this.instrumentation=await nV((0,l.resolve)(this.serverOptions.dir||".",this.serverOptions.conf.distDir,"server",ev.Hw))}catch(e){if("MODULE_NOT_FOUND"!==e.code)throw Object.defineProperty(Error("An error occurred while loading the instrumentation hook",{cause:e}),"__NEXT_ERROR_CODE",{value:"E92",enumerable:!1,configurable:!0})}return this.instrumentation}async prepareImpl(){await super.prepareImpl(),await this.runInstrumentationHookIfAvailable()}async runInstrumentationHookIfAvailable(){var e,t;this.registeredInstrumentation||(this.registeredInstrumentation=!0,await (null==(t=this.instrumentation)?void 0:null==(e=t.register)?void 0:e.call(t)))}loadEnvConfig({dev:e,forceReload:t,silent:r}){(0,nT.loadEnvConfig)(this.dir,e,r?{info:()=>{},error:()=>{}}:a,t)}async loadCustomCacheHandlers(){let{cacheHandlers:e}=this.nextConfig.experimental;if(e&&function(){if(na[ni])return nr("cache handlers already initialized"),!1;if(nr("initializing cache handlers"),na[ni]=new Map,na[nn]){let e;na[nn].DefaultCache?(nr('setting "default" cache handler from symbol'),e=na[nn].DefaultCache):(nr('setting "default" cache handler from default'),e=nt),na[ni].set("default",e),na[nn].RemoteCache?(nr('setting "remote" cache handler from symbol'),na[ni].set("remote",na[nn].RemoteCache)):(nr('setting "remote" cache handler from default'),na[ni].set("remote",e))}else nr('setting "default" cache handler from default'),na[ni].set("default",nt),nr('setting "remote" cache handler from default'),na[ni].set("remote",nt);return na[ns]=new Set(na[ni].values()),!0}())for(let[t,r]of Object.entries(e))r&&function(e,t){if(!na[ni]||!na[ns])throw Object.defineProperty(Error("Cache handlers not initialized"),"__NEXT_ERROR_CODE",{value:"E649",enumerable:!1,configurable:!0});nr('setting cache handler for "%s"',e),na[ni].set(e,t),na[ns].add(t)}(t,nb(await nG(nX(this.distDir,r))))}async getIncrementalCache({requestHeaders:e,requestProtocol:t}){let r;let{cacheHandler:n}=this.nextConfig;return n&&(r=nb(await nG(nX(this.distDir,n)))),await this.loadCustomCacheHandlers(),new nM({fs:this.getCacheFilesystem(),dev:!1,requestHeaders:e,requestProtocol:t,allowedRevalidateHeaderKeys:this.nextConfig.experimental.allowedRevalidateHeaderKeys,minimalMode:!0,serverDistDir:this.serverDistDir,fetchCacheKeyPrefix:this.nextConfig.experimental.fetchCacheKeyPrefix,maxMemoryCacheSize:this.nextConfig.cacheMaxMemorySize,flushToDisk:!1,getPrerenderManifest:()=>this.getPrerenderManifest(),CurCacheHandler:r})}getResponseCache(){return new tX(!0)}getPublicDir(){return(0,l.join)(this.dir,ei.ms)}getHasStaticDir(){return p().existsSync((0,l.join)(this.dir,"static"))}getPagesManifest(){return nf((0,l.join)(this.serverDistDir,ei.Fy))}getAppPathsManifest(){if(this.enabledDirectories.app)return nf((0,l.join)(this.serverDistDir,ei.XB))}getinterceptionRoutePatterns(){if(!this.enabledDirectories.app)return[];let e=this.getRoutesManifest();return(null==e?void 0:e.rewrites.beforeFiles.filter(nW).map(e=>new RegExp(e.regex)))??[]}async hasPage(e){var t;return!!ng(e,this.distDir,null==(t=this.nextConfig.i18n)?void 0:t.locales,this.enabledDirectories.app)}getBuildId(){let e=(0,l.join)(this.distDir,ei.UD);try{return p().readFileSync(e,"utf8").trim()}catch(e){if("ENOENT"===e.code)throw Object.defineProperty(Error(`Could not find a production build in the '${this.distDir}' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id`),"__NEXT_ERROR_CODE",{value:"E427",enumerable:!1,configurable:!0});throw e}}getEnabledDirectories(e){let t=e?this.dir:this.serverDistDir;return{app:!!es(t,"app"),pages:!!es(t,"pages")}}sendRenderResult(e,t,r){return eP({req:e.originalRequest,res:t.originalResponse,result:r.result,type:r.type,generateEtags:r.generateEtags,poweredByHeader:r.poweredByHeader,cacheControl:r.cacheControl})}async runApi(e,t,r,n){for(let i of this.getEdgeFunctionsPages())if(i===n.definition.pathname&&await this.runEdgeFunction({req:e,res:t,query:r,params:n.params,page:n.definition.pathname,appPaths:null}))return!0;let i=await nU.load(n.definition.filename);return r={...r,...n.params},await i.render(e.originalRequest,t.originalResponse,{previewProps:this.renderOpts.previewProps,revalidate:this.revalidate.bind(this),trustHostHeader:this.nextConfig.experimental.trustHostHeader,allowedRevalidateHeaderKeys:this.nextConfig.experimental.allowedRevalidateHeaderKeys,hostname:this.fetchHostname,minimalMode:!0,dev:!1,query:r,params:n.params,page:n.definition.pathname,onError:this.instrumentationOnRequestError.bind(this),multiZoneDraftMode:this.nextConfig.experimental.multiZoneDraftMode}),!0}async renderHTML(e,t,r,n,i){return(0,e9.getTracer)().trace(e7.Fx.renderHTML,async()=>this.renderHTMLImpl(e,t,r,n,i))}async renderHTMLImpl(e,t,r,n,i){throw Object.defineProperty(Error("Invariant: renderHTML should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E472",enumerable:!1,configurable:!0})}async imageOptimizer(e,t,r,n){throw Object.defineProperty(Error("invariant: imageOptimizer should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E506",enumerable:!1,configurable:!0})}getPagePath(e,t){return nv(e,this.distDir,t,this.enabledDirectories.app)}async renderPageComponent(e,t){let r=this.getEdgeFunctionsPages()||[];if(r.length){let t=this.getOriginalAppPaths(e.pathname),n=Array.isArray(t),i=e.pathname;for(let s of(n&&(i=t[0]),r))if(s===i)return await this.runEdgeFunction({req:e.req,res:e.res,query:e.query,params:e.renderOpts.params,page:i,appPaths:t}),null}return super.renderPageComponent(e,t)}async findPageComponents({locale:e,page:t,query:r,params:n,isAppPath:i,url:s}){return(0,e9.getTracer)().trace(e7.Fx.findPageComponents,{spanName:"resolve page components",attributes:{"next.route":i?eW(t):t}},()=>this.findPageComponentsImpl({locale:e,page:t,query:r,params:n,isAppPath:i,url:s}))}async findPageComponentsImpl({locale:e,page:t,query:r,params:n,isAppPath:i,url:s}){let a=[t];for(let s of(r.amp&&a.unshift((i?eW(t):rh(t))+".amp"),e&&a.unshift(...a.map(t=>`/${e}${"/"===t?"":t}`)),a))try{let t=await nP({distDir:this.distDir,page:s,isAppPath:i,isDev:this.isDev,sriEnabled:this.sriEnabled});if(e&&"string"==typeof t.Component&&!s.startsWith(`/${e}/`)&&s!==`/${e}`)continue;return{components:t,query:{...!this.renderOpts.isExperimentalCompile&&t.getStaticProps?{amp:r.amp}:r,...(i?{}:n)||{}}}}catch(e){if(!(e instanceof Y))throw e}return null}getNextFontManifest(){return nf((0,l.join)(this.distDir,"server",ei.E5+".json"))}logErrorWithOriginalStack(e,t){throw Object.defineProperty(Error("Invariant: logErrorWithOriginalStack can only be called on the development server"),"__NEXT_ERROR_CODE",{value:"E6",enumerable:!1,configurable:!0})}async ensurePage(e){throw Object.defineProperty(Error("Invariant: ensurePage can only be called on the development server"),"__NEXT_ERROR_CODE",{value:"E291",enumerable:!1,configurable:!0})}async handleApiRequest(e,t,r,n){return this.runApi(e,t,r,n)}getCacheFilesystem(){return n$}normalizeReq(e){return e instanceof eh?e:new eh(e)}normalizeRes(e){return e instanceof ed?e:new ed(e)}getRequestHandler(){return this.makeRequestHandler()}makeRequestHandler(){this.prepare().catch(e=>{console.error("Failed to prepare server",e)});let e=super.getRequestHandler();return(t,r,n)=>e(this.normalizeReq(t),this.normalizeRes(r),n)}async revalidate({urlPath:e,revalidateHeaders:t,opts:r}){let n=function({url:e,headers:t={},method:r="GET",bodyReadable:n,resWriter:i,socket:s=null}){return{req:new nF({url:e,headers:t,method:r,socket:s,readable:n}),res:new nH({socket:s,resWriter:i})}}({url:e,headers:t}),i=this.getRequestHandler();if(await i(new eh(n.req),new ed(n.res)),await n.res.hasStreamed,"REVALIDATED"!==n.res.getHeader("x-nextjs-cache")&&200!==n.res.statusCode&&!(404===n.res.statusCode&&r.unstable_onlyGenerated))throw Object.defineProperty(Error(`Invalid response ${n.res.statusCode}`),"__NEXT_ERROR_CODE",{value:"E175",enumerable:!1,configurable:!0})}async render(e,t,r,n,i,s=!1){return super.render(this.normalizeReq(e),this.normalizeRes(t),r,n,i,s)}async renderToHTML(e,t,r,n){return super.renderToHTML(this.normalizeReq(e),this.normalizeRes(t),r,n)}async renderErrorToResponseImpl(e,t){let{req:r,res:n,query:i}=e;return 404===n.statusCode&&this.enabledDirectories.app&&this.getEdgeFunctionsPages().includes(ei.NO)?(await this.runEdgeFunction({req:r,res:n,query:i||{},params:{},page:ei.NO,appPaths:null}),null):super.renderErrorToResponseImpl(e,t)}async renderError(e,t,r,n,i,s){return super.renderError(e,this.normalizeReq(t),this.normalizeRes(r),n,i,s)}async renderErrorToHTML(e,t,r,n,i){return super.renderErrorToHTML(e,this.normalizeReq(t),this.normalizeRes(r),n,i)}async render404(e,t,r,n){return super.render404(this.normalizeReq(e),this.normalizeRes(t),r,n)}getMiddlewareManifest(){return null}async getMiddleware(){var e,t;let r=this.getMiddlewareManifest(),n=null==r?void 0:null==(e=r.middleware)?void 0:e["/"];if(!n){let e=await this.loadNodeMiddleware();return e?{match:nS((null==(t=e.config)?void 0:t.matchers)||[{regexp:".*",originalSource:"/:path*"}]),page:"/"}:void 0}return{match:function(e){let t=nK.get(e);if(t)return t;if(!Array.isArray(e.matchers))throw Object.defineProperty(Error(`Invariant: invalid matchers for middleware ${JSON.stringify(e)}`),"__NEXT_ERROR_CODE",{value:"E257",enumerable:!1,configurable:!0});let r=nS(e.matchers);return nK.set(e,r),r}(n),page:"/"}}getEdgeFunctionsPages(){let e=this.getMiddlewareManifest();return e?Object.keys(e.functions):[]}getEdgeFunctionInfo(e){let t;let r=this.getMiddlewareManifest();if(!r)return null;try{t=t3(rh(e.page))}catch(e){return null}let n=e.middleware?r.middleware[t]:r.functions[t];if(!n){if(!e.middleware)throw new Y(t);return null}return{name:n.name,paths:n.files.map(e=>(0,l.join)(this.distDir,e)),wasm:(n.wasm??[]).map(e=>({...e,filePath:(0,l.join)(this.distDir,e.filePath)})),assets:n.assets&&n.assets.map(e=>({...e,filePath:(0,l.join)(this.distDir,e.filePath)})),env:n.env}}async loadNodeMiddleware(){if(this.nextConfig.experimental.nodeMiddleware)try{var e;let t=r("./dist/esm/server sync recursive")((0,l.join)(this.distDir,"server",ei.vY));if(null==t?void 0:null==(e=t.functions)?void 0:e["/_middleware"])return r("./dist/esm/server sync recursive")((0,l.join)(this.distDir,"server","middleware.js"))}catch(e){if(re(e)&&"ENOENT"!==e.code&&"MODULE_NOT_FOUND"!==e.code)throw e}}async hasMiddleware(e){let t=this.getEdgeFunctionInfo({page:e,middleware:!0}),r=await this.loadNodeMiddleware();return!t&&!!r||!!(t&&t.paths.length>0)}async ensureMiddleware(e){}async ensureEdgeFunction(e){}async runMiddleware(e){throw Object.defineProperty(Error("invariant: runMiddleware should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E276",enumerable:!1,configurable:!0})}getPrerenderManifest(){var e;return this._cachedPreviewManifest||((this.renderOpts,(null==(e=this.serverOptions)?void 0:e.dev)||process.env.NEXT_PHASE===ei.zP)?this._cachedPreviewManifest={version:4,routes:{},dynamicRoutes:{},notFoundRoutes:[],preview:{previewModeId:r("crypto").randomBytes(16).toString("hex"),previewModeSigningKey:r("crypto").randomBytes(32).toString("hex"),previewModeEncryptionKey:r("crypto").randomBytes(32).toString("hex")}}:this._cachedPreviewManifest=nf((0,l.join)(this.distDir,ei.sY))),this._cachedPreviewManifest}getRoutesManifest(){return(0,e9.getTracer)().trace(e7.Fx.getRoutesManifest,()=>{let e=nf((0,l.join)(this.distDir,ei.J2)),t=e.rewrites??{beforeFiles:[],afterFiles:[],fallback:[]};return Array.isArray(t)&&(t={beforeFiles:[],afterFiles:t,fallback:[]}),{...e,rewrites:t}})}attachRequestMeta(e,t,r){var n;let i=(null==(n=e.headers["x-forwarded-proto"])?void 0:n.includes("https"))?"https":"http",s=this.fetchHostname&&this.port?`${i}://${this.fetchHostname}:${this.port}${e.url}`:this.nextConfig.experimental.trustHostHeader?`https://${e.headers.host||"localhost"}${e.url}`:e.url;er(e,"initURL",s),er(e,"initQuery",{...t.query}),er(e,"initProtocol",i),r||er(e,"clonableBody",function(e){let t=null,r=new Promise((t,r)=>{e.on("end",t),e.on("error",r)}).catch(e=>({error:e}));return{async finalize(){if(t){let n=await r;if(n&&"object"==typeof n&&n.error)throw n.error;(function(e,t){for(let r in t){let n=t[r];"function"==typeof n&&(n=n.bind(e)),e[r]=n}})(e,t),t=e}},cloneBodyStream(){let r=t??e,n=new nA.PassThrough,i=new nA.PassThrough;return r.on("data",e=>{n.push(e),i.push(e)}),r.on("end",()=>{n.push(null),i.push(null)}),t=i,n}}}(e.originalRequest))}async runEdgeFunction(e){throw Object.defineProperty(Error("Middleware is not supported in minimal mode. Please remove the `NEXT_MINIMAL` environment variable."),"__NEXT_ERROR_CODE",{value:"E58",enumerable:!1,configurable:!0})}get serverDistDir(){if(this._serverDistDir)return this._serverDistDir;let e=(0,l.join)(this.distDir,ei.k4);return this._serverDistDir=e,e}async getFallbackErrorComponents(e){return null}async instrumentationOnRequestError(...e){await super.instrumentationOnRequestError(...e),this.logError(e[0])}onServerClose(e){this.cleanupListeners.add(e)}async close(){await this.cleanupListeners.runAll()}getInternalWaitUntil(){return this.internalWaitUntil??=this.createInternalWaitUntil(),this.internalWaitUntil}createInternalWaitUntil(){throw Object.defineProperty(new q("createInternalWaitUntil should never be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E540",enumerable:!1,configurable:!0})}}})(),module.exports=n})();
|
33
33
|
//# sourceMappingURL=server.runtime.prod.js.map
|