Files
scrap/node_modules/next/dist/compiled/next-server/app-route-experimental.runtime.prod.js
2024-09-24 03:52:46 +00:00

7 lines
46 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var e={"./dist/compiled/@edge-runtime/cookies/index.js":e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,a={};function s(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function i(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,o]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=o?o:"true"))}catch{}}return t}function l(e){var t,r;if(!e)return;let[[n,o],...a]=i(e),{domain:s,expires:l,httponly:d,maxage:f,path:p,samesite:h,secure:m,partitioned:g,priority:y}=Object.fromEntries(a.map(([e,t])=>[e.toLowerCase(),t]));return function(e){let t={};for(let r in e)e[r]&&(t[r]=e[r]);return t}({name:n,value:decodeURIComponent(o),domain:s,...l&&{expires:new Date(l)},...d&&{httpOnly:!0},..."string"==typeof f&&{maxAge:Number(f)},path:p,...h&&{sameSite:c.includes(t=(t=h).toLowerCase())?t:void 0},...m&&{secure:!0},...y&&{priority:u.includes(r=(r=y).toLowerCase())?r:void 0},...g&&{partitioned:!0}})}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(a,{RequestCookies:()=>d,ResponseCookies:()=>f,parseCookie:()=>i,parseSetCookie:()=>l,stringifyCookie:()=>s}),e.exports=((e,a,s,i)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of n(a))o.call(e,l)||l===s||t(e,l,{get:()=>a[l],enumerable:!(i=r(a,l))||i.enumerable});return e})(t({},"__esModule",{value:!0}),a);var c=["strict","lax","none"],u=["low","medium","high"],d=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get("cookie");if(t)for(let[e,r]of i(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>s(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>s(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},f=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;let o=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(let e of Array.isArray(o)?o:function(e){if(!e)return[];var t,r,n,o,a,s=[],i=0;function l(){for(;i<e.length&&/\s/.test(e.charAt(i));)i+=1;return i<e.length}for(;i<e.length;){for(t=i,a=!1;l();)if(","===(r=e.charAt(i))){for(n=i,i+=1,l(),o=i;i<e.length&&"="!==(r=e.charAt(i))&&";"!==r&&","!==r;)i+=1;i<e.length&&"="===e.charAt(i)?(a=!0,i=o,s.push(e.substring(t,n)),t=i):i=n+1}else i+=1;(!a||i>=e.length)&&s.push(e.substring(t,e.length))}return s}(o)){let t=l(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,o=this._parsed;return o.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=s(r);t.append("set-cookie",e)}}(o,this._headers),this}delete(...e){let[t,r,n]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0].path,e[0].domain];return this.set({name:t,path:r,domain:n,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(s).join("; ")}}},"./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 o={},a=t.split(n),s=(r||{}).decode||e,i=0;i<a.length;i++){var l=a[i],c=l.indexOf("=");if(!(c<0)){var u=l.substr(0,c).trim(),d=l.substr(++c,l.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),void 0==o[u]&&(o[u]=function(e,t){try{return t(e)}catch(t){return e}}(d,s))}}return o},t.serialize=function(e,t,n){var a=n||{},s=a.encode||r;if("function"!=typeof s)throw TypeError("option encode is invalid");if(!o.test(e))throw TypeError("argument name is invalid");var i=s(t);if(i&&!o.test(i))throw TypeError("argument val is invalid");var l=e+"="+i;if(null!=a.maxAge){var c=a.maxAge-0;if(isNaN(c)||!isFinite(c))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(c)}if(a.domain){if(!o.test(a.domain))throw TypeError("option domain is invalid");l+="; Domain="+a.domain}if(a.path){if(!o.test(a.path))throw TypeError("option path is invalid");l+="; Path="+a.path}if(a.expires){if("function"!=typeof a.expires.toUTCString)throw TypeError("option expires is invalid");l+="; Expires="+a.expires.toUTCString()}if(a.httpOnly&&(l+="; HttpOnly"),a.secure&&(l+="; Secure"),a.sameSite)switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return l};var e=decodeURIComponent,r=encodeURIComponent,n=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/})(),e.exports=t})()},"./dist/compiled/react-experimental/cjs/react.production.min.js":(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.debug_trace_mode"),m=Symbol.for("react.offscreen"),g=Symbol.for("react.cache"),y=Symbol.for("react.postpone"),v=Symbol.iterator,b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function w(e,t,r){this.props=e,this.context=t,this.refs=S,this.updater=r||b}function R(){}function C(e,t,r){this.props=e,this.context=t,this.refs=S,this.updater=r||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},R.prototype=w.prototype;var _=C.prototype=new R;_.constructor=C,x(_,w.prototype),_.isPureReactComponent=!0;var E=Array.isArray,T={current:null},k={current:null},P={transition:null},O={ReactCurrentDispatcher:T,ReactCurrentCache:k,ReactCurrentBatchConfig:P,ReactCurrentOwner:{current:null}},N=Object.prototype.hasOwnProperty,A=O.ReactCurrentOwner;function j(e,t,n,o,a,s,i){return{$$typeof:r,type:e,key:t,ref:void 0!==(n=i.ref)?n:null,props:i,_owner:s}}function $(e,t,r){var n,o={},a=null;if(null!=t)for(n in void 0!==t.key&&(a=""+t.key),t)N.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(o[n]=t[n]);var s=arguments.length-2;if(1===s)o.children=r;else if(1<s){for(var i=Array(s),l=0;l<s;l++)i[l]=arguments[l+2];o.children=i}if(e&&e.defaultProps)for(n in s=e.defaultProps)void 0===o[n]&&(o[n]=s[n]);return j(e,a,null,void 0,void 0,A.current,o)}function M(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var H=/\/+/g;function D(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function L(){}function I(e,t,o){if(null==e)return e;var a=[],s=0;return!function e(t,o,a,s,i){var l,c,u,d=typeof t;("undefined"===d||"boolean"===d)&&(t=null);var f=!1;if(null===t)f=!0;else switch(d){case"string":case"number":f=!0;break;case"object":switch(t.$$typeof){case r:case n:f=!0;break;case p:return e((f=t._init)(t._payload),o,a,s,i)}}if(f)return i=i(t),f=""===s?"."+D(t,0):s,E(i)?(a="",null!=f&&(a=f.replace(H,"$&/")+"/"),e(i,o,a,"",function(e){return e})):null!=i&&(M(i)&&(l=i,c=a+(!i.key||t&&t.key===i.key?"":(""+i.key).replace(H,"$&/")+"/")+f,i=j(l.type,c,null,void 0,void 0,l._owner,l.props)),o.push(i)),1;f=0;var h=""===s?".":s+":";if(E(t))for(var m=0;m<t.length;m++)d=h+D(s=t[m],m),f+=e(s,o,a,d,i);else if("function"==typeof(m=null===(u=t)||"object"!=typeof u?null:"function"==typeof(u=v&&u[v]||u["@@iterator"])?u:null))for(t=m.call(t),m=0;!(s=t.next()).done;)d=h+D(s=s.value,m++),f+=e(s,o,a,d,i);else if("object"===d){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(L,L):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),o,a,s,i);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(o=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}return f}(e,a,"","",function(e){return t.call(o,e,s++)}),a}function U(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}function q(){return new WeakMap}function B(){return{s:0,v:void 0,o:null,p:null}}function F(e,t){return T.current.useOptimistic(e,t)}function G(){}var W="function"==typeof reportError?reportError:function(e){console.error(e)};t.Children={map:I,forEach:function(e,t,r){I(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return I(e,function(){t++}),t},toArray:function(e){return I(e,function(e){return e})||[]},only:function(e){if(!M(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=w,t.Fragment=o,t.Profiler=s,t.PureComponent=C,t.StrictMode=a,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.act=function(){throw Error("act(...) is not supported in production builds of React.")},t.cache=function(e){return function(){var t=k.current;if(!t)return e.apply(null,arguments);var r=t.getCacheForType(q);void 0===(t=r.get(e))&&(t=B(),r.set(e,t)),r=0;for(var n=arguments.length;r<n;r++){var o=arguments[r];if("function"==typeof o||"object"==typeof o&&null!==o){var a=t.o;null===a&&(t.o=a=new WeakMap),void 0===(t=a.get(o))&&(t=B(),a.set(o,t))}else null===(a=t.p)&&(t.p=a=new Map),void 0===(t=a.get(o))&&(t=B(),a.set(o,t))}if(1===t.s)return t.v;if(2===t.s)throw t.v;try{var s=e.apply(null,arguments);return(r=t).s=1,r.v=s}catch(e){throw(s=t).s=2,s.v=e,e}}},t.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=x({},e.props),o=e.key,a=e._owner;if(null!=t){if(void 0!==t.ref&&(a=A.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(i in t)N.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&("ref"!==i||void 0!==t.ref)&&(n[i]=void 0===t[i]&&void 0!==s?s[i]:t[i])}var i=arguments.length-2;if(1===i)n.children=r;else if(1<i){s=Array(i);for(var l=0;l<i;l++)s[l]=arguments[l+2];n.children=s}return j(e.type,o,null,void 0,void 0,a,n)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=$,t.createFactory=function(e){var t=$.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.experimental_useEffectEvent=function(e){return T.current.useEffectEvent(e)},t.experimental_useOptimistic=function(e,t){return F(e,t)},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=M,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:U}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition,r=new Set;P.transition={_callbacks:r};var n=P.transition;try{var o=e();"object"==typeof o&&null!==o&&"function"==typeof o.then&&(r.forEach(function(e){return e(n,o)}),o.then(G,W))}catch(e){W(e)}finally{P.transition=t}},t.unstable_Activity=m,t.unstable_Cache=g,t.unstable_DebugTracingMode=h,t.unstable_SuspenseList=d,t.unstable_getCacheForType=function(e){var t=k.current;return t?t.getCacheForType(e):e()},t.unstable_getCacheSignal=function(){var e=k.current;return e?e.getCacheSignal():((e=new AbortController).abort(Error("This CacheSignal was requested outside React which means that it is immediately aborted.")),e.signal)},t.unstable_postpone=function(e){throw(e=Error(e)).$$typeof=y,e},t.unstable_useCacheRefresh=function(){return T.current.useCacheRefresh()},t.unstable_useMemoCache=function(e){return T.current.useMemoCache(e)},t.use=function(e){return T.current.use(e)},t.useCallback=function(e,t){return T.current.useCallback(e,t)},t.useContext=function(e){return T.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return T.current.useDeferredValue(e,t)},t.useEffect=function(e,t){return T.current.useEffect(e,t)},t.useId=function(){return T.current.useId()},t.useImperativeHandle=function(e,t,r){return T.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return T.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return T.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return T.current.useMemo(e,t)},t.useOptimistic=F,t.useReducer=function(e,t,r){return T.current.useReducer(e,t,r)},t.useRef=function(e){return T.current.useRef(e)},t.useState=function(e){return T.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return T.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return T.current.useTransition()},t.version="18.3.0-experimental-14898b6a9-20240318"},"./dist/compiled/react-experimental/index.js":(e,t,r)=>{"use strict";e.exports=r("./dist/compiled/react-experimental/cjs/react.production.min.js")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{AppRouteRouteModule:()=>eC,default:()=>e_,hasNonStaticMethods:()=>eE});var e,t,o,a,s,i,l,c,u,d,f,p,h,m,g,y={};r.r(y),r.d(y,{DynamicServerError:()=>B,isDynamicServerError:()=>F});var v={};r.r(v),r.d(v,{AppRouterContext:()=>eb,GlobalLayoutRouterContext:()=>eS,LayoutRouterContext:()=>ex,MissingSlotContext:()=>eR,TemplateContext:()=>ew});var b={};r.r(b),r.d(b,{appRouterContext:()=>v});class x{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}let S="Next-Action",w=[["RSC"],["Next-Router-State-Tree"],["Next-Router-Prefetch"]];class R{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}class C extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new C}}class _ extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,n){if("symbol"==typeof r)return R.get(t,r,n);let o=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===o);if(void 0!==a)return R.get(t,a,n)},set(t,r,n,o){if("symbol"==typeof r)return R.set(t,r,n,o);let a=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===a);return R.set(t,s??r,n,o)},has(t,r){if("symbol"==typeof r)return R.has(t,r);let n=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0!==o&&R.has(t,o)},deleteProperty(t,r){if("symbol"==typeof r)return R.deleteProperty(t,r);let n=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0===o||R.deleteProperty(t,o)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return C.callable;default:return R.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new _(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}var E=r("./dist/compiled/@edge-runtime/cookies/index.js");let T=require("next/dist/client/components/static-generation-async-storage.external.js");class k extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#cookiessetname-value-options")}static callable(){throw new k}}class P{static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"clear":case"delete":case"set":return k.callable;default:return R.get(e,t,r)}}})}}let O=Symbol.for("next.mutated.cookies");function N(e,t){let r=function(e){let t=e[O];return t&&Array.isArray(t)&&0!==t.length?t:[]}(t);if(0===r.length)return!1;let n=new E.ResponseCookies(e),o=n.getAll();for(let e of r)n.set(e);for(let e of o)n.set(e);return!0}class A{static wrap(e,t){let r=new E.ResponseCookies(new Headers);for(let t of e.getAll())r.set(t);let n=[],o=new Set,a=()=>{let e=T.staticGenerationAsyncStorage.getStore();if(e&&(e.pathWasRevalidated=!0),n=r.getAll().filter(e=>o.has(e.name)),t){let e=[];for(let t of n){let r=new E.ResponseCookies(new Headers);r.set(t),e.push(r.toString())}t(e)}};return new Proxy(r,{get(e,t,r){switch(t){case O:return n;case"delete":return function(...t){o.add("string"==typeof t[0]?t[0]:t[0].name);try{e.delete(...t)}finally{a()}};case"set":return function(...t){o.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.set(...t)}finally{a()}};default:return R.get(e,t,r)}}})}}let j="_N_T_",$={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"};({...$,GROUP:{serverOnly:[$.reactServerComponents,$.actionBrowser,$.appMetadataRoute,$.appRouteHandler,$.instrument],clientOnly:[$.serverSideRendering,$.appPagesBrowser],nonClientServerTarget:[$.middleware,$.api],app:[$.reactServerComponents,$.actionBrowser,$.appMetadataRoute,$.appRouteHandler,$.serverSideRendering,$.appPagesBrowser,$.shared,$.instrument]}});let M=require("next/dist/server/lib/trace/tracer");(function(e){e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404"})(e||(e={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(t||(t={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(o||(o={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(a||(a={})),(s||(s={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(i||(i={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(l||(l={})),(c||(c={})).executeRoute="Router.executeRoute",(u||(u={})).runHandler="Node.runHandler",(d||(d={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(f||(f={})),(p||(p={})).execute="Middleware.execute";let H="__prerender_bypass";Symbol("__next_preview_data"),Symbol(H);class D{constructor(e,t,r,n){var o;let a=e&&function(e,t){let r=_.from(e.headers);return{isOnDemandRevalidate:r.get("x-prerender-revalidate")===t.previewModeId,revalidateOnlyGenerated:r.has("x-prerender-revalidate-if-generated")}}(t,e).isOnDemandRevalidate,s=null==(o=r.get(H))?void 0:o.value;this.isEnabled=!!(!a&&s&&e&&s===e.previewModeId),this._previewModeId=null==e?void 0:e.previewModeId,this._mutableCookies=n}enable(){if(!this._previewModeId)throw Error("Invariant: previewProps missing previewModeId this should never happen");this._mutableCookies.set({name:H,value:this._previewModeId,httpOnly:!0,sameSite:"none",secure:!0,path:"/"})}disable(){this._mutableCookies.set({name:H,value:"",httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:new Date(0)})}}function L(e,t){if("x-middleware-set-cookie"in e.headers&&"string"==typeof e.headers["x-middleware-set-cookie"]){let r=e.headers["x-middleware-set-cookie"],n=new Headers;for(let e of function(e){var t,r,n,o,a,s=[],i=0;function l(){for(;i<e.length&&/\s/.test(e.charAt(i));)i+=1;return i<e.length}for(;i<e.length;){for(t=i,a=!1;l();)if(","===(r=e.charAt(i))){for(n=i,i+=1,l(),o=i;i<e.length&&"="!==(r=e.charAt(i))&&";"!==r&&","!==r;)i+=1;i<e.length&&"="===e.charAt(i)?(a=!0,i=o,s.push(e.substring(t,n)),t=i):i=n+1}else i+=1;(!a||i>=e.length)&&s.push(e.substring(t,e.length))}return s}(r))n.append("set-cookie",e);for(let e of new E.ResponseCookies(n).getAll())t.set(e)}}let I={wrap(e,{req:t,res:r,renderOpts:n},o){let a;function s(e){r&&r.setHeader("Set-Cookie",e)}n&&"previewProps"in n&&(a=n.previewProps);let i={},l={get headers(){return i.headers||(i.headers=function(e){let t=_.from(e);for(let e of w)t.delete(e.toString().toLowerCase());return _.seal(t)}(t.headers)),i.headers},get cookies(){if(!i.cookies){let e=new E.RequestCookies(_.from(t.headers));L(t,e),i.cookies=P.seal(e)}return i.cookies},get mutableCookies(){if(!i.mutableCookies){let e=function(e,t){let r=new E.RequestCookies(_.from(e));return A.wrap(r,t)}(t.headers,(null==n?void 0:n.onUpdateCookies)||(r?s:void 0));L(t,e),i.mutableCookies=e}return i.mutableCookies},get draftMode(){return i.draftMode||(i.draftMode=new D(a,t,this.cookies,this.mutableCookies)),i.draftMode},reactLoadableManifest:(null==n?void 0:n.reactLoadableManifest)||{},assetPrefix:(null==n?void 0:n.assetPrefix)||""};return e.run(l,o,l)}};var U=r("./dist/compiled/react-experimental/index.js");let q="DYNAMIC_SERVER_USAGE";class B extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=q}}function F(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===q}class G extends Error{constructor(...e){super(...e),this.code="NEXT_STATIC_GEN_BAILOUT"}}let W="function"==typeof U.unstable_postpone;function V(e,t){let r=new URL(e.urlPathname,"http://n").pathname;if(e.isUnstableCacheCallback)throw Error(`Route ${r} used "${t}" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "${t}" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`);if(e.dynamicShouldError)throw new G(`Route ${r} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)J(e.prerenderState,t,r);else if(e.revalidate=0,e.isStaticGeneration){let n=new B(`Route ${r} couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=n.stack,n}}function z(e,t){e.prerenderState&&J(e.prerenderState,t,e.urlPathname)}function J(e,t,r){(function(){if(!W)throw Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js")})();let n=`Route ${r} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;e.dynamicAccesses.push({stack:e.isDebugSkeleton?Error().stack:void 0,expression:t}),U.unstable_postpone(n)}let X={wrap(e,{urlPathname:t,renderOpts:r,requestEndedState:n},o){let a=!r.supportsDynamicResponse&&!r.isDraftMode&&!r.isServerAction,s=a&&r.experimental.ppr?{isDebugSkeleton:r.isDebugPPRSkeleton,dynamicAccesses:[]}:null,i={isStaticGeneration:a,urlPathname:t,pagePath:r.originalPathname,incrementalCache:r.incrementalCache||globalThis.__incrementalCache,isRevalidate:r.isRevalidate,isPrerendering:r.nextExport,fetchCache:r.fetchCache,isOnDemandRevalidate:r.isOnDemandRevalidate,isDraftMode:r.isDraftMode,prerenderState:s,requestEndedState:n};return r.store=i,e.run(i,o,i)}};function Y(){return new Response(null,{status:400})}function K(){return new Response(null,{status:405})}let Q=["GET","HEAD","OPTIONS","POST","PUT","DELETE","PATCH"],{env:Z,stdout:ee}=(null==(h=globalThis)?void 0:h.process)??{},et=Z&&!Z.NO_COLOR&&(Z.FORCE_COLOR||(null==ee?void 0:ee.isTTY)&&!Z.CI&&"dumb"!==Z.TERM),er=(e,t,r,n)=>{let o=e.substring(0,n)+r,a=e.substring(n+t.length),s=a.indexOf(t);return~s?o+er(a,t,r,s):o+a},en=(e,t,r=e)=>et?n=>{let o=""+n,a=o.indexOf(t,e.length);return~a?e+er(o,t,r,a)+t:e+o+t}:String,eo=en("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m");en("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),en("\x1b[3m","\x1b[23m"),en("\x1b[4m","\x1b[24m"),en("\x1b[7m","\x1b[27m"),en("\x1b[8m","\x1b[28m"),en("\x1b[9m","\x1b[29m"),en("\x1b[30m","\x1b[39m");let ea=en("\x1b[31m","\x1b[39m"),es=en("\x1b[32m","\x1b[39m"),ei=en("\x1b[33m","\x1b[39m");en("\x1b[34m","\x1b[39m");let el=en("\x1b[35m","\x1b[39m");en("\x1b[38;2;173;127;168m","\x1b[39m"),en("\x1b[36m","\x1b[39m");let ec=en("\x1b[37m","\x1b[39m");en("\x1b[90m","\x1b[39m"),en("\x1b[40m","\x1b[49m"),en("\x1b[41m","\x1b[49m"),en("\x1b[42m","\x1b[49m"),en("\x1b[43m","\x1b[49m"),en("\x1b[44m","\x1b[49m"),en("\x1b[45m","\x1b[49m"),en("\x1b[46m","\x1b[49m"),en("\x1b[47m","\x1b[49m");let eu={wait:ec(eo("○")),error:ea(eo("")),warn:ei(eo("⚠")),ready:"▲",info:ec(eo(" ")),event:es(eo("✓")),trace:el(eo("»"))},ed={log:"log",warn:"warn",error:"error"},ef=e=>{let t=["/layout"];if(e.startsWith("/")){let r=e.split("/");for(let e=1;e<r.length+1;e++){let n=r.slice(0,e).join("/");n&&(n.endsWith("/page")||n.endsWith("/route")||(n=`${n}${n.endsWith("/")?"":"/"}layout`),t.push(n))}}return t};function ep(e){var t,r;let n=[],{pagePath:o,urlPathname:a}=e;if(Array.isArray(e.tags)||(e.tags=[]),o)for(let r of ef(o))r=`${j}${r}`,(null==(t=e.tags)?void 0:t.includes(r))||e.tags.push(r),n.push(r);if(a){let t=new URL(a,"http://n").pathname,o=`${j}${t}`;(null==(r=e.tags)?void 0:r.includes(o))||e.tags.push(o),n.push(o)}return n}function eh(e,t){var r;e&&(null==(r=e.requestEndedState)||r.ended)}let em=require("next/dist/client/components/request-async-storage.external.js"),eg=require("next/dist/client/components/action-async-storage.external.js");function ey(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r,n,o]=e.digest.split(";",4),a=Number(o);return"NEXT_REDIRECT"===t&&("replace"===r||"push"===r)&&"string"==typeof n&&!isNaN(a)&&a in m}(function(e){e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect"})(m||(m={})),function(e){e.push="push",e.replace="replace"}(g||(g={}));let ev=["HEAD","OPTIONS"],eb=U.createContext(null),ex=U.createContext(null),eS=U.createContext(null),ew=U.createContext(null),eR=U.createContext(new Set);class eC extends x{static #e=this.sharedModules=b;constructor({userland:e,definition:t,resolvedPagePath:r,nextConfigOutput:n}){if(super({userland:e,definition:t}),this.requestAsyncStorage=em.requestAsyncStorage,this.staticGenerationAsyncStorage=T.staticGenerationAsyncStorage,this.serverHooks=y,this.actionAsyncStorage=eg.actionAsyncStorage,this.resolvedPagePath=r,this.nextConfigOutput=n,this.methods=function(e){let t=Q.reduce((t,r)=>({...t,[r]:e[r]??K}),{}),r=new Set(Q.filter(t=>e[t]));for(let n of ev.filter(e=>!r.has(e))){if("HEAD"===n){e.GET&&(t.HEAD=e.GET,r.add("HEAD"));continue}if("OPTIONS"===n){let e=["OPTIONS",...r];!r.has("HEAD")&&r.has("GET")&&e.push("HEAD");let n={Allow:e.sort().join(", ")};t.OPTIONS=()=>new Response(null,{status:204,headers:n}),r.add("OPTIONS");continue}throw Error(`Invariant: should handle all automatic implementable methods, got method: ${n}`)}return t}(e),this.hasNonStaticMethods=eE(e),this.dynamic=this.userland.dynamic,"export"===this.nextConfigOutput){if(this.dynamic&&"auto"!==this.dynamic){if("force-dynamic"===this.dynamic)throw Error(`export const dynamic = "force-dynamic" on page "${t.pathname}" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export`)}else this.dynamic="error"}}resolve(e){return Q.includes(e)?this.methods[e]:Y}async execute(e,t){let r=this.resolve(e.method),n={req:e};n.renderOpts={previewProps:t.prerenderManifest.preview};let o={urlPathname:e.nextUrl.pathname,renderOpts:t.renderOpts};o.renderOpts.fetchCache=this.userland.fetchCache;let s=await this.actionAsyncStorage.run({isAppRoute:!0,isAction:function(e){let t,r;e.headers instanceof Headers?(t=e.headers.get(S.toLowerCase())??null,r=e.headers.get("content-type")):(t=e.headers[S.toLowerCase()]??null,r=e.headers["content-type"]??null);let n=!!("POST"===e.method&&"application/x-www-form-urlencoded"===r),o=!!("POST"===e.method&&(null==r?void 0:r.startsWith("multipart/form-data"))),a=!!(void 0!==t&&"string"==typeof t&&"POST"===e.method);return{actionId:t,isURLEncodedAction:n,isMultipartAction:o,isFetchAction:a,isServerAction:!!(a||n||o)}}(e).isServerAction},()=>I.wrap(this.requestAsyncStorage,n,()=>X.wrap(this.staticGenerationAsyncStorage,o,n=>{var o;let s=n.isStaticGeneration;if(this.hasNonStaticMethods){if(s){let e=new B("Route is configured with methods that cannot be statically generated.");throw n.dynamicUsageDescription=e.message,n.dynamicUsageStack=e.stack,e}n.revalidate=0}let i=e;switch(this.dynamic){case"force-dynamic":n.forceDynamic=!0;break;case"force-static":n.forceStatic=!0,i=new Proxy(e,eM);break;case"error":n.dynamicShouldError=!0,s&&(i=new Proxy(e,eD));break;default:i=function(e,t){let r={get(e,n,o){switch(n){case"search":case"searchParams":case"url":case"href":case"toJSON":case"toString":case"origin":return V(t,`nextUrl.${n}`),R.get(e,n,o);case"clone":return e[eP]||(e[eP]=()=>new Proxy(e.clone(),r));default:return R.get(e,n,o)}}},n={get(e,o){switch(o){case"nextUrl":return e[eT]||(e[eT]=new Proxy(e.nextUrl,r));case"headers":case"cookies":case"url":case"body":case"blob":case"json":case"text":case"arrayBuffer":case"formData":return V(t,`request.${o}`),R.get(e,o,e);case"clone":return e[ek]||(e[ek]=()=>new Proxy(e.clone(),n));default:return R.get(e,o,e)}}};return new Proxy(e,n)}(e,n)}n.revalidate??=this.userland.revalidate??!1;let c=function(e){let t="/app/";e.includes(t)||(t="\\app\\");let[,...r]=e.split(t);return(t[0]+r.join(t)).split(".").slice(0,-1).join(".")}(this.resolvedPagePath);return null==(o=(0,M.getTracer)().getRootSpanAttributes())||o.set("next.route",c),(0,M.getTracer)().trace(d.runHandler,{spanName:`executing api route (app) ${c}`,attributes:{"next.route":c}},async()=>{var e,o;!function(e){var t;if("__nextPatched"in(t=globalThis.fetch)&&!0===t.__nextPatched)return;let r=globalThis.fetch;globalThis.fetch=function(e,{serverHooks:{DynamicServerError:t},staticGenerationAsyncStorage:r}){let n=async(n,o)=>{var s,i;let c;try{(c=new URL(n instanceof Request?n.url:n)).username="",c.password=""}catch{c=void 0}let u=(null==c?void 0:c.href)??"",d=Date.now(),f=(null==o?void 0:null==(s=o.method)?void 0:s.toUpperCase())||"GET",p=(null==o?void 0:null==(i=o.next)?void 0:i.internal)===!0,h="1"===process.env.NEXT_OTEL_FETCH_DISABLED;return(0,M.getTracer)().trace(p?a.internalFetch:l.fetch,{hideSpan:h,kind:M.SpanKind.CLIENT,spanName:["fetch",f,u].filter(Boolean).join(" "),attributes:{"http.url":u,"http.method":f,"net.peer.name":null==c?void 0:c.hostname,"net.peer.port":(null==c?void 0:c.port)||void 0}},async()=>{var a;let s,i,l;if(p)return e(n,o);let c=r.getStore();if(!c||c.isDraftMode)return e(n,o);let f=n&&"object"==typeof n&&"string"==typeof n.method,h=e=>(null==o?void 0:o[e])||(f?n[e]:null),m=e=>{var t,r,a;return void 0!==(null==o?void 0:null==(t=o.next)?void 0:t[e])?null==o?void 0:null==(r=o.next)?void 0:r[e]:f?null==(a=n.next)?void 0:a[e]:void 0},g=m("revalidate"),y=function(e,t){let r=[],n=[];for(let o=0;o<e.length;o++){let a=e[o];if("string"!=typeof a?n.push({tag:a,reason:"invalid type, must be a string"}):a.length>256?n.push({tag:a,reason:"exceeded max length of 256"}):r.push(a),r.length>64){console.warn(`Warning: exceeded max tag count for ${t}, dropped tags:`,e.slice(o).join(", "));break}}if(n.length>0)for(let{tag:e,reason:r}of(console.warn(`Warning: invalid tags passed to ${t}: `),n))console.log(`tag: "${e}" ${r}`);return r}(m("tags")||[],`fetch ${n.toString()}`);if(Array.isArray(y))for(let e of(c.tags||(c.tags=[]),y))c.tags.includes(e)||c.tags.push(e);let v=ep(c),b=c.fetchCache,x=!!c.isUnstableNoStore,S=h("cache"),w="";"string"==typeof S&&void 0!==g&&(f&&"default"===S||function(...e){(function(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in ed?ed[e]:"log",n=eu[e];0===t.length?console[r](""):console[r](" "+n,...t)})("warn",...e)}(`fetch for ${u} on ${c.urlPathname} specified "cache: ${S}" and "revalidate: ${g}", only one should be specified.`),S=void 0),"force-cache"===S?g=!1:("no-cache"===S||"no-store"===S||"force-no-store"===b||"only-no-store"===b)&&(g=0),("no-cache"===S||"no-store"===S)&&(w=`cache: ${S}`),l=function(e,t){try{let r;if(!1===e)r=e;else if("number"==typeof e&&!isNaN(e)&&e>-1)r=e;else if(void 0!==e)throw Error(`Invalid revalidate value "${e}" on "${t}", must be a non-negative number or "false"`);return r}catch(e){if(e instanceof Error&&e.message.includes("Invalid revalidate"))throw e;return}}(g,c.urlPathname);let R=h("headers"),C="function"==typeof(null==R?void 0:R.get)?R:new Headers(R||{}),_=C.get("authorization")||C.get("cookie"),E=!["get","head"].includes((null==(a=h("method"))?void 0:a.toLowerCase())||"get"),T=(_||E)&&0===c.revalidate;switch(b){case"force-no-store":w="fetchCache = force-no-store";break;case"only-no-store":if("force-cache"===S||void 0!==l&&(!1===l||l>0))throw Error(`cache: 'force-cache' used on fetch for ${u} with 'export const fetchCache = 'only-no-store'`);w="fetchCache = only-no-store";break;case"only-cache":if("no-store"===S)throw Error(`cache: 'no-store' used on fetch for ${u} with 'export const fetchCache = 'only-cache'`);break;case"force-cache":(void 0===g||0===g)&&(w="fetchCache = force-cache",l=!1)}void 0===l?"default-cache"===b?(l=!1,w="fetchCache = default-cache"):T?(l=0,w="auto no cache"):"default-no-store"===b?(l=0,w="fetchCache = default-no-store"):x?(l=0,w="noStore call"):(w="auto cache",l="boolean"!=typeof c.revalidate&&void 0!==c.revalidate&&c.revalidate):w||(w=`revalidate: ${l}`),c.forceStatic&&0===l||T||void 0!==c.revalidate&&("number"!=typeof l||!1!==c.revalidate&&("number"!=typeof c.revalidate||!(l<c.revalidate)))||(0===l&&z(c,"revalidate: 0"),c.revalidate=l);let k="number"==typeof l&&l>0||!1===l;if(c.incrementalCache&&k)try{s=await c.incrementalCache.fetchCacheKey(u,f?n:o)}catch(e){console.error("Failed to generate cache key for",n)}let P=c.nextFetchId??1;c.nextFetchId=P+1;let O="number"!=typeof l?31536e3:l,N=async(t,r)=>{let a=["cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","window","duplex",...t?[]:["signal"]];if(f){let e=n,t={body:e._ogBody||e.body};for(let r of a)t[r]=e[r];n=new Request(e.url,t)}else if(o){let{_ogBody:e,body:r,signal:n,...a}=o;o={...a,body:e||r,signal:t?void 0:n}}let i={...o,next:{...null==o?void 0:o.next,fetchType:"origin",fetchIdx:P}};return e(n,i).then(async e=>{if(t||eh(c,{start:d,url:u,cacheReason:r||w,cacheStatus:0===l||r?"skip":"miss",status:e.status,method:i.method||"GET"}),200===e.status&&c.incrementalCache&&s&&k){let t=Buffer.from(await e.arrayBuffer());try{await c.incrementalCache.set(s,{kind:"FETCH",data:{headers:Object.fromEntries(e.headers.entries()),body:t.toString("base64"),status:e.status,url:e.url},revalidate:O},{fetchCache:!0,revalidate:l,fetchUrl:u,fetchIdx:P,tags:y})}catch(e){console.warn("Failed to set fetch cache",n,e)}let r=new Response(t,{headers:new Headers(e.headers),status:e.status});return Object.defineProperty(r,"url",{value:e.url}),r}return e})},A=()=>Promise.resolve(),j=!1;if(s&&c.incrementalCache){A=await c.incrementalCache.lock(s);let e=c.isOnDemandRevalidate?null:await c.incrementalCache.get(s,{kindHint:"fetch",revalidate:l,fetchUrl:u,fetchIdx:P,tags:y,softTags:v});if(e?await A():i="cache-control: no-cache (hard refresh)",(null==e?void 0:e.value)&&"FETCH"===e.value.kind){if(c.isRevalidate&&e.isStale)j=!0;else{e.isStale&&(c.pendingRevalidates??={},c.pendingRevalidates[s]||(c.pendingRevalidates[s]=N(!0).catch(console.error).finally(()=>{c.pendingRevalidates??={},delete c.pendingRevalidates[s||""]})));let t=e.value.data;eh(c,{start:d,url:u,cacheReason:w,cacheStatus:"hit",status:t.status||200,method:(null==o?void 0:o.method)||"GET"});let r=new Response(Buffer.from(t.body,"base64"),{headers:t.headers,status:t.status});return Object.defineProperty(r,"url",{value:e.value.data.url}),r}}}if(c.isStaticGeneration&&o&&"object"==typeof o){let{cache:e}=o;if(!c.forceStatic&&"no-store"===e){let e=`no-store fetch ${n}${c.urlPathname?` ${c.urlPathname}`:""}`;z(c,e),c.revalidate=0;let r=new t(e);throw c.dynamicUsageErr=r,c.dynamicUsageDescription=e,r}let r="next"in o,{next:a={}}=o;if("number"==typeof a.revalidate&&(void 0===c.revalidate||"number"==typeof c.revalidate&&a.revalidate<c.revalidate)){if(!c.forceDynamic&&!c.forceStatic&&0===a.revalidate){let e=`revalidate: 0 fetch ${n}${c.urlPathname?` ${c.urlPathname}`:""}`;z(c,e);let r=new t(e);throw c.dynamicUsageErr=r,c.dynamicUsageDescription=e,r}c.forceStatic&&0===a.revalidate||(c.revalidate=a.revalidate)}r&&delete o.next}if(!s||!j)return N(!1,i).finally(A);{c.pendingRevalidates??={};let e=c.pendingRevalidates[s];return e?(await e).clone():c.pendingRevalidates[s]=N(!0,i).finally(async()=>{c.pendingRevalidates??={},delete c.pendingRevalidates[s||""],await A()})}})};return n.__nextPatched=!0,n.__nextGetStaticStore=()=>r,n._nextOriginalFetch=e,n}(r,e)}({serverHooks:this.serverHooks,staticGenerationAsyncStorage:this.staticGenerationAsyncStorage});let s=await r(i,{params:t.params?function(e){let t={};for(let[r,n]of Object.entries(e))void 0!==n&&(t[r]=n);return t}(t.params):void 0});if(!(s instanceof Response))throw Error(`No response is returned from route handler '${this.resolvedPagePath}'. Ensure you return a \`Response\` or a \`NextResponse\` in all branches of your handler.`);t.renderOpts.fetchMetrics=n.fetchMetrics,t.renderOpts.waitUntil=Promise.all([null==(e=n.incrementalCache)?void 0:e.revalidateTag(n.revalidatedTags||[]),...Object.values(n.pendingRevalidates||{})]),ep(n),t.renderOpts.fetchTags=null==(o=n.tags)?void 0:o.join(",");let c=this.requestAsyncStorage.getStore();if(c&&c.mutableCookies){let e=new Headers(s.headers);if(N(e,c.mutableCookies))return new Response(s.body,{status:s.status,statusText:s.statusText,headers:e})}return s})})));if(!(s instanceof Response))return new Response(null,{status:500});if(s.headers.has("x-middleware-rewrite"))throw Error("NextResponse.rewrite() was used in a app route handler, this is not currently supported. Please remove the invocation to continue.");if("1"===s.headers.get("x-middleware-next"))throw Error("NextResponse.next() was used in a app route handler, this is not supported. See here for more info: https://nextjs.org/docs/messages/next-response-next-in-app-route-handler");return s}async handle(e,t){try{return await this.execute(e,t)}catch(t){let e=function(e){if(ey(e)){let t=ey(e)?e.digest.split(";",3)[2]:null;if(!t)throw Error("Invariant: Unexpected redirect url format");let r=function(e){if(!ey(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(e);return function(e,t,r){let n=new Headers({location:e});return N(n,t),new Response(null,{status:r,headers:n})}(t,e.mutableCookies,r)}return"object"==typeof e&&null!==e&&"digest"in e&&"NEXT_NOT_FOUND"===e.digest&&new Response(null,{status:404})}(t);if(!e)throw t;return e}}}let e_=eC;function eE(e){return!!e.POST||!!e.POST||!!e.DELETE||!!e.PATCH||!!e.OPTIONS}let eT=Symbol("nextUrl"),ek=Symbol("clone"),eP=Symbol("clone"),eO=Symbol("searchParams"),eN=Symbol("href"),eA=Symbol("toString"),ej=Symbol("headers"),e$=Symbol("cookies"),eM={get(e,t,r){switch(t){case"headers":return e[ej]||(e[ej]=_.seal(new Headers({})));case"cookies":return e[e$]||(e[e$]=P.seal(new E.RequestCookies(new Headers({}))));case"nextUrl":return e[eT]||(e[eT]=new Proxy(e.nextUrl,eH));case"url":return r.nextUrl.href;case"geo":case"ip":return;case"clone":return e[ek]||(e[ek]=()=>new Proxy(e.clone(),eM));default:return R.get(e,t,r)}}},eH={get(e,t,r){switch(t){case"search":return"";case"searchParams":return e[eO]||(e[eO]=new URLSearchParams);case"href":return e[eN]||(e[eN]=function(e){let t=new URL(e);return t.host="localhost:3000",t.search="",t.protocol="http",t}(e.href).href);case"toJSON":case"toString":return e[eA]||(e[eA]=()=>r.href);case"url":return;case"clone":return e[eP]||(e[eP]=()=>new Proxy(e.clone(),eH));default:return R.get(e,t,r)}}},eD={get(e,t,r){switch(t){case"nextUrl":return e[eT]||(e[eT]=new Proxy(e.nextUrl,eL));case"headers":case"cookies":case"url":case"body":case"blob":case"json":case"text":case"arrayBuffer":case"formData":throw new G(`Route ${e.nextUrl.pathname} with \`dynamic = "error"\` couldn't be rendered statically because it used \`request.${t}\`.`);case"clone":return e[ek]||(e[ek]=()=>new Proxy(e.clone(),eD));default:return R.get(e,t,r)}}},eL={get(e,t,r){switch(t){case"search":case"searchParams":case"url":case"href":case"toJSON":case"toString":case"origin":throw new G(`Route ${e.pathname} with \`dynamic = "error"\` couldn't be rendered statically because it used \`nextUrl.${t}\`.`);case"clone":return e[eP]||(e[eP]=()=>new Proxy(e.clone(),eL));default:return R.get(e,t,r)}}}})(),module.exports=n})();
//# sourceMappingURL=app-route-experimental.runtime.prod.js.map