{"version":3,"sources":["../../src/client/app-index.tsx"],"sourcesContent":["import './app-globals'\nimport ReactDOMClient from 'react-dom/client'\nimport React from 'react'\n// TODO: Explicitly import from client.browser\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n  createFromReadableStream as createFromReadableStreamBrowser,\n  createFromFetch as createFromFetchBrowser,\n} from 'react-server-dom-webpack/client'\nimport { HeadManagerContext } from '../shared/lib/head-manager-context.shared-runtime'\nimport { onRecoverableError } from './react-client-callbacks/on-recoverable-error'\nimport {\n  onCaughtError,\n  onUncaughtError,\n} from './react-client-callbacks/error-boundary-callbacks'\nimport { callServer } from './app-call-server'\nimport { findSourceMapURL } from './app-find-source-map-url'\nimport {\n  type AppRouterActionQueue,\n  createMutableActionQueue,\n} from './components/app-router-instance'\nimport AppRouter from './components/app-router'\nimport type { InitialRSCPayload } from '../shared/lib/app-router-types'\nimport { createInitialRouterState } from './components/router-reducer/create-initial-router-state'\nimport { MissingSlotContext } from '../shared/lib/app-router-context.shared-runtime'\nimport type { StaticIndicatorState } from './dev/hot-reloader/app/hot-reloader-app'\nimport { createInitialRSCPayloadFromFallbackPrerender } from './flight-data-helpers'\nimport { getDeploymentId } from '../shared/lib/deployment-id'\nimport { setNavigationBuildId } from './navigation-build-id'\n\n/// <reference types=\"react-dom/experimental\" />\n\nconst createFromReadableStream =\n  createFromReadableStreamBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromReadableStream']\nconst createFromFetch =\n  createFromFetchBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromFetch']\n\nconst appElement: HTMLElement | Document = document\n\n// Instant Navigation Testing API: captured once at module init. When truthy,\n// this is the fetch promise for the static RSC payload (set by an injected\n// <script> tag in the static shell HTML).\nconst instantTestStaticFetch: Promise<Response> | undefined =\n  self.__next_instant_test\n    ? (self.__next_instant_test as unknown as Promise<Response>)\n    : undefined\n\nconst encoder = new TextEncoder()\n\nlet initialServerDataBuffer: (string | Uint8Array)[] | undefined = undefined\nlet initialServerDataWriter: ReadableStreamDefaultController | undefined =\n  undefined\nlet initialServerDataLoaded = false\nlet initialServerDataFlushed = false\n\nlet initialFormStateData: null | any = null\n\ntype FlightSegment =\n  | [isBootStrap: 0]\n  | [isNotBootstrap: 1, responsePartial: string]\n  | [isFormState: 2, formState: any]\n  | [isBinary: 3, responseBase64Partial: string]\n\ntype NextFlight = Omit<Array<FlightSegment>, 'push'> & {\n  push: (seg: FlightSegment) => void\n}\n\ndeclare global {\n  // If you're working in a browser environment\n  interface Window {\n    /**\n     * request ID, dev-only\n     */\n    __next_r?: string\n    __next_f: NextFlight\n  }\n}\n\nfunction nextServerDataCallback(seg: FlightSegment): void {\n  if (seg[0] === 0) {\n    initialServerDataBuffer = []\n  } else if (seg[0] === 1) {\n    if (!initialServerDataBuffer)\n      throw new Error('Unexpected server data: missing bootstrap script.')\n\n    if (initialServerDataWriter) {\n      initialServerDataWriter.enqueue(encoder.encode(seg[1]))\n    } else {\n      initialServerDataBuffer.push(seg[1])\n    }\n  } else if (seg[0] === 2) {\n    initialFormStateData = seg[1]\n  } else if (seg[0] === 3) {\n    if (!initialServerDataBuffer)\n      throw new Error('Unexpected server data: missing bootstrap script.')\n\n    // Decode the base64 string back to binary data.\n    const binaryString = atob(seg[1])\n    const decodedChunk = new Uint8Array(binaryString.length)\n    for (var i = 0; i < binaryString.length; i++) {\n      decodedChunk[i] = binaryString.charCodeAt(i)\n    }\n\n    if (initialServerDataWriter) {\n      initialServerDataWriter.enqueue(decodedChunk)\n    } else {\n      initialServerDataBuffer.push(decodedChunk)\n    }\n  }\n}\n\nfunction isStreamErrorOrUnfinished(ctr: ReadableStreamDefaultController) {\n  // If `desiredSize` is null, it means the stream is closed or errored. If it is lower than 0, the stream is still unfinished.\n  return ctr.desiredSize === null || ctr.desiredSize < 0\n}\n\n// There might be race conditions between `nextServerDataRegisterWriter` and\n// `DOMContentLoaded`. The former will be called when React starts to hydrate\n// the root, the latter will be called when the DOM is fully loaded.\n// For streaming, the former is called first due to partial hydration.\n// For non-streaming, the latter can be called first.\n// Hence, we use two variables `initialServerDataLoaded` and\n// `initialServerDataFlushed` to make sure the writer will be closed and\n// `initialServerDataBuffer` will be cleared in the right time.\nfunction nextServerDataRegisterWriter(ctr: ReadableStreamDefaultController) {\n  if (initialServerDataBuffer) {\n    initialServerDataBuffer.forEach((val) => {\n      ctr.enqueue(typeof val === 'string' ? encoder.encode(val) : val)\n    })\n    if (initialServerDataLoaded && !initialServerDataFlushed) {\n      // Instant Navigation Testing API: don't close or error the inline\n      // Flight stream. The static shell has no inline Flight data, so the\n      // stream is empty. Closing it would cause React to log an error about\n      // missing data. Leaving it open lets React treat any holes as\n      // \"still suspended.\" Hydration uses the separately fetched RSC payload\n      // (self.__next_instant_test), not this stream.\n      if (isStreamErrorOrUnfinished(ctr)) {\n        if (!instantTestStaticFetch) {\n          ctr.error(\n            new Error(\n              'The connection to the page was unexpectedly closed, possibly due to the stop button being clicked, loss of Wi-Fi, or an unstable internet connection.'\n            )\n          )\n        }\n      } else {\n        ctr.close()\n      }\n      initialServerDataFlushed = true\n      initialServerDataBuffer = undefined\n    }\n  }\n\n  initialServerDataWriter = ctr\n}\n\n// When `DOMContentLoaded`, we can close all pending writers to finish hydration.\nconst DOMContentLoaded = function () {\n  if (initialServerDataWriter && !initialServerDataFlushed) {\n    initialServerDataWriter.close()\n    initialServerDataFlushed = true\n    initialServerDataBuffer = undefined\n  }\n  initialServerDataLoaded = true\n}\n\n// It's possible that the DOM is already loaded.\nif (document.readyState === 'loading') {\n  document.addEventListener('DOMContentLoaded', DOMContentLoaded, false)\n} else {\n  // Delayed in marco task to ensure it's executed later than hydration\n  setTimeout(DOMContentLoaded)\n}\n\nconst nextServerDataLoadingGlobal = (self.__next_f = self.__next_f || [])\n\n// Consume all buffered chunks and clear the global data array right after to release memory.\n// Otherwise it will be retained indefinitely.\nnextServerDataLoadingGlobal.forEach(nextServerDataCallback)\nnextServerDataLoadingGlobal.length = 0\n\n// Patch its push method so subsequent chunks are handled (but not actually pushed to the array).\nnextServerDataLoadingGlobal.push = nextServerDataCallback\n\nlet readable: ReadableStream<Uint8Array> = new ReadableStream({\n  start(controller) {\n    nextServerDataRegisterWriter(controller)\n  },\n})\nif (process.env.NODE_ENV !== 'production') {\n  // @ts-expect-error\n  readable.name = 'hydration'\n}\n\n// When Cache Components is enabled, tee the inlined Flight stream so we can\n// truncate a clone at the static stage byte boundary and cache it. We don't\n// know if `l` is present until React decodes the payload, so always tee and\n// cancel the clone if not needed.\nlet initialFlightStreamForCache: ReadableStream<Uint8Array> | null = null\nif (\n  process.env.__NEXT_CACHE_COMPONENTS &&\n  process.env.__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS\n) {\n  const [forReact, forCache] = readable.tee()\n  readable = forReact\n  initialFlightStreamForCache = forCache\n}\n\nlet debugChannel:\n  | { readable?: ReadableStream; writable?: WritableStream }\n  | undefined\n\nif (\n  process.env.__NEXT_DEV_SERVER &&\n  process.env.__NEXT_REACT_DEBUG_CHANNEL &&\n  typeof window !== 'undefined'\n) {\n  const { createDebugChannel } =\n    require('./dev/debug-channel') as typeof import('./dev/debug-channel')\n\n  debugChannel = createDebugChannel(undefined)\n}\n\nlet initialServerResponse: Promise<InitialRSCPayload>\nif (instantTestStaticFetch) {\n  // Instant Navigation Testing API: hydrate from the static RSC payload\n  // fetch kicked off by an injected <script> tag, instead of the inline\n  // Flight data (which is not present in the static shell).\n  initialServerResponse = Promise.resolve(\n    createFromFetch<InitialRSCPayload>(instantTestStaticFetch, {\n      callServer,\n      findSourceMapURL,\n      debugChannel,\n      // The static fetch response is a partial stream (static-only Flight\n      // data with no dynamic content). Allow it to close without error so\n      // React treats dynamic holes as still-suspended rather than\n      // triggering error recovery.\n      unstable_allowPartialStream: true,\n    })\n  ).then(async (initialRSCPayload) => {\n    return createInitialRSCPayloadFromFallbackPrerender(\n      await instantTestStaticFetch,\n      initialRSCPayload\n    )\n  })\n} else if (\n  // @ts-expect-error\n  window.__NEXT_CLIENT_RESUME\n) {\n  const clientResumeFetch: Promise<Response> =\n    // @ts-expect-error\n    window.__NEXT_CLIENT_RESUME\n  initialServerResponse = Promise.resolve(\n    createFromFetch<InitialRSCPayload>(clientResumeFetch, {\n      callServer,\n      findSourceMapURL,\n      debugChannel,\n    })\n  ).then(async (fallbackInitialRSCPayload) =>\n    createInitialRSCPayloadFromFallbackPrerender(\n      await clientResumeFetch,\n      fallbackInitialRSCPayload\n    )\n  )\n} else {\n  initialServerResponse = createFromReadableStream<InitialRSCPayload>(\n    readable,\n    {\n      callServer,\n      findSourceMapURL,\n      debugChannel,\n      startTime: 0,\n    }\n  )\n}\n\nfunction ServerRoot({\n  initialRSCPayload,\n  actionQueue,\n  webSocket,\n  staticIndicatorState,\n}: {\n  initialRSCPayload: InitialRSCPayload\n  actionQueue: AppRouterActionQueue\n  webSocket: WebSocket | undefined\n  staticIndicatorState: StaticIndicatorState | undefined\n}): React.ReactNode {\n  const router = (\n    <AppRouter\n      actionQueue={actionQueue}\n      globalErrorState={initialRSCPayload.G}\n      webSocket={webSocket}\n      staticIndicatorState={staticIndicatorState}\n    />\n  )\n\n  if (process.env.NODE_ENV === 'development' && initialRSCPayload.m) {\n    // We provide missing slot information in a context provider only during development\n    // as we log some additional information about the missing slots in the console.\n    return (\n      <MissingSlotContext value={initialRSCPayload.m}>\n        {router}\n      </MissingSlotContext>\n    )\n  }\n\n  return router\n}\n\nconst StrictModeIfEnabled = process.env.__NEXT_STRICT_MODE_APP\n  ? React.StrictMode\n  : React.Fragment\n\nfunction Root({ children }: React.PropsWithChildren<{}>) {\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      window.__NEXT_HYDRATED_AT = performance.now()\n      window.__NEXT_HYDRATED_CB?.()\n    }, [])\n  }\n\n  return children\n}\n\nconst enableTransitionIndicator = process.env.__NEXT_TRANSITION_INDICATOR\n\nfunction noDefaultTransitionIndicator() {\n  return () => {}\n}\n\nconst reactRootOptions: ReactDOMClient.RootOptions = {\n  onDefaultTransitionIndicator: enableTransitionIndicator\n    ? // TODO: Compose default with user-configureable (e.g. nprogress)\n      undefined\n    : noDefaultTransitionIndicator,\n  onRecoverableError,\n  onCaughtError,\n  onUncaughtError,\n}\n\nexport type ClientInstrumentationHooks = {\n  onRouterTransitionStart?: (\n    url: string,\n    navigationType: 'push' | 'replace' | 'traverse'\n  ) => void\n}\n\nexport async function hydrate(\n  instrumentationHooks: ClientInstrumentationHooks | null,\n  assetPrefix: string\n) {\n  let staticIndicatorState: StaticIndicatorState | undefined\n  let webSocket: WebSocket | undefined\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    const { createWebSocket } =\n      require('./dev/hot-reloader/app/web-socket') as typeof import('./dev/hot-reloader/app/web-socket')\n\n    staticIndicatorState = { pathname: null, appIsrManifest: null }\n    webSocket = createWebSocket(assetPrefix, staticIndicatorState)\n  }\n  const initialRSCPayload = await initialServerResponse\n\n  // setNavigationBuildId should be called only once, during JS initialization\n  // and before any components have hydrated.\n  if (initialRSCPayload.b) {\n    setNavigationBuildId(initialRSCPayload.b!)\n  } else {\n    setNavigationBuildId(getDeploymentId()!)\n  }\n\n  const initialTimestamp = Date.now()\n  const actionQueue: AppRouterActionQueue = createMutableActionQueue(\n    createInitialRouterState({\n      navigatedAt: initialTimestamp,\n      initialRSCPayload,\n      initialFlightStreamForCache,\n      location: window.location,\n    }),\n    instrumentationHooks\n  )\n\n  const reactEl = (\n    <StrictModeIfEnabled>\n      <HeadManagerContext.Provider value={{ appDir: true }}>\n        <Root>\n          <ServerRoot\n            initialRSCPayload={initialRSCPayload}\n            actionQueue={actionQueue}\n            webSocket={webSocket}\n            staticIndicatorState={staticIndicatorState}\n          />\n        </Root>\n      </HeadManagerContext.Provider>\n    </StrictModeIfEnabled>\n  )\n\n  if (document.documentElement.id === '__next_error__') {\n    let element = reactEl\n    // Server rendering failed, fall back to client-side rendering\n    if (process.env.NODE_ENV !== 'production') {\n      const { RootLevelDevOverlayElement } =\n        require('../next-devtools/userspace/app/client-entry') as typeof import('../next-devtools/userspace/app/client-entry')\n\n      // Note this won't cause hydration mismatch because we are doing CSR w/o hydration\n      element = (\n        <RootLevelDevOverlayElement>{element}</RootLevelDevOverlayElement>\n      )\n    }\n\n    ReactDOMClient.createRoot(appElement, reactRootOptions).render(element)\n  } else {\n    React.startTransition(() => {\n      ReactDOMClient.hydrateRoot(appElement, reactEl, {\n        ...reactRootOptions,\n        formState: initialFormStateData,\n      })\n    })\n  }\n\n  // TODO-APP: Remove this logic when Float has GC built-in in development.\n  if (process.env.__NEXT_DEV_SERVER) {\n    const { linkGc } =\n      require('./app-link-gc') as typeof import('./app-link-gc')\n    linkGc()\n  }\n}\n"],"names":["hydrate","createFromReadableStream","createFromReadableStreamBrowser","createFromFetch","createFromFetchBrowser","appElement","document","instantTestStaticFetch","self","__next_instant_test","undefined","encoder","TextEncoder","initialServerDataBuffer","initialServerDataWriter","initialServerDataLoaded","initialServerDataFlushed","initialFormStateData","nextServerDataCallback","seg","Error","enqueue","encode","push","binaryString","atob","decodedChunk","Uint8Array","length","i","charCodeAt","isStreamErrorOrUnfinished","ctr","desiredSize","nextServerDataRegisterWriter","forEach","val","error","close","DOMContentLoaded","readyState","addEventListener","setTimeout","nextServerDataLoadingGlobal","__next_f","readable","ReadableStream","start","controller","process","env","NODE_ENV","name","initialFlightStreamForCache","__NEXT_CACHE_COMPONENTS","__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS","forReact","forCache","tee","debugChannel","__NEXT_DEV_SERVER","__NEXT_REACT_DEBUG_CHANNEL","window","createDebugChannel","require","initialServerResponse","Promise","resolve","callServer","findSourceMapURL","unstable_allowPartialStream","then","initialRSCPayload","createInitialRSCPayloadFromFallbackPrerender","__NEXT_CLIENT_RESUME","clientResumeFetch","fallbackInitialRSCPayload","startTime","ServerRoot","actionQueue","webSocket","staticIndicatorState","router","AppRouter","globalErrorState","G","m","MissingSlotContext","value","StrictModeIfEnabled","__NEXT_STRICT_MODE_APP","React","StrictMode","Fragment","Root","children","__NEXT_TEST_MODE","useEffect","__NEXT_HYDRATED","__NEXT_HYDRATED_AT","performance","now","__NEXT_HYDRATED_CB","enableTransitionIndicator","__NEXT_TRANSITION_INDICATOR","noDefaultTransitionIndicator","reactRootOptions","onDefaultTransitionIndicator","onRecoverableError","onCaughtError","onUncaughtError","instrumentationHooks","assetPrefix","createWebSocket","pathname","appIsrManifest","b","setNavigationBuildId","getDeploymentId","initialTimestamp","Date","createMutableActionQueue","createInitialRouterState","navigatedAt","location","reactEl","HeadManagerContext","Provider","appDir","documentElement","id","element","RootLevelDevOverlayElement","ReactDOMClient","createRoot","render","startTransition","hydrateRoot","formState","linkGc"],"mappings":";;;;+BA4VsBA;;;eAAAA;;;;;QA5Vf;iEACoB;gEACT;yBAMX;iDAC4B;oCACA;wCAI5B;+BACoB;qCACM;mCAI1B;oEACe;0CAEmB;+CACN;mCAE0B;8BAC7B;mCACK;AAErC,gDAAgD;AAEhD,MAAMC,2BACJC,iCAA+B;AACjC,MAAMC,kBACJC,wBAAsB;AAExB,MAAMC,aAAqCC;AAE3C,6EAA6E;AAC7E,2EAA2E;AAC3E,0CAA0C;AAC1C,MAAMC,yBACJC,KAAKC,mBAAmB,GACnBD,KAAKC,mBAAmB,GACzBC;AAEN,MAAMC,UAAU,IAAIC;AAEpB,IAAIC,0BAA+DH;AACnE,IAAII,0BACFJ;AACF,IAAIK,0BAA0B;AAC9B,IAAIC,2BAA2B;AAE/B,IAAIC,uBAAmC;AAuBvC,SAASC,uBAAuBC,GAAkB;IAChD,IAAIA,GAAG,CAAC,EAAE,KAAK,GAAG;QAChBN,0BAA0B,EAAE;IAC9B,OAAO,IAAIM,GAAG,CAAC,EAAE,KAAK,GAAG;QACvB,IAAI,CAACN,yBACH,MAAM,qBAA8D,CAA9D,IAAIO,MAAM,sDAAV,qBAAA;mBAAA;wBAAA;0BAAA;QAA6D;QAErE,IAAIN,yBAAyB;YAC3B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