diff --git a/examples/reproduction-template/package.json b/examples/reproduction-template/package.json index dda04e8c51342..282b16c34a860 100644 --- a/examples/reproduction-template/package.json +++ b/examples/reproduction-template/package.json @@ -7,8 +7,8 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-5d19e1c8-20240923", - "react-dom": "19.0.0-rc-5d19e1c8-20240923" + "react": "19.0.0-rc-778e1ed2-20240926", + "react-dom": "19.0.0-rc-778e1ed2-20240926" }, "devDependencies": { "@types/node": "20.12.12", diff --git a/package.json b/package.json index d680f5ad29c08..9584fbec3f815 100644 --- a/package.json +++ b/package.json @@ -208,19 +208,19 @@ "pretty-bytes": "5.3.0", "pretty-ms": "7.0.0", "random-seed": "0.3.0", - "react": "19.0.0-rc-5d19e1c8-20240923", + "react": "19.0.0-rc-778e1ed2-20240926", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@19.0.0-rc-5d19e1c8-20240923", - "react-dom": "19.0.0-rc-5d19e1c8-20240923", + "react-builtin": "npm:react@19.0.0-rc-778e1ed2-20240926", + "react-dom": "19.0.0-rc-778e1ed2-20240926", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@19.0.0-rc-5d19e1c8-20240923", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-5d19e1c8-20240923", - "react-experimental-builtin": "npm:react@0.0.0-experimental-5d19e1c8-20240923", - "react-is-builtin": "npm:react-is@19.0.0-rc-5d19e1c8-20240923", - "react-server-dom-turbopack": "19.0.0-rc-5d19e1c8-20240923", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-5d19e1c8-20240923", - "react-server-dom-webpack": "19.0.0-rc-5d19e1c8-20240923", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-5d19e1c8-20240923", + "react-dom-builtin": "npm:react-dom@19.0.0-rc-778e1ed2-20240926", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-778e1ed2-20240926", + "react-experimental-builtin": "npm:react@0.0.0-experimental-778e1ed2-20240926", + "react-is-builtin": "npm:react-is@19.0.0-rc-778e1ed2-20240926", + "react-server-dom-turbopack": "19.0.0-rc-778e1ed2-20240926", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-778e1ed2-20240926", + "react-server-dom-webpack": "19.0.0-rc-778e1ed2-20240926", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-778e1ed2-20240926", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -230,8 +230,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.9", - "scheduler-builtin": "npm:scheduler@0.25.0-rc-5d19e1c8-20240923", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-5d19e1c8-20240923", + "scheduler-builtin": "npm:scheduler@0.25.0-rc-778e1ed2-20240926", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-778e1ed2-20240926", "seedrandom": "3.0.5", "semver": "7.3.7", "shell-quote": "1.7.3", @@ -271,10 +271,10 @@ "@babel/traverse": "7.22.5", "@types/react": "npm:types-react@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", - "react": "19.0.0-rc-5d19e1c8-20240923", - "react-dom": "19.0.0-rc-5d19e1c8-20240923", - "react-is": "19.0.0-rc-5d19e1c8-20240923", - "scheduler": "0.25.0-rc-5d19e1c8-20240923" + "react": "19.0.0-rc-778e1ed2-20240926", + "react-dom": "19.0.0-rc-778e1ed2-20240926", + "react-is": "19.0.0-rc-778e1ed2-20240926", + "scheduler": "0.25.0-rc-778e1ed2-20240926" }, "patchedDependencies": { "webpack-sources@3.2.3": "patches/webpack-sources@3.2.3.patch" diff --git a/packages/create-next-app/templates/index.ts b/packages/create-next-app/templates/index.ts index 6e91c597690bb..e5fe2f2e84181 100644 --- a/packages/create-next-app/templates/index.ts +++ b/packages/create-next-app/templates/index.ts @@ -13,7 +13,7 @@ import { GetTemplateFileArgs, InstallTemplateArgs } from "./types"; // Do not rename or format. sync-react script relies on this line. // prettier-ignore -const nextjsReactPeerVersion = "19.0.0-rc-5d19e1c8-20240923"; +const nextjsReactPeerVersion = "19.0.0-rc-778e1ed2-20240926"; /** * Get the file path for a given file in a template, e.g. "next.config.js". diff --git a/packages/next/package.json b/packages/next/package.json index 13896f2ca6abe..0b9ec4be1c1bb 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -107,8 +107,8 @@ "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", - "react": "^18.2.0 || 19.0.0-rc-5d19e1c8-20240923", - "react-dom": "^18.2.0 || 19.0.0-rc-5d19e1c8-20240923", + "react": "^18.2.0 || 19.0.0-rc-778e1ed2-20240926", + "react-dom": "^18.2.0 || 19.0.0-rc-778e1ed2-20240926", "sass": "^1.3.0" }, "peerDependenciesMeta": { diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js index 9fc79fa112425..96c37316b3197 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js @@ -1031,43 +1031,39 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1114,14 +1110,6 @@ ); } } - function getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; - } function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -1142,9 +1130,7 @@ root, finishedLanes, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; @@ -1155,17 +1141,17 @@ root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; + var index = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index; + finishedLanes[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -1177,14 +1163,9 @@ var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -1236,6 +1217,17 @@ lanes &= ~root; } } + function getGroupNameOfHighestPriorityLane(lanes) { + return lanes & 63 + ? "Blocking" + : lanes & 4194240 + ? "Transition" + : lanes & 62914560 + ? "Suspense" + : lanes & 2080374784 + ? "Idle" + : "Other"; + } function lanesToEventPriority(lanes) { lanes &= -lanes; return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes @@ -3774,6 +3766,34 @@ (reusableComponentOptions.end = endTime), performance.measure(fiber, reusableComponentOptions)); } + function logRenderPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "primary-dark"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Render", reusableComponentOptions)); + } + function logSuspenseThrottlePhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Throttled", reusableComponentOptions)); + } + function logSuspendedCommitPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Suspended", reusableComponentOptions)); + } + function logCommitPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-dark"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Commit", reusableComponentOptions)); + } function finishQueueingConcurrentUpdates() { for ( var endIndex = concurrentQueuesIndex, @@ -8852,33 +8872,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2262; - var JSCompiler_object_inline_stack_2261 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2281; + var JSCompiler_object_inline_stack_2280 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2259 = !1; + var JSCompiler_object_inline_message_2278 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2262 = didSuspend) || - (JSCompiler_object_inline_componentStack_2262 = + (JSCompiler_object_inline_componentStack_2281 = didSuspend) || + (JSCompiler_object_inline_componentStack_2281 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2262 && - ((JSCompiler_object_inline_message_2259 = !0), + JSCompiler_object_inline_componentStack_2281 && + ((JSCompiler_object_inline_message_2278 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2262 = + JSCompiler_object_inline_componentStack_2281 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2259 + JSCompiler_object_inline_message_2278 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2260 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2279 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2260)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2279)) { c: { - var instance = JSCompiler_object_inline_digest_2260; + var instance = JSCompiler_object_inline_digest_2279; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8919,19 +8939,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2260 + JSCompiler_object_inline_digest_2279 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2260 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2279 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2260 && - ((JSCompiler_object_inline_digest_2260 = - JSCompiler_object_inline_digest_2260.dehydrated), - null !== JSCompiler_object_inline_digest_2260) + null !== JSCompiler_object_inline_digest_2279 && + ((JSCompiler_object_inline_digest_2279 = + JSCompiler_object_inline_digest_2279.dehydrated), + null !== JSCompiler_object_inline_digest_2279) ) return ( - JSCompiler_object_inline_digest_2260.data === + JSCompiler_object_inline_digest_2279.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8939,68 +8959,68 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2260 = - JSCompiler_object_inline_stack_2261.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2261.fallback; - if (JSCompiler_object_inline_message_2259) + JSCompiler_object_inline_digest_2279 = + JSCompiler_object_inline_stack_2280.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2280.fallback; + if (JSCompiler_object_inline_message_2278) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2261 = + (JSCompiler_object_inline_stack_2280 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2260, + JSCompiler_object_inline_digest_2279, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2259 = workInProgress.child), - (JSCompiler_object_inline_message_2259.memoizedState = + (JSCompiler_object_inline_message_2278 = workInProgress.child), + (JSCompiler_object_inline_message_2278.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2259.childLanes = + (JSCompiler_object_inline_message_2278.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2262, + JSCompiler_object_inline_componentStack_2281, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2261 + JSCompiler_object_inline_stack_2280 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2261.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2280.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2261 = + (JSCompiler_object_inline_stack_2280 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2260, + JSCompiler_object_inline_digest_2279, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2259 = workInProgress.child), - (JSCompiler_object_inline_message_2259.memoizedState = + (JSCompiler_object_inline_message_2278 = workInProgress.child), + (JSCompiler_object_inline_message_2278.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2259.childLanes = + (JSCompiler_object_inline_message_2278.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2262, + JSCompiler_object_inline_componentStack_2281, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2261 + JSCompiler_object_inline_stack_2280 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2260 + JSCompiler_object_inline_digest_2279 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2260 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2260) + ((JSCompiler_object_inline_digest_2279 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2279) ) { if (didSuspend) workInProgress.flags & 256 @@ -9017,94 +9037,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2259 = - JSCompiler_object_inline_stack_2261.fallback), - (JSCompiler_object_inline_digest_2260 = workInProgress.mode), - (JSCompiler_object_inline_stack_2261 = + (JSCompiler_object_inline_message_2278 = + JSCompiler_object_inline_stack_2280.fallback), + (JSCompiler_object_inline_digest_2279 = workInProgress.mode), + (JSCompiler_object_inline_stack_2280 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2261.children + children: JSCompiler_object_inline_stack_2280.children }, - JSCompiler_object_inline_digest_2260 + JSCompiler_object_inline_digest_2279 )), - (JSCompiler_object_inline_message_2259 = + (JSCompiler_object_inline_message_2278 = createFiberFromFragment( - JSCompiler_object_inline_message_2259, - JSCompiler_object_inline_digest_2260, + JSCompiler_object_inline_message_2278, + JSCompiler_object_inline_digest_2279, renderLanes, null )), - (JSCompiler_object_inline_message_2259.flags |= 2), - (JSCompiler_object_inline_stack_2261.return = workInProgress), - (JSCompiler_object_inline_message_2259.return = workInProgress), - (JSCompiler_object_inline_stack_2261.sibling = - JSCompiler_object_inline_message_2259), - (workInProgress.child = JSCompiler_object_inline_stack_2261), + (JSCompiler_object_inline_message_2278.flags |= 2), + (JSCompiler_object_inline_stack_2280.return = workInProgress), + (JSCompiler_object_inline_message_2278.return = workInProgress), + (JSCompiler_object_inline_stack_2280.sibling = + JSCompiler_object_inline_message_2278), + (workInProgress.child = JSCompiler_object_inline_stack_2280), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2261 = workInProgress.child), - (JSCompiler_object_inline_stack_2261.memoizedState = + (JSCompiler_object_inline_stack_2280 = workInProgress.child), + (JSCompiler_object_inline_stack_2280.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2261.childLanes = + (JSCompiler_object_inline_stack_2280.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2262, + JSCompiler_object_inline_componentStack_2281, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2259)); + (workInProgress = JSCompiler_object_inline_message_2278)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_digest_2260.data === + JSCompiler_object_inline_digest_2279.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_componentStack_2262 = - JSCompiler_object_inline_digest_2260.nextSibling && - JSCompiler_object_inline_digest_2260.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2262) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2262.dgst; - var message = JSCompiler_object_inline_componentStack_2262.msg; - instance = JSCompiler_object_inline_componentStack_2262.stck; + JSCompiler_object_inline_componentStack_2281 = + JSCompiler_object_inline_digest_2279.nextSibling && + JSCompiler_object_inline_digest_2279.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2281) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2281.dgst; + var message = JSCompiler_object_inline_componentStack_2281.msg; + instance = JSCompiler_object_inline_componentStack_2281.stck; var componentStack = - JSCompiler_object_inline_componentStack_2262.cstck; + JSCompiler_object_inline_componentStack_2281.cstck; } - JSCompiler_object_inline_message_2259 = message; - JSCompiler_object_inline_digest_2260 = JSCompiler_temp; - JSCompiler_object_inline_stack_2261 = instance; - JSCompiler_object_inline_componentStack_2262 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2260 && - ((JSCompiler_object_inline_message_2259 = - JSCompiler_object_inline_message_2259 - ? Error(JSCompiler_object_inline_message_2259) + JSCompiler_object_inline_message_2278 = message; + JSCompiler_object_inline_digest_2279 = JSCompiler_temp; + JSCompiler_object_inline_stack_2280 = instance; + JSCompiler_object_inline_componentStack_2281 = componentStack; + "POSTPONE" !== JSCompiler_object_inline_digest_2279 && + ((JSCompiler_object_inline_message_2278 = + JSCompiler_object_inline_message_2278 + ? Error(JSCompiler_object_inline_message_2278) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_message_2259.stack = - JSCompiler_object_inline_stack_2261 || ""), - (JSCompiler_object_inline_message_2259.digest = - JSCompiler_object_inline_digest_2260), - (JSCompiler_object_inline_componentStack_2262 = - void 0 === JSCompiler_object_inline_componentStack_2262 + (JSCompiler_object_inline_message_2278.stack = + JSCompiler_object_inline_stack_2280 || ""), + (JSCompiler_object_inline_message_2278.digest = + JSCompiler_object_inline_digest_2279), + (JSCompiler_object_inline_componentStack_2281 = + void 0 === JSCompiler_object_inline_componentStack_2281 ? null - : JSCompiler_object_inline_componentStack_2262), - "string" === typeof JSCompiler_object_inline_componentStack_2262 && + : JSCompiler_object_inline_componentStack_2281), + "string" === typeof JSCompiler_object_inline_componentStack_2281 && CapturedStacks.set( - JSCompiler_object_inline_message_2259, - JSCompiler_object_inline_componentStack_2262 + JSCompiler_object_inline_message_2278, + JSCompiler_object_inline_componentStack_2281 ), queueHydrationError({ - value: JSCompiler_object_inline_message_2259, + value: JSCompiler_object_inline_message_2278, source: null, - stack: JSCompiler_object_inline_componentStack_2262 + stack: JSCompiler_object_inline_componentStack_2281 })); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9119,25 +9139,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2262 = + (JSCompiler_object_inline_componentStack_2281 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2262) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2281) ) { - JSCompiler_object_inline_componentStack_2262 = workInProgressRoot; - if (null !== JSCompiler_object_inline_componentStack_2262) { - JSCompiler_object_inline_stack_2261 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2261 & 42)) - JSCompiler_object_inline_stack_2261 = 1; + JSCompiler_object_inline_componentStack_2281 = workInProgressRoot; + if (null !== JSCompiler_object_inline_componentStack_2281) { + JSCompiler_object_inline_stack_2280 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2280 & 42)) + JSCompiler_object_inline_stack_2280 = 1; else - switch (JSCompiler_object_inline_stack_2261) { + switch (JSCompiler_object_inline_stack_2280) { case 2: - JSCompiler_object_inline_stack_2261 = 1; + JSCompiler_object_inline_stack_2280 = 1; break; case 8: - JSCompiler_object_inline_stack_2261 = 4; + JSCompiler_object_inline_stack_2280 = 4; break; case 32: - JSCompiler_object_inline_stack_2261 = 16; + JSCompiler_object_inline_stack_2280 = 16; break; case 128: case 256: @@ -9158,40 +9178,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2261 = 64; + JSCompiler_object_inline_stack_2280 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2261 = 134217728; + JSCompiler_object_inline_stack_2280 = 134217728; break; default: - JSCompiler_object_inline_stack_2261 = 0; + JSCompiler_object_inline_stack_2280 = 0; } - JSCompiler_object_inline_stack_2261 = + JSCompiler_object_inline_stack_2280 = 0 !== - (JSCompiler_object_inline_stack_2261 & - (JSCompiler_object_inline_componentStack_2262.suspendedLanes | + (JSCompiler_object_inline_stack_2280 & + (JSCompiler_object_inline_componentStack_2281.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2261; + : JSCompiler_object_inline_stack_2280; if ( - 0 !== JSCompiler_object_inline_stack_2261 && - JSCompiler_object_inline_stack_2261 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2280 && + JSCompiler_object_inline_stack_2280 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2261), + ((prevState.retryLane = JSCompiler_object_inline_stack_2280), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2261 + JSCompiler_object_inline_stack_2280 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2262, + JSCompiler_object_inline_componentStack_2281, current, - JSCompiler_object_inline_stack_2261 + JSCompiler_object_inline_stack_2280 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_digest_2260.data === + JSCompiler_object_inline_digest_2279.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9199,7 +9219,7 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2260.data === + JSCompiler_object_inline_digest_2279.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9207,12 +9227,12 @@ null, current )), - (JSCompiler_object_inline_digest_2260._reactRetry = + (JSCompiler_object_inline_digest_2279._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2260.nextSibling + JSCompiler_object_inline_digest_2279.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9230,54 +9250,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2261.children + JSCompiler_object_inline_stack_2280.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2259) + if (JSCompiler_object_inline_message_2278) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2259 = - JSCompiler_object_inline_stack_2261.fallback), - (JSCompiler_object_inline_digest_2260 = workInProgress.mode), + (JSCompiler_object_inline_message_2278 = + JSCompiler_object_inline_stack_2280.fallback), + (JSCompiler_object_inline_digest_2279 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2261 = createWorkInProgress( + (JSCompiler_object_inline_stack_2280 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2261.children + children: JSCompiler_object_inline_stack_2280.children } )), - (JSCompiler_object_inline_stack_2261.subtreeFlags = + (JSCompiler_object_inline_stack_2280.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_message_2259 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2278 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2259 + JSCompiler_object_inline_message_2278 )) - : ((JSCompiler_object_inline_message_2259 = createFiberFromFragment( - JSCompiler_object_inline_message_2259, - JSCompiler_object_inline_digest_2260, + : ((JSCompiler_object_inline_message_2278 = createFiberFromFragment( + JSCompiler_object_inline_message_2278, + JSCompiler_object_inline_digest_2279, renderLanes, null )), - (JSCompiler_object_inline_message_2259.flags |= 2)), - (JSCompiler_object_inline_message_2259.return = workInProgress), - (JSCompiler_object_inline_stack_2261.return = workInProgress), - (JSCompiler_object_inline_stack_2261.sibling = - JSCompiler_object_inline_message_2259), - (workInProgress.child = JSCompiler_object_inline_stack_2261), - (JSCompiler_object_inline_stack_2261 = - JSCompiler_object_inline_message_2259), - (JSCompiler_object_inline_message_2259 = workInProgress.child), - (JSCompiler_object_inline_digest_2260 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2260 - ? (JSCompiler_object_inline_digest_2260 = + (JSCompiler_object_inline_message_2278.flags |= 2)), + (JSCompiler_object_inline_message_2278.return = workInProgress), + (JSCompiler_object_inline_stack_2280.return = workInProgress), + (JSCompiler_object_inline_stack_2280.sibling = + JSCompiler_object_inline_message_2278), + (workInProgress.child = JSCompiler_object_inline_stack_2280), + (JSCompiler_object_inline_stack_2280 = + JSCompiler_object_inline_message_2278), + (JSCompiler_object_inline_message_2278 = workInProgress.child), + (JSCompiler_object_inline_digest_2279 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2279 + ? (JSCompiler_object_inline_digest_2279 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2260.cachePool), + JSCompiler_object_inline_digest_2279.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9285,38 +9305,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2260 = { + (JSCompiler_object_inline_digest_2279 = { baseLanes: - JSCompiler_object_inline_digest_2260.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2279.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2259.memoizedState = - JSCompiler_object_inline_digest_2260), - (JSCompiler_object_inline_message_2259.childLanes = + (JSCompiler_object_inline_message_2278.memoizedState = + JSCompiler_object_inline_digest_2279), + (JSCompiler_object_inline_message_2278.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2262, + JSCompiler_object_inline_componentStack_2281, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2261 + JSCompiler_object_inline_stack_2280 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2261.children + children: JSCompiler_object_inline_stack_2280.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2262 = + ((JSCompiler_object_inline_componentStack_2281 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2262 + null === JSCompiler_object_inline_componentStack_2281 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2262.push(current)); + : JSCompiler_object_inline_componentStack_2281.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11234,7 +11254,12 @@ } else ref.current = null; } - function commitProfiler(finishedWork, current, commitTime, effectDuration) { + function commitProfiler( + finishedWork, + current, + commitStartTime, + effectDuration + ) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit; @@ -11248,20 +11273,20 @@ finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, - commitTime + commitStartTime ); "function" === typeof onCommit && onCommit( finishedWork.memoizedProps.id, current, effectDuration, - commitTime + commitStartTime ); } function commitProfilerPostCommitImpl( finishedWork, current, - commitTime, + commitStartTime, passiveEffectDuration ) { var _finishedWork$memoize2 = finishedWork.memoizedProps; @@ -11274,7 +11299,7 @@ finishedWork, current, passiveEffectDuration, - commitTime + commitStartTime ); } function commitHostMount(finishedWork) { @@ -11718,7 +11743,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, finishedRoot.effectDuration ); } catch (error) { @@ -12732,7 +12757,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, includeWorkInProgressEffects.effectDuration ); } catch (error) { @@ -12928,7 +12953,7 @@ commitProfilerPostCommitImpl, finishedWork, finishedWork.alternate, - commitTime, + commitStartTime, finishedRoot.passiveEffectDuration ); } catch (error) { @@ -13734,8 +13759,7 @@ workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -14532,8 +14556,7 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if ( @@ -14575,199 +14598,189 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } - function performConcurrentWorkOnRoot(root, didTimeout) { - nestedUpdateScheduled = currentUpdateIsNested = !1; + function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; var shouldTimeSlice = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout; - didTimeout = shouldTimeSlice - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (didTimeout !== RootInProgress) { + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { var renderWasConcurrent = shouldTimeSlice; - do { - if (didTimeout === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - shouldTimeSlice = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(shouldTimeSlice) - ) { - didTimeout = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (didTimeout === RootErrored) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (didTimeout = recoverFromConcurrentError( - root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - didTimeout !== RootErrored) - ) - continue; - } - if (didTimeout === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - completeTime = now(); - switch (didTimeout) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( + exitStatus, + errorRetryLanes$jscomp$0 + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; break a; } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); + } + exitStatus = errorRetryLanes$jscomp$0; } - renderWasConcurrent.finishedWork = shouldTimeSlice; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - else { - if ( - (lanes & 62914560) === lanes && - ((didTimeout = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < didTimeout) - ) { + if (exitStatus !== RootErrored) continue; + } + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + renderWasConcurrent = now$1(); + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), - didTimeout + workInProgressDeferredLane ); break a; } - commitRootWhenReady( - renderWasConcurrent, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + renderWasConcurrent + ); + else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + renderWasConcurrent + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + renderWasConcurrent + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now$1()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; - } - function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (errorRetryLanes !== RootErrored) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes), - RootSuspendedWithDelay - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -14787,10 +14800,16 @@ spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), @@ -14806,10 +14825,13 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + SUSPENDED_COMMIT, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -14819,7 +14841,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -14868,81 +14893,24 @@ (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings - ) { + function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + expirationTimes[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } - function performSyncWorkOnRoot(root, lanes) { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) - throw Error("Should not already be working."); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - currentUpdateIsNested = nestedUpdateScheduled; - nestedUpdateScheduled = !1; - var exitStatus = renderRootSync(root, lanes); - if (exitStatus === RootErrored) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (exitStatus === RootFatalErrored) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (exitStatus === RootDidNotComplete) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - completeTime = now(); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; - } function flushSyncWork$1() { return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -15056,8 +15024,9 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -15150,8 +15119,7 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function queueConcurrentError(error) { @@ -15179,37 +15147,38 @@ prepareFreshStack(root, lanes); } lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$8) { handleThrow(root, thrownValue$8); @@ -15220,14 +15189,11 @@ executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -15251,7 +15217,7 @@ workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); - } + } else checkIfRootIsPrerendering(root, lanes); a: do try { if ( @@ -15568,7 +15534,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -15583,13 +15552,15 @@ previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -15599,7 +15570,10 @@ renderPriorityLevel, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -15607,107 +15581,118 @@ ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - 0 === lanes && + suspendedRetryLanes = root.finishedWork; + updatedLanes = root.finishedLanes; + reusableComponentDevToolDetails.track = + getGroupNameOfHighestPriorityLane(updatedLanes); + logRenderPhase(completedRenderStartTime, completedRenderEndTime); + if (null === suspendedRetryLanes) return null; + 0 === updatedLanes && console.error( "root.finishedLanes should not be empty during a commit. This is a bug in React." ); root.finishedWork = null; root.finishedLanes = 0; - if (finishedWork === root.current) + if (suspendedRetryLanes === root.current) throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); root.callbackNode = null; root.callbackPriority = 0; root.cancelPendingCommit = null; - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; + completedRenderStartTime = + suspendedRetryLanes.lanes | suspendedRetryLanes.childLanes; + completedRenderStartTime |= concurrentlyUpdatedLanes; markRootFinished( root, - lanes, - remainingLanes, - spawnedLane, updatedLanes, - suspendedRetryLanes + completedRenderStartTime, + spawnedLane ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === finishedWork.actualDuration && - 0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || + (0 === suspendedRetryLanes.actualDuration && + 0 === (suspendedRetryLanes.subtreeFlags & 10256) && + 0 === (suspendedRetryLanes.flags & 10256)) || rootDoesHavePassiveEffects || ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveEffectsRemainingLanes = completedRenderStartTime), + (pendingPassiveEffectsRenderEndTime = completedRenderEndTime), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions + commitStartTime = now(); + suspendedCommitReason === SUSPENDED_COMMIT + ? logSuspendedCommitPhase(completedRenderEndTime, commitStartTime) + : suspendedCommitReason === THROTTLED_COMMIT && + logSuspenseThrottlePhase(completedRenderEndTime, commitStartTime); + transitions = 0 !== (suspendedRetryLanes.flags & 15990); + 0 !== (suspendedRetryLanes.subtreeFlags & 15990) || transitions ? ((transitions = ReactSharedInternals.T), (ReactSharedInternals.T = null), (spawnedLane = ReactDOMSharedInternals.p), (ReactDOMSharedInternals.p = DiscreteEventPriority), - (updatedLanes = executionContext), + (suspendedCommitReason = executionContext), (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - (commitTime = now()), - commitMutationEffects(root, finishedWork, lanes), + commitBeforeMutationEffects(root, suspendedRetryLanes), + commitMutationEffects(root, suspendedRetryLanes, updatedLanes), restoreSelection(selectionInformation, root.containerInfo), (_enabled = !!eventsEnabled), (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffects(finishedWork, root, lanes), + (root.current = suspendedRetryLanes), + commitLayoutEffects(suspendedRetryLanes, root, updatedLanes), requestPaint(), - (executionContext = updatedLanes), + (executionContext = suspendedCommitReason), (ReactDOMSharedInternals.p = spawnedLane), (ReactSharedInternals.T = transitions)) - : ((root.current = finishedWork), (commitTime = now())); + : (root.current = suspendedRetryLanes); + commitEndTime = now(); + logCommitPhase(commitStartTime, commitEndTime); (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + (pendingPassiveEffectsLanes = updatedLanes)) + : (releaseRootPooledCache(root, completedRenderStartTime), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); + completedRenderStartTime = root.pendingLanes; + 0 === completedRenderStartTime && + (legacyErrorBoundariesThatAlreadyFailed = null); transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); + onCommitRoot$1(suspendedRetryLanes.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ + renderPriorityLevel = root.onRecoverableError, + suspendedRetryLanes = 0; + suspendedRetryLanes < recoverableErrors.length; + suspendedRetryLanes++ ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + (completedRenderStartTime = recoverableErrors[suspendedRetryLanes]), + (spawnedLane = makeErrorInfo(completedRenderStartTime.stack)), runWithFiberInDEV( - remainingLanes.source, + completedRenderStartTime.source, renderPriorityLevel, - remainingLanes.value, + completedRenderStartTime.value, spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); - remainingLanes = root.pendingLanes; + completedRenderStartTime = root.pendingLanes; didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (updatedLanes & 4194218) && 0 !== (completedRenderStartTime & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))) : (nestedUpdateCount = 0); - transitions || finalizeRender(lanes, now$1()); + transitions || finalizeRender(updatedLanes, now$1()); flushSyncWorkAcrossRoots_impl(0, !1); return null; } @@ -15728,7 +15713,7 @@ null != remainingLanes && ((root.pooledCache = null), releaseCache(remainingLanes))); } - function flushPassiveEffects() { + function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { var root = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; @@ -15746,10 +15731,10 @@ if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { - priority = pendingPassiveTransitions; + var transitions = pendingPassiveTransitions; pendingPassiveTransitions = null; - var root$jscomp$0 = rootWithPendingPassiveEffects, - lanes = pendingPassiveEffectsLanes; + priority = rootWithPendingPassiveEffects; + var lanes = pendingPassiveEffectsLanes; rootWithPendingPassiveEffects = null; pendingPassiveEffectsLanes = 0; if ( @@ -15760,40 +15745,56 @@ "Cannot flush passive effects while already rendering." ); reusableComponentDevToolDetails.track = - lanes & 63 - ? "Blocking" - : lanes & 4194240 - ? "Transition" - : lanes & 62914560 - ? "Suspense" - : lanes & 2080374784 - ? "Idle" - : "Other"; + getGroupNameOfHighestPriorityLane(lanes); isFlushingPassiveEffects = !0; didScheduleUpdateDuringPassiveEffects = !1; - var prevExecutionContext = executionContext; + var passiveEffectStartTime = 0; + passiveEffectStartTime = now$1(); + var startTime = commitEndTime, + endTime = passiveEffectStartTime; + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure( + "Waiting for Paint", + reusableComponentOptions + )); + startTime = executionContext; executionContext |= CommitContext; - var finishedWork = root$jscomp$0.current; + var finishedWork = priority.current; resetComponentEffectTimers(); commitPassiveUnmountOnFiber(finishedWork); - var finishedWork$jscomp$0 = root$jscomp$0.current; + var finishedWork$jscomp$0 = priority.current; + finishedWork = pendingPassiveEffectsRenderEndTime; resetComponentEffectTimers(); commitPassiveMountOnFiber( - root$jscomp$0, + priority, finishedWork$jscomp$0, lanes, - priority, - completeTime + transitions, + finishedWork ); - commitDoubleInvokeEffectsInDEV(root$jscomp$0); - executionContext = prevExecutionContext; - finalizeRender(lanes, now$1()); + commitDoubleInvokeEffectsInDEV(priority); + executionContext = startTime; + var passiveEffectsEndTime = now$1(); + wasDelayedCommit && + ((wasDelayedCommit = passiveEffectStartTime), + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-dark"), + (reusableComponentOptions.start = wasDelayedCommit), + (reusableComponentOptions.end = passiveEffectsEndTime), + performance.measure( + "Remaining Effects", + reusableComponentOptions + ))); + finalizeRender(lanes, passiveEffectsEndTime); flushSyncWorkAcrossRoots_impl(0, !1); didScheduleUpdateDuringPassiveEffects - ? root$jscomp$0 === rootWithPassiveNestedUpdates + ? priority === rootWithPassiveNestedUpdates ? nestedPassiveUpdateCount++ : ((nestedPassiveUpdateCount = 0), - (rootWithPassiveNestedUpdates = root$jscomp$0)) + (rootWithPassiveNestedUpdates = priority)) : (nestedPassiveUpdateCount = 0); didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1; @@ -15802,7 +15803,7 @@ "function" === typeof injectedHook.onPostCommitFiberRoot ) try { - injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0); + injectedHook.onPostCommitFiberRoot(rendererID, priority); } catch (err) { hasLoggedError || ((hasLoggedError = !0), @@ -15811,7 +15812,7 @@ err )); } - var stateNode = root$jscomp$0.current.stateNode; + var stateNode = priority.current.stateNode; stateNode.effectDuration = 0; stateNode.passiveEffectDuration = 0; JSCompiler_inline_result = !0; @@ -16142,7 +16143,8 @@ root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -16233,8 +16235,6 @@ else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -16247,7 +16247,7 @@ default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), (suspendedLanes = fakeActCallbackNode)) @@ -16256,6 +16256,34 @@ root.callbackNode = suspendedLanes; return currentTime; } + function performWorkOnRootViaSchedulerTask(root, didTimeout) { + nestedUpdateScheduled = currentUpdateIsNested = !1; + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = + workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot( + root, + workInProgressRootRenderLanes$jscomp$0, + didTimeout + ); + scheduleTaskForRootDuringMicrotask(root, now$1()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; + } + function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + currentUpdateIsNested = nestedUpdateScheduled; + nestedUpdateScheduled = !1; + performWorkOnRoot(root, lanes, !0); + } function cancelCallback(callbackNode) { callbackNode !== fakeActCallbackNode && null !== callbackNode && @@ -22489,8 +22517,8 @@ NoStrictPassiveEffectsMode = 64, now = Scheduler.unstable_now, renderStartTime = -0, - completeTime = -0, - commitTime = -0, + commitStartTime = -0, + commitEndTime = -0, profilerStartTime = -1.1, profilerEffectDuration = -0, componentEffectDuration = -0, @@ -24320,16 +24348,20 @@ rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, + pendingPassiveEffectsRenderEndTime = -0, pendingPassiveTransitions = null, - NESTED_UPDATE_LIMIT = 50, + NESTED_UPDATE_LIMIT = 100, nestedUpdateCount = 0, rootWithNestedUpdates = null, isFlushingPassiveEffects = !1, didScheduleUpdateDuringPassiveEffects = !1, - NESTED_PASSIVE_UPDATE_LIMIT = 50, + NESTED_PASSIVE_UPDATE_LIMIT = 100, nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, isRunningInsertionEffect = !1, + IMMEDIATE_COMMIT = 0, + SUSPENDED_COMMIT = 1, + THROTTLED_COMMIT = 2, didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = !1; var didWarnAboutUpdateInRenderForAnotherComponent = new Set(); @@ -24874,11 +24906,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24915,11 +24947,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-5d19e1c8-20240923", + version: "19.0.0-experimental-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-5d19e1c8-20240923" + reconcilerVersion: "19.0.0-experimental-778e1ed2-20240926" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25061,7 +25093,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js index 36aabe44a73cf..b6bcccb91f4fc 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js @@ -597,43 +597,39 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -675,11 +671,6 @@ function computeExpirationTime(lane, currentTime) { return -1; } } -function getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; -} function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -696,14 +687,7 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes -) { +function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; @@ -713,36 +697,31 @@ function markRootFinished( root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index$7 = 31 - clz32(remainingLanes), - lane = 1 << index$7; - entanglements[index$7] = 0; - expirationTimes[index$7] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$7]; + var index$6 = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index$6; + finishedLanes[index$6] = 0; + expirationTimes[index$6] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$6]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$7] = null, index$7 = 0; - index$7 < hiddenUpdatesForLane.length; - index$7++ + hiddenUpdates[index$6] = null, index$6 = 0; + index$6 < hiddenUpdatesForLane.length; + index$6++ ) { - var update = hiddenUpdatesForLane[index$7]; + var update = hiddenUpdatesForLane[index$6]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -757,10 +736,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$8 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$8; - (lane & entangledLanes) | (root[index$8] & entangledLanes) && - (root[index$8] |= entangledLanes); + var index$7 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$7; + (lane & entangledLanes) | (root[index$7] & entangledLanes) && + (root[index$7] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -910,8 +889,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$10 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$10 && "aria-" !== prefix$10) { + var prefix$9 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$9 && "aria-" !== prefix$9) { node.removeAttribute(name); return; } @@ -1244,15 +1223,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$16 in styles) - (styleName = styles[styleName$16]), - styles.hasOwnProperty(styleName$16) && - prevStyles[styleName$16] !== styleName && - setValueForStyle(node, styleName$16, styleName); + for (var styleName$15 in styles) + (styleName = styles[styleName$15]), + styles.hasOwnProperty(styleName$15) && + prevStyles[styleName$15] !== styleName && + setValueForStyle(node, styleName$15, styleName); } else - for (var styleName$17 in styles) - styles.hasOwnProperty(styleName$17) && - setValueForStyle(node, styleName$17, styles[styleName$17]); + for (var styleName$16 in styles) + styles.hasOwnProperty(styleName$16) && + setValueForStyle(node, styleName$16, styles[styleName$16]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1983,14 +1962,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$281; if (canUseDOM) { - var isSupported$jscomp$inline_416 = "oninput" in document; - if (!isSupported$jscomp$inline_416) { - var element$jscomp$inline_417 = document.createElement("div"); - element$jscomp$inline_417.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_416 = - "function" === typeof element$jscomp$inline_417.oninput; + var isSupported$jscomp$inline_415 = "oninput" in document; + if (!isSupported$jscomp$inline_415) { + var element$jscomp$inline_416 = document.createElement("div"); + element$jscomp$inline_416.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_415 = + "function" === typeof element$jscomp$inline_416.oninput; } - JSCompiler_inline_result$jscomp$281 = isSupported$jscomp$inline_416; + JSCompiler_inline_result$jscomp$281 = isSupported$jscomp$inline_415; } else JSCompiler_inline_result$jscomp$281 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$281 && @@ -3933,7 +3912,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$55 = !1; + didReadFromEntangledAsyncAction$54 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3954,11 +3933,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$54 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$54 = !0); continue; } else (updateLane = { @@ -4004,7 +3983,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$55 && + didReadFromEntangledAsyncAction$54 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4202,8 +4181,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$61) { - onActionError(actionQueue, node, error$61); + } catch (error$60) { + onActionError(actionQueue, node, error$60); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4652,14 +4631,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$64 = enqueueUpdate(provider, fiber, lane); - null !== root$64 && - (scheduleUpdateOnFiber(root$64, provider, lane), - entangleTransitions(root$64, provider, lane)); + var root$63 = enqueueUpdate(provider, fiber, lane); + null !== root$63 && + (scheduleUpdateOnFiber(root$63, provider, lane), + entangleTransitions(root$63, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$64 && + null !== root$63 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -5190,9 +5169,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$68 in Component) - void 0 === newProps[propName$68] && - (newProps[propName$68] = Component[propName$68]); + for (var propName$67 in Component) + void 0 === newProps[propName$67] && + (newProps[propName$67] = Component[propName$67]); } return newProps; } @@ -5238,9 +5217,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$69) { + } catch (e$68) { setTimeout(function () { - throw e$69; + throw e$68; }); } } @@ -5251,9 +5230,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$70) { + } catch (e$69) { setTimeout(function () { - throw e$70; + throw e$69; }); } } @@ -7719,8 +7698,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$115) { - captureCommitPhaseError(current, nearestMountedAncestor, error$115); + } catch (error$114) { + captureCommitPhaseError(current, nearestMountedAncestor, error$114); } else ref.current = null; } @@ -7854,7 +7833,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$20) { + } catch (e$19) { JSCompiler_temp = null; break a; } @@ -8029,11 +8008,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$114) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$114 + error$113 ); } } @@ -8187,7 +8166,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$122 = hostParentIsContainer; + var prevHostParentIsContainer$121 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8195,7 +8174,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$122; + hostParentIsContainer = prevHostParentIsContainer$121; if (null !== hostParent) if (hostParentIsContainer) try { @@ -8823,21 +8802,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$116 = JSCompiler_inline_result.stateNode; + var parent$115 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$116, ""), + (setTextContent(parent$115, ""), (JSCompiler_inline_result.flags &= -33)); - var before$117 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$117, parent$116); + var before$116 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$116, parent$115); break; case 3: case 4: - var parent$118 = JSCompiler_inline_result.stateNode.containerInfo, - before$119 = getHostSibling(finishedWork); + var parent$117 = JSCompiler_inline_result.stateNode.containerInfo, + before$118 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$119, - parent$118 + before$118, + parent$117 ); break; default: @@ -9734,8 +9713,7 @@ function scheduleRetryEffect(workInProgress, retryQueue) { workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -9752,14 +9730,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$134 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$134 = lastTailNode), + for (var lastTailNode$133 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$133 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$134 + null === lastTailNode$133 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$134.sibling = null); + : (lastTailNode$133.sibling = null); } } function bubbleProperties(completedWork) { @@ -9769,19 +9747,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$135 = completedWork.child; null !== child$135; ) - (newChildLanes |= child$135.lanes | child$135.childLanes), - (subtreeFlags |= child$135.subtreeFlags & 31457280), - (subtreeFlags |= child$135.flags & 31457280), - (child$135.return = completedWork), - (child$135 = child$135.sibling); + for (var child$134 = completedWork.child; null !== child$134; ) + (newChildLanes |= child$134.lanes | child$134.childLanes), + (subtreeFlags |= child$134.subtreeFlags & 31457280), + (subtreeFlags |= child$134.flags & 31457280), + (child$134.return = completedWork), + (child$134 = child$134.sibling); else - for (child$135 = completedWork.child; null !== child$135; ) - (newChildLanes |= child$135.lanes | child$135.childLanes), - (subtreeFlags |= child$135.subtreeFlags), - (subtreeFlags |= child$135.flags), - (child$135.return = completedWork), - (child$135 = child$135.sibling); + for (child$134 = completedWork.child; null !== child$134; ) + (newChildLanes |= child$134.lanes | child$134.childLanes), + (subtreeFlags |= child$134.subtreeFlags), + (subtreeFlags |= child$134.flags), + (child$134.return = completedWork), + (child$134 = child$134.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10058,11 +10036,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$147 = null; + var cache$146 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$147 = newProps.memoizedState.cachePool.pool); - cache$147 !== type && (newProps.flags |= 2048); + (cache$146 = newProps.memoizedState.cachePool.pool); + cache$146 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -10087,8 +10065,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$147 = type.rendering; - if (null === cache$147) + cache$146 = type.rendering; + if (null === cache$146) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10096,11 +10074,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$147 = findFirstSuspended(current); - if (null !== cache$147) { + cache$146 = findFirstSuspended(current); + if (null !== cache$146) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$147.updateQueue; + current = cache$146.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10125,7 +10103,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$147)), null !== current)) { + if (((current = findFirstSuspended(cache$146)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10135,7 +10113,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$147.alternate && + !cache$146.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10148,13 +10126,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$147.sibling = workInProgress.child), - (workInProgress.child = cache$147)) + ? ((cache$146.sibling = workInProgress.child), + (workInProgress.child = cache$146)) : ((current = type.last), null !== current - ? (current.sibling = cache$147) - : (workInProgress.child = cache$147), - (type.last = cache$147)); + ? (current.sibling = cache$146) + : (workInProgress.child = cache$146), + (type.last = cache$146)); } if (null !== type.tail) return ( @@ -10379,8 +10357,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10391,179 +10368,159 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } -function performConcurrentWorkOnRoot(root, didTimeout) { +function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; var shouldTimeSlice = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout; - didTimeout = shouldTimeSlice - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (0 !== didTimeout) { + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { var renderWasConcurrent = shouldTimeSlice; - do { - if (6 === didTimeout) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - shouldTimeSlice = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(shouldTimeSlice) - ) { - didTimeout = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === didTimeout) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (didTimeout = recoverFromConcurrentError( + if (0 === exitStatus) break; + else if (6 === exitStatus) markRootSuspended(root$jscomp$0, lanes, 0); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), + (JSCompiler_inline_result = + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - 2 !== didTimeout) - ) - continue; - } - if (1 === didTimeout) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (didTimeout) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; break a; } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); + } + exitStatus = JSCompiler_inline_result; } - renderWasConcurrent.finishedWork = shouldTimeSlice; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - ((didTimeout = globalMostRecentFallbackTime + 300 - now()), - 10 < didTimeout) - ) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + switch (exitStatus) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), - didTimeout - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { + markRootSuspended(shouldTimeSlice, lanes, workInProgressDeferredLane); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } - ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; -} -function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes -) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (2 !== errorRetryLanes) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes), - 4 - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; + } + break; + } while (1); + ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -10583,10 +10540,16 @@ function commitRootWhenReady( spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), @@ -10602,10 +10565,13 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + 1, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -10615,7 +10581,10 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -10661,77 +10630,24 @@ function markRootUpdated(root, updatedLanes) { : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings -) { +function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$6 = 31 - clz32(lanes), - lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5; + expirationTimes[index$5] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } -function performSyncWorkOnRoot(root, lanes) { - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - var exitStatus = renderRootSync(root, lanes); - if (2 === exitStatus) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (1 === exitStatus) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (6 === exitStatus) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -10769,8 +10685,9 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -10789,9 +10706,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$4 = 31 - clz32(allEntangledLanes), - lane = 1 << index$4; - lanes |= root[index$4]; + var index$3 = 31 - clz32(allEntangledLanes), + lane = 1 << index$3; + lanes |= root[index$3]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -10861,8 +10778,7 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function queueConcurrentError(error) { @@ -10878,6 +10794,7 @@ function renderRootSync(root, lanes) { if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10886,21 +10803,26 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$162) { handleThrow(root, thrownValue$162); @@ -10911,11 +10833,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -10925,10 +10847,11 @@ function renderRootConcurrent(root, lanes) { executionContext |= 2; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11168,7 +11091,10 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -11183,13 +11109,15 @@ function commitRoot( previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -11197,9 +11125,7 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -11215,14 +11141,7 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + markRootFinished(root, lanes, remainingLanes, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -11234,29 +11153,29 @@ function commitRootImpl( (pendingPassiveEffectsRemainingLanes = remainingLanes), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = ReactDOMSharedInternals.p), - (ReactDOMSharedInternals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (ReactDOMSharedInternals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = ReactDOMSharedInternals.p; + ReactDOMSharedInternals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffectsOnFiber(finishedWork, root); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = prevExecutionContext; + ReactDOMSharedInternals.p = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -11458,7 +11377,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { retryTimedOutBoundary(boundaryFiber, retryLane); } function throwIfInfiniteUpdateLoopDetected() { - if (50 < nestedUpdateCount) + if (100 < nestedUpdateCount) throw ( ((nestedUpdateCount = 0), (rootWithNestedUpdates = null), @@ -11522,7 +11441,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$170, root$170 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$170, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$170, JSCompiler_inline_result)); root$170 = root$170.next; @@ -11566,12 +11486,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5, - expirationTime = expirationTimes[index$5]; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4, + expirationTime = expirationTimes[index$4]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$5] = computeExpirationTime(lane, currentTime); + expirationTimes[index$4] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -11608,8 +11528,6 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { null !== pingedLanes && cancelCallback$1(pingedLanes); switch (lanesToEventPriority(suspendedLanes)) { case 2: - suspendedLanes = ImmediatePriority; - break; case 8: suspendedLanes = UserBlockingPriority; break; @@ -11622,12 +11540,32 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); root.callbackPriority = currentTime; root.callbackNode = suspendedLanes; return currentTime; } +function performWorkOnRootViaSchedulerTask(root, didTimeout) { + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout); + scheduleTaskForRootDuringMicrotask(root, now()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; +} +function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + performWorkOnRoot(root, lanes, !0); +} function scheduleImmediateTask(cb) { scheduleMicrotask(function () { 0 !== (executionContext & 6) @@ -11735,20 +11673,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1404 = 0; - i$jscomp$inline_1404 < simpleEventPluginEvents.length; - i$jscomp$inline_1404++ + var i$jscomp$inline_1410 = 0; + i$jscomp$inline_1410 < simpleEventPluginEvents.length; + i$jscomp$inline_1410++ ) { - var eventName$jscomp$inline_1405 = - simpleEventPluginEvents[i$jscomp$inline_1404], - domEventName$jscomp$inline_1406 = - eventName$jscomp$inline_1405.toLowerCase(), - capitalizedEvent$jscomp$inline_1407 = - eventName$jscomp$inline_1405[0].toUpperCase() + - eventName$jscomp$inline_1405.slice(1); + var eventName$jscomp$inline_1411 = + simpleEventPluginEvents[i$jscomp$inline_1410], + domEventName$jscomp$inline_1412 = + eventName$jscomp$inline_1411.toLowerCase(), + capitalizedEvent$jscomp$inline_1413 = + eventName$jscomp$inline_1411[0].toUpperCase() + + eventName$jscomp$inline_1411.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1406, - "on" + capitalizedEvent$jscomp$inline_1407 + domEventName$jscomp$inline_1412, + "on" + capitalizedEvent$jscomp$inline_1413 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15189,16 +15127,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1651 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1657 = React.version; if ( - "19.0.0-experimental-5d19e1c8-20240923" !== - isomorphicReactPackageVersion$jscomp$inline_1651 + "19.0.0-experimental-778e1ed2-20240926" !== + isomorphicReactPackageVersion$jscomp$inline_1657 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1651, - "19.0.0-experimental-5d19e1c8-20240923" + isomorphicReactPackageVersion$jscomp$inline_1657, + "19.0.0-experimental-778e1ed2-20240926" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15218,25 +15156,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2111 = { +var internals$jscomp$inline_2122 = { bundleType: 0, - version: "19.0.0-experimental-5d19e1c8-20240923", + version: "19.0.0-experimental-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-5d19e1c8-20240923" + reconcilerVersion: "19.0.0-experimental-778e1ed2-20240926" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2112 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2123 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2112.isDisabled && - hook$jscomp$inline_2112.supportsFiber + !hook$jscomp$inline_2123.isDisabled && + hook$jscomp$inline_2123.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2112.inject( - internals$jscomp$inline_2111 + (rendererID = hook$jscomp$inline_2123.inject( + internals$jscomp$inline_2122 )), - (injectedHook = hook$jscomp$inline_2112); + (injectedHook = hook$jscomp$inline_2123); } catch (err) {} } exports.createRoot = function (container, options) { @@ -15328,4 +15266,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js index 31949e978046b..677c43f85bab1 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js @@ -1039,43 +1039,39 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1122,14 +1118,6 @@ ); } } - function getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; - } function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -1150,9 +1138,7 @@ root, finishedLanes, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; @@ -1163,17 +1149,17 @@ root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; + var index = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index; + finishedLanes[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -1185,14 +1171,9 @@ var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -1244,6 +1225,17 @@ lanes &= ~root; } } + function getGroupNameOfHighestPriorityLane(lanes) { + return lanes & 63 + ? "Blocking" + : lanes & 4194240 + ? "Transition" + : lanes & 62914560 + ? "Suspense" + : lanes & 2080374784 + ? "Idle" + : "Other"; + } function lanesToEventPriority(lanes) { lanes &= -lanes; return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes @@ -3782,6 +3774,34 @@ (reusableComponentOptions.end = endTime), performance.measure(fiber, reusableComponentOptions)); } + function logRenderPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "primary-dark"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Render", reusableComponentOptions)); + } + function logSuspenseThrottlePhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Throttled", reusableComponentOptions)); + } + function logSuspendedCommitPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Suspended", reusableComponentOptions)); + } + function logCommitPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-dark"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Commit", reusableComponentOptions)); + } function finishQueueingConcurrentUpdates() { for ( var endIndex = concurrentQueuesIndex, @@ -8860,33 +8880,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2267; - var JSCompiler_object_inline_stack_2266 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2286; + var JSCompiler_object_inline_stack_2285 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2264 = !1; + var JSCompiler_object_inline_message_2283 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2267 = didSuspend) || - (JSCompiler_object_inline_componentStack_2267 = + (JSCompiler_object_inline_componentStack_2286 = didSuspend) || + (JSCompiler_object_inline_componentStack_2286 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2267 && - ((JSCompiler_object_inline_message_2264 = !0), + JSCompiler_object_inline_componentStack_2286 && + ((JSCompiler_object_inline_message_2283 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2267 = + JSCompiler_object_inline_componentStack_2286 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2264 + JSCompiler_object_inline_message_2283 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2265 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2284 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2265)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2284)) { c: { - var instance = JSCompiler_object_inline_digest_2265; + var instance = JSCompiler_object_inline_digest_2284; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8927,19 +8947,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2265 + JSCompiler_object_inline_digest_2284 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2265 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2284 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2265 && - ((JSCompiler_object_inline_digest_2265 = - JSCompiler_object_inline_digest_2265.dehydrated), - null !== JSCompiler_object_inline_digest_2265) + null !== JSCompiler_object_inline_digest_2284 && + ((JSCompiler_object_inline_digest_2284 = + JSCompiler_object_inline_digest_2284.dehydrated), + null !== JSCompiler_object_inline_digest_2284) ) return ( - JSCompiler_object_inline_digest_2265.data === + JSCompiler_object_inline_digest_2284.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8947,68 +8967,68 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2265 = - JSCompiler_object_inline_stack_2266.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2266.fallback; - if (JSCompiler_object_inline_message_2264) + JSCompiler_object_inline_digest_2284 = + JSCompiler_object_inline_stack_2285.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2285.fallback; + if (JSCompiler_object_inline_message_2283) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2266 = + (JSCompiler_object_inline_stack_2285 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2265, + JSCompiler_object_inline_digest_2284, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2264 = workInProgress.child), - (JSCompiler_object_inline_message_2264.memoizedState = + (JSCompiler_object_inline_message_2283 = workInProgress.child), + (JSCompiler_object_inline_message_2283.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2264.childLanes = + (JSCompiler_object_inline_message_2283.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2267, + JSCompiler_object_inline_componentStack_2286, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2266 + JSCompiler_object_inline_stack_2285 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2266.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2285.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2266 = + (JSCompiler_object_inline_stack_2285 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2265, + JSCompiler_object_inline_digest_2284, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2264 = workInProgress.child), - (JSCompiler_object_inline_message_2264.memoizedState = + (JSCompiler_object_inline_message_2283 = workInProgress.child), + (JSCompiler_object_inline_message_2283.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2264.childLanes = + (JSCompiler_object_inline_message_2283.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2267, + JSCompiler_object_inline_componentStack_2286, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2266 + JSCompiler_object_inline_stack_2285 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2265 + JSCompiler_object_inline_digest_2284 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2265 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2265) + ((JSCompiler_object_inline_digest_2284 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2284) ) { if (didSuspend) workInProgress.flags & 256 @@ -9025,94 +9045,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2264 = - JSCompiler_object_inline_stack_2266.fallback), - (JSCompiler_object_inline_digest_2265 = workInProgress.mode), - (JSCompiler_object_inline_stack_2266 = + (JSCompiler_object_inline_message_2283 = + JSCompiler_object_inline_stack_2285.fallback), + (JSCompiler_object_inline_digest_2284 = workInProgress.mode), + (JSCompiler_object_inline_stack_2285 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2266.children + children: JSCompiler_object_inline_stack_2285.children }, - JSCompiler_object_inline_digest_2265 + JSCompiler_object_inline_digest_2284 )), - (JSCompiler_object_inline_message_2264 = + (JSCompiler_object_inline_message_2283 = createFiberFromFragment( - JSCompiler_object_inline_message_2264, - JSCompiler_object_inline_digest_2265, + JSCompiler_object_inline_message_2283, + JSCompiler_object_inline_digest_2284, renderLanes, null )), - (JSCompiler_object_inline_message_2264.flags |= 2), - (JSCompiler_object_inline_stack_2266.return = workInProgress), - (JSCompiler_object_inline_message_2264.return = workInProgress), - (JSCompiler_object_inline_stack_2266.sibling = - JSCompiler_object_inline_message_2264), - (workInProgress.child = JSCompiler_object_inline_stack_2266), + (JSCompiler_object_inline_message_2283.flags |= 2), + (JSCompiler_object_inline_stack_2285.return = workInProgress), + (JSCompiler_object_inline_message_2283.return = workInProgress), + (JSCompiler_object_inline_stack_2285.sibling = + JSCompiler_object_inline_message_2283), + (workInProgress.child = JSCompiler_object_inline_stack_2285), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2266 = workInProgress.child), - (JSCompiler_object_inline_stack_2266.memoizedState = + (JSCompiler_object_inline_stack_2285 = workInProgress.child), + (JSCompiler_object_inline_stack_2285.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2266.childLanes = + (JSCompiler_object_inline_stack_2285.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2267, + JSCompiler_object_inline_componentStack_2286, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2264)); + (workInProgress = JSCompiler_object_inline_message_2283)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_digest_2265.data === + JSCompiler_object_inline_digest_2284.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_componentStack_2267 = - JSCompiler_object_inline_digest_2265.nextSibling && - JSCompiler_object_inline_digest_2265.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2267) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2267.dgst; - var message = JSCompiler_object_inline_componentStack_2267.msg; - instance = JSCompiler_object_inline_componentStack_2267.stck; + JSCompiler_object_inline_componentStack_2286 = + JSCompiler_object_inline_digest_2284.nextSibling && + JSCompiler_object_inline_digest_2284.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2286) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2286.dgst; + var message = JSCompiler_object_inline_componentStack_2286.msg; + instance = JSCompiler_object_inline_componentStack_2286.stck; var componentStack = - JSCompiler_object_inline_componentStack_2267.cstck; + JSCompiler_object_inline_componentStack_2286.cstck; } - JSCompiler_object_inline_message_2264 = message; - JSCompiler_object_inline_digest_2265 = JSCompiler_temp; - JSCompiler_object_inline_stack_2266 = instance; - JSCompiler_object_inline_componentStack_2267 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2265 && - ((JSCompiler_object_inline_message_2264 = - JSCompiler_object_inline_message_2264 - ? Error(JSCompiler_object_inline_message_2264) + JSCompiler_object_inline_message_2283 = message; + JSCompiler_object_inline_digest_2284 = JSCompiler_temp; + JSCompiler_object_inline_stack_2285 = instance; + JSCompiler_object_inline_componentStack_2286 = componentStack; + "POSTPONE" !== JSCompiler_object_inline_digest_2284 && + ((JSCompiler_object_inline_message_2283 = + JSCompiler_object_inline_message_2283 + ? Error(JSCompiler_object_inline_message_2283) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_message_2264.stack = - JSCompiler_object_inline_stack_2266 || ""), - (JSCompiler_object_inline_message_2264.digest = - JSCompiler_object_inline_digest_2265), - (JSCompiler_object_inline_componentStack_2267 = - void 0 === JSCompiler_object_inline_componentStack_2267 + (JSCompiler_object_inline_message_2283.stack = + JSCompiler_object_inline_stack_2285 || ""), + (JSCompiler_object_inline_message_2283.digest = + JSCompiler_object_inline_digest_2284), + (JSCompiler_object_inline_componentStack_2286 = + void 0 === JSCompiler_object_inline_componentStack_2286 ? null - : JSCompiler_object_inline_componentStack_2267), - "string" === typeof JSCompiler_object_inline_componentStack_2267 && + : JSCompiler_object_inline_componentStack_2286), + "string" === typeof JSCompiler_object_inline_componentStack_2286 && CapturedStacks.set( - JSCompiler_object_inline_message_2264, - JSCompiler_object_inline_componentStack_2267 + JSCompiler_object_inline_message_2283, + JSCompiler_object_inline_componentStack_2286 ), queueHydrationError({ - value: JSCompiler_object_inline_message_2264, + value: JSCompiler_object_inline_message_2283, source: null, - stack: JSCompiler_object_inline_componentStack_2267 + stack: JSCompiler_object_inline_componentStack_2286 })); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9127,25 +9147,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2267 = + (JSCompiler_object_inline_componentStack_2286 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2267) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2286) ) { - JSCompiler_object_inline_componentStack_2267 = workInProgressRoot; - if (null !== JSCompiler_object_inline_componentStack_2267) { - JSCompiler_object_inline_stack_2266 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2266 & 42)) - JSCompiler_object_inline_stack_2266 = 1; + JSCompiler_object_inline_componentStack_2286 = workInProgressRoot; + if (null !== JSCompiler_object_inline_componentStack_2286) { + JSCompiler_object_inline_stack_2285 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2285 & 42)) + JSCompiler_object_inline_stack_2285 = 1; else - switch (JSCompiler_object_inline_stack_2266) { + switch (JSCompiler_object_inline_stack_2285) { case 2: - JSCompiler_object_inline_stack_2266 = 1; + JSCompiler_object_inline_stack_2285 = 1; break; case 8: - JSCompiler_object_inline_stack_2266 = 4; + JSCompiler_object_inline_stack_2285 = 4; break; case 32: - JSCompiler_object_inline_stack_2266 = 16; + JSCompiler_object_inline_stack_2285 = 16; break; case 128: case 256: @@ -9166,40 +9186,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2266 = 64; + JSCompiler_object_inline_stack_2285 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2266 = 134217728; + JSCompiler_object_inline_stack_2285 = 134217728; break; default: - JSCompiler_object_inline_stack_2266 = 0; + JSCompiler_object_inline_stack_2285 = 0; } - JSCompiler_object_inline_stack_2266 = + JSCompiler_object_inline_stack_2285 = 0 !== - (JSCompiler_object_inline_stack_2266 & - (JSCompiler_object_inline_componentStack_2267.suspendedLanes | + (JSCompiler_object_inline_stack_2285 & + (JSCompiler_object_inline_componentStack_2286.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2266; + : JSCompiler_object_inline_stack_2285; if ( - 0 !== JSCompiler_object_inline_stack_2266 && - JSCompiler_object_inline_stack_2266 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2285 && + JSCompiler_object_inline_stack_2285 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2266), + ((prevState.retryLane = JSCompiler_object_inline_stack_2285), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2266 + JSCompiler_object_inline_stack_2285 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2267, + JSCompiler_object_inline_componentStack_2286, current, - JSCompiler_object_inline_stack_2266 + JSCompiler_object_inline_stack_2285 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_digest_2265.data === + JSCompiler_object_inline_digest_2284.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9207,7 +9227,7 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2265.data === + JSCompiler_object_inline_digest_2284.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9215,12 +9235,12 @@ null, current )), - (JSCompiler_object_inline_digest_2265._reactRetry = + (JSCompiler_object_inline_digest_2284._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2265.nextSibling + JSCompiler_object_inline_digest_2284.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9238,54 +9258,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2266.children + JSCompiler_object_inline_stack_2285.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2264) + if (JSCompiler_object_inline_message_2283) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2264 = - JSCompiler_object_inline_stack_2266.fallback), - (JSCompiler_object_inline_digest_2265 = workInProgress.mode), + (JSCompiler_object_inline_message_2283 = + JSCompiler_object_inline_stack_2285.fallback), + (JSCompiler_object_inline_digest_2284 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2266 = createWorkInProgress( + (JSCompiler_object_inline_stack_2285 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2266.children + children: JSCompiler_object_inline_stack_2285.children } )), - (JSCompiler_object_inline_stack_2266.subtreeFlags = + (JSCompiler_object_inline_stack_2285.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_message_2264 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2283 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2264 + JSCompiler_object_inline_message_2283 )) - : ((JSCompiler_object_inline_message_2264 = createFiberFromFragment( - JSCompiler_object_inline_message_2264, - JSCompiler_object_inline_digest_2265, + : ((JSCompiler_object_inline_message_2283 = createFiberFromFragment( + JSCompiler_object_inline_message_2283, + JSCompiler_object_inline_digest_2284, renderLanes, null )), - (JSCompiler_object_inline_message_2264.flags |= 2)), - (JSCompiler_object_inline_message_2264.return = workInProgress), - (JSCompiler_object_inline_stack_2266.return = workInProgress), - (JSCompiler_object_inline_stack_2266.sibling = - JSCompiler_object_inline_message_2264), - (workInProgress.child = JSCompiler_object_inline_stack_2266), - (JSCompiler_object_inline_stack_2266 = - JSCompiler_object_inline_message_2264), - (JSCompiler_object_inline_message_2264 = workInProgress.child), - (JSCompiler_object_inline_digest_2265 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2265 - ? (JSCompiler_object_inline_digest_2265 = + (JSCompiler_object_inline_message_2283.flags |= 2)), + (JSCompiler_object_inline_message_2283.return = workInProgress), + (JSCompiler_object_inline_stack_2285.return = workInProgress), + (JSCompiler_object_inline_stack_2285.sibling = + JSCompiler_object_inline_message_2283), + (workInProgress.child = JSCompiler_object_inline_stack_2285), + (JSCompiler_object_inline_stack_2285 = + JSCompiler_object_inline_message_2283), + (JSCompiler_object_inline_message_2283 = workInProgress.child), + (JSCompiler_object_inline_digest_2284 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2284 + ? (JSCompiler_object_inline_digest_2284 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2265.cachePool), + JSCompiler_object_inline_digest_2284.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9293,38 +9313,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2265 = { + (JSCompiler_object_inline_digest_2284 = { baseLanes: - JSCompiler_object_inline_digest_2265.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2284.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2264.memoizedState = - JSCompiler_object_inline_digest_2265), - (JSCompiler_object_inline_message_2264.childLanes = + (JSCompiler_object_inline_message_2283.memoizedState = + JSCompiler_object_inline_digest_2284), + (JSCompiler_object_inline_message_2283.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2267, + JSCompiler_object_inline_componentStack_2286, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2266 + JSCompiler_object_inline_stack_2285 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2266.children + children: JSCompiler_object_inline_stack_2285.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2267 = + ((JSCompiler_object_inline_componentStack_2286 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2267 + null === JSCompiler_object_inline_componentStack_2286 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2267.push(current)); + : JSCompiler_object_inline_componentStack_2286.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11242,7 +11262,12 @@ } else ref.current = null; } - function commitProfiler(finishedWork, current, commitTime, effectDuration) { + function commitProfiler( + finishedWork, + current, + commitStartTime, + effectDuration + ) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit; @@ -11256,20 +11281,20 @@ finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, - commitTime + commitStartTime ); "function" === typeof onCommit && onCommit( finishedWork.memoizedProps.id, current, effectDuration, - commitTime + commitStartTime ); } function commitProfilerPostCommitImpl( finishedWork, current, - commitTime, + commitStartTime, passiveEffectDuration ) { var _finishedWork$memoize2 = finishedWork.memoizedProps; @@ -11282,7 +11307,7 @@ finishedWork, current, passiveEffectDuration, - commitTime + commitStartTime ); } function commitHostMount(finishedWork) { @@ -11726,7 +11751,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, finishedRoot.effectDuration ); } catch (error) { @@ -12740,7 +12765,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, includeWorkInProgressEffects.effectDuration ); } catch (error) { @@ -12936,7 +12961,7 @@ commitProfilerPostCommitImpl, finishedWork, finishedWork.alternate, - commitTime, + commitStartTime, finishedRoot.passiveEffectDuration ); } catch (error) { @@ -13742,8 +13767,7 @@ workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -14540,8 +14564,7 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if ( @@ -14583,199 +14606,189 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } - function performConcurrentWorkOnRoot(root, didTimeout) { - nestedUpdateScheduled = currentUpdateIsNested = !1; + function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; var shouldTimeSlice = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout; - didTimeout = shouldTimeSlice - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (didTimeout !== RootInProgress) { + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { var renderWasConcurrent = shouldTimeSlice; - do { - if (didTimeout === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - shouldTimeSlice = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(shouldTimeSlice) - ) { - didTimeout = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (didTimeout === RootErrored) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (didTimeout = recoverFromConcurrentError( - root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - didTimeout !== RootErrored) - ) - continue; - } - if (didTimeout === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - completeTime = now(); - switch (didTimeout) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( + exitStatus, + errorRetryLanes$jscomp$0 + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; break a; } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); + } + exitStatus = errorRetryLanes$jscomp$0; } - renderWasConcurrent.finishedWork = shouldTimeSlice; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - else { - if ( - (lanes & 62914560) === lanes && - ((didTimeout = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < didTimeout) - ) { + if (exitStatus !== RootErrored) continue; + } + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + renderWasConcurrent = now$1(); + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), - didTimeout + workInProgressDeferredLane ); break a; } - commitRootWhenReady( - renderWasConcurrent, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + renderWasConcurrent + ); + else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + renderWasConcurrent + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + renderWasConcurrent + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now$1()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; - } - function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (errorRetryLanes !== RootErrored) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes), - RootSuspendedWithDelay - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -14795,10 +14808,16 @@ spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, @@ -14818,10 +14837,13 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + SUSPENDED_COMMIT, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -14831,7 +14853,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -14880,81 +14905,24 @@ (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings - ) { + function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + expirationTimes[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } - function performSyncWorkOnRoot(root, lanes) { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) - throw Error("Should not already be working."); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - currentUpdateIsNested = nestedUpdateScheduled; - nestedUpdateScheduled = !1; - var exitStatus = renderRootSync(root, lanes); - if (exitStatus === RootErrored) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (exitStatus === RootFatalErrored) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (exitStatus === RootDidNotComplete) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - completeTime = now(); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; - } function flushSyncWork$1() { return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -15068,8 +15036,9 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -15162,8 +15131,7 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function queueConcurrentError(error) { @@ -15191,37 +15159,38 @@ prepareFreshStack(root, lanes); } lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$8) { handleThrow(root, thrownValue$8); @@ -15232,14 +15201,11 @@ executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -15263,7 +15229,7 @@ workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); - } + } else checkIfRootIsPrerendering(root, lanes); a: do try { if ( @@ -15580,7 +15546,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -15595,13 +15564,15 @@ previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -15611,7 +15582,10 @@ renderPriorityLevel, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -15619,107 +15593,118 @@ ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - 0 === lanes && + suspendedRetryLanes = root.finishedWork; + updatedLanes = root.finishedLanes; + reusableComponentDevToolDetails.track = + getGroupNameOfHighestPriorityLane(updatedLanes); + logRenderPhase(completedRenderStartTime, completedRenderEndTime); + if (null === suspendedRetryLanes) return null; + 0 === updatedLanes && console.error( "root.finishedLanes should not be empty during a commit. This is a bug in React." ); root.finishedWork = null; root.finishedLanes = 0; - if (finishedWork === root.current) + if (suspendedRetryLanes === root.current) throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); root.callbackNode = null; root.callbackPriority = 0; root.cancelPendingCommit = null; - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; + completedRenderStartTime = + suspendedRetryLanes.lanes | suspendedRetryLanes.childLanes; + completedRenderStartTime |= concurrentlyUpdatedLanes; markRootFinished( root, - lanes, - remainingLanes, - spawnedLane, updatedLanes, - suspendedRetryLanes + completedRenderStartTime, + spawnedLane ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === finishedWork.actualDuration && - 0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || + (0 === suspendedRetryLanes.actualDuration && + 0 === (suspendedRetryLanes.subtreeFlags & 10256) && + 0 === (suspendedRetryLanes.flags & 10256)) || rootDoesHavePassiveEffects || ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveEffectsRemainingLanes = completedRenderStartTime), + (pendingPassiveEffectsRenderEndTime = completedRenderEndTime), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions + commitStartTime = now(); + suspendedCommitReason === SUSPENDED_COMMIT + ? logSuspendedCommitPhase(completedRenderEndTime, commitStartTime) + : suspendedCommitReason === THROTTLED_COMMIT && + logSuspenseThrottlePhase(completedRenderEndTime, commitStartTime); + transitions = 0 !== (suspendedRetryLanes.flags & 15990); + 0 !== (suspendedRetryLanes.subtreeFlags & 15990) || transitions ? ((transitions = ReactSharedInternals.T), (ReactSharedInternals.T = null), (spawnedLane = ReactDOMSharedInternals.p), (ReactDOMSharedInternals.p = DiscreteEventPriority), - (updatedLanes = executionContext), + (suspendedCommitReason = executionContext), (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - (commitTime = now()), - commitMutationEffects(root, finishedWork, lanes), + commitBeforeMutationEffects(root, suspendedRetryLanes), + commitMutationEffects(root, suspendedRetryLanes, updatedLanes), restoreSelection(selectionInformation, root.containerInfo), (_enabled = !!eventsEnabled), (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffects(finishedWork, root, lanes), + (root.current = suspendedRetryLanes), + commitLayoutEffects(suspendedRetryLanes, root, updatedLanes), requestPaint(), - (executionContext = updatedLanes), + (executionContext = suspendedCommitReason), (ReactDOMSharedInternals.p = spawnedLane), (ReactSharedInternals.T = transitions)) - : ((root.current = finishedWork), (commitTime = now())); + : (root.current = suspendedRetryLanes); + commitEndTime = now(); + logCommitPhase(commitStartTime, commitEndTime); (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + (pendingPassiveEffectsLanes = updatedLanes)) + : (releaseRootPooledCache(root, completedRenderStartTime), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); + completedRenderStartTime = root.pendingLanes; + 0 === completedRenderStartTime && + (legacyErrorBoundariesThatAlreadyFailed = null); transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); + onCommitRoot$1(suspendedRetryLanes.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ + renderPriorityLevel = root.onRecoverableError, + suspendedRetryLanes = 0; + suspendedRetryLanes < recoverableErrors.length; + suspendedRetryLanes++ ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + (completedRenderStartTime = recoverableErrors[suspendedRetryLanes]), + (spawnedLane = makeErrorInfo(completedRenderStartTime.stack)), runWithFiberInDEV( - remainingLanes.source, + completedRenderStartTime.source, renderPriorityLevel, - remainingLanes.value, + completedRenderStartTime.value, spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); - remainingLanes = root.pendingLanes; + completedRenderStartTime = root.pendingLanes; didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (updatedLanes & 4194218) && 0 !== (completedRenderStartTime & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))) : (nestedUpdateCount = 0); - transitions || finalizeRender(lanes, now$1()); + transitions || finalizeRender(updatedLanes, now$1()); flushSyncWorkAcrossRoots_impl(0, !1); return null; } @@ -15740,7 +15725,7 @@ null != remainingLanes && ((root.pooledCache = null), releaseCache(remainingLanes))); } - function flushPassiveEffects() { + function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { var root = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; @@ -15758,10 +15743,10 @@ if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { - priority = pendingPassiveTransitions; + var transitions = pendingPassiveTransitions; pendingPassiveTransitions = null; - var root$jscomp$0 = rootWithPendingPassiveEffects, - lanes = pendingPassiveEffectsLanes; + priority = rootWithPendingPassiveEffects; + var lanes = pendingPassiveEffectsLanes; rootWithPendingPassiveEffects = null; pendingPassiveEffectsLanes = 0; if ( @@ -15772,40 +15757,56 @@ "Cannot flush passive effects while already rendering." ); reusableComponentDevToolDetails.track = - lanes & 63 - ? "Blocking" - : lanes & 4194240 - ? "Transition" - : lanes & 62914560 - ? "Suspense" - : lanes & 2080374784 - ? "Idle" - : "Other"; + getGroupNameOfHighestPriorityLane(lanes); isFlushingPassiveEffects = !0; didScheduleUpdateDuringPassiveEffects = !1; - var prevExecutionContext = executionContext; + var passiveEffectStartTime = 0; + passiveEffectStartTime = now$1(); + var startTime = commitEndTime, + endTime = passiveEffectStartTime; + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure( + "Waiting for Paint", + reusableComponentOptions + )); + startTime = executionContext; executionContext |= CommitContext; - var finishedWork = root$jscomp$0.current; + var finishedWork = priority.current; resetComponentEffectTimers(); commitPassiveUnmountOnFiber(finishedWork); - var finishedWork$jscomp$0 = root$jscomp$0.current; + var finishedWork$jscomp$0 = priority.current; + finishedWork = pendingPassiveEffectsRenderEndTime; resetComponentEffectTimers(); commitPassiveMountOnFiber( - root$jscomp$0, + priority, finishedWork$jscomp$0, lanes, - priority, - completeTime + transitions, + finishedWork ); - commitDoubleInvokeEffectsInDEV(root$jscomp$0); - executionContext = prevExecutionContext; - finalizeRender(lanes, now$1()); + commitDoubleInvokeEffectsInDEV(priority); + executionContext = startTime; + var passiveEffectsEndTime = now$1(); + wasDelayedCommit && + ((wasDelayedCommit = passiveEffectStartTime), + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-dark"), + (reusableComponentOptions.start = wasDelayedCommit), + (reusableComponentOptions.end = passiveEffectsEndTime), + performance.measure( + "Remaining Effects", + reusableComponentOptions + ))); + finalizeRender(lanes, passiveEffectsEndTime); flushSyncWorkAcrossRoots_impl(0, !1); didScheduleUpdateDuringPassiveEffects - ? root$jscomp$0 === rootWithPassiveNestedUpdates + ? priority === rootWithPassiveNestedUpdates ? nestedPassiveUpdateCount++ : ((nestedPassiveUpdateCount = 0), - (rootWithPassiveNestedUpdates = root$jscomp$0)) + (rootWithPassiveNestedUpdates = priority)) : (nestedPassiveUpdateCount = 0); didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1; @@ -15814,7 +15815,7 @@ "function" === typeof injectedHook.onPostCommitFiberRoot ) try { - injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0); + injectedHook.onPostCommitFiberRoot(rendererID, priority); } catch (err) { hasLoggedError || ((hasLoggedError = !0), @@ -15823,7 +15824,7 @@ err )); } - var stateNode = root$jscomp$0.current.stateNode; + var stateNode = priority.current.stateNode; stateNode.effectDuration = 0; stateNode.passiveEffectDuration = 0; JSCompiler_inline_result = !0; @@ -16154,7 +16155,8 @@ root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -16245,8 +16247,6 @@ else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -16259,7 +16259,7 @@ default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), (suspendedLanes = fakeActCallbackNode)) @@ -16268,6 +16268,34 @@ root.callbackNode = suspendedLanes; return currentTime; } + function performWorkOnRootViaSchedulerTask(root, didTimeout) { + nestedUpdateScheduled = currentUpdateIsNested = !1; + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = + workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot( + root, + workInProgressRootRenderLanes$jscomp$0, + didTimeout + ); + scheduleTaskForRootDuringMicrotask(root, now$1()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; + } + function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + currentUpdateIsNested = nestedUpdateScheduled; + nestedUpdateScheduled = !1; + performWorkOnRoot(root, lanes, !0); + } function cancelCallback(callbackNode) { callbackNode !== fakeActCallbackNode && null !== callbackNode && @@ -22546,8 +22574,8 @@ NoStrictPassiveEffectsMode = 64, now = Scheduler.unstable_now, renderStartTime = -0, - completeTime = -0, - commitTime = -0, + commitStartTime = -0, + commitEndTime = -0, profilerStartTime = -1.1, profilerEffectDuration = -0, componentEffectDuration = -0, @@ -24377,16 +24405,20 @@ rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, + pendingPassiveEffectsRenderEndTime = -0, pendingPassiveTransitions = null, - NESTED_UPDATE_LIMIT = 50, + NESTED_UPDATE_LIMIT = 100, nestedUpdateCount = 0, rootWithNestedUpdates = null, isFlushingPassiveEffects = !1, didScheduleUpdateDuringPassiveEffects = !1, - NESTED_PASSIVE_UPDATE_LIMIT = 50, + NESTED_PASSIVE_UPDATE_LIMIT = 100, nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, isRunningInsertionEffect = !1, + IMMEDIATE_COMMIT = 0, + SUSPENDED_COMMIT = 1, + THROTTLED_COMMIT = 2, didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = !1; var didWarnAboutUpdateInRenderForAnotherComponent = new Set(); @@ -24931,11 +24963,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24972,11 +25004,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-5d19e1c8-20240923", + version: "19.0.0-experimental-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-5d19e1c8-20240923" + reconcilerVersion: "19.0.0-experimental-778e1ed2-20240926" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25448,7 +25480,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js index a502438334dff..0593b1c74be54 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js @@ -675,43 +675,39 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -753,11 +749,6 @@ function computeExpirationTime(lane, currentTime) { return -1; } } -function getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; -} function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -774,14 +765,7 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes -) { +function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; @@ -791,36 +775,31 @@ function markRootFinished( root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index$7 = 31 - clz32(remainingLanes), - lane = 1 << index$7; - entanglements[index$7] = 0; - expirationTimes[index$7] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$7]; + var index$6 = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index$6; + finishedLanes[index$6] = 0; + expirationTimes[index$6] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$6]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$7] = null, index$7 = 0; - index$7 < hiddenUpdatesForLane.length; - index$7++ + hiddenUpdates[index$6] = null, index$6 = 0; + index$6 < hiddenUpdatesForLane.length; + index$6++ ) { - var update = hiddenUpdatesForLane[index$7]; + var update = hiddenUpdatesForLane[index$6]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -835,19 +814,19 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$8 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$8; - (lane & entangledLanes) | (root[index$8] & entangledLanes) && - (root[index$8] |= entangledLanes); + var index$7 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$7; + (lane & entangledLanes) | (root[index$7] & entangledLanes) && + (root[index$7] |= entangledLanes); rootEntangledLanes &= ~lane; } } function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index$10 = 31 - clz32(lanes), - lane = 1 << index$10; - root[index$10].add(fiber); + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + root[index$9].add(fiber); lanes &= ~lane; } } @@ -859,19 +838,30 @@ function movePendingFibersToMemoized(root, lanes) { 0 < lanes; ) { - var index$11 = 31 - clz32(lanes); - root = 1 << index$11; - index$11 = pendingUpdatersLaneMap[index$11]; - 0 < index$11.size && - (index$11.forEach(function (fiber) { + var index$10 = 31 - clz32(lanes); + root = 1 << index$10; + index$10 = pendingUpdatersLaneMap[index$10]; + 0 < index$10.size && + (index$10.forEach(function (fiber) { var alternate = fiber.alternate; (null !== alternate && memoizedUpdaters.has(alternate)) || memoizedUpdaters.add(fiber); }), - index$11.clear()); + index$10.clear()); lanes &= ~root; } } +function getGroupNameOfHighestPriorityLane(lanes) { + return lanes & 63 + ? "Blocking" + : lanes & 4194240 + ? "Transition" + : lanes & 62914560 + ? "Suspense" + : lanes & 2080374784 + ? "Idle" + : "Other"; +} function lanesToEventPriority(lanes) { lanes &= -lanes; return 2 < lanes @@ -1018,8 +1008,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$12 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$12 && "aria-" !== prefix$12) { + var prefix$11 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$11 && "aria-" !== prefix$11) { node.removeAttribute(name); return; } @@ -1352,15 +1342,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$18 in styles) - (styleName = styles[styleName$18]), - styles.hasOwnProperty(styleName$18) && - prevStyles[styleName$18] !== styleName && - setValueForStyle(node, styleName$18, styleName); + for (var styleName$17 in styles) + (styleName = styles[styleName$17]), + styles.hasOwnProperty(styleName$17) && + prevStyles[styleName$17] !== styleName && + setValueForStyle(node, styleName$17, styleName); } else - for (var styleName$19 in styles) - styles.hasOwnProperty(styleName$19) && - setValueForStyle(node, styleName$19, styles[styleName$19]); + for (var styleName$18 in styles) + styles.hasOwnProperty(styleName$18) && + setValueForStyle(node, styleName$18, styles[styleName$18]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -2091,14 +2081,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$297; if (canUseDOM) { - var isSupported$jscomp$inline_433 = "oninput" in document; - if (!isSupported$jscomp$inline_433) { - var element$jscomp$inline_434 = document.createElement("div"); - element$jscomp$inline_434.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_433 = - "function" === typeof element$jscomp$inline_434.oninput; + var isSupported$jscomp$inline_432 = "oninput" in document; + if (!isSupported$jscomp$inline_432) { + var element$jscomp$inline_433 = document.createElement("div"); + element$jscomp$inline_433.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_432 = + "function" === typeof element$jscomp$inline_433.oninput; } - JSCompiler_inline_result$jscomp$297 = isSupported$jscomp$inline_433; + JSCompiler_inline_result$jscomp$297 = isSupported$jscomp$inline_432; } else JSCompiler_inline_result$jscomp$297 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$297 && @@ -2469,6 +2459,34 @@ function logComponentEffect(fiber, startTime, endTime, selfTime) { (reusableComponentOptions.end = endTime), performance.measure(fiber, reusableComponentOptions)); } +function logRenderPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "primary-dark"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Render", reusableComponentOptions)); +} +function logSuspenseThrottlePhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Throttled", reusableComponentOptions)); +} +function logSuspendedCommitPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Suspended", reusableComponentOptions)); +} +function logCommitPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-dark"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Commit", reusableComponentOptions)); +} var concurrentQueues = [], concurrentQueuesIndex = 0, concurrentlyUpdatedLanes = 0; @@ -2549,8 +2567,8 @@ function getRootForUpdatedFiber(sourceFiber) { var emptyContextObject = {}, now = Scheduler.unstable_now, renderStartTime = -0, - completeTime = -0, - commitTime = -0, + commitStartTime = -0, + commitEndTime = -0, profilerStartTime = -1.1, profilerEffectDuration = -0, componentEffectDuration = -0, @@ -4176,7 +4194,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$57 = !1; + didReadFromEntangledAsyncAction$56 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -4197,11 +4215,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$57 = !0); + (didReadFromEntangledAsyncAction$56 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$57 = !0); + (didReadFromEntangledAsyncAction$56 = !0); continue; } else (updateLane = { @@ -4247,7 +4265,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$57 && + didReadFromEntangledAsyncAction$56 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4445,8 +4463,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$63) { - onActionError(actionQueue, node, error$63); + } catch (error$62) { + onActionError(actionQueue, node, error$62); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4895,15 +4913,15 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$66 = enqueueUpdate(provider, fiber, lane); - null !== root$66 && + var root$65 = enqueueUpdate(provider, fiber, lane); + null !== root$65 && (startUpdateTimerByLane(lane), - scheduleUpdateOnFiber(root$66, provider, lane), - entangleTransitions(root$66, provider, lane)); + scheduleUpdateOnFiber(root$65, provider, lane), + entangleTransitions(root$65, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$66 && + null !== root$65 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -5440,9 +5458,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$70 in Component) - void 0 === newProps[propName$70] && - (newProps[propName$70] = Component[propName$70]); + for (var propName$69 in Component) + void 0 === newProps[propName$69] && + (newProps[propName$69] = Component[propName$69]); } return newProps; } @@ -5488,9 +5506,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$71) { + } catch (e$70) { setTimeout(function () { - throw e$71; + throw e$70; }); } } @@ -5501,9 +5519,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$72) { + } catch (e$71) { setTimeout(function () { - throw e$72; + throw e$71; }); } } @@ -8004,8 +8022,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$120) { - captureCommitPhaseError(current, nearestMountedAncestor, error$120); + } catch (error$119) { + captureCommitPhaseError(current, nearestMountedAncestor, error$119); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8065,15 +8083,15 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$121) { - captureCommitPhaseError(current, nearestMountedAncestor, error$121); + } catch (error$120) { + captureCommitPhaseError(current, nearestMountedAncestor, error$120); } else ref.current = null; } function commitProfilerUpdate( finishedWork, current, - commitTime, + commitStartTime, effectDuration ) { try { @@ -8090,14 +8108,14 @@ function commitProfilerUpdate( finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, - commitTime + commitStartTime ); "function" === typeof onCommit && onCommit( finishedWork.memoizedProps.id, current, effectDuration, - commitTime + commitStartTime ); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -8235,7 +8253,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$22) { + } catch (e$21) { JSCompiler_temp = null; break a; } @@ -8405,11 +8423,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$117) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$117 + error$116 ); } else { @@ -8426,11 +8444,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$118) { + } catch (error$117) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$118 + error$117 ); } recordEffectDuration(); @@ -8441,11 +8459,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$119) { + } catch (error$118) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$119 + error$118 ); } } @@ -8493,7 +8511,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { commitProfilerUpdate( finishedWork, current, - commitTime, + commitStartTime, finishedRoot.effectDuration )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -8622,7 +8640,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$129 = hostParentIsContainer; + var prevHostParentIsContainer$128 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8630,7 +8648,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$129; + hostParentIsContainer = prevHostParentIsContainer$128; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9285,21 +9303,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$122 = JSCompiler_inline_result.stateNode; + var parent$121 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$122, ""), + (setTextContent(parent$121, ""), (JSCompiler_inline_result.flags &= -33)); - var before$123 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$123, parent$122); + var before$122 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$122, parent$121); break; case 3: case 4: - var parent$124 = JSCompiler_inline_result.stateNode.containerInfo, - before$125 = getHostSibling(finishedWork); + var parent$123 = JSCompiler_inline_result.stateNode.containerInfo, + before$124 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$125, - parent$124 + before$124, + parent$123 ); break; default: @@ -9460,7 +9478,7 @@ function recursivelyTraverseReappearLayoutEffects( commitProfilerUpdate( finishedWork, current, - commitTime, + commitStartTime, finishedRoot.effectDuration )) : recursivelyTraverseReappearLayoutEffects( @@ -9639,7 +9657,7 @@ function commitPassiveMountOnFiber( id, phase, finishedRoot.passiveEffectDuration, - commitTime + commitStartTime ); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -10312,8 +10330,7 @@ function scheduleRetryEffect(workInProgress, retryQueue) { workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -10330,14 +10347,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$144 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$144 = lastTailNode), + for (var lastTailNode$143 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$143 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$144 + null === lastTailNode$143 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$144.sibling = null); + : (lastTailNode$143.sibling = null); } } function bubbleProperties(completedWork) { @@ -10349,53 +10366,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$146 = completedWork.selfBaseDuration, - child$147 = completedWork.child; - null !== child$147; + var treeBaseDuration$145 = completedWork.selfBaseDuration, + child$146 = completedWork.child; + null !== child$146; ) - (newChildLanes |= child$147.lanes | child$147.childLanes), - (subtreeFlags |= child$147.subtreeFlags & 31457280), - (subtreeFlags |= child$147.flags & 31457280), - (treeBaseDuration$146 += child$147.treeBaseDuration), - (child$147 = child$147.sibling); - completedWork.treeBaseDuration = treeBaseDuration$146; + (newChildLanes |= child$146.lanes | child$146.childLanes), + (subtreeFlags |= child$146.subtreeFlags & 31457280), + (subtreeFlags |= child$146.flags & 31457280), + (treeBaseDuration$145 += child$146.treeBaseDuration), + (child$146 = child$146.sibling); + completedWork.treeBaseDuration = treeBaseDuration$145; } else for ( - treeBaseDuration$146 = completedWork.child; - null !== treeBaseDuration$146; + treeBaseDuration$145 = completedWork.child; + null !== treeBaseDuration$145; ) (newChildLanes |= - treeBaseDuration$146.lanes | treeBaseDuration$146.childLanes), - (subtreeFlags |= treeBaseDuration$146.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$146.flags & 31457280), - (treeBaseDuration$146.return = completedWork), - (treeBaseDuration$146 = treeBaseDuration$146.sibling); + treeBaseDuration$145.lanes | treeBaseDuration$145.childLanes), + (subtreeFlags |= treeBaseDuration$145.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$145.flags & 31457280), + (treeBaseDuration$145.return = completedWork), + (treeBaseDuration$145 = treeBaseDuration$145.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$146 = completedWork.actualDuration; - child$147 = completedWork.selfBaseDuration; + treeBaseDuration$145 = completedWork.actualDuration; + child$146 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$146 += child.actualDuration), - (child$147 += child.treeBaseDuration), + (treeBaseDuration$145 += child.actualDuration), + (child$146 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$146; - completedWork.treeBaseDuration = child$147; + completedWork.actualDuration = treeBaseDuration$145; + completedWork.treeBaseDuration = child$146; } else for ( - treeBaseDuration$146 = completedWork.child; - null !== treeBaseDuration$146; + treeBaseDuration$145 = completedWork.child; + null !== treeBaseDuration$145; ) (newChildLanes |= - treeBaseDuration$146.lanes | treeBaseDuration$146.childLanes), - (subtreeFlags |= treeBaseDuration$146.subtreeFlags), - (subtreeFlags |= treeBaseDuration$146.flags), - (treeBaseDuration$146.return = completedWork), - (treeBaseDuration$146 = treeBaseDuration$146.sibling); + treeBaseDuration$145.lanes | treeBaseDuration$145.childLanes), + (subtreeFlags |= treeBaseDuration$145.subtreeFlags), + (subtreeFlags |= treeBaseDuration$145.flags), + (treeBaseDuration$145.return = completedWork), + (treeBaseDuration$145 = treeBaseDuration$145.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10688,11 +10705,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$162 = null; + var cache$161 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$162 = newProps.memoizedState.cachePool.pool); - cache$162 !== type && (newProps.flags |= 2048); + (cache$161 = newProps.memoizedState.cachePool.pool); + cache$161 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -10722,8 +10739,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$162 = type.rendering; - if (null === cache$162) + cache$161 = type.rendering; + if (null === cache$161) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10731,11 +10748,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$162 = findFirstSuspended(current); - if (null !== cache$162) { + cache$161 = findFirstSuspended(current); + if (null !== cache$161) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$162.updateQueue; + current = cache$161.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10760,7 +10777,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$162)), null !== current)) { + if (((current = findFirstSuspended(cache$161)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10770,7 +10787,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$162.alternate && + !cache$161.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10783,13 +10800,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$162.sibling = workInProgress.child), - (workInProgress.child = cache$162)) + ? ((cache$161.sibling = workInProgress.child), + (workInProgress.child = cache$161)) : ((current = type.last), null !== current - ? (current.sibling = cache$162) - : (workInProgress.child = cache$162), - (type.last = cache$162)); + ? (current.sibling = cache$161) + : (workInProgress.child = cache$161), + (type.last = cache$161)); } if (null !== type.tail) return ( @@ -10992,6 +11009,7 @@ var DefaultAsyncDispatcher = { rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, + pendingPassiveEffectsRenderEndTime = -0, pendingPassiveTransitions = null, nestedUpdateCount = 0, rootWithNestedUpdates = null; @@ -11023,8 +11041,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -11036,180 +11053,161 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } -function performConcurrentWorkOnRoot(root, didTimeout) { - nestedUpdateScheduled = currentUpdateIsNested = !1; +function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; - var exitStatus = (didTimeout = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = didTimeout; - do { - if (6 === exitStatus) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - didTimeout = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(didTimeout) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) break; + else if (6 === exitStatus) markRootSuspended(root$jscomp$0, lanes, 0); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), + (JSCompiler_inline_result = + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - 2 !== exitStatus) - ) - continue; - } - if (1 === exitStatus) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - completeTime = now(); - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; break a; } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); + } + exitStatus = JSCompiler_inline_result; } - renderWasConcurrent.finishedWork = didTimeout; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + exitStatus = now$1(); + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { + markRootSuspended(shouldTimeSlice, lanes, workInProgressDeferredLane); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - didTimeout, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + renderStartTime, exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - didTimeout, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + renderStartTime, + exitStatus + ); } - break; - } while (1); - } - ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now$1()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; -} -function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes -) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (2 !== errorRetryLanes) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes), - 4 - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; + } + break; + } while (1); + ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -11229,10 +11227,16 @@ function commitRootWhenReady( spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop$1 }), accumulateSuspenseyCommitOnFiber(finishedWork), @@ -11248,10 +11252,13 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + 1, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -11261,7 +11268,10 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -11307,80 +11317,24 @@ function markRootUpdated(root, updatedLanes) { : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings -) { +function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$6 = 31 - clz32(lanes), - lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5; + expirationTimes[index$5] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } -function performSyncWorkOnRoot(root, lanes) { - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - currentUpdateIsNested = nestedUpdateScheduled; - nestedUpdateScheduled = !1; - var exitStatus = renderRootSync(root, lanes); - if (2 === exitStatus) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (1 === exitStatus) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (6 === exitStatus) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - completeTime = now(); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -11493,8 +11447,9 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -11583,8 +11538,7 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function queueConcurrentError(error) { @@ -11609,29 +11563,35 @@ function renderRootSync(root, lanes) { prepareFreshStack(root, lanes); } lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$177) { handleThrow(root, thrownValue$177); @@ -11642,11 +11602,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11667,7 +11627,7 @@ function renderRootConcurrent(root, lanes) { workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); - } + } else checkIfRootIsPrerendering(root, lanes); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) @@ -11926,7 +11886,10 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -11941,13 +11904,15 @@ function commitRoot( previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -11957,97 +11922,106 @@ function commitRootImpl( renderPriorityLevel, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; + suspendedRetryLanes = root.finishedWork; + updatedLanes = root.finishedLanes; + reusableComponentDevToolDetails.track = + getGroupNameOfHighestPriorityLane(updatedLanes); + logRenderPhase(completedRenderStartTime, completedRenderEndTime); + if (null === suspendedRetryLanes) return null; root.finishedWork = null; root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); + if (suspendedRetryLanes === root.current) + throw Error(formatProdErrorMessage(177)); root.callbackNode = null; root.callbackPriority = 0; root.cancelPendingCommit = null; - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + completedRenderStartTime = + suspendedRetryLanes.lanes | suspendedRetryLanes.childLanes; + completedRenderStartTime |= concurrentlyUpdatedLanes; + markRootFinished(root, updatedLanes, completedRenderStartTime, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === finishedWork.actualDuration && - 0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || + (0 === suspendedRetryLanes.actualDuration && + 0 === (suspendedRetryLanes.subtreeFlags & 10256) && + 0 === (suspendedRetryLanes.flags & 10256)) || rootDoesHavePassiveEffects || ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveEffectsRemainingLanes = completedRenderStartTime), + (pendingPassiveEffectsRenderEndTime = completedRenderEndTime), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions + commitStartTime = now(); + 1 === suspendedCommitReason + ? logSuspendedCommitPhase(completedRenderEndTime, commitStartTime) + : 2 === suspendedCommitReason && + logSuspenseThrottlePhase(completedRenderEndTime, commitStartTime); + transitions = 0 !== (suspendedRetryLanes.flags & 15990); + 0 !== (suspendedRetryLanes.subtreeFlags & 15990) || transitions ? ((transitions = ReactSharedInternals.T), (ReactSharedInternals.T = null), (spawnedLane = ReactDOMSharedInternals.p), (ReactDOMSharedInternals.p = 2), - (updatedLanes = executionContext), + (suspendedCommitReason = executionContext), (executionContext |= 4), - commitBeforeMutationEffects(root, finishedWork), - (commitTime = now()), - commitMutationEffects(root, finishedWork, lanes), + commitBeforeMutationEffects(root, suspendedRetryLanes), + commitMutationEffects(root, suspendedRetryLanes, updatedLanes), restoreSelection(selectionInformation, root.containerInfo), (_enabled = !!eventsEnabled), (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffects(finishedWork, root, lanes), + (root.current = suspendedRetryLanes), + commitLayoutEffects(suspendedRetryLanes, root, updatedLanes), requestPaint(), - (executionContext = updatedLanes), + (executionContext = suspendedCommitReason), (ReactDOMSharedInternals.p = spawnedLane), (ReactSharedInternals.T = transitions)) - : ((root.current = finishedWork), (commitTime = now())); + : (root.current = suspendedRetryLanes); + commitEndTime = now(); + logCommitPhase(commitStartTime, commitEndTime); (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); + (pendingPassiveEffectsLanes = updatedLanes)) + : releaseRootPooledCache(root, completedRenderStartTime); + completedRenderStartTime = root.pendingLanes; + 0 === completedRenderStartTime && + (legacyErrorBoundariesThatAlreadyFailed = null); + onCommitRoot(suspendedRetryLanes.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ + renderPriorityLevel = root.onRecoverableError, suspendedRetryLanes = 0; + suspendedRetryLanes < recoverableErrors.length; + suspendedRetryLanes++ ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + (completedRenderStartTime = recoverableErrors[suspendedRetryLanes]), + renderPriorityLevel(completedRenderStartTime.value, { + componentStack: completedRenderStartTime.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); - remainingLanes = root.pendingLanes; + completedRenderStartTime = root.pendingLanes; didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (updatedLanes & 4194218) && 0 !== (completedRenderStartTime & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))) : (nestedUpdateCount = 0); - transitions || finalizeRender(lanes, now$1()); + transitions || finalizeRender(updatedLanes, now$1()); flushSyncWorkAcrossRoots_impl(0, !1); return null; } @@ -12057,7 +12031,7 @@ function releaseRootPooledCache(root, remainingLanes) { null != remainingLanes && ((root.pooledCache = null), releaseCache(remainingLanes))); } -function flushPassiveEffects() { +function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { var root$183 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; @@ -12071,49 +12045,62 @@ function flushPassiveEffects() { if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { - renderPriority = pendingPassiveTransitions; + var transitions = pendingPassiveTransitions; pendingPassiveTransitions = null; - var root = rootWithPendingPassiveEffects, - lanes = pendingPassiveEffectsLanes; + renderPriority = rootWithPendingPassiveEffects; + var lanes = pendingPassiveEffectsLanes; rootWithPendingPassiveEffects = null; pendingPassiveEffectsLanes = 0; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331)); reusableComponentDevToolDetails.track = - lanes & 63 - ? "Blocking" - : lanes & 4194240 - ? "Transition" - : lanes & 62914560 - ? "Suspense" - : lanes & 2080374784 - ? "Idle" - : "Other"; - var prevExecutionContext = executionContext; + getGroupNameOfHighestPriorityLane(lanes); + var passiveEffectStartTime = 0; + passiveEffectStartTime = now$1(); + var startTime = commitEndTime, + endTime = passiveEffectStartTime; + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Waiting for Paint", reusableComponentOptions)); + startTime = executionContext; executionContext |= 4; - var finishedWork = root.current; + var finishedWork = renderPriority.current; resetComponentEffectTimers(); commitPassiveUnmountOnFiber(finishedWork); - var finishedWork$jscomp$0 = root.current; + var finishedWork$jscomp$0 = renderPriority.current; + finishedWork = pendingPassiveEffectsRenderEndTime; resetComponentEffectTimers(); commitPassiveMountOnFiber( - root, + renderPriority, finishedWork$jscomp$0, lanes, - renderPriority, - completeTime + transitions, + finishedWork ); - executionContext = prevExecutionContext; - finalizeRender(lanes, now$1()); + executionContext = startTime; + var passiveEffectsEndTime = now$1(); + wasDelayedCommit && + ((wasDelayedCommit = passiveEffectStartTime), + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-dark"), + (reusableComponentOptions.start = wasDelayedCommit), + (reusableComponentOptions.end = passiveEffectsEndTime), + performance.measure( + "Remaining Effects", + reusableComponentOptions + ))); + finalizeRender(lanes, passiveEffectsEndTime); flushSyncWorkAcrossRoots_impl(0, !1); if ( injectedHook && "function" === typeof injectedHook.onPostCommitFiberRoot ) try { - injectedHook.onPostCommitFiberRoot(rendererID, root); + injectedHook.onPostCommitFiberRoot(rendererID, renderPriority); } catch (err) {} - var stateNode = root.current.stateNode; + var stateNode = renderPriority.current.stateNode; stateNode.effectDuration = 0; stateNode.passiveEffectDuration = 0; JSCompiler_inline_result = !0; @@ -12246,7 +12233,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { retryTimedOutBoundary(boundaryFiber, retryLane); } function throwIfInfiniteUpdateLoopDetected() { - if (50 < nestedUpdateCount) + if (100 < nestedUpdateCount) throw ( ((nestedUpdateCount = 0), (rootWithNestedUpdates = null), @@ -12316,7 +12303,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$185, root$185 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$185, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$185, JSCompiler_inline_result)); root$185 = root$185.next; @@ -12360,12 +12348,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5, - expirationTime = expirationTimes[index$5]; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4, + expirationTime = expirationTimes[index$4]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$5] = computeExpirationTime(lane, currentTime); + expirationTimes[index$4] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -12402,8 +12390,6 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { null !== pingedLanes && cancelCallback$1(pingedLanes); switch (lanesToEventPriority(suspendedLanes)) { case 2: - suspendedLanes = ImmediatePriority; - break; case 8: suspendedLanes = UserBlockingPriority; break; @@ -12416,12 +12402,35 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); root.callbackPriority = currentTime; root.callbackNode = suspendedLanes; return currentTime; } +function performWorkOnRootViaSchedulerTask(root, didTimeout) { + nestedUpdateScheduled = currentUpdateIsNested = !1; + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout); + scheduleTaskForRootDuringMicrotask(root, now$1()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; +} +function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + currentUpdateIsNested = nestedUpdateScheduled; + nestedUpdateScheduled = !1; + performWorkOnRoot(root, lanes, !0); +} function scheduleImmediateTask(cb) { scheduleMicrotask(function () { 0 !== (executionContext & 6) @@ -12529,20 +12538,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1476 = 0; - i$jscomp$inline_1476 < simpleEventPluginEvents.length; - i$jscomp$inline_1476++ + var i$jscomp$inline_1483 = 0; + i$jscomp$inline_1483 < simpleEventPluginEvents.length; + i$jscomp$inline_1483++ ) { - var eventName$jscomp$inline_1477 = - simpleEventPluginEvents[i$jscomp$inline_1476], - domEventName$jscomp$inline_1478 = - eventName$jscomp$inline_1477.toLowerCase(), - capitalizedEvent$jscomp$inline_1479 = - eventName$jscomp$inline_1477[0].toUpperCase() + - eventName$jscomp$inline_1477.slice(1); + var eventName$jscomp$inline_1484 = + simpleEventPluginEvents[i$jscomp$inline_1483], + domEventName$jscomp$inline_1485 = + eventName$jscomp$inline_1484.toLowerCase(), + capitalizedEvent$jscomp$inline_1486 = + eventName$jscomp$inline_1484[0].toUpperCase() + + eventName$jscomp$inline_1484.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1478, - "on" + capitalizedEvent$jscomp$inline_1479 + domEventName$jscomp$inline_1485, + "on" + capitalizedEvent$jscomp$inline_1486 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -16008,16 +16017,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1723 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1730 = React.version; if ( - "19.0.0-experimental-5d19e1c8-20240923" !== - isomorphicReactPackageVersion$jscomp$inline_1723 + "19.0.0-experimental-778e1ed2-20240926" !== + isomorphicReactPackageVersion$jscomp$inline_1730 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1723, - "19.0.0-experimental-5d19e1c8-20240923" + isomorphicReactPackageVersion$jscomp$inline_1730, + "19.0.0-experimental-778e1ed2-20240926" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16037,25 +16046,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2148 = { +var internals$jscomp$inline_2168 = { bundleType: 0, - version: "19.0.0-experimental-5d19e1c8-20240923", + version: "19.0.0-experimental-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-5d19e1c8-20240923" + reconcilerVersion: "19.0.0-experimental-778e1ed2-20240926" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2149 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2169 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2149.isDisabled && - hook$jscomp$inline_2149.supportsFiber + !hook$jscomp$inline_2169.isDisabled && + hook$jscomp$inline_2169.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2149.inject( - internals$jscomp$inline_2148 + (rendererID = hook$jscomp$inline_2169.inject( + internals$jscomp$inline_2168 )), - (injectedHook = hook$jscomp$inline_2149); + (injectedHook = hook$jscomp$inline_2169); } catch (err) {} } function noop() {} @@ -16308,7 +16317,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && 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 c0b38c953bd05..562d59ee0057a 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 @@ -9288,5 +9288,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js index bb2264c70d295..98b84f55a14ac 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js @@ -6055,4 +6055,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js index ef98ea7aa1b29..cc0490e454880 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js @@ -9288,5 +9288,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js index 6843b129d9878..2d6dddc380de5 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js @@ -6147,4 +6147,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js index 78e0dbd6ba74a..a01cb7b1fe898 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js @@ -8188,11 +8188,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -9972,5 +9972,5 @@ startWork(request); }); }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js index f756ba4186d75..80f1706fca236 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js @@ -6586,12 +6586,12 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion, - "19.0.0-experimental-5d19e1c8-20240923" + "19.0.0-experimental-778e1ed2-20240926" ) ); } @@ -6846,4 +6846,4 @@ exports.resumeAndPrerender = function (children, postponedState, options) { startWork(request); }); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js index 790c63185fc7a..b290d7858af7c 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js @@ -6068,13 +6068,13 @@ function addToReplayParent(node, parentKeyPath, trackedPostpones) { } var isomorphicReactPackageVersion$jscomp$inline_782 = React.version; if ( - "19.0.0-experimental-5d19e1c8-20240923" !== + "19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion$jscomp$inline_782 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_782 + - "\n - react-dom: 19.0.0-experimental-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -6162,4 +6162,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js index 51aec86d7759e..471cac0c99ce5 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js @@ -8211,11 +8211,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -10002,5 +10002,5 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js index f3c1b252891b5..d336bfbd9385b 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js @@ -6694,11 +6694,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -6963,4 +6963,4 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js index 9daa9118394d6..6f9d6cbf5089a 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js @@ -8069,11 +8069,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); } function createDrainHandler(destination, request) { @@ -9846,5 +9846,5 @@ } }; }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js index fc4a50306f9a0..4717018bbedfa 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js @@ -6567,11 +6567,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -6822,4 +6822,4 @@ exports.resumeToPipeableStream = function (children, postponedState, options) { } }; }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js index a4c8003012743..188a08bb6fa7d 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js @@ -1031,43 +1031,39 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1114,14 +1110,6 @@ ); } } - function getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; - } function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -1142,9 +1130,7 @@ root, finishedLanes, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; @@ -1155,17 +1141,17 @@ root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; + var index = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index; + finishedLanes[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -1177,14 +1163,9 @@ var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -1236,6 +1217,17 @@ lanes &= ~root; } } + function getGroupNameOfHighestPriorityLane(lanes) { + return lanes & 63 + ? "Blocking" + : lanes & 4194240 + ? "Transition" + : lanes & 62914560 + ? "Suspense" + : lanes & 2080374784 + ? "Idle" + : "Other"; + } function lanesToEventPriority(lanes) { lanes &= -lanes; return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes @@ -3815,6 +3807,34 @@ (reusableComponentOptions.end = endTime), performance.measure(fiber, reusableComponentOptions)); } + function logRenderPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "primary-dark"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Render", reusableComponentOptions)); + } + function logSuspenseThrottlePhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Throttled", reusableComponentOptions)); + } + function logSuspendedCommitPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Suspended", reusableComponentOptions)); + } + function logCommitPhase(startTime, endTime) { + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-dark"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure("Commit", reusableComponentOptions)); + } function finishQueueingConcurrentUpdates() { for ( var endIndex = concurrentQueuesIndex, @@ -8893,33 +8913,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2296; - var JSCompiler_object_inline_stack_2295 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2315; + var JSCompiler_object_inline_stack_2314 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2293 = !1; + var JSCompiler_object_inline_message_2312 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2296 = didSuspend) || - (JSCompiler_object_inline_componentStack_2296 = + (JSCompiler_object_inline_componentStack_2315 = didSuspend) || + (JSCompiler_object_inline_componentStack_2315 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2296 && - ((JSCompiler_object_inline_message_2293 = !0), + JSCompiler_object_inline_componentStack_2315 && + ((JSCompiler_object_inline_message_2312 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2296 = + JSCompiler_object_inline_componentStack_2315 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2293 + JSCompiler_object_inline_message_2312 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2294 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2313 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2294)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2313)) { c: { - var instance = JSCompiler_object_inline_digest_2294; + var instance = JSCompiler_object_inline_digest_2313; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8960,19 +8980,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2294 + JSCompiler_object_inline_digest_2313 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2294 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2313 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2294 && - ((JSCompiler_object_inline_digest_2294 = - JSCompiler_object_inline_digest_2294.dehydrated), - null !== JSCompiler_object_inline_digest_2294) + null !== JSCompiler_object_inline_digest_2313 && + ((JSCompiler_object_inline_digest_2313 = + JSCompiler_object_inline_digest_2313.dehydrated), + null !== JSCompiler_object_inline_digest_2313) ) return ( - JSCompiler_object_inline_digest_2294.data === + JSCompiler_object_inline_digest_2313.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8980,68 +9000,68 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2294 = - JSCompiler_object_inline_stack_2295.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2295.fallback; - if (JSCompiler_object_inline_message_2293) + JSCompiler_object_inline_digest_2313 = + JSCompiler_object_inline_stack_2314.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2314.fallback; + if (JSCompiler_object_inline_message_2312) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2295 = + (JSCompiler_object_inline_stack_2314 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2294, + JSCompiler_object_inline_digest_2313, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2293 = workInProgress.child), - (JSCompiler_object_inline_message_2293.memoizedState = + (JSCompiler_object_inline_message_2312 = workInProgress.child), + (JSCompiler_object_inline_message_2312.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2293.childLanes = + (JSCompiler_object_inline_message_2312.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2296, + JSCompiler_object_inline_componentStack_2315, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2295 + JSCompiler_object_inline_stack_2314 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2295.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2314.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2295 = + (JSCompiler_object_inline_stack_2314 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2294, + JSCompiler_object_inline_digest_2313, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2293 = workInProgress.child), - (JSCompiler_object_inline_message_2293.memoizedState = + (JSCompiler_object_inline_message_2312 = workInProgress.child), + (JSCompiler_object_inline_message_2312.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2293.childLanes = + (JSCompiler_object_inline_message_2312.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2296, + JSCompiler_object_inline_componentStack_2315, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2295 + JSCompiler_object_inline_stack_2314 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2294 + JSCompiler_object_inline_digest_2313 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2294 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2294) + ((JSCompiler_object_inline_digest_2313 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2313) ) { if (didSuspend) workInProgress.flags & 256 @@ -9058,94 +9078,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2293 = - JSCompiler_object_inline_stack_2295.fallback), - (JSCompiler_object_inline_digest_2294 = workInProgress.mode), - (JSCompiler_object_inline_stack_2295 = + (JSCompiler_object_inline_message_2312 = + JSCompiler_object_inline_stack_2314.fallback), + (JSCompiler_object_inline_digest_2313 = workInProgress.mode), + (JSCompiler_object_inline_stack_2314 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2295.children + children: JSCompiler_object_inline_stack_2314.children }, - JSCompiler_object_inline_digest_2294 + JSCompiler_object_inline_digest_2313 )), - (JSCompiler_object_inline_message_2293 = + (JSCompiler_object_inline_message_2312 = createFiberFromFragment( - JSCompiler_object_inline_message_2293, - JSCompiler_object_inline_digest_2294, + JSCompiler_object_inline_message_2312, + JSCompiler_object_inline_digest_2313, renderLanes, null )), - (JSCompiler_object_inline_message_2293.flags |= 2), - (JSCompiler_object_inline_stack_2295.return = workInProgress), - (JSCompiler_object_inline_message_2293.return = workInProgress), - (JSCompiler_object_inline_stack_2295.sibling = - JSCompiler_object_inline_message_2293), - (workInProgress.child = JSCompiler_object_inline_stack_2295), + (JSCompiler_object_inline_message_2312.flags |= 2), + (JSCompiler_object_inline_stack_2314.return = workInProgress), + (JSCompiler_object_inline_message_2312.return = workInProgress), + (JSCompiler_object_inline_stack_2314.sibling = + JSCompiler_object_inline_message_2312), + (workInProgress.child = JSCompiler_object_inline_stack_2314), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2295 = workInProgress.child), - (JSCompiler_object_inline_stack_2295.memoizedState = + (JSCompiler_object_inline_stack_2314 = workInProgress.child), + (JSCompiler_object_inline_stack_2314.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2295.childLanes = + (JSCompiler_object_inline_stack_2314.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2296, + JSCompiler_object_inline_componentStack_2315, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2293)); + (workInProgress = JSCompiler_object_inline_message_2312)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_digest_2294.data === + JSCompiler_object_inline_digest_2313.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_componentStack_2296 = - JSCompiler_object_inline_digest_2294.nextSibling && - JSCompiler_object_inline_digest_2294.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2296) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2296.dgst; - var message = JSCompiler_object_inline_componentStack_2296.msg; - instance = JSCompiler_object_inline_componentStack_2296.stck; + JSCompiler_object_inline_componentStack_2315 = + JSCompiler_object_inline_digest_2313.nextSibling && + JSCompiler_object_inline_digest_2313.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2315) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2315.dgst; + var message = JSCompiler_object_inline_componentStack_2315.msg; + instance = JSCompiler_object_inline_componentStack_2315.stck; var componentStack = - JSCompiler_object_inline_componentStack_2296.cstck; + JSCompiler_object_inline_componentStack_2315.cstck; } - JSCompiler_object_inline_message_2293 = message; - JSCompiler_object_inline_digest_2294 = JSCompiler_temp; - JSCompiler_object_inline_stack_2295 = instance; - JSCompiler_object_inline_componentStack_2296 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2294 && - ((JSCompiler_object_inline_message_2293 = - JSCompiler_object_inline_message_2293 - ? Error(JSCompiler_object_inline_message_2293) + JSCompiler_object_inline_message_2312 = message; + JSCompiler_object_inline_digest_2313 = JSCompiler_temp; + JSCompiler_object_inline_stack_2314 = instance; + JSCompiler_object_inline_componentStack_2315 = componentStack; + "POSTPONE" !== JSCompiler_object_inline_digest_2313 && + ((JSCompiler_object_inline_message_2312 = + JSCompiler_object_inline_message_2312 + ? Error(JSCompiler_object_inline_message_2312) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_message_2293.stack = - JSCompiler_object_inline_stack_2295 || ""), - (JSCompiler_object_inline_message_2293.digest = - JSCompiler_object_inline_digest_2294), - (JSCompiler_object_inline_componentStack_2296 = - void 0 === JSCompiler_object_inline_componentStack_2296 + (JSCompiler_object_inline_message_2312.stack = + JSCompiler_object_inline_stack_2314 || ""), + (JSCompiler_object_inline_message_2312.digest = + JSCompiler_object_inline_digest_2313), + (JSCompiler_object_inline_componentStack_2315 = + void 0 === JSCompiler_object_inline_componentStack_2315 ? null - : JSCompiler_object_inline_componentStack_2296), - "string" === typeof JSCompiler_object_inline_componentStack_2296 && + : JSCompiler_object_inline_componentStack_2315), + "string" === typeof JSCompiler_object_inline_componentStack_2315 && CapturedStacks.set( - JSCompiler_object_inline_message_2293, - JSCompiler_object_inline_componentStack_2296 + JSCompiler_object_inline_message_2312, + JSCompiler_object_inline_componentStack_2315 ), queueHydrationError({ - value: JSCompiler_object_inline_message_2293, + value: JSCompiler_object_inline_message_2312, source: null, - stack: JSCompiler_object_inline_componentStack_2296 + stack: JSCompiler_object_inline_componentStack_2315 })); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9160,25 +9180,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2296 = + (JSCompiler_object_inline_componentStack_2315 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2296) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2315) ) { - JSCompiler_object_inline_componentStack_2296 = workInProgressRoot; - if (null !== JSCompiler_object_inline_componentStack_2296) { - JSCompiler_object_inline_stack_2295 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2295 & 42)) - JSCompiler_object_inline_stack_2295 = 1; + JSCompiler_object_inline_componentStack_2315 = workInProgressRoot; + if (null !== JSCompiler_object_inline_componentStack_2315) { + JSCompiler_object_inline_stack_2314 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2314 & 42)) + JSCompiler_object_inline_stack_2314 = 1; else - switch (JSCompiler_object_inline_stack_2295) { + switch (JSCompiler_object_inline_stack_2314) { case 2: - JSCompiler_object_inline_stack_2295 = 1; + JSCompiler_object_inline_stack_2314 = 1; break; case 8: - JSCompiler_object_inline_stack_2295 = 4; + JSCompiler_object_inline_stack_2314 = 4; break; case 32: - JSCompiler_object_inline_stack_2295 = 16; + JSCompiler_object_inline_stack_2314 = 16; break; case 128: case 256: @@ -9199,40 +9219,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2295 = 64; + JSCompiler_object_inline_stack_2314 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2295 = 134217728; + JSCompiler_object_inline_stack_2314 = 134217728; break; default: - JSCompiler_object_inline_stack_2295 = 0; + JSCompiler_object_inline_stack_2314 = 0; } - JSCompiler_object_inline_stack_2295 = + JSCompiler_object_inline_stack_2314 = 0 !== - (JSCompiler_object_inline_stack_2295 & - (JSCompiler_object_inline_componentStack_2296.suspendedLanes | + (JSCompiler_object_inline_stack_2314 & + (JSCompiler_object_inline_componentStack_2315.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2295; + : JSCompiler_object_inline_stack_2314; if ( - 0 !== JSCompiler_object_inline_stack_2295 && - JSCompiler_object_inline_stack_2295 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2314 && + JSCompiler_object_inline_stack_2314 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2295), + ((prevState.retryLane = JSCompiler_object_inline_stack_2314), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2295 + JSCompiler_object_inline_stack_2314 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2296, + JSCompiler_object_inline_componentStack_2315, current, - JSCompiler_object_inline_stack_2295 + JSCompiler_object_inline_stack_2314 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_digest_2294.data === + JSCompiler_object_inline_digest_2313.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9240,7 +9260,7 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2294.data === + JSCompiler_object_inline_digest_2313.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9248,12 +9268,12 @@ null, current )), - (JSCompiler_object_inline_digest_2294._reactRetry = + (JSCompiler_object_inline_digest_2313._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2294.nextSibling + JSCompiler_object_inline_digest_2313.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9271,54 +9291,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2295.children + JSCompiler_object_inline_stack_2314.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2293) + if (JSCompiler_object_inline_message_2312) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2293 = - JSCompiler_object_inline_stack_2295.fallback), - (JSCompiler_object_inline_digest_2294 = workInProgress.mode), + (JSCompiler_object_inline_message_2312 = + JSCompiler_object_inline_stack_2314.fallback), + (JSCompiler_object_inline_digest_2313 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2295 = createWorkInProgress( + (JSCompiler_object_inline_stack_2314 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2295.children + children: JSCompiler_object_inline_stack_2314.children } )), - (JSCompiler_object_inline_stack_2295.subtreeFlags = + (JSCompiler_object_inline_stack_2314.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_message_2293 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2312 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2293 + JSCompiler_object_inline_message_2312 )) - : ((JSCompiler_object_inline_message_2293 = createFiberFromFragment( - JSCompiler_object_inline_message_2293, - JSCompiler_object_inline_digest_2294, + : ((JSCompiler_object_inline_message_2312 = createFiberFromFragment( + JSCompiler_object_inline_message_2312, + JSCompiler_object_inline_digest_2313, renderLanes, null )), - (JSCompiler_object_inline_message_2293.flags |= 2)), - (JSCompiler_object_inline_message_2293.return = workInProgress), - (JSCompiler_object_inline_stack_2295.return = workInProgress), - (JSCompiler_object_inline_stack_2295.sibling = - JSCompiler_object_inline_message_2293), - (workInProgress.child = JSCompiler_object_inline_stack_2295), - (JSCompiler_object_inline_stack_2295 = - JSCompiler_object_inline_message_2293), - (JSCompiler_object_inline_message_2293 = workInProgress.child), - (JSCompiler_object_inline_digest_2294 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2294 - ? (JSCompiler_object_inline_digest_2294 = + (JSCompiler_object_inline_message_2312.flags |= 2)), + (JSCompiler_object_inline_message_2312.return = workInProgress), + (JSCompiler_object_inline_stack_2314.return = workInProgress), + (JSCompiler_object_inline_stack_2314.sibling = + JSCompiler_object_inline_message_2312), + (workInProgress.child = JSCompiler_object_inline_stack_2314), + (JSCompiler_object_inline_stack_2314 = + JSCompiler_object_inline_message_2312), + (JSCompiler_object_inline_message_2312 = workInProgress.child), + (JSCompiler_object_inline_digest_2313 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2313 + ? (JSCompiler_object_inline_digest_2313 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2294.cachePool), + JSCompiler_object_inline_digest_2313.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9326,38 +9346,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2294 = { + (JSCompiler_object_inline_digest_2313 = { baseLanes: - JSCompiler_object_inline_digest_2294.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2313.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2293.memoizedState = - JSCompiler_object_inline_digest_2294), - (JSCompiler_object_inline_message_2293.childLanes = + (JSCompiler_object_inline_message_2312.memoizedState = + JSCompiler_object_inline_digest_2313), + (JSCompiler_object_inline_message_2312.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2296, + JSCompiler_object_inline_componentStack_2315, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2295 + JSCompiler_object_inline_stack_2314 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2295.children + children: JSCompiler_object_inline_stack_2314.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2296 = + ((JSCompiler_object_inline_componentStack_2315 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2296 + null === JSCompiler_object_inline_componentStack_2315 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2296.push(current)); + : JSCompiler_object_inline_componentStack_2315.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11275,7 +11295,12 @@ } else ref.current = null; } - function commitProfiler(finishedWork, current, commitTime, effectDuration) { + function commitProfiler( + finishedWork, + current, + commitStartTime, + effectDuration + ) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit; @@ -11289,20 +11314,20 @@ finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, - commitTime + commitStartTime ); "function" === typeof onCommit && onCommit( finishedWork.memoizedProps.id, current, effectDuration, - commitTime + commitStartTime ); } function commitProfilerPostCommitImpl( finishedWork, current, - commitTime, + commitStartTime, passiveEffectDuration ) { var _finishedWork$memoize2 = finishedWork.memoizedProps; @@ -11315,7 +11340,7 @@ finishedWork, current, passiveEffectDuration, - commitTime + commitStartTime ); } function commitHostMount(finishedWork) { @@ -11759,7 +11784,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, finishedRoot.effectDuration ); } catch (error) { @@ -12773,7 +12798,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, includeWorkInProgressEffects.effectDuration ); } catch (error) { @@ -12969,7 +12994,7 @@ commitProfilerPostCommitImpl, finishedWork, finishedWork.alternate, - commitTime, + commitStartTime, finishedRoot.passiveEffectDuration ); } catch (error) { @@ -13775,8 +13800,7 @@ workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -14755,8 +14779,7 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if ( @@ -14798,199 +14821,189 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } - function performConcurrentWorkOnRoot(root, didTimeout) { - nestedUpdateScheduled = currentUpdateIsNested = !1; + function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; var shouldTimeSlice = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout; - didTimeout = shouldTimeSlice - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (didTimeout !== RootInProgress) { + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { var renderWasConcurrent = shouldTimeSlice; - do { - if (didTimeout === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - shouldTimeSlice = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(shouldTimeSlice) - ) { - didTimeout = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (didTimeout === RootErrored) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (didTimeout = recoverFromConcurrentError( - root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - didTimeout !== RootErrored) - ) - continue; - } - if (didTimeout === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - completeTime = now(); - switch (didTimeout) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( + exitStatus, + errorRetryLanes$jscomp$0 + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; break a; } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); + } + exitStatus = errorRetryLanes$jscomp$0; } - renderWasConcurrent.finishedWork = shouldTimeSlice; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - else { - if ( - (lanes & 62914560) === lanes && - ((didTimeout = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < didTimeout) - ) { + if (exitStatus !== RootErrored) continue; + } + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + renderWasConcurrent = now$1(); + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), - didTimeout + workInProgressDeferredLane ); break a; } - commitRootWhenReady( - renderWasConcurrent, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + renderWasConcurrent + ); + else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + renderWasConcurrent + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + renderWasConcurrent + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now$1()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; - } - function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (errorRetryLanes !== RootErrored) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes), - RootSuspendedWithDelay - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -15010,10 +15023,16 @@ spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), @@ -15029,10 +15048,13 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + SUSPENDED_COMMIT, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -15042,7 +15064,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -15091,81 +15116,24 @@ (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings - ) { + function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + expirationTimes[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } - function performSyncWorkOnRoot(root, lanes) { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) - throw Error("Should not already be working."); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - currentUpdateIsNested = nestedUpdateScheduled; - nestedUpdateScheduled = !1; - var exitStatus = renderRootSync(root, lanes); - if (exitStatus === RootErrored) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (exitStatus === RootFatalErrored) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (exitStatus === RootDidNotComplete) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - completeTime = now(); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; - } function flushSyncWork$1() { return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -15279,8 +15247,9 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -15373,8 +15342,7 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function queueConcurrentError(error) { @@ -15402,37 +15370,38 @@ prepareFreshStack(root, lanes); } lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$8) { handleThrow(root, thrownValue$8); @@ -15443,14 +15412,11 @@ executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -15474,7 +15440,7 @@ workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); - } + } else checkIfRootIsPrerendering(root, lanes); a: do try { if ( @@ -15791,7 +15757,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -15806,13 +15775,15 @@ previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -15822,7 +15793,10 @@ renderPriorityLevel, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -15830,107 +15804,118 @@ ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - 0 === lanes && + suspendedRetryLanes = root.finishedWork; + updatedLanes = root.finishedLanes; + reusableComponentDevToolDetails.track = + getGroupNameOfHighestPriorityLane(updatedLanes); + logRenderPhase(completedRenderStartTime, completedRenderEndTime); + if (null === suspendedRetryLanes) return null; + 0 === updatedLanes && console.error( "root.finishedLanes should not be empty during a commit. This is a bug in React." ); root.finishedWork = null; root.finishedLanes = 0; - if (finishedWork === root.current) + if (suspendedRetryLanes === root.current) throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); root.callbackNode = null; root.callbackPriority = 0; root.cancelPendingCommit = null; - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; + completedRenderStartTime = + suspendedRetryLanes.lanes | suspendedRetryLanes.childLanes; + completedRenderStartTime |= concurrentlyUpdatedLanes; markRootFinished( root, - lanes, - remainingLanes, - spawnedLane, updatedLanes, - suspendedRetryLanes + completedRenderStartTime, + spawnedLane ); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === finishedWork.actualDuration && - 0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || + (0 === suspendedRetryLanes.actualDuration && + 0 === (suspendedRetryLanes.subtreeFlags & 10256) && + 0 === (suspendedRetryLanes.flags & 10256)) || rootDoesHavePassiveEffects || ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveEffectsRemainingLanes = completedRenderStartTime), + (pendingPassiveEffectsRenderEndTime = completedRenderEndTime), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions + commitStartTime = now(); + suspendedCommitReason === SUSPENDED_COMMIT + ? logSuspendedCommitPhase(completedRenderEndTime, commitStartTime) + : suspendedCommitReason === THROTTLED_COMMIT && + logSuspenseThrottlePhase(completedRenderEndTime, commitStartTime); + transitions = 0 !== (suspendedRetryLanes.flags & 15990); + 0 !== (suspendedRetryLanes.subtreeFlags & 15990) || transitions ? ((transitions = ReactSharedInternals.T), (ReactSharedInternals.T = null), (spawnedLane = ReactDOMSharedInternals.p), (ReactDOMSharedInternals.p = DiscreteEventPriority), - (updatedLanes = executionContext), + (suspendedCommitReason = executionContext), (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - (commitTime = now()), - commitMutationEffects(root, finishedWork, lanes), + commitBeforeMutationEffects(root, suspendedRetryLanes), + commitMutationEffects(root, suspendedRetryLanes, updatedLanes), restoreSelection(selectionInformation, root.containerInfo), (_enabled = !!eventsEnabled), (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffects(finishedWork, root, lanes), + (root.current = suspendedRetryLanes), + commitLayoutEffects(suspendedRetryLanes, root, updatedLanes), requestPaint(), - (executionContext = updatedLanes), + (executionContext = suspendedCommitReason), (ReactDOMSharedInternals.p = spawnedLane), (ReactSharedInternals.T = transitions)) - : ((root.current = finishedWork), (commitTime = now())); + : (root.current = suspendedRetryLanes); + commitEndTime = now(); + logCommitPhase(commitStartTime, commitEndTime); (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + (pendingPassiveEffectsLanes = updatedLanes)) + : (releaseRootPooledCache(root, completedRenderStartTime), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); + completedRenderStartTime = root.pendingLanes; + 0 === completedRenderStartTime && + (legacyErrorBoundariesThatAlreadyFailed = null); transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); + onCommitRoot$1(suspendedRetryLanes.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ + renderPriorityLevel = root.onRecoverableError, + suspendedRetryLanes = 0; + suspendedRetryLanes < recoverableErrors.length; + suspendedRetryLanes++ ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + (completedRenderStartTime = recoverableErrors[suspendedRetryLanes]), + (spawnedLane = makeErrorInfo(completedRenderStartTime.stack)), runWithFiberInDEV( - remainingLanes.source, + completedRenderStartTime.source, renderPriorityLevel, - remainingLanes.value, + completedRenderStartTime.value, spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); - remainingLanes = root.pendingLanes; + completedRenderStartTime = root.pendingLanes; didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (updatedLanes & 4194218) && 0 !== (completedRenderStartTime & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))) : (nestedUpdateCount = 0); - transitions || finalizeRender(lanes, now$1()); + transitions || finalizeRender(updatedLanes, now$1()); flushSyncWorkAcrossRoots_impl(0, !1); return null; } @@ -15951,7 +15936,7 @@ null != remainingLanes && ((root.pooledCache = null), releaseCache(remainingLanes))); } - function flushPassiveEffects() { + function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { var root = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; @@ -15969,10 +15954,10 @@ if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { - priority = pendingPassiveTransitions; + var transitions = pendingPassiveTransitions; pendingPassiveTransitions = null; - var root$jscomp$0 = rootWithPendingPassiveEffects, - lanes = pendingPassiveEffectsLanes; + priority = rootWithPendingPassiveEffects; + var lanes = pendingPassiveEffectsLanes; rootWithPendingPassiveEffects = null; pendingPassiveEffectsLanes = 0; if ( @@ -15983,40 +15968,56 @@ "Cannot flush passive effects while already rendering." ); reusableComponentDevToolDetails.track = - lanes & 63 - ? "Blocking" - : lanes & 4194240 - ? "Transition" - : lanes & 62914560 - ? "Suspense" - : lanes & 2080374784 - ? "Idle" - : "Other"; + getGroupNameOfHighestPriorityLane(lanes); isFlushingPassiveEffects = !0; didScheduleUpdateDuringPassiveEffects = !1; - var prevExecutionContext = executionContext; + var passiveEffectStartTime = 0; + passiveEffectStartTime = now$1(); + var startTime = commitEndTime, + endTime = passiveEffectStartTime; + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-light"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure( + "Waiting for Paint", + reusableComponentOptions + )); + startTime = executionContext; executionContext |= CommitContext; - var finishedWork = root$jscomp$0.current; + var finishedWork = priority.current; resetComponentEffectTimers(); commitPassiveUnmountOnFiber(finishedWork); - var finishedWork$jscomp$0 = root$jscomp$0.current; + var finishedWork$jscomp$0 = priority.current; + finishedWork = pendingPassiveEffectsRenderEndTime; resetComponentEffectTimers(); commitPassiveMountOnFiber( - root$jscomp$0, + priority, finishedWork$jscomp$0, lanes, - priority, - completeTime + transitions, + finishedWork ); - commitDoubleInvokeEffectsInDEV(root$jscomp$0); - executionContext = prevExecutionContext; - finalizeRender(lanes, now$1()); + commitDoubleInvokeEffectsInDEV(priority); + executionContext = startTime; + var passiveEffectsEndTime = now$1(); + wasDelayedCommit && + ((wasDelayedCommit = passiveEffectStartTime), + supportsUserTiming && + ((reusableComponentDevToolDetails.color = "secondary-dark"), + (reusableComponentOptions.start = wasDelayedCommit), + (reusableComponentOptions.end = passiveEffectsEndTime), + performance.measure( + "Remaining Effects", + reusableComponentOptions + ))); + finalizeRender(lanes, passiveEffectsEndTime); flushSyncWorkAcrossRoots_impl(0, !1); didScheduleUpdateDuringPassiveEffects - ? root$jscomp$0 === rootWithPassiveNestedUpdates + ? priority === rootWithPassiveNestedUpdates ? nestedPassiveUpdateCount++ : ((nestedPassiveUpdateCount = 0), - (rootWithPassiveNestedUpdates = root$jscomp$0)) + (rootWithPassiveNestedUpdates = priority)) : (nestedPassiveUpdateCount = 0); didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1; @@ -16025,7 +16026,7 @@ "function" === typeof injectedHook.onPostCommitFiberRoot ) try { - injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0); + injectedHook.onPostCommitFiberRoot(rendererID, priority); } catch (err) { hasLoggedError || ((hasLoggedError = !0), @@ -16034,7 +16035,7 @@ err )); } - var stateNode = root$jscomp$0.current.stateNode; + var stateNode = priority.current.stateNode; stateNode.effectDuration = 0; stateNode.passiveEffectDuration = 0; JSCompiler_inline_result = !0; @@ -16365,7 +16366,8 @@ root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -16456,8 +16458,6 @@ else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -16470,7 +16470,7 @@ default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), (suspendedLanes = fakeActCallbackNode)) @@ -16479,6 +16479,34 @@ root.callbackNode = suspendedLanes; return currentTime; } + function performWorkOnRootViaSchedulerTask(root, didTimeout) { + nestedUpdateScheduled = currentUpdateIsNested = !1; + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = + workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot( + root, + workInProgressRootRenderLanes$jscomp$0, + didTimeout + ); + scheduleTaskForRootDuringMicrotask(root, now$1()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; + } + function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + currentUpdateIsNested = nestedUpdateScheduled; + nestedUpdateScheduled = !1; + performWorkOnRoot(root, lanes, !0); + } function cancelCallback(callbackNode) { callbackNode !== fakeActCallbackNode && null !== callbackNode && @@ -22818,8 +22846,8 @@ NoStrictPassiveEffectsMode = 64, now = Scheduler.unstable_now, renderStartTime = -0, - completeTime = -0, - commitTime = -0, + commitStartTime = -0, + commitEndTime = -0, profilerStartTime = -1.1, profilerEffectDuration = -0, componentEffectDuration = -0, @@ -24654,16 +24682,20 @@ rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, + pendingPassiveEffectsRenderEndTime = -0, pendingPassiveTransitions = null, - NESTED_UPDATE_LIMIT = 50, + NESTED_UPDATE_LIMIT = 100, nestedUpdateCount = 0, rootWithNestedUpdates = null, isFlushingPassiveEffects = !1, didScheduleUpdateDuringPassiveEffects = !1, - NESTED_PASSIVE_UPDATE_LIMIT = 50, + NESTED_PASSIVE_UPDATE_LIMIT = 100, nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, isRunningInsertionEffect = !1, + IMMEDIATE_COMMIT = 0, + SUSPENDED_COMMIT = 1, + THROTTLED_COMMIT = 2, didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = !1; var didWarnAboutUpdateInRenderForAnotherComponent = new Set(); @@ -25208,11 +25240,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -25249,11 +25281,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-5d19e1c8-20240923", + version: "19.0.0-experimental-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-5d19e1c8-20240923" + reconcilerVersion: "19.0.0-experimental-778e1ed2-20240926" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25561,5 +25593,5 @@ } }; }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js index 6b827016f23ef..9ab16fa418dd0 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js @@ -597,43 +597,39 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -675,11 +671,6 @@ function computeExpirationTime(lane, currentTime) { return -1; } } -function getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; -} function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -696,14 +687,7 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes -) { +function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; @@ -713,36 +697,31 @@ function markRootFinished( root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index$7 = 31 - clz32(remainingLanes), - lane = 1 << index$7; - entanglements[index$7] = 0; - expirationTimes[index$7] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$7]; + var index$6 = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index$6; + finishedLanes[index$6] = 0; + expirationTimes[index$6] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$6]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$7] = null, index$7 = 0; - index$7 < hiddenUpdatesForLane.length; - index$7++ + hiddenUpdates[index$6] = null, index$6 = 0; + index$6 < hiddenUpdatesForLane.length; + index$6++ ) { - var update = hiddenUpdatesForLane[index$7]; + var update = hiddenUpdatesForLane[index$6]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -757,10 +736,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$8 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$8; - (lane & entangledLanes) | (root[index$8] & entangledLanes) && - (root[index$8] |= entangledLanes); + var index$7 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$7; + (lane & entangledLanes) | (root[index$7] & entangledLanes) && + (root[index$7] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -996,8 +975,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$10 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$10 && "aria-" !== prefix$10) { + var prefix$9 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$9 && "aria-" !== prefix$9) { node.removeAttribute(name); return; } @@ -1330,15 +1309,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$16 in styles) - (styleName = styles[styleName$16]), - styles.hasOwnProperty(styleName$16) && - prevStyles[styleName$16] !== styleName && - setValueForStyle(node, styleName$16, styleName); + for (var styleName$15 in styles) + (styleName = styles[styleName$15]), + styles.hasOwnProperty(styleName$15) && + prevStyles[styleName$15] !== styleName && + setValueForStyle(node, styleName$15, styleName); } else - for (var styleName$17 in styles) - styles.hasOwnProperty(styleName$17) && - setValueForStyle(node, styleName$17, styles[styleName$17]); + for (var styleName$16 in styles) + styles.hasOwnProperty(styleName$16) && + setValueForStyle(node, styleName$16, styles[styleName$16]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -2069,14 +2048,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$282; if (canUseDOM) { - var isSupported$jscomp$inline_421 = "oninput" in document; - if (!isSupported$jscomp$inline_421) { - var element$jscomp$inline_422 = document.createElement("div"); - element$jscomp$inline_422.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_421 = - "function" === typeof element$jscomp$inline_422.oninput; + var isSupported$jscomp$inline_420 = "oninput" in document; + if (!isSupported$jscomp$inline_420) { + var element$jscomp$inline_421 = document.createElement("div"); + element$jscomp$inline_421.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_420 = + "function" === typeof element$jscomp$inline_421.oninput; } - JSCompiler_inline_result$jscomp$282 = isSupported$jscomp$inline_421; + JSCompiler_inline_result$jscomp$282 = isSupported$jscomp$inline_420; } else JSCompiler_inline_result$jscomp$282 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$282 && @@ -4019,7 +3998,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$55 = !1; + didReadFromEntangledAsyncAction$54 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -4040,11 +4019,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$54 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$54 = !0); continue; } else (updateLane = { @@ -4090,7 +4069,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$55 && + didReadFromEntangledAsyncAction$54 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4288,8 +4267,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$61) { - onActionError(actionQueue, node, error$61); + } catch (error$60) { + onActionError(actionQueue, node, error$60); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4738,14 +4717,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$64 = enqueueUpdate(provider, fiber, lane); - null !== root$64 && - (scheduleUpdateOnFiber(root$64, provider, lane), - entangleTransitions(root$64, provider, lane)); + var root$63 = enqueueUpdate(provider, fiber, lane); + null !== root$63 && + (scheduleUpdateOnFiber(root$63, provider, lane), + entangleTransitions(root$63, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$64 && + null !== root$63 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -5276,9 +5255,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$68 in Component) - void 0 === newProps[propName$68] && - (newProps[propName$68] = Component[propName$68]); + for (var propName$67 in Component) + void 0 === newProps[propName$67] && + (newProps[propName$67] = Component[propName$67]); } return newProps; } @@ -5324,9 +5303,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$69) { + } catch (e$68) { setTimeout(function () { - throw e$69; + throw e$68; }); } } @@ -5337,9 +5316,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$70) { + } catch (e$69) { setTimeout(function () { - throw e$70; + throw e$69; }); } } @@ -7805,8 +7784,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$115) { - captureCommitPhaseError(current, nearestMountedAncestor, error$115); + } catch (error$114) { + captureCommitPhaseError(current, nearestMountedAncestor, error$114); } else ref.current = null; } @@ -7940,7 +7919,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$20) { + } catch (e$19) { JSCompiler_temp = null; break a; } @@ -8115,11 +8094,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$114) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$114 + error$113 ); } } @@ -8273,7 +8252,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$122 = hostParentIsContainer; + var prevHostParentIsContainer$121 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8281,7 +8260,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$122; + hostParentIsContainer = prevHostParentIsContainer$121; if (null !== hostParent) if (hostParentIsContainer) try { @@ -8909,21 +8888,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$116 = JSCompiler_inline_result.stateNode; + var parent$115 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$116, ""), + (setTextContent(parent$115, ""), (JSCompiler_inline_result.flags &= -33)); - var before$117 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$117, parent$116); + var before$116 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$116, parent$115); break; case 3: case 4: - var parent$118 = JSCompiler_inline_result.stateNode.containerInfo, - before$119 = getHostSibling(finishedWork); + var parent$117 = JSCompiler_inline_result.stateNode.containerInfo, + before$118 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$119, - parent$118 + before$118, + parent$117 ); break; default: @@ -9820,8 +9799,7 @@ function scheduleRetryEffect(workInProgress, retryQueue) { workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -9838,14 +9816,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$134 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$134 = lastTailNode), + for (var lastTailNode$133 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$133 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$134 + null === lastTailNode$133 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$134.sibling = null); + : (lastTailNode$133.sibling = null); } } function bubbleProperties(completedWork) { @@ -9855,19 +9833,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$135 = completedWork.child; null !== child$135; ) - (newChildLanes |= child$135.lanes | child$135.childLanes), - (subtreeFlags |= child$135.subtreeFlags & 31457280), - (subtreeFlags |= child$135.flags & 31457280), - (child$135.return = completedWork), - (child$135 = child$135.sibling); + for (var child$134 = completedWork.child; null !== child$134; ) + (newChildLanes |= child$134.lanes | child$134.childLanes), + (subtreeFlags |= child$134.subtreeFlags & 31457280), + (subtreeFlags |= child$134.flags & 31457280), + (child$134.return = completedWork), + (child$134 = child$134.sibling); else - for (child$135 = completedWork.child; null !== child$135; ) - (newChildLanes |= child$135.lanes | child$135.childLanes), - (subtreeFlags |= child$135.subtreeFlags), - (subtreeFlags |= child$135.flags), - (child$135.return = completedWork), - (child$135 = child$135.sibling); + for (child$134 = completedWork.child; null !== child$134; ) + (newChildLanes |= child$134.lanes | child$134.childLanes), + (subtreeFlags |= child$134.subtreeFlags), + (subtreeFlags |= child$134.flags), + (child$134.return = completedWork), + (child$134 = child$134.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10144,11 +10122,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$147 = null; + var cache$146 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$147 = newProps.memoizedState.cachePool.pool); - cache$147 !== type && (newProps.flags |= 2048); + (cache$146 = newProps.memoizedState.cachePool.pool); + cache$146 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -10173,8 +10151,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$147 = type.rendering; - if (null === cache$147) + cache$146 = type.rendering; + if (null === cache$146) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10182,11 +10160,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$147 = findFirstSuspended(current); - if (null !== cache$147) { + cache$146 = findFirstSuspended(current); + if (null !== cache$146) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$147.updateQueue; + current = cache$146.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10211,7 +10189,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$147)), null !== current)) { + if (((current = findFirstSuspended(cache$146)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10221,7 +10199,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$147.alternate && + !cache$146.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10234,13 +10212,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$147.sibling = workInProgress.child), - (workInProgress.child = cache$147)) + ? ((cache$146.sibling = workInProgress.child), + (workInProgress.child = cache$146)) : ((current = type.last), null !== current - ? (current.sibling = cache$147) - : (workInProgress.child = cache$147), - (type.last = cache$147)); + ? (current.sibling = cache$146) + : (workInProgress.child = cache$146), + (type.last = cache$146)); } if (null !== type.tail) return ( @@ -10651,8 +10629,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10663,179 +10640,159 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } -function performConcurrentWorkOnRoot(root, didTimeout) { +function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; var shouldTimeSlice = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout; - didTimeout = shouldTimeSlice - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (0 !== didTimeout) { + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { var renderWasConcurrent = shouldTimeSlice; - do { - if (6 === didTimeout) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - shouldTimeSlice = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(shouldTimeSlice) - ) { - didTimeout = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === didTimeout) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (didTimeout = recoverFromConcurrentError( + if (0 === exitStatus) break; + else if (6 === exitStatus) markRootSuspended(root$jscomp$0, lanes, 0); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), + (JSCompiler_inline_result = + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - 2 !== didTimeout) - ) - continue; - } - if (1 === didTimeout) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (didTimeout) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; break a; } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); + } + exitStatus = JSCompiler_inline_result; } - renderWasConcurrent.finishedWork = shouldTimeSlice; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - ((didTimeout = globalMostRecentFallbackTime + 300 - now()), - 10 < didTimeout) - ) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + switch (exitStatus) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), - didTimeout - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { + markRootSuspended(shouldTimeSlice, lanes, workInProgressDeferredLane); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } - ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; -} -function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes -) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (2 !== errorRetryLanes) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes), - 4 - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; + } + break; + } while (1); + ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -10855,10 +10812,16 @@ function commitRootWhenReady( spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), @@ -10874,10 +10837,13 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + 1, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -10887,7 +10853,10 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -10933,77 +10902,24 @@ function markRootUpdated(root, updatedLanes) { : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings -) { +function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$6 = 31 - clz32(lanes), - lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5; + expirationTimes[index$5] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } -function performSyncWorkOnRoot(root, lanes) { - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - var exitStatus = renderRootSync(root, lanes); - if (2 === exitStatus) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (1 === exitStatus) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (6 === exitStatus) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -11041,8 +10957,9 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -11061,9 +10978,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$4 = 31 - clz32(allEntangledLanes), - lane = 1 << index$4; - lanes |= root[index$4]; + var index$3 = 31 - clz32(allEntangledLanes), + lane = 1 << index$3; + lanes |= root[index$3]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -11133,8 +11050,7 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function queueConcurrentError(error) { @@ -11150,6 +11066,7 @@ function renderRootSync(root, lanes) { if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11158,21 +11075,26 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$163) { handleThrow(root, thrownValue$163); @@ -11183,11 +11105,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11197,10 +11119,11 @@ function renderRootConcurrent(root, lanes) { executionContext |= 2; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11440,7 +11363,10 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -11455,13 +11381,15 @@ function commitRoot( previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -11469,9 +11397,7 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -11487,14 +11413,7 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + markRootFinished(root, lanes, remainingLanes, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -11506,29 +11425,29 @@ function commitRootImpl( (pendingPassiveEffectsRemainingLanes = remainingLanes), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = ReactDOMSharedInternals.p), - (ReactDOMSharedInternals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (ReactDOMSharedInternals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = ReactDOMSharedInternals.p; + ReactDOMSharedInternals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffectsOnFiber(finishedWork, root); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = prevExecutionContext; + ReactDOMSharedInternals.p = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -11730,7 +11649,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { retryTimedOutBoundary(boundaryFiber, retryLane); } function throwIfInfiniteUpdateLoopDetected() { - if (50 < nestedUpdateCount) + if (100 < nestedUpdateCount) throw ( ((nestedUpdateCount = 0), (rootWithNestedUpdates = null), @@ -11794,7 +11713,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$171, root$171 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$171, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$171, JSCompiler_inline_result)); root$171 = root$171.next; @@ -11838,12 +11758,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5, - expirationTime = expirationTimes[index$5]; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4, + expirationTime = expirationTimes[index$4]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$5] = computeExpirationTime(lane, currentTime); + expirationTimes[index$4] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -11880,8 +11800,6 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { null !== pingedLanes && cancelCallback$1(pingedLanes); switch (lanesToEventPriority(suspendedLanes)) { case 2: - suspendedLanes = ImmediatePriority; - break; case 8: suspendedLanes = UserBlockingPriority; break; @@ -11894,12 +11812,32 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); root.callbackPriority = currentTime; root.callbackNode = suspendedLanes; return currentTime; } +function performWorkOnRootViaSchedulerTask(root, didTimeout) { + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout); + scheduleTaskForRootDuringMicrotask(root, now()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; +} +function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + performWorkOnRoot(root, lanes, !0); +} function scheduleImmediateTask(cb) { scheduleMicrotask(function () { 0 !== (executionContext & 6) @@ -12007,20 +11945,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1433 = 0; - i$jscomp$inline_1433 < simpleEventPluginEvents.length; - i$jscomp$inline_1433++ + var i$jscomp$inline_1439 = 0; + i$jscomp$inline_1439 < simpleEventPluginEvents.length; + i$jscomp$inline_1439++ ) { - var eventName$jscomp$inline_1434 = - simpleEventPluginEvents[i$jscomp$inline_1433], - domEventName$jscomp$inline_1435 = - eventName$jscomp$inline_1434.toLowerCase(), - capitalizedEvent$jscomp$inline_1436 = - eventName$jscomp$inline_1434[0].toUpperCase() + - eventName$jscomp$inline_1434.slice(1); + var eventName$jscomp$inline_1440 = + simpleEventPluginEvents[i$jscomp$inline_1439], + domEventName$jscomp$inline_1441 = + eventName$jscomp$inline_1440.toLowerCase(), + capitalizedEvent$jscomp$inline_1442 = + eventName$jscomp$inline_1440[0].toUpperCase() + + eventName$jscomp$inline_1440.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1435, - "on" + capitalizedEvent$jscomp$inline_1436 + domEventName$jscomp$inline_1441, + "on" + capitalizedEvent$jscomp$inline_1442 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15518,16 +15456,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1680 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1686 = React.version; if ( - "19.0.0-experimental-5d19e1c8-20240923" !== - isomorphicReactPackageVersion$jscomp$inline_1680 + "19.0.0-experimental-778e1ed2-20240926" !== + isomorphicReactPackageVersion$jscomp$inline_1686 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1680, - "19.0.0-experimental-5d19e1c8-20240923" + isomorphicReactPackageVersion$jscomp$inline_1686, + "19.0.0-experimental-778e1ed2-20240926" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15547,25 +15485,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2145 = { +var internals$jscomp$inline_2156 = { bundleType: 0, - version: "19.0.0-experimental-5d19e1c8-20240923", + version: "19.0.0-experimental-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-5d19e1c8-20240923" + reconcilerVersion: "19.0.0-experimental-778e1ed2-20240926" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2146 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2157 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2146.isDisabled && - hook$jscomp$inline_2146.supportsFiber + !hook$jscomp$inline_2157.isDisabled && + hook$jscomp$inline_2157.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2146.inject( - internals$jscomp$inline_2145 + (rendererID = hook$jscomp$inline_2157.inject( + internals$jscomp$inline_2156 )), - (injectedHook = hook$jscomp$inline_2146); + (injectedHook = hook$jscomp$inline_2157); } catch (err) {} } exports.createComponentSelector = function (component) { @@ -15808,4 +15746,4 @@ exports.observeVisibleRects = function ( } }; }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js index 048e2ee0039c8..a62200a9e19a9 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js @@ -416,7 +416,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js index ae8d05d7bea34..5e82f5cd78f96 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js @@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js index b3db1f291ed99..45513d75d8ba3 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js index 353a895622fbb..1a53d7dc26874 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom-experimental/package.json b/packages/next/src/compiled/react-dom-experimental/package.json index 59d683cb5b760..a4e721c17eb8a 100644 --- a/packages/next/src/compiled/react-dom-experimental/package.json +++ b/packages/next/src/compiled/react-dom-experimental/package.json @@ -72,10 +72,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.0.0-experimental-5d19e1c8-20240923" + "scheduler": "0.0.0-experimental-778e1ed2-20240926" }, "peerDependencies": { - "react": "0.0.0-experimental-5d19e1c8-20240923" + "react": "0.0.0-experimental-778e1ed2-20240926" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js index 49e3eba4eb2ac..cbc09d68642dd 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js @@ -998,43 +998,39 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1081,14 +1077,6 @@ ); } } - function getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; - } function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -1109,9 +1097,7 @@ root, finishedLanes, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; @@ -1122,17 +1108,17 @@ root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; + var index = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index; + finishedLanes[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -1144,14 +1130,9 @@ var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -8636,32 +8617,32 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2287; - var JSCompiler_object_inline_stack_2288 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2296; + var JSCompiler_object_inline_stack_2297 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2289 = !1; + var JSCompiler_object_inline_componentStack_2298 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2287 = didSuspend) || - (JSCompiler_object_inline_digest_2287 = + (JSCompiler_object_inline_digest_2296 = didSuspend) || + (JSCompiler_object_inline_digest_2296 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2287 && - ((JSCompiler_object_inline_componentStack_2289 = !0), + JSCompiler_object_inline_digest_2296 && + ((JSCompiler_object_inline_componentStack_2298 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2287 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2296 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2289 + JSCompiler_object_inline_componentStack_2298 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2286 = nextHydratableInstance; + var JSCompiler_object_inline_message_2295 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2286)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2295)) { c: { - var instance = JSCompiler_object_inline_message_2286; + var instance = JSCompiler_object_inline_message_2295; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8702,19 +8683,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2286 + JSCompiler_object_inline_message_2295 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2286 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2295 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2286 && - ((JSCompiler_object_inline_message_2286 = - JSCompiler_object_inline_message_2286.dehydrated), - null !== JSCompiler_object_inline_message_2286) + null !== JSCompiler_object_inline_message_2295 && + ((JSCompiler_object_inline_message_2295 = + JSCompiler_object_inline_message_2295.dehydrated), + null !== JSCompiler_object_inline_message_2295) ) return ( - JSCompiler_object_inline_message_2286.data === + JSCompiler_object_inline_message_2295.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8722,58 +8703,58 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2286 = - JSCompiler_object_inline_stack_2288.children; - JSCompiler_object_inline_stack_2288 = - JSCompiler_object_inline_stack_2288.fallback; - if (JSCompiler_object_inline_componentStack_2289) + JSCompiler_object_inline_message_2295 = + JSCompiler_object_inline_stack_2297.children; + JSCompiler_object_inline_stack_2297 = + JSCompiler_object_inline_stack_2297.fallback; + if (JSCompiler_object_inline_componentStack_2298) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2289 = + (JSCompiler_object_inline_componentStack_2298 = workInProgress.mode), - (JSCompiler_object_inline_message_2286 = + (JSCompiler_object_inline_message_2295 = mountWorkInProgressOffscreenFiber( { mode: "hidden", - children: JSCompiler_object_inline_message_2286 + children: JSCompiler_object_inline_message_2295 }, - JSCompiler_object_inline_componentStack_2289 + JSCompiler_object_inline_componentStack_2298 )), - (JSCompiler_object_inline_stack_2288 = createFiberFromFragment( - JSCompiler_object_inline_stack_2288, - JSCompiler_object_inline_componentStack_2289, + (JSCompiler_object_inline_stack_2297 = createFiberFromFragment( + JSCompiler_object_inline_stack_2297, + JSCompiler_object_inline_componentStack_2298, renderLanes, null )), - (JSCompiler_object_inline_message_2286.return = workInProgress), - (JSCompiler_object_inline_stack_2288.return = workInProgress), - (JSCompiler_object_inline_message_2286.sibling = - JSCompiler_object_inline_stack_2288), - (workInProgress.child = JSCompiler_object_inline_message_2286), - (JSCompiler_object_inline_componentStack_2289 = + (JSCompiler_object_inline_message_2295.return = workInProgress), + (JSCompiler_object_inline_stack_2297.return = workInProgress), + (JSCompiler_object_inline_message_2295.sibling = + JSCompiler_object_inline_stack_2297), + (workInProgress.child = JSCompiler_object_inline_message_2295), + (JSCompiler_object_inline_componentStack_2298 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2289.memoizedState = + (JSCompiler_object_inline_componentStack_2298.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2289.childLanes = + (JSCompiler_object_inline_componentStack_2298.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2287, + JSCompiler_object_inline_digest_2296, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2288 + JSCompiler_object_inline_stack_2297 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2286 + JSCompiler_object_inline_message_2295 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2286 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2286) + ((JSCompiler_object_inline_message_2295 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2295) ) { if (didSuspend) workInProgress.flags & 256 @@ -8790,94 +8771,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2289 = - JSCompiler_object_inline_stack_2288.fallback), - (JSCompiler_object_inline_message_2286 = workInProgress.mode), - (JSCompiler_object_inline_stack_2288 = + (JSCompiler_object_inline_componentStack_2298 = + JSCompiler_object_inline_stack_2297.fallback), + (JSCompiler_object_inline_message_2295 = workInProgress.mode), + (JSCompiler_object_inline_stack_2297 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2288.children + children: JSCompiler_object_inline_stack_2297.children }, - JSCompiler_object_inline_message_2286 + JSCompiler_object_inline_message_2295 )), - (JSCompiler_object_inline_componentStack_2289 = + (JSCompiler_object_inline_componentStack_2298 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2289, - JSCompiler_object_inline_message_2286, + JSCompiler_object_inline_componentStack_2298, + JSCompiler_object_inline_message_2295, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2289.flags |= 2), - (JSCompiler_object_inline_stack_2288.return = workInProgress), - (JSCompiler_object_inline_componentStack_2289.return = + (JSCompiler_object_inline_componentStack_2298.flags |= 2), + (JSCompiler_object_inline_stack_2297.return = workInProgress), + (JSCompiler_object_inline_componentStack_2298.return = workInProgress), - (JSCompiler_object_inline_stack_2288.sibling = - JSCompiler_object_inline_componentStack_2289), - (workInProgress.child = JSCompiler_object_inline_stack_2288), + (JSCompiler_object_inline_stack_2297.sibling = + JSCompiler_object_inline_componentStack_2298), + (workInProgress.child = JSCompiler_object_inline_stack_2297), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2288 = workInProgress.child), - (JSCompiler_object_inline_stack_2288.memoizedState = + (JSCompiler_object_inline_stack_2297 = workInProgress.child), + (JSCompiler_object_inline_stack_2297.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2288.childLanes = + (JSCompiler_object_inline_stack_2297.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2287, + JSCompiler_object_inline_digest_2296, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2289)); + JSCompiler_object_inline_componentStack_2298)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2286.data === + JSCompiler_object_inline_message_2295.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2287 = - JSCompiler_object_inline_message_2286.nextSibling && - JSCompiler_object_inline_message_2286.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2287) { - JSCompiler_temp = JSCompiler_object_inline_digest_2287.dgst; - var message = JSCompiler_object_inline_digest_2287.msg; - instance = JSCompiler_object_inline_digest_2287.stck; - var componentStack = JSCompiler_object_inline_digest_2287.cstck; + JSCompiler_object_inline_digest_2296 = + JSCompiler_object_inline_message_2295.nextSibling && + JSCompiler_object_inline_message_2295.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2296) { + JSCompiler_temp = JSCompiler_object_inline_digest_2296.dgst; + var message = JSCompiler_object_inline_digest_2296.msg; + instance = JSCompiler_object_inline_digest_2296.stck; + var componentStack = JSCompiler_object_inline_digest_2296.cstck; } - JSCompiler_object_inline_message_2286 = message; - JSCompiler_object_inline_digest_2287 = JSCompiler_temp; - JSCompiler_object_inline_stack_2288 = instance; - JSCompiler_object_inline_componentStack_2289 = componentStack; - JSCompiler_object_inline_message_2286 = - JSCompiler_object_inline_message_2286 - ? Error(JSCompiler_object_inline_message_2286) + JSCompiler_object_inline_message_2295 = message; + JSCompiler_object_inline_digest_2296 = JSCompiler_temp; + JSCompiler_object_inline_stack_2297 = instance; + JSCompiler_object_inline_componentStack_2298 = componentStack; + JSCompiler_object_inline_message_2295 = + JSCompiler_object_inline_message_2295 + ? Error(JSCompiler_object_inline_message_2295) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2286.stack = - JSCompiler_object_inline_stack_2288 || ""; - JSCompiler_object_inline_message_2286.digest = - JSCompiler_object_inline_digest_2287; - JSCompiler_object_inline_digest_2287 = - void 0 === JSCompiler_object_inline_componentStack_2289 + JSCompiler_object_inline_message_2295.stack = + JSCompiler_object_inline_stack_2297 || ""; + JSCompiler_object_inline_message_2295.digest = + JSCompiler_object_inline_digest_2296; + JSCompiler_object_inline_digest_2296 = + void 0 === JSCompiler_object_inline_componentStack_2298 ? null - : JSCompiler_object_inline_componentStack_2289; - "string" === typeof JSCompiler_object_inline_digest_2287 && + : JSCompiler_object_inline_componentStack_2298; + "string" === typeof JSCompiler_object_inline_digest_2296 && CapturedStacks.set( - JSCompiler_object_inline_message_2286, - JSCompiler_object_inline_digest_2287 + JSCompiler_object_inline_message_2295, + JSCompiler_object_inline_digest_2296 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2286, + value: JSCompiler_object_inline_message_2295, source: null, - stack: JSCompiler_object_inline_digest_2287 + stack: JSCompiler_object_inline_digest_2296 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8892,25 +8873,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_digest_2287 = + (JSCompiler_object_inline_digest_2296 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2287) + didReceiveUpdate || JSCompiler_object_inline_digest_2296) ) { - JSCompiler_object_inline_digest_2287 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2287) { - JSCompiler_object_inline_stack_2288 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2288 & 42)) - JSCompiler_object_inline_stack_2288 = 1; + JSCompiler_object_inline_digest_2296 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2296) { + JSCompiler_object_inline_stack_2297 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2297 & 42)) + JSCompiler_object_inline_stack_2297 = 1; else - switch (JSCompiler_object_inline_stack_2288) { + switch (JSCompiler_object_inline_stack_2297) { case 2: - JSCompiler_object_inline_stack_2288 = 1; + JSCompiler_object_inline_stack_2297 = 1; break; case 8: - JSCompiler_object_inline_stack_2288 = 4; + JSCompiler_object_inline_stack_2297 = 4; break; case 32: - JSCompiler_object_inline_stack_2288 = 16; + JSCompiler_object_inline_stack_2297 = 16; break; case 128: case 256: @@ -8931,40 +8912,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2288 = 64; + JSCompiler_object_inline_stack_2297 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2288 = 134217728; + JSCompiler_object_inline_stack_2297 = 134217728; break; default: - JSCompiler_object_inline_stack_2288 = 0; + JSCompiler_object_inline_stack_2297 = 0; } - JSCompiler_object_inline_stack_2288 = + JSCompiler_object_inline_stack_2297 = 0 !== - (JSCompiler_object_inline_stack_2288 & - (JSCompiler_object_inline_digest_2287.suspendedLanes | + (JSCompiler_object_inline_stack_2297 & + (JSCompiler_object_inline_digest_2296.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2288; + : JSCompiler_object_inline_stack_2297; if ( - 0 !== JSCompiler_object_inline_stack_2288 && - JSCompiler_object_inline_stack_2288 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2297 && + JSCompiler_object_inline_stack_2297 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2288), + ((prevState.retryLane = JSCompiler_object_inline_stack_2297), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2288 + JSCompiler_object_inline_stack_2297 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2287, + JSCompiler_object_inline_digest_2296, current, - JSCompiler_object_inline_stack_2288 + JSCompiler_object_inline_stack_2297 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2286.data === + JSCompiler_object_inline_message_2295.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8972,7 +8953,7 @@ renderLanes ); } else - JSCompiler_object_inline_message_2286.data === + JSCompiler_object_inline_message_2295.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -8980,12 +8961,12 @@ null, current )), - (JSCompiler_object_inline_message_2286._reactRetry = + (JSCompiler_object_inline_message_2295._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2286.nextSibling + JSCompiler_object_inline_message_2295.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9003,57 +8984,57 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2288.children + JSCompiler_object_inline_stack_2297.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2289) + if (JSCompiler_object_inline_componentStack_2298) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2289 = - JSCompiler_object_inline_stack_2288.fallback), - (JSCompiler_object_inline_message_2286 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2298 = + JSCompiler_object_inline_stack_2297.fallback), + (JSCompiler_object_inline_message_2295 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2288 = createWorkInProgress( + (JSCompiler_object_inline_stack_2297 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2288.children + children: JSCompiler_object_inline_stack_2297.children } )), - (JSCompiler_object_inline_stack_2288.subtreeFlags = + (JSCompiler_object_inline_stack_2297.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2289 = + ? (JSCompiler_object_inline_componentStack_2298 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2289 + JSCompiler_object_inline_componentStack_2298 )) - : ((JSCompiler_object_inline_componentStack_2289 = + : ((JSCompiler_object_inline_componentStack_2298 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2289, - JSCompiler_object_inline_message_2286, + JSCompiler_object_inline_componentStack_2298, + JSCompiler_object_inline_message_2295, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2289.flags |= 2)), - (JSCompiler_object_inline_componentStack_2289.return = + (JSCompiler_object_inline_componentStack_2298.flags |= 2)), + (JSCompiler_object_inline_componentStack_2298.return = workInProgress), - (JSCompiler_object_inline_stack_2288.return = workInProgress), - (JSCompiler_object_inline_stack_2288.sibling = - JSCompiler_object_inline_componentStack_2289), - (workInProgress.child = JSCompiler_object_inline_stack_2288), - (JSCompiler_object_inline_stack_2288 = - JSCompiler_object_inline_componentStack_2289), - (JSCompiler_object_inline_componentStack_2289 = workInProgress.child), - (JSCompiler_object_inline_message_2286 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2286 - ? (JSCompiler_object_inline_message_2286 = + (JSCompiler_object_inline_stack_2297.return = workInProgress), + (JSCompiler_object_inline_stack_2297.sibling = + JSCompiler_object_inline_componentStack_2298), + (workInProgress.child = JSCompiler_object_inline_stack_2297), + (JSCompiler_object_inline_stack_2297 = + JSCompiler_object_inline_componentStack_2298), + (JSCompiler_object_inline_componentStack_2298 = workInProgress.child), + (JSCompiler_object_inline_message_2295 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2295 + ? (JSCompiler_object_inline_message_2295 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2286.cachePool), + JSCompiler_object_inline_message_2295.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9061,37 +9042,37 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2286 = { + (JSCompiler_object_inline_message_2295 = { baseLanes: - JSCompiler_object_inline_message_2286.baseLanes | renderLanes, + JSCompiler_object_inline_message_2295.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2289.memoizedState = - JSCompiler_object_inline_message_2286), - (JSCompiler_object_inline_componentStack_2289.childLanes = + (JSCompiler_object_inline_componentStack_2298.memoizedState = + JSCompiler_object_inline_message_2295), + (JSCompiler_object_inline_componentStack_2298.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2287, + JSCompiler_object_inline_digest_2296, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2288 + JSCompiler_object_inline_stack_2297 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2288.children + children: JSCompiler_object_inline_stack_2297.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2287 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2287 + ((JSCompiler_object_inline_digest_2296 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2296 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2287.push(current)); + : JSCompiler_object_inline_digest_2296.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11034,7 +11015,12 @@ } else ref.current = null; } - function commitProfiler(finishedWork, current, commitTime, effectDuration) { + function commitProfiler( + finishedWork, + current, + commitStartTime, + effectDuration + ) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit; @@ -11048,20 +11034,20 @@ finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, - commitTime + commitStartTime ); "function" === typeof onCommit && onCommit( finishedWork.memoizedProps.id, current, effectDuration, - commitTime + commitStartTime ); } function commitProfilerPostCommitImpl( finishedWork, current, - commitTime, + commitStartTime, passiveEffectDuration ) { var _finishedWork$memoize2 = finishedWork.memoizedProps; @@ -11074,7 +11060,7 @@ finishedWork, current, passiveEffectDuration, - commitTime + commitStartTime ); } function commitHostMount(finishedWork) { @@ -11504,7 +11490,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, finishedRoot.effectDuration ); } catch (error) { @@ -12495,7 +12481,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, includeWorkInProgressEffects.effectDuration ); } catch (error) { @@ -12646,7 +12632,7 @@ commitProfilerPostCommitImpl, finishedWork, finishedWork.alternate, - commitTime, + commitStartTime, finishedRoot.passiveEffectDuration ); } catch (error) { @@ -13419,8 +13405,7 @@ workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -14217,8 +14202,7 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if ( @@ -14260,198 +14244,188 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } - function performConcurrentWorkOnRoot(root, didTimeout) { - nestedUpdateScheduled = currentUpdateIsNested = !1; + function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; var shouldTimeSlice = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout; - didTimeout = shouldTimeSlice - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (didTimeout !== RootInProgress) { + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { var renderWasConcurrent = shouldTimeSlice; - do { - if (didTimeout === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - shouldTimeSlice = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(shouldTimeSlice) - ) { - didTimeout = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (didTimeout === RootErrored) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (didTimeout = recoverFromConcurrentError( - root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - didTimeout !== RootErrored) - ) - continue; - } - if (didTimeout === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (didTimeout) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( + exitStatus, + errorRetryLanes$jscomp$0 + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; break a; } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); + } + exitStatus = errorRetryLanes$jscomp$0; } - renderWasConcurrent.finishedWork = shouldTimeSlice; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - else { - if ( - (lanes & 62914560) === lanes && - ((didTimeout = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < didTimeout) - ) { + if (exitStatus !== RootErrored) continue; + } + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), - didTimeout + workInProgressDeferredLane ); break a; } - commitRootWhenReady( - renderWasConcurrent, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now$1()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; - } - function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (errorRetryLanes !== RootErrored) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes), - RootSuspendedWithDelay - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -14471,10 +14445,16 @@ spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), @@ -14490,10 +14470,13 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + SUSPENDED_COMMIT, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -14503,7 +14486,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -14552,80 +14538,24 @@ (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings - ) { + function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + expirationTimes[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } - function performSyncWorkOnRoot(root, lanes) { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) - throw Error("Should not already be working."); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - currentUpdateIsNested = nestedUpdateScheduled; - nestedUpdateScheduled = !1; - var exitStatus = renderRootSync(root, lanes); - if (exitStatus === RootErrored) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (exitStatus === RootFatalErrored) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (exitStatus === RootDidNotComplete) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; - } function flushSyncWork$1() { return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -14663,8 +14593,9 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -14790,8 +14721,7 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function renderRootSync(root, lanes) { @@ -14815,37 +14745,38 @@ } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$8) { handleThrow(root, thrownValue$8); @@ -14856,15 +14787,12 @@ executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -14888,7 +14816,7 @@ workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); - } + } else checkIfRootIsPrerendering(root, lanes); markRenderStarted(lanes); a: do try { @@ -15213,7 +15141,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -15228,13 +15159,15 @@ previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -15242,9 +15175,7 @@ transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -15273,14 +15204,7 @@ root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + markRootFinished(root, lanes, remainingLanes, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -15292,38 +15216,38 @@ (pendingPassiveEffectsRemainingLanes = remainingLanes), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); + commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = ReactDOMSharedInternals.p), - (ReactDOMSharedInternals.p = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - (commitTime = now()), - commitMutationEffects(root, finishedWork, lanes), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (ReactDOMSharedInternals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : ((root.current = finishedWork), (commitTime = now())); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = ReactDOMSharedInternals.p; + ReactDOMSharedInternals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffects(root, finishedWork, lanes); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = prevExecutionContext; + ReactDOMSharedInternals.p = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -15789,7 +15713,8 @@ root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -15880,8 +15805,6 @@ else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -15894,7 +15817,7 @@ default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), (suspendedLanes = fakeActCallbackNode)) @@ -15903,6 +15826,34 @@ root.callbackNode = suspendedLanes; return currentTime; } + function performWorkOnRootViaSchedulerTask(root, didTimeout) { + nestedUpdateScheduled = currentUpdateIsNested = !1; + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = + workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot( + root, + workInProgressRootRenderLanes$jscomp$0, + didTimeout + ); + scheduleTaskForRootDuringMicrotask(root, now$1()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; + } + function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + currentUpdateIsNested = nestedUpdateScheduled; + nestedUpdateScheduled = !1; + performWorkOnRoot(root, lanes, !0); + } function cancelCallback(callbackNode) { callbackNode !== fakeActCallbackNode && null !== callbackNode && @@ -22143,7 +22094,8 @@ StrictEffectsMode = 16, NoStrictPassiveEffectsMode = 64, now = Scheduler.unstable_now, - commitTime = -0, + renderStartTime = -0, + commitStartTime = -0, profilerStartTime = -1.1, profilerEffectDuration = -0, currentUpdateIsNested = !1, @@ -23921,15 +23873,18 @@ pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, pendingPassiveTransitions = null, - NESTED_UPDATE_LIMIT = 50, + NESTED_UPDATE_LIMIT = 100, nestedUpdateCount = 0, rootWithNestedUpdates = null, isFlushingPassiveEffects = !1, didScheduleUpdateDuringPassiveEffects = !1, - NESTED_PASSIVE_UPDATE_LIMIT = 50, + NESTED_PASSIVE_UPDATE_LIMIT = 100, nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, isRunningInsertionEffect = !1, + IMMEDIATE_COMMIT = 0, + SUSPENDED_COMMIT = 1, + THROTTLED_COMMIT = 2, didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = !1; var didWarnAboutUpdateInRenderForAnotherComponent = new Set(); @@ -24474,11 +24429,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24515,11 +24470,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-rc-5d19e1c8-20240923", + version: "19.0.0-rc-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-5d19e1c8-20240923" + reconcilerVersion: "19.0.0-rc-778e1ed2-20240926" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24663,7 +24618,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js index dede7168330ff..a5534e93c4f43 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js @@ -595,43 +595,39 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -673,11 +669,6 @@ function computeExpirationTime(lane, currentTime) { return -1; } } -function getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; -} function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -694,14 +685,7 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes -) { +function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; @@ -711,36 +695,31 @@ function markRootFinished( root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index$7 = 31 - clz32(remainingLanes), - lane = 1 << index$7; - entanglements[index$7] = 0; - expirationTimes[index$7] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$7]; + var index$6 = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index$6; + finishedLanes[index$6] = 0; + expirationTimes[index$6] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$6]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$7] = null, index$7 = 0; - index$7 < hiddenUpdatesForLane.length; - index$7++ + hiddenUpdates[index$6] = null, index$6 = 0; + index$6 < hiddenUpdatesForLane.length; + index$6++ ) { - var update = hiddenUpdatesForLane[index$7]; + var update = hiddenUpdatesForLane[index$6]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -755,10 +734,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$8 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$8; - (lane & entangledLanes) | (root[index$8] & entangledLanes) && - (root[index$8] |= entangledLanes); + var index$7 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$7; + (lane & entangledLanes) | (root[index$7] & entangledLanes) && + (root[index$7] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -908,8 +887,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$10 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$10 && "aria-" !== prefix$10) { + var prefix$9 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$9 && "aria-" !== prefix$9) { node.removeAttribute(name); return; } @@ -1242,15 +1221,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$16 in styles) - (styleName = styles[styleName$16]), - styles.hasOwnProperty(styleName$16) && - prevStyles[styleName$16] !== styleName && - setValueForStyle(node, styleName$16, styleName); + for (var styleName$15 in styles) + (styleName = styles[styleName$15]), + styles.hasOwnProperty(styleName$15) && + prevStyles[styleName$15] !== styleName && + setValueForStyle(node, styleName$15, styleName); } else - for (var styleName$17 in styles) - styles.hasOwnProperty(styleName$17) && - setValueForStyle(node, styleName$17, styles[styleName$17]); + for (var styleName$16 in styles) + styles.hasOwnProperty(styleName$16) && + setValueForStyle(node, styleName$16, styles[styleName$16]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1981,14 +1960,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$278; if (canUseDOM) { - var isSupported$jscomp$inline_414 = "oninput" in document; - if (!isSupported$jscomp$inline_414) { - var element$jscomp$inline_415 = document.createElement("div"); - element$jscomp$inline_415.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_414 = - "function" === typeof element$jscomp$inline_415.oninput; + var isSupported$jscomp$inline_413 = "oninput" in document; + if (!isSupported$jscomp$inline_413) { + var element$jscomp$inline_414 = document.createElement("div"); + element$jscomp$inline_414.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_413 = + "function" === typeof element$jscomp$inline_414.oninput; } - JSCompiler_inline_result$jscomp$278 = isSupported$jscomp$inline_414; + JSCompiler_inline_result$jscomp$278 = isSupported$jscomp$inline_413; } else JSCompiler_inline_result$jscomp$278 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$278 && @@ -3893,7 +3872,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$54 = !1; + didReadFromEntangledAsyncAction$53 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3914,11 +3893,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$54 = !0); + (didReadFromEntangledAsyncAction$53 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$54 = !0); + (didReadFromEntangledAsyncAction$53 = !0); continue; } else (updateLane = { @@ -3964,7 +3943,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$54 && + didReadFromEntangledAsyncAction$53 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4162,8 +4141,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$60) { - onActionError(actionQueue, node, error$60); + } catch (error$59) { + onActionError(actionQueue, node, error$59); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4590,10 +4569,10 @@ function refreshCache(fiber) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$63 = enqueueUpdate(provider, fiber, lane); - null !== root$63 && - (scheduleUpdateOnFiber(root$63, provider, lane), - entangleTransitions(root$63, provider, lane)); + var root$62 = enqueueUpdate(provider, fiber, lane); + null !== root$62 && + (scheduleUpdateOnFiber(root$62, provider, lane), + entangleTransitions(root$62, provider, lane)); provider = { cache: createCache() }; fiber.payload = provider; return; @@ -5112,9 +5091,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$67 in Component) - void 0 === newProps[propName$67] && - (newProps[propName$67] = Component[propName$67]); + for (var propName$66 in Component) + void 0 === newProps[propName$66] && + (newProps[propName$66] = Component[propName$66]); } return newProps; } @@ -5160,9 +5139,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$68) { + } catch (e$67) { setTimeout(function () { - throw e$68; + throw e$67; }); } } @@ -5173,9 +5152,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$69) { + } catch (e$68) { setTimeout(function () { - throw e$69; + throw e$68; }); } } @@ -7575,8 +7554,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$112) { - captureCommitPhaseError(current, nearestMountedAncestor, error$112); + } catch (error$111) { + captureCommitPhaseError(current, nearestMountedAncestor, error$111); } else ref.current = null; } @@ -7710,7 +7689,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$20) { + } catch (e$19) { JSCompiler_temp = null; break a; } @@ -7872,11 +7851,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$111) { + } catch (error$110) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$111 + error$110 ); } } @@ -8030,7 +8009,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$119 = hostParentIsContainer; + var prevHostParentIsContainer$118 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8038,7 +8017,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$119; + hostParentIsContainer = prevHostParentIsContainer$118; if (null !== hostParent) if (hostParentIsContainer) try { @@ -8666,21 +8645,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$113 = JSCompiler_inline_result.stateNode; + var parent$112 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$113, ""), + (setTextContent(parent$112, ""), (JSCompiler_inline_result.flags &= -33)); - var before$114 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$114, parent$113); + var before$113 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$113, parent$112); break; case 3: case 4: - var parent$115 = JSCompiler_inline_result.stateNode.containerInfo, - before$116 = getHostSibling(finishedWork); + var parent$114 = JSCompiler_inline_result.stateNode.containerInfo, + before$115 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$116, - parent$115 + before$115, + parent$114 ); break; default: @@ -9577,8 +9556,7 @@ function scheduleRetryEffect(workInProgress, retryQueue) { workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -9595,14 +9573,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$131 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$131 = lastTailNode), + for (var lastTailNode$130 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$130 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$131 + null === lastTailNode$130 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$131.sibling = null); + : (lastTailNode$130.sibling = null); } } function bubbleProperties(completedWork) { @@ -9612,19 +9590,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$132 = completedWork.child; null !== child$132; ) - (newChildLanes |= child$132.lanes | child$132.childLanes), - (subtreeFlags |= child$132.subtreeFlags & 31457280), - (subtreeFlags |= child$132.flags & 31457280), - (child$132.return = completedWork), - (child$132 = child$132.sibling); + for (var child$131 = completedWork.child; null !== child$131; ) + (newChildLanes |= child$131.lanes | child$131.childLanes), + (subtreeFlags |= child$131.subtreeFlags & 31457280), + (subtreeFlags |= child$131.flags & 31457280), + (child$131.return = completedWork), + (child$131 = child$131.sibling); else - for (child$132 = completedWork.child; null !== child$132; ) - (newChildLanes |= child$132.lanes | child$132.childLanes), - (subtreeFlags |= child$132.subtreeFlags), - (subtreeFlags |= child$132.flags), - (child$132.return = completedWork), - (child$132 = child$132.sibling); + for (child$131 = completedWork.child; null !== child$131; ) + (newChildLanes |= child$131.lanes | child$131.childLanes), + (subtreeFlags |= child$131.subtreeFlags), + (subtreeFlags |= child$131.flags), + (child$131.return = completedWork), + (child$131 = child$131.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -9901,11 +9879,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$144 = null; + var cache$143 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$144 = newProps.memoizedState.cachePool.pool); - cache$144 !== type && (newProps.flags |= 2048); + (cache$143 = newProps.memoizedState.cachePool.pool); + cache$143 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -9930,8 +9908,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$144 = type.rendering; - if (null === cache$144) + cache$143 = type.rendering; + if (null === cache$143) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -9939,11 +9917,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$144 = findFirstSuspended(current); - if (null !== cache$144) { + cache$143 = findFirstSuspended(current); + if (null !== cache$143) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$144.updateQueue; + current = cache$143.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -9968,7 +9946,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$144)), null !== current)) { + if (((current = findFirstSuspended(cache$143)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -9978,7 +9956,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$144.alternate && + !cache$143.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -9991,13 +9969,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$144.sibling = workInProgress.child), - (workInProgress.child = cache$144)) + ? ((cache$143.sibling = workInProgress.child), + (workInProgress.child = cache$143)) : ((current = type.last), null !== current - ? (current.sibling = cache$144) - : (workInProgress.child = cache$144), - (type.last = cache$144)); + ? (current.sibling = cache$143) + : (workInProgress.child = cache$143), + (type.last = cache$143)); } if (null !== type.tail) return ( @@ -10222,8 +10200,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10234,179 +10211,159 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } -function performConcurrentWorkOnRoot(root, didTimeout) { +function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; var shouldTimeSlice = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout; - didTimeout = shouldTimeSlice - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (0 !== didTimeout) { + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { var renderWasConcurrent = shouldTimeSlice; - do { - if (6 === didTimeout) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - shouldTimeSlice = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(shouldTimeSlice) - ) { - didTimeout = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === didTimeout) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (didTimeout = recoverFromConcurrentError( + if (0 === exitStatus) break; + else if (6 === exitStatus) markRootSuspended(root$jscomp$0, lanes, 0); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), + (JSCompiler_inline_result = + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - 2 !== didTimeout) - ) - continue; - } - if (1 === didTimeout) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (didTimeout) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; break a; } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); + } + exitStatus = JSCompiler_inline_result; } - renderWasConcurrent.finishedWork = shouldTimeSlice; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - ((didTimeout = globalMostRecentFallbackTime + 300 - now()), - 10 < didTimeout) - ) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + switch (exitStatus) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), - didTimeout - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { + markRootSuspended(shouldTimeSlice, lanes, workInProgressDeferredLane); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } - ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; -} -function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes -) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (2 !== errorRetryLanes) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes), - 4 - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; + } + break; + } while (1); + ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -10426,10 +10383,16 @@ function commitRootWhenReady( spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), @@ -10445,10 +10408,13 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + 1, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -10458,7 +10424,10 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -10504,77 +10473,24 @@ function markRootUpdated(root, updatedLanes) { : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings -) { +function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$6 = 31 - clz32(lanes), - lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5; + expirationTimes[index$5] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } -function performSyncWorkOnRoot(root, lanes) { - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - var exitStatus = renderRootSync(root, lanes); - if (2 === exitStatus) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (1 === exitStatus) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (6 === exitStatus) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -10612,8 +10528,9 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -10632,9 +10549,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$4 = 31 - clz32(allEntangledLanes), - lane = 1 << index$4; - lanes |= root[index$4]; + var index$3 = 31 - clz32(allEntangledLanes), + lane = 1 << index$3; + lanes |= root[index$3]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -10704,8 +10621,7 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function renderRootSync(root, lanes) { @@ -10716,6 +10632,7 @@ function renderRootSync(root, lanes) { if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10724,21 +10641,26 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$159) { handleThrow(root, thrownValue$159); @@ -10749,11 +10671,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -10763,10 +10685,11 @@ function renderRootConcurrent(root, lanes) { executionContext |= 2; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11006,7 +10929,10 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -11021,13 +10947,15 @@ function commitRoot( previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -11035,9 +10963,7 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -11053,14 +10979,7 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + markRootFinished(root, lanes, remainingLanes, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -11072,29 +10991,29 @@ function commitRootImpl( (pendingPassiveEffectsRemainingLanes = remainingLanes), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = ReactDOMSharedInternals.p), - (ReactDOMSharedInternals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (ReactDOMSharedInternals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = ReactDOMSharedInternals.p; + ReactDOMSharedInternals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffectsOnFiber(finishedWork, root); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = prevExecutionContext; + ReactDOMSharedInternals.p = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -11296,7 +11215,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { retryTimedOutBoundary(boundaryFiber, retryLane); } function throwIfInfiniteUpdateLoopDetected() { - if (50 < nestedUpdateCount) + if (100 < nestedUpdateCount) throw ( ((nestedUpdateCount = 0), (rootWithNestedUpdates = null), @@ -11360,7 +11279,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$167, root$167 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$167, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$167, JSCompiler_inline_result)); root$167 = root$167.next; @@ -11404,12 +11324,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5, - expirationTime = expirationTimes[index$5]; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4, + expirationTime = expirationTimes[index$4]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$5] = computeExpirationTime(lane, currentTime); + expirationTimes[index$4] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -11446,8 +11366,6 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { null !== pingedLanes && cancelCallback$1(pingedLanes); switch (lanesToEventPriority(suspendedLanes)) { case 2: - suspendedLanes = ImmediatePriority; - break; case 8: suspendedLanes = UserBlockingPriority; break; @@ -11460,12 +11378,32 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); root.callbackPriority = currentTime; root.callbackNode = suspendedLanes; return currentTime; } +function performWorkOnRootViaSchedulerTask(root, didTimeout) { + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout); + scheduleTaskForRootDuringMicrotask(root, now()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; +} +function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + performWorkOnRoot(root, lanes, !0); +} function scheduleImmediateTask(cb) { scheduleMicrotask(function () { 0 !== (executionContext & 6) @@ -11573,20 +11511,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1411 = 0; - i$jscomp$inline_1411 < simpleEventPluginEvents.length; - i$jscomp$inline_1411++ + var i$jscomp$inline_1417 = 0; + i$jscomp$inline_1417 < simpleEventPluginEvents.length; + i$jscomp$inline_1417++ ) { - var eventName$jscomp$inline_1412 = - simpleEventPluginEvents[i$jscomp$inline_1411], - domEventName$jscomp$inline_1413 = - eventName$jscomp$inline_1412.toLowerCase(), - capitalizedEvent$jscomp$inline_1414 = - eventName$jscomp$inline_1412[0].toUpperCase() + - eventName$jscomp$inline_1412.slice(1); + var eventName$jscomp$inline_1418 = + simpleEventPluginEvents[i$jscomp$inline_1417], + domEventName$jscomp$inline_1419 = + eventName$jscomp$inline_1418.toLowerCase(), + capitalizedEvent$jscomp$inline_1420 = + eventName$jscomp$inline_1418[0].toUpperCase() + + eventName$jscomp$inline_1418.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1413, - "on" + capitalizedEvent$jscomp$inline_1414 + domEventName$jscomp$inline_1419, + "on" + capitalizedEvent$jscomp$inline_1420 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15027,16 +14965,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1658 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1664 = React.version; if ( - "19.0.0-rc-5d19e1c8-20240923" !== - isomorphicReactPackageVersion$jscomp$inline_1658 + "19.0.0-rc-778e1ed2-20240926" !== + isomorphicReactPackageVersion$jscomp$inline_1664 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1658, - "19.0.0-rc-5d19e1c8-20240923" + isomorphicReactPackageVersion$jscomp$inline_1664, + "19.0.0-rc-778e1ed2-20240926" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15056,25 +14994,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2124 = { +var internals$jscomp$inline_2135 = { bundleType: 0, - version: "19.0.0-rc-5d19e1c8-20240923", + version: "19.0.0-rc-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-5d19e1c8-20240923" + reconcilerVersion: "19.0.0-rc-778e1ed2-20240926" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2125 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2136 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2125.isDisabled && - hook$jscomp$inline_2125.supportsFiber + !hook$jscomp$inline_2136.isDisabled && + hook$jscomp$inline_2136.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2125.inject( - internals$jscomp$inline_2124 + (rendererID = hook$jscomp$inline_2136.inject( + internals$jscomp$inline_2135 )), - (injectedHook = hook$jscomp$inline_2125); + (injectedHook = hook$jscomp$inline_2136); } catch (err) {} } exports.createRoot = function (container, options) { @@ -15166,4 +15104,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js index 40a3092689065..4249be1de375a 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js @@ -1006,43 +1006,39 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1089,14 +1085,6 @@ ); } } - function getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; - } function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -1117,9 +1105,7 @@ root, finishedLanes, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; @@ -1130,17 +1116,17 @@ root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; + var index = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index; + finishedLanes[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -1152,14 +1138,9 @@ var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -8644,32 +8625,32 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2292; - var JSCompiler_object_inline_stack_2293 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2301; + var JSCompiler_object_inline_stack_2302 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2294 = !1; + var JSCompiler_object_inline_componentStack_2303 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2292 = didSuspend) || - (JSCompiler_object_inline_digest_2292 = + (JSCompiler_object_inline_digest_2301 = didSuspend) || + (JSCompiler_object_inline_digest_2301 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2292 && - ((JSCompiler_object_inline_componentStack_2294 = !0), + JSCompiler_object_inline_digest_2301 && + ((JSCompiler_object_inline_componentStack_2303 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2292 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2301 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2294 + JSCompiler_object_inline_componentStack_2303 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2291 = nextHydratableInstance; + var JSCompiler_object_inline_message_2300 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2291)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2300)) { c: { - var instance = JSCompiler_object_inline_message_2291; + var instance = JSCompiler_object_inline_message_2300; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8710,19 +8691,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2291 + JSCompiler_object_inline_message_2300 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2291 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2300 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2291 && - ((JSCompiler_object_inline_message_2291 = - JSCompiler_object_inline_message_2291.dehydrated), - null !== JSCompiler_object_inline_message_2291) + null !== JSCompiler_object_inline_message_2300 && + ((JSCompiler_object_inline_message_2300 = + JSCompiler_object_inline_message_2300.dehydrated), + null !== JSCompiler_object_inline_message_2300) ) return ( - JSCompiler_object_inline_message_2291.data === + JSCompiler_object_inline_message_2300.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8730,58 +8711,58 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2291 = - JSCompiler_object_inline_stack_2293.children; - JSCompiler_object_inline_stack_2293 = - JSCompiler_object_inline_stack_2293.fallback; - if (JSCompiler_object_inline_componentStack_2294) + JSCompiler_object_inline_message_2300 = + JSCompiler_object_inline_stack_2302.children; + JSCompiler_object_inline_stack_2302 = + JSCompiler_object_inline_stack_2302.fallback; + if (JSCompiler_object_inline_componentStack_2303) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2294 = + (JSCompiler_object_inline_componentStack_2303 = workInProgress.mode), - (JSCompiler_object_inline_message_2291 = + (JSCompiler_object_inline_message_2300 = mountWorkInProgressOffscreenFiber( { mode: "hidden", - children: JSCompiler_object_inline_message_2291 + children: JSCompiler_object_inline_message_2300 }, - JSCompiler_object_inline_componentStack_2294 + JSCompiler_object_inline_componentStack_2303 )), - (JSCompiler_object_inline_stack_2293 = createFiberFromFragment( - JSCompiler_object_inline_stack_2293, - JSCompiler_object_inline_componentStack_2294, + (JSCompiler_object_inline_stack_2302 = createFiberFromFragment( + JSCompiler_object_inline_stack_2302, + JSCompiler_object_inline_componentStack_2303, renderLanes, null )), - (JSCompiler_object_inline_message_2291.return = workInProgress), - (JSCompiler_object_inline_stack_2293.return = workInProgress), - (JSCompiler_object_inline_message_2291.sibling = - JSCompiler_object_inline_stack_2293), - (workInProgress.child = JSCompiler_object_inline_message_2291), - (JSCompiler_object_inline_componentStack_2294 = + (JSCompiler_object_inline_message_2300.return = workInProgress), + (JSCompiler_object_inline_stack_2302.return = workInProgress), + (JSCompiler_object_inline_message_2300.sibling = + JSCompiler_object_inline_stack_2302), + (workInProgress.child = JSCompiler_object_inline_message_2300), + (JSCompiler_object_inline_componentStack_2303 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2294.memoizedState = + (JSCompiler_object_inline_componentStack_2303.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2294.childLanes = + (JSCompiler_object_inline_componentStack_2303.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2292, + JSCompiler_object_inline_digest_2301, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2293 + JSCompiler_object_inline_stack_2302 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2291 + JSCompiler_object_inline_message_2300 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2291 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2291) + ((JSCompiler_object_inline_message_2300 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2300) ) { if (didSuspend) workInProgress.flags & 256 @@ -8798,94 +8779,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2294 = - JSCompiler_object_inline_stack_2293.fallback), - (JSCompiler_object_inline_message_2291 = workInProgress.mode), - (JSCompiler_object_inline_stack_2293 = + (JSCompiler_object_inline_componentStack_2303 = + JSCompiler_object_inline_stack_2302.fallback), + (JSCompiler_object_inline_message_2300 = workInProgress.mode), + (JSCompiler_object_inline_stack_2302 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2293.children + children: JSCompiler_object_inline_stack_2302.children }, - JSCompiler_object_inline_message_2291 + JSCompiler_object_inline_message_2300 )), - (JSCompiler_object_inline_componentStack_2294 = + (JSCompiler_object_inline_componentStack_2303 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2294, - JSCompiler_object_inline_message_2291, + JSCompiler_object_inline_componentStack_2303, + JSCompiler_object_inline_message_2300, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2294.flags |= 2), - (JSCompiler_object_inline_stack_2293.return = workInProgress), - (JSCompiler_object_inline_componentStack_2294.return = + (JSCompiler_object_inline_componentStack_2303.flags |= 2), + (JSCompiler_object_inline_stack_2302.return = workInProgress), + (JSCompiler_object_inline_componentStack_2303.return = workInProgress), - (JSCompiler_object_inline_stack_2293.sibling = - JSCompiler_object_inline_componentStack_2294), - (workInProgress.child = JSCompiler_object_inline_stack_2293), + (JSCompiler_object_inline_stack_2302.sibling = + JSCompiler_object_inline_componentStack_2303), + (workInProgress.child = JSCompiler_object_inline_stack_2302), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2293 = workInProgress.child), - (JSCompiler_object_inline_stack_2293.memoizedState = + (JSCompiler_object_inline_stack_2302 = workInProgress.child), + (JSCompiler_object_inline_stack_2302.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2293.childLanes = + (JSCompiler_object_inline_stack_2302.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2292, + JSCompiler_object_inline_digest_2301, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2294)); + JSCompiler_object_inline_componentStack_2303)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2291.data === + JSCompiler_object_inline_message_2300.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2292 = - JSCompiler_object_inline_message_2291.nextSibling && - JSCompiler_object_inline_message_2291.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2292) { - JSCompiler_temp = JSCompiler_object_inline_digest_2292.dgst; - var message = JSCompiler_object_inline_digest_2292.msg; - instance = JSCompiler_object_inline_digest_2292.stck; - var componentStack = JSCompiler_object_inline_digest_2292.cstck; + JSCompiler_object_inline_digest_2301 = + JSCompiler_object_inline_message_2300.nextSibling && + JSCompiler_object_inline_message_2300.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2301) { + JSCompiler_temp = JSCompiler_object_inline_digest_2301.dgst; + var message = JSCompiler_object_inline_digest_2301.msg; + instance = JSCompiler_object_inline_digest_2301.stck; + var componentStack = JSCompiler_object_inline_digest_2301.cstck; } - JSCompiler_object_inline_message_2291 = message; - JSCompiler_object_inline_digest_2292 = JSCompiler_temp; - JSCompiler_object_inline_stack_2293 = instance; - JSCompiler_object_inline_componentStack_2294 = componentStack; - JSCompiler_object_inline_message_2291 = - JSCompiler_object_inline_message_2291 - ? Error(JSCompiler_object_inline_message_2291) + JSCompiler_object_inline_message_2300 = message; + JSCompiler_object_inline_digest_2301 = JSCompiler_temp; + JSCompiler_object_inline_stack_2302 = instance; + JSCompiler_object_inline_componentStack_2303 = componentStack; + JSCompiler_object_inline_message_2300 = + JSCompiler_object_inline_message_2300 + ? Error(JSCompiler_object_inline_message_2300) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2291.stack = - JSCompiler_object_inline_stack_2293 || ""; - JSCompiler_object_inline_message_2291.digest = - JSCompiler_object_inline_digest_2292; - JSCompiler_object_inline_digest_2292 = - void 0 === JSCompiler_object_inline_componentStack_2294 + JSCompiler_object_inline_message_2300.stack = + JSCompiler_object_inline_stack_2302 || ""; + JSCompiler_object_inline_message_2300.digest = + JSCompiler_object_inline_digest_2301; + JSCompiler_object_inline_digest_2301 = + void 0 === JSCompiler_object_inline_componentStack_2303 ? null - : JSCompiler_object_inline_componentStack_2294; - "string" === typeof JSCompiler_object_inline_digest_2292 && + : JSCompiler_object_inline_componentStack_2303; + "string" === typeof JSCompiler_object_inline_digest_2301 && CapturedStacks.set( - JSCompiler_object_inline_message_2291, - JSCompiler_object_inline_digest_2292 + JSCompiler_object_inline_message_2300, + JSCompiler_object_inline_digest_2301 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2291, + value: JSCompiler_object_inline_message_2300, source: null, - stack: JSCompiler_object_inline_digest_2292 + stack: JSCompiler_object_inline_digest_2301 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8900,25 +8881,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_digest_2292 = + (JSCompiler_object_inline_digest_2301 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2292) + didReceiveUpdate || JSCompiler_object_inline_digest_2301) ) { - JSCompiler_object_inline_digest_2292 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2292) { - JSCompiler_object_inline_stack_2293 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2293 & 42)) - JSCompiler_object_inline_stack_2293 = 1; + JSCompiler_object_inline_digest_2301 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2301) { + JSCompiler_object_inline_stack_2302 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2302 & 42)) + JSCompiler_object_inline_stack_2302 = 1; else - switch (JSCompiler_object_inline_stack_2293) { + switch (JSCompiler_object_inline_stack_2302) { case 2: - JSCompiler_object_inline_stack_2293 = 1; + JSCompiler_object_inline_stack_2302 = 1; break; case 8: - JSCompiler_object_inline_stack_2293 = 4; + JSCompiler_object_inline_stack_2302 = 4; break; case 32: - JSCompiler_object_inline_stack_2293 = 16; + JSCompiler_object_inline_stack_2302 = 16; break; case 128: case 256: @@ -8939,40 +8920,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2293 = 64; + JSCompiler_object_inline_stack_2302 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2293 = 134217728; + JSCompiler_object_inline_stack_2302 = 134217728; break; default: - JSCompiler_object_inline_stack_2293 = 0; + JSCompiler_object_inline_stack_2302 = 0; } - JSCompiler_object_inline_stack_2293 = + JSCompiler_object_inline_stack_2302 = 0 !== - (JSCompiler_object_inline_stack_2293 & - (JSCompiler_object_inline_digest_2292.suspendedLanes | + (JSCompiler_object_inline_stack_2302 & + (JSCompiler_object_inline_digest_2301.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2293; + : JSCompiler_object_inline_stack_2302; if ( - 0 !== JSCompiler_object_inline_stack_2293 && - JSCompiler_object_inline_stack_2293 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2302 && + JSCompiler_object_inline_stack_2302 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2293), + ((prevState.retryLane = JSCompiler_object_inline_stack_2302), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2293 + JSCompiler_object_inline_stack_2302 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2292, + JSCompiler_object_inline_digest_2301, current, - JSCompiler_object_inline_stack_2293 + JSCompiler_object_inline_stack_2302 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2291.data === + JSCompiler_object_inline_message_2300.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8980,7 +8961,7 @@ renderLanes ); } else - JSCompiler_object_inline_message_2291.data === + JSCompiler_object_inline_message_2300.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -8988,12 +8969,12 @@ null, current )), - (JSCompiler_object_inline_message_2291._reactRetry = + (JSCompiler_object_inline_message_2300._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2291.nextSibling + JSCompiler_object_inline_message_2300.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9011,57 +8992,57 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2293.children + JSCompiler_object_inline_stack_2302.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2294) + if (JSCompiler_object_inline_componentStack_2303) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2294 = - JSCompiler_object_inline_stack_2293.fallback), - (JSCompiler_object_inline_message_2291 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2303 = + JSCompiler_object_inline_stack_2302.fallback), + (JSCompiler_object_inline_message_2300 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2293 = createWorkInProgress( + (JSCompiler_object_inline_stack_2302 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2293.children + children: JSCompiler_object_inline_stack_2302.children } )), - (JSCompiler_object_inline_stack_2293.subtreeFlags = + (JSCompiler_object_inline_stack_2302.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2294 = + ? (JSCompiler_object_inline_componentStack_2303 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2294 + JSCompiler_object_inline_componentStack_2303 )) - : ((JSCompiler_object_inline_componentStack_2294 = + : ((JSCompiler_object_inline_componentStack_2303 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2294, - JSCompiler_object_inline_message_2291, + JSCompiler_object_inline_componentStack_2303, + JSCompiler_object_inline_message_2300, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2294.flags |= 2)), - (JSCompiler_object_inline_componentStack_2294.return = + (JSCompiler_object_inline_componentStack_2303.flags |= 2)), + (JSCompiler_object_inline_componentStack_2303.return = workInProgress), - (JSCompiler_object_inline_stack_2293.return = workInProgress), - (JSCompiler_object_inline_stack_2293.sibling = - JSCompiler_object_inline_componentStack_2294), - (workInProgress.child = JSCompiler_object_inline_stack_2293), - (JSCompiler_object_inline_stack_2293 = - JSCompiler_object_inline_componentStack_2294), - (JSCompiler_object_inline_componentStack_2294 = workInProgress.child), - (JSCompiler_object_inline_message_2291 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2291 - ? (JSCompiler_object_inline_message_2291 = + (JSCompiler_object_inline_stack_2302.return = workInProgress), + (JSCompiler_object_inline_stack_2302.sibling = + JSCompiler_object_inline_componentStack_2303), + (workInProgress.child = JSCompiler_object_inline_stack_2302), + (JSCompiler_object_inline_stack_2302 = + JSCompiler_object_inline_componentStack_2303), + (JSCompiler_object_inline_componentStack_2303 = workInProgress.child), + (JSCompiler_object_inline_message_2300 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2300 + ? (JSCompiler_object_inline_message_2300 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2291.cachePool), + JSCompiler_object_inline_message_2300.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9069,37 +9050,37 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2291 = { + (JSCompiler_object_inline_message_2300 = { baseLanes: - JSCompiler_object_inline_message_2291.baseLanes | renderLanes, + JSCompiler_object_inline_message_2300.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2294.memoizedState = - JSCompiler_object_inline_message_2291), - (JSCompiler_object_inline_componentStack_2294.childLanes = + (JSCompiler_object_inline_componentStack_2303.memoizedState = + JSCompiler_object_inline_message_2300), + (JSCompiler_object_inline_componentStack_2303.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2292, + JSCompiler_object_inline_digest_2301, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2293 + JSCompiler_object_inline_stack_2302 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2293.children + children: JSCompiler_object_inline_stack_2302.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2292 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2292 + ((JSCompiler_object_inline_digest_2301 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2301 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2292.push(current)); + : JSCompiler_object_inline_digest_2301.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11042,7 +11023,12 @@ } else ref.current = null; } - function commitProfiler(finishedWork, current, commitTime, effectDuration) { + function commitProfiler( + finishedWork, + current, + commitStartTime, + effectDuration + ) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit; @@ -11056,20 +11042,20 @@ finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, - commitTime + commitStartTime ); "function" === typeof onCommit && onCommit( finishedWork.memoizedProps.id, current, effectDuration, - commitTime + commitStartTime ); } function commitProfilerPostCommitImpl( finishedWork, current, - commitTime, + commitStartTime, passiveEffectDuration ) { var _finishedWork$memoize2 = finishedWork.memoizedProps; @@ -11082,7 +11068,7 @@ finishedWork, current, passiveEffectDuration, - commitTime + commitStartTime ); } function commitHostMount(finishedWork) { @@ -11512,7 +11498,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, finishedRoot.effectDuration ); } catch (error) { @@ -12503,7 +12489,7 @@ commitProfiler, finishedWork, current, - commitTime, + commitStartTime, includeWorkInProgressEffects.effectDuration ); } catch (error) { @@ -12654,7 +12640,7 @@ commitProfilerPostCommitImpl, finishedWork, finishedWork.alternate, - commitTime, + commitStartTime, finishedRoot.passiveEffectDuration ); } catch (error) { @@ -13427,8 +13413,7 @@ workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -14225,8 +14210,7 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if ( @@ -14268,198 +14252,188 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } - function performConcurrentWorkOnRoot(root, didTimeout) { - nestedUpdateScheduled = currentUpdateIsNested = !1; + function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; var shouldTimeSlice = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout; - didTimeout = shouldTimeSlice - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (didTimeout !== RootInProgress) { + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { var renderWasConcurrent = shouldTimeSlice; - do { - if (didTimeout === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - shouldTimeSlice = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(shouldTimeSlice) - ) { - didTimeout = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (didTimeout === RootErrored) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (didTimeout = recoverFromConcurrentError( - root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - didTimeout !== RootErrored) - ) - continue; - } - if (didTimeout === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (didTimeout) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( + exitStatus, + errorRetryLanes$jscomp$0 + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; break a; } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); + } + exitStatus = errorRetryLanes$jscomp$0; } - renderWasConcurrent.finishedWork = shouldTimeSlice; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - else { - if ( - (lanes & 62914560) === lanes && - ((didTimeout = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < didTimeout) - ) { + if (exitStatus !== RootErrored) continue; + } + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), - didTimeout + workInProgressDeferredLane ); break a; } - commitRootWhenReady( - renderWasConcurrent, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now$1()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; - } - function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (errorRetryLanes !== RootErrored) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes), - RootSuspendedWithDelay - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -14479,10 +14453,16 @@ spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, @@ -14502,10 +14482,13 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + SUSPENDED_COMMIT, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -14515,7 +14498,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -14564,80 +14550,24 @@ (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings - ) { + function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + expirationTimes[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } - function performSyncWorkOnRoot(root, lanes) { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) - throw Error("Should not already be working."); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - currentUpdateIsNested = nestedUpdateScheduled; - nestedUpdateScheduled = !1; - var exitStatus = renderRootSync(root, lanes); - if (exitStatus === RootErrored) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (exitStatus === RootFatalErrored) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (exitStatus === RootDidNotComplete) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; - } function flushSyncWork$1() { return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -14675,8 +14605,9 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -14802,8 +14733,7 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function renderRootSync(root, lanes) { @@ -14827,37 +14757,38 @@ } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$8) { handleThrow(root, thrownValue$8); @@ -14868,15 +14799,12 @@ executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -14900,7 +14828,7 @@ workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); - } + } else checkIfRootIsPrerendering(root, lanes); markRenderStarted(lanes); a: do try { @@ -15225,7 +15153,10 @@ didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -15240,13 +15171,15 @@ previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -15254,9 +15187,7 @@ transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -15285,14 +15216,7 @@ root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + markRootFinished(root, lanes, remainingLanes, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -15304,38 +15228,38 @@ (pendingPassiveEffectsRemainingLanes = remainingLanes), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); + commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = ReactDOMSharedInternals.p), - (ReactDOMSharedInternals.p = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - (commitTime = now()), - commitMutationEffects(root, finishedWork, lanes), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (ReactDOMSharedInternals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : ((root.current = finishedWork), (commitTime = now())); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = ReactDOMSharedInternals.p; + ReactDOMSharedInternals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffects(root, finishedWork, lanes); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = prevExecutionContext; + ReactDOMSharedInternals.p = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -15801,7 +15725,8 @@ root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -15892,8 +15817,6 @@ else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -15906,7 +15829,7 @@ default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), (suspendedLanes = fakeActCallbackNode)) @@ -15915,6 +15838,34 @@ root.callbackNode = suspendedLanes; return currentTime; } + function performWorkOnRootViaSchedulerTask(root, didTimeout) { + nestedUpdateScheduled = currentUpdateIsNested = !1; + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = + workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot( + root, + workInProgressRootRenderLanes$jscomp$0, + didTimeout + ); + scheduleTaskForRootDuringMicrotask(root, now$1()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; + } + function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + currentUpdateIsNested = nestedUpdateScheduled; + nestedUpdateScheduled = !1; + performWorkOnRoot(root, lanes, !0); + } function cancelCallback(callbackNode) { callbackNode !== fakeActCallbackNode && null !== callbackNode && @@ -22200,7 +22151,8 @@ StrictEffectsMode = 16, NoStrictPassiveEffectsMode = 64, now = Scheduler.unstable_now, - commitTime = -0, + renderStartTime = -0, + commitStartTime = -0, profilerStartTime = -1.1, profilerEffectDuration = -0, currentUpdateIsNested = !1, @@ -23978,15 +23930,18 @@ pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, pendingPassiveTransitions = null, - NESTED_UPDATE_LIMIT = 50, + NESTED_UPDATE_LIMIT = 100, nestedUpdateCount = 0, rootWithNestedUpdates = null, isFlushingPassiveEffects = !1, didScheduleUpdateDuringPassiveEffects = !1, - NESTED_PASSIVE_UPDATE_LIMIT = 50, + NESTED_PASSIVE_UPDATE_LIMIT = 100, nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, isRunningInsertionEffect = !1, + IMMEDIATE_COMMIT = 0, + SUSPENDED_COMMIT = 1, + THROTTLED_COMMIT = 2, didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = !1; var didWarnAboutUpdateInRenderForAnotherComponent = new Set(); @@ -24531,11 +24486,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24572,11 +24527,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-rc-5d19e1c8-20240923", + version: "19.0.0-rc-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-5d19e1c8-20240923" + reconcilerVersion: "19.0.0-rc-778e1ed2-20240926" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25050,7 +25005,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js index fe190f362124f..083f0901ebf77 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js @@ -664,43 +664,39 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -742,11 +738,6 @@ function computeExpirationTime(lane, currentTime) { return -1; } } -function getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) { - if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0; - root = root.pendingLanes & -536870913; - return 0 !== root ? root : root & 536870912 ? 536870912 : 0; -} function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; @@ -763,14 +754,7 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes -) { +function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; @@ -780,36 +764,31 @@ function markRootFinished( root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index$7 = 31 - clz32(remainingLanes), - lane = 1 << index$7; - entanglements[index$7] = 0; - expirationTimes[index$7] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$7]; + var index$6 = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index$6; + finishedLanes[index$6] = 0; + expirationTimes[index$6] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$6]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$7] = null, index$7 = 0; - index$7 < hiddenUpdatesForLane.length; - index$7++ + hiddenUpdates[index$6] = null, index$6 = 0; + index$6 < hiddenUpdatesForLane.length; + index$6++ ) { - var update = hiddenUpdatesForLane[index$7]; + var update = hiddenUpdatesForLane[index$6]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -824,19 +803,19 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$8 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$8; - (lane & entangledLanes) | (root[index$8] & entangledLanes) && - (root[index$8] |= entangledLanes); + var index$7 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$7; + (lane & entangledLanes) | (root[index$7] & entangledLanes) && + (root[index$7] |= entangledLanes); rootEntangledLanes &= ~lane; } } function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index$10 = 31 - clz32(lanes), - lane = 1 << index$10; - root[index$10].add(fiber); + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + root[index$9].add(fiber); lanes &= ~lane; } } @@ -848,16 +827,16 @@ function movePendingFibersToMemoized(root, lanes) { 0 < lanes; ) { - var index$11 = 31 - clz32(lanes); - root = 1 << index$11; - index$11 = pendingUpdatersLaneMap[index$11]; - 0 < index$11.size && - (index$11.forEach(function (fiber) { + var index$10 = 31 - clz32(lanes); + root = 1 << index$10; + index$10 = pendingUpdatersLaneMap[index$10]; + 0 < index$10.size && + (index$10.forEach(function (fiber) { var alternate = fiber.alternate; (null !== alternate && memoizedUpdaters.has(alternate)) || memoizedUpdaters.add(fiber); }), - index$11.clear()); + index$10.clear()); lanes &= ~root; } } @@ -1007,8 +986,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$12 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$12 && "aria-" !== prefix$12) { + var prefix$11 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$11 && "aria-" !== prefix$11) { node.removeAttribute(name); return; } @@ -1341,15 +1320,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$18 in styles) - (styleName = styles[styleName$18]), - styles.hasOwnProperty(styleName$18) && - prevStyles[styleName$18] !== styleName && - setValueForStyle(node, styleName$18, styleName); + for (var styleName$17 in styles) + (styleName = styles[styleName$17]), + styles.hasOwnProperty(styleName$17) && + prevStyles[styleName$17] !== styleName && + setValueForStyle(node, styleName$17, styleName); } else - for (var styleName$19 in styles) - styles.hasOwnProperty(styleName$19) && - setValueForStyle(node, styleName$19, styles[styleName$19]); + for (var styleName$18 in styles) + styles.hasOwnProperty(styleName$18) && + setValueForStyle(node, styleName$18, styles[styleName$18]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -2080,14 +2059,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$294; if (canUseDOM) { - var isSupported$jscomp$inline_431 = "oninput" in document; - if (!isSupported$jscomp$inline_431) { - var element$jscomp$inline_432 = document.createElement("div"); - element$jscomp$inline_432.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_431 = - "function" === typeof element$jscomp$inline_432.oninput; + var isSupported$jscomp$inline_430 = "oninput" in document; + if (!isSupported$jscomp$inline_430) { + var element$jscomp$inline_431 = document.createElement("div"); + element$jscomp$inline_431.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_430 = + "function" === typeof element$jscomp$inline_431.oninput; } - JSCompiler_inline_result$jscomp$294 = isSupported$jscomp$inline_431; + JSCompiler_inline_result$jscomp$294 = isSupported$jscomp$inline_430; } else JSCompiler_inline_result$jscomp$294 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$294 && @@ -2507,7 +2486,7 @@ function getRootForUpdatedFiber(sourceFiber) { } var emptyContextObject = {}, now = Scheduler.unstable_now, - commitTime = -0, + commitStartTime = -0, profilerStartTime = -1.1, profilerEffectDuration = -0; function pushNestedEffectDurations() { @@ -4046,7 +4025,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$56 = !1; + didReadFromEntangledAsyncAction$55 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -4067,11 +4046,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$56 = !0); + (didReadFromEntangledAsyncAction$55 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$56 = !0); + (didReadFromEntangledAsyncAction$55 = !0); continue; } else (updateLane = { @@ -4117,7 +4096,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$56 && + didReadFromEntangledAsyncAction$55 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4315,8 +4294,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$62) { - onActionError(actionQueue, node, error$62); + } catch (error$61) { + onActionError(actionQueue, node, error$61); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4743,10 +4722,10 @@ function refreshCache(fiber) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$65 = enqueueUpdate(provider, fiber, lane); - null !== root$65 && - (scheduleUpdateOnFiber(root$65, provider, lane), - entangleTransitions(root$65, provider, lane)); + var root$64 = enqueueUpdate(provider, fiber, lane); + null !== root$64 && + (scheduleUpdateOnFiber(root$64, provider, lane), + entangleTransitions(root$64, provider, lane)); provider = { cache: createCache() }; fiber.payload = provider; return; @@ -5273,9 +5252,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$69 in Component) - void 0 === newProps[propName$69] && - (newProps[propName$69] = Component[propName$69]); + for (var propName$68 in Component) + void 0 === newProps[propName$68] && + (newProps[propName$68] = Component[propName$68]); } return newProps; } @@ -5321,9 +5300,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$70) { + } catch (e$69) { setTimeout(function () { - throw e$70; + throw e$69; }); } } @@ -5334,9 +5313,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$71) { + } catch (e$70) { setTimeout(function () { - throw e$71; + throw e$70; }); } } @@ -7829,8 +7808,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$117) { - captureCommitPhaseError(current, nearestMountedAncestor, error$117); + } catch (error$116) { + captureCommitPhaseError(current, nearestMountedAncestor, error$116); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -7890,15 +7869,15 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$118) { - captureCommitPhaseError(current, nearestMountedAncestor, error$118); + } catch (error$117) { + captureCommitPhaseError(current, nearestMountedAncestor, error$117); } else ref.current = null; } function commitProfilerUpdate( finishedWork, current, - commitTime, + commitStartTime, effectDuration ) { try { @@ -7915,14 +7894,14 @@ function commitProfilerUpdate( finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, - commitTime + commitStartTime ); "function" === typeof onCommit && onCommit( finishedWork.memoizedProps.id, current, effectDuration, - commitTime + commitStartTime ); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -8060,7 +8039,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$22) { + } catch (e$21) { JSCompiler_temp = null; break a; } @@ -8216,11 +8195,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$114) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$114 + error$113 ); } else { @@ -8237,11 +8216,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$115) { + } catch (error$114) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$115 + error$114 ); } recordEffectDuration(); @@ -8252,11 +8231,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$116) { + } catch (error$115) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$116 + error$115 ); } } @@ -8304,7 +8283,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { commitProfilerUpdate( finishedWork, current, - commitTime, + commitStartTime, finishedRoot.effectDuration )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -8423,7 +8402,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$126 = hostParentIsContainer; + var prevHostParentIsContainer$125 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8431,7 +8410,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$126; + hostParentIsContainer = prevHostParentIsContainer$125; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9074,21 +9053,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$119 = JSCompiler_inline_result.stateNode; + var parent$118 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$119, ""), + (setTextContent(parent$118, ""), (JSCompiler_inline_result.flags &= -33)); - var before$120 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$120, parent$119); + var before$119 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$119, parent$118); break; case 3: case 4: - var parent$121 = JSCompiler_inline_result.stateNode.containerInfo, - before$122 = getHostSibling(finishedWork); + var parent$120 = JSCompiler_inline_result.stateNode.containerInfo, + before$121 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$122, - parent$121 + before$121, + parent$120 ); break; default: @@ -9248,7 +9227,7 @@ function recursivelyTraverseReappearLayoutEffects( commitProfilerUpdate( finishedWork, current, - commitTime, + commitStartTime, finishedRoot.effectDuration )) : recursivelyTraverseReappearLayoutEffects( @@ -9385,7 +9364,7 @@ function commitPassiveMountOnFiber( id, phase, finishedRoot.passiveEffectDuration, - commitTime + commitStartTime ); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -10032,8 +10011,7 @@ function scheduleRetryEffect(workInProgress, retryQueue) { workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -10050,14 +10028,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$141 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$141 = lastTailNode), + for (var lastTailNode$140 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$140 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$141 + null === lastTailNode$140 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$141.sibling = null); + : (lastTailNode$140.sibling = null); } } function bubbleProperties(completedWork) { @@ -10069,53 +10047,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$143 = completedWork.selfBaseDuration, - child$144 = completedWork.child; - null !== child$144; + var treeBaseDuration$142 = completedWork.selfBaseDuration, + child$143 = completedWork.child; + null !== child$143; ) - (newChildLanes |= child$144.lanes | child$144.childLanes), - (subtreeFlags |= child$144.subtreeFlags & 31457280), - (subtreeFlags |= child$144.flags & 31457280), - (treeBaseDuration$143 += child$144.treeBaseDuration), - (child$144 = child$144.sibling); - completedWork.treeBaseDuration = treeBaseDuration$143; + (newChildLanes |= child$143.lanes | child$143.childLanes), + (subtreeFlags |= child$143.subtreeFlags & 31457280), + (subtreeFlags |= child$143.flags & 31457280), + (treeBaseDuration$142 += child$143.treeBaseDuration), + (child$143 = child$143.sibling); + completedWork.treeBaseDuration = treeBaseDuration$142; } else for ( - treeBaseDuration$143 = completedWork.child; - null !== treeBaseDuration$143; + treeBaseDuration$142 = completedWork.child; + null !== treeBaseDuration$142; ) (newChildLanes |= - treeBaseDuration$143.lanes | treeBaseDuration$143.childLanes), - (subtreeFlags |= treeBaseDuration$143.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$143.flags & 31457280), - (treeBaseDuration$143.return = completedWork), - (treeBaseDuration$143 = treeBaseDuration$143.sibling); + treeBaseDuration$142.lanes | treeBaseDuration$142.childLanes), + (subtreeFlags |= treeBaseDuration$142.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$142.flags & 31457280), + (treeBaseDuration$142.return = completedWork), + (treeBaseDuration$142 = treeBaseDuration$142.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$143 = completedWork.actualDuration; - child$144 = completedWork.selfBaseDuration; + treeBaseDuration$142 = completedWork.actualDuration; + child$143 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$143 += child.actualDuration), - (child$144 += child.treeBaseDuration), + (treeBaseDuration$142 += child.actualDuration), + (child$143 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$143; - completedWork.treeBaseDuration = child$144; + completedWork.actualDuration = treeBaseDuration$142; + completedWork.treeBaseDuration = child$143; } else for ( - treeBaseDuration$143 = completedWork.child; - null !== treeBaseDuration$143; + treeBaseDuration$142 = completedWork.child; + null !== treeBaseDuration$142; ) (newChildLanes |= - treeBaseDuration$143.lanes | treeBaseDuration$143.childLanes), - (subtreeFlags |= treeBaseDuration$143.subtreeFlags), - (subtreeFlags |= treeBaseDuration$143.flags), - (treeBaseDuration$143.return = completedWork), - (treeBaseDuration$143 = treeBaseDuration$143.sibling); + treeBaseDuration$142.lanes | treeBaseDuration$142.childLanes), + (subtreeFlags |= treeBaseDuration$142.subtreeFlags), + (subtreeFlags |= treeBaseDuration$142.flags), + (treeBaseDuration$142.return = completedWork), + (treeBaseDuration$142 = treeBaseDuration$142.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10408,11 +10386,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$159 = null; + var cache$158 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$159 = newProps.memoizedState.cachePool.pool); - cache$159 !== type && (newProps.flags |= 2048); + (cache$158 = newProps.memoizedState.cachePool.pool); + cache$158 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -10442,8 +10420,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$159 = type.rendering; - if (null === cache$159) + cache$158 = type.rendering; + if (null === cache$158) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10451,11 +10429,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$159 = findFirstSuspended(current); - if (null !== cache$159) { + cache$158 = findFirstSuspended(current); + if (null !== cache$158) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$159.updateQueue; + current = cache$158.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10480,7 +10458,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$159)), null !== current)) { + if (((current = findFirstSuspended(cache$158)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10490,7 +10468,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$159.alternate && + !cache$158.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10503,13 +10481,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$159.sibling = workInProgress.child), - (workInProgress.child = cache$159)) + ? ((cache$158.sibling = workInProgress.child), + (workInProgress.child = cache$158)) : ((current = type.last), null !== current - ? (current.sibling = cache$159) - : (workInProgress.child = cache$159), - (type.last = cache$159)); + ? (current.sibling = cache$158) + : (workInProgress.child = cache$158), + (type.last = cache$158)); } if (null !== type.tail) return ( @@ -10743,8 +10721,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10756,180 +10733,159 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } -function performConcurrentWorkOnRoot(root, didTimeout) { - nestedUpdateScheduled = currentUpdateIsNested = !1; +function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var originalCallbackNode = root.callbackNode; - if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) - return null; - var lanes = getNextLanes( - root, - root === workInProgressRoot ? workInProgressRootRenderLanes : 0 - ); - if (0 === lanes) return null; var shouldTimeSlice = - 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout; - didTimeout = shouldTimeSlice - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (0 !== didTimeout) { + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { var renderWasConcurrent = shouldTimeSlice; - do { - if (6 === didTimeout) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - shouldTimeSlice = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(shouldTimeSlice) - ) { - didTimeout = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === didTimeout) { - renderWasConcurrent = lanes; - var errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - renderWasConcurrent - ); - if ( - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (didTimeout = recoverFromConcurrentError( + if (0 === exitStatus) break; + else if (6 === exitStatus) markRootSuspended(root$jscomp$0, lanes, 0); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), + (JSCompiler_inline_result = + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( root, - renderWasConcurrent, - errorRetryLanes - )), - (renderWasConcurrent = !1), - 2 !== didTimeout) - ) - continue; - } - if (1 === didTimeout) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (didTimeout) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; break a; } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); + } + exitStatus = JSCompiler_inline_result; } - renderWasConcurrent.finishedWork = shouldTimeSlice; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - ((didTimeout = globalMostRecentFallbackTime + 300 - now$1()), - 10 < didTimeout) - ) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + switch (exitStatus) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings - ), - didTimeout - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - shouldTimeSlice, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { + markRootSuspended(shouldTimeSlice, lanes, workInProgressDeferredLane); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } - ensureRootIsScheduled(root); - scheduleTaskForRootDuringMicrotask(root, now$1()); - root = - root.callbackNode === originalCallbackNode - ? performConcurrentWorkOnRoot.bind(null, root) - : null; - return root; -} -function recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes -) { - var errorsFromFirstAttempt = workInProgressRootConcurrentErrors, - wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && (prepareFreshStack(root, errorRetryLanes).flags |= 256); - errorRetryLanes = renderRootSync(root, errorRetryLanes); - if (2 !== errorRetryLanes) { - if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) - return ( - (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes), - (workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes), - 4 - ); - root = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorsFromFirstAttempt; - null !== root && queueRecoverableErrors(root); - } - return errorRetryLanes; + } + break; + } while (1); + ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors @@ -10949,10 +10905,16 @@ function commitRootWhenReady( spawnedLane, updatedLanes, suspendedRetryLanes, - didSkipSuspendedSiblings + didSkipSuspendedSiblings, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + didSkipSuspendedSiblings = finishedWork.subtreeFlags; + if ( + didSkipSuspendedSiblings & 8192 || + 16785408 === (didSkipSuspendedSiblings & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop$1 }), accumulateSuspenseyCommitOnFiber(finishedWork), @@ -10968,10 +10930,13 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + 1, + completedRenderStartTime, + completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane); return; } commitRoot( @@ -10981,7 +10946,10 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -11027,79 +10995,24 @@ function markRootUpdated(root, updatedLanes) { : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings -) { +function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$6 = 31 - clz32(lanes), - lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5; + expirationTimes[index$5] = -1; lanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } -function performSyncWorkOnRoot(root, lanes) { - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; - currentUpdateIsNested = nestedUpdateScheduled; - nestedUpdateScheduled = !1; - var exitStatus = renderRootSync(root, lanes); - if (2 === exitStatus) { - var originallyAttemptedLanes = lanes, - errorRetryLanes = getLanesToRetrySynchronouslyOnError( - root, - originallyAttemptedLanes - ); - 0 !== errorRetryLanes && - ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - originallyAttemptedLanes, - errorRetryLanes - ))); - } - if (1 === exitStatus) - return ( - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0, !1), - ensureRootIsScheduled(root), - null - ); - if (6 === exitStatus) - return ( - markRootSuspended( - root, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ), - ensureRootIsScheduled(root), - null - ); - root.finishedWork = root.current.alternate; - root.finishedLanes = lanes; - commitRoot( - root, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes - ); - ensureRootIsScheduled(root); - return null; -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -11137,8 +11050,9 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -11157,9 +11071,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$4 = 31 - clz32(allEntangledLanes), - lane = 1 << index$4; - lanes |= root[index$4]; + var index$3 = 31 - clz32(allEntangledLanes), + lane = 1 << index$3; + lanes |= root[index$3]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -11258,8 +11172,7 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function renderRootSync(root, lanes) { @@ -11280,29 +11193,35 @@ function renderRootSync(root, lanes) { } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$174) { handleThrow(root, thrownValue$174); @@ -11313,12 +11232,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11339,7 +11258,7 @@ function renderRootConcurrent(root, lanes) { workInProgressTransitions = null; workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); - } + } else checkIfRootIsPrerendering(root, lanes); markRenderStarted(lanes); a: do try { @@ -11606,7 +11525,10 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ) { var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = ReactDOMSharedInternals.p; @@ -11621,13 +11543,15 @@ function commitRoot( previousUpdateLanePriority, spawnedLane, updatedLanes, - suspendedRetryLanes + suspendedRetryLanes, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime ); } finally { (ReactSharedInternals.T = prevTransition), (ReactDOMSharedInternals.p = previousUpdateLanePriority); } - return null; } function commitRootImpl( root, @@ -11635,9 +11559,7 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -11656,14 +11578,7 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + markRootFinished(root, lanes, remainingLanes, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -11675,36 +11590,36 @@ function commitRootImpl( (pendingPassiveEffectsRemainingLanes = remainingLanes), (pendingPassiveTransitions = transitions), scheduleCallback$1(NormalPriority$1, function () { - flushPassiveEffects(); + flushPassiveEffects(!0); return null; })); + commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = ReactDOMSharedInternals.p), - (ReactDOMSharedInternals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - commitBeforeMutationEffects(root, finishedWork), - (commitTime = now()), - commitMutationEffects(root, finishedWork, lanes), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (ReactDOMSharedInternals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : ((root.current = finishedWork), (commitTime = now())); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = ReactDOMSharedInternals.p; + ReactDOMSharedInternals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffects(root, finishedWork, lanes); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = prevExecutionContext; + ReactDOMSharedInternals.p = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -11921,7 +11836,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { retryTimedOutBoundary(boundaryFiber, retryLane); } function throwIfInfiniteUpdateLoopDetected() { - if (50 < nestedUpdateCount) + if (100 < nestedUpdateCount) throw ( ((nestedUpdateCount = 0), (rootWithNestedUpdates = null), @@ -11991,7 +11906,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$182, root$182 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$182, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$182, JSCompiler_inline_result)); root$182 = root$182.next; @@ -12035,12 +11951,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5, - expirationTime = expirationTimes[index$5]; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4, + expirationTime = expirationTimes[index$4]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$5] = computeExpirationTime(lane, currentTime); + expirationTimes[index$4] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -12077,8 +11993,6 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { null !== pingedLanes && cancelCallback$1(pingedLanes); switch (lanesToEventPriority(suspendedLanes)) { case 2: - suspendedLanes = ImmediatePriority; - break; case 8: suspendedLanes = UserBlockingPriority; break; @@ -12091,12 +12005,35 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { default: suspendedLanes = NormalPriority$1; } - pingedLanes = performConcurrentWorkOnRoot.bind(null, root); + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); root.callbackPriority = currentTime; root.callbackNode = suspendedLanes; return currentTime; } +function performWorkOnRootViaSchedulerTask(root, didTimeout) { + nestedUpdateScheduled = currentUpdateIsNested = !1; + var originalCallbackNode = root.callbackNode; + if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode) + return null; + var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; + workInProgressRootRenderLanes$jscomp$0 = getNextLanes( + root, + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + ); + if (0 === workInProgressRootRenderLanes$jscomp$0) return null; + performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout); + scheduleTaskForRootDuringMicrotask(root, now$1()); + return root.callbackNode === originalCallbackNode + ? performWorkOnRootViaSchedulerTask.bind(null, root) + : null; +} +function performSyncWorkOnRoot(root, lanes) { + if (flushPassiveEffects()) return null; + currentUpdateIsNested = nestedUpdateScheduled; + nestedUpdateScheduled = !1; + performWorkOnRoot(root, lanes, !0); +} function scheduleImmediateTask(cb) { scheduleMicrotask(function () { 0 !== (executionContext & 6) @@ -12204,20 +12141,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1501 = 0; - i$jscomp$inline_1501 < simpleEventPluginEvents.length; - i$jscomp$inline_1501++ + var i$jscomp$inline_1506 = 0; + i$jscomp$inline_1506 < simpleEventPluginEvents.length; + i$jscomp$inline_1506++ ) { - var eventName$jscomp$inline_1502 = - simpleEventPluginEvents[i$jscomp$inline_1501], - domEventName$jscomp$inline_1503 = - eventName$jscomp$inline_1502.toLowerCase(), - capitalizedEvent$jscomp$inline_1504 = - eventName$jscomp$inline_1502[0].toUpperCase() + - eventName$jscomp$inline_1502.slice(1); + var eventName$jscomp$inline_1507 = + simpleEventPluginEvents[i$jscomp$inline_1506], + domEventName$jscomp$inline_1508 = + eventName$jscomp$inline_1507.toLowerCase(), + capitalizedEvent$jscomp$inline_1509 = + eventName$jscomp$inline_1507[0].toUpperCase() + + eventName$jscomp$inline_1507.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1503, - "on" + capitalizedEvent$jscomp$inline_1504 + domEventName$jscomp$inline_1508, + "on" + capitalizedEvent$jscomp$inline_1509 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15677,16 +15614,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1750 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1755 = React.version; if ( - "19.0.0-rc-5d19e1c8-20240923" !== - isomorphicReactPackageVersion$jscomp$inline_1750 + "19.0.0-rc-778e1ed2-20240926" !== + isomorphicReactPackageVersion$jscomp$inline_1755 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1750, - "19.0.0-rc-5d19e1c8-20240923" + isomorphicReactPackageVersion$jscomp$inline_1755, + "19.0.0-rc-778e1ed2-20240926" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15706,13 +15643,13 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1757 = { +var internals$jscomp$inline_1762 = { bundleType: 0, - version: "19.0.0-rc-5d19e1c8-20240923", + version: "19.0.0-rc-778e1ed2-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-5d19e1c8-20240923", + reconcilerVersion: "19.0.0-rc-778e1ed2-20240926", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$275 = 0; @@ -15730,16 +15667,16 @@ var internals$jscomp$inline_1757 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2181 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2191 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2181.isDisabled && - hook$jscomp$inline_2181.supportsFiber + !hook$jscomp$inline_2191.isDisabled && + hook$jscomp$inline_2191.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2181.inject( - internals$jscomp$inline_1757 + (rendererID = hook$jscomp$inline_2191.inject( + internals$jscomp$inline_1762 )), - (injectedHook = hook$jscomp$inline_2181); + (injectedHook = hook$jscomp$inline_2191); } catch (err) {} } function noop() {} @@ -15992,7 +15929,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js index e5936d293da7c..5bc1f8725f93e 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js @@ -8563,5 +8563,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js index bfc17470f4ddf..7ce294f902a7e 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js @@ -5621,4 +5621,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js index d23525e0471ad..65bf2e61412d2 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js @@ -8563,5 +8563,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js index 8648b8abe4737..1a9e748bc8ede 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js @@ -5699,4 +5699,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js index 0b0ec2dfd3f70..611cb99fbd945 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js @@ -8750,11 +8750,11 @@ didWarnAboutMaps = !1; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); exports.renderToReadableStream = function (children, options) { @@ -8847,5 +8847,5 @@ startWork(request$jscomp$0); }); }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js index 886738c9eca75..b4bd2c7af553e 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js @@ -5910,14 +5910,14 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_730 = React.version; if ( - "19.0.0-rc-5d19e1c8-20240923" !== + "19.0.0-rc-778e1ed2-20240926" !== isomorphicReactPackageVersion$jscomp$inline_730 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_730, - "19.0.0-rc-5d19e1c8-20240923" + "19.0.0-rc-778e1ed2-20240926" ) ); exports.renderToReadableStream = function (children, options) { @@ -6006,4 +6006,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js index 17bd1525a2930..675014e647147 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js @@ -5594,13 +5594,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_734 = React.version; if ( - "19.0.0-rc-5d19e1c8-20240923" !== + "19.0.0-rc-778e1ed2-20240926" !== isomorphicReactPackageVersion$jscomp$inline_734 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_734 + - "\n - react-dom: 19.0.0-rc-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -5688,4 +5688,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js index d46ad5daf2050..54282f5f127c9 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js @@ -8769,11 +8769,11 @@ didWarnAboutMaps = !1; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); exports.renderToReadableStream = function (children, options) { @@ -8877,5 +8877,5 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js index a45426f6020f3..4cd10a78f2802 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js @@ -6004,13 +6004,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_738 = React.version; if ( - "19.0.0-rc-5d19e1c8-20240923" !== + "19.0.0-rc-778e1ed2-20240926" !== isomorphicReactPackageVersion$jscomp$inline_738 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_738 + - "\n - react-dom: 19.0.0-rc-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -6109,4 +6109,4 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js index a7078d069454b..7a9255c0a4c3b 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js @@ -8620,11 +8620,11 @@ didWarnAboutMaps = !1; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-5d19e1c8-20240923" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-778e1ed2-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); exports.renderToPipeableStream = function (children, options) { @@ -8666,5 +8666,5 @@ } }; }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js index d5af938502a79..6a92dc8ea05f1 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js @@ -5626,13 +5626,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_761 = React.version; if ( - "19.0.0-rc-5d19e1c8-20240923" !== + "19.0.0-rc-778e1ed2-20240926" !== isomorphicReactPackageVersion$jscomp$inline_761 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_761 + - "\n - react-dom: 19.0.0-rc-5d19e1c8-20240923\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); function createDrainHandler(destination, request) { return function () { @@ -5934,4 +5934,4 @@ exports.renderToPipeableStream = function (children, options) { } }; }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js index b18bada73cd5c..e1b4e2e681323 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js @@ -416,7 +416,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js index fca3c0b79bc2a..bcc0c04add43a 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js @@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js index 1e0a5ee5c020b..5d8d5ec594208 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js index d1e860cca9295..1c761a754a80d 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-dom/package.json b/packages/next/src/compiled/react-dom/package.json index 0627ac85ded77..b7085be8d070f 100644 --- a/packages/next/src/compiled/react-dom/package.json +++ b/packages/next/src/compiled/react-dom/package.json @@ -67,10 +67,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.25.0-rc-5d19e1c8-20240923" + "scheduler": "0.25.0-rc-778e1ed2-20240926" }, "peerDependencies": { - "react": "19.0.0-rc-5d19e1c8-20240923" + "react": "19.0.0-rc-778e1ed2-20240926" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-experimental/cjs/react.development.js b/packages/next/src/compiled/react-experimental/cjs/react.development.js index adfe3da7b01bc..8a6aeb01bf5c9 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.development.js @@ -1232,7 +1232,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-experimental/cjs/react.production.js b/packages/next/src/compiled/react-experimental/cjs/react.production.js index 49de22e03c415..ea640dc9a60ab 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.production.js @@ -562,4 +562,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js index 52e72ca8405ee..29c14f632ef9c 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js @@ -978,5 +978,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.0.0-experimental-5d19e1c8-20240923"; + exports.version = "19.0.0-experimental-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js index 4504dea11332c..b762863d354c4 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js @@ -567,4 +567,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.0.0-experimental-5d19e1c8-20240923"; +exports.version = "19.0.0-experimental-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react-is/package.json b/packages/next/src/compiled/react-is/package.json index efbc81f019b61..c24af1373dacc 100644 --- a/packages/next/src/compiled/react-is/package.json +++ b/packages/next/src/compiled/react-is/package.json @@ -1,6 +1,6 @@ { "name": "react-is", - "version": "19.0.0-rc-5d19e1c8-20240923", + "version": "19.0.0-rc-778e1ed2-20240926", "description": "Brand checking of React Elements.", "main": "index.js", "sideEffects": false, diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js index 86ffb5d480abc..b2575d8de05ee 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js @@ -1092,17 +1092,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), @@ -2494,10 +2499,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.0.0-experimental-5d19e1c8-20240923", + version: "19.0.0-experimental-778e1ed2-20240926", rendererPackageName: "react-server-dom-turbopack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-experimental-5d19e1c8-20240923", + reconcilerVersion: "19.0.0-experimental-778e1ed2-20240926", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.production.js index 8700544b471d1..f0ff41e81568c 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.production.js @@ -688,15 +688,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.edge.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.edge.development.js index 3f1cad640f710..6ff93eafd9324 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.edge.development.js @@ -1300,17 +1300,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.edge.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.edge.production.js index 879f6eee46526..27beef6e83cdc 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.edge.production.js @@ -851,15 +851,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.node.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.node.development.js index a6c74cfd4893d..4fd90c5b15325 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.node.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.node.development.js @@ -1300,17 +1300,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.node.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.node.production.js index dc8b6851a4dff..966be4694ea1e 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.node.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.node.production.js @@ -852,15 +852,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js index 5dad00f4cce96..e191eddf26cab 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js @@ -1850,6 +1850,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js index 46bbf48ae9648..d35aaca564e0b 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js @@ -1523,6 +1523,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js index 9f1197595520a..10d7b52135a3c 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js @@ -1907,6 +1907,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js index f17d75ca0c93c..bafb4e460b56a 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js @@ -1528,6 +1528,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js index ebb1411c93b7d..f00c6945e615f 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js @@ -1903,6 +1903,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js index 0154cc7d24125..b5d45794c3b49 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js @@ -1542,6 +1542,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json index 5aa4d631c244b..e260c6d163e56 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json @@ -48,7 +48,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "0.0.0-experimental-5d19e1c8-20240923", - "react-dom": "0.0.0-experimental-5d19e1c8-20240923" + "react": "0.0.0-experimental-778e1ed2-20240926", + "react-dom": "0.0.0-experimental-778e1ed2-20240926" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js index 522f4e49903df..f514d1c5b28e5 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js @@ -1108,17 +1108,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), @@ -2294,10 +2299,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.0.0-rc-5d19e1c8-20240923", + version: "19.0.0-rc-778e1ed2-20240926", rendererPackageName: "react-server-dom-turbopack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-rc-5d19e1c8-20240923", + reconcilerVersion: "19.0.0-rc-778e1ed2-20240926", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.js index 473d7b4a3ae92..a2cab896a7f1b 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.js @@ -687,15 +687,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js index e174798a9bf2b..73103e5411e38 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js @@ -1316,17 +1316,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.js index f4c58a33d6d9c..435913724c14f 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.js @@ -850,15 +850,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js index d4f671cfaa6b6..0d03e46523530 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js @@ -1316,17 +1316,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.js index 3c10208e7c61f..ebfb140491e98 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.js @@ -851,15 +851,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js index 7f5599edc04df..9412fc82a4908 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js @@ -1582,6 +1582,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js index 68b64ae53f2b3..c8f8dcf3f6dd3 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js @@ -1437,6 +1437,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js index efb75849aa881..2de6917697524 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js @@ -1599,6 +1599,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js index aa3edfbddc7cd..c51b670753fc1 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js @@ -1442,6 +1442,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js index 3635441716a59..feaa02910e419 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js @@ -1615,6 +1615,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js index c856009746427..451412483fb86 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js @@ -1455,6 +1455,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-turbopack/package.json b/packages/next/src/compiled/react-server-dom-turbopack/package.json index bd029e41b8b32..6e1ce031513dc 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack/package.json @@ -48,7 +48,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "19.0.0-rc-5d19e1c8-20240923", - "react-dom": "19.0.0-rc-5d19e1c8-20240923" + "react": "19.0.0-rc-778e1ed2-20240926", + "react-dom": "19.0.0-rc-778e1ed2-20240926" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js index 937a776e058ec..413f424215da2 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js @@ -1097,17 +1097,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), @@ -2507,10 +2512,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.0.0-experimental-5d19e1c8-20240923", + version: "19.0.0-experimental-778e1ed2-20240926", rendererPackageName: "react-server-dom-webpack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-experimental-5d19e1c8-20240923", + reconcilerVersion: "19.0.0-experimental-778e1ed2-20240926", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.production.js index 5caae01c843af..5e9fb3131031a 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.production.js @@ -698,15 +698,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.edge.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.edge.development.js index e573d9bccfbff..9926673a9ce66 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.edge.development.js @@ -1301,17 +1301,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.edge.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.edge.production.js index 7d1248377cb4f..379be5588c48a 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.edge.production.js @@ -852,15 +852,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.development.js index 8d881e0006140..26568ec942508 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.development.js @@ -1301,17 +1301,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.production.js index 4e2c5f1552c6e..33b33c8e7a9d3 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.production.js @@ -853,15 +853,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.unbundled.development.js index b83ecf9d4f611..5c3b6d8a8e2fb 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.unbundled.development.js @@ -1276,17 +1276,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.unbundled.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.unbundled.production.js index 9bd60529c3603..0b46271364b46 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.unbundled.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.node.unbundled.production.js @@ -832,15 +832,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js index 2ce86b8cd6c77..adfd63037a303 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js @@ -1850,6 +1850,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js index 93b55a6c7774f..507f1bff591e6 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js @@ -1523,6 +1523,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js index 4df5553ac1f75..45f38a29e5243 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js @@ -1907,6 +1907,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js index 9d804423215f1..66cd986cb8b6f 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js @@ -1528,6 +1528,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js index cae7c350bac0e..60c33f50624a6 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js @@ -1903,6 +1903,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js index 97556d6677078..7342f80a6866b 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js @@ -1542,6 +1542,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js index bb4e5874c39fc..27c73a2b9b74a 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js @@ -1903,6 +1903,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js index ea91b1fd97df0..c78253048b9e4 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js @@ -1542,6 +1542,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json index 0e610e256c190..7994131f0a142 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json @@ -64,8 +64,8 @@ "webpack-sources": "^3.2.0" }, "peerDependencies": { - "react": "0.0.0-experimental-5d19e1c8-20240923", - "react-dom": "0.0.0-experimental-5d19e1c8-20240923", + "react": "0.0.0-experimental-778e1ed2-20240926", + "react-dom": "0.0.0-experimental-778e1ed2-20240926", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js index e05286b6976a1..be75e126fe616 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js @@ -1113,17 +1113,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), @@ -2307,10 +2312,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.0.0-rc-5d19e1c8-20240923", + version: "19.0.0-rc-778e1ed2-20240926", rendererPackageName: "react-server-dom-webpack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-rc-5d19e1c8-20240923", + reconcilerVersion: "19.0.0-rc-778e1ed2-20240926", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.js index 3aeb36f755057..dbb05bff6351a 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.js @@ -697,15 +697,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js index dfb1939cdaadb..128d518568bc7 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js @@ -1317,17 +1317,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.js index d932b5ec40950..d37850f831c83 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.js @@ -851,15 +851,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js index 1868544c9e076..76cde1d3f7ef2 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js @@ -1317,17 +1317,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js index dba982993db33..50258515567f2 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js @@ -852,15 +852,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js index cbde5bea52acf..52b18b183411f 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js @@ -1292,17 +1292,22 @@ } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && - null === handler.value && - (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + break; + case "4": + value._owner = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.js index 4a9d065c2846b..bfe9e0469a5a0 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.js @@ -831,15 +831,19 @@ function waitForReference( } value = value[path[i]]; } - parentObject[key] = map(response, value); - "" === key && null === handler.value && (handler.value = parentObject[key]); - parentObject[0] === REACT_ELEMENT_TYPE && - "3" === key && + i = map(response, value); + parentObject[key] = i; + "" === key && null === handler.value && (handler.value = i); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && "object" === typeof handler.value && null !== handler.value && - handler.value.$$typeof === REACT_ELEMENT_TYPE && - null === handler.value.props && - (handler.value.props = parentObject[key]); + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((value = handler.value), key)) { + case "3": + value.props = i; + } handler.deps--; 0 === handler.deps && ((i = handler.chunk), diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js index dfa52a2934125..736c01c78101c 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js @@ -1582,6 +1582,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js index e3caaf10b475c..9f8436e528cb2 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js @@ -1437,6 +1437,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js index 1d036dcaeb91d..4bb05c5c1b019 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js @@ -1599,6 +1599,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js index 77f4dce6c4782..3693cda7d9df4 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js @@ -1442,6 +1442,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js index ffbe637fc5f37..19bc1046a49c6 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js @@ -1615,6 +1615,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js index 4f4cec30a7112..a60144160e89e 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js @@ -1455,6 +1455,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js index fd7f79c0dc876..94042eac2e09a 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js @@ -1615,6 +1615,9 @@ break; case "3": _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; } elementReference.set( value, diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js index 46533f22925d0..cf3c6c75cd473 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js @@ -1455,6 +1455,9 @@ function renderModelDestructive( break; case "3": existingReference = "props"; + break; + case "4": + existingReference = "_owner"; } elementReference.set(value, writtenObjects + ":" + existingReference); } diff --git a/packages/next/src/compiled/react-server-dom-webpack/package.json b/packages/next/src/compiled/react-server-dom-webpack/package.json index 770ea93398082..2944551331953 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack/package.json @@ -64,8 +64,8 @@ "webpack-sources": "^3.2.0" }, "peerDependencies": { - "react": "19.0.0-rc-5d19e1c8-20240923", - "react-dom": "19.0.0-rc-5d19e1c8-20240923", + "react": "19.0.0-rc-778e1ed2-20240926", + "react-dom": "19.0.0-rc-778e1ed2-20240926", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react/cjs/react.development.js b/packages/next/src/compiled/react/cjs/react.development.js index 61ec3d426b287..55ef1fdf232af 100644 --- a/packages/next/src/compiled/react/cjs/react.development.js +++ b/packages/next/src/compiled/react/cjs/react.development.js @@ -1516,7 +1516,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react/cjs/react.production.js b/packages/next/src/compiled/react/cjs/react.production.js index 565023ae300b6..591e107da2fc1 100644 --- a/packages/next/src/compiled/react/cjs/react.production.js +++ b/packages/next/src/compiled/react/cjs/react.production.js @@ -536,4 +536,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/react/cjs/react.react-server.development.js b/packages/next/src/compiled/react/cjs/react.react-server.development.js index ca76e7626ecec..3bf9fe3df577c 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.development.js @@ -1113,5 +1113,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.0.0-rc-5d19e1c8-20240923"; + exports.version = "19.0.0-rc-778e1ed2-20240926"; })(); diff --git a/packages/next/src/compiled/react/cjs/react.react-server.production.js b/packages/next/src/compiled/react/cjs/react.react-server.production.js index 544cd20a5e461..e61ce39588f62 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.production.js @@ -424,4 +424,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.0.0-rc-5d19e1c8-20240923"; +exports.version = "19.0.0-rc-778e1ed2-20240926"; diff --git a/packages/next/src/compiled/unistore/unistore.js b/packages/next/src/compiled/unistore/unistore.js index 5e9eb6e285ff8..d06b59c7ec233 100644 --- a/packages/next/src/compiled/unistore/unistore.js +++ b/packages/next/src/compiled/unistore/unistore.js @@ -1 +1 @@ -(()=>{var t={768:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a{var t={128:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a=18'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: '@types/react': optional: true @@ -10350,7 +10350,7 @@ packages: lucide-react@0.383.0: resolution: {integrity: sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} @@ -12565,28 +12565,28 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-dom@0.0.0-experimental-5d19e1c8-20240923: - resolution: {integrity: sha512-0k45pTmdiI0loGpwbu0V9Wd1wle3iZt9T9yC3Dd6m2xbBxHxl5L8ypIbbQwPPcsVfQLvx7DhRPGs95DAi2ZayA==} + react-dom@0.0.0-experimental-778e1ed2-20240926: + resolution: {integrity: sha512-iuYUtM155fRJxpQEfw24ArX91rvhZ9JCyXoJ3+DUExPvyxvTH8tQaZNDv2Ap7dV15kJJTrblSWSOUqHSnNlFTQ==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 react-dom@17.0.2: resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 - react-dom@19.0.0-rc-5d19e1c8-20240923: - resolution: {integrity: sha512-1O1KWGV/Lmlr1d1RePwiqZOuq2/EZLPpD/9fwlgJer4KKYTr6KlIEPEjC6u1iMQEUvs/r+maxdKSgeHjsNWFfg==} + react-dom@19.0.0-rc-778e1ed2-20240926: + resolution: {integrity: sha512-9FLXiKN8/nxd+TcrjIPKxxWQZVTr4lBbuPIcRly8Ch6FZsTrFmpF3I++0+1HoKDlg4JwPvQ/H3+4OfRpgNn7bQ==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 react-dom@19.0.0-rc-f90a6bcc-20240827: resolution: {integrity: sha512-oUa/reDvGtjRcxi8u+GYHaDHanudaO28+G+Wvxm50CItW1xwIFN2Nn7foJxxDS9lFLGdRWZvjxldZEPAUSuXbg==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 - react-is@19.0.0-rc-5d19e1c8-20240923: - resolution: {integrity: sha512-vX1YsII4H0lgVOgeRvslngSKI86O0Q/VTFanouP34zBqKv5aTnjrBjkSS1bWuyiLPaB6cV+ixBFplAljiHAcOg==} + react-is@19.0.0-rc-778e1ed2-20240926: + resolution: {integrity: sha512-ybXnSjhvDcE+o3/7HTNBNj6YfX+Xr+lUkvHZ375KAlBN6jozgiGhyJG+52SEoRpdERXkPQ2wPgmSStvoOg4w/w==} react-is@19.0.0-rc-f90a6bcc-20240827: resolution: {integrity: sha512-1tXoLFzVbqHAQeY3CwpyF5IYbkwgSoNHhrhS8qOrfiZIh2461h/C1BP/JVIxwyL51wHhUgLsAc/M8g0OcEhV1A==} @@ -12597,8 +12597,8 @@ packages: react-number-format@5.4.0: resolution: {integrity: sha512-NWdICrqLhI7rAS8yUeLVd6Wr4cN7UjJ9IBTS0f/a9i7UB4x4Ti70kGnksBtZ7o4Z7YRbvCMMR/jQmkoOBa/4fg==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926 react-refresh@0.12.0: resolution: {integrity: sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A==} @@ -12609,7 +12609,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: '@types/react': optional: true @@ -12619,58 +12619,58 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: '@types/react': optional: true - react-server-dom-turbopack@0.0.0-experimental-5d19e1c8-20240923: - resolution: {integrity: sha512-IyqOOby4ZHRg2VCJ/wG4wN/+YLhNsjhBd0GrgoroXGYnPPFRmULKZ57wSukBpHdUlAOis6gq014yfEKZoZUoSQ==} + react-server-dom-turbopack@0.0.0-experimental-778e1ed2-20240926: + resolution: {integrity: sha512-xv/x1dxuAmptBazg7NNznUlwi+1hXiOM0UBfGNj977a23ychNzAYfb3RWqtnRDK7dIdvfQP8fBYR9FFL33Ue1g==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926 - react-server-dom-turbopack@19.0.0-rc-5d19e1c8-20240923: - resolution: {integrity: sha512-ueaVIxCVj3RwtOW8I33WfrxHnnuMCaoiinvVBUNKAVBjgm0W4rpb8yPAJR0O6fmY8PG4kBZ+xmD2KQcY+BGSLQ==} + react-server-dom-turbopack@19.0.0-rc-778e1ed2-20240926: + resolution: {integrity: sha512-WOBipbB894RGEgVjrSXeaCd85EJrHRs2s06MlXIMtXAS4yFXpwsnnJrqajCnk8RPU4je3aYAELPT6MZoY3re3g==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926 - react-server-dom-webpack@0.0.0-experimental-5d19e1c8-20240923: - resolution: {integrity: sha512-O5qvoJjPChSnTc56wHvQyPldiAU/MgvOvzUbvUp53PjghokIUx7axJg4pX4/zOY7lbSHbfINQp/EKDNO4jZvyg==} + react-server-dom-webpack@0.0.0-experimental-778e1ed2-20240926: + resolution: {integrity: sha512-qqPkrskmgUQnj9ZNIDKCsrHTSPN3rRtZSCVdCVFU+HF+lPlwqsqcTVJaoHnRn/JlJIzWMfU+OAXmHRdGXmbUww==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926 webpack: 5.90.0 - react-server-dom-webpack@19.0.0-rc-5d19e1c8-20240923: - resolution: {integrity: sha512-hGkbo+YFRNoqw9d/xV3FTHmI2rljBDEsr6z3mI1sH8q4DrUI3gkfPt3lxgy2PwXQtXkEit3Ko72o91gcdIntAg==} + react-server-dom-webpack@19.0.0-rc-778e1ed2-20240926: + resolution: {integrity: sha512-5vBLKb9B2EUi0kqrF0SMu3wwEPwOchyxgsQg0M6EouIW7bE/PX8uV2VWmXzd3+Zm/4TKeGzCsaMPAi8qyBIk7A==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926 webpack: 5.90.0 react-shallow-renderer@16.15.0: resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 react-ssr-prepass@1.0.8: resolution: {integrity: sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - react-is: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-is: 19.0.0-rc-778e1ed2-20240926 react-style-singleton@2.2.1: resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: '@types/react': optional: true @@ -12678,30 +12678,30 @@ packages: react-test-renderer@18.2.0: resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 react-textarea-autosize@8.5.3: resolution: {integrity: sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==} engines: {node: '>=10'} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 react-virtualized@9.22.3: resolution: {integrity: sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926 - react@0.0.0-experimental-5d19e1c8-20240923: - resolution: {integrity: sha512-Gj4QEoaMrdPspWXPXnExlgYEkBFuui6xYW81tswLnguthYhVzR8L8PZ8cppTQqQsklNPoWKWcWNh7YBaLTLoUg==} + react@0.0.0-experimental-778e1ed2-20240926: + resolution: {integrity: sha512-TaWvaisD/bM/tYZmVQNAWS23jS4I2CsBRgEIwF7ByMLotebJMQ+38KnDLDVv28QLesHgErHaJuYKo3/472B/cg==} engines: {node: '>=0.10.0'} react@17.0.2: resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} engines: {node: '>=0.10.0'} - react@19.0.0-rc-5d19e1c8-20240923: - resolution: {integrity: sha512-ZmgGzqPoYKevfJa+BThu1qkvDFFAVYQIbG9oPvAbNk1/4A+wJqplwDT1rhbRZmxV8n67oawoZkf5xAup99cyUA==} + react@19.0.0-rc-778e1ed2-20240926: + resolution: {integrity: sha512-Z0qJs/iVQ+tHmnTa+4jK9kx+GEwDj5GmbqX26CQE6RPx2RCHzpls/o/UeN6IC8xCZL5hQiLcF5dtq3cWo7F8Fg==} engines: {node: '>=0.10.0'} react@19.0.0-rc-f90a6bcc-20240827: @@ -13226,11 +13226,11 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - scheduler@0.0.0-experimental-5d19e1c8-20240923: - resolution: {integrity: sha512-U4lYFxZO7Xm9vrcKhVs/tIV1ea8qQyDAwGOYBRY6y5Ki6NJu012riisAQS7WRb/fsENb0hwjbfgjvpxPNMEELQ==} + scheduler@0.0.0-experimental-778e1ed2-20240926: + resolution: {integrity: sha512-7Rk2AmqBVtnTO3RERI6vxZ/LMtm50MmKCpzIQzAr97dqlXU3HjWlSCa4uADyxTdDBS76GINyw9ZSYKD1slQtig==} - scheduler@0.25.0-rc-5d19e1c8-20240923: - resolution: {integrity: sha512-lyXuqeq6jwl7PPmOBJcqrfbm5qczKdgDTdIc0JYq6nJq0CATvNBSP95s+8TqPwcesmE3t+0jh9W1w6WOAtR7Aw==} + scheduler@0.25.0-rc-778e1ed2-20240926: + resolution: {integrity: sha512-X3XrKE/18iWn/pG0QA9WEx7P1ohOzrddY5Jv8V7tC3U1+mO/eQTn7OjemdWAJ+BOyhbeYZxye5BIOq6Auvo67A==} schema-utils@2.7.1: resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} @@ -13795,8 +13795,8 @@ packages: engines: {node: '>= 16'} peerDependencies: babel-plugin-styled-components: '>= 2' - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: babel-plugin-styled-components: optional: true @@ -13810,7 +13810,7 @@ packages: peerDependencies: '@babel/core': '*' babel-plugin-macros: '*' - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: '@babel/core': optional: true @@ -13887,7 +13887,7 @@ packages: swr@2.2.4: resolution: {integrity: sha512-njiZ/4RiIhoOlAaLYDqwz5qH/KZXVilRLvomrx83HjzCWTfa+InyfAjv05PSFxnmLzZkNO9ZfvgoqzAaEI4sGQ==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 symbol-observable@1.0.1: resolution: {integrity: sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==} @@ -14628,7 +14628,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: '@types/react': optional: true @@ -14636,13 +14636,13 @@ packages: use-composed-ref@1.3.0: resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 use-isomorphic-layout-effect@1.1.2: resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: '@types/react': optional: true @@ -14651,7 +14651,7 @@ packages: resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==} peerDependencies: '@types/react': '*' - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: '@types/react': optional: true @@ -14661,7 +14661,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 peerDependenciesMeta: '@types/react': optional: true @@ -14669,7 +14669,7 @@ packages: use-sync-external-store@1.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -17194,17 +17194,17 @@ snapshots: '@emotion/memoize@0.8.1': {} - '@emotion/react@11.11.1(react@19.0.0-rc-5d19e1c8-20240923)(types-react@19.0.0-rc.0)': + '@emotion/react@11.11.1(react@19.0.0-rc-778e1ed2-20240926)(types-react@19.0.0-rc.0)': dependencies: '@babel/runtime': 7.22.5 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.2 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.0.0-rc-5d19e1c8-20240923) + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.0.0-rc-778e1ed2-20240926) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 hoist-non-react-statics: 3.3.2 - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 optionalDependencies: '@types/react': types-react@19.0.0-rc.0 transitivePeerDependencies: @@ -17222,9 +17222,9 @@ snapshots: '@emotion/unitless@0.8.1': {} - '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.0.0-rc-5d19e1c8-20240923)': + '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.0.0-rc-778e1ed2-20240926)': dependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 '@emotion/utils@1.2.1': {} @@ -18584,11 +18584,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@2.2.1(react@19.0.0-rc-5d19e1c8-20240923)': + '@mdx-js/react@2.2.1(react@19.0.0-rc-778e1ed2-20240926)': dependencies: '@types/mdx': 2.0.3 '@types/react': types-react@19.0.0-rc.0 - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 '@mdx-js/react@2.2.1(react@19.0.0-rc-f90a6bcc-20240827)': dependencies: @@ -19409,13 +19409,13 @@ snapshots: '@types/jest': 29.5.5 jest: 29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0) - '@testing-library/react@15.0.7(react-dom@19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923))(react@19.0.0-rc-5d19e1c8-20240923)(types-react@19.0.0-rc.0)': + '@testing-library/react@15.0.7(react-dom@19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926))(react@19.0.0-rc-778e1ed2-20240926)(types-react@19.0.0-rc.0)': dependencies: '@babel/runtime': 7.22.5 '@testing-library/dom': 10.1.0 '@types/react-dom': types-react-dom@19.0.0-rc.0 - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923) + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926) optionalDependencies: '@types/react': types-react@19.0.0-rc.0 @@ -24360,7 +24360,7 @@ snapshots: hoist-non-react-statics@3.3.2: dependencies: - react-is: 19.0.0-rc-5d19e1c8-20240923 + react-is: 19.0.0-rc-778e1ed2-20240926 homedir-polyfill@1.0.3: dependencies: @@ -28716,25 +28716,25 @@ snapshots: '@jest/types': 24.9.0 ansi-regex: 4.1.0 ansi-styles: 3.2.1 - react-is: 19.0.0-rc-5d19e1c8-20240923 + react-is: 19.0.0-rc-778e1ed2-20240926 pretty-format@27.5.1: dependencies: ansi-regex: 5.0.1 ansi-styles: 5.2.0 - react-is: 19.0.0-rc-5d19e1c8-20240923 + react-is: 19.0.0-rc-778e1ed2-20240926 pretty-format@29.5.0: dependencies: '@jest/schemas': 29.4.3 ansi-styles: 5.2.0 - react-is: 19.0.0-rc-5d19e1c8-20240923 + react-is: 19.0.0-rc-778e1ed2-20240926 pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 19.0.0-rc-5d19e1c8-20240923 + react-is: 19.0.0-rc-778e1ed2-20240926 pretty-ms@7.0.0: dependencies: @@ -28791,7 +28791,7 @@ snapshots: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react-is: 19.0.0-rc-5d19e1c8-20240923 + react-is: 19.0.0-rc-778e1ed2-20240926 property-information@5.6.0: dependencies: @@ -28965,29 +28965,29 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-dom@0.0.0-experimental-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923): + react-dom@0.0.0-experimental-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926): dependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - scheduler: 0.25.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + scheduler: 0.25.0-rc-778e1ed2-20240926 - react-dom@17.0.2(react@19.0.0-rc-5d19e1c8-20240923): + react-dom@17.0.2(react@19.0.0-rc-778e1ed2-20240926): dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react: 19.0.0-rc-5d19e1c8-20240923 - scheduler: 0.25.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + scheduler: 0.25.0-rc-778e1ed2-20240926 - react-dom@19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923): + react-dom@19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926): dependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - scheduler: 0.25.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + scheduler: 0.25.0-rc-778e1ed2-20240926 react-dom@19.0.0-rc-f90a6bcc-20240827(react@19.0.0-rc-f90a6bcc-20240827): dependencies: react: 19.0.0-rc-f90a6bcc-20240827 - scheduler: 0.25.0-rc-5d19e1c8-20240923 + scheduler: 0.25.0-rc-778e1ed2-20240926 - react-is@19.0.0-rc-5d19e1c8-20240923: {} + react-is@19.0.0-rc-778e1ed2-20240926: {} react-is@19.0.0-rc-f90a6bcc-20240827: {} @@ -29020,48 +29020,48 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.0 - react-server-dom-turbopack@0.0.0-experimental-5d19e1c8-20240923(react-dom@19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923))(react@19.0.0-rc-5d19e1c8-20240923): + react-server-dom-turbopack@0.0.0-experimental-778e1ed2-20240926(react-dom@19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926))(react@19.0.0-rc-778e1ed2-20240926): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923) + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926) - react-server-dom-turbopack@19.0.0-rc-5d19e1c8-20240923(react-dom@19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923))(react@19.0.0-rc-5d19e1c8-20240923): + react-server-dom-turbopack@19.0.0-rc-778e1ed2-20240926(react-dom@19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926))(react@19.0.0-rc-778e1ed2-20240926): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923) + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926) - react-server-dom-webpack@0.0.0-experimental-5d19e1c8-20240923(react-dom@19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923))(react@19.0.0-rc-5d19e1c8-20240923)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))): + react-server-dom-webpack@0.0.0-experimental-778e1ed2-20240926(react-dom@19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926))(react@19.0.0-rc-778e1ed2-20240926)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923) + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926) webpack: 5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-server-dom-webpack@19.0.0-rc-5d19e1c8-20240923(react-dom@19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923))(react@19.0.0-rc-5d19e1c8-20240923)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))): + react-server-dom-webpack@19.0.0-rc-778e1ed2-20240926(react-dom@19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926))(react@19.0.0-rc-778e1ed2-20240926)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923) + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926) webpack: 5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-shallow-renderer@16.15.0(react@19.0.0-rc-5d19e1c8-20240923): + react-shallow-renderer@16.15.0(react@19.0.0-rc-778e1ed2-20240926): dependencies: object-assign: 4.1.1 - react: 19.0.0-rc-5d19e1c8-20240923 - react-is: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-is: 19.0.0-rc-778e1ed2-20240926 - react-ssr-prepass@1.0.8(react-is@19.0.0-rc-f90a6bcc-20240827)(react@19.0.0-rc-5d19e1c8-20240923): + react-ssr-prepass@1.0.8(react-is@19.0.0-rc-f90a6bcc-20240827)(react@19.0.0-rc-778e1ed2-20240926): dependencies: object-is: 1.0.2 - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 react-is: 19.0.0-rc-f90a6bcc-20240827 react-style-singleton@2.2.1(react@19.0.0-rc-f90a6bcc-20240827)(types-react@19.0.0-rc.0): @@ -29073,12 +29073,12 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.0 - react-test-renderer@18.2.0(react@19.0.0-rc-5d19e1c8-20240923): + react-test-renderer@18.2.0(react@19.0.0-rc-778e1ed2-20240926): dependencies: - react: 19.0.0-rc-5d19e1c8-20240923 - react-is: 19.0.0-rc-5d19e1c8-20240923 - react-shallow-renderer: 16.15.0(react@19.0.0-rc-5d19e1c8-20240923) - scheduler: 0.25.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 + react-is: 19.0.0-rc-778e1ed2-20240926 + react-shallow-renderer: 16.15.0(react@19.0.0-rc-778e1ed2-20240926) + scheduler: 0.25.0-rc-778e1ed2-20240926 react-textarea-autosize@8.5.3(react@19.0.0-rc-f90a6bcc-20240827)(types-react@19.0.0-rc.0): dependencies: @@ -29089,25 +29089,25 @@ snapshots: transitivePeerDependencies: - '@types/react' - react-virtualized@9.22.3(react-dom@19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923))(react@19.0.0-rc-5d19e1c8-20240923): + react-virtualized@9.22.3(react-dom@19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926))(react@19.0.0-rc-778e1ed2-20240926): dependencies: '@babel/runtime': 7.22.5 clsx: 1.1.1 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923) + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926) react-lifecycles-compat: 3.0.4 - react@0.0.0-experimental-5d19e1c8-20240923: {} + react@0.0.0-experimental-778e1ed2-20240926: {} react@17.0.2: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react@19.0.0-rc-5d19e1c8-20240923: {} + react@19.0.0-rc-778e1ed2-20240926: {} react@19.0.0-rc-f90a6bcc-20240827: {} @@ -29809,9 +29809,9 @@ snapshots: dependencies: xmlchars: 2.2.0 - scheduler@0.0.0-experimental-5d19e1c8-20240923: {} + scheduler@0.0.0-experimental-778e1ed2-20240926: {} - scheduler@0.25.0-rc-5d19e1c8-20240923: {} + scheduler@0.25.0-rc-778e1ed2-20240926: {} schema-utils@2.7.1: dependencies: @@ -30448,7 +30448,7 @@ snapshots: dependencies: inline-style-parser: 0.1.1 - styled-components@6.0.0-rc.3(react-dom@19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923))(react@19.0.0-rc-5d19e1c8-20240923): + styled-components@6.0.0-rc.3(react-dom@19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926))(react@19.0.0-rc-778e1ed2-20240926): dependencies: '@babel/cli': 7.21.5(@babel/core@7.22.5) '@babel/core': 7.22.5 @@ -30463,8 +30463,8 @@ snapshots: '@emotion/unitless': 0.8.1 css-to-react-native: 3.2.0 postcss: 8.4.31 - react: 19.0.0-rc-5d19e1c8-20240923 - react-dom: 19.0.0-rc-5d19e1c8-20240923(react@19.0.0-rc-5d19e1c8-20240923) + react: 19.0.0-rc-778e1ed2-20240926 + react-dom: 19.0.0-rc-778e1ed2-20240926(react@19.0.0-rc-778e1ed2-20240926) shallowequal: 1.1.0 stylis: 4.2.0 tslib: 2.5.3 @@ -30476,10 +30476,10 @@ snapshots: postcss: 7.0.32 postcss-load-plugins: 2.3.0 - styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-5d19e1c8-20240923): + styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-778e1ed2-20240926): dependencies: client-only: 0.0.1 - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 optionalDependencies: '@babel/core': 7.22.5 babel-plugin-macros: 3.1.0 @@ -30569,11 +30569,11 @@ snapshots: picocolors: 1.0.1 stable: 0.1.8 - swr@2.2.4(react@19.0.0-rc-5d19e1c8-20240923): + swr@2.2.4(react@19.0.0-rc-778e1ed2-20240926): dependencies: client-only: 0.0.1 - react: 19.0.0-rc-5d19e1c8-20240923 - use-sync-external-store: 1.2.0(react@19.0.0-rc-5d19e1c8-20240923) + react: 19.0.0-rc-778e1ed2-20240926 + use-sync-external-store: 1.2.0(react@19.0.0-rc-778e1ed2-20240926) symbol-observable@1.0.1: {} @@ -31275,9 +31275,9 @@ snapshots: unist-util-is: 5.2.0 unist-util-visit-parents: 5.1.3 - unistore@3.4.1(react@19.0.0-rc-5d19e1c8-20240923): + unistore@3.4.1(react@19.0.0-rc-778e1ed2-20240926): optionalDependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 universal-github-app-jwt@1.1.1: dependencies: @@ -31395,9 +31395,9 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.0 - use-sync-external-store@1.2.0(react@19.0.0-rc-5d19e1c8-20240923): + use-sync-external-store@1.2.0(react@19.0.0-rc-778e1ed2-20240926): dependencies: - react: 19.0.0-rc-5d19e1c8-20240923 + react: 19.0.0-rc-778e1ed2-20240926 util-deprecate@1.0.2: {} diff --git a/run-tests.js b/run-tests.js index 8a0e6cebb18ec..1c0055d119442 100644 --- a/run-tests.js +++ b/run-tests.js @@ -20,7 +20,7 @@ const { getTestFilter } = require('./test/get-test-filter') // Do not rename or format. sync-react script relies on this line. // prettier-ignore -const nextjsReactPeerVersion = "19.0.0-rc-5d19e1c8-20240923"; +const nextjsReactPeerVersion = "19.0.0-rc-778e1ed2-20240926"; let argv = require('yargs/yargs')(process.argv.slice(2)) .string('type') diff --git a/test/.stats-app/package.json b/test/.stats-app/package.json index f3cbdc2a012f0..bb008c9437928 100644 --- a/test/.stats-app/package.json +++ b/test/.stats-app/package.json @@ -4,8 +4,8 @@ "license": "MIT", "dependencies": { "next": "latest", - "react": "19.0.0-rc-5d19e1c8-20240923", - "react-dom": "19.0.0-rc-5d19e1c8-20240923" + "react": "19.0.0-rc-778e1ed2-20240926", + "react-dom": "19.0.0-rc-778e1ed2-20240926" }, "engines": { "node": ">=18.18.0" diff --git a/test/e2e/next-test/first-time-setup-js/package.json b/test/e2e/next-test/first-time-setup-js/package.json index 25ab27fa9618d..73983616a0de7 100644 --- a/test/e2e/next-test/first-time-setup-js/package.json +++ b/test/e2e/next-test/first-time-setup-js/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-5d19e1c8-20240923", - "react-dom": "19.0.0-rc-5d19e1c8-20240923" + "react": "19.0.0-rc-778e1ed2-20240926", + "react-dom": "19.0.0-rc-778e1ed2-20240926" } } diff --git a/test/e2e/next-test/first-time-setup-ts/package.json b/test/e2e/next-test/first-time-setup-ts/package.json index 216b01d931d3f..f030bcd58f9d2 100644 --- a/test/e2e/next-test/first-time-setup-ts/package.json +++ b/test/e2e/next-test/first-time-setup-ts/package.json @@ -8,8 +8,8 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-5d19e1c8-20240923", - "react-dom": "19.0.0-rc-5d19e1c8-20240923" + "react": "19.0.0-rc-778e1ed2-20240926", + "react-dom": "19.0.0-rc-778e1ed2-20240926" }, "devDependencies": { "@types/react": "^18", diff --git a/test/lib/next-modes/base.ts b/test/lib/next-modes/base.ts index 3097edea97ef6..798214f398c40 100644 --- a/test/lib/next-modes/base.ts +++ b/test/lib/next-modes/base.ts @@ -51,7 +51,7 @@ type OmitFirstArgument = F extends ( // Do not rename or format. sync-react script relies on this line. // prettier-ignore -const nextjsReactPeerVersion = "19.0.0-rc-5d19e1c8-20240923"; +const nextjsReactPeerVersion = "19.0.0-rc-778e1ed2-20240926"; export class NextInstance { protected files: FileRef | { [filename: string]: string | FileRef }