From 04571f39beb8f80cc769d64833a42a6d852c7910 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Thu, 25 Apr 2024 12:35:35 +0200 Subject: [PATCH] Update React from 14898b6a9 to c3048aab4 (#64798) --- package.json | 20 +- .../next/src/build/create-compiler-aliases.ts | 6 +- packages/next/src/client/app-index.tsx | 7 +- .../internal/helpers/use-error-handler.ts | 40 +- ...t-dom-server-legacy.browser.development.js | 937 ++++---- ...ct-dom-server-legacy.browser.production.js | 760 +++---- ...om-server-legacy.browser.production.min.js | 327 +-- ...erver-legacy.browser.production.min.js.map | 2 +- ...eact-dom-server-legacy.node.development.js | 943 ++++---- ...react-dom-server-legacy.node.production.js | 772 +++---- ...t-dom-server-legacy.node.production.min.js | 353 +-- ...m-server-legacy.node.production.min.js.map | 2 +- ...t-dom-server-rendering-stub.development.js | 65 +- ...ct-dom-server-rendering-stub.production.js | 63 +- ...om-server-rendering-stub.production.min.js | 16 +- ...erver-rendering-stub.production.min.js.map | 2 +- .../react-dom-server.browser.development.js | 938 ++++---- .../react-dom-server.browser.production.js | 761 +++---- ...react-dom-server.browser.production.min.js | 365 +-- ...t-dom-server.browser.production.min.js.map | 2 +- .../cjs/react-dom-server.bun.production.js | 766 +++---- ...react-dom-server.bun.production.min.js.map | 2 +- .../cjs/react-dom-server.edge.development.js | 938 ++++---- .../cjs/react-dom-server.edge.production.js | 767 +++---- .../react-dom-server.edge.production.min.js | 391 ++-- ...eact-dom-server.edge.production.min.js.map | 2 +- .../cjs/react-dom-server.node.development.js | 938 ++++---- .../cjs/react-dom-server.node.production.js | 767 +++---- .../react-dom-server.node.production.min.js | 383 ++-- ...eact-dom-server.node.production.min.js.map | 2 +- .../cjs/react-dom-test-utils.production.js | 118 +- ...react-dom-test-utils.production.min.js.map | 2 +- .../react-dom-unstable_testing.development.js | 1978 ++++------------- .../react-dom-unstable_testing.production.js | 1226 +++------- ...act-dom-unstable_testing.production.min.js | 824 ++++--- ...dom-unstable_testing.production.min.js.map | 2 +- .../cjs/react-dom.development.js | 1976 ++++------------ .../cjs/react-dom.production.js | 1224 +++------- .../cjs/react-dom.production.min.js | 822 ++++--- .../cjs/react-dom.production.min.js.map | 2 +- .../cjs/react-dom.profiling.js | 1228 +++------- .../cjs/react-dom.profiling.min.js | 862 ++++--- .../cjs/react-dom.profiling.min.js.map | 2 +- .../cjs/react-dom.react-server.development.js | 59 +- .../cjs/react-dom.react-server.production.js | 59 +- .../react-dom.react-server.production.min.js | 12 +- ...act-dom.react-server.production.min.js.map | 2 +- .../react-dom-experimental/package.json | 5 +- ...t-dom-server-legacy.browser.development.js | 780 ++++--- ...ct-dom-server-legacy.browser.production.js | 655 +++--- ...om-server-legacy.browser.production.min.js | 138 +- ...erver-legacy.browser.production.min.js.map | 2 +- ...eact-dom-server-legacy.node.development.js | 786 ++++--- ...react-dom-server-legacy.node.production.js | 667 +++--- ...t-dom-server-legacy.node.production.min.js | 184 +- ...m-server-legacy.node.production.min.js.map | 2 +- ...t-dom-server-rendering-stub.development.js | 65 +- ...ct-dom-server-rendering-stub.production.js | 63 +- ...om-server-rendering-stub.production.min.js | 16 +- ...erver-rendering-stub.production.min.js.map | 2 +- .../react-dom-server.browser.development.js | 780 ++++--- .../react-dom-server.browser.production.js | 655 +++--- ...react-dom-server.browser.production.min.js | 174 +- ...t-dom-server.browser.production.min.js.map | 2 +- .../cjs/react-dom-server.bun.production.js | 661 +++--- ...react-dom-server.bun.production.min.js.map | 2 +- .../cjs/react-dom-server.edge.development.js | 780 ++++--- .../cjs/react-dom-server.edge.production.js | 661 +++--- .../react-dom-server.edge.production.min.js | 190 +- ...eact-dom-server.edge.production.min.js.map | 2 +- .../cjs/react-dom-server.node.development.js | 780 ++++--- .../cjs/react-dom-server.node.production.js | 661 +++--- .../react-dom-server.node.production.min.js | 173 +- ...eact-dom-server.node.production.min.js.map | 2 +- .../cjs/react-dom-test-utils.production.js | 118 +- ...react-dom-test-utils.production.min.js.map | 2 +- .../react-dom/cjs/react-dom.development.js | 1161 ++++------ .../react-dom/cjs/react-dom.production.js | 653 +++--- .../react-dom/cjs/react-dom.production.min.js | 788 +++---- .../cjs/react-dom.production.min.js.map | 2 +- .../react-dom/cjs/react-dom.profiling.js | 657 +++--- .../react-dom/cjs/react-dom.profiling.min.js | 818 ++++--- .../cjs/react-dom.profiling.min.js.map | 2 +- .../cjs/react-dom.react-server.development.js | 59 +- .../cjs/react-dom.react-server.production.js | 59 +- .../react-dom.react-server.production.min.js | 12 +- ...act-dom.react-server.production.min.js.map | 2 +- .../next/src/compiled/react-dom/package.json | 5 +- .../cjs/react-jsx-dev-runtime.development.js | 29 +- .../cjs/react-jsx-runtime.development.js | 29 +- .../cjs/react-jsx-runtime.production.js | 4 +- .../cjs/react-jsx-runtime.profiling.js | 4 +- ...ct-jsx-runtime.react-server.development.js | 29 +- ...act-jsx-runtime.react-server.production.js | 4 +- .../cjs/react.development.js | 89 +- .../cjs/react.production.js | 18 +- .../cjs/react.production.min.js | 10 +- .../cjs/react.production.min.js.map | 2 +- .../cjs/react.react-server.development.js | 47 +- .../cjs/react.react-server.production.js | 18 +- .../cjs/react.react-server.production.min.js | 8 +- .../react.react-server.production.min.js.map | 2 +- .../compiled/react-experimental/package.json | 3 - ...om-turbopack-client.browser.development.js | 386 ++-- ...dom-turbopack-client.browser.production.js | 345 ++- ...turbopack-client.browser.production.min.js | 58 +- ...opack-client.browser.production.min.js.map | 2 +- ...r-dom-turbopack-client.edge.development.js | 387 ++-- ...er-dom-turbopack-client.edge.production.js | 346 ++- ...om-turbopack-client.edge.production.min.js | 71 +- ...urbopack-client.edge.production.min.js.map | 2 +- ...r-dom-turbopack-client.node.development.js | 380 ++-- ...er-dom-turbopack-client.node.production.js | 339 ++- ...om-turbopack-client.node.production.min.js | 66 +- ...urbopack-client.node.production.min.js.map | 2 +- ...opack-client.node.unbundled.development.js | 380 ++-- ...bopack-client.node.unbundled.production.js | 339 ++- ...ck-client.node.unbundled.production.min.js | 68 +- ...lient.node.unbundled.production.min.js.map | 2 +- ...om-turbopack-server.browser.development.js | 365 +-- ...dom-turbopack-server.browser.production.js | 363 +-- ...turbopack-server.browser.production.min.js | 135 +- ...opack-server.browser.production.min.js.map | 2 +- ...r-dom-turbopack-server.edge.development.js | 365 +-- ...er-dom-turbopack-server.edge.production.js | 363 +-- ...om-turbopack-server.edge.production.min.js | 136 +- ...urbopack-server.edge.production.min.js.map | 2 +- ...r-dom-turbopack-server.node.development.js | 365 +-- ...er-dom-turbopack-server.node.production.js | 363 +-- ...om-turbopack-server.node.production.min.js | 143 +- ...urbopack-server.node.production.min.js.map | 2 +- ...opack-server.node.unbundled.development.js | 365 +-- ...bopack-server.node.unbundled.production.js | 363 +-- ...ck-server.node.unbundled.production.min.js | 139 +- ...erver.node.unbundled.production.min.js.map | 2 +- .../package.json | 7 +- ...om-turbopack-client.browser.development.js | 386 ++-- ...dom-turbopack-client.browser.production.js | 345 ++- ...turbopack-client.browser.production.min.js | 55 +- ...opack-client.browser.production.min.js.map | 2 +- ...r-dom-turbopack-client.edge.development.js | 387 ++-- ...er-dom-turbopack-client.edge.production.js | 346 ++- ...om-turbopack-client.edge.production.min.js | 66 +- ...urbopack-client.edge.production.min.js.map | 2 +- ...r-dom-turbopack-client.node.development.js | 380 ++-- ...er-dom-turbopack-client.node.production.js | 339 ++- ...om-turbopack-client.node.production.min.js | 64 +- ...urbopack-client.node.production.min.js.map | 2 +- ...opack-client.node.unbundled.development.js | 380 ++-- ...bopack-client.node.unbundled.production.js | 339 ++- ...ck-client.node.unbundled.production.min.js | 62 +- ...lient.node.unbundled.production.min.js.map | 2 +- ...om-turbopack-server.browser.development.js | 361 +-- ...dom-turbopack-server.browser.production.js | 363 +-- ...turbopack-server.browser.production.min.js | 119 +- ...opack-server.browser.production.min.js.map | 2 +- ...r-dom-turbopack-server.edge.development.js | 361 +-- ...er-dom-turbopack-server.edge.production.js | 363 +-- ...om-turbopack-server.edge.production.min.js | 134 +- ...urbopack-server.edge.production.min.js.map | 2 +- ...r-dom-turbopack-server.node.development.js | 361 +-- ...er-dom-turbopack-server.node.production.js | 363 +-- ...om-turbopack-server.node.production.min.js | 141 +- ...urbopack-server.node.production.min.js.map | 2 +- ...opack-server.node.unbundled.development.js | 361 +-- ...bopack-server.node.unbundled.production.js | 363 +-- ...ck-server.node.unbundled.production.min.js | 135 +- ...erver.node.unbundled.production.min.js.map | 2 +- .../react-server-dom-turbopack/package.json | 7 +- ...-dom-webpack-client.browser.development.js | 386 ++-- ...r-dom-webpack-client.browser.production.js | 345 ++- ...m-webpack-client.browser.production.min.js | 60 +- ...bpack-client.browser.production.min.js.map | 2 +- ...ver-dom-webpack-client.edge.development.js | 387 ++-- ...rver-dom-webpack-client.edge.production.js | 346 ++- ...-dom-webpack-client.edge.production.min.js | 71 +- ...-webpack-client.edge.production.min.js.map | 2 +- ...ver-dom-webpack-client.node.development.js | 380 ++-- ...rver-dom-webpack-client.node.production.js | 339 ++- ...-dom-webpack-client.node.production.min.js | 66 +- ...-webpack-client.node.production.min.js.map | 2 +- ...bpack-client.node.unbundled.development.js | 380 ++-- ...ebpack-client.node.unbundled.production.js | 339 ++- ...ck-client.node.unbundled.production.min.js | 68 +- ...lient.node.unbundled.production.min.js.map | 2 +- ...-dom-webpack-server.browser.development.js | 365 +-- ...r-dom-webpack-server.browser.production.js | 363 +-- ...m-webpack-server.browser.production.min.js | 137 +- ...bpack-server.browser.production.min.js.map | 2 +- ...ver-dom-webpack-server.edge.development.js | 365 +-- ...rver-dom-webpack-server.edge.production.js | 363 +-- ...-dom-webpack-server.edge.production.min.js | 138 +- ...-webpack-server.edge.production.min.js.map | 2 +- ...ver-dom-webpack-server.node.development.js | 365 +-- ...rver-dom-webpack-server.node.production.js | 363 +-- ...-dom-webpack-server.node.production.min.js | 145 +- ...-webpack-server.node.production.min.js.map | 2 +- ...bpack-server.node.unbundled.development.js | 365 +-- ...ebpack-server.node.unbundled.production.js | 363 +-- ...ck-server.node.unbundled.production.min.js | 141 +- ...erver.node.unbundled.production.min.js.map | 2 +- .../package.json | 7 +- ...-dom-webpack-client.browser.development.js | 386 ++-- ...r-dom-webpack-client.browser.production.js | 345 ++- ...m-webpack-client.browser.production.min.js | 56 +- ...bpack-client.browser.production.min.js.map | 2 +- ...ver-dom-webpack-client.edge.development.js | 387 ++-- ...rver-dom-webpack-client.edge.production.js | 346 ++- ...-dom-webpack-client.edge.production.min.js | 66 +- ...-webpack-client.edge.production.min.js.map | 2 +- ...ver-dom-webpack-client.node.development.js | 380 ++-- ...rver-dom-webpack-client.node.production.js | 339 ++- ...-dom-webpack-client.node.production.min.js | 64 +- ...-webpack-client.node.production.min.js.map | 2 +- ...bpack-client.node.unbundled.development.js | 380 ++-- ...ebpack-client.node.unbundled.production.js | 339 ++- ...ck-client.node.unbundled.production.min.js | 62 +- ...lient.node.unbundled.production.min.js.map | 2 +- ...-dom-webpack-server.browser.development.js | 361 +-- ...r-dom-webpack-server.browser.production.js | 363 +-- ...m-webpack-server.browser.production.min.js | 121 +- ...bpack-server.browser.production.min.js.map | 2 +- ...ver-dom-webpack-server.edge.development.js | 361 +-- ...rver-dom-webpack-server.edge.production.js | 363 +-- ...-dom-webpack-server.edge.production.min.js | 136 +- ...-webpack-server.edge.production.min.js.map | 2 +- ...ver-dom-webpack-server.node.development.js | 361 +-- ...rver-dom-webpack-server.node.production.js | 363 +-- ...-dom-webpack-server.node.production.min.js | 143 +- ...-webpack-server.node.production.min.js.map | 2 +- ...bpack-server.node.unbundled.development.js | 361 +-- ...ebpack-server.node.unbundled.production.js | 363 +-- ...ck-server.node.unbundled.production.min.js | 137 +- ...erver.node.unbundled.production.min.js.map | 2 +- .../react-server-dom-webpack/package.json | 7 +- .../cjs/react-jsx-dev-runtime.development.js | 12 +- .../cjs/react-jsx-runtime.development.js | 12 +- ...ct-jsx-runtime.react-server.development.js | 12 +- .../compiled/react/cjs/react.development.js | 75 +- .../compiled/react/cjs/react.production.js | 21 +- .../react/cjs/react.production.min.js | 22 +- .../react/cjs/react.production.min.js.map | 2 +- .../cjs/react.react-server.development.js | 31 +- .../cjs/react.react-server.production.js | 21 +- .../cjs/react.react-server.production.min.js | 4 +- .../react.react-server.production.min.js.map | 2 +- packages/next/src/compiled/react/package.json | 3 - ...cheduler-unstable_post_task.development.js | 3 +- ...scheduler-unstable_post_task.production.js | 3 +- ...r-unstable_post_task.production.min.js.map | 2 +- .../cjs/scheduler.development.js | 12 +- .../cjs/scheduler.native.development.js | 12 +- .../cjs/scheduler.native.production.js | 12 +- .../cjs/scheduler.native.production.min.js | 2 +- .../scheduler.native.production.min.js.map | 2 +- .../cjs/scheduler.production.js | 12 +- .../cjs/scheduler.production.min.js | 4 +- .../cjs/scheduler.production.min.js.map | 2 +- .../scheduler-experimental/package.json | 5 +- ...cheduler-unstable_post_task.development.js | 3 +- ...scheduler-unstable_post_task.production.js | 3 +- ...r-unstable_post_task.production.min.js.map | 2 +- .../scheduler/cjs/scheduler.development.js | 12 +- .../cjs/scheduler.native.development.js | 12 +- .../cjs/scheduler.native.production.js | 12 +- .../cjs/scheduler.native.production.min.js | 2 +- .../scheduler.native.production.min.js.map | 2 +- .../scheduler/cjs/scheduler.production.js | 12 +- .../scheduler/cjs/scheduler.production.min.js | 4 +- .../cjs/scheduler.production.min.js.map | 2 +- .../next/src/compiled/scheduler/package.json | 5 +- pnpm-lock.yaml | 118 +- scripts/sync-react.js | 7 +- .../acceptance-app/hydration-error.test.ts | 2 +- 274 files changed, 31810 insertions(+), 30452 deletions(-) diff --git a/package.json b/package.json index 0e827998d008e..0078056dc173f 100644 --- a/package.json +++ b/package.json @@ -199,16 +199,16 @@ "random-seed": "0.3.0", "react": "18.2.0", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@18.3.0-canary-14898b6a9-20240318", + "react-builtin": "npm:react@18.3.0-canary-c3048aab4-20240326", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@18.3.0-canary-14898b6a9-20240318", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-14898b6a9-20240318", - "react-experimental-builtin": "npm:react@0.0.0-experimental-14898b6a9-20240318", - "react-server-dom-turbopack": "18.3.0-canary-14898b6a9-20240318", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-14898b6a9-20240318", - "react-server-dom-webpack": "18.3.0-canary-14898b6a9-20240318", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-14898b6a9-20240318", + "react-dom-builtin": "npm:react-dom@18.3.0-canary-c3048aab4-20240326", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-c3048aab4-20240326", + "react-experimental-builtin": "npm:react@0.0.0-experimental-c3048aab4-20240326", + "react-server-dom-turbopack": "18.3.0-canary-c3048aab4-20240326", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-c3048aab4-20240326", + "react-server-dom-webpack": "18.3.0-canary-c3048aab4-20240326", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-c3048aab4-20240326", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -218,8 +218,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.9", - "scheduler-builtin": "npm:scheduler@0.24.0-canary-14898b6a9-20240318", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-14898b6a9-20240318", + "scheduler-builtin": "npm:scheduler@0.24.0-canary-c3048aab4-20240326", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-c3048aab4-20240326", "seedrandom": "3.0.5", "selenium-webdriver": "4.0.0-beta.4", "semver": "7.3.7", diff --git a/packages/next/src/build/create-compiler-aliases.ts b/packages/next/src/build/create-compiler-aliases.ts index 6c6898bd04d5e..482108bd422d0 100644 --- a/packages/next/src/build/create-compiler-aliases.ts +++ b/packages/next/src/build/create-compiler-aliases.ts @@ -259,9 +259,9 @@ export function createRSCAliases( 'react-dom/static$': `next/dist/compiled/react-dom-experimental/static`, 'react-dom/static.edge$': `next/dist/compiled/react-dom-experimental/static.edge`, 'react-dom/static.browser$': `next/dist/compiled/react-dom-experimental/static.browser`, - // optimizations to ignore the legacy build of react-dom/server in `server.browser` build - 'react-dom/server.edge$': `next/dist/build/webpack/alias/react-dom-server-edge${bundledReactChannel}.js`, - 'react-dom/server.browser$': `next/dist/build/webpack/alias/react-dom-server-browser${bundledReactChannel}.js`, + // TODO: restore optimizations to ignore the legacy build of react-dom/server in `server.browser` build + 'react-dom/server.edge$': `next/dist/compiled/react-dom${bundledReactChannel}/server.edge`, + 'react-dom/server.browser$': `next/dist/compiled/react-dom${bundledReactChannel}/server.browser`, // react-server-dom-webpack alias 'react-server-dom-webpack/client$': `next/dist/compiled/react-server-dom-webpack${bundledReactChannel}/client`, 'react-server-dom-webpack/client.edge$': `next/dist/compiled/react-server-dom-webpack${bundledReactChannel}/client.edge`, diff --git a/packages/next/src/client/app-index.tsx b/packages/next/src/client/app-index.tsx index f54d9ac06ca39..75867b17e5074 100644 --- a/packages/next/src/client/app-index.tsx +++ b/packages/next/src/client/app-index.tsx @@ -19,7 +19,12 @@ import { HMR_ACTIONS_SENT_TO_BROWSER } from '../server/dev/hot-reloader-types' // Since React doesn't call onerror for errors caught in error boundaries. const origConsoleError = window.console.error window.console.error = (...args) => { - if (isNextRouterError(args[0])) { + // See https://github.com/facebook/react/blob/d50323eb845c5fde0d720cae888bf35dedd05506/packages/react-reconciler/src/ReactFiberErrorLogger.js#L78 + if ( + process.env.NODE_ENV !== 'production' + ? isNextRouterError(args[1]) + : isNextRouterError(args[0]) + ) { return } origConsoleError.apply(window.console, args) diff --git a/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-error-handler.ts b/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-error-handler.ts index be00a7ccd94e5..803538143f859 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-error-handler.ts +++ b/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-error-handler.ts @@ -19,16 +19,11 @@ const errorHandlers: Array = [] const rejectionHandlers: Array = [] if (typeof window !== 'undefined') { - // These event handlers must be added outside of the hook because there is no - // guarantee that the hook will be alive in a mounted component in time to - // when the errors occur. - window.addEventListener('error', (ev: WindowEventMap['error']): void => { - if (isNextRouterError(ev.error)) { - ev.preventDefault() - return + function handleError(error: unknown) { + if (isNextRouterError(error)) { + return false } - const error = ev?.error if ( !error || !(error instanceof Error) || @@ -60,18 +55,39 @@ if (typeof window !== 'undefined') { '\nSee more info here: https://nextjs.org/docs/messages/react-hydration-error' } - const e = error // Only queue one hydration every time if (isCausedByHydrationFailure) { if (!hasHydrationError) { - errorQueue.push(e) + errorQueue.push(error) } hasHydrationError = true } for (const handler of errorHandlers) { - handler(e) + handler(error) + } + } + // These event handlers must be added outside of the hook because there is no + // guarantee that the hook will be alive in a mounted component in time to + // when the errors occur. + // uncaught errors go through reportError + window.addEventListener( + 'error', + (event: WindowEventMap['error']): void | boolean => { + if (handleError(event.error) === false) { + event.preventDefault() + return false + } + } + ) + // caught errors go through console.error + const origConsoleError = window.console.error + window.console.error = (...args) => { + // See https://github.com/facebook/react/blob/d50323eb845c5fde0d720cae888bf35dedd05506/packages/react-reconciler/src/ReactFiberErrorLogger.js#L78 + const error = process.env.NODE_ENV !== 'production' ? args[1] : args[0] + if (handleError(error) !== false) { + origConsoleError.apply(window.console, args) } - }) + } window.addEventListener( 'unhandledrejection', (ev: WindowEventMap['unhandledrejection']): void => { diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index bd07a7b8066b7..3ba92e6d38510 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { var React = require("next/dist/compiled/react-experimental"); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-experimental-14898b6a9-20240318'; +var ReactVersion = '18.3.0-experimental-c3048aab4-20240326'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -610,7 +610,13 @@ function checkHtmlStringCoercion(value) { } // ----------------------------------------------------------------------------- -var enableFloat = true; // Enables unstable_useMemoCache hook, intended as a compilation target for +// Ready for next major. +// +// Alias __NEXT_MAJOR__ to true for easier skimming. +// ----------------------------------------------------------------------------- + +var __NEXT_MAJOR__ = true; // Removes legacy style context +var enableBigIntSupport = __NEXT_MAJOR__; // $FlowFixMe[method-unbinding] var hasOwnProperty = Object.prototype.hasOwnProperty; @@ -822,9 +828,9 @@ function validateProperties$2(type, props) { }).join(', '); if (invalidProps.length === 1) { - error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); + error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type); } else if (invalidProps.length > 1) { - error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); + error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type); } } } @@ -857,7 +863,7 @@ function isCustomElement(tagName, props) { // These are reserved SVG and MathML elements. // We don't mind this list too much because we expect it to never grow. // The alternative is to track the namespace in a few places which is convoluted. - // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + // https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts case 'annotation-xml': case 'color-profile': case 'font-face': @@ -873,9 +879,9 @@ function isCustomElement(tagName, props) { } } -// When adding attributes to the HTML or SVG allowed attribute list, be sure to // also add them to this module to ensure casing and incorrect name // warnings. + var possibleStandardNames = { // HTML accept: 'accept', @@ -1369,6 +1375,10 @@ var possibleStandardNames = { zoomandpan: 'zoomAndPan' }; +{ + possibleStandardNames.inert = 'inert'; +} + var warnedProperties = {}; var EVENT_NAME_REGEX = /^on./; var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; @@ -1388,22 +1398,20 @@ function validateProperty(tagName, name, value, eventRegistry) { warnedProperties[name] = true; return true; - } + } // Actions are special because unlike events they can have other value types. - { - // Actions are special because unlike events they can have other value types. - if (typeof value === 'function') { - if (tagName === 'form' && name === 'action') { - return true; - } - if (tagName === 'input' && name === 'formAction') { - return true; - } + if (typeof value === 'function') { + if (tagName === 'form' && name === 'action') { + return true; + } - if (tagName === 'button' && name === 'formAction') { - return true; - } + if (tagName === 'input' && name === 'formAction') { + return true; + } + + if (tagName === 'button' && name === 'formAction') { + return true; } } // We can't rely on the event system being injected on the server. @@ -1566,6 +1574,16 @@ function validateProperty(tagName, name, value, eventRegistry) { // Boolean properties can accept boolean values return true; } + // fallthrough + + case 'inert': + { + { + // Boolean properties can accept boolean values + return true; + } + } + // fallthrough for new boolean props without the flag on default: { @@ -1629,6 +1647,14 @@ function validateProperty(tagName, name, value, eventRegistry) { break; } + case 'inert': + { + { + break; + } + } + // fallthrough for new boolean props without the flag on + default: { return true; @@ -1664,9 +1690,9 @@ function warnUnknownProperties(type, props, eventRegistry) { }).join(', '); if (unknownProps.length === 1) { - error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); + error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type); } else if (unknownProps.length > 1) { - error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); + error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type); } } } @@ -1866,7 +1892,7 @@ function escapeHtml(string) { function escapeTextForBrowser(text) { - if (typeof text === 'boolean' || typeof text === 'number') { + if (typeof text === 'boolean' || typeof text === 'number' || typeof text === 'bigint') { // this shortcircuit helps perf for types that we know will never have // special characters, especially given that this function is used often // for numeric dom ids. @@ -1907,7 +1933,6 @@ function hyphenateStyleName(name) { /* eslint-disable max-len */ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; -var didWarn = false; function sanitizeURL(url) { // We should never have symbols here because they get filtered out elsewhere. @@ -1915,10 +1940,11 @@ function sanitizeURL(url) { var stringifiedURL = '' + url; { - if (!didWarn && isJavaScriptProtocol.test(stringifiedURL)) { - didWarn = true; - - error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(stringifiedURL)); + if (isJavaScriptProtocol.test(stringifiedURL)) { + // Return a different javascript: url that doesn't cause any side-effects and just + // throws if ever visited. + // eslint-disable-next-line no-script-url + return "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"; } } @@ -1949,19 +1975,17 @@ var NotPending = Object.freeze(sharedNotPendingObject) ; var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; -var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; -var ReactDOMServerDispatcher = { +var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.ReactDOMCurrentDispatcher; +var previousDispatcher = ReactDOMCurrentDispatcher.current; +ReactDOMCurrentDispatcher.current = { prefetchDNS: prefetchDNS, preconnect: preconnect, preload: preload, preloadModule: preloadModule, - preinitStyle: preinitStyle, preinitScript: preinitScript, + preinitStyle: preinitStyle, preinitModuleScript: preinitModuleScript -}; -function prepareHostDispatcher() { - ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; -} // We make every property of the descriptor optional because it is not a contract that +}; // We make every property of the descriptor optional because it is not a contract that var ScriptStreamingFormat = 0; var DataStreamingFormat = 1; var NothingSent @@ -2048,10 +2072,16 @@ var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; +var didWarnForNewBooleanPropsWithEmptyValue; + +{ + didWarnForNewBooleanPropsWithEmptyValue = {}; +} // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState$1(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState$1(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; +var didWarnForNewBooleanPropsWithEmptyValue; + +{ + didWarnForNewBooleanPropsWithEmptyValue = {}; +} // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState$1(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState$1(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; +var didWarnForNewBooleanPropsWithEmptyValue; + +{ + didWarnForNewBooleanPropsWithEmptyValue = {}; +} // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; +var didWarnForNewBooleanPropsWithEmptyValue; + +{ + didWarnForNewBooleanPropsWithEmptyValue = {}; +} // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; +var didWarnForNewBooleanPropsWithEmptyValue; + +{ + didWarnForNewBooleanPropsWithEmptyValue = {}; +} // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState$1(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState$1(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState$1(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState$1(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we stor // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Since we st // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded -const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. +const DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) + function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { const inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('