22 lines
149 KiB
JavaScript
22 lines
149 KiB
JavaScript
|
(()=>{var e={"../next-env/dist/index.js":(e,t,r)=>{(()=>{var t={840:e=>{"use strict";e.exports.j=function(e){let t=e.ignoreProcessEnv?{}:process.env;for(let r in e.parsed){let i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.parsed[r];e.parsed[r]=function e(t,r,i){let s=t.match(/(.?\${*[\w]*(?::-)?[\w]*}*)/g)||[];return s.reduce(function(t,n,a){let o,l;let h=/(.?)\${*([\w]*(?::-)?[\w]*)?}*/g.exec(n);if(!h||0===h.length)return t;let d=h[1];if("\\"===d)o=(l=h[0]).replace("\\$","$");else{let n=h[2].split(":-"),u=n[0];if(l=h[0].substring(d.length),o=Object.prototype.hasOwnProperty.call(r,u)?r[u]:i.parsed[u]||n[1]||"",n.length>1&&o){let e=s[a+1];s[a+1]="",t=t.replace(e,"")}o=e(o,r,i)}return t.replace(l,o)},t)}(i,t,e)}for(let r in e.parsed)t[r]=e.parsed[r];return e}},358:(e,t,r)=>{r(147),r(17),r(37);let i=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,s=/\\n/g,n=/\r\n|\n|\r/;e.exports.Q=function(e,t){let r=!!(t&&t.debug),a={};return e.toString().split(n).forEach(function(e,t){let n=e.match(i);if(null!=n){let e=n[1],t=n[2]||"",r=t.length-1,i='"'===t[0]&&'"'===t[r],o="'"===t[0]&&"'"===t[r];o||i?(t=t.substring(1,r),i&&(t=t.replace(s,"\n"))):t=t.trim(),a[e]=t}else r&&console.log(`[dotenv][DEBUG] did not match key and value when parsing line ${t+1}: ${e}`)}),a}},147:e=>{"use strict";e.exports=r("fs")},37:e=>{"use strict";e.exports=r("os")},17:e=>{"use strict";e.exports=r("path")}},i={};function s(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}},a=!0;try{t[e](n,n.exports,s),a=!1}finally{a&&delete i[e]}return n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.ab=__dirname+"/";var n={};(()=>{"use strict";let e,t;s.r(n),s.d(n,{initialEnv:()=>e,updateInitialEnv:()=>d,processEnv:()=>c,resetEnv:()=>p,loadEnvConfig:()=>f});var r=s(147);s.n(r);var i=s(17);s.n(i);var a=s(358),o=s(840);let l=[],h=[];function d(t){Object.assign(e||{},t)}function u(e){Object.keys(process.env).forEach(t=>{t.startsWith("__NEXT_PRIVATE")||void 0!==e[t]&&""!==e[t]||delete process.env[t]}),Object.entries(e).forEach(([e,t])=>{process.env[e]=t})}function c(t,r,s=console,n=!1,l){var d;if(e||(e=Object.assign({},process.env)),!n&&(process.env.__NEXT_PROCESSED_ENV||0===t.length))return process.env;process.env.__NEXT_PROCESSED_ENV="true";let u=Object.assign({},e),c={};for(let e of t)try{let t={};for(let r of(t.parsed=a.Q(e.contents),(t=(0,o.j)(t)).parsed&&!h.some(t=>t.contents===e.contents&&t.path===e.path)&&(null==l||l(e.path)),Object.keys(t.parsed||{})))void 0===c[r]&&void 0===u[r]&&(c[r]=null===(d=t.parsed)||void 0===d?void 0:d[r])}catch(t){s.error(`Failed to load env from ${i.join(r||"",e.path)}`,t)}return Object.assign(process.env,c)}function p(){e&&u(e)}function f(s,n,a=console,o=!1,d){if(e||(e=Object.assign({},process.env)),t&&!o)return{combinedEnv:t,loadedEnvFiles:l};u(e),h=l,l=[];let p=n?"development":"production",f=[`.env.${p}.local`,"test"!==p&&".env.local",`.env.${p}`,".env"].filter(Boolean);for(let e of f){let t=i.join(s,e);try{let i=r.statSync(t);if(!i.isFile())continue;let s=r.readFileSync(t,"utf8");l.push({path:e,contents:s})}catch(t){"ENOENT"!==t.code&&a.error(`Failed to load env from ${e}`,t)}}return{combinedEnv:t=c(l,s,a,o,d),loadedEnvFiles:l}}})(),e.exports=n})()},"./dist/compiled/@edge-runtime/cookies/index.js":e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,n={};function a(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in
|
||
|
* content-type
|
||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
|
* MIT Licensed
|
||
|
*/var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,s=/\\([\u000b\u0020-\u00ff])/g,n=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}t.format=function(e){if(!e||"object"!=typeof e)throw TypeError("argument obj is required");var t=e.parameters,s=e.type;if(!s||!a.test(s))throw TypeError("invalid type");var o=s;if(t&&"object"==typeof t)for(var l,h=Object.keys(t).sort(),d=0;d<h.length;d++){if(l=h[d],!i.test(l))throw TypeError("invalid parameter name");o+="; "+l+"="+function(e){var t=String(e);if(i.test(t))return t;if(t.length>0&&!r.test(t))throw TypeError("invalid parameter value");return'"'+t.replace(n,"\\$1")+'"'}(t[l])}return o},t.parse=function(t){if(!t)throw TypeError("argument string is required");var r,i,n,l="object"==typeof t?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw TypeError("content-type header is missing from object");return t}(t):t;if("string"!=typeof l)throw TypeError("argument string is required to be a string");var h=l.indexOf(";"),d=-1!==h?l.substr(0,h).trim():l.trim();if(!a.test(d))throw TypeError("invalid media type");var u=new o(d.toLowerCase());if(-1!==h){for(e.lastIndex=h;i=e.exec(l);){if(i.index!==h)throw TypeError("invalid parameter format");h+=i[0].length,r=i[1].toLowerCase(),'"'===(n=i[2])[0]&&(n=n.substr(1,n.length-2).replace(s,"$1")),u.parameters[r]=n}if(h!==l.length)throw TypeError("invalid parameter format")}return u}})(),e.exports=t})()},"./dist/compiled/cookie/index.js":e=>{(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{/*!
|
||
|
* cookie
|
||
|
* Copyright(c) 2012-2014 Roman Shtylman
|
||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
|
* MIT Licensed
|
||
|
*/t.parse=function(t,r){if("string"!=typeof t)throw TypeError("argument str must be a string");for(var s={},n=t.split(i),a=(r||{}).decode||e,o=0;o<n.length;o++){var l=n[o],h=l.indexOf("=");if(!(h<0)){var d=l.substr(0,h).trim(),u=l.substr(++h,l.length).trim();'"'==u[0]&&(u=u.slice(1,-1)),void 0==s[d]&&(s[d]=function(e,t){try{return t(e)}catch(t){return e}}(u,a))}}return s},t.serialize=function(e,t,i){var n=i||{},a=n.encode||r;if("function"!=typeof a)throw TypeError("option encode is invalid");if(!s.test(e))throw TypeError("argument name is invalid");var o=a(t);if(o&&!s.test(o))throw TypeError("argument val is invalid");var l=e+"="+o;if(null!=n.maxAge){var h=n.maxAge-0;if(isNaN(h)||!isFinite(h))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(h)}if(n.domain){if(!s.test(n.domain))throw TypeError("option domain is invalid");l+="; Domain="+n.domain}if(n.path){if(!s.test(n.path))throw TypeError("option path is invalid");l+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw TypeError("option expires is invalid");l+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(l+="; HttpOnly"),n.secure&&(l+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return l};var e=decodeURIComponent,r=encodeURIComponent,i=/; */,s=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/})(),e.exports=t})()},"./dist/compiled/fresh/index.js":e=>{(()=>{"use strict";var t={695:e=>{/*!
|
||
|
* fresh
|
||
|
* Copyright(c) 2012 TJ Holowaychuk
|
||
|
* Copyright(c) 2016-2017 Douglas Christopher Wilson
|
||
|
* MIT Licensed
|
||
|
*/var t=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function r(e){var t=e&&Date.parse(e);return"number"==typeof t?t:NaN}e.exports=function(e,i){var s=e["if-modified-since"],n=e["if-none-match"];if(!s&&!n)return!1;var a=e["cache-control"];if(a&&t.test(a))return!1;if(n&&"*"!==n){var o=i.etag;if(!o)return!1;for(var l=!0,h=function(e){for(var t=0,r=[],i=0,s=0,n=e.length;s<n;s++)switch(e.charCodeAt(s)){case 32:i===t&&(i=t=s+1);break;case 44:r.push(e.substring(i,t)),i=t=s+1;break;default:t=s+1}return r.push(e.substring(i,t)),r}(n),d=0;d<h.length;d++){var u=h[d];if(u===o||u==="W/"+o||"W/"+u===o){l=!1;break}}if(l)return!1}if(s){var c=i["last-modified"];if(!c||!(r(c)<=r(s)))return!1}return!0}}},r={};function i(e){var s=r[e];if(void 0!==s)return s.exports;var n=r[e]={exports:{}},a=!0;try{t[e](n,n.exports,i),a=!1}finally{a&&delete r[e]}return n.exports}i.ab=__dirname+"/";var s=i(695);e.exports=s})()},"./dist/compiled/lru-cache/index.js":e=>{(()=>{"use strict";var t={806:(e,t,r)=>{let i=r(190),s=Symbol("max"),n=Symbol("length"),a=Symbol("lengthCalculator"),o=Symbol("allowStale"),l=Symbol("maxAge"),h=Symbol("dispose"),d=Symbol("noDisposeOnSet"),u=Symbol("lruList"),c=Symbol("cache"),p=Symbol("updateAgeOnGet"),f=()=>1,m=(e,t,r)=>{let i=e[c].get(t);if(i){let t=i.value;if(g(e,t)){if(y(e,i),!e[o])return}else r&&(e[p]&&(i.value.now=Date.now()),e[u].unshiftNode(i));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;let r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]},v=e=>{if(e[n]>e[s])for(let t=e[u].tail;e[n]>e[s]&&null!==t;){let r=t.prev;y(e,t),t=r}},y=(e,t)=>{if(t){let r=t.value;e[h]&&e[h](r.key,r.value),e[n]-=r.length,e[c].delete(r.key),e[u].removeNode(t)}};class x{constructor(e,t,r,i,s){this.key=e,this.value=t,this.length=r,this.now=i,this.maxAge=s||0}}let w=(e,t,r,i)=>{let s=r.value;g(e,s)&&(y(e,r),e[o]||(s=void 0)),s&&t.call(i,s.value,s.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw TypeError("max must be a non-negative number");this[s]=e.max||1/0;let t=e.length||f;if(this[a]="function"!=typeof t?f:t,this[o]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[h]=e.dispose,this[d]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw TypeError("max must be a non-negative number");this[s]=e||1/0,v(this)}get max(){return this[s]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if("number"!=typeof e)throw TypeError("maxAge must be a non-negative number");this[l]=e,v(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[a]&&(this[a]=e,this[n]=0,this[u].forEach(e=>{e.length=this[a](e.value,e.key),this[n]+=e.length})),v(this)}get lengthCalculator(){return this[a]}get length(){return this[n]}get itemCount(){return this[u].length}rforEach(e,t){t=t||this;for(let r=this[u].tail;null!==r;){let i=r.prev;w(this,e,r,t),r=i}}forEach(e,t){t=t||this;for(let r=this[u].head;null!==r;){let i=r.next;w(this,e,r,t),r=i}}keys(){return this[u].toArray().map(e=>e.key)}values(){return this[u].toArray().map(e=>e.value)}reset(){this[h]&&this[u]&&this[u].length&&this[u].forEach(e=>this[h](e.key,e.value)),this[c]=new Map,this[u]=new i,this[n]=0}dump(){return this[u].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[u]}set(e,t,r){if((r=r||this[l])&&"number"!=typeof r)throw TypeError("maxAge must be a number");let i=r?Date.now():0,o=this[a](t,e);if(this[c].has(e)){if(o>this[s])return y(this,this[c].get(e)),!1;let a=this[c].get(e),l=a.value;return this[h]&&!this[d]&&this[h](e,l.value),l.now=i,l.maxAge=r,l.value=t,this[n]+=o-l.length,l.length=o,this.get(e),v(this),!0}let p=new x(e,t,o,i,r);return p.length>this[s]?(this[h]&&this[h](e,t),!1):(this[n]+=p.length,this[u].unshift(p),this[c].set(e,this[u].head),v(this),!0)}has(e){if(!this[c].has(e))return!1;let t=this[c].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(t
|
||
|
Read more: https://nextjs.org/docs/messages/middleware-request-page
|
||
|
`)}}class t0 extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function.
|
||
|
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
||
|
`)}}let t1=Symbol("internal request");class t4 extends Request{constructor(e,t={}){let r="string"!=typeof e&&"url"in e?e.url:String(e);(function(e){try{String(new URL(String(e)))}catch(t){throw Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t})}})(r),e instanceof Request?super(e,t):super(r,t);let i=new tQ(r,{headers:tB(this.headers),nextConfig:t.nextConfig});this[t1]={cookies:new tX.q(this.headers),geo:t.geo||{},ip:t.ip,nextUrl:i,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?r:i.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,geo:this.geo,ip:this.ip,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[t1].cookies}get geo(){return this[t1].geo}get ip(){return this[t1].ip}get nextUrl(){return this[t1].nextUrl}get page(){throw new tZ}get ua(){throw new t0}get url(){return this[t1].url}}class t8{static fromBaseNextRequest(e,t){return"request"in e&&e.request?t8.fromWebNextRequest(e):t8.fromNodeNextRequest(e,t)}static fromNodeNextRequest(e,t){let r,i=null;if("GET"!==e.method&&"HEAD"!==e.method&&e.body&&(i=e.body),e.url.startsWith("http"))r=new URL(e.url);else{let t=O(e,"__NEXT_INIT_URL");r=t&&t.startsWith("http")?new URL(e.url,t):new URL(e.url,"http://n")}return new t4(r,{body:i,method:e.method,headers:tz(e.headers),duplex:"half",signal:t})}static fromWebNextRequest(e){let t=null;return"GET"!==e.method&&"HEAD"!==e.method&&(t=e.body),new t4(e.url,{body:t,method:e.method,headers:tz(e.headers),duplex:"half",signal:e.request.signal})}}let t3=eQ("/_next/data/:path*"),t2=["x-invoke-path","x-invoke-status","x-invoke-error","x-invoke-query","x-invoke-output","x-middleware-invoke"];function t9(e){for(let t of t2)delete e[t]}class t5 extends Error{}class t6 extends Error{constructor(e){super(),this.innerError=e}}class t7{constructor(e){var t,i,s;this.prepared=!1,this.preparedPromise=null,this.customErrorNo404Warn=(0,R.gf)(()=>{eA(`You have added a custom /_error page without a custom /404 page. This prevents the 404 page from being auto statically optimized.
|
||
|
See here for info: https://nextjs.org/docs/messages/custom-error-no-custom-404`)});let{dir:n=".",quiet:a=!1,conf:o,dev:l=!1,minimalMode:h=!1,customServer:d=!0,hostname:u,port:c}=e;this.serverOptions=e,this.dir=r("path").resolve(n),this.quiet=a,this.loadEnvConfig({dev:l}),this.nextConfig=o,this.hostname=u,this.hostname&&(this.fetchHostname=function(e){return e$.test(e)?`[${e}]`:e}(this.hostname)),this.port=c,this.distDir=r("path").join(this.dir,this.nextConfig.distDir),this.publicDir=this.getPublicDir(),this.hasStaticDir=!h&&this.getHasStaticDir(),this.i18nProvider=(null==(t=this.nextConfig.i18n)?void 0:t.locales)?new tF(this.nextConfig.i18n):void 0,this.localeNormalizer=this.i18nProvider?new to(this.i18nProvider):void 0;let{serverRuntimeConfig:p={},publicRuntimeConfig:f,assetPrefix:m,generateEtags:g}=this.nextConfig;this.buildId=this.getBuildId(),this.minimalMode=h||!!process.env.NEXT_PRIVATE_MINIMAL_MODE,this.hasAppDir=this.getHasAppDir(l);let v=this.hasAppDir;this.nextFontManifest=this.getNextFontManifest(),this.nextConfig.experimental.deploymentId&&(process.env.NEXT_DEPLOYMENT_ID=this.nextConfig.experimental.deploymentId),this.renderOpts={deploymentId:this.nextConfig.experimental.deploymentId,strictNextHead:!!this.nextConfig.experimental.strictNextHead,poweredByHeader:this.nextConfig.poweredByHeader,canonicalBase:this.nextConfig.amp.canonicalBase||"",buildId:this.buildId,generateEtags:g,previewProps:this.getPrerenderManifest().preview,customServer:!0===d||void 0,ampOptimizerConfig:null==(i=this.nextConfig.experimental.amp)?void 0:i.optimizer,basePath:this.nextConfig.basePath,images:this.nextConfig.images,optimizeFonts:this.nextConfig.optimizeFonts,fontManifest:this.nextConfig.optimizeFonts&&!l?this.getFontManifest():void 0,optimizeCss:this.nextConfig.experimental.optimizeCss,nextConfigOutput:this.nextConfig.output,nextScriptWorkers:this.nextConfig.experimental.nextScriptWorkers,disableOptimizedLoading:this.nextConfig.experimental.disableOptimizedLoading,domainLocales:null==(s=this.nextConfig.i18n)?void 0:s.domains,distDir:this.distDir,serverComponents:v,crossOrigin:this.nextConfig.crossOrigin?this.nextConfig.crossOrigin:void 0,largePageDataBytes:this.nextConfig.experimental.largePageDataBytes,runtimeConfig:Object.keys(f).length>0?f:void 0,isExperimentalCompile:this.nextConfig.experimental.isExperimentalCompile},(0,eB.setConfig)({serverRuntimeConfig:p,publicRuntimeConfig:f}),this.pagesManifest=this.getPagesManifest(),this.appPathsManifest=this.getAppPathsManifest(),this.appPathRoutes=this.getAppPathRoutes(),this.matchers=this.getRouteMatchers(),this.matchers.reload(),this.setAssetPrefix(m),this.responseCache=this.getResponseCache({dev:l})}reloadMatchers(){return this.matchers.reload()}async handleNextDataRequest(e,t,r){var i,s,n,a;let o=this.getMiddleware(),l="string"==typeof(i=r.pathname)&&t3(i);if(!l||!l.path)return{finished:!1};if(l.path[0]!==this.buildId)return e.headers["x-middleware-invoke"]?{finished:!1}:(await this.render404(e,t,r),{finished:!0});l.path.shift();let h=l.path[l.path.length-1];if("string"!=typeof h||!h.endsWith(".json"))return await this.render404(e,t,r),{finished:!0};let d=`/${l.path.join("/")}`;if(n=".json",s=(s=d).replace(/\\/g,"/"),(s=n&&s.endsWith(n)?s.slice(0,-n.length):s).startsWith("/index/")&&!eU(s)?s=s.slice(6):"/index"===s&&(s="/"),d=s,o&&(this.nextConfig.trailingSlash&&!d.endsWith("/")&&(d+="/"),!this.nextConfig.trailingSlash&&d.length>1&&d.endsWith("/")&&(d=d.substring(0,d.length-1))),this.i18nProvider){let i=null==e?void 0:null==(a=e.headers.host)?void 0:a.split(":")[0].toLowerCase(),s=this.i18nProvider.detectDomainLocale(i),n=(null==s?void 0:s.defaultLocale)??this.i18nProvider.config.defaultLocale,l=this.i18nProvider.analyze(d);if(l.detectedLocale&&(d=l.pathname),r.query.__nextLocale=l.detectedLocale,r.query.__nextDefaultLocale=n,l.detectedLocale||delete r.query.__nextInferredLocaleFromDefault,!l.detectedLocale&&!o)return r.query.__nextLocale=n,await this.render404(e,t,r),{finished:!0}}return r.pathname=d,r.query.__nextDataReq="1",{finished:!1}}async handleNextImageRequest(e,t,r){r
|
||
|
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`);if(e.stack){let r=e.stack;t.stack=t.message+r.substring(r.indexOf("\n"))}throw t}return _.isNotFound?{value:null,revalidate:_.revalidate}:_.isRedirect?{value:{kind:"REDIRECT",props:_.pageData},revalidate:_.revalidate}:c.isNull?null:{value:{kind:"PAGE",html:c,pageData:_.pageData,headers:u,status:y?t.statusCode:void 0},revalidate:_.revalidate}},J=await this.responseCache.get(W,async(r,a)=>{r||t.sent,f||({staticPaths:f,fallbackMode:m}=w?await this.getStaticPaths({pathname:i,requestHeaders:e.headers,isAppPath:y,page:n.page}):{staticPaths:void 0,fallbackMode:!1}),"static"===m&&eW(e.headers["user-agent"]||"")&&(m="blocking"),(null==a?void 0:a.isStale)===-1&&(U=!0),U&&(!1!==m||a)&&(m="blocking");let l=W??(s.dev&&y?N:null);l&&o.amp&&(l=l.replace(/\.amp$/,"")),l&&(null==f||f.includes(l)),this.nextConfig.experimental.isExperimentalCompile&&(m="blocking");let h=await K();return h?{...h,revalidate:void 0!==h.revalidate?h.revalidate:1}:null},{incrementalCache:G,isOnDemandRevalidate:U,isPrefetch:"prefetch"===e.headers.purpose});if(!J){if(W&&!(U&&B))throw Error("invariant: cache entry required but not generated");return null}let{revalidate:V,value:Y}=J,Q=void 0!==V?{private:$||g&&Y,stateful:!T,revalidate:V}:void 0;if(Y){if("REDIRECT"===Y.kind)return(Q&&er(t,Q),k)?{type:"json",body:eG.fromStatic(JSON.stringify(Y.props)),revalidateOptions:Q}:(await (e=>{let r={destination:e.pageProps.__N_REDIRECT,statusCode:e.pageProps.__N_REDIRECT_STATUS,basePath:e.pageProps.__N_REDIRECT_BASE_PATH},i=r.statusCode||(r.permanent?308:307),{basePath:s}=this.nextConfig;s&&!1!==r.basePath&&r.destination.startsWith("/")&&(r.destination=`${s}${r.destination}`),r.destination.startsWith("/")&&(r.destination=(0,R.U3)(r.destination)),t.redirect(r.destination,i).body(r.destination).send()})(Y.props),null);if("IMAGE"===Y.kind)throw Error("invariant SSG should not return an image cache value");if("ROUTE"===Y.kind){let r={...Y.headers};return T||delete r[eF.Et],await tW(e,t,new Response(Y.body,{headers:tz(r),status:Y.status||200})),null}if(y){if(T&&(null==(c=Y.headers)?void 0:c[eF.Et])&&t.setHeader(eF.Et,Y.headers[eF.Et]),k&&"string"!=typeof Y.pageData)throw Error("invariant: Expected pageData to be a string for app data request but received "+typeof Y.pageData+". This is a bug in Next.js.");return Y.status&&(t.statusCode=Y.status),{type:k?"rsc":"html",body:k?eG.fromStatic(Y.pageData):Y.html,revalidateOptions:Q}}return{type:k?"json":"html",body:k?eG.fromStatic(JSON.stringify(Y.pageData)):Y.html,revalidateOptions:Q}}return(Q&&er(t,Q),k)?(t.statusCode=404,t.body('{"notFound":true}').send()):await this.render404(e,t,{pathname:i,query:o},!1),null}stripNextDataPath(e,t=!0){if(e.includes(this.buildId)){let t=e.substring(e.indexOf(this.buildId)+this.buildId.length);e=eJ(t.replace(/\.json$/,""))}return this.localeNormalizer&&t?this.localeNormalizer.normalize(e):e}getOriginalAppPaths(e){if(this.hasAppDir){var t;let r=null==(t=this.appPathRoutes)?void 0:t[e];return r||null}return null}async renderPageComponent(e,t){var r;let{query:i,pathname:s}=e,n=this.getOriginalAppPaths(s),a=Array.isArray(n),o=s;a&&(o=n[n.length-1]);let l=await this.findPageComponents({page:o,query:i,params:e.renderOpts.params||{},isAppPath:a,sriEnabled:!!(null==(r=this.nextConfig.experimental.sri)?void 0:r.algorithm),appPaths:n,shouldEnsure:!1});if(l)try{return await this.renderToResponseWithComponents(e,l)}catch(r){let e=r instanceof t5;if(!e||e&&t)throw r}return!1}async renderToResponse(e){return(0,t$.getTracer)().trace(o.renderToResponse,{spanName:"rendering page",attributes:{"next.route":e.pathname}},async()=>this.renderToResponseImpl(e))}async renderToResponseImpl(e){var t;let{res:r,query:i,pathname:s}=e,n=!!i._nextBubbleNoFallback;delete i[el],delete i._nextBubbleNoFallback;let a={i18n:null==(t=this.i18nProvider)?void 0:t.fromQuery(s,i)};try{for await(let t of this.matchers.matchAll(s,a)){e.req.headers["x-invoke-output"];let r=await this.renderPageComponent({...e,pathname:t.definition.pathname,renderOpts:{...e.renderOpts,para
|
||
|
//# sourceMappingURL=server.runtime.prod.js.map
|