25 lines
205 KiB
JavaScript
25 lines
205 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`RequestCoo
|
||
|
|
Reason: ${message}`:`Error serializing props returned from \`${method}\` in "${page}".
|
||
|
|
Reason: ${message}`)}}function isSerializableProps(page,method,input){if(!isPlainObject(input))throw Object.defineProperty(new SerializableError(page,method,"",`Props must be returned as a plain object from ${method}: \`{ props: { ... } }\` (received: \`${getObjectClassLabel(input)}\`).`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});function visit(visited,value,path){if(visited.has(value))throw Object.defineProperty(new SerializableError(page,method,path,`Circular references cannot be expressed in JSON (references: \`${visited.get(value)||"(self)"}\`).`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});visited.set(value,path)}return function isSerializable(refs,value,path){let type=typeof value;if(null===value||"boolean"===type||"number"===type||"string"===type)return!0;if("undefined"===type)throw Object.defineProperty(new SerializableError(page,method,path,"`undefined` cannot be serialized as JSON. Please use `null` or omit this value."),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});if(isPlainObject(value)){if(visit(refs,value,path),Object.entries(value).every(([key,nestedValue])=>{let nextPath=regexpPlainIdentifier.test(key)?`${path}.${key}`:`${path}[${JSON.stringify(key)}]`,newRefs=new Map(refs);return isSerializable(newRefs,key,nextPath)&&isSerializable(newRefs,nestedValue,nextPath)}))return!0;throw Object.defineProperty(new SerializableError(page,method,path,"invariant: Unknown error encountered in Object."),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}if(Array.isArray(value)){if(visit(refs,value,path),value.every((nestedValue,index)=>isSerializable(new Map(refs),nestedValue,`${path}[${index}]`)))return!0;throw Object.defineProperty(new SerializableError(page,method,path,"invariant: Unknown error encountered in Array."),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}throw Object.defineProperty(new SerializableError(page,method,path,"`"+type+"`"+("object"===type?` ("${Object.prototype.toString.call(value)}")`:"")+" cannot be serialized as JSON. Please only return JSON serializable data types."),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}(new Map,input,"")}let HeadManagerContext=external_react_default().createContext({});HeadManagerContext.displayName="HeadManagerContext";let LoadableContext=external_react_default().createContext(null);LoadableContext.displayName="LoadableContext";let ALL_INITIALIZERS=[],READY_INITIALIZERS=[];function load(loader){let promise=loader(),state={loading:!0,loaded:null,error:null};return state.promise=promise.then(loaded=>(state.loading=!1,state.loaded=loaded,loaded)).catch(err=>{throw state.loading=!1,state.error=err,err}),state}class LoadableSubscription{constructor(loadFn,opts){this._loadFn=loadFn,this._opts=opts,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:res,_opts:opts}=this;res.loading&&("number"==typeof opts.delay&&(0===opts.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},opts.delay)),"number"==typeof opts.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},opts.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(_err=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(partial){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...partial},this._callbacks.forEach(callback=>callback())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(callback){return this._callbacks.add(callback),()=>{this._callbacks.delete(callback)}}}function Loadable(opts){let opts1=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},opts),subscription=null;function init(){if(!subscription){let sub=new LoadableSubscription(load,opts1);subscription={getCur
|
||
|
|
Read more: https://nextjs.org/docs/messages/no-document-import-in-page`),"__NEXT_ERROR_CODE",{value:"E67",enumerable:!1,configurable:!0});return context}HtmlContext.displayName="HtmlContext";var redirect_status_code_RedirectStatusCode=((RedirectStatusCode={})[RedirectStatusCode.SeeOther=303]="SeeOther",RedirectStatusCode[RedirectStatusCode.TemporaryRedirect=307]="TemporaryRedirect",RedirectStatusCode[RedirectStatusCode.PermanentRedirect=308]="PermanentRedirect",RedirectStatusCode);let allowedStatusCodes=new Set([301,302,303,307,308]);function getRedirectStatus(route){return route.statusCode||(route.permanent?redirect_status_code_RedirectStatusCode.PermanentRedirect:redirect_status_code_RedirectStatusCode.TemporaryRedirect)}let ImageConfigContext=external_react_default().createContext({deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1});ImageConfigContext.displayName="ImageConfigContext";var strip_ansi=__webpack_require__("./dist/compiled/strip-ansi/index.js"),strip_ansi_default=__webpack_require__.n(strip_ansi);let INTERNAL_QUERY_NAMES=["_rsc"];class ReadonlyURLSearchParamsError extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class ReadonlyURLSearchParams extends URLSearchParams{append(){throw new ReadonlyURLSearchParamsError}delete(){throw new ReadonlyURLSearchParamsError}set(){throw new ReadonlyURLSearchParamsError}sort(){throw new ReadonlyURLSearchParamsError}}let SearchParamsContext=(0,external_react_namespaceObject.createContext)(null),PathnameContext=(0,external_react_namespaceObject.createContext)(null),PathParamsContext=(0,external_react_namespaceObject.createContext)(null),NavigationPromisesContext=(0,external_react_namespaceObject.createContext)(null);function createDevToolsInstrumentedPromise(displayName,value){let promise=Promise.resolve(value);return promise.status="fulfilled",promise.value=value,promise.displayName=`${displayName} (SSR)`,promise}function PathnameContextProviderAdapter({children,router,...props}){let ref=(0,external_react_namespaceObject.useRef)(props.isAutoExport),value=(0,external_react_namespaceObject.useMemo)(()=>{let url,isAutoExport=ref.current;if(isAutoExport&&(ref.current=!1),isDynamicRoute(router.pathname)&&(router.isFallback||isAutoExport&&!router.isReady))return null;try{url=new URL(router.asPath,"http://f")}catch(_){return"/"}return url.pathname},[router.asPath,router.isFallback,router.isReady,router.pathname]);return(0,jsx_runtime_namespaceObject.jsx)(PathnameContext.Provider,{value:value,children:children})}SearchParamsContext.displayName="SearchParamsContext",PathnameContext.displayName="PathnameContext",PathParamsContext.displayName="PathParamsContext",NavigationPromisesContext.displayName="NavigationPromisesContext";let AppRouterContext=external_react_default().createContext(null),LayoutRouterContext=external_react_default().createContext(null),GlobalLayoutRouterContext=external_react_default().createContext(null),TemplateContext=external_react_default().createContext(null);AppRouterContext.displayName="AppRouterContext",LayoutRouterContext.displayName="LayoutRouterContext",GlobalLayoutRouterContext.displayName="GlobalLayoutRouterContext",TemplateContext.displayName="TemplateContext";let MissingSlotContext=external_react_default().createContext(new Set);var reflect=__webpack_require__("./dist/esm/server/web/spec-extension/adapters/reflect.js");let symbolError=Symbol.for("NextjsError"),ESCAPE_REGEX=/[&><\u2028\u2029]/g,DOCTYPE="<!DOCTYPE html>";function noRou
|
||
|
|
|
||
|
|
return { props: { title: 'My Title', content: '...' } }
|
||
|
|
|
||
|
|
Keys that need to be moved: ${invalidKeys.join(", ")}.
|
||
|
|
Read more: https://nextjs.org/docs/messages/${docsPathname}`};function checkRedirectValues(redirect,req,method){let{destination,permanent,statusCode,basePath}=redirect,errors=[],hasStatusCode=void 0!==statusCode,hasPermanent=void 0!==permanent;hasPermanent&&hasStatusCode?errors.push("`permanent` and `statusCode` can not both be provided"):hasPermanent&&"boolean"!=typeof permanent?errors.push("`permanent` must be `true` or `false`"):hasStatusCode&&!allowedStatusCodes.has(statusCode)&&errors.push(`\`statusCode\` must undefined or one of ${[...allowedStatusCodes].join(", ")}`);let destinationType=typeof destination;"string"!==destinationType&&errors.push(`\`destination\` should be string but received ${destinationType}`);let basePathType=typeof basePath;if("undefined"!==basePathType&&"boolean"!==basePathType&&errors.push(`\`basePath\` should be undefined or a false, received ${basePathType}`),errors.length>0)throw Object.defineProperty(Error(`Invalid redirect object returned from ${method} for ${req.url}
|
||
|
|
`+errors.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp"),"__NEXT_ERROR_CODE",{value:"E185",enumerable:!1,configurable:!0})}async function renderToHTMLImpl(req,res,pathname,query,renderOpts,extra,sharedContext,renderContext){let previewData,props,isPreview;(0,api_utils.setLazyProp)({req:req},"cookies",getCookieParser(req.headers));let baseAssetQueryString=process.env.__NEXT_DEV_SERVER&&renderOpts.assetQueryString||"";if(process.env.__NEXT_DEV_SERVER&&!baseAssetQueryString){let userAgent=(req.headers["user-agent"]||"").toLowerCase();userAgent.includes("safari")&&!userAgent.includes("chrome")&&(baseAssetQueryString=`?ts=${Date.now()}`)}let mutableAssetQueryString=baseAssetQueryString+(sharedContext.deploymentId?`${baseAssetQueryString?"&":"?"}dpl=${sharedContext.deploymentId}`:""),assetQueryString=baseAssetQueryString+(sharedContext.clientAssetToken?`${baseAssetQueryString?"&":"?"}dpl=${sharedContext.clientAssetToken}`:""),metadata={assetQueryString,mutableAssetQueryString};query=Object.assign({},query);let{err,pageConfig={},buildManifest,reactLoadableManifest,ErrorDebug,getStaticProps,getStaticPaths,getServerSideProps,isNextDataRequest,params,previewProps,basePath,images,runtime:globalRuntime,isExperimentalCompile,expireTime}=renderOpts,{App}=extra,Document=extra.Document,Component=renderOpts.Component,isFallback=renderContext.isFallback??!1,notFoundSrcPage=renderContext.developmentNotFoundSourcePage;var query1=query;for(let name of INTERNAL_QUERY_NAMES)delete query1[name];let isSSG=!!getStaticProps,isBuildTimeSSG=isSSG&&renderOpts.isBuildTimePrerendering,defaultAppGetInitialProps=App.getInitialProps===App.origGetInitialProps,hasPageGetInitialProps=!!(null==Component?void 0:Component.getInitialProps),hasPageScripts=null==Component?void 0:Component.unstable_scriptLoader,pageIsDynamic=isDynamicRoute(pathname),defaultErrorGetInitialProps="/_error"===pathname&&Component.getInitialProps===Component.origGetInitialProps;renderOpts.isBuildTimePrerendering&&hasPageGetInitialProps&&!defaultErrorGetInitialProps&&warn(`Detected getInitialProps on page '${pathname}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
|
||
|
|
Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let isAutoExport=!hasPageGetInitialProps&&defaultAppGetInitialProps&&!isSSG&&!getServerSideProps;if(isAutoExport&&!process.env.__NEXT_DEV_SERVER&&isExperimentalCompile&&(res.setHeader("Cache-Control",function({revalidate,expire}){let swrHeader="number"==typeof revalidate&&void 0!==expire&&revalidate<expire?`, stale-while-revalidate=${expire-revalidate}`:"";return 0===revalidate?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof revalidate?`s-maxage=${revalidate}${swrHeader}`:`s-maxage=${constants.CACHE_ONE_YEAR_SECONDS}${swrHeader}`}({revalidate:!1,expire:expireTime})),isAutoExport=!1),hasPageGetInitialProps&&isSSG)throw Object.defineProperty(Error(constants.SSG_GET_INITIAL_PROPS_CONFLICT+` ${pathname}`),"__NEXT_ERROR_CODE",{value:"E262",enumerable:!1,configurable:!0});if(hasPageGetInitialProps&&getServerSideProps)throw Object.defineProperty(Error(constants.SERVER_PROPS_GET_INIT_PROPS_CONFLICT+` ${pathname}`),"__NEXT_ERROR_CODE",{value:"E262",enumerable:!1,configurable:!0});if(getServerSideProps&&isSSG)throw Object.defineProperty(Error(constants.SERVER_PROPS_SSG_CONFLICT+` ${pathname}`),"__NEXT_ERROR_CODE",{value:"E262",enumerable:!1,configurable:!0});if(getServerSideProps&&"export"===renderOpts.nextConfigOutput)throw Object.defineProperty(Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export'),"__NEXT_ERROR_CODE",{value:"E369",enumerable:!1,configurable:!0});if(getStaticPaths&&!pageIsDynamic)throw Object.defineProperty(Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${pathname}'.
|
||
|
|
Read more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`),"__NEXT_ERROR_CODE",{value:"E187",enumerable:!1,configurable:!0});if(getStaticPaths&&!isSSG)throw Object.defineProperty(Error(`getStaticPaths was added without a getStaticProps in ${pathname}. Without getStaticProps, getStaticPaths does nothing`),"__NEXT_ERROR_CODE",{value:"E447",enumerable:!1,configurable:!0});if(isSSG&&pageIsDynamic&&!getStaticPaths)throw Object.defineProperty(Error(`getStaticPaths is required for dynamic SSG pages and is missing for '${pathname}'.
|
||
|
|
Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`),"__NEXT_ERROR_CODE",{value:"E255",enumerable:!1,configurable:!0});let asPath=renderOpts.resolvedAsPath||req.url;if(process.env.__NEXT_DEV_SERVER){let{isValidElementType}=__webpack_require__("./dist/compiled/react-is/index.js");if(!isValidElementType(Component))throw Object.defineProperty(Error(`The default export is not a React Component in page: "${pathname}"`),"__NEXT_ERROR_CODE",{value:"E286",enumerable:!1,configurable:!0});if(!isValidElementType(App))throw Object.defineProperty(Error('The default export is not a React Component in page: "/_app"'),"__NEXT_ERROR_CODE",{value:"E464",enumerable:!1,configurable:!0});if(!isValidElementType(Document))throw Object.defineProperty(Error('The default export is not a React Component in page: "/_document"'),"__NEXT_ERROR_CODE",{value:"E511",enumerable:!1,configurable:!0});if((isAutoExport||isFallback)&&(query={},asPath=`${pathname}${req.url.endsWith("/")&&"/"!==pathname&&!pageIsDynamic?"/":""}`,req.url=pathname),"/404"===pathname&&(hasPageGetInitialProps||getServerSideProps))throw Object.defineProperty(Error(`\`pages/404\` ${constants.STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR}`),"__NEXT_ERROR_CODE",{value:"E134",enumerable:!1,configurable:!0});if(STATIC_STATUS_PAGES.includes(pathname)&&(hasPageGetInitialProps||getServerSideProps))throw Object.defineProperty(Error(`\`pages${pathname}\` ${constants.STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR}`),"__NEXT_ERROR_CODE",{value:"E125",enumerable:!1,configurable:!0});(null==renderOpts?void 0:renderOpts.setIsrStatus)&&renderOpts.setIsrStatus(asPath,isSSG||isAutoExport)}for(let methodName of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==Component?void 0:Component[methodName])throw Object.defineProperty(Error(`page ${pathname} ${methodName} ${constants.GSSP_COMPONENT_MEMBER_ERROR}`),"__NEXT_ERROR_CODE",{value:"E417",enumerable:!1,configurable:!0});await loadable_shared_runtime.preloadAll(),(isSSG||getServerSideProps)&&!isFallback&&previewProps&&(isPreview=!1!==(previewData=render_tryGetPreviewData(req,res,previewProps,!!renderOpts.multiZoneDraftMode)));let routerIsReady=!!(getServerSideProps||hasPageGetInitialProps||!defaultAppGetInitialProps&&!isSSG||isExperimentalCompile),router=new ServerRouter(pathname,query,asPath,{isFallback:isFallback},routerIsReady,basePath,renderOpts.locale,renderOpts.locales,renderOpts.defaultLocale,renderOpts.domainLocales,isPreview,getRequestMeta(req,"isLocaleDomain")),appRouter={back(){router.back()},forward(){router.forward()},refresh(){router.reload()},hmrRefresh(){},push(href,{scroll}={}){router.push(href,void 0,{scroll})},replace(href,{scroll}={}){router.replace(href,void 0,{scroll})},prefetch(href){router.prefetch(href)}},scriptLoader={},jsxStyleRegistry=(0,external_styled_jsx_namespaceObject.createStyleRegistry)(),head=[(0,jsx_runtime_namespaceObject.jsx)("meta",{charSet:"utf-8"},"charset"),(0,jsx_runtime_namespaceObject.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")],reactLoadableModules=[],initialScripts={};hasPageScripts&&(initialScripts.beforeInteractive=[].concat(hasPageScripts()).filter(script=>"beforeInteractive"===script.props.strategy).map(script=>script.props));let csp=req.headers["content-security-policy"]||req.headers["content-security-policy-report-only"],nonce="string"==typeof csp?function(cspHeaderValue){var _directive_split_slice_map_find;let directives=cspHeaderValue.split(";").map(directive=>directive.trim()),directive=directives.find(dir=>dir.startsWith("script-src"))||directives.find(dir=>dir.startsWith("default-src"));if(!directive)return;let nonce=null==(_directive_split_slice_map_find=directive.split(" ").slice(1).map(source=>source.trim()).find(source=>source.startsWith("'nonce-")&&source.length>8&&source.endsWith("'")))?void 0:_directive_split_slice_map_find.slice(7,-1);if(nonce){if(ESCAPE_REGEX.test(nonce))throw Object.defineProperty(Error("Nonce value from Content-Security-Policy contained HTML escape characters.\nLearn more: https://nextjs.org/docs/messages/nonce
|
||
|
|
See more info here: https://nextjs.org/docs/messages/gssp-mixed-not-found-redirect`),"__NEXT_ERROR_CODE",{value:"E454",enumerable:!1,configurable:!0});if("notFound"in data&&data.notFound){if("/404"===pathname)throw Object.defineProperty(Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!'),"__NEXT_ERROR_CODE",{value:"E121",enumerable:!1,configurable:!0});metadata.isNotFound=!0}if("redirect"in data&&data.redirect&&"object"==typeof data.redirect){if(checkRedirectValues(data.redirect,req,"getStaticProps"),isBuildTimeSSG)throw Object.defineProperty(Error(`\`redirect\` can not be returned from getStaticProps during prerendering (${req.url})
|
||
|
|
See more info here: https://nextjs.org/docs/messages/gsp-redirect-during-prerender`),"__NEXT_ERROR_CODE",{value:"E497",enumerable:!1,configurable:!0});data.props={__N_REDIRECT:data.redirect.destination,__N_REDIRECT_STATUS:getRedirectStatus(data.redirect)},void 0!==data.redirect.basePath&&(data.props.__N_REDIRECT_BASE_PATH=data.redirect.basePath),metadata.isRedirect=!0}if((process.env.__NEXT_DEV_SERVER||isBuildTimeSSG)&&!metadata.isNotFound&&!isSerializableProps(pathname,"getStaticProps",data.props))throw Object.defineProperty(Error("invariant: getStaticProps did not return valid props. Please report this."),"__NEXT_ERROR_CODE",{value:"E129",enumerable:!1,configurable:!0});if("revalidate"in data){if(data.revalidate&&"export"===renderOpts.nextConfigOutput)throw Object.defineProperty(Error('ISR cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export'),"__NEXT_ERROR_CODE",{value:"E201",enumerable:!1,configurable:!0});if("number"==typeof data.revalidate)if(Number.isInteger(data.revalidate))if(data.revalidate<=0)throw Object.defineProperty(Error(`A page's revalidate option can not be less than or equal to zero for ${req.url}. A revalidate option of zero means to revalidate after _every_ request, and implies stale data cannot be tolerated.
|
||
|
|
|
||
|
|
To never revalidate, you can set revalidate to \`false\` (only ran once at build-time).
|
||
|
|
To revalidate as soon as possible, you can set the value to \`1\`.`),"__NEXT_ERROR_CODE",{value:"E311",enumerable:!1,configurable:!0});else data.revalidate>31536e3&&console.warn(`Warning: A page's revalidate option was set to more than a year for ${req.url}. This may have been done in error.
|
||
|
|
To only run getStaticProps at build-time and not revalidate at runtime, you can set \`revalidate\` to \`false\`!`),revalidate=data.revalidate;else throw Object.defineProperty(Error(`A page's revalidate option must be seconds expressed as a natural number for ${req.url}. Mixed numbers, such as '${data.revalidate}', cannot be used.
|
||
|
|
Try changing the value to '${Math.ceil(data.revalidate)}' or using \`Math.ceil()\` if you're computing the value.`),"__NEXT_ERROR_CODE",{value:"E438",enumerable:!1,configurable:!0});else if(!0===data.revalidate)revalidate=1;else if(!1===data.revalidate||void 0===data.revalidate)revalidate=!1;else throw Object.defineProperty(Error(`A page's revalidate option must be seconds expressed as a natural number. Mixed numbers and strings cannot be used. Received '${JSON.stringify(data.revalidate)}' for ${req.url}`),"__NEXT_ERROR_CODE",{value:"E161",enumerable:!1,configurable:!0})}else revalidate=!1;if(props.pageProps=Object.assign({},props.pageProps,"props"in data?data.props:void 0),metadata.cacheControl={revalidate,expire:void 0},metadata.pageData=props,metadata.isNotFound)return new RenderResult(null,{metadata,contentType:null})}if(getServerSideProps&&(props.__N_SSP=!0),getServerSideProps&&!isFallback){let data,canAccessRes=!0,resOrProxy=res,deferredContent=!1;resOrProxy=new Proxy(res,{get:function(obj,prop){if(!canAccessRes){let message=`You should not access 'res' after getServerSideProps resolves.
|
||
|
|
Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res`;if(deferredContent)throw Object.defineProperty(Error(message),"__NEXT_ERROR_CODE",{value:"E1028",enumerable:!1,configurable:!0});warn(message)}return reflect.ReflectAdapter.get(obj,prop,res)}});try{data=await (0,tracer_.getTracer)().trace(trace_constants.RenderSpan.getServerSideProps,{spanName:`getServerSideProps ${pathname}`,attributes:{"next.route":pathname}},async()=>getServerSideProps({req:req,res:resOrProxy,query,resolvedUrl:renderOpts.resolvedUrl,...pageIsDynamic?{params}:void 0,...!1!==previewData?{draftMode:!0,preview:!0,previewData:previewData}:void 0,locales:[...renderOpts.locales??[]],locale:renderOpts.locale,defaultLocale:renderOpts.defaultLocale})),canAccessRes=!1,metadata.cacheControl={revalidate:0,expire:void 0}}catch(serverSidePropsError){throw"object"==typeof serverSidePropsError&&null!==serverSidePropsError&&"name"in serverSidePropsError&&"message"in serverSidePropsError&&"ENOENT"===serverSidePropsError.code&&delete serverSidePropsError.code,serverSidePropsError}if(null==data)throw Object.defineProperty(Error(constants.GSSP_NO_RETURNED_VALUE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});data.props instanceof Promise&&(deferredContent=!0);let invalidKeys=Object.keys(data).filter(key=>"props"!==key&&"redirect"!==key&&"notFound"!==key);if(data.unstable_notFound)throw Object.defineProperty(Error(`unstable_notFound has been renamed to notFound, please update the field to continue. Page: ${pathname}`),"__NEXT_ERROR_CODE",{value:"E516",enumerable:!1,configurable:!0});if(data.unstable_redirect)throw Object.defineProperty(Error(`unstable_redirect has been renamed to redirect, please update the field to continue. Page: ${pathname}`),"__NEXT_ERROR_CODE",{value:"E284",enumerable:!1,configurable:!0});if(invalidKeys.length)throw Object.defineProperty(Error(invalidKeysMsg("getServerSideProps",invalidKeys)),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});if("notFound"in data&&data.notFound){if("/404"===pathname)throw Object.defineProperty(Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!'),"__NEXT_ERROR_CODE",{value:"E121",enumerable:!1,configurable:!0});return metadata.isNotFound=!0,new RenderResult(null,{metadata,contentType:null})}if("redirect"in data&&"object"==typeof data.redirect&&(checkRedirectValues(data.redirect,req,"getServerSideProps"),data.props={__N_REDIRECT:data.redirect.destination,__N_REDIRECT_STATUS:getRedirectStatus(data.redirect)},void 0!==data.redirect.basePath&&(data.props.__N_REDIRECT_BASE_PATH=data.redirect.basePath),metadata.isRedirect=!0),deferredContent&&(data.props=await data.props),(process.env.__NEXT_DEV_SERVER||isBuildTimeSSG)&&!isSerializableProps(pathname,"getServerSideProps",data.props))throw Object.defineProperty(Error("invariant: getServerSideProps did not return valid props. Please report this."),"__NEXT_ERROR_CODE",{value:"E31",enumerable:!1,configurable:!0});props.pageProps=Object.assign({},props.pageProps,data.props),metadata.pageData=props}if(!isSSG&&!getServerSideProps&&Object.keys((null==props?void 0:props.pageProps)||{}).includes("url")&&console.warn(`The prop \`url\` is a reserved prop in Next.js for legacy reasons and will be overridden on page ${pathname}
|
||
|
|
See more info here: https://nextjs.org/docs/messages/reserved-page-prop`),isNextDataRequest&&!isSSG||metadata.isRedirect)return new RenderResult(JSON.stringify(props),{metadata,contentType:constants.JSON_CONTENT_TYPE_HEADER});if(isFallback&&(props.pageProps={}),isResSent(res)&&!isSSG)return RenderResult.EMPTY;let filteredBuildManifest=buildManifest;if(isAutoExport&&pageIsDynamic){let _page,page=(_page=normalizePathSep(normalizePagePath(pathname))).startsWith("/index/")&&!isDynamicRoute(_page)?_page.slice(6):"/index"!==_page?_page:"/";page in filteredBuildManifest.pages&&(filteredBuildManifest={...filteredBuildManifest,pages:{...filteredBuildManifest.pages,[page]:[...filteredBuildManifest.pages[page],...filteredBuildManifest.lowPriorityFiles.filter(f=>f.includes("_buildManifest"))]},lowPriorityFiles:filteredBuildManifest.lowPriorityFiles.filter(f=>!f.includes("_buildManifest"))})}let Body=({children})=>(0,jsx_runtime_namespaceObject.jsx)("div",{id:"__next",children:children}),renderDocument=async()=>{let documentInitialPropsRes,styles,styles1;async function loadDocumentInitialProps(renderShell){let renderPage=async(options={})=>{if(ctx.err&&ErrorDebug)return renderShell&&renderShell(App,Component),{html:await renderToString((0,jsx_runtime_namespaceObject.jsx)(Body,{children:(0,jsx_runtime_namespaceObject.jsx)(ErrorDebug,{})})),head};if(process.env.__NEXT_DEV_SERVER&&(props.router||props.Component))throw Object.defineProperty(Error("'router' and 'Component' can not be returned in getInitialProps from _app.js https://nextjs.org/docs/messages/cant-override-next-props"),"__NEXT_ERROR_CODE",{value:"E230",enumerable:!1,configurable:!0});let{App:EnhancedApp,Component:EnhancedComponent}="function"==typeof options?{App:App,Component:options(Component)}:{App:options.enhanceApp?options.enhanceApp(App):App,Component:options.enhanceComponent?options.enhanceComponent(Component):Component},stream=await renderShell(EnhancedApp,EnhancedComponent);return await stream.allReady,{html:await streamToString(stream),head}},documentCtx={...ctx,renderPage},docProps=await loadGetInitialProps(Document,documentCtx);if(isResSent(res)&&!isSSG)return null;if(!docProps||"string"!=typeof docProps.html)throw Object.defineProperty(Error(`"${getDisplayName(Document)}.getInitialProps()" should resolve to an object with a "html" prop set with a valid html string`),"__NEXT_ERROR_CODE",{value:"E1039",enumerable:!1,configurable:!0});return{docProps,documentCtx}}Document.__NEXT_BUILTIN_DOCUMENT__;let renderShell=async(EnhancedApp,EnhancedComponent)=>{let EnhancedApp1,EnhancedComponent1,content=(EnhancedApp1=EnhancedApp||App,EnhancedComponent1=EnhancedComponent||Component,ctx.err&&ErrorDebug?(0,jsx_runtime_namespaceObject.jsx)(Body,{children:(0,jsx_runtime_namespaceObject.jsx)(ErrorDebug,{})}):(0,jsx_runtime_namespaceObject.jsx)(Body,{children:(0,jsx_runtime_namespaceObject.jsx)(AppContainerWithIsomorphicFiberStructure,{children:renderPageTree(EnhancedApp1,EnhancedComponent1,{...props,router})})}));return await function({ReactDOMServer,element,streamOptions}){return(0,tracer_.getTracer)().trace(trace_constants.AppRenderSpan.renderToReadableStream,async()=>ReactDOMServer.renderToReadableStream(element,streamOptions))}({ReactDOMServer:ReactDOMServerPages_default(),element:content})},hasDocumentGetInitialProps=!!Document.getInitialProps,[rawStyledJsxInsertedHTML,content]=await Promise.all([renderToString((styles1=jsxStyleRegistry.styles(),jsxStyleRegistry.flush(),(0,jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment,{children:styles1}))),(async()=>{if(hasDocumentGetInitialProps){if(null===(documentInitialPropsRes=await loadDocumentInitialProps(renderShell)))return null;let{docProps}=documentInitialPropsRes;return docProps.html}{documentInitialPropsRes={};let stream=await renderShell(App,Component);return await stream.allReady,streamToString(stream)}})()]);if(null===content)return null;let{docProps}=documentInitialPropsRes||{};return hasDocumentGetInitialProps?(styles=docProps.styles,head=docProps.head):(styles=jsxStyleRegistry.styles(),jsxStyleRegi
|
||
|
|
Missing component${plural}: ${missingComponentList}
|
||
|
|
Read how to fix here: https://nextjs.org/docs/messages/missing-document-component`)}}let[renderTargetPrefix,renderTargetSuffix]=documentHTML.split("<next-js-internal-body-render-target></next-js-internal-body-render-target>",2),prefix="";documentHTML.startsWith(DOCTYPE)||(prefix+=DOCTYPE);let content=(prefix+=renderTargetPrefix)+documentResult.contentHTML+renderTargetSuffix;return new RenderResult(await postProcessHTML(content,renderOpts),{metadata,contentType:constants.HTML_CONTENT_TYPE_HEADER})}let renderToHTML=(req,res,pathname,query,renderOpts,sharedContext,renderContext)=>renderToHTMLImpl(req,res,pathname,query,renderOpts,renderOpts,sharedContext,renderContext),ServerInsertedHTMLContext=external_react_default().createContext(null);function useServerInsertedHTML(callback){let addInsertedServerHTMLCallback=(0,external_react_namespaceObject.useContext)(ServerInsertedHTMLContext);addInsertedServerHTMLCallback&&addInsertedServerHTMLCallback(callback)}class PagesRouteModule extends RouteModule{constructor(options){super(options),this.components=options.components}render(req,res,context){return renderToHTMLImpl(req,res,context.page,context.query,context.renderOpts,{App:this.components.App,Document:this.components.Document},context.sharedContext,context.renderContext)}}let vendored={contexts:entrypoints_namespaceObject},pages_module=PagesRouteModule})(),module.exports=__webpack_exports__})();
|
||
|
|
//# sourceMappingURL=pages.runtime.dev.js.map
|