Files
PascalSchattenburg d147843c76 feat(blog): add file-based blog with dynamic slugs, MDX content and layout shell
- Introduced blog routing using Next.js App Router
- Implemented dynamic [slug] pages for blog posts
- Added MDX-based content loading via lib/posts
- Integrated shared TopBar layout with navigation
- Established clear content, lib and component separation
2026-01-22 14:14:15 +01:00

3 lines
157 KiB
JavaScript

(()=>{var leafPrototypes,getProto,__webpack_modules__={"./dist/compiled/@edge-runtime/cookies/index.js"(module1){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,src_exports={},all={RequestCookies:()=>RequestCookies,ResponseCookies:()=>ResponseCookies,parseCookie:()=>parseCookie,parseSetCookie:()=>parseSetCookie,stringifyCookie:()=>stringifyCookie};for(var name in all)__defProp(src_exports,name,{get:all[name],enumerable:!0});function stringifyCookie(c){var _a;let attrs=["path"in c&&c.path&&`Path=${c.path}`,"expires"in c&&(c.expires||0===c.expires)&&`Expires=${("number"==typeof c.expires?new Date(c.expires):c.expires).toUTCString()}`,"maxAge"in c&&"number"==typeof c.maxAge&&`Max-Age=${c.maxAge}`,"domain"in c&&c.domain&&`Domain=${c.domain}`,"secure"in c&&c.secure&&"Secure","httpOnly"in c&&c.httpOnly&&"HttpOnly","sameSite"in c&&c.sameSite&&`SameSite=${c.sameSite}`,"partitioned"in c&&c.partitioned&&"Partitioned","priority"in c&&c.priority&&`Priority=${c.priority}`].filter(Boolean),stringified=`${c.name}=${encodeURIComponent(null!=(_a=c.value)?_a:"")}`;return 0===attrs.length?stringified:`${stringified}; ${attrs.join("; ")}`}function parseCookie(cookie){let map=new Map;for(let pair of cookie.split(/; */)){if(!pair)continue;let splitAt=pair.indexOf("=");if(-1===splitAt){map.set(pair,"true");continue}let[key,value]=[pair.slice(0,splitAt),pair.slice(splitAt+1)];try{map.set(key,decodeURIComponent(null!=value?value:"true"))}catch{}}return map}function parseSetCookie(setCookie){if(!setCookie)return;let[[name,value],...attributes]=parseCookie(setCookie),{domain,expires,httponly,maxage,path,samesite,secure,partitioned,priority}=Object.fromEntries(attributes.map(([key,value2])=>[key.toLowerCase().replace(/-/g,""),value2]));{var string,string1,t={name,value:decodeURIComponent(value),domain,...expires&&{expires:new Date(expires)},...httponly&&{httpOnly:!0},..."string"==typeof maxage&&{maxAge:Number(maxage)},path,...samesite&&{sameSite:SAME_SITE.includes(string=(string=samesite).toLowerCase())?string:void 0},...secure&&{secure:!0},...priority&&{priority:PRIORITY.includes(string1=(string1=priority).toLowerCase())?string1:void 0},...partitioned&&{partitioned:!0}};let newT={};for(let key in t)t[key]&&(newT[key]=t[key]);return newT}}module1.exports=((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||void 0===key||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to})(__defProp({},"__esModule",{value:!0}),src_exports);var SAME_SITE=["strict","lax","none"],PRIORITY=["low","medium","high"],RequestCookies=class{constructor(requestHeaders){this._parsed=new Map,this._headers=requestHeaders;const header=requestHeaders.get("cookie");if(header)for(const[name,value]of parseCookie(header))this._parsed.set(name,{name,value})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...args){let name="string"==typeof args[0]?args[0]:args[0].name;return this._parsed.get(name)}getAll(...args){var _a;let all=Array.from(this._parsed);if(!args.length)return all.map(([_,value])=>value);let name="string"==typeof args[0]?args[0]:null==(_a=args[0])?void 0:_a.name;return all.filter(([n])=>n===name).map(([_,value])=>value)}has(name){return this._parsed.has(name)}set(...args){let[name,value]=1===args.length?[args[0].name,args[0].value]:args,map=this._parsed;return map.set(name,{name,value}),this._headers.set("cookie",Array.from(map).map(([_,value2])=>stringifyCookie(value2)).join("; ")),this}delete(names){let map=this._parsed,result=Array.isArray(names)?names.map(name=>map.delete(name)):map.delete(names);return this._headers.set("cookie",Array.from(map).map(([_,value])=>stringifyCookie(value)).join("; ")),result}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(v=>`${v.name}=${encodeURIComponent(v.value)}`).join("; ")}},ResponseCookies=class{constructor(responseHeaders){var _a,_b,_c;this._parsed=new Map,this._headers=responseHeaders;const setCookie=null!=(_c=null!=(_b=null==(_a=responseHeaders.getSetCookie)?void 0:_a.call(responseHeaders))?_b:responseHeaders.get("set-cookie"))?_c:[];for(const cookieString of Array.isArray(setCookie)?setCookie:function(cookiesString){if(!cookiesString)return[];var start,ch,lastComma,nextStart,cookiesSeparatorFound,cookiesStrings=[],pos=0;function skipWhitespace(){for(;pos<cookiesString.length&&/\s/.test(cookiesString.charAt(pos));)pos+=1;return pos<cookiesString.length}for(;pos<cookiesString.length;){for(start=pos,cookiesSeparatorFound=!1;skipWhitespace();)if(","===(ch=cookiesString.charAt(pos))){for(lastComma=pos,pos+=1,skipWhitespace(),nextStart=pos;pos<cookiesString.length&&"="!==(ch=cookiesString.charAt(pos))&&";"!==ch&&","!==ch;)pos+=1;pos<cookiesString.length&&"="===cookiesString.charAt(pos)?(cookiesSeparatorFound=!0,pos=nextStart,cookiesStrings.push(cookiesString.substring(start,lastComma)),start=pos):pos=lastComma+1}else pos+=1;(!cookiesSeparatorFound||pos>=cookiesString.length)&&cookiesStrings.push(cookiesString.substring(start,cookiesString.length))}return cookiesStrings}(setCookie)){const parsed=parseSetCookie(cookieString);parsed&&this._parsed.set(parsed.name,parsed)}}get(...args){let key="string"==typeof args[0]?args[0]:args[0].name;return this._parsed.get(key)}getAll(...args){var _a;let all=Array.from(this._parsed.values());if(!args.length)return all;let key="string"==typeof args[0]?args[0]:null==(_a=args[0])?void 0:_a.name;return all.filter(c=>c.name===key)}has(name){return this._parsed.has(name)}set(...args){let[name,value,cookie]=1===args.length?[args[0].name,args[0].value,args[0]]:args,map=this._parsed;return map.set(name,function(cookie={name:"",value:""}){return"number"==typeof cookie.expires&&(cookie.expires=new Date(cookie.expires)),cookie.maxAge&&(cookie.expires=new Date(Date.now()+1e3*cookie.maxAge)),(null===cookie.path||void 0===cookie.path)&&(cookie.path="/"),cookie}({name,value,...cookie})),function(bag,headers){for(let[,value]of(headers.delete("set-cookie"),bag)){let serialized=stringifyCookie(value);headers.append("set-cookie",serialized)}}(map,this._headers),this}delete(...args){let[name,options]="string"==typeof args[0]?[args[0]]:[args[0].name,args[0]];return this.set({...options,name,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(stringifyCookie).join("; ")}}},"./dist/compiled/bytes/index.js"(module1){(()=>{"use strict";var e={56:e=>{e.exports=function(e,r){return"string"==typeof e?parse(e):"number"==typeof e?format(e,r):null},e.exports.format=format,e.exports.parse=parse;var r=/\B(?=(\d{3})+(?!\d))/g,a=/(?:\.0*|(\.[^0]+)0+)$/,t={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000},i=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function format(e,i){if(!Number.isFinite(e))return null;var n=Math.abs(e),o=i&&i.thousandsSeparator||"",s=i&&i.unitSeparator||"",f=i&&void 0!==i.decimalPlaces?i.decimalPlaces:2,u=!!(i&&i.fixedDecimals),p=i&&i.unit||"";p&&t[p.toLowerCase()]||(p=n>=t.pb?"PB":n>=t.tb?"TB":n>=t.gb?"GB":n>=t.mb?"MB":n>=t.kb?"KB":"B");var l=(e/t[p.toLowerCase()]).toFixed(f);return u||(l=l.replace(a,"$1")),o&&(l=l.split(".").map(function(e,a){return 0===a?e.replace(r,o):e}).join(".")),l+s+p}function parse(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var a,r=i.exec(e),n="b";return r?(a=parseFloat(r[1]),n=r[4].toLowerCase()):(a=parseInt(e,10),n="b"),Math.floor(t[n]*a)}}},r={};function __nccwpck_require__1(a){var t=r[a];if(void 0!==t)return t.exports;var i=r[a]={exports:{}},n=!0;try{e[a](i,i.exports,__nccwpck_require__1),n=!1}finally{n&&delete r[a]}return i.exports}__nccwpck_require__1.ab=__dirname+"/",module1.exports=__nccwpck_require__1(56)})()},"./dist/compiled/content-type/index.js"(module1){(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var e={};(()=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,a=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,i=/\\([\u000b\u0020-\u00ff])/g,o=/([\\"])/g,f=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ContentType(e){this.parameters=Object.create(null),this.type=e}e.format=function(e){if(!e||"object"!=typeof e)throw TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!f.test(t))throw TypeError("invalid type");var a1=t;if(r&&"object"==typeof r)for(var i,o1=Object.keys(r).sort(),u=0;u<o1.length;u++){if(i=o1[u],!n.test(i))throw TypeError("invalid parameter name");a1+="; "+i+"="+function(e){var r=String(e);if(n.test(r))return r;if(r.length>0&&!a.test(r))throw TypeError("invalid parameter value");return'"'+r.replace(o,"\\$1")+'"'}(r[i])}return a1},e.parse=function(e){if(!e)throw TypeError("argument string is required");var u,p,s,r="object"==typeof e?function(e){var r;if("function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]),"string"!=typeof r)throw TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw TypeError("argument string is required to be a string");var a=r.indexOf(";"),n=-1!==a?r.substr(0,a).trim():r.trim();if(!f.test(n))throw TypeError("invalid media type");var o=new ContentType(n.toLowerCase());if(-1!==a){for(t.lastIndex=a;p=t.exec(r);){if(p.index!==a)throw TypeError("invalid parameter format");a+=p[0].length,u=p[1].toLowerCase(),'"'===(s=p[2])[0]&&(s=s.substr(1,s.length-2).replace(i,"$1")),o.parameters[u]=s}if(a!==r.length)throw TypeError("invalid parameter format")}return o}})(),module1.exports=e})()},"./dist/compiled/cookie/index.js"(module1){(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var i,t,a,n,e={};e.parse=function(e,r){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var t={},o=e.split(a),s=(r||{}).decode||i,p=0;p<o.length;p++){var f=o[p],u=f.indexOf("=");if(!(u<0)){var v=f.substr(0,u).trim(),c=f.substr(++u,f.length).trim();'"'==c[0]&&(c=c.slice(1,-1)),void 0==t[v]&&(t[v]=function(e,r){try{return r(e)}catch(r){return e}}(c,s))}}return t},e.serialize=function(e,r,i){var a=i||{},o=a.encode||t;if("function"!=typeof o)throw TypeError("option encode is invalid");if(!n.test(e))throw TypeError("argument name is invalid");var s=o(r);if(s&&!n.test(s))throw TypeError("argument val is invalid");var p=e+"="+s;if(null!=a.maxAge){var f=a.maxAge-0;if(isNaN(f)||!isFinite(f))throw TypeError("option maxAge is invalid");p+="; Max-Age="+Math.floor(f)}if(a.domain){if(!n.test(a.domain))throw TypeError("option domain is invalid");p+="; Domain="+a.domain}if(a.path){if(!n.test(a.path))throw TypeError("option path is invalid");p+="; Path="+a.path}if(a.expires){if("function"!=typeof a.expires.toUTCString)throw TypeError("option expires is invalid");p+="; Expires="+a.expires.toUTCString()}if(a.httpOnly&&(p+="; HttpOnly"),a.secure&&(p+="; Secure"),a.sameSite)switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"none":p+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return p},i=decodeURIComponent,t=encodeURIComponent,a=/; */,n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,module1.exports=e})()},"./dist/compiled/fresh/index.js"(module1){(()=>{"use strict";var e={695:e=>{var r=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function parseHttpDate(e){var r=e&&Date.parse(e);return"number"==typeof r?r:NaN}e.exports=function(e,a){var t=e["if-modified-since"],s=e["if-none-match"];if(!t&&!s)return!1;var i=e["cache-control"];if(i&&r.test(i))return!1;if(s&&"*"!==s){var f=a.etag;if(!f)return!1;for(var n=!0,u=function(e){for(var r=0,a=[],t=0,s=0,i=e.length;s<i;s++)switch(e.charCodeAt(s)){case 32:t===r&&(t=r=s+1);break;case 44:a.push(e.substring(t,r)),t=r=s+1;break;default:r=s+1}return a.push(e.substring(t,r)),a}(s),_=0;_<u.length;_++){var o=u[_];if(o===f||o==="W/"+f||"W/"+o===f){n=!1;break}}if(n)return!1}if(t){var p=a["last-modified"];if(!p||!(parseHttpDate(p)<=parseHttpDate(t)))return!1}return!0}}},r={};function __nccwpck_require__1(a){var t=r[a];if(void 0!==t)return t.exports;var s=r[a]={exports:{}},i=!0;try{e[a](s,s.exports,__nccwpck_require__1),i=!1}finally{i&&delete r[a]}return s.exports}__nccwpck_require__1.ab=__dirname+"/",module1.exports=__nccwpck_require__1(695)})()},"./dist/compiled/path-to-regexp/index.js"(module1){(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var e={};(()=>{function parse(e,n){void 0===n&&(n={});for(var r=function(e){for(var n=[],r=0;r<e.length;){var t=e[r];if("*"===t||"+"===t||"?"===t){n.push({type:"MODIFIER",index:r,value:e[r++]});continue}if("\\"===t){n.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});continue}if("{"===t){n.push({type:"OPEN",index:r,value:e[r++]});continue}if("}"===t){n.push({type:"CLOSE",index:r,value:e[r++]});continue}if(":"===t){for(var a="",i=r+1;i<e.length;){var o=e.charCodeAt(i);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||95===o){a+=e[i++];continue}break}if(!a)throw TypeError("Missing parameter name at ".concat(r));n.push({type:"NAME",index:r,value:a}),r=i;continue}if("("===t){var c=1,f="",i=r+1;if("?"===e[i])throw TypeError('Pattern cannot start with "?" at '.concat(i));for(;i<e.length;){if("\\"===e[i]){f+=e[i++]+e[i++];continue}if(")"===e[i]){if(0==--c){i++;break}}else if("("===e[i]&&(c++,"?"!==e[i+1]))throw TypeError("Capturing groups are not allowed at ".concat(i));f+=e[i++]}if(c)throw TypeError("Unbalanced pattern at ".concat(r));if(!f)throw TypeError("Missing pattern at ".concat(r));n.push({type:"PATTERN",index:r,value:f}),r=i;continue}n.push({type:"CHAR",index:r,value:e[r++]})}return n.push({type:"END",index:r,value:""}),n}(e),t=n.prefixes,a=void 0===t?"./":t,i=n.delimiter,o=void 0===i?"/#?":i,c=[],f=0,u=0,p="",tryConsume=function(e){if(u<r.length&&r[u].type===e)return r[u++].value},mustConsume=function(e){var n=tryConsume(e);if(void 0!==n)return n;var t=r[u],a=t.type,i=t.index;throw TypeError("Unexpected ".concat(a," at ").concat(i,", expected ").concat(e))},consumeText=function(){for(var n,e="";n=tryConsume("CHAR")||tryConsume("ESCAPED_CHAR");)e+=n;return e},isSafe=function(e){for(var n=0;n<o.length;n++){var t=o[n];if(e.indexOf(t)>-1)return!0}return!1},safePattern=function(e){var n=c[c.length-1],r=e||(n&&"string"==typeof n?n:"");if(n&&!r)throw TypeError('Must have text between two parameters, missing text after "'.concat(n.name,'"'));return!r||isSafe(r)?"[^".concat(escapeString(o),"]+?"):"(?:(?!".concat(escapeString(r),")[^").concat(escapeString(o),"])+?")};u<r.length;){var v=tryConsume("CHAR"),s=tryConsume("NAME"),d=tryConsume("PATTERN");if(s||d){var g=v||"";-1===a.indexOf(g)&&(p+=g,g=""),p&&(c.push(p),p=""),c.push({name:s||f++,prefix:g,suffix:"",pattern:d||safePattern(g),modifier:tryConsume("MODIFIER")||""});continue}var x=v||tryConsume("ESCAPED_CHAR");if(x){p+=x;continue}if(p&&(c.push(p),p=""),tryConsume("OPEN")){var g=consumeText(),l=tryConsume("NAME")||"",m=tryConsume("PATTERN")||"",T=consumeText();mustConsume("CLOSE"),c.push({name:l||(m?f++:""),pattern:l&&!m?safePattern(g):m,prefix:g,suffix:T,modifier:tryConsume("MODIFIER")||""});continue}mustConsume("END")}return c}function tokensToFunction(e,n){void 0===n&&(n={});var r=flags(n),t=n.encode,a=void 0===t?function(e){return e}:t,i=n.validate,o=void 0===i||i,c=e.map(function(e){if("object"==typeof e)return new RegExp("^(?:".concat(e.pattern,")$"),r)});return function(n){for(var r="",t=0;t<e.length;t++){var i=e[t];if("string"==typeof i){r+=i;continue}var f=n?n[i.name]:void 0,u="?"===i.modifier||"*"===i.modifier,p="*"===i.modifier||"+"===i.modifier;if(Array.isArray(f)){if(!p)throw TypeError('Expected "'.concat(i.name,'" to not repeat, but got an array'));if(0===f.length){if(u)continue;throw TypeError('Expected "'.concat(i.name,'" to not be empty'))}for(var v=0;v<f.length;v++){var s=a(f[v],i);if(o&&!c[t].test(s))throw TypeError('Expected all "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(s,'"'));r+=i.prefix+s+i.suffix}continue}if("string"==typeof f||"number"==typeof f){var s=a(String(f),i);if(o&&!c[t].test(s))throw TypeError('Expected "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(s,'"'));r+=i.prefix+s+i.suffix;continue}if(!u){var d=p?"an array":"a string";throw TypeError('Expected "'.concat(i.name,'" to be ').concat(d))}}return r}}function regexpToFunction(e,n,r){void 0===r&&(r={});var t=r.decode,a=void 0===t?function(e){return e}:t;return function(r){var t=e.exec(r);if(!t)return!1;for(var i=t[0],o=t.index,c=Object.create(null),f=1;f<t.length;f++)!function(e){if(void 0!==t[e]){var r=n[e-1];"*"===r.modifier||"+"===r.modifier?c[r.name]=t[e].split(r.prefix+r.suffix).map(function(e){return a(e,r)}):c[r.name]=a(t[e],r)}}(f);return{path:i,index:o,params:c}}}function escapeString(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function flags(e){return e&&e.sensitive?"":"i"}function tokensToRegexp(e,n,r){void 0===r&&(r={});for(var t=r.strict,a=void 0!==t&&t,i=r.start,c=r.end,u=r.encode,p=void 0===u?function(e){return e}:u,v=r.delimiter,d=r.endsWith,x="[".concat(escapeString(void 0===d?"":d),"]|$"),h="[".concat(escapeString(void 0===v?"/#?":v),"]"),l=void 0===i||i?"^":"",m=0;m<e.length;m++){var E=e[m];if("string"==typeof E)l+=escapeString(p(E));else{var w=escapeString(p(E.prefix)),y=escapeString(p(E.suffix));if(E.pattern)if(n&&n.push(E),w||y)if("+"===E.modifier||"*"===E.modifier){var R="*"===E.modifier?"?":"";l+="(?:".concat(w,"((?:").concat(E.pattern,")(?:").concat(y).concat(w,"(?:").concat(E.pattern,"))*)").concat(y,")").concat(R)}else l+="(?:".concat(w,"(").concat(E.pattern,")").concat(y,")").concat(E.modifier);else{if("+"===E.modifier||"*"===E.modifier)throw TypeError('Can not repeat "'.concat(E.name,'" without a prefix and suffix'));l+="(".concat(E.pattern,")").concat(E.modifier)}else l+="(?:".concat(w).concat(y,")").concat(E.modifier)}}if(void 0===c||c)a||(l+="".concat(h,"?")),l+=r.endsWith?"(?=".concat(x,")"):"$";else{var A=e[e.length-1],_="string"==typeof A?h.indexOf(A[A.length-1])>-1:void 0===A;a||(l+="(?:".concat(h,"(?=").concat(x,"))?")),_||(l+="(?=".concat(h,"|").concat(x,")"))}return new RegExp(l,flags(r))}function pathToRegexp(e,n,r){if(e instanceof RegExp){var t;if(!n)return e;for(var r1=/\((?:\?<(.*?)>)?(?!\?)/g,t1=0,a=r1.exec(e.source);a;)n.push({name:a[1]||t1++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r1.exec(e.source);return e}return Array.isArray(e)?(t=e.map(function(e){return pathToRegexp(e,n,r).source}),new RegExp("(?:".concat(t.join("|"),")"),flags(r))):tokensToRegexp(parse(e,r),n,r)}Object.defineProperty(e,"__esModule",{value:!0}),e.pathToRegexp=e.tokensToRegexp=e.regexpToFunction=e.match=e.tokensToFunction=e.compile=e.parse=void 0,e.parse=parse,e.compile=function(e,n){return tokensToFunction(parse(e,n),n)},e.tokensToFunction=tokensToFunction,e.match=function(e,n){var r=[];return regexpToFunction(pathToRegexp(e,r,n),r,n)},e.regexpToFunction=regexpToFunction,e.tokensToRegexp=tokensToRegexp,e.pathToRegexp=pathToRegexp})(),module1.exports=e})()},"./dist/esm/lib/constants.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ACTION_SUFFIX:()=>ACTION_SUFFIX,APP_DIR_ALIAS:()=>APP_DIR_ALIAS,CACHE_ONE_YEAR:()=>CACHE_ONE_YEAR,DOT_NEXT_ALIAS:()=>DOT_NEXT_ALIAS,ESLINT_DEFAULT_DIRS:()=>ESLINT_DEFAULT_DIRS,GSP_NO_RETURNED_VALUE:()=>GSP_NO_RETURNED_VALUE,GSSP_COMPONENT_MEMBER_ERROR:()=>GSSP_COMPONENT_MEMBER_ERROR,GSSP_NO_RETURNED_VALUE:()=>GSSP_NO_RETURNED_VALUE,HTML_CONTENT_TYPE_HEADER:()=>HTML_CONTENT_TYPE_HEADER,INFINITE_CACHE:()=>INFINITE_CACHE,INSTRUMENTATION_HOOK_FILENAME:()=>INSTRUMENTATION_HOOK_FILENAME,JSON_CONTENT_TYPE_HEADER:()=>JSON_CONTENT_TYPE_HEADER,MATCHED_PATH_HEADER:()=>MATCHED_PATH_HEADER,MIDDLEWARE_FILENAME:()=>MIDDLEWARE_FILENAME,MIDDLEWARE_LOCATION_REGEXP:()=>MIDDLEWARE_LOCATION_REGEXP,NEXT_BODY_SUFFIX:()=>NEXT_BODY_SUFFIX,NEXT_CACHE_IMPLICIT_TAG_ID:()=>NEXT_CACHE_IMPLICIT_TAG_ID,NEXT_CACHE_REVALIDATED_TAGS_HEADER:()=>NEXT_CACHE_REVALIDATED_TAGS_HEADER,NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:()=>NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER,NEXT_CACHE_SOFT_TAG_MAX_LENGTH:()=>NEXT_CACHE_SOFT_TAG_MAX_LENGTH,NEXT_CACHE_TAGS_HEADER:()=>NEXT_CACHE_TAGS_HEADER,NEXT_CACHE_TAG_MAX_ITEMS:()=>NEXT_CACHE_TAG_MAX_ITEMS,NEXT_CACHE_TAG_MAX_LENGTH:()=>NEXT_CACHE_TAG_MAX_LENGTH,NEXT_DATA_SUFFIX:()=>NEXT_DATA_SUFFIX,NEXT_INTERCEPTION_MARKER_PREFIX:()=>NEXT_INTERCEPTION_MARKER_PREFIX,NEXT_META_SUFFIX:()=>NEXT_META_SUFFIX,NEXT_QUERY_PARAM_PREFIX:()=>NEXT_QUERY_PARAM_PREFIX,NEXT_RESUME_HEADER:()=>NEXT_RESUME_HEADER,NON_STANDARD_NODE_ENV:()=>NON_STANDARD_NODE_ENV,PAGES_DIR_ALIAS:()=>PAGES_DIR_ALIAS,PRERENDER_REVALIDATE_HEADER:()=>PRERENDER_REVALIDATE_HEADER,PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:()=>PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER,PROXY_FILENAME:()=>PROXY_FILENAME,PROXY_LOCATION_REGEXP:()=>PROXY_LOCATION_REGEXP,PUBLIC_DIR_MIDDLEWARE_CONFLICT:()=>PUBLIC_DIR_MIDDLEWARE_CONFLICT,ROOT_DIR_ALIAS:()=>ROOT_DIR_ALIAS,RSC_ACTION_CLIENT_WRAPPER_ALIAS:()=>RSC_ACTION_CLIENT_WRAPPER_ALIAS,RSC_ACTION_ENCRYPTION_ALIAS:()=>RSC_ACTION_ENCRYPTION_ALIAS,RSC_ACTION_PROXY_ALIAS:()=>RSC_ACTION_PROXY_ALIAS,RSC_ACTION_VALIDATE_ALIAS:()=>RSC_ACTION_VALIDATE_ALIAS,RSC_CACHE_WRAPPER_ALIAS:()=>RSC_CACHE_WRAPPER_ALIAS,RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS:()=>RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS,RSC_MOD_REF_PROXY_ALIAS:()=>RSC_MOD_REF_PROXY_ALIAS,RSC_SEGMENTS_DIR_SUFFIX:()=>RSC_SEGMENTS_DIR_SUFFIX,RSC_SEGMENT_SUFFIX:()=>RSC_SEGMENT_SUFFIX,RSC_SUFFIX:()=>RSC_SUFFIX,SERVER_PROPS_EXPORT_ERROR:()=>SERVER_PROPS_EXPORT_ERROR,SERVER_PROPS_GET_INIT_PROPS_CONFLICT:()=>SERVER_PROPS_GET_INIT_PROPS_CONFLICT,SERVER_PROPS_SSG_CONFLICT:()=>SERVER_PROPS_SSG_CONFLICT,SERVER_RUNTIME:()=>SERVER_RUNTIME,SSG_FALLBACK_EXPORT_ERROR:()=>SSG_FALLBACK_EXPORT_ERROR,SSG_GET_INITIAL_PROPS_CONFLICT:()=>SSG_GET_INITIAL_PROPS_CONFLICT,STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:()=>STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR,TEXT_PLAIN_CONTENT_TYPE_HEADER:()=>TEXT_PLAIN_CONTENT_TYPE_HEADER,UNSTABLE_REVALIDATE_RENAME_ERROR:()=>UNSTABLE_REVALIDATE_RENAME_ERROR,WEBPACK_LAYERS:()=>WEBPACK_LAYERS,WEBPACK_RESOURCE_QUERIES:()=>WEBPACK_RESOURCE_QUERIES,WEB_SOCKET_MAX_RECONNECTIONS:()=>WEB_SOCKET_MAX_RECONNECTIONS});let TEXT_PLAIN_CONTENT_TYPE_HEADER="text/plain",HTML_CONTENT_TYPE_HEADER="text/html; charset=utf-8",JSON_CONTENT_TYPE_HEADER="application/json; charset=utf-8",NEXT_QUERY_PARAM_PREFIX="nxtP",NEXT_INTERCEPTION_MARKER_PREFIX="nxtI",MATCHED_PATH_HEADER="x-matched-path",PRERENDER_REVALIDATE_HEADER="x-prerender-revalidate",PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER="x-prerender-revalidate-if-generated",RSC_SEGMENTS_DIR_SUFFIX=".segments",RSC_SEGMENT_SUFFIX=".segment.rsc",RSC_SUFFIX=".rsc",ACTION_SUFFIX=".action",NEXT_DATA_SUFFIX=".json",NEXT_META_SUFFIX=".meta",NEXT_BODY_SUFFIX=".body",NEXT_CACHE_TAGS_HEADER="x-next-cache-tags",NEXT_CACHE_REVALIDATED_TAGS_HEADER="x-next-revalidated-tags",NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER="x-next-revalidate-tag-token",NEXT_RESUME_HEADER="next-resume",NEXT_CACHE_TAG_MAX_ITEMS=128,NEXT_CACHE_TAG_MAX_LENGTH=256,NEXT_CACHE_SOFT_TAG_MAX_LENGTH=1024,NEXT_CACHE_IMPLICIT_TAG_ID="_N_T_",CACHE_ONE_YEAR=31536e3,INFINITE_CACHE=0xfffffffe,MIDDLEWARE_FILENAME="middleware",MIDDLEWARE_LOCATION_REGEXP=`(?:src/)?${MIDDLEWARE_FILENAME}`,PROXY_FILENAME="proxy",PROXY_LOCATION_REGEXP=`(?:src/)?${PROXY_FILENAME}`,INSTRUMENTATION_HOOK_FILENAME="instrumentation",PAGES_DIR_ALIAS="private-next-pages",DOT_NEXT_ALIAS="private-dot-next",ROOT_DIR_ALIAS="private-next-root-dir",APP_DIR_ALIAS="private-next-app-dir",RSC_MOD_REF_PROXY_ALIAS="private-next-rsc-mod-ref-proxy",RSC_ACTION_VALIDATE_ALIAS="private-next-rsc-action-validate",RSC_ACTION_PROXY_ALIAS="private-next-rsc-server-reference",RSC_CACHE_WRAPPER_ALIAS="private-next-rsc-cache-wrapper",RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS="private-next-rsc-track-dynamic-import",RSC_ACTION_ENCRYPTION_ALIAS="private-next-rsc-action-encryption",RSC_ACTION_CLIENT_WRAPPER_ALIAS="private-next-rsc-action-client-wrapper",PUBLIC_DIR_MIDDLEWARE_CONFLICT="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",SSG_GET_INITIAL_PROPS_CONFLICT="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",SERVER_PROPS_GET_INIT_PROPS_CONFLICT="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",SERVER_PROPS_SSG_CONFLICT="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",SERVER_PROPS_EXPORT_ERROR="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",GSP_NO_RETURNED_VALUE="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",GSSP_NO_RETURNED_VALUE="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",UNSTABLE_REVALIDATE_RENAME_ERROR="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",GSSP_COMPONENT_MEMBER_ERROR="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",NON_STANDARD_NODE_ENV='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',SSG_FALLBACK_EXPORT_ERROR="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",ESLINT_DEFAULT_DIRS=["app","pages","components","lib","src"],SERVER_RUNTIME={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},WEB_SOCKET_MAX_RECONNECTIONS=12,WEBPACK_LAYERS_NAMES={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"},WEBPACK_LAYERS={...WEBPACK_LAYERS_NAMES,GROUP:{builtinReact:[WEBPACK_LAYERS_NAMES.reactServerComponents,WEBPACK_LAYERS_NAMES.actionBrowser],serverOnly:[WEBPACK_LAYERS_NAMES.reactServerComponents,WEBPACK_LAYERS_NAMES.actionBrowser,WEBPACK_LAYERS_NAMES.instrument,WEBPACK_LAYERS_NAMES.middleware],neutralTarget:[WEBPACK_LAYERS_NAMES.apiNode,WEBPACK_LAYERS_NAMES.apiEdge],clientOnly:[WEBPACK_LAYERS_NAMES.serverSideRendering,WEBPACK_LAYERS_NAMES.appPagesBrowser],bundled:[WEBPACK_LAYERS_NAMES.reactServerComponents,WEBPACK_LAYERS_NAMES.actionBrowser,WEBPACK_LAYERS_NAMES.serverSideRendering,WEBPACK_LAYERS_NAMES.appPagesBrowser,WEBPACK_LAYERS_NAMES.shared,WEBPACK_LAYERS_NAMES.instrument,WEBPACK_LAYERS_NAMES.middleware],appPages:[WEBPACK_LAYERS_NAMES.reactServerComponents,WEBPACK_LAYERS_NAMES.serverSideRendering,WEBPACK_LAYERS_NAMES.appPagesBrowser,WEBPACK_LAYERS_NAMES.actionBrowser]}},WEBPACK_RESOURCE_QUERIES={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}},"./dist/esm/lib/format-dynamic-import-path.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{formatDynamicImportPath:()=>formatDynamicImportPath});var external_path_=__webpack_require__("path"),external_path_default=__webpack_require__.n(external_path_);let external_url_namespaceObject=require("url"),formatDynamicImportPath=(dir,filePath)=>{let absoluteFilePath=external_path_default().isAbsolute(filePath)?filePath:external_path_default().join(dir,filePath);return(0,external_url_namespaceObject.pathToFileURL)(absoluteFilePath).toString()}},"./dist/esm/server/api-utils/index.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ApiError:()=>ApiError,COOKIE_NAME_PRERENDER_BYPASS:()=>COOKIE_NAME_PRERENDER_BYPASS,COOKIE_NAME_PRERENDER_DATA:()=>COOKIE_NAME_PRERENDER_DATA,RESPONSE_LIMIT_DEFAULT:()=>RESPONSE_LIMIT_DEFAULT,SYMBOL_CLEARED_COOKIES:()=>SYMBOL_CLEARED_COOKIES,SYMBOL_PREVIEW_DATA:()=>SYMBOL_PREVIEW_DATA,checkIsOnDemandRevalidate:()=>checkIsOnDemandRevalidate,clearPreviewData:()=>clearPreviewData,redirect:()=>redirect,sendError:()=>sendError,sendStatusCode:()=>sendStatusCode,setLazyProp:()=>setLazyProp,wrapApiHandler:()=>wrapApiHandler});var _web_spec_extension_adapters_headers__rspack_import_0=__webpack_require__("./dist/esm/server/web/spec-extension/adapters/headers.js"),_lib_constants__rspack_import_1=__webpack_require__("./dist/esm/lib/constants.js"),_lib_trace_tracer__rspack_import_2=__webpack_require__("../lib/trace/tracer"),_lib_trace_constants__rspack_import_3=__webpack_require__("./dist/esm/server/lib/trace/constants.js");function wrapApiHandler(page,handler){return(...args)=>((0,_lib_trace_tracer__rspack_import_2.getTracer)().setRootSpanAttribute("next.route",page),(0,_lib_trace_tracer__rspack_import_2.getTracer)().trace(_lib_trace_constants__rspack_import_3.NodeSpan.runHandler,{spanName:`executing api route (pages) ${page}`},()=>handler(...args)))}function sendStatusCode(res,statusCode){return res.statusCode=statusCode,res}function redirect(res,statusOrUrl,url){if("string"==typeof statusOrUrl&&(url=statusOrUrl,statusOrUrl=307),"number"!=typeof statusOrUrl||"string"!=typeof url)throw Object.defineProperty(Error("Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination')."),"__NEXT_ERROR_CODE",{value:"E389",enumerable:!1,configurable:!0});return res.writeHead(statusOrUrl,{Location:url}),res.write(url),res.end(),res}function checkIsOnDemandRevalidate(req,previewProps){let headers=_web_spec_extension_adapters_headers__rspack_import_0.HeadersAdapter.from(req.headers);return{isOnDemandRevalidate:headers.get(_lib_constants__rspack_import_1.PRERENDER_REVALIDATE_HEADER)===previewProps.previewModeId,revalidateOnlyGenerated:headers.has(_lib_constants__rspack_import_1.PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER)}}let COOKIE_NAME_PRERENDER_BYPASS="__prerender_bypass",COOKIE_NAME_PRERENDER_DATA="__next_preview_data",RESPONSE_LIMIT_DEFAULT=4194304,SYMBOL_PREVIEW_DATA=Symbol(COOKIE_NAME_PRERENDER_DATA),SYMBOL_CLEARED_COOKIES=Symbol(COOKIE_NAME_PRERENDER_BYPASS);function clearPreviewData(res,options={}){if(SYMBOL_CLEARED_COOKIES in res)return res;let{serialize}=__webpack_require__("./dist/compiled/cookie/index.js"),previous=res.getHeader("Set-Cookie");return res.setHeader("Set-Cookie",[..."string"==typeof previous?[previous]:Array.isArray(previous)?previous:[],serialize(COOKIE_NAME_PRERENDER_BYPASS,"",{expires:new Date(0),httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==options.path?{path:options.path}:void 0}),serialize(COOKIE_NAME_PRERENDER_DATA,"",{expires:new Date(0),httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==options.path?{path:options.path}:void 0})]),Object.defineProperty(res,SYMBOL_CLEARED_COOKIES,{value:!0,enumerable:!1}),res}class ApiError extends Error{constructor(statusCode,message){super(message),this.statusCode=statusCode}}function sendError(res,statusCode,message){res.statusCode=statusCode,res.statusMessage=message,res.end(message)}function setLazyProp({req},prop,getter){let opts={configurable:!0,enumerable:!0},optsReset={...opts,writable:!0};Object.defineProperty(req,prop,{...opts,get:()=>{let value=getter();return Object.defineProperty(req,prop,{...optsReset,value}),value},set:value=>{Object.defineProperty(req,prop,{...optsReset,value})}})}},"./dist/esm/server/api-utils/node/try-get-preview-data.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{tryGetPreviewData:()=>tryGetPreviewData});var ___rspack_import_0=__webpack_require__("./dist/esm/server/api-utils/index.js"),_web_spec_extension_cookies__rspack_import_1=__webpack_require__("./dist/esm/server/web/spec-extension/cookies.js"),_web_spec_extension_adapters_headers__rspack_import_2=__webpack_require__("./dist/esm/server/web/spec-extension/adapters/headers.js");function tryGetPreviewData(req,res,options,multiZoneDraftMode){var _cookies_get,_cookies_get1;let encryptedPreviewData;if(options&&(0,___rspack_import_0.checkIsOnDemandRevalidate)(req,options).isOnDemandRevalidate)return!1;if(___rspack_import_0.SYMBOL_PREVIEW_DATA in req)return req[___rspack_import_0.SYMBOL_PREVIEW_DATA];let headers=_web_spec_extension_adapters_headers__rspack_import_2.HeadersAdapter.from(req.headers),cookies=new _web_spec_extension_cookies__rspack_import_1.RequestCookies(headers),previewModeId=null==(_cookies_get=cookies.get(___rspack_import_0.COOKIE_NAME_PRERENDER_BYPASS))?void 0:_cookies_get.value,tokenPreviewData=null==(_cookies_get1=cookies.get(___rspack_import_0.COOKIE_NAME_PRERENDER_DATA))?void 0:_cookies_get1.value;if(previewModeId&&!tokenPreviewData&&previewModeId===options.previewModeId){let data={};return Object.defineProperty(req,___rspack_import_0.SYMBOL_PREVIEW_DATA,{value:data,enumerable:!1}),data}if(!previewModeId&&!tokenPreviewData)return!1;if(!previewModeId||!tokenPreviewData||previewModeId!==options.previewModeId)return multiZoneDraftMode||(0,___rspack_import_0.clearPreviewData)(res),!1;try{encryptedPreviewData=__webpack_require__("next/dist/compiled/jsonwebtoken").verify(tokenPreviewData,options.previewModeSigningKey)}catch{return(0,___rspack_import_0.clearPreviewData)(res),!1}let{decryptWithSecret}=__webpack_require__("./dist/esm/server/crypto-utils.js"),decryptedPreviewData=decryptWithSecret(Buffer.from(options.previewModeEncryptionKey),encryptedPreviewData.data);try{let data=JSON.parse(decryptedPreviewData);return Object.defineProperty(req,___rspack_import_0.SYMBOL_PREVIEW_DATA,{value:data,enumerable:!1}),data}catch{return!1}}},"./dist/esm/server/crypto-utils.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{decryptWithSecret:()=>decryptWithSecret,encryptWithSecret:()=>encryptWithSecret});var crypto__rspack_import_0=__webpack_require__("crypto"),crypto__rspack_import_0_default=__webpack_require__.n(crypto__rspack_import_0);let CIPHER_ALGORITHM="aes-256-gcm";function encryptWithSecret(secret,data){let iv=crypto__rspack_import_0_default().randomBytes(16),salt=crypto__rspack_import_0_default().randomBytes(64),key=crypto__rspack_import_0_default().pbkdf2Sync(secret,salt,1e5,32,"sha512"),cipher=crypto__rspack_import_0_default().createCipheriv(CIPHER_ALGORITHM,key,iv),encrypted=Buffer.concat([cipher.update(data,"utf8"),cipher.final()]),tag=cipher.getAuthTag();return Buffer.concat([salt,iv,tag,encrypted]).toString("hex")}function decryptWithSecret(secret,encryptedData){let buffer=Buffer.from(encryptedData,"hex"),salt=buffer.slice(0,64),iv=buffer.slice(64,80),tag=buffer.slice(80,96),encrypted=buffer.slice(96),key=crypto__rspack_import_0_default().pbkdf2Sync(secret,salt,1e5,32,"sha512"),decipher=crypto__rspack_import_0_default().createDecipheriv(CIPHER_ALGORITHM,key,iv);return decipher.setAuthTag(tag),decipher.update(encrypted)+decipher.final("utf8")}},"./dist/esm/server/lib/node-fs-methods.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{nodeFs:()=>nodeFs});let external_fs_namespaceObject=require("fs");var external_fs_default=__webpack_require__.n(external_fs_namespaceObject);let nodeFs={existsSync:external_fs_default().existsSync,readFile:external_fs_default().promises.readFile,readFileSync:external_fs_default().readFileSync,writeFile:(f,d)=>external_fs_default().promises.writeFile(f,d),mkdir:dir=>external_fs_default().promises.mkdir(dir,{recursive:!0}),stat:f=>external_fs_default().promises.stat(f)}},"./dist/esm/server/lib/trace/constants.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AppRenderSpan:()=>AppRenderSpan1,AppRouteRouteHandlersSpan:()=>AppRouteRouteHandlersSpan1,BaseServerSpan:()=>BaseServerSpan1,LoadComponentsSpan:()=>LoadComponentsSpan1,LogSpanAllowList:()=>LogSpanAllowList,MiddlewareSpan:()=>MiddlewareSpan1,NextNodeServerSpan:()=>NextNodeServerSpan1,NextServerSpan:()=>NextServerSpan1,NextVanillaSpanAllowlist:()=>NextVanillaSpanAllowlist,NodeSpan:()=>NodeSpan1,RenderSpan:()=>RenderSpan1,ResolveMetadataSpan:()=>ResolveMetadataSpan1,RouterSpan:()=>RouterSpan1,StartServerSpan:()=>StartServerSpan1});var BaseServerSpan,LoadComponentsSpan,NextServerSpan,NextNodeServerSpan,StartServerSpan,RenderSpan,AppRenderSpan,RouterSpan,NodeSpan,AppRouteRouteHandlersSpan,ResolveMetadataSpan,MiddlewareSpan,BaseServerSpan1=((BaseServerSpan=BaseServerSpan1||{}).handleRequest="BaseServer.handleRequest",BaseServerSpan.run="BaseServer.run",BaseServerSpan.pipe="BaseServer.pipe",BaseServerSpan.getStaticHTML="BaseServer.getStaticHTML",BaseServerSpan.render="BaseServer.render",BaseServerSpan.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",BaseServerSpan.renderToResponse="BaseServer.renderToResponse",BaseServerSpan.renderToHTML="BaseServer.renderToHTML",BaseServerSpan.renderError="BaseServer.renderError",BaseServerSpan.renderErrorToResponse="BaseServer.renderErrorToResponse",BaseServerSpan.renderErrorToHTML="BaseServer.renderErrorToHTML",BaseServerSpan.render404="BaseServer.render404",BaseServerSpan),LoadComponentsSpan1=((LoadComponentsSpan=LoadComponentsSpan1||{}).loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",LoadComponentsSpan.loadComponents="LoadComponents.loadComponents",LoadComponentsSpan),NextServerSpan1=((NextServerSpan=NextServerSpan1||{}).getRequestHandler="NextServer.getRequestHandler",NextServerSpan.getRequestHandlerWithMetadata="NextServer.getRequestHandlerWithMetadata",NextServerSpan.getServer="NextServer.getServer",NextServerSpan.getServerRequestHandler="NextServer.getServerRequestHandler",NextServerSpan.createServer="createServer.createServer",NextServerSpan),NextNodeServerSpan1=((NextNodeServerSpan=NextNodeServerSpan1||{}).compression="NextNodeServer.compression",NextNodeServerSpan.getBuildId="NextNodeServer.getBuildId",NextNodeServerSpan.createComponentTree="NextNodeServer.createComponentTree",NextNodeServerSpan.clientComponentLoading="NextNodeServer.clientComponentLoading",NextNodeServerSpan.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",NextNodeServerSpan.generateStaticRoutes="NextNodeServer.generateStaticRoutes",NextNodeServerSpan.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",NextNodeServerSpan.generatePublicRoutes="NextNodeServer.generatePublicRoutes",NextNodeServerSpan.generateImageRoutes="NextNodeServer.generateImageRoutes.route",NextNodeServerSpan.sendRenderResult="NextNodeServer.sendRenderResult",NextNodeServerSpan.proxyRequest="NextNodeServer.proxyRequest",NextNodeServerSpan.runApi="NextNodeServer.runApi",NextNodeServerSpan.render="NextNodeServer.render",NextNodeServerSpan.renderHTML="NextNodeServer.renderHTML",NextNodeServerSpan.imageOptimizer="NextNodeServer.imageOptimizer",NextNodeServerSpan.getPagePath="NextNodeServer.getPagePath",NextNodeServerSpan.getRoutesManifest="NextNodeServer.getRoutesManifest",NextNodeServerSpan.findPageComponents="NextNodeServer.findPageComponents",NextNodeServerSpan.getFontManifest="NextNodeServer.getFontManifest",NextNodeServerSpan.getServerComponentManifest="NextNodeServer.getServerComponentManifest",NextNodeServerSpan.getRequestHandler="NextNodeServer.getRequestHandler",NextNodeServerSpan.renderToHTML="NextNodeServer.renderToHTML",NextNodeServerSpan.renderError="NextNodeServer.renderError",NextNodeServerSpan.renderErrorToHTML="NextNodeServer.renderErrorToHTML",NextNodeServerSpan.render404="NextNodeServer.render404",NextNodeServerSpan.startResponse="NextNodeServer.startResponse",NextNodeServerSpan.route="route",NextNodeServerSpan.onProxyReq="onProxyReq",NextNodeServerSpan.apiResolver="apiResolver",NextNodeServerSpan.internalFetch="internalFetch",NextNodeServerSpan),StartServerSpan1=((StartServerSpan=StartServerSpan1||{}).startServer="startServer.startServer",StartServerSpan),RenderSpan1=((RenderSpan=RenderSpan1||{}).getServerSideProps="Render.getServerSideProps",RenderSpan.getStaticProps="Render.getStaticProps",RenderSpan.renderToString="Render.renderToString",RenderSpan.renderDocument="Render.renderDocument",RenderSpan.createBodyResult="Render.createBodyResult",RenderSpan),AppRenderSpan1=((AppRenderSpan=AppRenderSpan1||{}).renderToString="AppRender.renderToString",AppRenderSpan.renderToReadableStream="AppRender.renderToReadableStream",AppRenderSpan.getBodyResult="AppRender.getBodyResult",AppRenderSpan.fetch="AppRender.fetch",AppRenderSpan),RouterSpan1=((RouterSpan=RouterSpan1||{}).executeRoute="Router.executeRoute",RouterSpan),NodeSpan1=((NodeSpan=NodeSpan1||{}).runHandler="Node.runHandler",NodeSpan),AppRouteRouteHandlersSpan1=((AppRouteRouteHandlersSpan=AppRouteRouteHandlersSpan1||{}).runHandler="AppRouteRouteHandlers.runHandler",AppRouteRouteHandlersSpan),ResolveMetadataSpan1=((ResolveMetadataSpan=ResolveMetadataSpan1||{}).generateMetadata="ResolveMetadata.generateMetadata",ResolveMetadataSpan.generateViewport="ResolveMetadata.generateViewport",ResolveMetadataSpan),MiddlewareSpan1=((MiddlewareSpan=MiddlewareSpan1||{}).execute="Middleware.execute",MiddlewareSpan);let NextVanillaSpanAllowlist=new Set(["Middleware.execute","BaseServer.handleRequest","Render.getServerSideProps","Render.getStaticProps","AppRender.fetch","AppRender.getBodyResult","Render.renderDocument","Node.runHandler","AppRouteRouteHandlers.runHandler","ResolveMetadata.generateMetadata","ResolveMetadata.generateViewport","NextNodeServer.createComponentTree","NextNodeServer.findPageComponents","NextNodeServer.getLayoutOrPageModule","NextNodeServer.startResponse","NextNodeServer.clientComponentLoading"]),LogSpanAllowList=new Set(["NextNodeServer.findPageComponents","NextNodeServer.createComponentTree","NextNodeServer.clientComponentLoading"])},"./dist/esm/server/web/spec-extension/adapters/headers.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{HeadersAdapter:()=>HeadersAdapter,ReadonlyHeadersError:()=>ReadonlyHeadersError});var _reflect__rspack_import_0=__webpack_require__("./dist/esm/server/web/spec-extension/adapters/reflect.js");class ReadonlyHeadersError extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new ReadonlyHeadersError}}class HeadersAdapter extends Headers{constructor(headers){super(),this.headers=new Proxy(headers,{get(target,prop,receiver){if("symbol"==typeof prop)return _reflect__rspack_import_0.ReflectAdapter.get(target,prop,receiver);let lowercased=prop.toLowerCase(),original=Object.keys(headers).find(o=>o.toLowerCase()===lowercased);if(void 0!==original)return _reflect__rspack_import_0.ReflectAdapter.get(target,original,receiver)},set(target,prop,value,receiver){if("symbol"==typeof prop)return _reflect__rspack_import_0.ReflectAdapter.set(target,prop,value,receiver);let lowercased=prop.toLowerCase(),original=Object.keys(headers).find(o=>o.toLowerCase()===lowercased);return _reflect__rspack_import_0.ReflectAdapter.set(target,original??prop,value,receiver)},has(target,prop){if("symbol"==typeof prop)return _reflect__rspack_import_0.ReflectAdapter.has(target,prop);let lowercased=prop.toLowerCase(),original=Object.keys(headers).find(o=>o.toLowerCase()===lowercased);return void 0!==original&&_reflect__rspack_import_0.ReflectAdapter.has(target,original)},deleteProperty(target,prop){if("symbol"==typeof prop)return _reflect__rspack_import_0.ReflectAdapter.deleteProperty(target,prop);let lowercased=prop.toLowerCase(),original=Object.keys(headers).find(o=>o.toLowerCase()===lowercased);return void 0===original||_reflect__rspack_import_0.ReflectAdapter.deleteProperty(target,original)}})}static seal(headers){return new Proxy(headers,{get(target,prop,receiver){switch(prop){case"append":case"delete":case"set":return ReadonlyHeadersError.callable;default:return _reflect__rspack_import_0.ReflectAdapter.get(target,prop,receiver)}}})}merge(value){return Array.isArray(value)?value.join(", "):value}static from(headers){return headers instanceof Headers?headers:new HeadersAdapter(headers)}append(name,value){let existing=this.headers[name];"string"==typeof existing?this.headers[name]=[existing,value]:Array.isArray(existing)?existing.push(value):this.headers[name]=value}delete(name){delete this.headers[name]}get(name){let value=this.headers[name];return void 0!==value?this.merge(value):null}has(name){return void 0!==this.headers[name]}set(name,value){this.headers[name]=value}forEach(callbackfn,thisArg){for(let[name,value]of this.entries())callbackfn.call(thisArg,value,name,this)}*entries(){for(let key of Object.keys(this.headers)){let name=key.toLowerCase(),value=this.get(name);yield[name,value]}}*keys(){for(let key of Object.keys(this.headers)){let name=key.toLowerCase();yield name}}*values(){for(let key of Object.keys(this.headers)){let value=this.get(key);yield value}}[Symbol.iterator](){return this.entries()}}},"./dist/esm/server/web/spec-extension/adapters/reflect.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ReflectAdapter:()=>ReflectAdapter});class ReflectAdapter{static get(target,prop,receiver){let value=Reflect.get(target,prop,receiver);return"function"==typeof value?value.bind(target):value}static set(target,prop,value,receiver){return Reflect.set(target,prop,value,receiver)}static has(target,prop){return Reflect.has(target,prop)}static deleteProperty(target,prop){return Reflect.deleteProperty(target,prop)}}},"./dist/esm/server/web/spec-extension/cookies.js"(__unused_rspack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{RequestCookies:()=>next_dist_compiled_edge_runtime_cookies__rspack_import_0.RequestCookies,ResponseCookies:()=>next_dist_compiled_edge_runtime_cookies__rspack_import_0.ResponseCookies,stringifyCookie:()=>next_dist_compiled_edge_runtime_cookies__rspack_import_0.stringifyCookie});var next_dist_compiled_edge_runtime_cookies__rspack_import_0=__webpack_require__("./dist/compiled/@edge-runtime/cookies/index.js")},"./dist/esm/shared/lib/isomorphic/path.js"(module1,__unused_rspack_exports,__webpack_require__){module1.exports=__webpack_require__("path")},"./dist/esm/shared/lib/modern-browserslist-target.js"(module1){module1.exports=["chrome 111","edge 111","firefox 111","safari 16.4"]},"../lib/router-utils/instrumentation-globals.external.js"(module1){"use strict";module1.exports=require("next/dist/server/lib/router-utils/instrumentation-globals.external.js")},"../lib/trace/tracer"(module1){"use strict";module1.exports=require("next/dist/server/lib/trace/tracer")},"../load-manifest.external"(module1){"use strict";module1.exports=require("next/dist/server/load-manifest.external.js")},"next/dist/compiled/jsonwebtoken"(module1){"use strict";module1.exports=require("next/dist/compiled/jsonwebtoken")},"next/dist/compiled/raw-body"(module1){"use strict";module1.exports=require("next/dist/compiled/raw-body")},crypto(module1){"use strict";module1.exports=require("crypto")},"node:path"(module1){"use strict";module1.exports=require("node:path")},path(module1){"use strict";module1.exports=require("path")},querystring(module1){"use strict";module1.exports=require("querystring")}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module1=__webpack_module_cache__[moduleId]={exports:{}};return __webpack_modules__[moduleId](module1,module1.exports,__webpack_require__),module1.exports}__webpack_require__.n=module1=>{var getter=module1&&module1.__esModule?()=>module1.default:()=>module1;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode||"object"==typeof value&&value&&(4&mode&&value.__esModule||16&mode&&"function"==typeof value.then))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;("object"==typeof current||"function"==typeof current)&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>{def[key]=()=>value[key]});return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PagesAPIRouteModule:()=>PagesAPIRouteModule,default:()=>pages_api_module});var CachedRouteKind,IncrementalCacheKind,RouteKind,api_utils=__webpack_require__("./dist/esm/server/api-utils/index.js");__webpack_require__("./dist/esm/shared/lib/modern-browserslist-target.js");let BUILD_MANIFEST="build-manifest.json";function parseReqUrl(url){let parsedUrl=function(url){let parsed;try{parsed=new URL(url,"http://n")}catch{}return parsed}(url);if(!parsedUrl)return;let query={};for(let key of parsedUrl.searchParams.keys()){let values=parsedUrl.searchParams.getAll(key);query[key]=values.length>1?values:values[0]}return{query,hash:parsedUrl.hash,search:parsedUrl.search,path:parsedUrl.pathname,pathname:parsedUrl.pathname,href:`${parsedUrl.pathname}${parsedUrl.search}${parsedUrl.hash}`,host:"",hostname:"",auth:"",protocol:"",slashes:null,port:""}}[...process?.features?.typescript?["next.config.mts"]:[]],Symbol("polyfills");let cache=new WeakMap;function normalizeLocalePath(pathname,locales){let detectedLocale;if(!locales)return{pathname};let lowercasedLocales=cache.get(locales);lowercasedLocales||(lowercasedLocales=locales.map(locale=>locale.toLowerCase()),cache.set(locales,lowercasedLocales));let segments=pathname.split("/",2);if(!segments[1])return{pathname};let segment=segments[1].toLowerCase(),index=lowercasedLocales.indexOf(segment);return index<0?{pathname}:(detectedLocale=locales[index],{pathname:pathname=pathname.slice(detectedLocale.length+1)||"/",detectedLocale})}function ensureLeadingSlash(path){return path.startsWith("/")?path:`/${path}`}function normalizeAppPath(route){return ensureLeadingSlash(route.split("/").reduce((pathname,segment,index,segments)=>segment?"("===segment[0]&&segment.endsWith(")")||"@"===segment[0]||("page"===segment||"route"===segment)&&index===segments.length-1?pathname:`${pathname}/${segment}`:pathname,""))}function normalizeRscURL(url){return url.replace(/\.rsc($|\?)/,"$1")}let INTERCEPTION_ROUTE_MARKERS=["(..)(..)","(.)","(..)","(...)"];function isInterceptionRouteAppPath(path){return void 0!==path.split("/").find(segment=>INTERCEPTION_ROUTE_MARKERS.find(m=>segment.startsWith(m)))}let TEST_ROUTE=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,TEST_STRICT_ROUTE=/\/\[[^/]+\](?=\/|$)/;function isDynamicRoute(route,strict=!0){return(isInterceptionRouteAppPath(route)&&(route=function(path){let interceptingRoute,marker,interceptedRoute;for(let segment of path.split("/"))if(marker=INTERCEPTION_ROUTE_MARKERS.find(m=>segment.startsWith(m))){[interceptingRoute,interceptedRoute]=path.split(marker,2);break}if(!interceptingRoute||!marker||!interceptedRoute)throw Object.defineProperty(Error(`Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(interceptingRoute=normalizeAppPath(interceptingRoute),marker){case"(.)":interceptedRoute="/"===interceptingRoute?`/${interceptedRoute}`:interceptingRoute+"/"+interceptedRoute;break;case"(..)":if("/"===interceptingRoute)throw Object.defineProperty(Error(`Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});interceptedRoute=interceptingRoute.split("/").slice(0,-1).concat(interceptedRoute).join("/");break;case"(...)":interceptedRoute="/"+interceptedRoute;break;case"(..)(..)":let splitInterceptingRoute=interceptingRoute.split("/");if(splitInterceptingRoute.length<=2)throw Object.defineProperty(Error(`Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});interceptedRoute=splitInterceptingRoute.slice(0,-2).concat(interceptedRoute).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute,interceptedRoute}}(route).interceptedRoute),strict)?TEST_STRICT_ROUTE.test(route):TEST_ROUTE.test(route)}function parsePath(path){let hashIndex=path.indexOf("#"),queryIndex=path.indexOf("?"),hasQuery=queryIndex>-1&&(hashIndex<0||queryIndex<hashIndex);return hasQuery||hashIndex>-1?{pathname:path.substring(0,hasQuery?queryIndex:hashIndex),query:hasQuery?path.substring(queryIndex,hashIndex>-1?hashIndex:void 0):"",hash:hashIndex>-1?path.slice(hashIndex):""}:{pathname:path,query:"",hash:""}}function pathHasPrefix(path,prefix){if("string"!=typeof path)return!1;let{pathname}=parsePath(path);return pathname===prefix||pathname.startsWith(prefix+"/")}function removePathPrefix(path,prefix){if(!pathHasPrefix(path,prefix))return path;let withoutPrefix=path.slice(prefix.length);return withoutPrefix.startsWith("/")?withoutPrefix:`/${withoutPrefix}`}var path_to_regexp=__webpack_require__("./dist/compiled/path-to-regexp/index.js"),constants=__webpack_require__("./dist/esm/lib/constants.js");let reHasRegExp=/[|\\{}()[\]^$+*?.-]/,reReplaceRegExp=/[|\\{}()[\]^$+*?.-]/g;function escapeStringRegexp(str){return reHasRegExp.test(str)?str.replace(reReplaceRegExp,"\\$&"):str}function removeTrailingSlash(route){return route.replace(/\/$/,"")||"/"}class InvariantError extends Error{constructor(message,options){super(`Invariant: ${message.endsWith(".")?message:message+"."} This is a bug in Next.js.`,options),this.name="InvariantError"}}let PARAMETER_PATTERN=/^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;function parseMatchedParameter(param){let optional=param.startsWith("[")&&param.endsWith("]");optional&&(param=param.slice(1,-1));let repeat=param.startsWith("...");return repeat&&(param=param.slice(3)),{key:param,repeat,optional}}function getSafeKeyFromSegment({interceptionMarker,getSafeRouteKey,segment,routeKeys,keyPrefix,backreferenceDuplicateKeys}){let pattern,{key,optional,repeat}=parseMatchedParameter(segment),cleanedKey=key.replace(/\W/g,"");keyPrefix&&(cleanedKey=`${keyPrefix}${cleanedKey}`);let invalidKey=!1;(0===cleanedKey.length||cleanedKey.length>30)&&(invalidKey=!0),isNaN(parseInt(cleanedKey.slice(0,1)))||(invalidKey=!0),invalidKey&&(cleanedKey=getSafeRouteKey());let duplicateKey=cleanedKey in routeKeys;keyPrefix?routeKeys[cleanedKey]=`${keyPrefix}${key}`:routeKeys[cleanedKey]=key;let interceptionPrefix=interceptionMarker?escapeStringRegexp(interceptionMarker):"";return pattern=duplicateKey&&backreferenceDuplicateKeys?`\\k<${cleanedKey}>`:repeat?`(?<${cleanedKey}>.+?)`:`(?<${cleanedKey}>[^/]+?)`,{key,pattern:optional?`(?:/${interceptionPrefix}${pattern})?`:`/${interceptionPrefix}${pattern}`,cleanedKey:cleanedKey,optional,repeat}}"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(method=>"function"==typeof performance[method]);class DecodeError extends Error{}class NormalizeError extends Error{}let PARAM_SEPARATOR="_NEXTSEP_";function hasAdjacentParameterIssues(route){return"string"==typeof route&&!!(/\/\(\.{1,3}\):[^/\s]+/.test(route)||/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route))}function normalizeAdjacentParameters(route){let normalized=route;return(normalized=normalized.replace(/(\([^)]*\)):([^/\s]+)/g,`$1${PARAM_SEPARATOR}:$2`)).replace(/:([^:/\s)]+)(?=:)/g,`:$1${PARAM_SEPARATOR}`)}function stripNormalizedSeparators(pathname){return pathname.replace(RegExp(`\\)${PARAM_SEPARATOR}`,"g"),")")}function safePathToRegexp(route,keys,options){if("string"!=typeof route)return(0,path_to_regexp.pathToRegexp)(route,keys,options);let needsNormalization=hasAdjacentParameterIssues(route),routeToUse=needsNormalization?normalizeAdjacentParameters(route):route;try{return(0,path_to_regexp.pathToRegexp)(routeToUse,keys,options)}catch(error){if(!needsNormalization)try{let normalizedRoute=normalizeAdjacentParameters(route);return(0,path_to_regexp.pathToRegexp)(normalizedRoute,keys,options)}catch(retryError){}throw error}}function safeCompile(route,options){let needsNormalization=hasAdjacentParameterIssues(route),routeToUse=needsNormalization?normalizeAdjacentParameters(route):route;try{let compiler=(0,path_to_regexp.compile)(routeToUse,options);if(needsNormalization)return params=>stripNormalizedSeparators(compiler(params));return compiler}catch(error){if(!needsNormalization)try{let normalizedRoute=normalizeAdjacentParameters(route),compiler=(0,path_to_regexp.compile)(normalizedRoute,options);return params=>stripNormalizedSeparators(compiler(params))}catch(retryError){}throw error}}function getRouteMatcher({re,groups}){var matcherFn;return matcherFn=pathname=>{let routeMatch=re.exec(pathname);if(!routeMatch)return!1;let decode=param=>{try{return decodeURIComponent(param)}catch{throw Object.defineProperty(new DecodeError("failed to decode param"),"__NEXT_ERROR_CODE",{value:"E528",enumerable:!1,configurable:!0})}},params={};for(let[key,group]of Object.entries(groups)){let match=routeMatch[group.pos];void 0!==match&&(group.repeat?params[key]=match.split("/").map(entry=>decode(entry)):params[key]=decode(match))}return params},pathname=>{let result=matcherFn(pathname);if(!result)return!1;let cleaned={};for(let[key,value]of Object.entries(result))"string"==typeof value?cleaned[key]=value.replace(RegExp(`^${PARAM_SEPARATOR}`),""):Array.isArray(value)?cleaned[key]=value.map(item=>"string"==typeof item?item.replace(RegExp(`^${PARAM_SEPARATOR}`),""):item):cleaned[key]=value;return cleaned}}function searchParamsToUrlQuery(searchParams){let query={};for(let[key,value]of searchParams.entries()){let existing=query[key];void 0===existing?query[key]=value:Array.isArray(existing)?existing.push(value):query[key]=[existing,value]}return query}function stringifyUrlQueryParam(param){return"string"==typeof param?param:("number"!=typeof param||isNaN(param))&&"boolean"!=typeof param?"":String(param)}function getCookieParser(headers){return function(){let{cookie}=headers;if(!cookie)return{};let{parse:parseCookieFn}=__webpack_require__("./dist/compiled/cookie/index.js");return parseCookieFn(Array.isArray(cookie)?cookie.join("; "):cookie)}}function unescapeSegments(str){return str.replace(/__ESC_COLON_/gi,":")}function compileNonPath(value,params){if(!value.includes(":"))return value;for(let key of Object.keys(params))value.includes(`:${key}`)&&(value=value.replace(RegExp(`:${key}\\*`,"g"),`:${key}--ESCAPED_PARAM_ASTERISKS`).replace(RegExp(`:${key}\\?`,"g"),`:${key}--ESCAPED_PARAM_QUESTION`).replace(RegExp(`:${key}\\+`,"g"),`:${key}--ESCAPED_PARAM_PLUS`).replace(RegExp(`:${key}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${key}`));return value=value.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),safeCompile(`/${value}`,{validate:!1})(params).slice(1)}function normalizeNextQueryParam(key){for(let prefix of[constants.NEXT_QUERY_PARAM_PREFIX,constants.NEXT_INTERCEPTION_MARKER_PREFIX])if(key!==prefix&&key.startsWith(prefix))return key.substring(prefix.length);return null}function decodeQueryPathParameter(value){try{return decodeURIComponent(value)}catch{return value}}let slashedProtocols=/https?|ftp|gopher|file/;function filterInternalQuery(query,paramKeys){for(let key in delete query.nextInternalLocale,query){let isNextQueryPrefix=key!==constants.NEXT_QUERY_PARAM_PREFIX&&key.startsWith(constants.NEXT_QUERY_PARAM_PREFIX),isNextInterceptionMarkerPrefix=key!==constants.NEXT_INTERCEPTION_MARKER_PREFIX&&key.startsWith(constants.NEXT_INTERCEPTION_MARKER_PREFIX);(isNextQueryPrefix||isNextInterceptionMarkerPrefix||paramKeys.includes(key))&&delete query[key]}}function detectDomainLocale(domainItems,hostname,detectedLocale){if(domainItems){for(let item of(detectedLocale&&(detectedLocale=detectedLocale.toLowerCase()),domainItems))if(hostname===item.domain?.split(":",1)[0].toLowerCase()||detectedLocale===item.defaultLocale.toLowerCase()||item.locales?.some(locale=>locale.toLowerCase()===detectedLocale))return item}}function getHostname(parsed,headers){let hostname;if(headers?.host&&!Array.isArray(headers.host))hostname=headers.host.toString().split(":",1)[0];else{if(!parsed.hostname)return;hostname=parsed.hostname}return hostname.toLowerCase()}function normalizeDataPath(pathname){return pathHasPrefix(pathname||"/","/_next/data")&&"/index"===(pathname=pathname.replace(/\/_next\/data\/[^/]{1,}/,"").replace(/\.json$/,""))?"/":pathname}let NEXT_REQUEST_META=Symbol.for("NextInternalRequestMeta");function getRequestMeta(req,key){let meta=req[NEXT_REQUEST_META]||{};return"string"==typeof key?meta[key]:meta}function normalizePagePath(page){let normalized=/^\/index(\/|$)/.test(page)&&!isDynamicRoute(page)?`/index${page}`:"/"===page?"/index":ensureLeadingSlash(page);{let{posix}=__webpack_require__("path"),resolvedPage=posix.normalize(normalized);if(resolvedPage!==normalized)throw new NormalizeError(`Requested and resolved page mismatch: ${normalized} ${resolvedPage}`)}return normalized}let STATIC_METADATA_IMAGES_icon_extensions=["ico","jpg","jpeg","png","svg"],STATIC_METADATA_IMAGES_apple_extensions=["jpg","jpeg","png"],STATIC_METADATA_IMAGES_openGraph_extensions=["jpg","jpeg","png","gif"],STATIC_METADATA_IMAGES_twitter_extensions=["jpg","jpeg","png","gif"],getExtensionRegexString=(staticExtensions,dynamicExtensions)=>dynamicExtensions&&0!==dynamicExtensions.length?`(?:\\.(${staticExtensions.join("|")})|(\\.(${dynamicExtensions.join("|")})))`:`(\\.(?:${staticExtensions.join("|")}))`,FAVICON_REGEX=/^[\\/]favicon\.ico$/,ROBOTS_TXT_REGEX=/^[\\/]robots\.txt$/,MANIFEST_JSON_REGEX=/^[\\/]manifest\.json$/,MANIFEST_WEBMANIFEST_REGEX=/^[\\/]manifest\.webmanifest$/,SITEMAP_XML_REGEX=/[\\/]sitemap\.xml$/,compiledRegexCache=new Map;class DetachedPromise{constructor(){let resolve,reject;this.promise=new Promise((res,rej)=>{resolve=res,reject=rej}),this.resolve=resolve,this.reject=reject}}class Batcher{constructor(cacheKeyFn,schedulerFn=fn=>fn()){this.cacheKeyFn=cacheKeyFn,this.schedulerFn=schedulerFn,this.pending=new Map}static create(options){return new Batcher(null==options?void 0:options.cacheKeyFn,null==options?void 0:options.schedulerFn)}async batch(key,fn){let cacheKey=this.cacheKeyFn?await this.cacheKeyFn(key):key;if(null===cacheKey)return fn({resolve:value=>Promise.resolve(value),key});let pending=this.pending.get(cacheKey);if(pending)return pending;let{promise,resolve,reject}=new DetachedPromise;return this.pending.set(cacheKey,promise),this.schedulerFn(async()=>{try{let result=await fn({resolve,key});resolve(result)}catch(err){reject(err)}finally{this.pending.delete(cacheKey)}}),promise}}let scheduleOnNextTick=cb=>{Promise.resolve().then(()=>{process.nextTick(cb)})};var types_CachedRouteKind=((CachedRouteKind={}).APP_PAGE="APP_PAGE",CachedRouteKind.APP_ROUTE="APP_ROUTE",CachedRouteKind.PAGES="PAGES",CachedRouteKind.FETCH="FETCH",CachedRouteKind.REDIRECT="REDIRECT",CachedRouteKind.IMAGE="IMAGE",CachedRouteKind),types_IncrementalCacheKind=((IncrementalCacheKind={}).APP_PAGE="APP_PAGE",IncrementalCacheKind.APP_ROUTE="APP_ROUTE",IncrementalCacheKind.PAGES="PAGES",IncrementalCacheKind.FETCH="FETCH",IncrementalCacheKind.IMAGE="IMAGE",IncrementalCacheKind),tracer_=__webpack_require__("../lib/trace/tracer"),trace_constants=__webpack_require__("./dist/esm/server/lib/trace/constants.js");function voidCatch(){}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]),new Uint8Array([60,109,101,116,97,32,110,97,109,101,61,34,194,171,110,120,116,45,105,99,111,110,194,187,34]);let node_web_streams_helper_encoder=new TextEncoder;function streamFromString(str){return new ReadableStream({start(controller){controller.enqueue(node_web_streams_helper_encoder.encode(str)),controller.close()}})}function streamFromBuffer(chunk){return new ReadableStream({start(controller){controller.enqueue(chunk),controller.close()}})}async function streamToString(stream,signal){let decoder=new TextDecoder("utf-8",{fatal:!0}),string="";for await(let chunk of stream){if(null==signal?void 0:signal.aborted)return string;string+=decoder.decode(chunk,{stream:!0})}return string+decoder.decode()}function addPathPrefix(path,prefix){if(!path.startsWith("/")||!prefix)return path;let{pathname,query,hash}=parsePath(path);return`${prefix}${pathname}${query}${hash}`}function addPathSuffix(path,suffix){if(!path.startsWith("/")||!suffix)return path;let{pathname,query,hash}=parsePath(path);return`${pathname}${suffix}${query}${hash}`}let REGEX_LOCALHOST_HOSTNAME=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function parseURL(url,base){return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME,"localhost"),base&&String(base).replace(REGEX_LOCALHOST_HOSTNAME,"localhost"))}let Internal=Symbol("NextURLInternal");class NextURL{constructor(input,baseOrOpts,opts){let base,options;"object"==typeof baseOrOpts&&"pathname"in baseOrOpts||"string"==typeof baseOrOpts?(base=baseOrOpts,options=opts||{}):options=opts||baseOrOpts||{},this[Internal]={url:parseURL(input,base??options.base),options:options,basePath:""},this.analyze()}analyze(){var _this_Internal_options_nextConfig_i18n,_this_Internal_options_nextConfig,_this_Internal_domainLocale,_this_Internal_options_nextConfig_i18n1,_this_Internal_options_nextConfig1;let info=function(pathname,options){let{basePath,i18n,trailingSlash}=options.nextConfig??{},info={pathname,trailingSlash:"/"!==pathname?pathname.endsWith("/"):trailingSlash};basePath&&pathHasPrefix(info.pathname,basePath)&&(info.pathname=removePathPrefix(info.pathname,basePath),info.basePath=basePath);let pathnameNoDataPrefix=info.pathname;if(info.pathname.startsWith("/_next/data/")&&info.pathname.endsWith(".json")){let paths=info.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/");info.buildId=paths[0],pathnameNoDataPrefix="index"!==paths[1]?`/${paths.slice(1).join("/")}`:"/",!0===options.parseData&&(info.pathname=pathnameNoDataPrefix)}if(i18n){let result=options.i18nProvider?options.i18nProvider.analyze(info.pathname):normalizeLocalePath(info.pathname,i18n.locales);info.locale=result.detectedLocale,info.pathname=result.pathname??info.pathname,!result.detectedLocale&&info.buildId&&(result=options.i18nProvider?options.i18nProvider.analyze(pathnameNoDataPrefix):normalizeLocalePath(pathnameNoDataPrefix,i18n.locales)).detectedLocale&&(info.locale=result.detectedLocale)}return info}(this[Internal].url.pathname,{nextConfig:this[Internal].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[Internal].options.i18nProvider}),hostname=getHostname(this[Internal].url,this[Internal].options.headers);this[Internal].domainLocale=this[Internal].options.i18nProvider?this[Internal].options.i18nProvider.detectDomainLocale(hostname):detectDomainLocale(null==(_this_Internal_options_nextConfig=this[Internal].options.nextConfig)||null==(_this_Internal_options_nextConfig_i18n=_this_Internal_options_nextConfig.i18n)?void 0:_this_Internal_options_nextConfig_i18n.domains,hostname);let defaultLocale=(null==(_this_Internal_domainLocale=this[Internal].domainLocale)?void 0:_this_Internal_domainLocale.defaultLocale)||(null==(_this_Internal_options_nextConfig1=this[Internal].options.nextConfig)||null==(_this_Internal_options_nextConfig_i18n1=_this_Internal_options_nextConfig1.i18n)?void 0:_this_Internal_options_nextConfig_i18n1.defaultLocale);this[Internal].url.pathname=info.pathname,this[Internal].defaultLocale=defaultLocale,this[Internal].basePath=info.basePath??"",this[Internal].buildId=info.buildId,this[Internal].locale=info.locale??defaultLocale,this[Internal].trailingSlash=info.trailingSlash}formatPathname(){var info;let pathname;return pathname=function(path,locale,defaultLocale,ignorePrefix){if(!locale||locale===defaultLocale)return path;let lower=path.toLowerCase();return!ignorePrefix&&(pathHasPrefix(lower,"/api")||pathHasPrefix(lower,`/${locale.toLowerCase()}`))?path:addPathPrefix(path,`/${locale}`)}((info={basePath:this[Internal].basePath,buildId:this[Internal].buildId,defaultLocale:this[Internal].options.forceLocale?void 0:this[Internal].defaultLocale,locale:this[Internal].locale,pathname:this[Internal].url.pathname,trailingSlash:this[Internal].trailingSlash}).pathname,info.locale,info.buildId?void 0:info.defaultLocale,info.ignorePrefix),(info.buildId||!info.trailingSlash)&&(pathname=removeTrailingSlash(pathname)),info.buildId&&(pathname=addPathSuffix(addPathPrefix(pathname,`/_next/data/${info.buildId}`),"/"===info.pathname?"index.json":".json")),pathname=addPathPrefix(pathname,info.basePath),!info.buildId&&info.trailingSlash?pathname.endsWith("/")?pathname:addPathSuffix(pathname,"/"):removeTrailingSlash(pathname)}formatSearch(){return this[Internal].url.search}get buildId(){return this[Internal].buildId}set buildId(buildId){this[Internal].buildId=buildId}get locale(){return this[Internal].locale??""}set locale(locale){var _this_Internal_options_nextConfig_i18n,_this_Internal_options_nextConfig;if(!this[Internal].locale||!(null==(_this_Internal_options_nextConfig=this[Internal].options.nextConfig)||null==(_this_Internal_options_nextConfig_i18n=_this_Internal_options_nextConfig.i18n)?void 0:_this_Internal_options_nextConfig_i18n.locales.includes(locale)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${locale}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[Internal].locale=locale}get defaultLocale(){return this[Internal].defaultLocale}get domainLocale(){return this[Internal].domainLocale}get searchParams(){return this[Internal].url.searchParams}get host(){return this[Internal].url.host}set host(value){this[Internal].url.host=value}get hostname(){return this[Internal].url.hostname}set hostname(value){this[Internal].url.hostname=value}get port(){return this[Internal].url.port}set port(value){this[Internal].url.port=value}get protocol(){return this[Internal].url.protocol}set protocol(value){this[Internal].url.protocol=value}get href(){let pathname=this.formatPathname(),search=this.formatSearch();return`${this.protocol}//${this.host}${pathname}${search}${this.hash}`}set href(url){this[Internal].url=parseURL(url),this.analyze()}get origin(){return this[Internal].url.origin}get pathname(){return this[Internal].url.pathname}set pathname(value){this[Internal].url.pathname=value}get hash(){return this[Internal].url.hash}set hash(value){this[Internal].url.hash=value}get search(){return this[Internal].url.search}set search(value){this[Internal].url.search=value}get password(){return this[Internal].url.password}set password(value){this[Internal].url.password=value}get username(){return this[Internal].url.username}set username(value){this[Internal].url.username=value}get basePath(){return this[Internal].basePath}set basePath(value){this[Internal].basePath=value.startsWith("/")?value:`/${value}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new NextURL(String(this),this[Internal].options)}}__webpack_require__("./dist/esm/server/web/spec-extension/cookies.js"),Symbol("internal request"),Request,Symbol.for("edge-runtime.inspect.custom");let ResponseAbortedName="ResponseAborted";class ResponseAborted extends Error{constructor(...args){super(...args),this.name=ResponseAbortedName}}let clientComponentLoadStart=0,clientComponentLoadTimes=0,clientComponentLoadCount=0;function isAbortError(e){return(null==e?void 0:e.name)==="AbortError"||(null==e?void 0:e.name)===ResponseAbortedName}async function pipeToNodeResponse(readable,res,waitUntilForEnd){try{let controller,{errored,destroyed}=res;if(errored||destroyed)return;let controller1=(controller=new AbortController,res.once("close",()=>{res.writableFinished||controller.abort(new ResponseAborted)}),controller),writer=function(res,waitUntilForEnd){let started=!1,drained=new DetachedPromise;function onDrain(){drained.resolve()}res.on("drain",onDrain),res.once("close",()=>{res.off("drain",onDrain),drained.resolve()});let finished=new DetachedPromise;return res.once("finish",()=>{finished.resolve()}),new WritableStream({write:async chunk=>{if(!started){if(started=!0,"performance"in globalThis&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX){let metrics=function(options={}){let metrics=0===clientComponentLoadStart?void 0:{clientComponentLoadStart,clientComponentLoadTimes,clientComponentLoadCount};return options.reset&&(clientComponentLoadStart=0,clientComponentLoadTimes=0,clientComponentLoadCount=0),metrics}();metrics&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,{start:metrics.clientComponentLoadStart,end:metrics.clientComponentLoadStart+metrics.clientComponentLoadTimes})}res.flushHeaders(),(0,tracer_.getTracer)().trace(trace_constants.NextNodeServerSpan.startResponse,{spanName:"start response"},()=>void 0)}try{let ok=res.write(chunk);"flush"in res&&"function"==typeof res.flush&&res.flush(),ok||(await drained.promise,drained=new DetachedPromise)}catch(err){throw res.end(),Object.defineProperty(Error("failed to write chunk to response",{cause:err}),"__NEXT_ERROR_CODE",{value:"E321",enumerable:!1,configurable:!0})}},abort:err=>{res.writableFinished||res.destroy(err)},close:async()=>{if(waitUntilForEnd&&await waitUntilForEnd,!res.writableFinished)return res.end(),finished.promise}})}(res,waitUntilForEnd);await readable.pipeTo(writer,{signal:controller1.signal})}catch(err){if(isAbortError(err))return;throw Object.defineProperty(Error("failed to pipe response",{cause:err}),"__NEXT_ERROR_CODE",{value:"E180",enumerable:!1,configurable:!0})}}class RenderResult{static #_=this.EMPTY=new RenderResult(null,{metadata:{},contentType:null});static fromStatic(value,contentType){return new RenderResult(value,{metadata:{},contentType})}constructor(response,{contentType,waitUntil,metadata}){this.response=response,this.contentType=contentType,this.metadata=metadata,this.waitUntil=waitUntil}assignMetadata(metadata){Object.assign(this.metadata,metadata)}get isNull(){return null===this.response}get isDynamic(){return"string"!=typeof this.response}toUnchunkedString(stream=!1){if(null===this.response)return"";if("string"!=typeof this.response){if(!stream)throw Object.defineProperty(new InvariantError("dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E732",enumerable:!1,configurable:!0});return streamToString(this.readable)}return this.response}get readable(){return null===this.response?new ReadableStream({start(controller){controller.close()}}):"string"==typeof this.response?streamFromString(this.response):Buffer.isBuffer(this.response)?streamFromBuffer(this.response):Array.isArray(this.response)?function(...streams){if(0===streams.length)return new ReadableStream({start(controller){controller.close()}});if(1===streams.length)return streams[0];let{readable,writable}=new TransformStream,promise=streams[0].pipeTo(writable,{preventClose:!0}),i=1;for(;i<streams.length-1;i++){let nextStream=streams[i];promise=promise.then(()=>nextStream.pipeTo(writable,{preventClose:!0}))}let lastStream=streams[i];return(promise=promise.then(()=>lastStream.pipeTo(writable))).catch(voidCatch),readable}(...this.response):this.response}coerce(){return null===this.response?[]:"string"==typeof this.response?[streamFromString(this.response)]:Array.isArray(this.response)?this.response:Buffer.isBuffer(this.response)?[streamFromBuffer(this.response)]:[this.response]}unshift(readable){this.response=this.coerce(),this.response.unshift(readable)}push(readable){this.response=this.coerce(),this.response.push(readable)}async pipeTo(writable){try{await this.readable.pipeTo(writable,{preventClose:!0}),this.waitUntil&&await this.waitUntil,await writable.close()}catch(err){if(isAbortError(err))return void await writable.abort(err);throw err}}async pipeToNodeResponse(res){await pipeToNodeResponse(this.readable,res,this.waitUntil)}}var route_kind_RouteKind=((RouteKind={}).PAGES="PAGES",RouteKind.PAGES_API="PAGES_API",RouteKind.APP_PAGE="APP_PAGE",RouteKind.APP_ROUTE="APP_ROUTE",RouteKind.IMAGE="IMAGE",RouteKind);async function fromResponseCacheEntry(cacheEntry){var _cacheEntry_value,_cacheEntry_value1;return{...cacheEntry,value:(null==(_cacheEntry_value=cacheEntry.value)?void 0:_cacheEntry_value.kind)===types_CachedRouteKind.PAGES?{kind:types_CachedRouteKind.PAGES,html:await cacheEntry.value.html.toUnchunkedString(!0),pageData:cacheEntry.value.pageData,headers:cacheEntry.value.headers,status:cacheEntry.value.status}:(null==(_cacheEntry_value1=cacheEntry.value)?void 0:_cacheEntry_value1.kind)===types_CachedRouteKind.APP_PAGE?{kind:types_CachedRouteKind.APP_PAGE,html:await cacheEntry.value.html.toUnchunkedString(!0),postponed:cacheEntry.value.postponed,rscData:cacheEntry.value.rscData,headers:cacheEntry.value.headers,status:cacheEntry.value.status,segmentData:cacheEntry.value.segmentData}:cacheEntry.value}}async function toResponseCacheEntry(response){var _response_value,_response_value1;return response?{isMiss:response.isMiss,isStale:response.isStale,cacheControl:response.cacheControl,value:(null==(_response_value=response.value)?void 0:_response_value.kind)===types_CachedRouteKind.PAGES?{kind:types_CachedRouteKind.PAGES,html:RenderResult.fromStatic(response.value.html,constants.HTML_CONTENT_TYPE_HEADER),pageData:response.value.pageData,headers:response.value.headers,status:response.value.status}:(null==(_response_value1=response.value)?void 0:_response_value1.kind)===types_CachedRouteKind.APP_PAGE?{kind:types_CachedRouteKind.APP_PAGE,html:RenderResult.fromStatic(response.value.html,constants.HTML_CONTENT_TYPE_HEADER),rscData:response.value.rscData,headers:response.value.headers,status:response.value.status,postponed:response.value.postponed,segmentData:response.value.segmentData}:response.value}:null}class ResponseCache{constructor(minimal_mode){this.getBatcher=Batcher.create({cacheKeyFn:({key,isOnDemandRevalidate})=>`${key}-${isOnDemandRevalidate?"1":"0"}`,schedulerFn:scheduleOnNextTick}),this.revalidateBatcher=Batcher.create({schedulerFn:scheduleOnNextTick}),this.minimal_mode=minimal_mode}async get(key,responseGenerator,context){var _this_previousCacheItem;if(!key)return responseGenerator({hasResolved:!1,previousCacheEntry:null});if(this.minimal_mode&&(null==(_this_previousCacheItem=this.previousCacheItem)?void 0:_this_previousCacheItem.key)===key&&this.previousCacheItem.expiresAt>Date.now())return toResponseCacheEntry(this.previousCacheItem.entry);let{incrementalCache,isOnDemandRevalidate=!1,isFallback=!1,isRoutePPREnabled=!1,isPrefetch=!1,waitUntil,routeKind}=context;return toResponseCacheEntry(await this.getBatcher.batch({key,isOnDemandRevalidate},({resolve})=>{let promise=this.handleGet(key,responseGenerator,{incrementalCache,isOnDemandRevalidate,isFallback,isRoutePPREnabled,isPrefetch,routeKind},resolve);return waitUntil&&waitUntil(promise),promise}))}async handleGet(key,responseGenerator,context,resolve){let previousIncrementalCacheEntry=null,resolved=!1;try{if((previousIncrementalCacheEntry=this.minimal_mode?null:await context.incrementalCache.get(key,{kind:function(routeKind){switch(routeKind){case route_kind_RouteKind.PAGES:return types_IncrementalCacheKind.PAGES;case route_kind_RouteKind.APP_PAGE:return types_IncrementalCacheKind.APP_PAGE;case route_kind_RouteKind.IMAGE:return types_IncrementalCacheKind.IMAGE;case route_kind_RouteKind.APP_ROUTE:return types_IncrementalCacheKind.APP_ROUTE;case route_kind_RouteKind.PAGES_API:throw Object.defineProperty(Error(`Unexpected route kind ${routeKind}`),"__NEXT_ERROR_CODE",{value:"E64",enumerable:!1,configurable:!0});default:return routeKind}}(context.routeKind),isRoutePPREnabled:context.isRoutePPREnabled,isFallback:context.isFallback}))&&!context.isOnDemandRevalidate&&(resolve(previousIncrementalCacheEntry),resolved=!0,!previousIncrementalCacheEntry.isStale||context.isPrefetch))return previousIncrementalCacheEntry;let incrementalResponseCacheEntry=await this.revalidate(key,context.incrementalCache,context.isRoutePPREnabled,context.isFallback,responseGenerator,previousIncrementalCacheEntry,null!==previousIncrementalCacheEntry&&!context.isOnDemandRevalidate);if(!incrementalResponseCacheEntry)return this.minimal_mode&&(this.previousCacheItem=void 0),null;return context.isOnDemandRevalidate,incrementalResponseCacheEntry}catch(err){if(resolved)return console.error(err),null;throw err}}async revalidate(key,incrementalCache,isRoutePPREnabled,isFallback,responseGenerator,previousIncrementalCacheEntry,hasResolved,waitUntil){return this.revalidateBatcher.batch(key,()=>{let promise=this.handleRevalidate(key,incrementalCache,isRoutePPREnabled,isFallback,responseGenerator,previousIncrementalCacheEntry,hasResolved);return waitUntil&&waitUntil(promise),promise})}async handleRevalidate(key,incrementalCache,isRoutePPREnabled,isFallback,responseGenerator,previousIncrementalCacheEntry,hasResolved){try{let responseCacheEntry=await responseGenerator({hasResolved,previousCacheEntry:previousIncrementalCacheEntry,isRevalidating:!0});if(!responseCacheEntry)return null;let incrementalResponseCacheEntry=await fromResponseCacheEntry({...responseCacheEntry,isMiss:!previousIncrementalCacheEntry});return incrementalResponseCacheEntry.cacheControl&&(this.minimal_mode?this.previousCacheItem={key,entry:incrementalResponseCacheEntry,expiresAt:Date.now()+1e3}:await incrementalCache.set(key,incrementalResponseCacheEntry.value,{cacheControl:incrementalResponseCacheEntry.cacheControl,isRoutePPREnabled,isFallback})),incrementalResponseCacheEntry}catch(err){if(null==previousIncrementalCacheEntry?void 0:previousIncrementalCacheEntry.cacheControl){let revalidate=Math.min(Math.max(previousIncrementalCacheEntry.cacheControl.revalidate||3,3),30),expire=void 0===previousIncrementalCacheEntry.cacheControl.expire?void 0:Math.max(revalidate+3,previousIncrementalCacheEntry.cacheControl.expire);await incrementalCache.set(key,previousIncrementalCacheEntry.value,{cacheControl:{revalidate:revalidate,expire:expire},isRoutePPREnabled,isFallback})}throw err}}}var isomorphic_path=__webpack_require__("./dist/esm/shared/lib/isomorphic/path.js"),path_default=__webpack_require__.n(isomorphic_path);let tags_manifest_external_js_namespaceObject=require("next/dist/server/lib/incremental-cache/tags-manifest.external.js");class MultiFileWriter{constructor(fs){this.fs=fs,this.tasks=[]}findOrCreateTask(directory){for(let task of this.tasks)if(task[0]===directory)return task;let promise=this.fs.mkdir(directory);promise.catch(()=>{});let task=[directory,promise,[]];return this.tasks.push(task),task}append(filePath,data){let task=this.findOrCreateTask(path_default().dirname(filePath)),promise=task[1].then(()=>this.fs.writeFile(filePath,data));promise.catch(()=>{}),task[2].push(promise)}wait(){return Promise.all(this.tasks.flatMap(task=>task[2]))}}let memory_cache_external_js_namespaceObject=require("next/dist/server/lib/incremental-cache/memory-cache.external.js");class FileSystemCache{static #_=this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;constructor(ctx){this.fs=ctx.fs,this.flushToDisk=ctx.flushToDisk,this.serverDistDir=ctx.serverDistDir,this.revalidatedTags=ctx.revalidatedTags,ctx.maxMemoryCacheSize?FileSystemCache.memoryCache?FileSystemCache.debug&&console.log("FileSystemCache: memory store already initialized"):(FileSystemCache.debug&&console.log("FileSystemCache: using memory store for fetch cache"),FileSystemCache.memoryCache=(0,memory_cache_external_js_namespaceObject.getMemoryCache)(ctx.maxMemoryCacheSize)):FileSystemCache.debug&&console.log("FileSystemCache: not using memory store for fetch cache")}resetRequestCache(){}async revalidateTag(tags,durations){if(tags="string"==typeof tags?[tags]:tags,FileSystemCache.debug&&console.log("FileSystemCache: revalidateTag",tags,durations),0===tags.length)return;let now=Date.now();for(let tag of tags){let existingEntry=tags_manifest_external_js_namespaceObject.tagsManifest.get(tag)||{};if(durations){let updates={...existingEntry};updates.stale=now,void 0!==durations.expire&&(updates.expired=now+1e3*durations.expire),tags_manifest_external_js_namespaceObject.tagsManifest.set(tag,updates)}else tags_manifest_external_js_namespaceObject.tagsManifest.set(tag,{...existingEntry,expired:now})}}async get(...args){var _FileSystemCache_memoryCache,_data_value,_data_value1,_data_value2,_data_value3,_data_value4,_data_value5,_FileSystemCache_memoryCache1,_data_value_headers;let[key,ctx]=args,{kind}=ctx,data=null==(_FileSystemCache_memoryCache=FileSystemCache.memoryCache)?void 0:_FileSystemCache_memoryCache.get(key);if(FileSystemCache.debug&&(kind===types_IncrementalCacheKind.FETCH?console.log("FileSystemCache: get",key,ctx.tags,kind,!!data):console.log("FileSystemCache: get",key,kind,!!data)),!data)try{if(kind===types_IncrementalCacheKind.APP_ROUTE){let filePath=this.getFilePath(`${key}.body`,types_IncrementalCacheKind.APP_ROUTE),fileData=await this.fs.readFile(filePath),{mtime}=await this.fs.stat(filePath),meta=JSON.parse(await this.fs.readFile(filePath.replace(/\.body$/,constants.NEXT_META_SUFFIX),"utf8"));data={lastModified:mtime.getTime(),value:{kind:types_CachedRouteKind.APP_ROUTE,body:fileData,headers:meta.headers,status:meta.status}}}else{let filePath=this.getFilePath(kind===types_IncrementalCacheKind.FETCH?key:`${key}.html`,kind),fileData=await this.fs.readFile(filePath,"utf8"),{mtime}=await this.fs.stat(filePath);if(kind===types_IncrementalCacheKind.FETCH){let{tags,fetchIdx,fetchUrl}=ctx;if(!this.flushToDisk)return null;let lastModified=mtime.getTime(),parsedData=JSON.parse(fileData);if(data={lastModified,value:parsedData},(null==(_data_value4=data.value)?void 0:_data_value4.kind)===types_CachedRouteKind.FETCH){let storedTags=null==(_data_value5=data.value)?void 0:_data_value5.tags;(null==tags?void 0:tags.every(tag=>null==storedTags?void 0:storedTags.includes(tag)))||(FileSystemCache.debug&&console.log("FileSystemCache: tags vs storedTags mismatch",tags,storedTags),await this.set(key,data.value,{fetchCache:!0,tags,fetchIdx,fetchUrl}))}}else if(kind===types_IncrementalCacheKind.APP_PAGE){let meta,maybeSegmentData,rscData;try{meta=JSON.parse(await this.fs.readFile(filePath.replace(/\.html$/,constants.NEXT_META_SUFFIX),"utf8"))}catch{}if(null==meta?void 0:meta.segmentPaths){let segmentData=new Map;maybeSegmentData=segmentData;let segmentsDir=key+constants.RSC_SEGMENTS_DIR_SUFFIX;await Promise.all(meta.segmentPaths.map(async segmentPath=>{let segmentDataFilePath=this.getFilePath(segmentsDir+segmentPath+constants.RSC_SEGMENT_SUFFIX,types_IncrementalCacheKind.APP_PAGE);try{segmentData.set(segmentPath,await this.fs.readFile(segmentDataFilePath))}catch{}}))}ctx.isFallback||ctx.isRoutePPREnabled||(rscData=await this.fs.readFile(this.getFilePath(`${key}${constants.RSC_SUFFIX}`,types_IncrementalCacheKind.APP_PAGE))),data={lastModified:mtime.getTime(),value:{kind:types_CachedRouteKind.APP_PAGE,html:fileData,rscData,postponed:null==meta?void 0:meta.postponed,headers:null==meta?void 0:meta.headers,status:null==meta?void 0:meta.status,segmentData:maybeSegmentData}}}else if(kind===types_IncrementalCacheKind.PAGES){let meta,pageData={};ctx.isFallback||(pageData=JSON.parse(await this.fs.readFile(this.getFilePath(`${key}${constants.NEXT_DATA_SUFFIX}`,types_IncrementalCacheKind.PAGES),"utf8"))),data={lastModified:mtime.getTime(),value:{kind:types_CachedRouteKind.PAGES,html:fileData,pageData,headers:null==meta?void 0:meta.headers,status:null==meta?void 0:meta.status}}}else throw Object.defineProperty(Error(`Invariant: Unexpected route kind ${kind} in file system cache.`),"__NEXT_ERROR_CODE",{value:"E445",enumerable:!1,configurable:!0})}data&&(null==(_FileSystemCache_memoryCache1=FileSystemCache.memoryCache)||_FileSystemCache_memoryCache1.set(key,data))}catch{return null}if((null==data||null==(_data_value=data.value)?void 0:_data_value.kind)===types_CachedRouteKind.APP_PAGE||(null==data||null==(_data_value1=data.value)?void 0:_data_value1.kind)===types_CachedRouteKind.APP_ROUTE||(null==data||null==(_data_value2=data.value)?void 0:_data_value2.kind)===types_CachedRouteKind.PAGES){let tagsHeader=null==(_data_value_headers=data.value.headers)?void 0:_data_value_headers[constants.NEXT_CACHE_TAGS_HEADER];if("string"==typeof tagsHeader){let cacheTags=tagsHeader.split(",");if(cacheTags.length>0&&(0,tags_manifest_external_js_namespaceObject.areTagsExpired)(cacheTags,data.lastModified))return FileSystemCache.debug&&console.log("FileSystemCache: expired tags",cacheTags),null}}else if((null==data||null==(_data_value3=data.value)?void 0:_data_value3.kind)===types_CachedRouteKind.FETCH){let combinedTags=ctx.kind===types_IncrementalCacheKind.FETCH?[...ctx.tags||[],...ctx.softTags||[]]:[];if(combinedTags.some(tag=>this.revalidatedTags.includes(tag)))return FileSystemCache.debug&&console.log("FileSystemCache: was revalidated",combinedTags),null;if((0,tags_manifest_external_js_namespaceObject.areTagsExpired)(combinedTags,data.lastModified))return FileSystemCache.debug&&console.log("FileSystemCache: expired tags",combinedTags),null}return data??null}async set(key,data,ctx){var _FileSystemCache_memoryCache;if(null==(_FileSystemCache_memoryCache=FileSystemCache.memoryCache)||_FileSystemCache_memoryCache.set(key,{value:data,lastModified:Date.now()}),FileSystemCache.debug&&console.log("FileSystemCache: set",key),!this.flushToDisk||!data)return;let writer=new MultiFileWriter(this.fs);if(data.kind===types_CachedRouteKind.APP_ROUTE){let filePath=this.getFilePath(`${key}.body`,types_IncrementalCacheKind.APP_ROUTE);writer.append(filePath,data.body);let meta={headers:data.headers,status:data.status,postponed:void 0,segmentPaths:void 0};writer.append(filePath.replace(/\.body$/,constants.NEXT_META_SUFFIX),JSON.stringify(meta,null,2))}else if(data.kind===types_CachedRouteKind.PAGES||data.kind===types_CachedRouteKind.APP_PAGE){let isAppPath=data.kind===types_CachedRouteKind.APP_PAGE,htmlPath=this.getFilePath(`${key}.html`,isAppPath?types_IncrementalCacheKind.APP_PAGE:types_IncrementalCacheKind.PAGES);if(writer.append(htmlPath,data.html),ctx.fetchCache||ctx.isFallback||ctx.isRoutePPREnabled||writer.append(this.getFilePath(`${key}${isAppPath?constants.RSC_SUFFIX:constants.NEXT_DATA_SUFFIX}`,isAppPath?types_IncrementalCacheKind.APP_PAGE:types_IncrementalCacheKind.PAGES),isAppPath?data.rscData:JSON.stringify(data.pageData)),(null==data?void 0:data.kind)===types_CachedRouteKind.APP_PAGE){let segmentPaths;if(data.segmentData){segmentPaths=[];let segmentsDir=htmlPath.replace(/\.html$/,constants.RSC_SEGMENTS_DIR_SUFFIX);for(let[segmentPath,buffer]of data.segmentData){segmentPaths.push(segmentPath);let segmentDataFilePath=segmentsDir+segmentPath+constants.RSC_SEGMENT_SUFFIX;writer.append(segmentDataFilePath,buffer)}}let meta={headers:data.headers,status:data.status,postponed:data.postponed,segmentPaths};writer.append(htmlPath.replace(/\.html$/,constants.NEXT_META_SUFFIX),JSON.stringify(meta))}}else if(data.kind===types_CachedRouteKind.FETCH){let filePath=this.getFilePath(key,types_IncrementalCacheKind.FETCH);writer.append(filePath,JSON.stringify({...data,tags:ctx.fetchCache?ctx.tags:[]}))}await writer.wait()}getFilePath(pathname,kind){switch(kind){case types_IncrementalCacheKind.FETCH:return path_default().join(this.serverDistDir,"..","cache","fetch-cache",pathname);case types_IncrementalCacheKind.PAGES:return path_default().join(this.serverDistDir,"pages",pathname);case types_IncrementalCacheKind.IMAGE:case types_IncrementalCacheKind.APP_PAGE:case types_IncrementalCacheKind.APP_ROUTE:return path_default().join(this.serverDistDir,"app",pathname);default:throw Object.defineProperty(Error(`Unexpected file path kind: ${kind}`),"__NEXT_ERROR_CODE",{value:"E479",enumerable:!1,configurable:!0})}}}function toRoute(pathname){return pathname.replace(/(?:\/index)?\/?$/,"")||"/"}let shared_cache_controls_external_js_namespaceObject=require("next/dist/server/lib/incremental-cache/shared-cache-controls.external.js"),work_unit_async_storage_external_js_namespaceObject=require("next/dist/server/app-render/work-unit-async-storage.external.js"),work_async_storage_external_js_namespaceObject=require("next/dist/server/app-render/work-async-storage.external.js");class IncrementalCache{static #_=this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;constructor({fs,dev,flushToDisk,minimalMode,serverDistDir,requestHeaders,maxMemoryCacheSize,getPrerenderManifest,fetchCacheKeyPrefix,CurCacheHandler,allowedRevalidateHeaderKeys}){var _this_prerenderManifest_preview,_this_prerenderManifest,_this_prerenderManifest_preview1,_this_prerenderManifest1;this.locks=new Map,this.hasCustomCacheHandler=!!CurCacheHandler;const cacheHandlersSymbol=Symbol.for("@next/cache-handlers"),_globalThis=globalThis;if(CurCacheHandler)IncrementalCache.debug&&console.log("IncrementalCache: using custom cache handler",CurCacheHandler.name);else{const globalCacheHandler=_globalThis[cacheHandlersSymbol];(null==globalCacheHandler?void 0:globalCacheHandler.FetchCache)?(CurCacheHandler=globalCacheHandler.FetchCache,IncrementalCache.debug&&console.log("IncrementalCache: using global FetchCache cache handler")):fs&&serverDistDir&&(IncrementalCache.debug&&console.log("IncrementalCache: using filesystem cache handler"),CurCacheHandler=FileSystemCache)}process.env.__NEXT_TEST_MAX_ISR_CACHE&&(maxMemoryCacheSize=parseInt(process.env.__NEXT_TEST_MAX_ISR_CACHE,10)),this.dev=dev,this.disableForTestmode="true"===process.env.NEXT_PRIVATE_TEST_PROXY,this.minimalMode=minimalMode,this.requestHeaders=requestHeaders,this.allowedRevalidateHeaderKeys=allowedRevalidateHeaderKeys,this.prerenderManifest=getPrerenderManifest(),this.cacheControls=new shared_cache_controls_external_js_namespaceObject.SharedCacheControls(this.prerenderManifest),this.fetchCacheKeyPrefix=fetchCacheKeyPrefix;let revalidatedTags=[];requestHeaders[constants.PRERENDER_REVALIDATE_HEADER]===(null==(_this_prerenderManifest=this.prerenderManifest)||null==(_this_prerenderManifest_preview=_this_prerenderManifest.preview)?void 0:_this_prerenderManifest_preview.previewModeId)&&(this.isOnDemandRevalidate=!0),minimalMode&&(revalidatedTags=this.revalidatedTags=function(headers,previewModeId){return"string"==typeof headers[constants.NEXT_CACHE_REVALIDATED_TAGS_HEADER]&&headers[constants.NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER]===previewModeId?headers[constants.NEXT_CACHE_REVALIDATED_TAGS_HEADER].split(","):[]}(requestHeaders,null==(_this_prerenderManifest1=this.prerenderManifest)||null==(_this_prerenderManifest_preview1=_this_prerenderManifest1.preview)?void 0:_this_prerenderManifest_preview1.previewModeId)),CurCacheHandler&&(this.cacheHandler=new CurCacheHandler({dev,fs,flushToDisk,serverDistDir,revalidatedTags,maxMemoryCacheSize,_requestHeaders:requestHeaders,fetchCacheKeyPrefix}))}calculateRevalidate(pathname,fromTime,dev,isFallback){if(dev)return Math.floor(performance.timeOrigin+performance.now()-1e3);let cacheControl=this.cacheControls.get(toRoute(pathname)),initialRevalidateSeconds=cacheControl?cacheControl.revalidate:!isFallback&&1;return"number"==typeof initialRevalidateSeconds?1e3*initialRevalidateSeconds+fromTime:initialRevalidateSeconds}_getPathname(pathname,fetchCache){return fetchCache?pathname:normalizePagePath(pathname)}resetRequestCache(){var _this_cacheHandler_resetRequestCache,_this_cacheHandler;null==(_this_cacheHandler=this.cacheHandler)||null==(_this_cacheHandler_resetRequestCache=_this_cacheHandler.resetRequestCache)||_this_cacheHandler_resetRequestCache.call(_this_cacheHandler)}async lock(cacheKey){for(;;){let lock=this.locks.get(cacheKey);if(IncrementalCache.debug&&console.log("IncrementalCache: lock get",cacheKey,!!lock),!lock)break;await lock}let{resolve,promise}=new DetachedPromise;return IncrementalCache.debug&&console.log("IncrementalCache: successfully locked",cacheKey),this.locks.set(cacheKey,promise),()=>{resolve(),this.locks.delete(cacheKey)}}async revalidateTag(tags,durations){var _this_cacheHandler;return null==(_this_cacheHandler=this.cacheHandler)?void 0:_this_cacheHandler.revalidateTag(tags,durations)}async generateCacheKey(url,init={}){let bodyChunks=[],encoder=new TextEncoder,decoder=new TextDecoder;if(init.body)if(init.body instanceof Uint8Array)bodyChunks.push(decoder.decode(init.body)),init._ogBody=init.body;else if("function"==typeof init.body.getReader){let readableBody=init.body,chunks=[];try{await readableBody.pipeTo(new WritableStream({write(chunk){"string"==typeof chunk?(chunks.push(encoder.encode(chunk)),bodyChunks.push(chunk)):(chunks.push(chunk),bodyChunks.push(decoder.decode(chunk,{stream:!0})))}})),bodyChunks.push(decoder.decode());let length=chunks.reduce((total,arr)=>total+arr.length,0),arrayBuffer=new Uint8Array(length),offset=0;for(let chunk of chunks)arrayBuffer.set(chunk,offset),offset+=chunk.length;init._ogBody=arrayBuffer}catch(err){console.error("Problem reading body",err)}}else if("function"==typeof init.body.keys){let formData=init.body;for(let key of(init._ogBody=init.body,new Set([...formData.keys()]))){let values=formData.getAll(key);bodyChunks.push(`${key}=${(await Promise.all(values.map(async val=>"string"==typeof val?val:await val.text()))).join(",")}`)}}else if("function"==typeof init.body.arrayBuffer){let blob=init.body,arrayBuffer=await blob.arrayBuffer();bodyChunks.push(await blob.text()),init._ogBody=new Blob([arrayBuffer],{type:blob.type})}else"string"==typeof init.body&&(bodyChunks.push(init.body),init._ogBody=init.body);let headers="function"==typeof(init.headers||{}).keys?Object.fromEntries(init.headers):Object.assign({},init.headers);"traceparent"in headers&&delete headers.traceparent,"tracestate"in headers&&delete headers.tracestate;let cacheString=JSON.stringify(["v3",this.fetchCacheKeyPrefix||"",url,init.method,headers,init.mode,init.redirect,init.credentials,init.referrer,init.referrerPolicy,init.integrity,init.cache,bodyChunks]);return __webpack_require__("crypto").createHash("sha256").update(cacheString).digest("hex")}async get(cacheKey,ctx){var _this_cacheHandler,_cacheData_value,_cacheData_value1,_cacheData_value2,_cacheData_value3,_cacheData_value4,_cacheData_value_headers;let isStale,revalidateAfter;if(ctx.kind===types_IncrementalCacheKind.FETCH){let workUnitStore=work_unit_async_storage_external_js_namespaceObject.workUnitAsyncStorage.getStore(),resumeDataCache=workUnitStore?(0,work_unit_async_storage_external_js_namespaceObject.getRenderResumeDataCache)(workUnitStore):null;if(resumeDataCache){let memoryCacheData=resumeDataCache.fetch.get(cacheKey);if((null==memoryCacheData?void 0:memoryCacheData.kind)===types_CachedRouteKind.FETCH)return IncrementalCache.debug&&console.log("IncrementalCache: rdc:hit",cacheKey),{isStale:!1,value:memoryCacheData};IncrementalCache.debug&&console.log("IncrementalCache: rdc:miss",cacheKey)}else IncrementalCache.debug&&console.log("IncrementalCache: rdc:no-resume-data")}if(this.disableForTestmode||this.dev&&(ctx.kind!==types_IncrementalCacheKind.FETCH||"no-cache"===this.requestHeaders["cache-control"]))return null;cacheKey=this._getPathname(cacheKey,ctx.kind===types_IncrementalCacheKind.FETCH);let cacheData=await (null==(_this_cacheHandler=this.cacheHandler)?void 0:_this_cacheHandler.get(cacheKey,ctx));if(ctx.kind===types_IncrementalCacheKind.FETCH){if(!cacheData)return null;if((null==(_cacheData_value1=cacheData.value)?void 0:_cacheData_value1.kind)!==types_CachedRouteKind.FETCH)throw Object.defineProperty(new InvariantError(`Expected cached value for cache key ${JSON.stringify(cacheKey)} to be a "FETCH" kind, got ${JSON.stringify(null==(_cacheData_value2=cacheData.value)?void 0:_cacheData_value2.kind)} instead.`),"__NEXT_ERROR_CODE",{value:"E653",enumerable:!1,configurable:!0});let workStore=work_async_storage_external_js_namespaceObject.workAsyncStorage.getStore(),combinedTags=[...ctx.tags||[],...ctx.softTags||[]];if(combinedTags.some(tag=>{var _this_revalidatedTags,_workStore_pendingRevalidatedTags;return(null==(_this_revalidatedTags=this.revalidatedTags)?void 0:_this_revalidatedTags.includes(tag))||(null==workStore||null==(_workStore_pendingRevalidatedTags=workStore.pendingRevalidatedTags)?void 0:_workStore_pendingRevalidatedTags.some(item=>item.tag===tag))}))return IncrementalCache.debug&&console.log("IncrementalCache: expired tag",cacheKey),null;let workUnitStore=work_unit_async_storage_external_js_namespaceObject.workUnitAsyncStorage.getStore();if(workUnitStore){let prerenderResumeDataCache=(0,work_unit_async_storage_external_js_namespaceObject.getPrerenderResumeDataCache)(workUnitStore);prerenderResumeDataCache&&(IncrementalCache.debug&&console.log("IncrementalCache: rdc:set",cacheKey),prerenderResumeDataCache.fetch.set(cacheKey,cacheData.value))}let revalidate=ctx.revalidate||cacheData.value.revalidate,isStale=(performance.timeOrigin+performance.now()-(cacheData.lastModified||0))/1e3>revalidate,data=cacheData.value.data;return(0,tags_manifest_external_js_namespaceObject.areTagsExpired)(combinedTags,cacheData.lastModified)?null:((0,tags_manifest_external_js_namespaceObject.areTagsStale)(combinedTags,cacheData.lastModified)&&(isStale=!0),{isStale,value:{kind:types_CachedRouteKind.FETCH,data,revalidate}})}if((null==cacheData||null==(_cacheData_value=cacheData.value)?void 0:_cacheData_value.kind)===types_CachedRouteKind.FETCH)throw Object.defineProperty(new InvariantError(`Expected cached value for cache key ${JSON.stringify(cacheKey)} not to be a ${JSON.stringify(ctx.kind)} kind, got "FETCH" instead.`),"__NEXT_ERROR_CODE",{value:"E652",enumerable:!1,configurable:!0});let entry=null,cacheControl=this.cacheControls.get(toRoute(cacheKey));if((null==cacheData?void 0:cacheData.lastModified)===-1)isStale=-1,revalidateAfter=-1*constants.CACHE_ONE_YEAR;else{let now=performance.timeOrigin+performance.now(),lastModified=(null==cacheData?void 0:cacheData.lastModified)||now;if(void 0===(isStale=!1!==(revalidateAfter=this.calculateRevalidate(cacheKey,lastModified,this.dev??!1,ctx.isFallback))&&revalidateAfter<now||void 0)&&((null==cacheData||null==(_cacheData_value3=cacheData.value)?void 0:_cacheData_value3.kind)===types_CachedRouteKind.APP_PAGE||(null==cacheData||null==(_cacheData_value4=cacheData.value)?void 0:_cacheData_value4.kind)===types_CachedRouteKind.APP_ROUTE)){let tagsHeader=null==(_cacheData_value_headers=cacheData.value.headers)?void 0:_cacheData_value_headers[constants.NEXT_CACHE_TAGS_HEADER];if("string"==typeof tagsHeader){let cacheTags=tagsHeader.split(",");cacheTags.length>0&&((0,tags_manifest_external_js_namespaceObject.areTagsExpired)(cacheTags,lastModified)?isStale=-1:(0,tags_manifest_external_js_namespaceObject.areTagsStale)(cacheTags,lastModified)&&(isStale=!0))}}}return cacheData&&(entry={isStale,cacheControl,revalidateAfter,value:cacheData.value}),!cacheData&&this.prerenderManifest.notFoundRoutes.includes(cacheKey)&&(entry={isStale,value:null,cacheControl,revalidateAfter},this.set(cacheKey,entry.value,{...ctx,cacheControl})),entry}async set(pathname,data,ctx){if((null==data?void 0:data.kind)===types_CachedRouteKind.FETCH){let workUnitStore=work_unit_async_storage_external_js_namespaceObject.workUnitAsyncStorage.getStore(),prerenderResumeDataCache=workUnitStore?(0,work_unit_async_storage_external_js_namespaceObject.getPrerenderResumeDataCache)(workUnitStore):null;prerenderResumeDataCache&&(IncrementalCache.debug&&console.log("IncrementalCache: rdc:set",pathname),prerenderResumeDataCache.fetch.set(pathname,data))}if(this.disableForTestmode||this.dev&&!ctx.fetchCache)return;pathname=this._getPathname(pathname,ctx.fetchCache);let itemSize=JSON.stringify(data).length;if(ctx.fetchCache&&itemSize>2097152&&!this.hasCustomCacheHandler&&!ctx.isImplicitBuildTimeCache){let warningText=`Failed to set Next.js data cache for ${ctx.fetchUrl||pathname}, items over 2MB can not be cached (${itemSize} bytes)`;if(this.dev)throw Object.defineProperty(Error(warningText),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});console.warn(warningText);return}try{var _this_cacheHandler;!ctx.fetchCache&&ctx.cacheControl&&this.cacheControls.set(toRoute(pathname),ctx.cacheControl),await (null==(_this_cacheHandler=this.cacheHandler)?void 0:_this_cacheHandler.set(pathname,data,ctx))}catch(error){console.warn("Failed to update prerender cache for",pathname,error)}}}class LRUNode{constructor(key,data,size){this.prev=null,this.next=null,this.key=key,this.data=data,this.size=size}}class SentinelNode{constructor(){this.prev=null,this.next=null}}class LRUCache{constructor(maxSize,calculateSize){this.cache=new Map,this.totalSize=0,this.maxSize=maxSize,this.calculateSize=calculateSize,this.head=new SentinelNode,this.tail=new SentinelNode,this.head.next=this.tail,this.tail.prev=this.head}addToHead(node){node.prev=this.head,node.next=this.head.next,this.head.next.prev=node,this.head.next=node}removeNode(node){node.prev.next=node.next,node.next.prev=node.prev}moveToHead(node){this.removeNode(node),this.addToHead(node)}removeTail(){let lastNode=this.tail.prev;return this.removeNode(lastNode),lastNode}set(key,value){let size=(null==this.calculateSize?void 0:this.calculateSize.call(this,value))??1;if(size>this.maxSize)return void console.warn("Single item size exceeds maxSize");let existing=this.cache.get(key);if(existing)existing.data=value,this.totalSize=this.totalSize-existing.size+size,existing.size=size,this.moveToHead(existing);else{let newNode=new LRUNode(key,value,size);this.cache.set(key,newNode),this.addToHead(newNode),this.totalSize+=size}for(;this.totalSize>this.maxSize&&this.cache.size>0;){let tail=this.removeTail();this.cache.delete(tail.key),this.totalSize-=tail.size}}has(key){return this.cache.has(key)}get(key){let node=this.cache.get(key);if(node)return this.moveToHead(node),node.data}*[Symbol.iterator](){let current=this.head.next;for(;current&&current!==this.tail;){let node=current;yield[node.key,node.data],current=current.next}}remove(key){let node=this.cache.get(key);node&&(this.removeNode(node),this.cache.delete(key),this.totalSize-=node.size)}get size(){return this.cache.size}get currentSize(){return this.totalSize}}function createDefaultCacheHandler(maxSize){if(0===maxSize)return{get:()=>Promise.resolve(void 0),set:()=>Promise.resolve(),refreshTags:()=>Promise.resolve(),getExpiration:()=>Promise.resolve(0),updateTags:()=>Promise.resolve()};let memoryCache=new LRUCache(maxSize,entry=>entry.size),pendingSets=new Map,debug=process.env.NEXT_PRIVATE_DEBUG_CACHE?console.debug.bind(console,"DefaultCacheHandler:"):void 0;return{async get(cacheKey){let pendingPromise=pendingSets.get(cacheKey);pendingPromise&&(null==debug||debug("get",cacheKey,"pending"),await pendingPromise);let privateEntry=memoryCache.get(cacheKey);if(!privateEntry){null==debug||debug("get",cacheKey,"not found");return}let entry=privateEntry.entry;if(performance.timeOrigin+performance.now()>entry.timestamp+1e3*entry.revalidate){null==debug||debug("get",cacheKey,"expired");return}let revalidate=entry.revalidate;if((0,tags_manifest_external_js_namespaceObject.areTagsExpired)(entry.tags,entry.timestamp)){null==debug||debug("get",cacheKey,"had expired tag");return}(0,tags_manifest_external_js_namespaceObject.areTagsStale)(entry.tags,entry.timestamp)&&(null==debug||debug("get",cacheKey,"had stale tag"),revalidate=-1);let[returnStream,newSaved]=entry.value.tee();return entry.value=newSaved,null==debug||debug("get",cacheKey,"found",{tags:entry.tags,timestamp:entry.timestamp,expire:entry.expire,revalidate}),{...entry,revalidate,value:returnStream}},async set(cacheKey,pendingEntry){null==debug||debug("set",cacheKey,"start");let resolvePending=()=>{},pendingPromise=new Promise(resolve=>{resolvePending=resolve});pendingSets.set(cacheKey,pendingPromise);let entry=await pendingEntry,size=0;try{let[value,clonedValue]=entry.value.tee();entry.value=value;let reader=clonedValue.getReader();for(let chunk;!(chunk=await reader.read()).done;)size+=Buffer.from(chunk.value).byteLength;memoryCache.set(cacheKey,{entry,isErrored:!1,errorRetryCount:0,size}),null==debug||debug("set",cacheKey,"done")}catch(err){null==debug||debug("set",cacheKey,"failed",err)}finally{resolvePending(),pendingSets.delete(cacheKey)}},async refreshTags(){},async getExpiration(tags){let expiration=Math.max(...tags.map(tag=>{let entry=tags_manifest_external_js_namespaceObject.tagsManifest.get(tag);return entry&&entry.expired||0}),0);return null==debug||debug("getExpiration",{tags,expiration}),expiration},async updateTags(tags,durations){let now=Math.round(performance.timeOrigin+performance.now());for(let tag of(null==debug||debug("updateTags",{tags,timestamp:now}),tags)){let existingEntry=tags_manifest_external_js_namespaceObject.tagsManifest.get(tag)||{};if(durations){let updates={...existingEntry};updates.stale=now,void 0!==durations.expire&&(updates.expired=now+1e3*durations.expire),tags_manifest_external_js_namespaceObject.tagsManifest.set(tag,updates)}else tags_manifest_external_js_namespaceObject.tagsManifest.set(tag,{...existingEntry,expired:now})}}}}let handlers_debug=process.env.NEXT_PRIVATE_DEBUG_CACHE?(message,...args)=>{console.log(`use-cache: ${message}`,...args)}:void 0,handlersSymbol=Symbol.for("@next/cache-handlers"),handlersMapSymbol=Symbol.for("@next/cache-handlers-map"),handlersSetSymbol=Symbol.for("@next/cache-handlers-set"),handlers_reference=globalThis;function interopDefault(mod){return mod.default||mod}let RouterServerContextSymbol=Symbol.for("@next/router-server-methods"),routerServerGlobal=globalThis;function isInterceptionRouteRewrite(route){var _route_has_,_route_has;return(null==(_route_has=route.has)||null==(_route_has_=_route_has[0])?void 0:_route_has_.key)==="next-url"}let dynamicImportEsmDefault=id=>import(id).then(mod=>mod.default||mod);class RouteModule{constructor({userland,definition,distDir,relativeProjectDir}){this.userland=userland,this.definition=definition,this.isDev=!0,this.distDir=distDir,this.relativeProjectDir=relativeProjectDir}async instrumentationOnRequestError(req,...args){{let{join}=__webpack_require__("node:path"),absoluteProjectDir=join(process.cwd(),getRequestMeta(req,"relativeProjectDir")||this.relativeProjectDir),{instrumentationOnRequestError}=await Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,"../lib/router-utils/instrumentation-globals.external.js",23));return instrumentationOnRequestError(absoluteProjectDir,this.distDir,...args)}}loadManifests(srcPage,projectDir){let result;{var _clientReferenceManifest___RSC_MANIFEST,route;let pathname;if(!projectDir)throw Object.defineProperty(Error("Invariant: projectDir is required for node runtime"),"__NEXT_ERROR_CODE",{value:"E718",enumerable:!1,configurable:!0});let{loadManifestFromRelativePath}=__webpack_require__("../load-manifest.external");normalizePagePath(srcPage);let router=this.definition.kind===route_kind_RouteKind.PAGES||this.definition.kind===route_kind_RouteKind.PAGES_API?"pages":"app",[routesManifest,prerenderManifest,buildManifest,fallbackBuildManifest,reactLoadableManifest,nextFontManifest,clientReferenceManifest,serverActionsManifest,subresourceIntegrityManifest,serverFilesManifest,buildId,dynamicCssManifest]=[loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:"routes-manifest.json",shouldCache:!this.isDev}),loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:"prerender-manifest.json",shouldCache:!this.isDev}),loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:BUILD_MANIFEST,shouldCache:!this.isDev}),"/_error"===srcPage?loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:`fallback-${BUILD_MANIFEST}`,shouldCache:!this.isDev,handleMissing:!0}):{},loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:"react-loadable-manifest.json",handleMissing:!0,shouldCache:!this.isDev}),loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:"server/next-font-manifest.json",shouldCache:!this.isDev}),"app"!==router||(pathname=(route=srcPage).replace(/\/route$/,""),route.endsWith("/route")&&function(appDirRelativePath,pageExtensions,strictlyMatchExtensions){if(!appDirRelativePath||appDirRelativePath.length<2)return!1;let normalizedPath=appDirRelativePath.replace(/\\/g,"/"),fastResult=!!(FAVICON_REGEX.test(normalizedPath)||ROBOTS_TXT_REGEX.test(normalizedPath)||MANIFEST_JSON_REGEX.test(normalizedPath)||MANIFEST_WEBMANIFEST_REGEX.test(normalizedPath)||SITEMAP_XML_REGEX.test(normalizedPath))||(!!normalizedPath.includes("robots")||!!normalizedPath.includes("manifest")||!!normalizedPath.includes("sitemap")||!!normalizedPath.includes("icon")||!!normalizedPath.includes("apple-icon")||!!normalizedPath.includes("opengraph-image")||!!normalizedPath.includes("twitter-image")||!!normalizedPath.includes("favicon"))&&null;if(null!==fastResult)return fastResult;let regexes=function(pageExtensions,strictlyMatchExtensions){let cacheKey=`${pageExtensions.join(",")}|${strictlyMatchExtensions}`,cached=compiledRegexCache.get(cacheKey);if(cached)return cached;let trailingMatcher=strictlyMatchExtensions?"$":"?$",suffixMatcher="\\d?"+(strictlyMatchExtensions?"":"(-\\w{6})?"),robotsExts=pageExtensions.length>0?[...pageExtensions,"txt"]:["txt"],manifestExts=pageExtensions.length>0?[...pageExtensions,"webmanifest","json"]:["webmanifest","json"],regexes=[RegExp(`^[\\\\/]robots${getExtensionRegexString(robotsExts,null)}${trailingMatcher}`),RegExp(`^[\\\\/]manifest${getExtensionRegexString(manifestExts,null)}${trailingMatcher}`),RegExp(`[\\\\/]sitemap${getExtensionRegexString(["xml"],pageExtensions)}${trailingMatcher}`),RegExp(`[\\\\/]icon${suffixMatcher}${getExtensionRegexString(STATIC_METADATA_IMAGES_icon_extensions,pageExtensions)}${trailingMatcher}`),RegExp(`[\\\\/]apple-icon${suffixMatcher}${getExtensionRegexString(STATIC_METADATA_IMAGES_apple_extensions,pageExtensions)}${trailingMatcher}`),RegExp(`[\\\\/]opengraph-image${suffixMatcher}${getExtensionRegexString(STATIC_METADATA_IMAGES_openGraph_extensions,pageExtensions)}${trailingMatcher}`),RegExp(`[\\\\/]twitter-image${suffixMatcher}${getExtensionRegexString(STATIC_METADATA_IMAGES_twitter_extensions,pageExtensions)}${trailingMatcher}`)];return compiledRegexCache.set(cacheKey,regexes),regexes}(pageExtensions,strictlyMatchExtensions);for(let i=0;i<regexes.length;i++)if(regexes[i].test(normalizedPath))return!0;return!1}(pathname,[],!0)&&"/robots.txt"!==pathname&&"/manifest.webmanifest"!==pathname&&!pathname.endsWith("/sitemap.xml"))?void 0:loadManifestFromRelativePath({distDir:this.distDir,projectDir,useEval:!0,handleMissing:!0,manifest:`server/app${srcPage.replace(/%5F/g,"_")+"_client-reference-manifest"}.js`,shouldCache:!this.isDev}),"app"===router?loadManifestFromRelativePath({distDir:this.distDir,projectDir,manifest:"server/server-reference-manifest.json",handleMissing:!0,shouldCache:!this.isDev}):{},loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:"server/subresource-integrity-manifest.json",handleMissing:!0,shouldCache:!this.isDev}),this.isDev?void 0:loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:"required-server-files.json"}),this.isDev?"development":loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:"BUILD_ID",skipParse:!0}),loadManifestFromRelativePath({projectDir,distDir:this.distDir,manifest:"dynamic-css-manifest",handleMissing:!0})];result={buildId,buildManifest,fallbackBuildManifest,routesManifest,nextFontManifest,prerenderManifest,serverFilesManifest,reactLoadableManifest,clientReferenceManifest:null==clientReferenceManifest||null==(_clientReferenceManifest___RSC_MANIFEST=clientReferenceManifest.__RSC_MANIFEST)?void 0:_clientReferenceManifest___RSC_MANIFEST[srcPage.replace(/%5F/g,"_")],serverActionsManifest,subresourceIntegrityManifest,dynamicCssManifest,interceptionRoutePatterns:routesManifest.rewrites.beforeFiles.filter(isInterceptionRouteRewrite).map(rewrite=>new RegExp(rewrite.regex))}}return result}async loadCustomCacheHandlers(req,nextConfig){{let{cacheMaxMemorySize,cacheHandlers}=nextConfig;if(!cacheHandlers||!function(cacheMaxMemorySize){if(handlers_reference[handlersMapSymbol])return null==handlers_debug||handlers_debug("cache handlers already initialized"),!1;if(null==handlers_debug||handlers_debug("initializing cache handlers"),handlers_reference[handlersMapSymbol]=new Map,handlers_reference[handlersSymbol]){let fallback;handlers_reference[handlersSymbol].DefaultCache?(null==handlers_debug||handlers_debug('setting "default" cache handler from symbol'),fallback=handlers_reference[handlersSymbol].DefaultCache):(null==handlers_debug||handlers_debug('setting "default" cache handler from default'),fallback=createDefaultCacheHandler(cacheMaxMemorySize)),handlers_reference[handlersMapSymbol].set("default",fallback),handlers_reference[handlersSymbol].RemoteCache?(null==handlers_debug||handlers_debug('setting "remote" cache handler from symbol'),handlers_reference[handlersMapSymbol].set("remote",handlers_reference[handlersSymbol].RemoteCache)):(null==handlers_debug||handlers_debug('setting "remote" cache handler from default'),handlers_reference[handlersMapSymbol].set("remote",fallback))}else{let handler=createDefaultCacheHandler(cacheMaxMemorySize);null==handlers_debug||handlers_debug('setting "default" cache handler from default'),handlers_reference[handlersMapSymbol].set("default",handler),null==handlers_debug||handlers_debug('setting "remote" cache handler from default'),handlers_reference[handlersMapSymbol].set("remote",handler)}return handlers_reference[handlersSetSymbol]=new Set(handlers_reference[handlersMapSymbol].values()),!0}(cacheMaxMemorySize))return;for(let[kind,handler]of Object.entries(cacheHandlers)){if(!handler)continue;let{formatDynamicImportPath}=__webpack_require__("./dist/esm/lib/format-dynamic-import-path.js"),{join}=__webpack_require__("node:path"),absoluteProjectDir=join(process.cwd(),getRequestMeta(req,"relativeProjectDir")||this.relativeProjectDir);var cacheHandler=interopDefault(await dynamicImportEsmDefault(formatDynamicImportPath(`${absoluteProjectDir}/${this.distDir}`,handler)));if(!handlers_reference[handlersMapSymbol]||!handlers_reference[handlersSetSymbol])throw Object.defineProperty(Error("Cache handlers not initialized"),"__NEXT_ERROR_CODE",{value:"E649",enumerable:!1,configurable:!0});null==handlers_debug||handlers_debug('setting cache handler for "%s"',kind),handlers_reference[handlersMapSymbol].set(kind,cacheHandler),handlers_reference[handlersSetSymbol].add(cacheHandler)}}}async getIncrementalCache(req,nextConfig,prerenderManifest,isMinimalMode){{let CacheHandler,{cacheHandler}=nextConfig;if(cacheHandler){let{formatDynamicImportPath}=__webpack_require__("./dist/esm/lib/format-dynamic-import-path.js");CacheHandler=interopDefault(await dynamicImportEsmDefault(formatDynamicImportPath(this.distDir,cacheHandler)))}let{join}=__webpack_require__("node:path"),projectDir=join(process.cwd(),getRequestMeta(req,"relativeProjectDir")||this.relativeProjectDir);await this.loadCustomCacheHandlers(req,nextConfig);let incrementalCache=new IncrementalCache({fs:__webpack_require__("./dist/esm/server/lib/node-fs-methods.js").nodeFs,dev:this.isDev,requestHeaders:req.headers,allowedRevalidateHeaderKeys:nextConfig.experimental.allowedRevalidateHeaderKeys,minimalMode:isMinimalMode,serverDistDir:`${projectDir}/${this.distDir}/server`,fetchCacheKeyPrefix:nextConfig.experimental.fetchCacheKeyPrefix,maxMemoryCacheSize:nextConfig.cacheMaxMemorySize,flushToDisk:!isMinimalMode&&nextConfig.experimental.isrFlushToDisk,getPrerenderManifest:()=>prerenderManifest,CurCacheHandler:CacheHandler});return globalThis.__incrementalCache=incrementalCache,incrementalCache}}async onRequestError(req,err,errorContext,silenceLog,routerServerContext){silenceLog||((null==routerServerContext?void 0:routerServerContext.logErrorWithOriginalStack)?routerServerContext.logErrorWithOriginalStack(err,"app-dir"):console.error(err)),await this.instrumentationOnRequestError(req,err,{path:req.url||"/",headers:req.headers,method:req.method||"GET"},errorContext)}getNextConfigEdge(req){throw Object.defineProperty(Error("Invariant: getNextConfigEdge must only be called in edge runtime"),"__NEXT_ERROR_CODE",{value:"E968",enumerable:!1,configurable:!0})}async prepare(req,res,{srcPage,multiZoneDraftMode}){var _routerServerGlobal_RouterServerContextSymbol,_nextConfig_experimental,value;let absoluteProjectDir,localeResult,detectedLocale,previewData,deploymentId,meta;{let{join,relative}=__webpack_require__("node:path");absoluteProjectDir=join(process.cwd(),getRequestMeta(req,"relativeProjectDir")||this.relativeProjectDir);let absoluteDistDir=getRequestMeta(req,"distDir");absoluteDistDir&&(this.distDir=relative(absoluteProjectDir,absoluteDistDir));let{ensureInstrumentationRegistered}=await Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,"../lib/router-utils/instrumentation-globals.external.js",23));ensureInstrumentationRegistered(absoluteProjectDir,this.distDir)}let manifests=await this.loadManifests(srcPage,absoluteProjectDir),{routesManifest,prerenderManifest,serverFilesManifest}=manifests,{basePath,i18n,rewrites}=routesManifest;basePath&&(req.url=removePathPrefix(req.url||"/",basePath));let parsedUrl=parseReqUrl(req.url||"/");if(!parsedUrl)return;let isNextDataRequest=!1;pathHasPrefix(parsedUrl.pathname||"/","/_next/data")&&(isNextDataRequest=!0,parsedUrl.pathname=normalizeDataPath(parsedUrl.pathname||"/"));let originalPathname=parsedUrl.pathname||"/",originalQuery={...parsedUrl.query},pageIsDynamic=isDynamicRoute(srcPage);i18n&&(localeResult=normalizeLocalePath(parsedUrl.pathname||"/",i18n.locales)).detectedLocale&&(req.url=`${localeResult.pathname}${parsedUrl.search}`,originalPathname=localeResult.pathname,detectedLocale||(detectedLocale=localeResult.detectedLocale));let normalizedSrcPage=normalizeAppPath(srcPage),serverUtils=function({page,i18n,basePath,rewrites,pageIsDynamic,trailingSlash,caseSensitive}){let defaultRouteRegex,dynamicRouteMatcher,defaultRouteMatches;if(pageIsDynamic){var options;let result,namedRegex;namedRegex=(result=function(route,prefixRouteKeys,includeSuffix,includePrefix,backreferenceDuplicateKeys,reference={names:{},intercepted:{}}){let i,getSafeRouteKey=(i=0,()=>{let routeKey="",j=++i;for(;j>0;)routeKey+=String.fromCharCode(97+(j-1)%26),j=Math.floor((j-1)/26);return routeKey}),routeKeys={},segments=[],inverseParts=[];for(let segment of(reference=structuredClone(reference),removeTrailingSlash(route).slice(1).split("/"))){let keyPrefix,hasInterceptionMarker=INTERCEPTION_ROUTE_MARKERS.some(m=>segment.startsWith(m)),paramMatches=segment.match(PARAMETER_PATTERN),interceptionMarker=hasInterceptionMarker?paramMatches?.[1]:void 0;if(interceptionMarker&&paramMatches?.[2]?(keyPrefix=prefixRouteKeys?constants.NEXT_INTERCEPTION_MARKER_PREFIX:void 0,reference.intercepted[paramMatches[2]]=interceptionMarker):keyPrefix=paramMatches?.[2]&&reference.intercepted[paramMatches[2]]?prefixRouteKeys?constants.NEXT_INTERCEPTION_MARKER_PREFIX:void 0:prefixRouteKeys?constants.NEXT_QUERY_PARAM_PREFIX:void 0,interceptionMarker&&paramMatches&&paramMatches[2]){let{key,pattern,cleanedKey,repeat,optional}=getSafeKeyFromSegment({getSafeRouteKey,interceptionMarker,segment:paramMatches[2],routeKeys,keyPrefix,backreferenceDuplicateKeys});segments.push(pattern),inverseParts.push(`/${paramMatches[1]}:${reference.names[key]??cleanedKey}${repeat?optional?"*":"+":""}`),reference.names[key]??=cleanedKey}else if(paramMatches&&paramMatches[2]){includePrefix&&paramMatches[1]&&(segments.push(`/${escapeStringRegexp(paramMatches[1])}`),inverseParts.push(`/${paramMatches[1]}`));let{key,pattern,cleanedKey,repeat,optional}=getSafeKeyFromSegment({getSafeRouteKey,segment:paramMatches[2],routeKeys,keyPrefix,backreferenceDuplicateKeys}),s=pattern;includePrefix&&paramMatches[1]&&(s=s.substring(1)),segments.push(s),inverseParts.push(`/:${reference.names[key]??cleanedKey}${repeat?optional?"*":"+":""}`),reference.names[key]??=cleanedKey}else segments.push(`/${escapeStringRegexp(segment)}`),inverseParts.push(`/${segment}`);includeSuffix&&paramMatches&&paramMatches[3]&&(segments.push(escapeStringRegexp(paramMatches[3])),inverseParts.push(paramMatches[3]))}return{namedParameterizedRoute:segments.join(""),routeKeys,pathToRegexpPattern:inverseParts.join(""),reference}}(page,(options={prefixRouteKeys:!1}).prefixRouteKeys,options.includeSuffix??!1,options.includePrefix??!1,options.backreferenceDuplicateKeys??!1,options.reference)).namedParameterizedRoute,options.excludeOptionalTrailingSlash||(namedRegex+="(?:/)?"),defaultRouteMatches=(dynamicRouteMatcher=getRouteMatcher(defaultRouteRegex={...function(normalizedRoute,{includeSuffix=!1,includePrefix=!1,excludeOptionalTrailingSlash=!1}={}){let{parameterizedRoute,groups}=function(route,includeSuffix,includePrefix){let groups={},groupIndex=1,segments=[];for(let segment of removeTrailingSlash(route).slice(1).split("/")){let markerMatch=INTERCEPTION_ROUTE_MARKERS.find(m=>segment.startsWith(m)),paramMatches=segment.match(PARAMETER_PATTERN);if(markerMatch&&paramMatches&&paramMatches[2]){let{key,optional,repeat}=parseMatchedParameter(paramMatches[2]);groups[key]={pos:groupIndex++,repeat,optional},segments.push(`/${escapeStringRegexp(markerMatch)}([^/]+?)`)}else if(paramMatches&&paramMatches[2]){let{key,repeat,optional}=parseMatchedParameter(paramMatches[2]);groups[key]={pos:groupIndex++,repeat,optional},includePrefix&&paramMatches[1]&&segments.push(`/${escapeStringRegexp(paramMatches[1])}`);let s=repeat?optional?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)";includePrefix&&paramMatches[1]&&(s=s.substring(1)),segments.push(s)}else segments.push(`/${escapeStringRegexp(segment)}`);includeSuffix&&paramMatches&&paramMatches[3]&&segments.push(escapeStringRegexp(paramMatches[3]))}return{parameterizedRoute:segments.join(""),groups}}(normalizedRoute,includeSuffix,includePrefix),re=parameterizedRoute;return excludeOptionalTrailingSlash||(re+="(?:/)?"),{re:RegExp(`^${re}$`),groups:groups}}(page,options),namedRegex:`^${namedRegex}$`,routeKeys:result.routeKeys,pathToRegexpPattern:result.pathToRegexpPattern,reference:result.reference}))(page)}return{handleRewrites:function(req,parsedUrl){let rewrittenParsedUrl=structuredClone(parsedUrl),rewriteParams={},fsPathname=rewrittenParsedUrl.pathname,checkRewrite=rewrite=>{var path,options;let keys,regexp,matcher,matcher1=(path=rewrite.source+(trailingSlash?"(/)?":""),options={removeUnnamedParams:!0,strict:!0,sensitive:!!caseSensitive},keys=[],regexp=(0,path_to_regexp.pathToRegexp)(path,keys,{delimiter:"/",sensitive:"boolean"==typeof options?.sensitive&&options.sensitive,strict:options?.strict}),matcher=(0,path_to_regexp.regexpToFunction)(options?.regexModifier?new RegExp(options.regexModifier(regexp.source),regexp.flags):regexp,keys),(pathname,params)=>{if("string"!=typeof pathname)return!1;let match=matcher(pathname);if(!match)return!1;if(options?.removeUnnamedParams)for(let key of keys)"number"==typeof key.name&&delete match.params[key.name];return{...params,...match.params}});if(!rewrittenParsedUrl.pathname)return!1;let params=matcher1(rewrittenParsedUrl.pathname);if((rewrite.has||rewrite.missing)&&params){let hasParams=function(req,query,has=[],missing=[]){let params={},hasMatch=hasItem=>{let value,key=hasItem.key;switch(hasItem.type){case"header":key=key.toLowerCase(),value=req.headers[key];break;case"cookie":value="cookies"in req?req.cookies[hasItem.key]:getCookieParser(req.headers)()[hasItem.key];break;case"query":value=query[key];break;case"host":{let{host}=req?.headers||{};value=host?.split(":",1)[0].toLowerCase()}}if(!hasItem.value&&value)return params[function(paramName){let newParamName="";for(let i=0;i<paramName.length;i++){let charCode=paramName.charCodeAt(i);(charCode>64&&charCode<91||charCode>96&&charCode<123)&&(newParamName+=paramName[i])}return newParamName}(key)]=value,!0;if(value){let matcher=RegExp(`^${hasItem.value}$`),matches=Array.isArray(value)?value.slice(-1)[0].match(matcher):value.match(matcher);if(matches)return Array.isArray(matches)&&(matches.groups?Object.keys(matches.groups).forEach(groupKey=>{params[groupKey]=matches.groups[groupKey]}):"host"===hasItem.type&&matches[0]&&(params.host=matches[0])),!0}return!1};return!(!has.every(item=>hasMatch(item))||missing.some(item=>hasMatch(item)))&&params}(req,rewrittenParsedUrl.query,rewrite.has,rewrite.missing);hasParams?Object.assign(params,hasParams):params=!1}if(params){let{parsedDestination,destQuery}=function(args){let destHostnameCompiler,newUrl,parsedDestination=function(args){let escaped=args.destination;for(let param of Object.keys({...args.params,...args.query}))param&&(escaped=escaped.replace(RegExp(`:${escapeStringRegexp(param)}`,"g"),`__ESC_COLON_${param}`));let parsed=function(url){if(url.startsWith("/"))return function(url,base,parseQuery=!0){let globalBase=new URL("http://n"),resolvedBase=url.startsWith(".")?new URL("http://n"):globalBase,{pathname,searchParams,search,hash,href,origin}=new URL(url,resolvedBase);if(origin!==globalBase.origin)throw Object.defineProperty(Error(`invariant: invalid relative URL, router received ${url}`),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{pathname,query:parseQuery?searchParamsToUrlQuery(searchParams):void 0,search,hash,href:href.slice(origin.length),slashes:void 0}}(url);let parsedURL=new URL(url);return{hash:parsedURL.hash,hostname:parsedURL.hostname,href:parsedURL.href,pathname:parsedURL.pathname,port:parsedURL.port,protocol:parsedURL.protocol,query:searchParamsToUrlQuery(parsedURL.searchParams),search:parsedURL.search,origin:parsedURL.origin,slashes:"//"===parsedURL.href.slice(parsedURL.protocol.length,parsedURL.protocol.length+2)}}(escaped),pathname=parsed.pathname;pathname&&(pathname=unescapeSegments(pathname));let href=parsed.href;href&&(href=unescapeSegments(href));let hostname=parsed.hostname;hostname&&(hostname=unescapeSegments(hostname));let hash=parsed.hash;hash&&(hash=unescapeSegments(hash));let search=parsed.search;search&&(search=unescapeSegments(search));let origin=parsed.origin;return origin&&(origin=unescapeSegments(origin)),{...parsed,pathname,hostname,href,hash,search,origin}}(args),{hostname:destHostname,query:destQuery,search:destSearch}=parsedDestination,destPath=parsedDestination.pathname;parsedDestination.hash&&(destPath=`${destPath}${parsedDestination.hash}`);let destParams=[],destPathParamKeys=[];for(let key of(safePathToRegexp(destPath,destPathParamKeys),destPathParamKeys))destParams.push(key.name);if(destHostname){let destHostnameParamKeys=[];for(let key of(safePathToRegexp(destHostname,destHostnameParamKeys),destHostnameParamKeys))destParams.push(key.name)}let destPathCompiler=safeCompile(destPath,{validate:!1});for(let[key,strOrArray]of(destHostname&&(destHostnameCompiler=safeCompile(destHostname,{validate:!1})),Object.entries(destQuery)))Array.isArray(strOrArray)?destQuery[key]=strOrArray.map(value=>compileNonPath(unescapeSegments(value),args.params)):"string"==typeof strOrArray&&(destQuery[key]=compileNonPath(unescapeSegments(strOrArray),args.params));let paramKeys=Object.keys(args.params).filter(name=>"nextInternalLocale"!==name);if(args.appendParamsToQuery&&!paramKeys.some(key=>destParams.includes(key)))for(let key of paramKeys)key in destQuery||(destQuery[key]=args.params[key]);if(isInterceptionRouteAppPath(destPath))for(let segment of destPath.split("/")){let marker=INTERCEPTION_ROUTE_MARKERS.find(m=>segment.startsWith(m));if(marker){"(..)(..)"===marker?(args.params["0"]="(..)",args.params["1"]="(..)"):args.params["0"]=marker;break}}try{let[pathname,hash]=(newUrl=destPathCompiler(args.params)).split("#",2);destHostnameCompiler&&(parsedDestination.hostname=destHostnameCompiler(args.params)),parsedDestination.pathname=pathname,parsedDestination.hash=`${hash?"#":""}${hash||""}`,parsedDestination.search=destSearch?compileNonPath(destSearch,args.params):""}catch(err){if(err.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 err}return parsedDestination.query={...args.query,...parsedDestination.query},{newUrl,destQuery,parsedDestination}}({appendParamsToQuery:!0,destination:rewrite.destination,params:params,query:rewrittenParsedUrl.query});if(parsedDestination.protocol)return!0;if(Object.assign(rewriteParams,destQuery,params),Object.assign(rewrittenParsedUrl.query,parsedDestination.query),delete parsedDestination.query,Object.assign(rewrittenParsedUrl,parsedDestination),!(fsPathname=rewrittenParsedUrl.pathname))return!1;if(basePath&&(fsPathname=fsPathname.replace(RegExp(`^${basePath}`),"")||"/"),i18n){let result=normalizeLocalePath(fsPathname,i18n.locales);fsPathname=result.pathname,rewrittenParsedUrl.query.nextInternalLocale=result.detectedLocale||params.nextInternalLocale}if(fsPathname===page)return!0;if(pageIsDynamic&&dynamicRouteMatcher){let dynamicParams=dynamicRouteMatcher(fsPathname);if(dynamicParams)return rewrittenParsedUrl.query={...rewrittenParsedUrl.query,...dynamicParams},!0}}return!1};for(let rewrite of rewrites.beforeFiles||[])checkRewrite(rewrite);if(fsPathname!==page){let fsPathnameNoSlash,finished=!1;for(let rewrite of rewrites.afterFiles||[])if(finished=checkRewrite(rewrite))break;if(!finished&&!((fsPathnameNoSlash=removeTrailingSlash(fsPathname||""))===removeTrailingSlash(page)||(null==dynamicRouteMatcher?void 0:dynamicRouteMatcher(fsPathnameNoSlash)))){for(let rewrite of rewrites.fallback||[])if(finished=checkRewrite(rewrite))break}}return{rewriteParams,rewrittenParsedUrl}},defaultRouteRegex,dynamicRouteMatcher,defaultRouteMatches,normalizeQueryParams:function(query,routeParamKeys){for(let[key,value]of(delete query.nextInternalLocale,Object.entries(query))){let normalizedKey=normalizeNextQueryParam(key);normalizedKey&&(delete query[key],routeParamKeys.add(normalizedKey),void 0!==value&&(query[normalizedKey]=Array.isArray(value)?value.map(v=>decodeQueryPathParameter(v)):decodeQueryPathParameter(value)))}},getParamsFromRouteMatches:function(routeMatchesHeader){if(!defaultRouteRegex)return null;let{groups,routeKeys}=defaultRouteRegex,routeMatches=getRouteMatcher({re:{exec:str=>{let obj=Object.fromEntries(new URLSearchParams(str));for(let[key,value]of Object.entries(obj)){let normalizedKey=normalizeNextQueryParam(key);normalizedKey&&(obj[normalizedKey]=value,delete obj[key])}let result={};for(let keyName of Object.keys(routeKeys)){let paramName=routeKeys[keyName];if(!paramName)continue;let group=groups[paramName],value=obj[keyName];if(!group.optional&&!value)return null;result[group.pos]=value}return result}},groups})(routeMatchesHeader);return routeMatches||null},normalizeDynamicRouteParams:(query,ignoreMissingOptional)=>{if(!defaultRouteRegex||!defaultRouteMatches)return{params:{},hasValidParams:!1};var defaultRouteRegex1=defaultRouteRegex,defaultRouteMatches1=defaultRouteMatches;let params={};for(let key of Object.keys(defaultRouteRegex1.groups)){let value=query[key];"string"==typeof value?value=normalizeRscURL(value):Array.isArray(value)&&(value=value.map(normalizeRscURL));let defaultValue=defaultRouteMatches1[key],isOptional=defaultRouteRegex1.groups[key].optional;if((Array.isArray(defaultValue)?defaultValue.some(defaultVal=>Array.isArray(value)?value.some(val=>val.includes(defaultVal)):null==value?void 0:value.includes(defaultVal)):null==value?void 0:value.includes(defaultValue))||void 0===value&&!(isOptional&&ignoreMissingOptional))return{params:{},hasValidParams:!1};isOptional&&(!value||Array.isArray(value)&&1===value.length&&("index"===value[0]||value[0]===`[[...${key}]]`)||"index"===value||value===`[[...${key}]]`)&&(value=void 0,delete query[key]),value&&"string"==typeof value&&defaultRouteRegex1.groups[key].repeat&&(value=value.split("/")),value&&(params[key]=value)}return{params,hasValidParams:!0}},normalizeCdnUrl:(req,paramKeys)=>(function(req,paramKeys){let _parsedUrl=parseReqUrl(req.url);if(!_parsedUrl)return req.url;delete _parsedUrl.search,filterInternalQuery(_parsedUrl.query,paramKeys),req.url=function(urlObj){let{auth,hostname}=urlObj,protocol=urlObj.protocol||"",pathname=urlObj.pathname||"",hash=urlObj.hash||"",query=urlObj.query||"",host=!1;auth=auth?encodeURIComponent(auth).replace(/%3A/i,":")+"@":"",urlObj.host?host=auth+urlObj.host:hostname&&(host=auth+(~hostname.indexOf(":")?`[${hostname}]`:hostname),urlObj.port&&(host+=":"+urlObj.port)),query&&"object"==typeof query&&(query=String(function(query){let searchParams=new URLSearchParams;for(let[key,value]of Object.entries(query))if(Array.isArray(value))for(let item of value)searchParams.append(key,stringifyUrlQueryParam(item));else searchParams.set(key,stringifyUrlQueryParam(value));return searchParams}(query)));let search=urlObj.search||query&&`?${query}`||"";return protocol&&!protocol.endsWith(":")&&(protocol+=":"),urlObj.slashes||(!protocol||slashedProtocols.test(protocol))&&!1!==host?(host="//"+(host||""),pathname&&"/"!==pathname[0]&&(pathname="/"+pathname)):host||(host=""),hash&&"#"!==hash[0]&&(hash="#"+hash),search&&"?"!==search[0]&&(search="?"+search),pathname=pathname.replace(/[?#]/g,encodeURIComponent),search=search.replace("#","%23"),`${protocol}${host}${pathname}${search}${hash}`}(_parsedUrl)})(req,paramKeys),interpolateDynamicPath:(pathname,params)=>(function(pathname,params,defaultRouteRegex){if(!defaultRouteRegex)return pathname;for(let param of Object.keys(defaultRouteRegex.groups)){let paramValue,{optional,repeat}=defaultRouteRegex.groups[param],builtParam=`[${repeat?"...":""}${param}]`;optional&&(builtParam=`[${builtParam}]`);let value=params[param];((paramValue=Array.isArray(value)?value.map(v=>v&&encodeURIComponent(v)).join("/"):value?encodeURIComponent(value):"")||optional)&&(pathname=pathname.replaceAll(builtParam,paramValue))}return pathname})(pathname,params,defaultRouteRegex),filterInternalQuery:(query,paramKeys)=>filterInternalQuery(query,paramKeys)}}({page:normalizedSrcPage,i18n,basePath,rewrites,pageIsDynamic,trailingSlash:process.env.__NEXT_TRAILING_SLASH,caseSensitive:!!routesManifest.caseSensitive}),domainLocale=detectDomainLocale(null==i18n?void 0:i18n.domains,getHostname(parsedUrl,req.headers),detectedLocale);value=!!domainLocale,(meta=getRequestMeta(req)).isLocaleDomain=value,req[NEXT_REQUEST_META]=meta;let defaultLocale=(null==domainLocale?void 0:domainLocale.defaultLocale)||(null==i18n?void 0:i18n.defaultLocale);defaultLocale&&!detectedLocale&&(parsedUrl.pathname=`/${defaultLocale}${"/"===parsedUrl.pathname?"":parsedUrl.pathname}`);let locale=getRequestMeta(req,"locale")||detectedLocale||defaultLocale,{rewriteParams,rewrittenParsedUrl}=serverUtils.handleRewrites(req,parsedUrl),rewriteParamKeys=Object.keys(rewriteParams);Object.assign(parsedUrl.query,rewrittenParsedUrl.query),i18n&&(parsedUrl.pathname=normalizeLocalePath(parsedUrl.pathname||"/",i18n.locales).pathname,rewrittenParsedUrl.pathname=normalizeLocalePath(rewrittenParsedUrl.pathname||"/",i18n.locales).pathname);let params=getRequestMeta(req,"params");if(!params&&serverUtils.dynamicRouteMatcher){let paramsMatch=serverUtils.dynamicRouteMatcher(normalizeDataPath((null==rewrittenParsedUrl?void 0:rewrittenParsedUrl.pathname)||parsedUrl.pathname||"/")),paramsResult=serverUtils.normalizeDynamicRouteParams(paramsMatch||{},!0);paramsResult.hasValidParams&&(params=paramsResult.params)}let query=getRequestMeta(req,"query")||{...parsedUrl.query},routeParamKeys=new Set,combinedParamKeys=[];if(this.definition.kind===route_kind_RouteKind.PAGES||this.definition.kind===route_kind_RouteKind.PAGES_API)for(let key of[...rewriteParamKeys,...Object.keys(serverUtils.defaultRouteMatches||{})]){let originalValue=Array.isArray(originalQuery[key])?originalQuery[key].join(""):originalQuery[key],queryValue=Array.isArray(query[key])?query[key].join(""):query[key];key in originalQuery&&originalValue!==queryValue||combinedParamKeys.push(key)}if(serverUtils.normalizeCdnUrl(req,combinedParamKeys),serverUtils.normalizeQueryParams(query,routeParamKeys),serverUtils.filterInternalQuery(originalQuery,combinedParamKeys),pageIsDynamic){let paramsToInterpolate,queryResult=serverUtils.normalizeDynamicRouteParams(query,!0),paramsResult=serverUtils.normalizeDynamicRouteParams(params||{},!0);if(query&&params&&paramsResult.hasValidParams&&queryResult.hasValidParams&&Object.keys(paramsResult.params).length<Object.keys(queryResult.params).length?(paramsToInterpolate=queryResult.params,params=Object.assign(queryResult.params)):paramsToInterpolate=paramsResult.hasValidParams&&params?params:queryResult.hasValidParams?query:{},req.url=serverUtils.interpolateDynamicPath(req.url||"/",paramsToInterpolate),parsedUrl.pathname=serverUtils.interpolateDynamicPath(parsedUrl.pathname||"/",paramsToInterpolate),originalPathname=serverUtils.interpolateDynamicPath(originalPathname,paramsToInterpolate),!params)if(queryResult.hasValidParams)for(let key in params=Object.assign({},queryResult.params),serverUtils.defaultRouteMatches)delete query[key];else{let paramsMatch=null==serverUtils.dynamicRouteMatcher?void 0:serverUtils.dynamicRouteMatcher.call(serverUtils,normalizeDataPath((null==localeResult?void 0:localeResult.pathname)||parsedUrl.pathname||"/"));paramsMatch&&(params=Object.assign({},paramsMatch))}}for(let key of routeParamKeys)key in originalQuery||delete query[key];let{isOnDemandRevalidate,revalidateOnlyGenerated}=(0,api_utils.checkIsOnDemandRevalidate)(req,prerenderManifest.preview),isDraftMode=!1;if(res){let{tryGetPreviewData}=__webpack_require__("./dist/esm/server/api-utils/node/try-get-preview-data.js");isDraftMode=!1!==(previewData=tryGetPreviewData(req,res,prerenderManifest.preview,!!multiZoneDraftMode))}let relativeProjectDir=getRequestMeta(req,"relativeProjectDir")||this.relativeProjectDir,routerServerContext=null==(_routerServerGlobal_RouterServerContextSymbol=routerServerGlobal[RouterServerContextSymbol])?void 0:_routerServerGlobal_RouterServerContextSymbol[relativeProjectDir],nextConfig=(null==routerServerContext?void 0:routerServerContext.nextConfig)||(null==serverFilesManifest?void 0:serverFilesManifest.config);if(!nextConfig)throw Object.defineProperty(Error("Invariant: nextConfig couldn't be loaded"),"__NEXT_ERROR_CODE",{value:"E969",enumerable:!1,configurable:!0});let resolvedPathname=normalizedSrcPage;isDynamicRoute(resolvedPathname)&&params&&(resolvedPathname=serverUtils.interpolateDynamicPath(resolvedPathname,params)),"/index"===resolvedPathname&&(resolvedPathname="/");let encodedResolvedPathname=resolvedPathname;try{resolvedPathname=resolvedPathname.split("/").map(seg=>{try{var segment;segment=decodeURIComponent(seg),seg=segment.replace(RegExp("([/#?]|%(2f|23|3f|5c))","gi"),char=>encodeURIComponent(char))}catch(_){throw Object.defineProperty(new DecodeError("Failed to decode path param(s)."),"__NEXT_ERROR_CODE",{value:"E539",enumerable:!1,configurable:!0})}return seg}).join("/")}catch(_){}if(resolvedPathname=removeTrailingSlash(resolvedPathname),null==(_nextConfig_experimental=nextConfig.experimental)?void 0:_nextConfig_experimental.runtimeServerDeploymentId){if(!process.env.NEXT_DEPLOYMENT_ID)throw Object.defineProperty(Error("process.env.NEXT_DEPLOYMENT_ID is missing but runtimeServerDeploymentId is enabled"),"__NEXT_ERROR_CODE",{value:"E970",enumerable:!1,configurable:!0});deploymentId=process.env.NEXT_DEPLOYMENT_ID}else deploymentId=nextConfig.deploymentId||"";return{query,originalQuery,originalPathname,params,parsedUrl,locale,isNextDataRequest,locales:null==i18n?void 0:i18n.locales,defaultLocale,isDraftMode,previewData,pageIsDynamic,resolvedPathname,encodedResolvedPathname,isOnDemandRevalidate,revalidateOnlyGenerated,...manifests,nextConfig:nextConfig,routerServerContext,deploymentId}}getResponseCache(req){if(!this.responseCache){let minimalMode=(!!process.env.MINIMAL_MODE||getRequestMeta(req,"minimalMode"))??!1;this.responseCache=new ResponseCache(minimalMode)}return this.responseCache}async handleResponse({req,nextConfig,cacheKey,routeKind,isFallback,prerenderManifest,isRoutePPREnabled,isOnDemandRevalidate,revalidateOnlyGenerated,responseGenerator,waitUntil,isMinimalMode}){let responseCache=this.getResponseCache(req),cacheEntry=await responseCache.get(cacheKey,responseGenerator,{routeKind,isFallback,isRoutePPREnabled,isOnDemandRevalidate,isPrefetch:"prefetch"===req.headers.purpose,incrementalCache:await this.getIncrementalCache(req,nextConfig,prerenderManifest,isMinimalMode),waitUntil});if(!cacheEntry&&cacheKey&&!(isOnDemandRevalidate&&revalidateOnlyGenerated))throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return cacheEntry}}var bytes=__webpack_require__("./dist/compiled/bytes/index.js"),bytes_default=__webpack_require__.n(bytes),fresh=__webpack_require__("./dist/compiled/fresh/index.js"),fresh_default=__webpack_require__.n(fresh);let external_stream_namespaceObject=require("stream");function isError(err){return"object"==typeof err&&null!==err&&"name"in err&&"message"in err}var try_get_preview_data=__webpack_require__("./dist/esm/server/api-utils/node/try-get-preview-data.js"),content_type=__webpack_require__("./dist/compiled/content-type/index.js");async function parseBody(req,limit){let contentType,buffer;try{contentType=(0,content_type.parse)(req.headers["content-type"]||"text/plain")}catch{contentType=(0,content_type.parse)("text/plain")}let{type,parameters}=contentType,encoding=parameters.charset||"utf-8";try{let getRawBody=__webpack_require__("next/dist/compiled/raw-body");buffer=await getRawBody(req,{encoding,limit})}catch(e){if(isError(e)&&"entity.too.large"===e.type)throw Object.defineProperty(new api_utils.ApiError(413,`Body exceeded ${limit} limit`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});throw Object.defineProperty(new api_utils.ApiError(400,"Invalid body"),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}let body=buffer.toString();if("application/json"===type||"application/ld+json"===type){if(0===body.length)return{};try{return JSON.parse(body)}catch(e){throw Object.defineProperty(new api_utils.ApiError(400,"Invalid JSON"),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}}return"application/x-www-form-urlencoded"===type?__webpack_require__("querystring").decode(body):body}function isValidData(str){return"string"==typeof str&&str.length>=16}async function api_resolver_revalidate(urlPath,opts,req,context){if("string"!=typeof urlPath||!urlPath.startsWith("/"))throw Object.defineProperty(Error(`Invalid urlPath provided to revalidate(), must be a path e.g. /blog/post-1, received ${urlPath}`),"__NEXT_ERROR_CODE",{value:"E153",enumerable:!1,configurable:!0});let revalidateHeaders={[constants.PRERENDER_REVALIDATE_HEADER]:context.previewModeId,...opts.unstable_onlyGenerated?{[constants.PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER]:"1"}:{}},allowedRevalidateHeaderKeys=[...context.allowedRevalidateHeaderKeys||[]];for(let key of((context.trustHostHeader||context.dev)&&allowedRevalidateHeaderKeys.push("cookie"),context.trustHostHeader&&allowedRevalidateHeaderKeys.push("x-vercel-protection-bypass"),Object.keys(req.headers)))allowedRevalidateHeaderKeys.includes(key)&&(revalidateHeaders[key]=req.headers[key]);let internalRevalidate=context.internalRevalidate;try{if(internalRevalidate)return await internalRevalidate({urlPath,revalidateHeaders,opts});if(context.trustHostHeader){let res=await fetch(`https://${req.headers.host}${urlPath}`,{method:"HEAD",headers:revalidateHeaders}),cacheHeader=res.headers.get("x-vercel-cache")||res.headers.get("x-nextjs-cache");if((null==cacheHeader?void 0:cacheHeader.toUpperCase())!=="REVALIDATED"&&200!==res.status&&!(404===res.status&&opts.unstable_onlyGenerated))throw Object.defineProperty(Error(`Invalid response ${res.status}`),"__NEXT_ERROR_CODE",{value:"E175",enumerable:!1,configurable:!0})}else throw Object.defineProperty(Error("Invariant: missing internal router-server-methods this is an internal bug"),"__NEXT_ERROR_CODE",{value:"E676",enumerable:!1,configurable:!0})}catch(err){throw Object.defineProperty(Error(`Failed to revalidate ${urlPath}: ${isError(err)?err.message:err}`),"__NEXT_ERROR_CODE",{value:"E240",enumerable:!1,configurable:!0})}}async function apiResolver(req,res,query,resolverModule,apiContext,propagateError,dev,page,onError){try{var _config_api,_config_api1,_config_api2;if(!resolverModule){res.statusCode=404,res.end("Not Found");return}let config=resolverModule.config||{},bodyParser=(null==(_config_api=config.api)?void 0:_config_api.bodyParser)!==!1,responseLimit=(null==(_config_api1=config.api)?void 0:_config_api1.responseLimit)??!0,externalResolver=(null==(_config_api2=config.api)?void 0:_config_api2.externalResolver)||!1;(0,api_utils.setLazyProp)({req:req},"cookies",getCookieParser(req.headers)),Object.defineProperty(req,"query",{value:{...query},writable:!0,enumerable:!0,configurable:!0}),(0,api_utils.setLazyProp)({req:req},"previewData",()=>(0,try_get_preview_data.tryGetPreviewData)(req,res,apiContext,!!apiContext.multiZoneDraftMode)),(0,api_utils.setLazyProp)({req:req},"preview",()=>!1!==req.previewData||void 0),(0,api_utils.setLazyProp)({req:req},"draftMode",()=>req.preview),bodyParser&&!req.body&&(req.body=await parseBody(req,config.api&&config.api.bodyParser&&config.api.bodyParser.sizeLimit?config.api.bodyParser.sizeLimit:"1mb"));let contentLength=0,maxContentLength=responseLimit&&"boolean"!=typeof responseLimit?bytes_default().parse(responseLimit):api_utils.RESPONSE_LIMIT_DEFAULT,writeData=res.write,endResponse=res.end;res.write=(...args)=>(contentLength+=Buffer.byteLength(args[0]||""),writeData.apply(res,args)),res.end=(...args)=>(args.length&&"function"!=typeof args[0]&&(contentLength+=Buffer.byteLength(args[0]||"")),responseLimit&&contentLength>=maxContentLength&&console.warn(`API response for ${req.url} exceeds ${bytes_default().format(maxContentLength)}. API Routes are meant to respond quickly. https://nextjs.org/docs/messages/api-routes-response-size-limit`),endResponse.apply(res,args)),res.status=statusCode=>(0,api_utils.sendStatusCode)(res,statusCode),res.send=data=>(function(req,res,body){if(null==body)return void res.end();if(204===res.statusCode||304===res.statusCode){res.removeHeader("Content-Type"),res.removeHeader("Content-Length"),res.removeHeader("Transfer-Encoding"),body&&console.warn(`A body was attempted to be set with a 204 statusCode for ${req.url}, this is invalid and the body was ignored.
See more info here https://nextjs.org/docs/messages/invalid-api-status-body`),res.end();return}let contentType=res.getHeader("Content-Type");if(body instanceof external_stream_namespaceObject.Stream){contentType||res.setHeader("Content-Type","application/octet-stream"),body.pipe(res);return}let isJSONLike=["object","number","boolean"].includes(typeof body),stringifiedBody=isJSONLike?JSON.stringify(body):body,etag=((payload,weak=!1)=>(weak?'W/"':'"')+(str=>{let len=str.length,i=0,t0=0,v0=8997,t1=0,v1=33826,t2=0,v2=40164,t3=0,v3=52210;for(;i<len;)v0^=str.charCodeAt(i++),t0=435*v0,t1=435*v1,t2=435*v2,t3=435*v3,t2+=v0<<8,t3+=v1<<8,t1+=t0>>>16,v0=65535&t0,t2+=t1>>>16,v1=65535&t1,v3=t3+(t2>>>16)&65535,v2=65535&t2;return(15&v3)*0x1000000000000+0x100000000*v2+65536*v1+(v0^v3>>4)})(payload).toString(36)+payload.length.toString(36)+'"')(stringifiedBody);if(etag&&res.setHeader("ETag",etag),!fresh_default()(req.headers,{etag:etag})||(res.statusCode=304,res.end(),0)){if(Buffer.isBuffer(body)){contentType||res.setHeader("Content-Type","application/octet-stream"),res.setHeader("Content-Length",body.length),res.end(body);return}isJSONLike&&res.setHeader("Content-Type",constants.JSON_CONTENT_TYPE_HEADER),res.setHeader("Content-Length",Buffer.byteLength(stringifiedBody)),res.end(stringifiedBody)}})(req,res,data),res.json=data=>{res.setHeader("Content-Type",constants.JSON_CONTENT_TYPE_HEADER),res.send(JSON.stringify(data))},res.redirect=(statusOrUrl,url)=>(0,api_utils.redirect)(res,statusOrUrl,url),res.setDraftMode=(options={enable:!0})=>(function(res,options){if(!isValidData(options.previewModeId))throw Object.defineProperty(Error("invariant: invalid previewModeId"),"__NEXT_ERROR_CODE",{value:"E169",enumerable:!1,configurable:!0});let expires=options.enable?void 0:new Date(0),{serialize}=__webpack_require__("./dist/compiled/cookie/index.js"),previous=res.getHeader("Set-Cookie");return res.setHeader("Set-Cookie",[..."string"==typeof previous?[previous]:Array.isArray(previous)?previous:[],serialize(api_utils.COOKIE_NAME_PRERENDER_BYPASS,options.previewModeId,{httpOnly:!0,sameSite:"lax",secure:!1,path:"/",expires})]),res})(res,Object.assign({},apiContext,options)),res.setPreviewData=(data,options={})=>(function(res,data,options){if(!isValidData(options.previewModeId))throw Object.defineProperty(Error("invariant: invalid previewModeId"),"__NEXT_ERROR_CODE",{value:"E169",enumerable:!1,configurable:!0});if(!isValidData(options.previewModeEncryptionKey))throw Object.defineProperty(Error("invariant: invalid previewModeEncryptionKey"),"__NEXT_ERROR_CODE",{value:"E334",enumerable:!1,configurable:!0});if(!isValidData(options.previewModeSigningKey))throw Object.defineProperty(Error("invariant: invalid previewModeSigningKey"),"__NEXT_ERROR_CODE",{value:"E436",enumerable:!1,configurable:!0});let jsonwebtoken=__webpack_require__("next/dist/compiled/jsonwebtoken"),{encryptWithSecret}=__webpack_require__("./dist/esm/server/crypto-utils.js"),payload=jsonwebtoken.sign({data:encryptWithSecret(Buffer.from(options.previewModeEncryptionKey),JSON.stringify(data))},options.previewModeSigningKey,{algorithm:"HS256",...void 0!==options.maxAge?{expiresIn:options.maxAge}:void 0});if(payload.length>2048)throw Object.defineProperty(Error("Preview data is limited to 2KB currently, reduce how much data you are storing as preview data to continue"),"__NEXT_ERROR_CODE",{value:"E465",enumerable:!1,configurable:!0});let{serialize}=__webpack_require__("./dist/compiled/cookie/index.js"),previous=res.getHeader("Set-Cookie");return res.setHeader("Set-Cookie",[..."string"==typeof previous?[previous]:Array.isArray(previous)?previous:[],serialize(api_utils.COOKIE_NAME_PRERENDER_BYPASS,options.previewModeId,{httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==options.maxAge?{maxAge:options.maxAge}:void 0,...void 0!==options.path?{path:options.path}:void 0}),serialize(api_utils.COOKIE_NAME_PRERENDER_DATA,payload,{httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==options.maxAge?{maxAge:options.maxAge}:void 0,...void 0!==options.path?{path:options.path}:void 0})]),res})(res,data,Object.assign({},apiContext,options)),res.clearPreviewData=(options={})=>(0,api_utils.clearPreviewData)(res,options),res.revalidate=(urlPath,opts)=>api_resolver_revalidate(urlPath,opts||{},req,apiContext);let resolver=resolverModule.default||resolverModule,wasPiped=!1;res.once("pipe",()=>wasPiped=!0);let apiRouteResult=await resolver(req,res);if(void 0!==apiRouteResult){if(apiRouteResult instanceof Response)throw Object.defineProperty(Error('API route returned a Response object in the Node.js runtime, this is not supported. Please use `runtime: "edge"` instead: https://nextjs.org/docs/api-routes/edge-api-routes'),"__NEXT_ERROR_CODE",{value:"E36",enumerable:!1,configurable:!0});console.warn(`API handler should not return a value, received ${typeof apiRouteResult}.`)}externalResolver||res.finished||res.headersSent||wasPiped||console.warn(`API resolved without sending a response for ${req.url}, this may result in stalled requests.`)}catch(err){if(await (null==onError?void 0:onError(err,{method:req.method||"GET",headers:req.headers,path:req.url||"/"},{routerKind:"Pages Router",routePath:page||"",routeType:"route",revalidateReason:void 0})),err instanceof api_utils.ApiError)(0,api_utils.sendError)(res,err.statusCode,err.message);else{if(dev)throw isError(err)&&(err.page=page),err;if(console.error(err),propagateError)throw err;(0,api_utils.sendError)(res,500,"Internal Server Error")}}}class PagesAPIRouteModule extends RouteModule{constructor(options){if(super(options),"function"!=typeof options.userland.default)throw Object.defineProperty(Error(`Page ${options.definition.page} does not export a default function.`),"__NEXT_ERROR_CODE",{value:"E379",enumerable:!1,configurable:!0});this.apiResolverWrapped=(0,api_utils.wrapApiHandler)(options.definition.page,apiResolver)}async render(req,res,context){let{apiResolverWrapped}=this;await apiResolverWrapped(req,res,context.query,this.userland,{...context.previewProps,trustHostHeader:context.trustHostHeader,allowedRevalidateHeaderKeys:context.allowedRevalidateHeaderKeys,hostname:context.hostname,multiZoneDraftMode:context.multiZoneDraftMode,dev:context.dev,internalRevalidate:context.internalRevalidate},context.propagateError,context.dev,context.page,context.onError)}}let pages_api_module=PagesAPIRouteModule})(),module.exports=__webpack_exports__})();
//# sourceMappingURL=pages-api.runtime.dev.js.map