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('