UNPKG

44.2 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../client/index.tsx"],"names":["data","JSON","parse","document","getElementById","textContent","window","__NEXT_DATA__","version","process","env","__NEXT_VERSION","looseToArray","input","slice","call","props","hydrateProps","err","hydrateErr","page","query","buildId","assetPrefix","runtimeConfig","dynamicIds","isFallback","locale","locales","domainLocales","isPreview","defaultLocale","prefix","__webpack_public_path__","envConfig","setConfig","serverRuntimeConfig","publicRuntimeConfig","asPath","__NEXT_I18N_SUPPORT","normalizeLocalePath","require","detectDomainLocale","parseRelativeUrl","formatUrl","parsedAs","localePathResult","pathname","detectedLocale","detectedDomain","__NEXT_I18N_DOMAINS","location","hostname","scriptLoader","initScriptLoader","pageLoader","PageLoader","register","r","f","routeLoader","onEntrypoint","__NEXT_P","map","p","setTimeout","push","headManager","appElement","lastRenderReject","webpackHMR","router","CachedApp","onPerfEntry","Container","React","Component","componentDidCatch","componentErr","info","fn","componentDidMount","scrollToHash","isSsr","pageProps","statusCode","nextExport","search","__NEXT_HAS_REWRITES","__N_SSG","replace","String","querystring","assign","urlQueryToSearchParams","URLSearchParams","_h","shallow","componentDidUpdate","hash","substring","el","scrollIntoView","render","NODE_ENV","children","ReactDevOverlay","emitter","CachedComponent","opts","initialErr","appEntrypoint","whenEntrypoint","error","component","app","exports","mod","reportWebVitals","id","name","startTime","value","duration","entryType","entries","uniqueID","Date","now","Math","floor","random","perfStartEntry","length","label","pageEntrypoint","isValidElementType","Error","getNodeError","message","e","stack","node","__NEXT_PRELOADREADY","initialProps","App","wrapApp","Boolean","subscription","scroll","Object","renderCtx","initial","renderingProps","renderError","doRender","renderErr","cancelled","renderErrorProps","onUnrecoverableError","styleSheets","console","loadPage","then","ErrorComponent","AppTree","appCtx","ctx","Promise","resolve","initProps","reactRoot","shouldHydrate","ReactDOM","hydrate","renderReactElement","domEl","ST","performance","mark","reactEl","markHydrateComplete","markRenderComplete","__NEXT_REACT_ROOT","createRoot","measure","getEntriesByName","forEach","clearMarks","navStartEntries","clearMeasures","AppContainer","catch","wrappedAppProps","appProps","lastAppProps","undefined","canceled","resolvePromise","renderPromise","reject","onStart","currentStyleTags","querySelectorAll","currentHrefs","Set","tag","getAttribute","noscript","querySelector","nonce","href","text","has","styleTag","createElement","setAttribute","head","appendChild","createTextNode","onHeadCommit","desiredHrefs","s","idx","removeAttribute","referenceNode","targetTag","parentNode","insertBefore","nextSibling","removeChild","getComputedStyle","body","scrollTo","x","y","onRootCommit","elem","callback","__NEXT_STRICT_MODE","Root","callbacks","useLayoutEffect","__NEXT_TEST_MODE","useEffect","__NEXT_HYDRATED","__NEXT_HYDRATED_CB","Head"],"mappings":"yZACA,iCACA,oDACA,2DACA,2EACA,qEACA,gEACA,wDAOA,qEACA,gGACA,oFACA,+CAMA,gCACA,mEACA,iEACA,iFACA,iDACA,iCA5BA,qBAqDA,KAAMA,CAAAA,IAAoC,CAAGC,IAAI,CAACC,KAAL,CAC3CC,QAAQ,CAACC,cAAT,CAAwB,eAAxB,EAA0CC,WADC,CAA7C,CAGAC,MAAM,CAACC,aAAP,CAAuBP,IAAvB,CAEO,KAAMQ,CAAAA,OAAO,CAAGC,OAAO,CAACC,GAAR,CAAYC,cAA5B,C,wBAEP,KAAMC,CAAAA,YAAY,CAAkBC,KAAf,EAAmC,GAAGC,KAAH,CAASC,IAAT,CAAcF,KAAd,CAAxD,CAEA,KAAM,CACJG,KAAK,CAAEC,YADH,CAEJC,GAAG,CAAEC,UAFD,CAGJC,IAHI,CAIJC,KAJI,CAKJC,OALI,CAMJC,WANI,CAOJC,aAPI,CAQJC,UARI,CASJC,UATI,CAUJC,MAVI,CAWJC,OAXI,CAYJC,aAZI,CAaJC,SAbI,EAcF9B,IAdJ,CAgBA,GAAI,CAAE+B,aAAF,EAAoB/B,IAAxB,CAEA,KAAMgC,CAAAA,MAAc,CAAGT,WAAW,EAAI,EAAtC,CAEA;AACA;AACAU,uBAAuB,CAAI,GAAED,MAAO,SAApC,CAA6C;AAC7C;AACAE,SAAS,C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zB,CAEA,GAAI/O,MAAM,CAACgP,kBAAX,CAA+B,CAC7BhP,MAAM,CAACgP,kBAAP,GACD,CACF,CAND,CAMG,EANH,EAOD,CACD;AACA;AACA3K,eAAMyK,SAAN,CAAgB,IAAM,CACpB,gCAAiB3K,WAAjB,EACD,CAFD,CAEG,EAFH,EAGA,MAAOgC,CAAAA,QAAP,CACD,CAED;AACA;AACA,QAAS8I,CAAAA,IAAT,CAAc,CAAET,QAAF,CAAd,CAA4D,CAC1D;AACA;AACAnK,eAAMuK,eAAN,CAAsB,IAAMJ,QAAQ,EAApC,CAAwC,CAACA,QAAD,CAAxC,EACA,MAAO,KAAP,CACD","sourcesContent":["/* global location */\nimport '@next/polyfill-module'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { HeadManagerContext } from '../next-server/lib/head-manager-context'\nimport mitt, { MittEmitter } from '../next-server/lib/mitt'\nimport { RouterContext } from '../next-server/lib/router-context'\nimport Router, {\n AppComponent,\n AppProps,\n delBasePath,\n hasBasePath,\n PrivateRouteInfo,\n} from '../next-server/lib/router/router'\nimport { isDynamicRoute } from '../next-server/lib/router/utils/is-dynamic'\nimport * as querystring from '../next-server/lib/router/utils/querystring'\nimport * as envConfig from '../next-server/lib/runtime-config'\nimport {\n getURL,\n loadGetInitialProps,\n NEXT_DATA,\n ST,\n} from '../next-server/lib/utils'\nimport { Portal } from './portal'\nimport initHeadManager from './head-manager'\nimport PageLoader, { StyleSheetTuple } from './page-loader'\nimport measureWebVitals from './performance-relayer'\nimport { RouteAnnouncer } from './route-announcer'\nimport { createRouter, makePublicRouterInstance } from './router'\n\n/// <reference types=\"react-dom/experimental\" />\n\ndeclare let __webpack_public_path__: string\n\ndeclare global {\n interface Window {\n /* test fns */\n __NEXT_HYDRATED?: boolean\n __NEXT_HYDRATED_CB?: () => void\n\n /* prod */\n __NEXT_PRELOADREADY?: (ids?: (string | number)[]) => void\n __NEXT_DATA__: NEXT_DATA\n __NEXT_P: any[]\n }\n}\n\ntype RenderRouteInfo = PrivateRouteInfo & {\n App: AppComponent\n scroll?: { x: number; y: number } | null\n}\ntype RenderErrorProps = Omit<RenderRouteInfo, 'Component' | 'styleSheets'>\n\nconst data: typeof window['__NEXT_DATA__'] = JSON.parse(\n document.getElementById('__NEXT_DATA__')!.textContent!\n)\nwindow.__NEXT_DATA__ = data\n\nexport const version = process.env.__NEXT_VERSION\n\nconst looseToArray = <T extends {}>(input: any): T[] => [].slice.call(input)\n\nconst {\n props: hydrateProps,\n err: hydrateErr,\n page,\n query,\n buildId,\n assetPrefix,\n runtimeConfig,\n dynamicIds,\n isFallback,\n locale,\n locales,\n domainLocales,\n isPreview,\n} = data\n\nlet { defaultLocale } = data\n\nconst prefix: string = assetPrefix || ''\n\n// With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time\n// So, this is how we do it in the client side at runtime\n__webpack_public_path__ = `${prefix}/_next/` //eslint-disable-line\n// Initialize next/config with the environment configuration\nenvConfig.setConfig({\n serverRuntimeConfig: {},\n publicRuntimeConfig: runtimeConfig || {},\n})\n\nlet asPath: string = getURL()\n\n// make sure not to attempt stripping basePath for 404s\nif (hasBasePath(asPath)) {\n asPath = delBasePath(asPath)\n}\n\nif (process.env.__NEXT_I18N_SUPPORT) {\n const {\n normalizeLocalePath,\n } = require('../next-server/lib/i18n/normalize-locale-path') as typeof import('../next-server/lib/i18n/normalize-locale-path')\n\n const {\n detectDomainLocale,\n } = require('../next-server/lib/i18n/detect-domain-locale') as typeof import('../next-server/lib/i18n/detect-domain-locale')\n\n const {\n parseRelativeUrl,\n } = require('../next-server/lib/router/utils/parse-relative-url') as typeof import('../next-server/lib/router/utils/parse-relative-url')\n\n const {\n formatUrl,\n } = require('../next-server/lib/router/utils/format-url') as typeof import('../next-server/lib/router/utils/format-url')\n\n if (locales) {\n const parsedAs = parseRelativeUrl(asPath)\n const localePathResult = normalizeLocalePath(parsedAs.pathname, locales)\n\n if (localePathResult.detectedLocale) {\n parsedAs.pathname = localePathResult.pathname\n asPath = formatUrl(parsedAs)\n } else {\n // derive the default locale if it wasn't detected in the asPath\n // since we don't prerender static pages with all possible default\n // locales\n defaultLocale = locale\n }\n\n // attempt detecting default locale based on hostname\n const detectedDomain = detectDomainLocale(\n process.env.__NEXT_I18N_DOMAINS as any,\n window.location.hostname\n )\n\n // TODO: investigate if defaultLocale needs to be populated after\n // hydration to prevent mismatched renders\n if (detectedDomain) {\n defaultLocale = detectedDomain.defaultLocale\n }\n }\n}\n\nif (data.scriptLoader) {\n const { initScriptLoader } = require('./script')\n initScriptLoader(data.scriptLoader)\n}\n\ntype RegisterFn = (input: [string, () => void]) => void\n\nconst pageLoader: PageLoader = new PageLoader(buildId, prefix)\nconst register: RegisterFn = ([r, f]) =>\n pageLoader.routeLoader.onEntrypoint(r, f)\nif (window.__NEXT_P) {\n // Defer page registration for another tick. This will increase the overall\n // latency in hydrating the page, but reduce the total blocking time.\n window.__NEXT_P.map((p) => setTimeout(() => register(p), 0))\n}\nwindow.__NEXT_P = []\n;(window.__NEXT_P as any).push = register\n\nconst headManager: {\n mountedInstances: Set<unknown>\n updateHead: (head: JSX.Element[]) => void\n} = initHeadManager()\nconst appElement: HTMLElement | null = document.getElementById('__next')\n\nlet lastRenderReject: (() => void) | null\nlet webpackHMR: any\nexport let router: Router\nlet CachedApp: AppComponent, onPerfEntry: (metric: any) => void\n\nclass Container extends React.Component<{\n fn: (err: Error, info?: any) => void\n}> {\n componentDidCatch(componentErr: Error, info: any) {\n this.props.fn(componentErr, info)\n }\n\n componentDidMount() {\n this.scrollToHash()\n\n // We need to replace the router state if:\n // - the page was (auto) exported and has a query string or search (hash)\n // - it was auto exported and is a dynamic route (to provide params)\n // - if it is a client-side skeleton (fallback render)\n if (\n router.isSsr &&\n // We don't update for 404 requests as this can modify\n // the asPath unexpectedly e.g. adding basePath when\n // it wasn't originally present\n page !== '/404' &&\n !(\n page === '/_error' &&\n hydrateProps &&\n hydrateProps.pageProps &&\n hydrateProps.pageProps.statusCode === 404\n ) &&\n (isFallback ||\n (data.nextExport &&\n (isDynamicRoute(router.pathname) ||\n location.search ||\n process.env.__NEXT_HAS_REWRITES)) ||\n (hydrateProps &&\n hydrateProps.__N_SSG &&\n (location.search || process.env.__NEXT_HAS_REWRITES)))\n ) {\n // update query on mount for exported pages\n router.replace(\n router.pathname +\n '?' +\n String(\n querystring.assign(\n querystring.urlQueryToSearchParams(router.query),\n new URLSearchParams(location.search)\n )\n ),\n asPath,\n {\n // @ts-ignore\n // WARNING: `_h` is an internal option for handing Next.js\n // client-side hydration. Your app should _never_ use this property.\n // It may change at any time without notice.\n _h: 1,\n // Fallback pages must trigger the data fetch, so the transition is\n // not shallow.\n // Other pages (strictly updating query) happens shallowly, as data\n // requirements would already be present.\n shallow: !isFallback,\n }\n )\n }\n }\n\n componentDidUpdate() {\n this.scrollToHash()\n }\n\n scrollToHash() {\n let { hash } = location\n hash = hash && hash.substring(1)\n if (!hash) return\n\n const el: HTMLElement | null = document.getElementById(hash)\n if (!el) return\n\n // If we call scrollIntoView() in here without a setTimeout\n // it won't scroll properly.\n setTimeout(() => el.scrollIntoView(), 0)\n }\n\n render() {\n if (process.env.NODE_ENV === 'production') {\n return this.props.children\n } else {\n const { ReactDevOverlay } = require('@next/react-dev-overlay/lib/client')\n return <ReactDevOverlay>{this.props.children}</ReactDevOverlay>\n }\n }\n}\n\nexport const emitter: MittEmitter<string> = mitt()\nlet CachedComponent: React.ComponentType\n\nexport default async (opts: { webpackHMR?: any } = {}) => {\n // This makes sure this specific lines are removed in production\n if (process.env.NODE_ENV === 'development') {\n webpackHMR = opts.webpackHMR\n }\n\n let initialErr = hydrateErr\n\n try {\n const appEntrypoint = await pageLoader.routeLoader.whenEntrypoint('/_app')\n if ('error' in appEntrypoint) {\n throw appEntrypoint.error\n }\n\n const { component: app, exports: mod } = appEntrypoint\n CachedApp = app as AppComponent\n if (mod && mod.reportWebVitals) {\n onPerfEntry = ({\n id,\n name,\n startTime,\n value,\n duration,\n entryType,\n entries,\n }): void => {\n // Combines timestamp with random number for unique ID\n const uniqueID: string = `${Date.now()}-${\n Math.floor(Math.random() * (9e12 - 1)) + 1e12\n }`\n let perfStartEntry: string | undefined\n\n if (entries && entries.length) {\n perfStartEntry = entries[0].startTime\n }\n\n mod.reportWebVitals({\n id: id || uniqueID,\n name,\n startTime: startTime || perfStartEntry,\n value: value == null ? duration : value,\n label:\n entryType === 'mark' || entryType === 'measure'\n ? 'custom'\n : 'web-vital',\n })\n }\n }\n\n const pageEntrypoint =\n // The dev server fails to serve script assets when there's a hydration\n // error, so we need to skip waiting for the entrypoint.\n process.env.NODE_ENV === 'development' && hydrateErr\n ? { error: hydrateErr }\n : await pageLoader.routeLoader.whenEntrypoint(page)\n if ('error' in pageEntrypoint) {\n throw pageEntrypoint.error\n }\n CachedComponent = pageEntrypoint.component\n\n if (process.env.NODE_ENV !== 'production') {\n const { isValidElementType } = require('react-is')\n if (!isValidElementType(CachedComponent)) {\n throw new Error(\n `The default export is not a React Component in page: \"${page}\"`\n )\n }\n }\n } catch (error) {\n // This catches errors like throwing in the top level of a module\n initialErr = error\n }\n\n if (process.env.NODE_ENV === 'development') {\n const { getNodeError } = require('@next/react-dev-overlay/lib/client')\n // Server-side runtime errors need to be re-thrown on the client-side so\n // that the overlay is rendered.\n if (initialErr) {\n if (initialErr === hydrateErr) {\n setTimeout(() => {\n let error\n try {\n // Generate a new error object. We `throw` it because some browsers\n // will set the `stack` when thrown, and we want to ensure ours is\n // not overridden when we re-throw it below.\n throw new Error(initialErr!.message)\n } catch (e) {\n error = e\n }\n\n error.name = initialErr!.name\n error.stack = initialErr!.stack\n\n const node = getNodeError(error)\n throw node\n })\n }\n // We replaced the server-side error with a client-side error, and should\n // no longer rewrite the stack trace to a Node error.\n else {\n setTimeout(() => {\n throw initialErr\n })\n }\n }\n }\n\n if (window.__NEXT_PRELOADREADY) {\n await window.__NEXT_PRELOADREADY(dynamicIds)\n }\n\n router = createRouter(page, query, asPath, {\n initialProps: hydrateProps,\n pageLoader,\n App: CachedApp,\n Component: CachedComponent,\n wrapApp,\n err: initialErr,\n isFallback: Boolean(isFallback),\n subscription: (info, App, scroll) =>\n render(\n Object.assign<\n {},\n Omit<RenderRouteInfo, 'App' | 'scroll'>,\n Pick<RenderRouteInfo, 'App' | 'scroll'>\n >({}, info, {\n App,\n scroll,\n }) as RenderRouteInfo\n ),\n locale,\n locales,\n defaultLocale,\n domainLocales,\n isPreview,\n })\n\n const renderCtx: RenderRouteInfo = {\n App: CachedApp,\n initial: true,\n Component: CachedComponent,\n props: hydrateProps,\n err: initialErr,\n }\n\n if (process.env.NODE_ENV === 'production') {\n render(renderCtx)\n return emitter\n } else {\n return { emitter, render, renderCtx }\n }\n}\n\nexport async function render(renderingProps: RenderRouteInfo): Promise<void> {\n if (renderingProps.err) {\n await renderError(renderingProps)\n return\n }\n\n try {\n await doRender(renderingProps)\n } catch (renderErr) {\n // bubble up cancelation errors\n if (renderErr.cancelled) {\n throw renderErr\n }\n\n if (process.env.NODE_ENV === 'development') {\n // Ensure this error is displayed in the overlay in development\n setTimeout(() => {\n throw renderErr\n })\n }\n await renderError({ ...renderingProps, err: renderErr })\n }\n}\n\n// This method handles all runtime and debug errors.\n// 404 and 500 errors are special kind of errors\n// and they are still handle via the main render method.\nexport function renderError(renderErrorProps: RenderErrorProps): Promise<any> {\n const { App, err } = renderErrorProps\n\n // In development runtime errors are caught by our overlay\n // In production we catch runtime errors using componentDidCatch which will trigger renderError\n if (process.env.NODE_ENV !== 'production') {\n // A Next.js rendering runtime error is always unrecoverable\n // FIXME: let's make this recoverable (error in GIP client-transition)\n webpackHMR.onUnrecoverableError()\n\n // We need to render an empty <App> so that the `<ReactDevOverlay>` can\n // render itself.\n return doRender({\n App: () => null,\n props: {},\n Component: () => null,\n styleSheets: [],\n })\n }\n\n // Make sure we log the error to the console, otherwise users can't track down issues.\n console.error(err)\n return pageLoader\n .loadPage('/_error')\n .then(({ page: ErrorComponent, styleSheets }) => {\n // In production we do a normal render with the `ErrorComponent` as component.\n // If we've gotten here upon initial render, we can use the props from the server.\n // Otherwise, we need to call `getInitialProps` on `App` before mounting.\n const AppTree = wrapApp(App)\n const appCtx = {\n Component: ErrorComponent,\n AppTree,\n router,\n ctx: { err, pathname: page, query, asPath, AppTree },\n }\n return Promise.resolve(\n renderErrorProps.props\n ? renderErrorProps.props\n : loadGetInitialProps(App, appCtx)\n ).then((initProps) =>\n doRender({\n ...renderErrorProps,\n err,\n Component: ErrorComponent,\n styleSheets,\n props: initProps,\n })\n )\n })\n}\n\nlet reactRoot: any = null\nlet shouldHydrate: boolean = typeof ReactDOM.hydrate === 'function'\n\nfunction renderReactElement(\n domEl: HTMLElement,\n fn: (cb: () => void) => JSX.Element\n): void {\n // mark start of hydrate/render\n if (ST) {\n performance.mark('beforeRender')\n }\n\n const reactEl = fn(shouldHydrate ? markHydrateComplete : markRenderComplete)\n if (process.env.__NEXT_REACT_ROOT) {\n if (!reactRoot) {\n reactRoot = (ReactDOM as any).createRoot(domEl, {\n hydrate: shouldHydrate,\n })\n }\n reactRoot.render(reactEl)\n shouldHydrate = false\n } else {\n // The check for `.hydrate` is there to support React alternatives like preact\n if (shouldHydrate) {\n ReactDOM.hydrate(reactEl, domEl)\n shouldHydrate = false\n } else {\n ReactDOM.render(reactEl, domEl)\n }\n }\n}\n\nfunction markHydrateComplete(): void {\n if (!ST) return\n\n performance.mark('afterHydrate') // mark end of hydration\n\n performance.measure(\n 'Next.js-before-hydration',\n 'navigationStart',\n 'beforeRender'\n )\n performance.measure('Next.js-hydration', 'beforeRender', 'afterHydrate')\n\n if (onPerfEntry) {\n performance.getEntriesByName('Next.js-hydration').forEach(onPerfEntry)\n }\n clearMarks()\n}\n\nfunction markRenderComplete(): void {\n if (!ST) return\n\n performance.mark('afterRender') // mark end of render\n const navStartEntries: PerformanceEntryList = performance.getEntriesByName(\n 'routeChange',\n 'mark'\n )\n\n if (!navStartEntries.length) return\n\n performance.measure(\n 'Next.js-route-change-to-render',\n navStartEntries[0].name,\n 'beforeRender'\n )\n performance.measure('Next.js-render', 'beforeRender', 'afterRender')\n if (onPerfEntry) {\n performance.getEntriesByName('Next.js-render').forEach(onPerfEntry)\n performance\n .getEntriesByName('Next.js-route-change-to-render')\n .forEach(onPerfEntry)\n }\n clearMarks()\n ;['Next.js-route-change-to-render', 'Next.js-render'].forEach((measure) =>\n performance.clearMeasures(measure)\n )\n}\n\nfunction clearMarks(): void {\n ;[\n 'beforeRender',\n 'afterHydrate',\n 'afterRender',\n 'routeChange',\n ].forEach((mark) => performance.clearMarks(mark))\n}\n\nfunction AppContainer({\n children,\n}: React.PropsWithChildren<{}>): React.ReactElement {\n return (\n <Container\n fn={(error) =>\n renderError({ App: CachedApp, err: error }).catch((err) =>\n console.error('Error rendering page: ', err)\n )\n }\n >\n <RouterContext.Provider value={makePublicRouterInstance(router)}>\n <HeadManagerContext.Provider value={headManager}>\n {children}\n </HeadManagerContext.Provider>\n </RouterContext.Provider>\n </Container>\n )\n}\n\nconst wrapApp = (App: AppComponent) => (\n wrappedAppProps: Record<string, any>\n): JSX.Element => {\n const appProps: AppProps = {\n ...wrappedAppProps,\n Component: CachedComponent,\n err: hydrateErr,\n router,\n }\n return (\n <AppContainer>\n <App {...appProps} />\n </AppContainer>\n )\n}\n\nlet lastAppProps: AppProps\nfunction doRender(input: RenderRouteInfo): Promise<any> {\n let { App, Component, props, err }: RenderRouteInfo = input\n let styleSheets: StyleSheetTuple[] | undefined =\n 'initial' in input ? undefined : input.styleSheets\n Component = Component || lastAppProps.Component\n props = props || lastAppProps.props\n\n const appProps: AppProps = {\n ...props,\n Component,\n err,\n router,\n }\n // lastAppProps has to be set before ReactDom.render to account for ReactDom throwing an error.\n lastAppProps = appProps\n\n let canceled: boolean = false\n let resolvePromise: () => void\n const renderPromise = new Promise<void>((resolve, reject) => {\n if (lastRenderReject) {\n lastRenderReject()\n }\n resolvePromise = () => {\n lastRenderReject = null\n resolve()\n }\n lastRenderReject = () => {\n canceled = true\n lastRenderReject = null\n\n const error: any = new Error('Cancel rendering route')\n error.cancelled = true\n reject(error)\n }\n })\n\n // This function has a return type to ensure it doesn't start returning a\n // Promise. It should remain synchronous.\n function onStart(): boolean {\n if (\n !styleSheets ||\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV !== 'production'\n ) {\n return false\n }\n\n const currentStyleTags: HTMLStyleElement[] = looseToArray<HTMLStyleElement>(\n document.querySelectorAll('style[data-n-href]')\n )\n const currentHrefs: Set<string | null> = new Set(\n currentStyleTags.map((tag) => tag.getAttribute('data-n-href'))\n )\n\n const noscript: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n const nonce: string | null | undefined = noscript?.getAttribute(\n 'data-n-css'\n )\n\n styleSheets.forEach(({ href, text }: { href: string; text: any }) => {\n if (!currentHrefs.has(href)) {\n const styleTag = document.createElement('style')\n styleTag.setAttribute('data-n-href', href)\n styleTag.setAttribute('media', 'x')\n\n if (nonce) {\n styleTag.setAttribute('nonce', nonce)\n }\n\n document.head.appendChild(styleTag)\n styleTag.appendChild(document.createTextNode(text))\n }\n })\n return true\n }\n\n function onHeadCommit(): void {\n if (\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV === 'production' &&\n // We can skip this during hydration. Running it wont cause any harm, but\n // we may as well save the CPU cycles:\n styleSheets &&\n // Ensure this render was not canceled\n !canceled\n ) {\n const desiredHrefs: Set<string> = new Set(styleSheets.map((s) => s.href))\n const currentStyleTags: HTMLStyleElement[] = looseToArray<\n HTMLStyleElement\n >(document.querySelectorAll('style[data-n-href]'))\n const currentHrefs: string[] = currentStyleTags.map(\n (tag) => tag.getAttribute('data-n-href')!\n )\n\n // Toggle `<style>` tags on or off depending on if they're needed:\n for (let idx = 0; idx < currentHrefs.length; ++idx) {\n if (desiredHrefs.has(currentHrefs[idx])) {\n currentStyleTags[idx].removeAttribute('media')\n } else {\n currentStyleTags[idx].setAttribute('media', 'x')\n }\n }\n\n // Reorder styles into intended order:\n let referenceNode: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n if (\n // This should be an invariant:\n referenceNode\n ) {\n styleSheets.forEach(({ href }: { href: string }) => {\n const targetTag: Element | null = document.querySelector(\n `style[data-n-href=\"${href}\"]`\n )\n if (\n // This should be an invariant:\n targetTag\n ) {\n referenceNode!.parentNode!.insertBefore(\n targetTag,\n referenceNode!.nextSibling\n )\n referenceNode = targetTag\n }\n })\n }\n\n // Finally, clean up server rendered stylesheets:\n looseToArray<HTMLLinkElement>(\n document.querySelectorAll('link[data-n-p]')\n ).forEach((el) => {\n el.parentNode!.removeChild(el)\n })\n\n // Force browser to recompute layout, which should prevent a flash of\n // unstyled content:\n getComputedStyle(document.body, 'height')\n }\n\n if (input.scroll) {\n window.scrollTo(input.scroll.x, input.scroll.y)\n }\n }\n\n function onRootCommit(): void {\n resolvePromise()\n }\n\n onStart()\n\n const elem: JSX.Element = (\n <>\n <Head callback={onHeadCommit} />\n <AppContainer>\n <App {...appProps} />\n <Portal type=\"next-route-announcer\">\n <RouteAnnouncer />\n </Portal>\n </AppContainer>\n </>\n )\n\n // We catch runtime errors using componentDidCatch which will trigger renderError\n renderReactElement(appElement!, (callback) => (\n <Root callbacks={[callback, onRootCommit]}>\n {process.env.__NEXT_STRICT_MODE ? (\n <React.StrictMode>{elem}</React.StrictMode>\n ) : (\n elem\n )}\n </Root>\n ))\n\n return renderPromise\n}\n\nfunction Root({\n callbacks,\n children,\n}: React.PropsWithChildren<{\n callbacks: Array<() => void>\n}>): React.ReactElement {\n // We use `useLayoutEffect` to guarantee the callbacks are executed\n // as soon as React flushes the update\n React.useLayoutEffect(() => callbacks.forEach((callback) => callback()), [\n callbacks,\n ])\n if (process.env.__NEXT_TEST_MODE) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n window.__NEXT_HYDRATED = true\n\n if (window.__NEXT_HYDRATED_CB) {\n window.__NEXT_HYDRATED_CB()\n }\n }, [])\n }\n // We should ask to measure the Web Vitals after rendering completes so we\n // don't cause any hydration delay:\n React.useEffect(() => {\n measureWebVitals(onPerfEntry)\n }, [])\n return children as React.ReactElement\n}\n\n// Dummy component that we render as a child of Root so that we can\n// toggle the correct styles before the page is rendered.\nfunction Head({ callback }: { callback: () => void }): null {\n // We use `useLayoutEffect` to guarantee the callback is executed\n // as soon as React flushes the update.\n React.useLayoutEffect(() => callback(), [callback])\n return null\n}\n"]}
\No newline at end of file