Preview: render.js.map
Size: 82.17 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/next/dist/server/render.js.map
{"version":3,"sources":["../../src/server/render.tsx"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'http'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { NextRouter } from '../shared/lib/router/router'\nimport type { HtmlProps } from '../shared/lib/html-context.shared-runtime'\nimport type { DomainLocale } from './config'\nimport type {\n AppType,\n DocumentInitialProps,\n DocumentType,\n DocumentProps,\n DocumentContext,\n NextComponentType,\n RenderPage,\n RenderPageResult,\n} from '../shared/lib/utils'\nimport type { ImageConfigComplete } from '../shared/lib/image-config'\nimport type { Redirect } from '../lib/load-custom-routes'\nimport {\n type NextApiRequestCookies,\n type __ApiPreviewProps,\n setLazyProp,\n} from './api-utils'\nimport { getCookieParser } from './api-utils/get-cookie-parser'\nimport type { LoadComponentsReturnType } from './load-components'\nimport type {\n GetServerSideProps,\n GetStaticProps,\n PreviewData,\n ServerRuntime,\n SizeLimit,\n} from '../types'\nimport type { UnwrapPromise } from '../lib/coalesced-function'\nimport type { ReactReadableStream } from './stream-utils/node-web-streams-helper'\nimport type { ClientReferenceManifest } from '../build/webpack/plugins/flight-manifest-plugin'\nimport type { NextFontManifest } from '../build/webpack/plugins/next-font-manifest-plugin'\nimport type { PagesModule } from './route-modules/pages/module'\nimport type { ComponentsEnhancer } from '../shared/lib/utils'\nimport type { NextParsedUrlQuery } from './request-meta'\nimport type { Revalidate } from './lib/cache-control'\nimport type { COMPILER_NAMES } from '../shared/lib/constants'\n\nimport React, { type JSX } from 'react'\nimport ReactDOMServerPages from 'next/dist/server/ReactDOMServerPages'\nimport { StyleRegistry, createStyleRegistry } from 'styled-jsx'\nimport {\n GSP_NO_RETURNED_VALUE,\n GSSP_COMPONENT_MEMBER_ERROR,\n GSSP_NO_RETURNED_VALUE,\n STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR,\n SERVER_PROPS_GET_INIT_PROPS_CONFLICT,\n SERVER_PROPS_SSG_CONFLICT,\n SSG_GET_INITIAL_PROPS_CONFLICT,\n UNSTABLE_REVALIDATE_RENAME_ERROR,\n} from '../lib/constants'\nimport {\n NEXT_BUILTIN_DOCUMENT,\n SERVER_PROPS_ID,\n STATIC_PROPS_ID,\n STATIC_STATUS_PAGES,\n} from '../shared/lib/constants'\nimport { isSerializableProps } from '../lib/is-serializable-props'\nimport { isInAmpMode } from '../shared/lib/amp-mode'\nimport { AmpStateContext } from '../shared/lib/amp-context.shared-runtime'\nimport { defaultHead } from '../shared/lib/head'\nimport { HeadManagerContext } from '../shared/lib/head-manager-context.shared-runtime'\nimport Loadable from '../shared/lib/loadable.shared-runtime'\nimport { LoadableContext } from '../shared/lib/loadable-context.shared-runtime'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport {\n getDisplayName,\n isResSent,\n loadGetInitialProps,\n} from '../shared/lib/utils'\nimport { HtmlContext } from '../shared/lib/html-context.shared-runtime'\nimport { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'\nimport { denormalizePagePath } from '../shared/lib/page-path/denormalize-page-path'\nimport { getRequestMeta } from './request-meta'\nimport { allowedStatusCodes, getRedirectStatus } from '../lib/redirect-status'\nimport RenderResult, { type PagesRenderResultMetadata } from './render-result'\nimport isError from '../lib/is-error'\nimport {\n streamToString,\n renderToInitialFizzStream,\n} from './stream-utils/node-web-streams-helper'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\nimport { stripInternalQueries } from './internal-utils'\nimport {\n adaptForAppRouterInstance,\n adaptForPathParams,\n adaptForSearchParams,\n PathnameContextProviderAdapter,\n} from '../shared/lib/router/adapters'\nimport { AppRouterContext } from '../shared/lib/app-router-context.shared-runtime'\nimport {\n SearchParamsContext,\n PathParamsContext,\n} from '../shared/lib/hooks-client-context.shared-runtime'\nimport { getTracer } from './lib/trace/tracer'\nimport { RenderSpan } from './lib/trace/constants'\nimport { ReflectAdapter } from './web/spec-extension/adapters/reflect'\nimport { getCacheControlHeader } from './lib/cache-control'\nimport { getErrorSource } from '../shared/lib/error-source'\nimport type { DeepReadonly } from '../shared/lib/deep-readonly'\nimport type { PagesDevOverlayType } from '../client/components/react-dev-overlay/pages/pages-dev-overlay'\n\nlet tryGetPreviewData: typeof import('./api-utils/node/try-get-preview-data').tryGetPreviewData\nlet warn: typeof import('../build/output/log').warn\nlet postProcessHTML: typeof import('./post-process').postProcessHTML\n\nconst DOCTYPE = '<!DOCTYPE html>'\n\nif (process.env.NEXT_RUNTIME !== 'edge') {\n tryGetPreviewData =\n require('./api-utils/node/try-get-preview-data').tryGetPreviewData\n warn = require('../build/output/log').warn\n postProcessHTML = require('./post-process').postProcessHTML\n} else {\n warn = console.warn.bind(console)\n postProcessHTML = async (_pathname: string, html: string) => html\n}\n\nfunction noRouter() {\n const message =\n 'No router instance found. you should only use \"next/router\" inside the client side of your app. https://nextjs.org/docs/messages/no-router-instance'\n throw new Error(message)\n}\n\nasync function renderToString(element: React.ReactElement) {\n const renderStream = await ReactDOMServerPages.renderToReadableStream(element)\n await renderStream.allReady\n return streamToString(renderStream)\n}\n\nclass ServerRouter implements NextRouter {\n route: string\n pathname: string\n query: ParsedUrlQuery\n asPath: string\n basePath: string\n events: any\n isFallback: boolean\n locale?: string\n isReady: boolean\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n isPreview: boolean\n isLocaleDomain: boolean\n\n constructor(\n pathname: string,\n query: ParsedUrlQuery,\n as: string,\n { isFallback }: { isFallback: boolean },\n isReady: boolean,\n basePath: string,\n locale?: string,\n locales?: readonly string[],\n defaultLocale?: string,\n domainLocales?: readonly DomainLocale[],\n isPreview?: boolean,\n isLocaleDomain?: boolean\n ) {\n this.route = pathname.replace(/\\/$/, '') || '/'\n this.pathname = pathname\n this.query = query\n this.asPath = as\n this.isFallback = isFallback\n this.basePath = basePath\n this.locale = locale\n this.locales = locales\n this.defaultLocale = defaultLocale\n this.isReady = isReady\n this.domainLocales = domainLocales\n this.isPreview = !!isPreview\n this.isLocaleDomain = !!isLocaleDomain\n }\n\n push(): any {\n noRouter()\n }\n replace(): any {\n noRouter()\n }\n reload() {\n noRouter()\n }\n back() {\n noRouter()\n }\n forward(): void {\n noRouter()\n }\n prefetch(): any {\n noRouter()\n }\n beforePopState() {\n noRouter()\n }\n}\n\nfunction enhanceComponents(\n options: ComponentsEnhancer,\n App: AppType,\n Component: NextComponentType\n): {\n App: AppType\n Component: NextComponentType\n} {\n // For backwards compatibility\n if (typeof options === 'function') {\n return {\n App,\n Component: options(Component),\n }\n }\n\n return {\n App: options.enhanceApp ? options.enhanceApp(App) : App,\n Component: options.enhanceComponent\n ? options.enhanceComponent(Component)\n : Component,\n }\n}\n\nfunction renderPageTree(\n App: AppType,\n Component: NextComponentType,\n props: any\n) {\n return <App Component={Component} {...props} />\n}\n\nexport type RenderOptsPartial = {\n canonicalBase: string\n runtimeConfig?: { [key: string]: any }\n assetPrefix?: string\n err?: Error | null\n nextExport?: boolean\n dev?: boolean\n ampPath?: string\n ErrorDebug?: PagesDevOverlayType\n ampValidator?: (html: string, pathname: string) => Promise<void>\n ampSkipValidation?: boolean\n ampOptimizerConfig?: { [key: string]: any }\n isNextDataRequest?: boolean\n params?: ParsedUrlQuery\n previewProps: __ApiPreviewProps | undefined\n basePath: string\n unstable_runtimeJS?: false\n unstable_JsPreload?: false\n optimizeCss: any\n nextConfigOutput?: 'standalone' | 'export'\n nextScriptWorkers: any\n assetQueryString?: string\n resolvedUrl?: string\n resolvedAsPath?: string\n setIsrStatus?: (key: string, value: boolean | null) => void\n clientReferenceManifest?: DeepReadonly<ClientReferenceManifest>\n nextFontManifest?: DeepReadonly<NextFontManifest>\n distDir?: string\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n disableOptimizedLoading?: boolean\n supportsDynamicResponse: boolean\n botType?: 'dom' | 'html' | undefined\n serveStreamingMetadata?: boolean\n runtime?: ServerRuntime\n serverComponents?: boolean\n serverActions?: {\n bodySizeLimit?: SizeLimit\n allowedOrigins?: string[]\n }\n crossOrigin?: 'anonymous' | 'use-credentials' | '' | undefined\n images: ImageConfigComplete\n largePageDataBytes?: number\n isOnDemandRevalidate?: boolean\n strictNextHead: boolean\n isServerAction?: boolean\n isExperimentalCompile?: boolean\n isPrefetch?: boolean\n expireTime?: number\n experimental: {\n clientTraceMetadata?: string[]\n }\n}\n\nexport type RenderOpts = LoadComponentsReturnType<PagesModule> &\n RenderOptsPartial\n\n/**\n * Shared context used for all page renders.\n */\nexport type PagesSharedContext = {\n /**\n * Used to facilitate caching of page bundles, we send it to the client so\n * that pageloader knows where to load bundles.\n */\n buildId: string\n\n /**\n * The deployment ID if the user is deploying to a platform that provides one.\n */\n deploymentId: string | undefined\n\n /**\n * True if the user is using a custom server.\n */\n customServer: true | undefined\n}\n\n/**\n * The context for the given request.\n */\nexport type PagesRenderContext = {\n /**\n * Whether this should be rendered as a fallback page.\n */\n isFallback: boolean\n\n /**\n * Whether this is in draft mode.\n */\n isDraftMode: boolean | undefined\n\n /**\n * In development, the original source page that returned a 404.\n */\n developmentNotFoundSourcePage: string | undefined\n}\n\n/**\n * RenderOptsExtra is being used to split away functionality that's within the\n * renderOpts. Eventually we can have more explicit render options for each\n * route kind.\n */\nexport type RenderOptsExtra = {\n App: AppType\n Document: DocumentType\n}\n\nconst invalidKeysMsg = (\n methodName: 'getServerSideProps' | 'getStaticProps',\n invalidKeys: string[]\n) => {\n const docsPathname = `invalid-${methodName.toLocaleLowerCase()}-value`\n\n return (\n `Additional keys were returned from \\`${methodName}\\`. Properties intended for your component must be nested under the \\`props\\` key, e.g.:` +\n `\\n\\n\\treturn { props: { title: 'My Title', content: '...' } }` +\n `\\n\\nKeys that need to be moved: ${invalidKeys.join(', ')}.` +\n `\\nRead more: https://nextjs.org/docs/messages/${docsPathname}`\n )\n}\n\nfunction checkRedirectValues(\n redirect: Redirect,\n req: IncomingMessage,\n method: 'getStaticProps' | 'getServerSideProps'\n) {\n const { destination, permanent, statusCode, basePath } = redirect\n let errors: string[] = []\n\n const hasStatusCode = typeof statusCode !== 'undefined'\n const hasPermanent = typeof permanent !== 'undefined'\n\n if (hasPermanent && hasStatusCode) {\n errors.push(`\\`permanent\\` and \\`statusCode\\` can not both be provided`)\n } else if (hasPermanent && typeof permanent !== 'boolean') {\n errors.push(`\\`permanent\\` must be \\`true\\` or \\`false\\``)\n } else if (hasStatusCode && !allowedStatusCodes.has(statusCode!)) {\n errors.push(\n `\\`statusCode\\` must undefined or one of ${[...allowedStatusCodes].join(\n ', '\n )}`\n )\n }\n const destinationType = typeof destination\n\n if (destinationType !== 'string') {\n errors.push(\n `\\`destination\\` should be string but received ${destinationType}`\n )\n }\n\n const basePathType = typeof basePath\n\n if (basePathType !== 'undefined' && basePathType !== 'boolean') {\n errors.push(\n `\\`basePath\\` should be undefined or a false, received ${basePathType}`\n )\n }\n\n if (errors.length > 0) {\n throw new Error(\n `Invalid redirect object returned from ${method} for ${req.url}\\n` +\n errors.join(' and ') +\n '\\n' +\n `See more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp`\n )\n }\n}\n\nexport function errorToJSON(err: Error) {\n let source: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer =\n 'server'\n\n if (process.env.NEXT_RUNTIME !== 'edge') {\n source = getErrorSource(err) || 'server'\n }\n\n return {\n name: err.name,\n source,\n message: stripAnsi(err.message),\n stack: err.stack,\n digest: (err as any).digest,\n }\n}\n\nfunction serializeError(\n dev: boolean | undefined,\n err: Error\n): Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n} {\n if (dev) {\n return errorToJSON(err)\n }\n\n return {\n name: 'Internal Server Error.',\n message: '500 - Internal Server Error.',\n statusCode: 500,\n }\n}\n\nexport async function renderToHTMLImpl(\n req: IncomingMessage,\n res: ServerResponse,\n pathname: string,\n query: NextParsedUrlQuery,\n renderOpts: Omit<RenderOpts, keyof RenderOptsExtra>,\n extra: RenderOptsExtra,\n sharedContext: PagesSharedContext,\n renderContext: PagesRenderContext\n): Promise<RenderResult> {\n // Adds support for reading `cookies` in `getServerSideProps` when SSR.\n setLazyProp({ req: req as any }, 'cookies', getCookieParser(req.headers))\n\n const metadata: PagesRenderResultMetadata = {}\n\n metadata.assetQueryString =\n (renderOpts.dev && renderOpts.assetQueryString) || ''\n\n if (renderOpts.dev && !metadata.assetQueryString) {\n const userAgent = (req.headers['user-agent'] || '').toLowerCase()\n if (userAgent.includes('safari') && !userAgent.includes('chrome')) {\n // In dev we invalidate the cache by appending a timestamp to the resource URL.\n // This is a workaround to fix https://github.com/vercel/next.js/issues/5860\n // TODO: remove this workaround when https://bugs.webkit.org/show_bug.cgi?id=187726 is fixed.\n // Note: The workaround breaks breakpoints on reload since the script url always changes,\n // so we only apply it to Safari.\n metadata.assetQueryString = `?ts=${Date.now()}`\n }\n }\n\n // if deploymentId is provided we append it to all asset requests\n if (sharedContext.deploymentId) {\n metadata.assetQueryString += `${metadata.assetQueryString ? '&' : '?'}dpl=${\n sharedContext.deploymentId\n }`\n }\n\n // don't modify original query object\n query = Object.assign({}, query)\n\n const {\n err,\n dev = false,\n ampPath = '',\n pageConfig = {},\n buildManifest,\n reactLoadableManifest,\n ErrorDebug,\n getStaticProps,\n getStaticPaths,\n getServerSideProps,\n isNextDataRequest,\n params,\n previewProps,\n basePath,\n images,\n runtime: globalRuntime,\n isExperimentalCompile,\n expireTime,\n } = renderOpts\n const { App } = extra\n\n const assetQueryString = metadata.assetQueryString\n\n let Document = extra.Document\n\n let Component: React.ComponentType<{}> | ((props: any) => JSX.Element) =\n renderOpts.Component\n const OriginComponent = Component\n\n const isFallback = renderContext.isFallback ?? false\n const notFoundSrcPage = renderContext.developmentNotFoundSourcePage\n\n // next internal queries should be stripped out\n stripInternalQueries(query)\n\n const isSSG = !!getStaticProps\n const isBuildTimeSSG = isSSG && renderOpts.nextExport\n const defaultAppGetInitialProps =\n App.getInitialProps === (App as any).origGetInitialProps\n\n const hasPageGetInitialProps = !!(Component as any)?.getInitialProps\n const hasPageScripts = (Component as any)?.unstable_scriptLoader\n\n const pageIsDynamic = isDynamicRoute(pathname)\n\n const defaultErrorGetInitialProps =\n pathname === '/_error' &&\n (Component as any).getInitialProps ===\n (Component as any).origGetInitialProps\n\n if (\n renderOpts.nextExport &&\n hasPageGetInitialProps &&\n !defaultErrorGetInitialProps\n ) {\n warn(\n `Detected getInitialProps on page '${pathname}'` +\n ` while running export. It's recommended to use getStaticProps` +\n ` which has a more correct behavior for static exporting.` +\n `\\nRead more: https://nextjs.org/docs/messages/get-initial-props-export`\n )\n }\n\n let isAutoExport =\n !hasPageGetInitialProps &&\n defaultAppGetInitialProps &&\n !isSSG &&\n !getServerSideProps\n\n // if we are running from experimental compile and the page\n // would normally be automatically statically optimized\n // ensure we set cache header so it's not rendered on-demand\n // every request\n if (isAutoExport && !dev && isExperimentalCompile) {\n res.setHeader(\n 'Cache-Control',\n getCacheControlHeader({ revalidate: false, expire: expireTime })\n )\n isAutoExport = false\n }\n\n if (hasPageGetInitialProps && isSSG) {\n throw new Error(SSG_GET_INITIAL_PROPS_CONFLICT + ` ${pathname}`)\n }\n\n if (hasPageGetInitialProps && getServerSideProps) {\n throw new Error(SERVER_PROPS_GET_INIT_PROPS_CONFLICT + ` ${pathname}`)\n }\n\n if (getServerSideProps && isSSG) {\n throw new Error(SERVER_PROPS_SSG_CONFLICT + ` ${pathname}`)\n }\n\n if (getServerSideProps && renderOpts.nextConfigOutput === 'export') {\n throw new Error(\n 'getServerSideProps cannot be used with \"output: export\". See more info here: https://nextjs.org/docs/advanced-features/static-html-export'\n )\n }\n\n if (getStaticPaths && !pageIsDynamic) {\n throw new Error(\n `getStaticPaths is only allowed for dynamic SSG pages and was found on '${pathname}'.` +\n `\\nRead more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`\n )\n }\n\n if (!!getStaticPaths && !isSSG) {\n throw new Error(\n `getStaticPaths was added without a getStaticProps in ${pathname}. Without getStaticProps, getStaticPaths does nothing`\n )\n }\n\n if (isSSG && pageIsDynamic && !getStaticPaths) {\n throw new Error(\n `getStaticPaths is required for dynamic SSG pages and is missing for '${pathname}'.` +\n `\\nRead more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`\n )\n }\n\n let asPath: string = renderOpts.resolvedAsPath || (req.url as string)\n\n if (dev) {\n const { isValidElementType } = require('next/dist/compiled/react-is')\n if (!isValidElementType(Component)) {\n throw new Error(\n `The default export is not a React Component in page: \"${pathname}\"`\n )\n }\n\n if (!isValidElementType(App)) {\n throw new Error(\n `The default export is not a React Component in page: \"/_app\"`\n )\n }\n\n if (!isValidElementType(Document)) {\n throw new Error(\n `The default export is not a React Component in page: \"/_document\"`\n )\n }\n\n if (isAutoExport || isFallback) {\n // remove query values except ones that will be set during export\n query = {\n ...(query.amp\n ? {\n amp: query.amp,\n }\n : {}),\n }\n asPath = `${pathname}${\n // ensure trailing slash is present for non-dynamic auto-export pages\n req.url!.endsWith('/') && pathname !== '/' && !pageIsDynamic ? '/' : ''\n }`\n req.url = pathname\n }\n\n if (pathname === '/404' && (hasPageGetInitialProps || getServerSideProps)) {\n throw new Error(\n `\\`pages/404\\` ${STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR}`\n )\n }\n if (\n STATIC_STATUS_PAGES.includes(pathname) &&\n (hasPageGetInitialProps || getServerSideProps)\n ) {\n throw new Error(\n `\\`pages${pathname}\\` ${STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR}`\n )\n }\n\n if (renderOpts?.setIsrStatus) {\n renderOpts.setIsrStatus(asPath, isSSG || isAutoExport ? true : null)\n }\n }\n\n for (const methodName of [\n 'getStaticProps',\n 'getServerSideProps',\n 'getStaticPaths',\n ]) {\n if ((Component as any)?.[methodName]) {\n throw new Error(\n `page ${pathname} ${methodName} ${GSSP_COMPONENT_MEMBER_ERROR}`\n )\n }\n }\n\n await Loadable.preloadAll() // Make sure all dynamic imports are loaded\n\n let isPreview: boolean | undefined = undefined\n let previewData: PreviewData\n\n if (\n (isSSG || getServerSideProps) &&\n !isFallback &&\n process.env.NEXT_RUNTIME !== 'edge' &&\n previewProps\n ) {\n // Reads of this are cached on the `req` object, so this should resolve\n // instantly. There's no need to pass this data down from a previous\n // invoke.\n previewData = tryGetPreviewData(\n req,\n res,\n previewProps,\n !!renderOpts.multiZoneDraftMode\n )\n isPreview = previewData !== false\n }\n\n // url will always be set\n const routerIsReady = !!(\n getServerSideProps ||\n hasPageGetInitialProps ||\n (!defaultAppGetInitialProps && !isSSG) ||\n isExperimentalCompile\n )\n const router = new ServerRouter(\n pathname,\n query,\n asPath,\n {\n isFallback: isFallback,\n },\n routerIsReady,\n basePath,\n renderOpts.locale,\n renderOpts.locales,\n renderOpts.defaultLocale,\n renderOpts.domainLocales,\n isPreview,\n getRequestMeta(req, 'isLocaleDomain')\n )\n\n const appRouter = adaptForAppRouterInstance(router)\n\n let scriptLoader: any = {}\n const jsxStyleRegistry = createStyleRegistry()\n const ampState = {\n ampFirst: pageConfig.amp === true,\n hasQuery: Boolean(query.amp),\n hybrid: pageConfig.amp === 'hybrid',\n }\n\n // Disable AMP under the web environment\n const inAmpMode = process.env.NEXT_RUNTIME !== 'edge' && isInAmpMode(ampState)\n let head: JSX.Element[] = defaultHead(inAmpMode)\n const reactLoadableModules: string[] = []\n\n let initialScripts: any = {}\n if (hasPageScripts) {\n initialScripts.beforeInteractive = []\n .concat(hasPageScripts())\n .filter((script: any) => script.props.strategy === 'beforeInteractive')\n .map((script: any) => script.props)\n }\n\n const AppContainer = ({ children }: { children: JSX.Element }) => (\n <AppRouterContext.Provider value={appRouter}>\n <SearchParamsContext.Provider value={adaptForSearchParams(router)}>\n <PathnameContextProviderAdapter\n router={router}\n isAutoExport={isAutoExport}\n >\n <PathParamsContext.Provider value={adaptForPathParams(router)}>\n <RouterContext.Provider value={router}>\n <AmpStateContext.Provider value={ampState}>\n <HeadManagerContext.Provider\n value={{\n updateHead: (state) => {\n head = state\n },\n updateScripts: (scripts) => {\n scriptLoader = scripts\n },\n scripts: initialScripts,\n mountedInstances: new Set(),\n }}\n >\n <LoadableContext.Provider\n value={(moduleName) =>\n reactLoadableModules.push(moduleName)\n }\n >\n <StyleRegistry registry={jsxStyleRegistry}>\n <ImageConfigContext.Provider value={images}>\n {children}\n </ImageConfigContext.Provider>\n </StyleRegistry>\n </LoadableContext.Provider>\n </HeadManagerContext.Provider>\n </AmpStateContext.Provider>\n </RouterContext.Provider>\n </PathParamsContext.Provider>\n </PathnameContextProviderAdapter>\n </SearchParamsContext.Provider>\n </AppRouterContext.Provider>\n )\n\n // The `useId` API uses the path indexes to generate an ID for each node.\n // To guarantee the match of hydration, we need to ensure that the structure\n // of wrapper nodes is isomorphic in server and client.\n // TODO: With `enhanceApp` and `enhanceComponents` options, this approach may\n // not be useful.\n // https://github.com/facebook/react/pull/22644\n const Noop = () => null\n const AppContainerWithIsomorphicFiberStructure: React.FC<{\n children: JSX.Element\n }> = ({ children }) => {\n return (\n <>\n {/* <Head/> */}\n <Noop />\n <AppContainer>\n <>\n {/* <ReactDevOverlay/> */}\n {dev ? (\n <>\n {children}\n <Noop />\n </>\n ) : (\n children\n )}\n {/* <RouteAnnouncer/> */}\n <Noop />\n </>\n </AppContainer>\n </>\n )\n }\n\n const ctx = {\n err,\n req: isAutoExport ? undefined : req,\n res: isAutoExport ? undefined : res,\n pathname,\n query,\n asPath,\n locale: renderOpts.locale,\n locales: renderOpts.locales,\n defaultLocale: renderOpts.defaultLocale,\n AppTree: (props: any) => {\n return (\n <AppContainerWithIsomorphicFiberStructure>\n {renderPageTree(App, OriginComponent, { ...props, router })}\n </AppContainerWithIsomorphicFiberStructure>\n )\n },\n defaultGetInitialProps: async (\n docCtx: DocumentContext,\n options: { nonce?: string } = {}\n ): Promise<DocumentInitialProps> => {\n const enhanceApp = (AppComp: any) => {\n return (props: any) => <AppComp {...props} />\n }\n\n const { html, head: renderPageHead } = await docCtx.renderPage({\n enhanceApp,\n })\n const styles = jsxStyleRegistry.styles({ nonce: options.nonce })\n jsxStyleRegistry.flush()\n return { html, head: renderPageHead, styles }\n },\n }\n let props: any\n\n const nextExport =\n !isSSG && (renderOpts.nextExport || (dev && (isAutoExport || isFallback)))\n\n const styledJsxInsertedHTML = () => {\n const styles = jsxStyleRegistry.styles()\n jsxStyleRegistry.flush()\n return <>{styles}</>\n }\n\n props = await loadGetInitialProps(App, {\n AppTree: ctx.AppTree,\n Component,\n router,\n ctx,\n })\n\n if ((isSSG || getServerSideProps) && isPreview) {\n props.__N_PREVIEW = true\n }\n\n if (isSSG) {\n props[STATIC_PROPS_ID] = true\n }\n\n if (isSSG && !isFallback) {\n let data: Readonly<UnwrapPromise<ReturnType<GetStaticProps>>>\n\n try {\n data = await getTracer().trace(\n RenderSpan.getStaticProps,\n {\n spanName: `getStaticProps ${pathname}`,\n attributes: {\n 'next.route': pathname,\n },\n },\n () =>\n getStaticProps({\n ...(pageIsDynamic ? { params } : undefined),\n ...(isPreview\n ? { draftMode: true, preview: true, previewData: previewData }\n : undefined),\n locales: [...(renderOpts.locales ?? [])],\n locale: renderOpts.locale,\n defaultLocale: renderOpts.defaultLocale,\n revalidateReason: renderOpts.isOnDemandRevalidate\n ? 'on-demand'\n : isBuildTimeSSG\n ? 'build'\n : 'stale',\n })\n )\n } catch (staticPropsError: any) {\n // remove not found error code to prevent triggering legacy\n // 404 rendering\n if (staticPropsError && staticPropsError.code === 'ENOENT') {\n delete staticPropsError.code\n }\n throw staticPropsError\n }\n\n if (data == null) {\n throw new Error(GSP_NO_RETURNED_VALUE)\n }\n\n const invalidKeys = Object.keys(data).filter(\n (key) =>\n key !== 'revalidate' &&\n key !== 'props' &&\n key !== 'redirect' &&\n key !== 'notFound'\n )\n\n if (invalidKeys.includes('unstable_revalidate')) {\n throw new Error(UNSTABLE_REVALIDATE_RENAME_ERROR)\n }\n\n if (invalidKeys.length) {\n throw new Error(invalidKeysMsg('getStaticProps', invalidKeys))\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (\n typeof (data as any).notFound !== 'undefined' &&\n typeof (data as any).redirect !== 'undefined'\n ) {\n throw new Error(\n `\\`redirect\\` and \\`notFound\\` can not both be returned from ${\n isSSG ? 'getStaticProps' : 'getServerSideProps'\n } at the same time. Page: ${pathname}\\nSee more info here: https://nextjs.org/docs/messages/gssp-mixed-not-found-redirect`\n )\n }\n }\n\n if ('notFound' in data && data.notFound) {\n if (pathname === '/404') {\n throw new Error(\n `The /404 page can not return notFound in \"getStaticProps\", please remove it to continue!`\n )\n }\n\n metadata.isNotFound = true\n }\n\n if (\n 'redirect' in data &&\n data.redirect &&\n typeof data.redirect === 'object'\n ) {\n checkRedirectValues(data.redirect as Redirect, req, 'getStaticProps')\n\n if (isBuildTimeSSG) {\n throw new Error(\n `\\`redirect\\` can not be returned from getStaticProps during prerendering (${req.url})\\n` +\n `See more info here: https://nextjs.org/docs/messages/gsp-redirect-during-prerender`\n )\n }\n\n ;(data as any).props = {\n __N_REDIRECT: data.redirect.destination,\n __N_REDIRECT_STATUS: getRedirectStatus(data.redirect),\n }\n if (typeof data.redirect.basePath !== 'undefined') {\n ;(data as any).props.__N_REDIRECT_BASE_PATH = data.redirect.basePath\n }\n metadata.isRedirect = true\n }\n\n if (\n (dev || isBuildTimeSSG) &&\n !metadata.isNotFound &&\n !isSerializableProps(pathname, 'getStaticProps', (data as any).props)\n ) {\n // this fn should throw an error instead of ever returning `false`\n throw new Error(\n 'invariant: getStaticProps did not return valid props. Please report this.'\n )\n }\n\n let revalidate: Revalidate\n if ('revalidate' in data) {\n if (data.revalidate && renderOpts.nextConfigOutput === 'export') {\n throw new Error(\n 'ISR cannot be used with \"output: export\". See more info here: https://nextjs.org/docs/advanced-features/static-html-export'\n )\n }\n if (typeof data.revalidate === 'number') {\n if (!Number.isInteger(data.revalidate)) {\n throw new Error(\n `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.` +\n `\\nTry changing the value to '${Math.ceil(\n data.revalidate\n )}' or using \\`Math.ceil()\\` if you're computing the value.`\n )\n } else if (data.revalidate <= 0) {\n throw new Error(\n `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.` +\n `\\n\\nTo never revalidate, you can set revalidate to \\`false\\` (only ran once at build-time).` +\n `\\nTo revalidate as soon as possible, you can set the value to \\`1\\`.`\n )\n } else {\n if (data.revalidate > 31536000) {\n // if it's greater than a year for some reason error\n console.warn(\n `Warning: A page's revalidate option was set to more than a year for ${req.url}. This may have been done in error.` +\n `\\nTo only run getStaticProps at build-time and not revalidate at runtime, you can set \\`revalidate\\` to \\`false\\`!`\n )\n }\n\n revalidate = data.revalidate\n }\n } else if (data.revalidate === true) {\n // When enabled, revalidate after 1 second. This value is optimal for\n // the most up-to-date page possible, but without a 1-to-1\n // request-refresh ratio.\n revalidate = 1\n } else if (\n data.revalidate === false ||\n typeof data.revalidate === 'undefined'\n ) {\n // By default, we never revalidate.\n revalidate = false\n } else {\n throw new Error(\n `A page's revalidate option must be seconds expressed as a natural number. Mixed numbers and strings cannot be used. Received '${JSON.stringify(\n data.revalidate\n )}' for ${req.url}`\n )\n }\n } else {\n // By default, we never revalidate.\n revalidate = false\n }\n\n props.pageProps = Object.assign(\n {},\n props.pageProps,\n 'props' in data ? data.props : undefined\n )\n\n // pass up cache control and props for export\n metadata.cacheControl = { revalidate, expire: undefined }\n metadata.pageData = props\n\n // this must come after revalidate is added to renderResultMeta\n if (metadata.isNotFound) {\n return new RenderResult(null, { metadata })\n }\n }\n\n if (getServerSideProps) {\n props[SERVER_PROPS_ID] = true\n }\n\n if (getServerSideProps && !isFallback) {\n let data: UnwrapPromise<ReturnType<GetServerSideProps>>\n\n let canAccessRes = true\n let resOrProxy = res\n let deferredContent = false\n if (process.env.NODE_ENV !== 'production') {\n resOrProxy = new Proxy<ServerResponse>(res, {\n get: function (obj, prop) {\n if (!canAccessRes) {\n const message =\n `You should not access 'res' after getServerSideProps resolves.` +\n `\\nRead more: https://nextjs.org/docs/messages/gssp-no-mutating-res`\n\n if (deferredContent) {\n throw new Error(message)\n } else {\n warn(message)\n }\n }\n\n if (typeof prop === 'symbol') {\n return ReflectAdapter.get(obj, prop, res)\n }\n\n return ReflectAdapter.get(obj, prop, res)\n },\n })\n }\n\n try {\n data = await getTracer().trace(\n RenderSpan.getServerSideProps,\n {\n spanName: `getServerSideProps ${pathname}`,\n attributes: {\n 'next.route': pathname,\n },\n },\n async () =>\n getServerSideProps({\n req: req as IncomingMessage & {\n cookies: NextApiRequestCookies\n },\n res: resOrProxy,\n query,\n resolvedUrl: renderOpts.resolvedUrl as string,\n ...(pageIsDynamic ? { params } : undefined),\n ...(previewData !== false\n ? { draftMode: true, preview: true, previewData: previewData }\n : undefined),\n // We create a copy here to avoid having the types of\n // `getServerSideProps` change. This ensures that users can't\n // mutate this array and have it poison the reference.\n locales: [...(renderOpts.locales ?? [])],\n locale: renderOpts.locale,\n defaultLocale: renderOpts.defaultLocale,\n })\n )\n canAccessRes = false\n metadata.cacheControl = { revalidate: 0, expire: undefined }\n } catch (serverSidePropsError: any) {\n // remove not found error code to prevent triggering legacy\n // 404 rendering\n if (\n isError(serverSidePropsError) &&\n serverSidePropsError.code === 'ENOENT'\n ) {\n delete serverSidePropsError.code\n }\n throw serverSidePropsError\n }\n\n if (data == null) {\n throw new Error(GSSP_NO_RETURNED_VALUE)\n }\n\n if ((data as any).props instanceof Promise) {\n deferredContent = true\n }\n\n const invalidKeys = Object.keys(data).filter(\n (key) => key !== 'props' && key !== 'redirect' && key !== 'notFound'\n )\n\n if ((data as any).unstable_notFound) {\n throw new Error(\n `unstable_notFound has been renamed to notFound, please update the field to continue. Page: ${pathname}`\n )\n }\n if ((data as any).unstable_redirect) {\n throw new Error(\n `unstable_redirect has been renamed to redirect, please update the field to continue. Page: ${pathname}`\n )\n }\n\n if (invalidKeys.length) {\n throw new Error(invalidKeysMsg('getServerSideProps', invalidKeys))\n }\n\n if ('notFound' in data && data.notFound) {\n if (pathname === '/404') {\n throw new Error(\n `The /404 page can not return notFound in \"getStaticProps\", please remove it to continue!`\n )\n }\n\n metadata.isNotFound = true\n return new RenderResult(null, { metadata })\n }\n\n if ('redirect' in data && typeof data.redirect === 'object') {\n checkRedirectValues(data.redirect as Redirect, req, 'getServerSideProps')\n ;(data as any).props = {\n __N_REDIRECT: data.redirect.destination,\n __N_REDIRECT_STATUS: getRedirectStatus(data.redirect),\n }\n if (typeof data.redirect.basePath !== 'undefined') {\n ;(data as any).props.__N_REDIRECT_BASE_PATH = data.redirect.basePath\n }\n metadata.isRedirect = true\n }\n\n if (deferredContent) {\n ;(data as any).props = await (data as any).props\n }\n\n if (\n (dev || isBuildTimeSSG) &&\n !isSerializableProps(pathname, 'getServerSideProps', (data as any).props)\n ) {\n // this fn should throw an error instead of ever returning `false`\n throw new Error(\n 'invariant: getServerSideProps did not return valid props. Please report this.'\n )\n }\n\n props.pageProps = Object.assign({}, props.pageProps, (data as any).props)\n metadata.pageData = props\n }\n\n if (\n !isSSG && // we only show this warning for legacy pages\n !getServerSideProps &&\n process.env.NODE_ENV !== 'production' &&\n Object.keys(props?.pageProps || {}).includes('url')\n ) {\n console.warn(\n `The prop \\`url\\` is a reserved prop in Next.js for legacy reasons and will be overridden on page ${pathname}\\n` +\n `See more info here: https://nextjs.org/docs/messages/reserved-page-prop`\n )\n }\n\n // Avoid rendering page un-necessarily for getServerSideProps data request\n // and getServerSideProps/getStaticProps redirects\n if ((isNextDataRequest && !isSSG) || metadata.isRedirect) {\n return new RenderResult(JSON.stringify(props), {\n metadata,\n })\n }\n\n // We don't call getStaticProps or getServerSideProps while generating\n // the fallback so make sure to set pageProps to an empty object\n if (isFallback) {\n props.pageProps = {}\n }\n\n // the response might be finished on the getInitialProps call\n if (isResSent(res) && !isSSG) return new RenderResult(null, { metadata })\n\n // we preload the buildManifest for auto-export dynamic pages\n // to speed up hydrating query values\n let filteredBuildManifest = buildManifest\n if (isAutoExport && pageIsDynamic) {\n const page = denormalizePagePath(normalizePagePath(pathname))\n // This code would be much cleaner using `immer` and directly pushing into\n // the result from `getPageFiles`, we could maybe consider that in the\n // future.\n if (page in filteredBuildManifest.pages) {\n filteredBuildManifest = {\n ...filteredBuildManifest,\n pages: {\n ...filteredBuildManifest.pages,\n [page]: [\n ...filteredBuildManifest.pages[page],\n ...filteredBuildManifest.lowPriorityFiles.filter((f) =>\n f.includes('_buildManifest')\n ),\n ],\n },\n lowPriorityFiles: filteredBuildManifest.lowPriorityFiles.filter(\n (f) => !f.includes('_buildManifest')\n ),\n }\n }\n }\n\n const Body = ({ children }: { children: JSX.Element }) => {\n return inAmpMode ? children : <div id=\"__next\">{children}</div>\n }\n\n const renderDocument = async () => {\n // For `Document`, there are two cases that we don't support:\n // 1. Using `Document.getInitialProps` in the Edge runtime.\n // 2. Using the class component `Document` with concurrent features.\n\n const BuiltinFunctionalDocument: DocumentType | undefined = (\n Document as any\n )[NEXT_BUILTIN_DOCUMENT]\n\n if (process.env.NEXT_RUNTIME === 'edge' && Document.getInitialProps) {\n // In the Edge runtime, `Document.getInitialProps` isn't supported.\n // We throw an error here if it's customized.\n if (BuiltinFunctionalDocument) {\n Document = BuiltinFunctionalDocument\n } else {\n throw new Error(\n '`getInitialProps` in Document component is not supported with the Edge Runtime.'\n )\n }\n }\n\n async function loadDocumentInitialProps(\n renderShell: (\n _App: AppType,\n _Component: NextComponentType\n ) => Promise<ReactReadableStream>\n ) {\n const renderPage: RenderPage = async (\n options: ComponentsEnhancer = {}\n ): Promise<RenderPageResult> => {\n if (ctx.err && ErrorDebug) {\n // Always start rendering the shell even if there's an error.\n if (renderShell) {\n renderShell(App, Component)\n }\n\n const html = await renderToString(\n <Body>\n <ErrorDebug />\n </Body>\n )\n return { html, head }\n }\n\n if (dev && (props.router || props.Component)) {\n throw new Error(\n `'router' and 'Component' can not be returned in getInitialProps from _app.js https://nextjs.org/docs/messages/cant-override-next-props`\n )\n }\n\n const { App: EnhancedApp, Component: EnhancedComponent } =\n enhanceComponents(options, App, Component)\n\n const stream = await renderShell(EnhancedApp, EnhancedComponent)\n await stream.allReady\n const html = await streamToString(stream)\n\n return { html, head }\n }\n const documentCtx = { ...ctx, renderPage }\n const docProps: DocumentInitialProps = await loadGetInitialProps(\n Document,\n documentCtx\n )\n // the response might be finished on the getInitialProps call\n if (isResSent(res) && !isSSG) return null\n\n if (!docProps || typeof docProps.html !== 'string') {\n const message = `\"${getDisplayName(\n Document\n )}.getInitialProps()\" should resolve to an object with a \"html\" prop set with a valid html string`\n throw new Error(message)\n }\n\n return { docProps, documentCtx }\n }\n\n const renderContent = (_App: AppType, _Component: NextComponentType) => {\n const EnhancedApp = _App || App\n const EnhancedComponent = _Component || Component\n\n return ctx.err && ErrorDebug ? (\n <Body>\n <ErrorDebug />\n </Body>\n ) : (\n <Body>\n <AppContainerWithIsomorphicFiberStructure>\n {renderPageTree(EnhancedApp, EnhancedComponent, {\n ...props,\n router,\n })}\n </AppContainerWithIsomorphicFiberStructure>\n </Body>\n )\n }\n\n // Always using react concurrent rendering mode with required react version 18.x\n const renderShell = async (\n EnhancedApp: AppType,\n EnhancedComponent: NextComponentType\n ) => {\n const content = renderContent(EnhancedApp, EnhancedComponent)\n return await renderToInitialFizzStream({\n ReactDOMServer: ReactDOMServerPages,\n element: content,\n })\n }\n\n const hasDocumentGetInitialProps =\n process.env.NEXT_RUNTIME !== 'edge' && !!Document.getInitialProps\n\n // If it has getInitialProps, we will render the shell in `renderPage`.\n // Otherwise we do it right now.\n let documentInitialPropsRes:\n | {}\n | Awaited<ReturnType<typeof loadDocumentInitialProps>>\n\n const [rawStyledJsxInsertedHTML, content] = await Promise.all([\n renderToString(styledJsxInsertedHTML()),\n (async () => {\n if (hasDocumentGetInitialProps) {\n documentInitialPropsRes = await loadDocumentInitialProps(renderShell)\n if (documentInitialPropsRes === null) return null\n const { docProps } = documentInitialPropsRes as any\n return docProps.html\n } else {\n documentInitialPropsRes = {}\n const stream = await renderShell(App, Component)\n await stream.allReady\n return streamToString(stream)\n }\n })(),\n ])\n\n if (content === null) {\n return null\n }\n\n const contentHTML = rawStyledJsxInsertedHTML + content\n\n // @ts-ignore: documentInitialPropsRes is set\n const { docProps } = (documentInitialPropsRes as any) || {}\n const documentElement = (htmlProps: any) => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n return (Document as any)()\n } else {\n return <Document {...htmlProps} {...docProps} />\n }\n }\n\n let styles\n if (hasDocumentGetInitialProps) {\n styles = docProps.styles\n head = docProps.head\n } else {\n styles = jsxStyleRegistry.styles()\n jsxStyleRegistry.flush()\n }\n\n return {\n contentHTML,\n documentElement,\n head,\n headTags: [],\n styles,\n }\n }\n\n getTracer().setRootSpanAttribute('next.route', renderOpts.page)\n const documentResult = await getTracer().trace(\n RenderSpan.renderDocument,\n {\n spanName: `render route (pages) ${renderOpts.page}`,\n attributes: {\n 'next.route': renderOpts.page,\n },\n },\n async () => renderDocument()\n )\n if (!documentResult) {\n return new RenderResult(null, { metadata })\n }\n\n const dynamicImportsIds = new Set<string | number>()\n const dynamicImports = new Set<string>()\n\n for (const mod of reactLoadableModules) {\n const manifestItem = reactLoadableManifest[mod]\n\n if (manifestItem) {\n dynamicImportsIds.add(manifestItem.id)\n manifestItem.files.forEach((item) => {\n dynamicImports.add(item)\n })\n }\n }\n\n const hybridAmp = ampState.hybrid\n const docComponentsRendered: DocumentProps['docComponentsRendered'] = {}\n\n const {\n assetPrefix,\n defaultLocale,\n disableOptimizedLoading,\n domainLocales,\n locale,\n locales,\n runtimeConfig,\n } = renderOpts\n const htmlProps: HtmlProps = {\n __NEXT_DATA__: {\n props, // The result of getInitialProps\n page: pathname, // The rendered page\n query, // querystring parsed / passed by the user\n buildId: sharedContext.buildId,\n assetPrefix: assetPrefix === '' ? undefined : assetPrefix, // send assetPrefix to the client side when configured, otherwise don't sent in the resulting HTML\n runtimeConfig, // runtimeConfig if provided, otherwise don't sent in the resulting HTML\n nextExport: nextExport === true ? true : undefined, // If this is a page exported by `next export`\n autoExport: isAutoExport === true ? true : undefined, // If this is an auto exported page\n isFallback,\n isExperimentalCompile,\n dynamicIds:\n dynamicImportsIds.size === 0\n ? undefined\n : Array.from(dynamicImportsIds),\n err: renderOpts.err ? serializeError(dev, renderOpts.err) : undefined, // Error if one happened, otherwise don't sent in the resulting HTML\n gsp: !!getStaticProps ? true : undefined, // whether the page is getStaticProps\n gssp: !!getServerSideProps ? true : undefined, // whether the page is getServerSideProps\n customServer: sharedContext.customServer,\n gip: hasPageGetInitialProps ? true : undefined, // whether the page has getInitialProps\n appGip: !defaultAppGetInitialProps ? true : undefined, // whether the _app has getInitialProps\n locale,\n locales,\n defaultLocale,\n domainLocales,\n isPreview: isPreview === true ? true : undefined,\n notFoundSrcPage: notFoundSrcPage && dev ? notFoundSrcPage : undefined,\n },\n strictNextHead: renderOpts.strictNextHead,\n buildManifest: filteredBuildManifest,\n docComponentsRendered,\n dangerousAsPath: router.asPath,\n canonicalBase:\n !renderOpts.ampPath && getRequestMeta(req, 'didStripLocale')\n ? `${renderOpts.canonicalBase || ''}/${renderOpts.locale}`\n : renderOpts.canonicalBase,\n ampPath,\n inAmpMode,\n isDevelopment: !!dev,\n hybridAmp,\n dynamicImports: Array.from(dynamicImports),\n dynamicCssManifest: new Set(renderOpts.dynamicCssManifest || []),\n assetPrefix,\n // Only enabled in production as development mode has features relying on HMR (style injection for example)\n unstable_runtimeJS:\n process.env.NODE_ENV === 'production'\n ? pageConfig.unstable_runtimeJS\n : undefined,\n unstable_JsPreload: pageConfig.unstable_JsPreload,\n assetQueryString,\n scriptLoader,\n locale,\n disableOptimizedLoading,\n head: documentResult.head,\n headTags: documentResult.headTags,\n styles: documentResult.styles,\n crossOrigin: renderOpts.crossOrigin,\n optimizeCss: renderOpts.optimizeCss,\n nextConfigOutput: renderOpts.nextConfigOutput,\n nextScriptWorkers: renderOpts.nextScriptWorkers,\n runtime: globalRuntime,\n largePageDataBytes: renderOpts.largePageDataBytes,\n nextFontManifest: renderOpts.nextFontManifest,\n experimentalClientTraceMetadata:\n renderOpts.experimental.clientTraceMetadata,\n }\n\n const document = (\n <AmpStateContext.Provider value={ampState}>\n <HtmlContext.Provider value={htmlProps}>\n {documentResult.documentElement(htmlProps)}\n </HtmlContext.Provider>\n </AmpStateContext.Provider>\n )\n\n const documentHTML = await getTracer().trace(\n RenderSpan.renderToString,\n async () => renderToString(document)\n )\n\n if (process.env.NODE_ENV !== 'production') {\n const nonRenderedComponents = []\n const expectedDocComponents = ['Main', 'Head', 'NextScript', 'Html']\n\n for (const comp of expectedDocComponents) {\n if (!(docComponentsRendered as any)[comp]) {\n nonRenderedComponents.push(comp)\n }\n }\n\n if (nonRenderedComponents.length) {\n const missingComponentList = nonRenderedComponents\n .map((e) => `<${e} />`)\n .join(', ')\n const plural = nonRenderedComponents.length !== 1 ? 's' : ''\n console.warn(\n `Your custom Document (pages/_document) did not render all the required subcomponent${plural}.\\n` +\n `Missing component${plural}: ${missingComponentList}\\n` +\n 'Read how to fix here: https://nextjs.org/docs/messages/missing-document-component'\n )\n }\n }\n\n const [renderTargetPrefix, renderTargetSuffix] = documentHTML.split(\n '<next-js-internal-body-render-target></next-js-internal-body-render-target>',\n 2\n )\n\n let prefix = ''\n if (!documentHTML.startsWith(DOCTYPE)) {\n prefix += DOCTYPE\n }\n prefix += renderTargetPrefix\n if (inAmpMode) {\n prefix += '<!-- __NEXT_DATA__ -->'\n }\n\n const content = prefix + documentResult.contentHTML + renderTargetSuffix\n\n const optimizedHtml = await postProcessHTML(pathname, content, renderOpts, {\n inAmpMode,\n hybridAmp,\n })\n\n return new RenderResult(optimizedHtml, { metadata })\n}\n\nexport type PagesRender = (\n req: IncomingMessage,\n res: ServerResponse,\n pathname: string,\n query: NextParsedUrlQuery,\n renderOpts: RenderOpts,\n sharedContext: PagesSharedContext,\n renderContext: PagesRenderContext\n) => Promise<RenderResult>\n\nexport const renderToHTML: PagesRender = (\n req,\n res,\n pathname,\n query,\n renderOpts,\n sharedContext,\n renderContext\n) => {\n return renderToHTMLImpl(\n req,\n res,\n pathname,\n query,\n renderOpts,\n renderOpts,\n sharedContext,\n renderContext\n )\n}\n"],"names":["errorToJSON","renderToHTML","renderToHTMLImpl","tryGetPreviewData","warn","postProcessHTML","DOCTYPE","process","env","NEXT_RUNTIME","require","console","bind","_pathname","html","noRouter","message","Error","renderToString","element","renderStream","ReactDOMServerPages","renderToReadableStream","allReady","streamToString","ServerRouter","constructor","pathname","query","as","isFallback","isReady","basePath","locale","locales","defaultLocale","domainLocales","isPreview","isLocaleDomain","route","replace","asPath","push","reload","back","forward","prefetch","beforePopState","enhanceComponents","options","App","Component","enhanceApp","enhanceComponent","renderPageTree","props","invalidKeysMsg","methodName","invalidKeys","docsPathname","toLocaleLowerCase","join","checkRedirectValues","redirect","req","method","destination","permanent","statusCode","errors","hasStatusCode","hasPermanent","allowedStatusCodes","has","destinationType","basePathType","length","url","err","source","getErrorSource","name","stripAnsi","stack","digest","serializeError","dev","res","renderOpts","extra","sharedContext","renderContext","setLazyProp","getCookieParser","headers","metadata","assetQueryString","userAgent","toLowerCase","includes","Date","now","deploymentId","Object","assign","ampPath","pageConfig","buildManifest","reactLoadableManifest","ErrorDebug","getStaticProps","getStaticPaths","getServerSideProps","isNextDataRequest","params","previewProps","images","runtime","globalRuntime","isExperimentalCompile","expireTime","Document","OriginComponent","notFoundSrcPage","developmentNotFoundSourcePage","stripInternalQueries","isSSG","isBuildTimeSSG","nextExport","defaultAppGetInitialProps","getInitialProps","origGetInitialProps","hasPageGetInitialProps","hasPageScripts","unstable_scriptLoader","pageIsDynamic","isDynamicRoute","defaultErrorGetInitialProps","isAutoExport","setHeader","getCacheControlHeader","revalidate","expire","SSG_GET_INITIAL_PROPS_CONFLICT","SERVER_PROPS_GET_INIT_PROPS_CONFLICT","SERVER_PROPS_SSG_CONFLICT","nextConfigOutput","resolvedAsPath","isValidElementType","amp","endsWith","STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR","STATIC_STATUS_PAGES","setIsrStatus","GSSP_COMPONENT_MEMBER_ERROR","Loadable","preloadAll","undefined","previewData","multiZoneDraftMode","routerIsReady","router","getRequestMeta","appRouter","adaptForAppRouterInstance","scriptLoader","jsxStyleRegistry","createStyleRegistry","ampState","ampFirst","hasQuery","Boolean","hybrid","inAmpMode","isInAmpMode","head","defaultHead","reactLoadableModules","initialScripts","beforeInteractive","concat","filter","script","strategy","map","AppContainer","children","AppRouterContext","Provider","value","SearchParamsContext","adaptForSearchParams","PathnameContextProviderAdapter","PathParamsContext","adaptForPathParams","RouterContext","AmpStateContext","HeadManagerContext","updateHead","state","updateScripts","scripts","mountedInstances","Set","LoadableContext","moduleName","StyleRegistry","registry","ImageConfigContext","Noop","AppContainerWithIsomorphicFiberStructure","ctx","AppTree","defaultGetInitialProps","docCtx","AppComp","renderPageHead","renderPage","styles","nonce","flush","styledJsxInsertedHTML","loadGetInitialProps","__N_PREVIEW","STATIC_PROPS_ID","data","getTracer","trace","RenderSpan","spanName","attributes","draftMode","preview","revalidateReason","isOnDemandRevalidate","staticPropsError","code","GSP_NO_RETURNED_VALUE","keys","key","UNSTABLE_REVALIDATE_RENAME_ERROR","NODE_ENV","notFound","isNotFound","__N_REDIRECT","__N_REDIRECT_STATUS","getRedirectStatus","__N_REDIRECT_BASE_PATH","isRedirect","isSerializableProps","Number","isInteger","Math","ceil","JSON","stringify","pageProps","cacheControl","pageData","RenderResult","SERVER_PROPS_ID","canAccessRes","resOrProxy","deferredContent","Proxy","get","obj","prop","ReflectAdapter","resolvedUrl","serverSidePropsError","isError","GSSP_NO_RETURNED_VALUE","Promise","unstable_notFound","unstable_redirect","isResSent","filteredBuildManifest","page","denormalizePagePath","normalizePagePath","pages","lowPriorityFiles","f","Body","div","id","renderDocument","BuiltinFunctionalDocument","NEXT_BUILTIN_DOCUMENT","loadDocumentInitialProps","renderShell","EnhancedApp","EnhancedComponent","stream","documentCtx","docProps","getDisplayName","renderContent","_App","_Component","content","renderToInitialFizzStream","ReactDOMServer","hasDocumentGetInitialProps","documentInitialPropsRes","rawStyledJsxInsertedHTML","all","contentHTML","documentElement","htmlProps","headTags","setRootSpanAttribute","documentResult","dynamicImportsIds","dynamicImports","mod","manifestItem","add","files","forEach","item","hybridAmp","docComponentsRendered","assetPrefix","disableOptimizedLoading","runtimeConfig","__NEXT_DATA__","buildId","autoExport","dynamicIds","size","Array","from","gsp","gssp","customServer","gip","appGip","strictNextHead","dangerousAsPath","canonicalBase","isDevelopment","dynamicCssManifest","unstable_runtimeJS","unstable_JsPreload","crossOrigin","optimizeCss","nextScriptWorkers","largePageDataBytes","nextFontManifest","experimentalClientTraceMetadata","experimental","clientTraceMetadata","document","HtmlContext","documentHTML","nonRenderedComponents","expectedDocComponents","comp","missingComponentList","e","plural","renderTargetPrefix","renderTargetSuffix","split","prefix","startsWith","optimizedHtml"],"mappings":";;;;;;;;;;;;;;;;IAuZgBA,WAAW;eAAXA;;IAurCHC,YAAY;eAAZA;;IAppCSC,gBAAgB;eAAhBA;;;;0BAraf;iCACyB;8DAmBA;4EACA;2BACmB;2BAU5C;4BAMA;qCAC6B;yBACR;yCACI;sBACJ;iDACO;8EACd;8CACW;4CACF;2BACC;uBAKxB;0CACqB;mCACM;qCACE;6BACL;gCACuB;qEACO;gEACzC;sCAIb;iDAC4B;kEACb;+BACe;0BAM9B;+CAC0B;iDAI1B;wBACmB;4BACC;yBACI;8BACO;6BACP;;;;;;AAI/B,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAEJ,MAAMC,UAAU;AAEhB,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;IACvCN,oBACEO,QAAQ,yCAAyCP,iBAAiB;IACpEC,OAAOM,QAAQ,uBAAuBN,IAAI;IAC1CC,kBAAkBK,QAAQ,kBAAkBL,eAAe;AAC7D,OAAO;IACLD,OAAOO,QAAQP,IAAI,CAACQ,IAAI,C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