diff --git a/package.json b/package.json index a1084a4d43878c..32af60ad242e43 100644 --- a/package.json +++ b/package.json @@ -197,7 +197,7 @@ "eslint-plugin-jsdoc": "48.0.4", "eslint-plugin-mdx": "3.1.5", "eslint-plugin-react": "7.37.0", - "eslint-plugin-react-hooks": "0.0.0-experimental-f646e8ff-20251104", + "eslint-plugin-react-hooks": "0.0.0-experimental-dd048c3b-20251105", "event-stream": "4.0.1", "execa": "2.0.3", "expect": "29.7.0", @@ -257,16 +257,16 @@ "pretty-ms": "7.0.0", "random-seed": "0.3.0", "react": "19.0.0", - "react-builtin": "npm:react@19.3.0-canary-f646e8ff-20251104", + "react-builtin": "npm:react@19.3.0-canary-dd048c3b-20251105", "react-dom": "19.0.0", - "react-dom-builtin": "npm:react-dom@19.3.0-canary-f646e8ff-20251104", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-f646e8ff-20251104", - "react-experimental-builtin": "npm:react@0.0.0-experimental-f646e8ff-20251104", - "react-is-builtin": "npm:react-is@19.3.0-canary-f646e8ff-20251104", - "react-server-dom-turbopack": "19.3.0-canary-f646e8ff-20251104", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-f646e8ff-20251104", - "react-server-dom-webpack": "19.3.0-canary-f646e8ff-20251104", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-f646e8ff-20251104", + "react-dom-builtin": "npm:react-dom@19.3.0-canary-dd048c3b-20251105", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-dd048c3b-20251105", + "react-experimental-builtin": "npm:react@0.0.0-experimental-dd048c3b-20251105", + "react-is-builtin": "npm:react-is@19.3.0-canary-dd048c3b-20251105", + "react-server-dom-turbopack": "19.3.0-canary-dd048c3b-20251105", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-dd048c3b-20251105", + "react-server-dom-webpack": "19.3.0-canary-dd048c3b-20251105", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-dd048c3b-20251105", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -276,8 +276,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.15.2", - "scheduler-builtin": "npm:scheduler@0.28.0-canary-f646e8ff-20251104", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-f646e8ff-20251104", + "scheduler-builtin": "npm:scheduler@0.28.0-canary-dd048c3b-20251105", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-dd048c3b-20251105", "seedrandom": "3.0.5", "semver": "7.3.7", "serve-handler": "6.1.6", @@ -322,10 +322,10 @@ "@types/react-dom": "19.2.1", "@types/retry": "0.12.0", "jest-snapshot": "30.0.0-alpha.6", - "react": "19.3.0-canary-f646e8ff-20251104", - "react-dom": "19.3.0-canary-f646e8ff-20251104", - "react-is": "19.3.0-canary-f646e8ff-20251104", - "scheduler": "0.28.0-canary-f646e8ff-20251104" + "react": "19.3.0-canary-dd048c3b-20251105", + "react-dom": "19.3.0-canary-dd048c3b-20251105", + "react-is": "19.3.0-canary-dd048c3b-20251105", + "scheduler": "0.28.0-canary-dd048c3b-20251105" }, "packageExtensions": { "eslint-plugin-react-hooks@0.0.0-experimental-6de32a5a-20250822": { 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 eab89ea7e23709..b19c256b605e58 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 @@ -7980,6 +7980,19 @@ shellBoundary === fiber && (shellBoundary = null); pop(suspenseStackCursor, fiber); } + function pushSuspenseListContext(fiber, newContext) { + push( + suspenseHandlerStackCursor, + suspenseHandlerStackCursor.current, + fiber + ); + push(suspenseStackCursor, newContext, fiber); + } + function popSuspenseListContext(fiber) { + pop(suspenseStackCursor, fiber); + pop(suspenseHandlerStackCursor, fiber); + shellBoundary === fiber && (shellBoundary = null); + } function findFirstSuspended(row) { for (var node = row; null !== node; ) { if (13 === node.tag) { @@ -10047,27 +10060,6 @@ )); }); } - function resetSuspendedComponent(sourceFiber, rootRenderLanes) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } - function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ) { - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; - } function throwException( root, returnFiber, @@ -10080,64 +10072,65 @@ if ( null !== value && "object" === typeof value && - (value.$$typeof === REACT_POSTPONE_TYPE && - (value = { then: function () {} }), - "function" === typeof value.then) + "function" === typeof value.then ) { - resetSuspendedComponent(sourceFiber, rootRenderLanes); + returnFiber = sourceFiber.alternate; + null !== returnFiber && + propagateParentContextChanges( + returnFiber, + sourceFiber, + rootRenderLanes, + !0 + ); isHydrating && (didSuspendOrErrorDEV = !0); - var suspenseBoundary = suspenseHandlerStackCursor.current; - if (null !== suspenseBoundary) { - switch (suspenseBoundary.tag) { + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 31: case 13: + case 19: return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === suspenseBoundary.alternate && + : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootSuspended), - (suspenseBoundary.flags &= -257), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? (suspenseBoundary.updateQueue = new Set([value])) - : sourceFiber.add(value), + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), attachPingListener(root, value, rootRenderLanes)), !1 ); case 22: return ( - (suspenseBoundary.flags |= 65536), + (sourceFiber.flags |= 65536), value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? ((sourceFiber = { + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { transitions: null, markerInstances: null, retryQueue: new Set([value]) }), - (suspenseBoundary.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), attachPingListener(root, value, rootRenderLanes)), !1 ); } throw Error( "Unexpected Suspense handler tag (" + - suspenseBoundary.tag + + sourceFiber.tag + "). This is a bug in React." ); } @@ -10148,17 +10141,15 @@ if (isHydrating) return ( (didSuspendOrErrorDEV = !0), - (suspenseBoundary = suspenseHandlerStackCursor.current), - null !== suspenseBoundary - ? (0 === (suspenseBoundary.flags & 65536) && - (suspenseBoundary.flags |= 256), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (19 === returnFiber.tag && + console.error( + "SuspenseList should never catch while hydrating. This is a bug in React." + ), + 0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && queueHydrationError( createCapturedValueAtFiber( @@ -10183,10 +10174,10 @@ (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -10194,65 +10185,64 @@ (workInProgressRootExitStatus = RootErrored)), !1 ); - queueConcurrentError( - createCapturedValueAtFiber( - Error( - "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", - { cause: value } - ), - sourceFiber - ) + var error = createCapturedValueAtFiber( + Error( + "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", + { cause: value } + ), + sourceFiber ); + null === workInProgressRootConcurrentErrors + ? (workInProgressRootConcurrentErrors = [error]) + : workInProgressRootConcurrentErrors.push(error); workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); - value = returnFiber; + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (value.tag) { + switch (sourceFiber.tag) { case 3: return ( - (value.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (value.lanes |= root), + (sourceFiber.lanes |= root), (root = createRootErrorUpdate( - value.stateNode, - sourceFiber, + sourceFiber.stateNode, + value, root )), - enqueueCapturedUpdate(value, root), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((returnFiber = value.type), - (suspenseBoundary = value.stateNode), - 0 === (value.flags & 128) && + ((returnFiber = sourceFiber.type), + (error = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || - (null !== suspenseBoundary && - "function" === typeof suspenseBoundary.componentDidCatch && + (null !== error && + "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - suspenseBoundary - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(error))))) ) return ( - (value.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (value.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - value, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(value, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - value = value.return; - } while (null !== value); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } function reconcileChildren( @@ -11375,25 +11365,24 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_3240; - var JSCompiler_object_inline_stack_3239 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_3230; + var JSCompiler_object_inline_stack_3231 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_digest_3238 = !1; + var JSCompiler_object_inline_message_3229 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_3240 = didSuspend) || - (JSCompiler_object_inline_componentStack_3240 = + (JSCompiler_object_inline_digest_3230 = didSuspend) || + (JSCompiler_object_inline_digest_3230 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_3240 && - ((JSCompiler_object_inline_digest_3238 = !0), + JSCompiler_object_inline_digest_3230 && + ((JSCompiler_object_inline_message_3229 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_3240 = - 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_3230 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_digest_3238 + JSCompiler_object_inline_message_3229 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); (current = nextHydratableInstance) @@ -11406,20 +11395,18 @@ ? renderLanes : null), null !== renderLanes && - ((JSCompiler_object_inline_componentStack_3240 = { + ((JSCompiler_object_inline_digest_3230 = { dehydrated: renderLanes, treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), (workInProgress.memoizedState = - JSCompiler_object_inline_componentStack_3240), - (JSCompiler_object_inline_componentStack_3240 = + JSCompiler_object_inline_digest_3230), + (JSCompiler_object_inline_digest_3230 = createFiberFromDehydratedFragment(renderLanes)), - (JSCompiler_object_inline_componentStack_3240.return = - workInProgress), - (workInProgress.child = - JSCompiler_object_inline_componentStack_3240), + (JSCompiler_object_inline_digest_3230.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_3230), (hydrationParentFiber = workInProgress), (nextHydratableInstance = null))) : (renderLanes = null); @@ -11433,9 +11420,9 @@ : (workInProgress.lanes = 536870912); return null; } - var nextPrimaryChildren = JSCompiler_object_inline_stack_3239.children, - nextFallbackChildren = JSCompiler_object_inline_stack_3239.fallback; - if (JSCompiler_object_inline_digest_3238) + var nextPrimaryChildren = JSCompiler_object_inline_stack_3231.children, + nextFallbackChildren = JSCompiler_object_inline_stack_3231.fallback; + if (JSCompiler_object_inline_message_3229) return ( reuseSuspenseHandlerOnStack(workInProgress), mountSuspenseFallbackChildren( @@ -11444,21 +11431,21 @@ nextFallbackChildren, renderLanes ), - (JSCompiler_object_inline_stack_3239 = workInProgress.child), - (JSCompiler_object_inline_stack_3239.memoizedState = + (JSCompiler_object_inline_stack_3231 = workInProgress.child), + (JSCompiler_object_inline_stack_3231.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_3239.childLanes = + (JSCompiler_object_inline_stack_3231.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_3240, + JSCompiler_object_inline_digest_3230, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3239) + bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3231) ); if ( "number" === - typeof JSCompiler_object_inline_stack_3239.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_3231.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), @@ -11468,18 +11455,18 @@ nextFallbackChildren, renderLanes ), - (JSCompiler_object_inline_stack_3239 = workInProgress.child), - (JSCompiler_object_inline_stack_3239.memoizedState = + (JSCompiler_object_inline_stack_3231 = workInProgress.child), + (JSCompiler_object_inline_stack_3231.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_3239.childLanes = + (JSCompiler_object_inline_stack_3231.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_3240, + JSCompiler_object_inline_digest_3230, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3239) + bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3231) ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( @@ -11489,8 +11476,8 @@ } var prevState = current.memoizedState; if (null !== prevState) { - var JSCompiler_object_inline_message_3237 = prevState.dehydrated; - if (null !== JSCompiler_object_inline_message_3237) { + var JSCompiler_object_inline_componentStack_3232 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_3232) { if (didSuspend) workInProgress.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress), @@ -11507,13 +11494,13 @@ (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = - JSCompiler_object_inline_stack_3239.fallback), + JSCompiler_object_inline_stack_3231.fallback), (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_3239 = + (JSCompiler_object_inline_stack_3231 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_3239.children + children: JSCompiler_object_inline_stack_3231.children }, nextFallbackChildren )), @@ -11524,81 +11511,76 @@ null )), (nextPrimaryChildren.flags |= 2), - (JSCompiler_object_inline_stack_3239.return = workInProgress), + (JSCompiler_object_inline_stack_3231.return = workInProgress), (nextPrimaryChildren.return = workInProgress), - (JSCompiler_object_inline_stack_3239.sibling = + (JSCompiler_object_inline_stack_3231.sibling = nextPrimaryChildren), - (workInProgress.child = JSCompiler_object_inline_stack_3239), + (workInProgress.child = JSCompiler_object_inline_stack_3231), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_3239 = workInProgress.child), - (JSCompiler_object_inline_stack_3239.memoizedState = + (JSCompiler_object_inline_stack_3231 = workInProgress.child), + (JSCompiler_object_inline_stack_3231.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_3239.childLanes = + (JSCompiler_object_inline_stack_3231.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_3240, + JSCompiler_object_inline_digest_3230, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = bailoutOffscreenComponent( null, - JSCompiler_object_inline_stack_3239 + JSCompiler_object_inline_stack_3231 ))); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), warnIfHydrating(), 0 !== (renderLanes & 536870912) && markRenderDerivedCause(workInProgress), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_3237)) + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_3232 + )) ) { - JSCompiler_object_inline_componentStack_3240 = - JSCompiler_object_inline_message_3237.nextSibling && - JSCompiler_object_inline_message_3237.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_3240) { - nextPrimaryChildren = - JSCompiler_object_inline_componentStack_3240.dgst; - var message = JSCompiler_object_inline_componentStack_3240.msg; - nextFallbackChildren = - JSCompiler_object_inline_componentStack_3240.stck; - var componentStack = - JSCompiler_object_inline_componentStack_3240.cstck; + JSCompiler_object_inline_digest_3230 = + JSCompiler_object_inline_componentStack_3232.nextSibling && + JSCompiler_object_inline_componentStack_3232.nextSibling.dataset; + if (JSCompiler_object_inline_digest_3230) { + nextPrimaryChildren = JSCompiler_object_inline_digest_3230.dgst; + var message = JSCompiler_object_inline_digest_3230.msg; + nextFallbackChildren = JSCompiler_object_inline_digest_3230.stck; + var componentStack = JSCompiler_object_inline_digest_3230.cstck; } - JSCompiler_object_inline_message_3237 = message; - JSCompiler_object_inline_digest_3238 = nextPrimaryChildren; - JSCompiler_object_inline_stack_3239 = nextFallbackChildren; - JSCompiler_object_inline_componentStack_3240 = componentStack; - nextPrimaryChildren = JSCompiler_object_inline_digest_3238; - nextFallbackChildren = JSCompiler_object_inline_message_3237; - componentStack = JSCompiler_object_inline_componentStack_3240; - "POSTPONE" !== nextPrimaryChildren && - ((JSCompiler_object_inline_componentStack_3240 = - nextFallbackChildren - ? Error(nextFallbackChildren) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." - )), - (JSCompiler_object_inline_componentStack_3240.stack = - JSCompiler_object_inline_stack_3239 || ""), - (JSCompiler_object_inline_componentStack_3240.digest = - nextPrimaryChildren), - (JSCompiler_object_inline_stack_3239 = - void 0 === componentStack ? null : componentStack), - (nextPrimaryChildren = { - value: JSCompiler_object_inline_componentStack_3240, - source: null, - stack: JSCompiler_object_inline_stack_3239 - }), - "string" === typeof JSCompiler_object_inline_stack_3239 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_3240, - nextPrimaryChildren - ), - queueHydrationError(nextPrimaryChildren)); + JSCompiler_object_inline_message_3229 = message; + JSCompiler_object_inline_digest_3230 = nextPrimaryChildren; + JSCompiler_object_inline_stack_3231 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_3232 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_3229; + nextFallbackChildren = JSCompiler_object_inline_componentStack_3232; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_3231 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_3230; + JSCompiler_object_inline_digest_3230 = + void 0 === nextFallbackChildren ? null : nextFallbackChildren; + JSCompiler_object_inline_stack_3231 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_3230 + }; + "string" === typeof JSCompiler_object_inline_digest_3230 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_3231 + ); + queueHydrationError(JSCompiler_object_inline_stack_3231); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -11612,48 +11594,51 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_3240 = + (JSCompiler_object_inline_digest_3230 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_3240) + didReceiveUpdate || JSCompiler_object_inline_digest_3230) ) { - JSCompiler_object_inline_componentStack_3240 = workInProgressRoot; + JSCompiler_object_inline_digest_3230 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_componentStack_3240 && - ((JSCompiler_object_inline_stack_3239 = getBumpedLaneForHydration( - JSCompiler_object_inline_componentStack_3240, + null !== JSCompiler_object_inline_digest_3230 && + ((JSCompiler_object_inline_stack_3231 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_3230, renderLanes )), - 0 !== JSCompiler_object_inline_stack_3239 && - JSCompiler_object_inline_stack_3239 !== prevState.retryLane) + 0 !== JSCompiler_object_inline_stack_3231 && + JSCompiler_object_inline_stack_3231 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_3239), + ((prevState.retryLane = JSCompiler_object_inline_stack_3231), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_3239 + JSCompiler_object_inline_stack_3231 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_3240, + JSCompiler_object_inline_digest_3230, current, - JSCompiler_object_inline_stack_3239 + JSCompiler_object_inline_stack_3231 ), SelectiveHydrationException) ); - isSuspenseInstancePending(JSCompiler_object_inline_message_3237) || - renderDidSuspendDelayIfPossible(); + isSuspenseInstancePending( + JSCompiler_object_inline_componentStack_3232 + ) || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, renderLanes ); } else - isSuspenseInstancePending(JSCompiler_object_inline_message_3237) + isSuspenseInstancePending( + JSCompiler_object_inline_componentStack_3232 + ) ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_3237.nextSibling + JSCompiler_object_inline_componentStack_3232.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -11665,31 +11650,32 @@ restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_3239.children + JSCompiler_object_inline_stack_3231.children )), (workInProgress.flags |= 4096)); return workInProgress; } } - if (JSCompiler_object_inline_digest_3238) + if (JSCompiler_object_inline_message_3229) return ( reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = JSCompiler_object_inline_stack_3239.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_3231.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (JSCompiler_object_inline_message_3237 = componentStack.sibling), - (JSCompiler_object_inline_stack_3239 = createWorkInProgress( + (JSCompiler_object_inline_componentStack_3232 = + componentStack.sibling), + (JSCompiler_object_inline_stack_3231 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_3239.children + children: JSCompiler_object_inline_stack_3231.children } )), - (JSCompiler_object_inline_stack_3239.subtreeFlags = + (JSCompiler_object_inline_stack_3231.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== JSCompiler_object_inline_message_3237 + null !== JSCompiler_object_inline_componentStack_3232 ? (nextPrimaryChildren = createWorkInProgress( - JSCompiler_object_inline_message_3237, + JSCompiler_object_inline_componentStack_3232, nextPrimaryChildren )) : ((nextPrimaryChildren = createFiberFromFragment( @@ -11700,11 +11686,11 @@ )), (nextPrimaryChildren.flags |= 2)), (nextPrimaryChildren.return = workInProgress), - (JSCompiler_object_inline_stack_3239.return = workInProgress), - (JSCompiler_object_inline_stack_3239.sibling = nextPrimaryChildren), - (workInProgress.child = JSCompiler_object_inline_stack_3239), - bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3239), - (JSCompiler_object_inline_stack_3239 = workInProgress.child), + (JSCompiler_object_inline_stack_3231.return = workInProgress), + (JSCompiler_object_inline_stack_3231.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_3231), + bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3231), + (JSCompiler_object_inline_stack_3231 = workInProgress.child), (nextPrimaryChildren = current.child.memoizedState), null === nextPrimaryChildren ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) @@ -11720,18 +11706,18 @@ baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: nextFallbackChildren })), - (JSCompiler_object_inline_stack_3239.memoizedState = + (JSCompiler_object_inline_stack_3231.memoizedState = nextPrimaryChildren), - (JSCompiler_object_inline_stack_3239.childLanes = + (JSCompiler_object_inline_stack_3231.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_3240, + JSCompiler_object_inline_digest_3230, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), bailoutOffscreenComponent( current.child, - JSCompiler_object_inline_stack_3239 + JSCompiler_object_inline_stack_3231 ) ); null !== prevState && @@ -11743,17 +11729,16 @@ current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_3239.children + children: JSCompiler_object_inline_stack_3231.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_3240 = - workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_3240 + ((JSCompiler_object_inline_digest_3230 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_3230 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_3240.push(current)); + : JSCompiler_object_inline_digest_3230.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11870,13 +11855,15 @@ tailMode = nextProps.tail, newChildren = nextProps.children, suspenseContext = suspenseStackCursor.current; + if (workInProgress.flags & 128) + return pushSuspenseListContext(workInProgress, suspenseContext), null; (nextProps = 0 !== (suspenseContext & ForceSuspenseFallback)) ? ((suspenseContext = (suspenseContext & SubtreeSuspenseContextMask) | ForceSuspenseFallback), (workInProgress.flags |= 128)) : (suspenseContext &= SubtreeSuspenseContextMask); - push(suspenseStackCursor, suspenseContext, workInProgress); + pushSuspenseListContext(workInProgress, suspenseContext); suspenseContext = null == revealOrder ? "null" : revealOrder; if ( null != revealOrder && @@ -12212,6 +12199,12 @@ pushPrimaryTreeSuspenseHandler(workInProgress); break; case 19: + if (workInProgress.flags & 128) + return updateSuspenseListComponent( + current, + workInProgress, + renderLanes + ); var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); stateNode || @@ -12236,11 +12229,7 @@ ((didSuspendBefore.rendering = null), (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); - push( - suspenseStackCursor, - suspenseStackCursor.current, - workInProgress - ); + pushSuspenseListContext(workInProgress, suspenseStackCursor.current); if (stateNode) break; else return null; case 22: @@ -13617,7 +13606,7 @@ null ); case 19: - pop(suspenseStackCursor, workInProgress); + popSuspenseListContext(workInProgress); newProps = workInProgress.memoizedState; if (null === newProps) return bubbleProperties(workInProgress), null; type = 0 !== (workInProgress.flags & 128); @@ -13646,12 +13635,11 @@ ) resetWorkInProgress(renderLanes, current), (renderLanes = renderLanes.sibling); - push( - suspenseStackCursor, + pushSuspenseListContext( + workInProgress, (suspenseStackCursor.current & SubtreeSuspenseContextMask) | - ForceSuspenseFallback, - workInProgress + ForceSuspenseFallback ); isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount); @@ -13702,23 +13690,43 @@ : (workInProgress.child = nextResource), (newProps.last = nextResource)); } - if (null !== newProps.tail) - return ( - (current = newProps.tail), - (newProps.rendering = current), - (newProps.tail = current.sibling), - (newProps.renderingStartTime = now$1()), - (current.sibling = null), - (renderLanes = suspenseStackCursor.current), - (renderLanes = type - ? (renderLanes & SubtreeSuspenseContextMask) | - ForceSuspenseFallback - : renderLanes & SubtreeSuspenseContextMask), - push(suspenseStackCursor, renderLanes, workInProgress), - isHydrating && - pushTreeFork(workInProgress, newProps.treeForkCount), - current - ); + if (null !== newProps.tail) { + current = newProps.tail; + a: { + for (renderLanes = current; null !== renderLanes; ) { + if (null !== renderLanes.alternate) { + renderLanes = !1; + break a; + } + renderLanes = renderLanes.sibling; + } + renderLanes = !0; + } + newProps.rendering = current; + newProps.tail = current.sibling; + newProps.renderingStartTime = now$1(); + current.sibling = null; + nextResource = suspenseStackCursor.current; + nextResource = type + ? (nextResource & SubtreeSuspenseContextMask) | + ForceSuspenseFallback + : nextResource & SubtreeSuspenseContextMask; + "visible" === newProps.tailMode || + "collapsed" === newProps.tailMode || + !renderLanes || + isHydrating + ? pushSuspenseListContext(workInProgress, nextResource) + : ((renderLanes = nextResource), + push( + suspenseHandlerStackCursor, + workInProgress, + workInProgress + ), + push(suspenseStackCursor, renderLanes, workInProgress), + null === shellBoundary && (shellBoundary = workInProgress)); + isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount); + return current; + } bubbleProperties(workInProgress); return null; case 22: @@ -13840,7 +13848,18 @@ workInProgress) : null; case 19: - return pop(suspenseStackCursor, workInProgress), null; + return ( + popSuspenseListContext(workInProgress), + (current = workInProgress.flags), + current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (current = workInProgress.memoizedState), + null !== current && + ((current.rendering = null), (current.tail = null)), + (workInProgress.flags |= 4), + workInProgress) + : null + ); case 4: return popHostContainer(workInProgress), null; case 10: @@ -13890,7 +13909,7 @@ popSuspenseHandler(interruptedWork); break; case 19: - pop(suspenseStackCursor, interruptedWork); + popSuspenseListContext(interruptedWork); break; case 10: popProvider(interruptedWork.type, interruptedWork); @@ -18816,7 +18835,8 @@ case RootFatalErrored: throw Error("Root did not complete. This is a bug in React."); case RootSuspendedWithDelay: - if ((lanes & 4194048) !== lanes) break; + if ((lanes & 4194048) !== lanes && (lanes & 62914560) !== lanes) + break; case RootSuspendedAtTheShell: setCurrentTrackFromLanes(lanes); logSuspendedRenderPhase( @@ -19721,11 +19741,6 @@ !1 ); } - function queueConcurrentError(error) { - null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [error]) - : workInProgressRootConcurrentErrors.push(error); - } function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; @@ -28233,7 +28248,6 @@ REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"); Symbol.for("react.tracing_marker"); var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), - REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, ASYNC_ITERATOR = Symbol.asyncIterator, @@ -32392,11 +32406,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-f646e8ff-20251104" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-dd048c3b-20251105" !== 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.3.0-experimental-f646e8ff-20251104\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-dd048c3b-20251105\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -32433,10 +32447,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.3.0-experimental-f646e8ff-20251104", + version: "19.3.0-experimental-dd048c3b-20251105", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-f646e8ff-20251104" + reconcilerVersion: "19.3.0-experimental-dd048c3b-20251105" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -32584,7 +32598,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.3.0-experimental-f646e8ff-20251104"; + exports.version = "19.3.0-experimental-dd048c3b-20251105"; "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 77bb2e3b566a96..923a23de578da2 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 @@ -270,7 +270,6 @@ var REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"); Symbol.for("react.tracing_marker"); var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), - REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { @@ -4596,7 +4595,7 @@ function pushOffscreenSuspenseHandler(fiber) { ? (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), null === shellBoundary && (shellBoundary = fiber)) - : reuseSuspenseHandlerOnStack(fiber); + : reuseSuspenseHandlerOnStack(); } function reuseSuspenseHandlerOnStack() { push(suspenseStackCursor, suspenseStackCursor.current); @@ -4608,6 +4607,15 @@ function popSuspenseHandler(fiber) { pop(suspenseStackCursor); } var suspenseStackCursor = createCursor(0); +function pushSuspenseListContext(fiber, newContext) { + push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); + push(suspenseStackCursor, newContext); +} +function popSuspenseListContext(fiber) { + pop(suspenseStackCursor); + pop(suspenseHandlerStackCursor); + shellBoundary === fiber && (shellBoundary = null); +} function findFirstSuspended(row) { for (var node = row; null !== node; ) { if (13 === node.tag) { @@ -6349,27 +6357,6 @@ function initializeClassErrorUpdate(update, root, fiber, errorInfo) { }); }); } -function resetSuspendedComponent(sourceFiber, rootRenderLanes) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); -} -function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes -) { - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; -} function throwException( root, returnFiber, @@ -6381,61 +6368,62 @@ function throwException( if ( null !== value && "object" === typeof value && - (value.$$typeof === REACT_POSTPONE_TYPE && - (value = { then: function () {} }), - "function" === typeof value.then) + "function" === typeof value.then ) { - resetSuspendedComponent(sourceFiber, rootRenderLanes); - var suspenseBoundary = suspenseHandlerStackCursor.current; - if (null !== suspenseBoundary) { - switch (suspenseBoundary.tag) { + returnFiber = sourceFiber.alternate; + null !== returnFiber && + propagateParentContextChanges( + returnFiber, + sourceFiber, + rootRenderLanes, + !0 + ); + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 31: case 13: + case 19: return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === suspenseBoundary.alternate && + : null === sourceFiber.alternate && 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 3), - (suspenseBoundary.flags &= -257), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? (suspenseBoundary.updateQueue = new Set([value])) - : sourceFiber.add(value), + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), attachPingListener(root, value, rootRenderLanes)), !1 ); case 22: return ( - (suspenseBoundary.flags |= 65536), + (sourceFiber.flags |= 65536), value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? ((sourceFiber = { + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { transitions: null, markerInstances: null, retryQueue: new Set([value]) }), - (suspenseBoundary.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), attachPingListener(root, value, rootRenderLanes)), !1 ); } - throw Error(formatProdErrorMessage(435, suspenseBoundary.tag)); + throw Error(formatProdErrorMessage(435, sourceFiber.tag)); } attachPingListener(root, value, rootRenderLanes); renderDidSuspendDelayIfPossible(); @@ -6443,17 +6431,11 @@ function throwException( } if (isHydrating) return ( - (suspenseBoundary = suspenseHandlerStackCursor.current), - null !== suspenseBoundary - ? (0 === (suspenseBoundary.flags & 65536) && - (suspenseBoundary.flags |= 256), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && ((root = Error(formatProdErrorMessage(422), { cause: value })), queueHydrationError(createCapturedValueAtFiber(root, sourceFiber)))) @@ -6468,10 +6450,10 @@ function throwException( (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -6479,58 +6461,54 @@ function throwException( (workInProgressRootExitStatus = 2)), !1 ); - suspenseBoundary = Error(formatProdErrorMessage(520), { cause: value }); - queueConcurrentError( - createCapturedValueAtFiber(suspenseBoundary, sourceFiber) - ); + var wrapperError = Error(formatProdErrorMessage(520), { cause: value }); + wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber); + null === workInProgressRootConcurrentErrors + ? (workInProgressRootConcurrentErrors = [wrapperError]) + : workInProgressRootConcurrentErrors.push(wrapperError); 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (returnFiber.tag) { + switch (sourceFiber.tag) { case 3: return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (returnFiber.lanes |= root), - (root = createRootErrorUpdate( - returnFiber.stateNode, - sourceFiber, - root - )), - enqueueCapturedUpdate(returnFiber, root), + (sourceFiber.lanes |= root), + (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((value = returnFiber.type), - (suspenseBoundary = returnFiber.stateNode), - 0 === (returnFiber.flags & 128) && - ("function" === typeof value.getDerivedStateFromError || - (null !== suspenseBoundary && - "function" === typeof suspenseBoundary.componentDidCatch && + ((returnFiber = sourceFiber.type), + (wrapperError = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== wrapperError && + "function" === typeof wrapperError.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - suspenseBoundary - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError))))) ) return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (returnFiber.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - returnFiber, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(returnFiber, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - returnFiber = returnFiber.return; - } while (null !== returnFiber); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } var SelectiveHydrationException = Error(formatProdErrorMessage(461)), @@ -6727,11 +6705,11 @@ function updateOffscreenComponent( null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), pushHiddenContext(workInProgress, prevState), - reuseSuspenseHandlerOnStack(workInProgress), + reuseSuspenseHandlerOnStack(), (workInProgress.memoizedState = null)) : (null !== current && pushTransition(workInProgress, null), reuseHiddenContextOnStack(), - reuseSuspenseHandlerOnStack(workInProgress)); + reuseSuspenseHandlerOnStack()); reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } @@ -7271,7 +7249,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { if (isHydrating) { showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress) - : reuseSuspenseHandlerOnStack(workInProgress); + : reuseSuspenseHandlerOnStack(); (current = nextHydratableInstance) ? ((current = canHydrateHydrationBoundary( current, @@ -7304,7 +7282,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextFallbackChildren = nextProps.fallback; if (showFallback) return ( - reuseSuspenseHandlerOnStack(workInProgress), + reuseSuspenseHandlerOnStack(), mountSuspenseFallbackChildren( workInProgress, nextPrimaryChildren, @@ -7323,7 +7301,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ); if ("number" === typeof nextProps.unstable_expectedLoadTime) return ( - reuseSuspenseHandlerOnStack(workInProgress), + reuseSuspenseHandlerOnStack(), mountSuspenseFallbackChildren( workInProgress, nextPrimaryChildren, @@ -7360,11 +7338,11 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes ))) : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), + ? (reuseSuspenseHandlerOnStack(), (workInProgress.child = current.child), (workInProgress.flags |= 128), (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), + : (reuseSuspenseHandlerOnStack(), (nextPrimaryChildren = nextProps.fallback), (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( @@ -7407,11 +7385,10 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextPrimaryChildren.nextSibling.dataset; if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; JSCompiler_temp = digest; - "POSTPONE" !== JSCompiler_temp && - ((nextProps = Error(formatProdErrorMessage(419))), - (nextProps.stack = ""), - (nextProps.digest = JSCompiler_temp), - queueHydrationError({ value: nextProps, source: null, stack: null })); + nextProps = Error(formatProdErrorMessage(419)); + nextProps.stack = ""; + nextProps.digest = JSCompiler_temp; + queueHydrationError({ value: nextProps, source: null, stack: null }); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -7466,7 +7443,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) return ( - reuseSuspenseHandlerOnStack(workInProgress), + reuseSuspenseHandlerOnStack(), (nextPrimaryChildren = nextProps.fallback), (showFallback = workInProgress.mode), (nextFallbackChildren = current.child), @@ -7643,13 +7620,15 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { revealOrder = nextProps.revealOrder, tailMode = nextProps.tail; nextProps = nextProps.children; - var suspenseContext = suspenseStackCursor.current, - shouldForceFallback = 0 !== (suspenseContext & 2); + var suspenseContext = suspenseStackCursor.current; + if (workInProgress.flags & 128) + return pushSuspenseListContext(workInProgress, suspenseContext), null; + var shouldForceFallback = 0 !== (suspenseContext & 2); shouldForceFallback ? ((suspenseContext = (suspenseContext & 1) | 2), (workInProgress.flags |= 128)) : (suspenseContext &= 1); - push(suspenseStackCursor, suspenseContext); + pushSuspenseListContext(workInProgress, suspenseContext); "backwards" === revealOrder && null !== current ? (reverseChildren(current), reconcileChildren(current, workInProgress, nextProps, renderLanes), @@ -7838,6 +7817,12 @@ function attemptEarlyBailoutIfNoScheduledUpdate( pushPrimaryTreeSuspenseHandler(workInProgress); break; case 19: + if (workInProgress.flags & 128) + return updateSuspenseListComponent( + current, + workInProgress, + renderLanes + ); var didSuspendBefore = 0 !== (current.flags & 128); state$113 = 0 !== (renderLanes & workInProgress.childLanes); state$113 || @@ -7862,7 +7847,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( ((didSuspendBefore.rendering = null), (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); - push(suspenseStackCursor, suspenseStackCursor.current); + pushSuspenseListContext(workInProgress, suspenseStackCursor.current); if (state$113) break; else return null; case 22: @@ -8843,7 +8828,7 @@ function completeWork(current, workInProgress, renderLanes) { popProvider(workInProgress.type), bubbleProperties(workInProgress), null ); case 19: - pop(suspenseStackCursor); + popSuspenseListContext(workInProgress); newProps = workInProgress.memoizedState; if (null === newProps) return bubbleProperties(workInProgress), null; type = 0 !== (workInProgress.flags & 128); @@ -8868,8 +8853,8 @@ function completeWork(current, workInProgress, renderLanes) { for (renderLanes = workInProgress.child; null !== renderLanes; ) resetWorkInProgress(renderLanes, current), (renderLanes = renderLanes.sibling); - push( - suspenseStackCursor, + pushSuspenseListContext( + workInProgress, (suspenseStackCursor.current & 1) | 2 ); isHydrating && @@ -8921,21 +8906,36 @@ function completeWork(current, workInProgress, renderLanes) { : (workInProgress.child = nextResource), (newProps.last = nextResource)); } - if (null !== newProps.tail) - return ( - (current = newProps.tail), - (newProps.rendering = current), - (newProps.tail = current.sibling), - (newProps.renderingStartTime = now()), - (current.sibling = null), - (renderLanes = suspenseStackCursor.current), - push( - suspenseStackCursor, - type ? (renderLanes & 1) | 2 : renderLanes & 1 - ), - isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount), - current - ); + if (null !== newProps.tail) { + current = newProps.tail; + a: { + for (renderLanes = current; null !== renderLanes; ) { + if (null !== renderLanes.alternate) { + renderLanes = !1; + break a; + } + renderLanes = renderLanes.sibling; + } + renderLanes = !0; + } + newProps.rendering = current; + newProps.tail = current.sibling; + newProps.renderingStartTime = now(); + current.sibling = null; + nextResource = suspenseStackCursor.current; + nextResource = type ? (nextResource & 1) | 2 : nextResource & 1; + "visible" === newProps.tailMode || + "collapsed" === newProps.tailMode || + !renderLanes || + isHydrating + ? pushSuspenseListContext(workInProgress, nextResource) + : ((renderLanes = nextResource), + push(suspenseHandlerStackCursor, workInProgress), + push(suspenseStackCursor, renderLanes), + null === shellBoundary && (shellBoundary = workInProgress)); + isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount); + return current; + } bubbleProperties(workInProgress); return null; case 22: @@ -9038,7 +9038,18 @@ function unwindWork(current, workInProgress) { ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) : null; case 19: - return pop(suspenseStackCursor), null; + return ( + popSuspenseListContext(workInProgress), + (current = workInProgress.flags), + current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (current = workInProgress.memoizedState), + null !== current && + ((current.rendering = null), (current.tail = null)), + (workInProgress.flags |= 4), + workInProgress) + : null + ); case 4: return popHostContainer(), null; case 10: @@ -9085,7 +9096,7 @@ function unwindInterruptedWork(current, interruptedWork) { popSuspenseHandler(interruptedWork); break; case 19: - pop(suspenseStackCursor); + popSuspenseListContext(interruptedWork); break; case 10: popProvider(interruptedWork.type); @@ -9237,8 +9248,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$152) { - captureCommitPhaseError(current, nearestMountedAncestor, error$152); + } catch (error$153) { + captureCommitPhaseError(current, nearestMountedAncestor, error$153); } else ref.current = null; } @@ -10113,11 +10124,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { prevState, instance.__reactInternalSnapshotBeforeUpdate ); - } catch (error$150) { + } catch (error$151) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$150 + error$151 ); } } @@ -10925,14 +10936,14 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { var wasHidden = null !== current && null !== current.memoizedState, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden, - prevOffscreenDirectParentIsHidden$167 = offscreenDirectParentIsHidden; + prevOffscreenDirectParentIsHidden$168 = offscreenDirectParentIsHidden; offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot; offscreenDirectParentIsHidden = - prevOffscreenDirectParentIsHidden$167 || hoistableRoot; + prevOffscreenDirectParentIsHidden$168 || hoistableRoot; offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden; recursivelyTraverseMutationEffects(root, finishedWork, lanes); offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - offscreenDirectParentIsHidden = prevOffscreenDirectParentIsHidden$167; + offscreenDirectParentIsHidden = prevOffscreenDirectParentIsHidden$168; offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; commitReconciliationEffects(finishedWork); if ( @@ -11092,25 +11103,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$153 = hostParentFiber.stateNode; + var parent$154 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$153, ""), (hostParentFiber.flags &= -33)); - var before$154 = getHostSibling(finishedWork); + (setTextContent(parent$154, ""), (hostParentFiber.flags &= -33)); + var before$155 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$154, - parent$153, + before$155, + parent$154, parentFragmentInstances ); break; case 3: case 4: - var parent$155 = hostParentFiber.stateNode.containerInfo, - before$156 = getHostSibling(finishedWork); + var parent$156 = hostParentFiber.stateNode.containerInfo, + before$157 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$156, - parent$155, + before$157, + parent$156, parentFragmentInstances ); break; @@ -12293,7 +12304,7 @@ function recursivelyInsertClones( if (null === nextPhase) recursivelyInsertNewFiber(deletions, i, parentViewTransition, 5); else { - var nextPhase$181 = deletions.flags; + var nextPhase$182 = deletions.flags; switch (deletions.tag) { case 26: recursivelyInsertClones( @@ -12319,16 +12330,16 @@ function recursivelyInsertClones( (setTextContent(clone, ""), (viewTransitionMutationContext = !0))) : (clone = clone.cloneNode(!1)); - if (nextPhase$181 & 4) { - nextPhase$181 = clone; + if (nextPhase$182 & 4) { + nextPhase$182 = clone; var newProps = deletions.memoizedProps; updateProperties( - nextPhase$181, + nextPhase$182, deletions.type, nextPhase.memoizedProps, newProps ); - nextPhase$181[internalPropsKey] = newProps; + nextPhase$182[internalPropsKey] = newProps; } 1 === visitPhase || 2 === visitPhase ? (i.appendChild(clone), @@ -12347,7 +12358,7 @@ function recursivelyInsertClones( if (null === parentViewTransition) throw Error(formatProdErrorMessage(162)); parentViewTransition = parentViewTransition.cloneNode(!1); - nextPhase$181 & 4 && + nextPhase$182 & 4 && ((parentViewTransition.nodeValue = nextPhase.memoizedProps), (viewTransitionMutationContext = !0)); i.appendChild(parentViewTransition); @@ -12360,7 +12371,7 @@ function recursivelyInsertClones( case 22: null === deletions.memoizedState ? ((nextPhase = - 0 === visitPhase && 0 !== (nextPhase$181 & 8192) + 0 === visitPhase && 0 !== (nextPhase$182 & 8192) ? 1 : visitPhase), recursivelyInsertClones( @@ -12378,8 +12389,8 @@ function recursivelyInsertClones( parentViewTransition = pushMutationContext(); clone = deletions.stateNode; clone.clones = null; - nextPhase$181 = 1 === visitPhase ? 2 : visitPhase; - recursivelyInsertClones(deletions, i, clone, nextPhase$181); + nextPhase$182 = 1 === visitPhase ? 2 : visitPhase; + recursivelyInsertClones(deletions, i, clone, nextPhase$182); viewTransitionMutationContext && (deletions.flags |= 4); 1 === visitPhase ? applyExitViewTransition(deletions) @@ -12717,7 +12728,8 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { case 1: throw Error(formatProdErrorMessage(345)); case 4: - if ((lanes & 4194048) !== lanes) break; + if ((lanes & 4194048) !== lanes && (lanes & 62914560) !== lanes) + break; case 6: markRootSuspended( shouldTimeSlice, @@ -13087,11 +13099,6 @@ function renderDidSuspendDelayIfPossible() { !1 ); } -function queueConcurrentError(error) { - null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [error]) - : workInProgressRootConcurrentErrors.push(error); -} function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; @@ -13138,8 +13145,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$186) { - handleThrow(root, thrownValue$186); + } catch (thrownValue$187) { + handleThrow(root, thrownValue$187); } while (1); lanes && root.shellSuspendCounter++; @@ -13258,8 +13265,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$188) { - handleThrow(root, thrownValue$188); + } catch (thrownValue$189) { + handleThrow(root, thrownValue$189); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -13913,26 +13920,26 @@ function commitGestureOnRoot( } var rotate = computedStyle.rotate; if ("none" !== rotate && "" !== rotate) { - var parts$267 = rotate.split(" "); + var parts$268 = rotate.split(" "); transform = - 1 === parts$267.length - ? "rotate(" + parts$267[0] + ") " + transform - : 2 === parts$267.length + 1 === parts$268.length + ? "rotate(" + parts$268[0] + ") " + transform + : 2 === parts$268.length ? "rotate" + - parts$267[0].toUpperCase() + + parts$268[0].toUpperCase() + "(" + - parts$267[1] + + parts$268[1] + ") " + transform - : "rotate3d(" + parts$267.join(", ") + ") " + transform; + : "rotate3d(" + parts$268.join(", ") + ") " + transform; } var translate = computedStyle.translate; if ("none" !== translate && "" !== translate) { - var parts$268 = translate.split(" "); + var parts$269 = translate.split(" "); transform = - (3 === parts$268.length ? "translate3d" : "translate") + + (3 === parts$269.length ? "translate3d" : "translate") + "(" + - parts$268.join(", ") + + parts$269.join(", ") + ") " + transform; } @@ -14244,14 +14251,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$195 = firstScheduledRoot; null !== root$195; ) { + for (var root$196 = firstScheduledRoot; null !== root$196; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$195.pendingLanes; + var pendingLanes = root$196.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$195.suspendedLanes, - pingedLanes = root$195.pingedLanes; + var suspendedLanes = root$196.suspendedLanes, + pingedLanes = root$196.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -14265,21 +14272,21 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$195, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$196, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$195, - root$195 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$195.cancelPendingCommit || - -1 !== root$195.timeoutHandle + root$196, + root$196 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$196.cancelPendingCommit || + -1 !== root$196.timeoutHandle )), (0 === (JSCompiler_inline_result & 3) && 64 !== JSCompiler_inline_result) || - checkIfRootIsPrerendering(root$195, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$196, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$195, JSCompiler_inline_result)); - root$195 = root$195.next; + performSyncWorkOnRoot(root$196, JSCompiler_inline_result)); + root$196 = root$196.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -14602,20 +14609,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1796 = 0; - i$jscomp$inline_1796 < simpleEventPluginEvents.length; - i$jscomp$inline_1796++ + var i$jscomp$inline_1780 = 0; + i$jscomp$inline_1780 < simpleEventPluginEvents.length; + i$jscomp$inline_1780++ ) { - var eventName$jscomp$inline_1797 = - simpleEventPluginEvents[i$jscomp$inline_1796], - domEventName$jscomp$inline_1798 = - eventName$jscomp$inline_1797.toLowerCase(), - capitalizedEvent$jscomp$inline_1799 = - eventName$jscomp$inline_1797[0].toUpperCase() + - eventName$jscomp$inline_1797.slice(1); + var eventName$jscomp$inline_1781 = + simpleEventPluginEvents[i$jscomp$inline_1780], + domEventName$jscomp$inline_1782 = + eventName$jscomp$inline_1781.toLowerCase(), + capitalizedEvent$jscomp$inline_1783 = + eventName$jscomp$inline_1781[0].toUpperCase() + + eventName$jscomp$inline_1781.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1798, - "on" + capitalizedEvent$jscomp$inline_1799 + domEventName$jscomp$inline_1782, + "on" + capitalizedEvent$jscomp$inline_1783 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15849,34 +15856,34 @@ function setInitialProperties(domElement, tag, props) { var propKey = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$209 = props[hasSrc]; - if (null != propValue$209) + var propValue$210 = props[hasSrc]; + if (null != propValue$210) switch (hasSrc) { case "name": - hasSrcSet = propValue$209; + hasSrcSet = propValue$210; break; case "type": - propValue = propValue$209; + propValue = propValue$210; break; case "checked": - checked = propValue$209; + checked = propValue$210; break; case "defaultChecked": - propKey = propValue$209; + propKey = propValue$210; break; case "value": - value = propValue$209; + value = propValue$210; break; case "defaultValue": - defaultValue = propValue$209; + defaultValue = propValue$210; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$209) + if (null != propValue$210) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$209, props, null); + setProp(domElement, tag, hasSrc, propValue$210, props, null); } } a: { @@ -16059,14 +16066,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$209 in props) - props.hasOwnProperty(propValue$209) && - ((hasSrc = props[propValue$209]), + for (propValue$210 in props) + props.hasOwnProperty(propValue$210) && + ((hasSrc = props[propValue$210]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$209, + propValue$210, hasSrc, props, void 0 @@ -16113,14 +16120,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$226 in nextProps) { - var propKey = nextProps[propKey$226]; - lastProp = lastProps[propKey$226]; + for (var propKey$227 in nextProps) { + var propKey = nextProps[propKey$227]; + lastProp = lastProps[propKey$227]; if ( - nextProps.hasOwnProperty(propKey$226) && + nextProps.hasOwnProperty(propKey$227) && (null != propKey || null != lastProp) ) - switch (propKey$226) { + switch (propKey$227) { case "type": propKey !== lastProp && (viewTransitionMutationContext = !0); type = propKey; @@ -16155,7 +16162,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$226, + propKey$227, propKey, nextProps, lastProp @@ -16174,7 +16181,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$226 = null; + propKey = value = defaultValue = propKey$227 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16206,7 +16213,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && (viewTransitionMutationContext = !0); - propKey$226 = type; + propKey$227 = type; break; case "defaultValue": type !== lastDefaultValue && (viewTransitionMutationContext = !0); @@ -16229,15 +16236,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$226 - ? updateOptions(domElement, !!lastProps, propKey$226, !1) + null != propKey$227 + ? updateOptions(domElement, !!lastProps, propKey$227, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$226 = null; + propKey = propKey$227 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16262,7 +16269,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && (viewTransitionMutationContext = !0); - propKey$226 = name; + propKey$227 = name; break; case "defaultValue": name !== type && (viewTransitionMutationContext = !0); @@ -16277,17 +16284,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$226, propKey); + updateTextarea(domElement, propKey$227, propKey); return; case "option": - for (var propKey$242 in lastProps) + for (var propKey$243 in lastProps) if ( - ((propKey$226 = lastProps[propKey$242]), - lastProps.hasOwnProperty(propKey$242) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$242)) + ((propKey$227 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$243)) ) - switch (propKey$242) { + switch (propKey$243) { case "selected": domElement.selected = !1; break; @@ -16295,34 +16302,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$242, + propKey$243, null, nextProps, - propKey$226 + propKey$227 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$226 = nextProps[lastDefaultValue]), + ((propKey$227 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$226 !== propKey && (viewTransitionMutationContext = !0); + propKey$227 !== propKey && (viewTransitionMutationContext = !0); domElement.selected = - propKey$226 && - "function" !== typeof propKey$226 && - "symbol" !== typeof propKey$226; + propKey$227 && + "function" !== typeof propKey$227 && + "symbol" !== typeof propKey$227; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$226, + propKey$227, nextProps, propKey ); @@ -16343,24 +16350,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$247 in lastProps) - (propKey$226 = lastProps[propKey$247]), - lastProps.hasOwnProperty(propKey$247) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$247) && - setProp(domElement, tag, propKey$247, null, nextProps, propKey$226); + for (var propKey$248 in lastProps) + (propKey$227 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$248) && + setProp(domElement, tag, propKey$248, null, nextProps, propKey$227); for (checked in nextProps) if ( - ((propKey$226 = nextProps[checked]), + ((propKey$227 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$226) + if (null != propKey$227) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16368,7 +16375,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$226, + propKey$227, nextProps, propKey ); @@ -16376,49 +16383,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$252 in lastProps) - (propKey$226 = lastProps[propKey$252]), - lastProps.hasOwnProperty(propKey$252) && - void 0 !== propKey$226 && - !nextProps.hasOwnProperty(propKey$252) && + for (var propKey$253 in lastProps) + (propKey$227 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + void 0 !== propKey$227 && + !nextProps.hasOwnProperty(propKey$253) && setPropOnCustomElement( domElement, tag, - propKey$252, + propKey$253, void 0, nextProps, - propKey$226 + propKey$227 ); for (defaultChecked in nextProps) - (propKey$226 = nextProps[defaultChecked]), + (propKey$227 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$226 === propKey || - (void 0 === propKey$226 && void 0 === propKey) || + propKey$227 === propKey || + (void 0 === propKey$227 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$226, + propKey$227, nextProps, propKey ); return; } } - for (var propKey$257 in lastProps) - (propKey$226 = lastProps[propKey$257]), - lastProps.hasOwnProperty(propKey$257) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$257) && - setProp(domElement, tag, propKey$257, null, nextProps, propKey$226); + for (var propKey$258 in lastProps) + (propKey$227 = lastProps[propKey$258]), + lastProps.hasOwnProperty(propKey$258) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$258) && + setProp(domElement, tag, propKey$258, null, nextProps, propKey$227); for (lastProp in nextProps) - (propKey$226 = nextProps[lastProp]), + (propKey$227 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$226 === propKey || - (null == propKey$226 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$226, nextProps, propKey); + propKey$227 === propKey || + (null == propKey$227 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$227, nextProps, propKey); } function isLikelyStaticResource(initiatorType) { switch (initiatorType) { @@ -17162,20 +17169,20 @@ function startGestureTransition( ))) : (isExitGroupAnim = !0); } - var timing$274 = pseudoElement.getTiming(); + var timing$275 = pseudoElement.getTiming(); anim = rangeEnd - - (("number" === typeof timing$274.duration - ? timing$274.duration + (("number" === typeof timing$275.duration + ? timing$275.duration : 0) + - timing$274.delay) * + timing$275.delay) * longestDuration; - groupName = rangeEnd - timing$274.delay * longestDuration; + groupName = rangeEnd - timing$275.delay * longestDuration; if ( - "reverse" === timing$274.direction || - "alternate-reverse" === timing$274.direction + "reverse" === timing$275.direction || + "alternate-reverse" === timing$275.direction ) - (timing$274 = anim), (anim = groupName), (groupName = timing$274); + (timing$275 = anim), (anim = groupName), (groupName = timing$275); animateGesture( pseudoElement.getKeyframes(), pseudoElement.target, @@ -18304,26 +18311,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$283 = getResourcesFromRoot( + var styles$284 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$284 = styles$283.get(type); - resource$284 || + resource$285 = styles$284.get(type); + resource$285 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$284 = { + (resource$285 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$283.set(type, resource$284), - (styles$283 = JSCompiler_inline_result.querySelector( + styles$284.set(type, resource$285), + (styles$284 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$283._p && - ((resource$284.instance = styles$283), - (resource$284.state.loading = 5)), + !styles$284._p && + ((resource$285.instance = styles$284), + (resource$285.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -18336,16 +18343,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$283 || + styles$284 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$284.state + resource$285.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$284; + return resource$285; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -18442,37 +18449,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$289 = hoistableRoot.querySelector( + var instance$290 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$289) + if (instance$290) return ( (resource.state.loading |= 4), - (resource.instance = instance$289), - markNodeAsHoistable(instance$289), - instance$289 + (resource.instance = instance$290), + markNodeAsHoistable(instance$290), + instance$290 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$289 = ( + instance$290 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$289); - var linkInstance = instance$289; + markNodeAsHoistable(instance$290); + var linkInstance = instance$290; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$289, "link", instance); + setInitialProperties(instance$290, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$289, props.precedence, hoistableRoot); - return (resource.instance = instance$289); + insertStylesheet(instance$290, props.precedence, hoistableRoot); + return (resource.instance = instance$290); case "script": - instance$289 = getScriptKey(props.src); + instance$290 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$289) + getScriptSelectorFromKey(instance$290) )) ) return ( @@ -18481,7 +18488,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$289))) + if ((styleProps = preloadPropsMap.get(instance$290))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -19608,16 +19615,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_2214 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2198 = React.version; if ( - "19.3.0-experimental-f646e8ff-20251104" !== - isomorphicReactPackageVersion$jscomp$inline_2214 + "19.3.0-experimental-dd048c3b-20251105" !== + isomorphicReactPackageVersion$jscomp$inline_2198 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2214, - "19.3.0-experimental-f646e8ff-20251104" + isomorphicReactPackageVersion$jscomp$inline_2198, + "19.3.0-experimental-dd048c3b-20251105" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -19637,24 +19644,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2911 = { +var internals$jscomp$inline_2903 = { bundleType: 0, - version: "19.3.0-experimental-f646e8ff-20251104", + version: "19.3.0-experimental-dd048c3b-20251105", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-f646e8ff-20251104" + reconcilerVersion: "19.3.0-experimental-dd048c3b-20251105" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2912 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2904 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2912.isDisabled && - hook$jscomp$inline_2912.supportsFiber + !hook$jscomp$inline_2904.isDisabled && + hook$jscomp$inline_2904.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2912.inject( - internals$jscomp$inline_2911 + (rendererID = hook$jscomp$inline_2904.inject( + internals$jscomp$inline_2903 )), - (injectedHook = hook$jscomp$inline_2912); + (injectedHook = hook$jscomp$inline_2904); } catch (err) {} } exports.createRoot = function (container, options) { @@ -19749,4 +19756,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.3.0-experimental-f646e8ff-20251104"; +exports.version = "19.3.0-experimental-dd048c3b-20251105"; 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 9f3c5ef9c6f52c..f197e1d60abacc 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 @@ -7988,6 +7988,19 @@ shellBoundary === fiber && (shellBoundary = null); pop(suspenseStackCursor, fiber); } + function pushSuspenseListContext(fiber, newContext) { + push( + suspenseHandlerStackCursor, + suspenseHandlerStackCursor.current, + fiber + ); + push(suspenseStackCursor, newContext, fiber); + } + function popSuspenseListContext(fiber) { + pop(suspenseStackCursor, fiber); + pop(suspenseHandlerStackCursor, fiber); + shellBoundary === fiber && (shellBoundary = null); + } function findFirstSuspended(row) { for (var node = row; null !== node; ) { if (13 === node.tag) { @@ -10055,27 +10068,6 @@ )); }); } - function resetSuspendedComponent(sourceFiber, rootRenderLanes) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } - function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ) { - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; - } function throwException( root, returnFiber, @@ -10088,64 +10080,65 @@ if ( null !== value && "object" === typeof value && - (value.$$typeof === REACT_POSTPONE_TYPE && - (value = { then: function () {} }), - "function" === typeof value.then) + "function" === typeof value.then ) { - resetSuspendedComponent(sourceFiber, rootRenderLanes); + returnFiber = sourceFiber.alternate; + null !== returnFiber && + propagateParentContextChanges( + returnFiber, + sourceFiber, + rootRenderLanes, + !0 + ); isHydrating && (didSuspendOrErrorDEV = !0); - var suspenseBoundary = suspenseHandlerStackCursor.current; - if (null !== suspenseBoundary) { - switch (suspenseBoundary.tag) { + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 31: case 13: + case 19: return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === suspenseBoundary.alternate && + : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootSuspended), - (suspenseBoundary.flags &= -257), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? (suspenseBoundary.updateQueue = new Set([value])) - : sourceFiber.add(value), + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), attachPingListener(root, value, rootRenderLanes)), !1 ); case 22: return ( - (suspenseBoundary.flags |= 65536), + (sourceFiber.flags |= 65536), value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? ((sourceFiber = { + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { transitions: null, markerInstances: null, retryQueue: new Set([value]) }), - (suspenseBoundary.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), attachPingListener(root, value, rootRenderLanes)), !1 ); } throw Error( "Unexpected Suspense handler tag (" + - suspenseBoundary.tag + + sourceFiber.tag + "). This is a bug in React." ); } @@ -10156,17 +10149,15 @@ if (isHydrating) return ( (didSuspendOrErrorDEV = !0), - (suspenseBoundary = suspenseHandlerStackCursor.current), - null !== suspenseBoundary - ? (0 === (suspenseBoundary.flags & 65536) && - (suspenseBoundary.flags |= 256), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (19 === returnFiber.tag && + console.error( + "SuspenseList should never catch while hydrating. This is a bug in React." + ), + 0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && queueHydrationError( createCapturedValueAtFiber( @@ -10191,10 +10182,10 @@ (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -10202,65 +10193,64 @@ (workInProgressRootExitStatus = RootErrored)), !1 ); - queueConcurrentError( - createCapturedValueAtFiber( - Error( - "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", - { cause: value } - ), - sourceFiber - ) + var error = createCapturedValueAtFiber( + Error( + "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", + { cause: value } + ), + sourceFiber ); + null === workInProgressRootConcurrentErrors + ? (workInProgressRootConcurrentErrors = [error]) + : workInProgressRootConcurrentErrors.push(error); workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); - value = returnFiber; + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (value.tag) { + switch (sourceFiber.tag) { case 3: return ( - (value.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (value.lanes |= root), + (sourceFiber.lanes |= root), (root = createRootErrorUpdate( - value.stateNode, - sourceFiber, + sourceFiber.stateNode, + value, root )), - enqueueCapturedUpdate(value, root), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((returnFiber = value.type), - (suspenseBoundary = value.stateNode), - 0 === (value.flags & 128) && + ((returnFiber = sourceFiber.type), + (error = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || - (null !== suspenseBoundary && - "function" === typeof suspenseBoundary.componentDidCatch && + (null !== error && + "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - suspenseBoundary - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(error))))) ) return ( - (value.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (value.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - value, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(value, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - value = value.return; - } while (null !== value); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } function reconcileChildren( @@ -11383,25 +11373,24 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_3245; - var JSCompiler_object_inline_stack_3244 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_3235; + var JSCompiler_object_inline_stack_3236 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_digest_3243 = !1; + var JSCompiler_object_inline_message_3234 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_3245 = didSuspend) || - (JSCompiler_object_inline_componentStack_3245 = + (JSCompiler_object_inline_digest_3235 = didSuspend) || + (JSCompiler_object_inline_digest_3235 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_3245 && - ((JSCompiler_object_inline_digest_3243 = !0), + JSCompiler_object_inline_digest_3235 && + ((JSCompiler_object_inline_message_3234 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_3245 = - 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_3235 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_digest_3243 + JSCompiler_object_inline_message_3234 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); (current = nextHydratableInstance) @@ -11414,20 +11403,18 @@ ? renderLanes : null), null !== renderLanes && - ((JSCompiler_object_inline_componentStack_3245 = { + ((JSCompiler_object_inline_digest_3235 = { dehydrated: renderLanes, treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), (workInProgress.memoizedState = - JSCompiler_object_inline_componentStack_3245), - (JSCompiler_object_inline_componentStack_3245 = + JSCompiler_object_inline_digest_3235), + (JSCompiler_object_inline_digest_3235 = createFiberFromDehydratedFragment(renderLanes)), - (JSCompiler_object_inline_componentStack_3245.return = - workInProgress), - (workInProgress.child = - JSCompiler_object_inline_componentStack_3245), + (JSCompiler_object_inline_digest_3235.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_3235), (hydrationParentFiber = workInProgress), (nextHydratableInstance = null))) : (renderLanes = null); @@ -11441,9 +11428,9 @@ : (workInProgress.lanes = 536870912); return null; } - var nextPrimaryChildren = JSCompiler_object_inline_stack_3244.children, - nextFallbackChildren = JSCompiler_object_inline_stack_3244.fallback; - if (JSCompiler_object_inline_digest_3243) + var nextPrimaryChildren = JSCompiler_object_inline_stack_3236.children, + nextFallbackChildren = JSCompiler_object_inline_stack_3236.fallback; + if (JSCompiler_object_inline_message_3234) return ( reuseSuspenseHandlerOnStack(workInProgress), mountSuspenseFallbackChildren( @@ -11452,21 +11439,21 @@ nextFallbackChildren, renderLanes ), - (JSCompiler_object_inline_stack_3244 = workInProgress.child), - (JSCompiler_object_inline_stack_3244.memoizedState = + (JSCompiler_object_inline_stack_3236 = workInProgress.child), + (JSCompiler_object_inline_stack_3236.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_3244.childLanes = + (JSCompiler_object_inline_stack_3236.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_3245, + JSCompiler_object_inline_digest_3235, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3244) + bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3236) ); if ( "number" === - typeof JSCompiler_object_inline_stack_3244.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_3236.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), @@ -11476,18 +11463,18 @@ nextFallbackChildren, renderLanes ), - (JSCompiler_object_inline_stack_3244 = workInProgress.child), - (JSCompiler_object_inline_stack_3244.memoizedState = + (JSCompiler_object_inline_stack_3236 = workInProgress.child), + (JSCompiler_object_inline_stack_3236.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_3244.childLanes = + (JSCompiler_object_inline_stack_3236.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_3245, + JSCompiler_object_inline_digest_3235, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3244) + bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3236) ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( @@ -11497,8 +11484,8 @@ } var prevState = current.memoizedState; if (null !== prevState) { - var JSCompiler_object_inline_message_3242 = prevState.dehydrated; - if (null !== JSCompiler_object_inline_message_3242) { + var JSCompiler_object_inline_componentStack_3237 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_3237) { if (didSuspend) workInProgress.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress), @@ -11515,13 +11502,13 @@ (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = - JSCompiler_object_inline_stack_3244.fallback), + JSCompiler_object_inline_stack_3236.fallback), (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_3244 = + (JSCompiler_object_inline_stack_3236 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_3244.children + children: JSCompiler_object_inline_stack_3236.children }, nextFallbackChildren )), @@ -11532,81 +11519,76 @@ null )), (nextPrimaryChildren.flags |= 2), - (JSCompiler_object_inline_stack_3244.return = workInProgress), + (JSCompiler_object_inline_stack_3236.return = workInProgress), (nextPrimaryChildren.return = workInProgress), - (JSCompiler_object_inline_stack_3244.sibling = + (JSCompiler_object_inline_stack_3236.sibling = nextPrimaryChildren), - (workInProgress.child = JSCompiler_object_inline_stack_3244), + (workInProgress.child = JSCompiler_object_inline_stack_3236), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_3244 = workInProgress.child), - (JSCompiler_object_inline_stack_3244.memoizedState = + (JSCompiler_object_inline_stack_3236 = workInProgress.child), + (JSCompiler_object_inline_stack_3236.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_3244.childLanes = + (JSCompiler_object_inline_stack_3236.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_3245, + JSCompiler_object_inline_digest_3235, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = bailoutOffscreenComponent( null, - JSCompiler_object_inline_stack_3244 + JSCompiler_object_inline_stack_3236 ))); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), warnIfHydrating(), 0 !== (renderLanes & 536870912) && markRenderDerivedCause(workInProgress), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_3242)) + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_3237 + )) ) { - JSCompiler_object_inline_componentStack_3245 = - JSCompiler_object_inline_message_3242.nextSibling && - JSCompiler_object_inline_message_3242.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_3245) { - nextPrimaryChildren = - JSCompiler_object_inline_componentStack_3245.dgst; - var message = JSCompiler_object_inline_componentStack_3245.msg; - nextFallbackChildren = - JSCompiler_object_inline_componentStack_3245.stck; - var componentStack = - JSCompiler_object_inline_componentStack_3245.cstck; + JSCompiler_object_inline_digest_3235 = + JSCompiler_object_inline_componentStack_3237.nextSibling && + JSCompiler_object_inline_componentStack_3237.nextSibling.dataset; + if (JSCompiler_object_inline_digest_3235) { + nextPrimaryChildren = JSCompiler_object_inline_digest_3235.dgst; + var message = JSCompiler_object_inline_digest_3235.msg; + nextFallbackChildren = JSCompiler_object_inline_digest_3235.stck; + var componentStack = JSCompiler_object_inline_digest_3235.cstck; } - JSCompiler_object_inline_message_3242 = message; - JSCompiler_object_inline_digest_3243 = nextPrimaryChildren; - JSCompiler_object_inline_stack_3244 = nextFallbackChildren; - JSCompiler_object_inline_componentStack_3245 = componentStack; - nextPrimaryChildren = JSCompiler_object_inline_digest_3243; - nextFallbackChildren = JSCompiler_object_inline_message_3242; - componentStack = JSCompiler_object_inline_componentStack_3245; - "POSTPONE" !== nextPrimaryChildren && - ((JSCompiler_object_inline_componentStack_3245 = - nextFallbackChildren - ? Error(nextFallbackChildren) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." - )), - (JSCompiler_object_inline_componentStack_3245.stack = - JSCompiler_object_inline_stack_3244 || ""), - (JSCompiler_object_inline_componentStack_3245.digest = - nextPrimaryChildren), - (JSCompiler_object_inline_stack_3244 = - void 0 === componentStack ? null : componentStack), - (nextPrimaryChildren = { - value: JSCompiler_object_inline_componentStack_3245, - source: null, - stack: JSCompiler_object_inline_stack_3244 - }), - "string" === typeof JSCompiler_object_inline_stack_3244 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_3245, - nextPrimaryChildren - ), - queueHydrationError(nextPrimaryChildren)); + JSCompiler_object_inline_message_3234 = message; + JSCompiler_object_inline_digest_3235 = nextPrimaryChildren; + JSCompiler_object_inline_stack_3236 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_3237 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_3234; + nextFallbackChildren = JSCompiler_object_inline_componentStack_3237; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_3236 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_3235; + JSCompiler_object_inline_digest_3235 = + void 0 === nextFallbackChildren ? null : nextFallbackChildren; + JSCompiler_object_inline_stack_3236 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_3235 + }; + "string" === typeof JSCompiler_object_inline_digest_3235 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_3236 + ); + queueHydrationError(JSCompiler_object_inline_stack_3236); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -11620,48 +11602,51 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_3245 = + (JSCompiler_object_inline_digest_3235 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_3245) + didReceiveUpdate || JSCompiler_object_inline_digest_3235) ) { - JSCompiler_object_inline_componentStack_3245 = workInProgressRoot; + JSCompiler_object_inline_digest_3235 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_componentStack_3245 && - ((JSCompiler_object_inline_stack_3244 = getBumpedLaneForHydration( - JSCompiler_object_inline_componentStack_3245, + null !== JSCompiler_object_inline_digest_3235 && + ((JSCompiler_object_inline_stack_3236 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_3235, renderLanes )), - 0 !== JSCompiler_object_inline_stack_3244 && - JSCompiler_object_inline_stack_3244 !== prevState.retryLane) + 0 !== JSCompiler_object_inline_stack_3236 && + JSCompiler_object_inline_stack_3236 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_3244), + ((prevState.retryLane = JSCompiler_object_inline_stack_3236), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_3244 + JSCompiler_object_inline_stack_3236 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_3245, + JSCompiler_object_inline_digest_3235, current, - JSCompiler_object_inline_stack_3244 + JSCompiler_object_inline_stack_3236 ), SelectiveHydrationException) ); - isSuspenseInstancePending(JSCompiler_object_inline_message_3242) || - renderDidSuspendDelayIfPossible(); + isSuspenseInstancePending( + JSCompiler_object_inline_componentStack_3237 + ) || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, renderLanes ); } else - isSuspenseInstancePending(JSCompiler_object_inline_message_3242) + isSuspenseInstancePending( + JSCompiler_object_inline_componentStack_3237 + ) ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_3242.nextSibling + JSCompiler_object_inline_componentStack_3237.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -11673,31 +11658,32 @@ restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_3244.children + JSCompiler_object_inline_stack_3236.children )), (workInProgress.flags |= 4096)); return workInProgress; } } - if (JSCompiler_object_inline_digest_3243) + if (JSCompiler_object_inline_message_3234) return ( reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = JSCompiler_object_inline_stack_3244.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_3236.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (JSCompiler_object_inline_message_3242 = componentStack.sibling), - (JSCompiler_object_inline_stack_3244 = createWorkInProgress( + (JSCompiler_object_inline_componentStack_3237 = + componentStack.sibling), + (JSCompiler_object_inline_stack_3236 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_3244.children + children: JSCompiler_object_inline_stack_3236.children } )), - (JSCompiler_object_inline_stack_3244.subtreeFlags = + (JSCompiler_object_inline_stack_3236.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== JSCompiler_object_inline_message_3242 + null !== JSCompiler_object_inline_componentStack_3237 ? (nextPrimaryChildren = createWorkInProgress( - JSCompiler_object_inline_message_3242, + JSCompiler_object_inline_componentStack_3237, nextPrimaryChildren )) : ((nextPrimaryChildren = createFiberFromFragment( @@ -11708,11 +11694,11 @@ )), (nextPrimaryChildren.flags |= 2)), (nextPrimaryChildren.return = workInProgress), - (JSCompiler_object_inline_stack_3244.return = workInProgress), - (JSCompiler_object_inline_stack_3244.sibling = nextPrimaryChildren), - (workInProgress.child = JSCompiler_object_inline_stack_3244), - bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3244), - (JSCompiler_object_inline_stack_3244 = workInProgress.child), + (JSCompiler_object_inline_stack_3236.return = workInProgress), + (JSCompiler_object_inline_stack_3236.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_3236), + bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_3236), + (JSCompiler_object_inline_stack_3236 = workInProgress.child), (nextPrimaryChildren = current.child.memoizedState), null === nextPrimaryChildren ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) @@ -11728,18 +11714,18 @@ baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: nextFallbackChildren })), - (JSCompiler_object_inline_stack_3244.memoizedState = + (JSCompiler_object_inline_stack_3236.memoizedState = nextPrimaryChildren), - (JSCompiler_object_inline_stack_3244.childLanes = + (JSCompiler_object_inline_stack_3236.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_3245, + JSCompiler_object_inline_digest_3235, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), bailoutOffscreenComponent( current.child, - JSCompiler_object_inline_stack_3244 + JSCompiler_object_inline_stack_3236 ) ); null !== prevState && @@ -11751,17 +11737,16 @@ current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_3244.children + children: JSCompiler_object_inline_stack_3236.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_3245 = - workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_3245 + ((JSCompiler_object_inline_digest_3235 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_3235 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_3245.push(current)); + : JSCompiler_object_inline_digest_3235.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11878,13 +11863,15 @@ tailMode = nextProps.tail, newChildren = nextProps.children, suspenseContext = suspenseStackCursor.current; + if (workInProgress.flags & 128) + return pushSuspenseListContext(workInProgress, suspenseContext), null; (nextProps = 0 !== (suspenseContext & ForceSuspenseFallback)) ? ((suspenseContext = (suspenseContext & SubtreeSuspenseContextMask) | ForceSuspenseFallback), (workInProgress.flags |= 128)) : (suspenseContext &= SubtreeSuspenseContextMask); - push(suspenseStackCursor, suspenseContext, workInProgress); + pushSuspenseListContext(workInProgress, suspenseContext); suspenseContext = null == revealOrder ? "null" : revealOrder; if ( null != revealOrder && @@ -12220,6 +12207,12 @@ pushPrimaryTreeSuspenseHandler(workInProgress); break; case 19: + if (workInProgress.flags & 128) + return updateSuspenseListComponent( + current, + workInProgress, + renderLanes + ); var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); stateNode || @@ -12244,11 +12237,7 @@ ((didSuspendBefore.rendering = null), (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); - push( - suspenseStackCursor, - suspenseStackCursor.current, - workInProgress - ); + pushSuspenseListContext(workInProgress, suspenseStackCursor.current); if (stateNode) break; else return null; case 22: @@ -13625,7 +13614,7 @@ null ); case 19: - pop(suspenseStackCursor, workInProgress); + popSuspenseListContext(workInProgress); newProps = workInProgress.memoizedState; if (null === newProps) return bubbleProperties(workInProgress), null; type = 0 !== (workInProgress.flags & 128); @@ -13654,12 +13643,11 @@ ) resetWorkInProgress(renderLanes, current), (renderLanes = renderLanes.sibling); - push( - suspenseStackCursor, + pushSuspenseListContext( + workInProgress, (suspenseStackCursor.current & SubtreeSuspenseContextMask) | - ForceSuspenseFallback, - workInProgress + ForceSuspenseFallback ); isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount); @@ -13710,23 +13698,43 @@ : (workInProgress.child = nextResource), (newProps.last = nextResource)); } - if (null !== newProps.tail) - return ( - (current = newProps.tail), - (newProps.rendering = current), - (newProps.tail = current.sibling), - (newProps.renderingStartTime = now$1()), - (current.sibling = null), - (renderLanes = suspenseStackCursor.current), - (renderLanes = type - ? (renderLanes & SubtreeSuspenseContextMask) | - ForceSuspenseFallback - : renderLanes & SubtreeSuspenseContextMask), - push(suspenseStackCursor, renderLanes, workInProgress), - isHydrating && - pushTreeFork(workInProgress, newProps.treeForkCount), - current - ); + if (null !== newProps.tail) { + current = newProps.tail; + a: { + for (renderLanes = current; null !== renderLanes; ) { + if (null !== renderLanes.alternate) { + renderLanes = !1; + break a; + } + renderLanes = renderLanes.sibling; + } + renderLanes = !0; + } + newProps.rendering = current; + newProps.tail = current.sibling; + newProps.renderingStartTime = now$1(); + current.sibling = null; + nextResource = suspenseStackCursor.current; + nextResource = type + ? (nextResource & SubtreeSuspenseContextMask) | + ForceSuspenseFallback + : nextResource & SubtreeSuspenseContextMask; + "visible" === newProps.tailMode || + "collapsed" === newProps.tailMode || + !renderLanes || + isHydrating + ? pushSuspenseListContext(workInProgress, nextResource) + : ((renderLanes = nextResource), + push( + suspenseHandlerStackCursor, + workInProgress, + workInProgress + ), + push(suspenseStackCursor, renderLanes, workInProgress), + null === shellBoundary && (shellBoundary = workInProgress)); + isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount); + return current; + } bubbleProperties(workInProgress); return null; case 22: @@ -13848,7 +13856,18 @@ workInProgress) : null; case 19: - return pop(suspenseStackCursor, workInProgress), null; + return ( + popSuspenseListContext(workInProgress), + (current = workInProgress.flags), + current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (current = workInProgress.memoizedState), + null !== current && + ((current.rendering = null), (current.tail = null)), + (workInProgress.flags |= 4), + workInProgress) + : null + ); case 4: return popHostContainer(workInProgress), null; case 10: @@ -13898,7 +13917,7 @@ popSuspenseHandler(interruptedWork); break; case 19: - pop(suspenseStackCursor, interruptedWork); + popSuspenseListContext(interruptedWork); break; case 10: popProvider(interruptedWork.type, interruptedWork); @@ -18824,7 +18843,8 @@ case RootFatalErrored: throw Error("Root did not complete. This is a bug in React."); case RootSuspendedWithDelay: - if ((lanes & 4194048) !== lanes) break; + if ((lanes & 4194048) !== lanes && (lanes & 62914560) !== lanes) + break; case RootSuspendedAtTheShell: setCurrentTrackFromLanes(lanes); logSuspendedRenderPhase( @@ -19729,11 +19749,6 @@ !1 ); } - function queueConcurrentError(error) { - null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [error]) - : workInProgressRootConcurrentErrors.push(error); - } function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; @@ -28285,7 +28300,6 @@ REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"); Symbol.for("react.tracing_marker"); var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), - REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, ASYNC_ITERATOR = Symbol.asyncIterator, @@ -32444,11 +32458,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-f646e8ff-20251104" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-dd048c3b-20251105" !== 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.3.0-experimental-f646e8ff-20251104\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-dd048c3b-20251105\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -32485,10 +32499,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.3.0-experimental-f646e8ff-20251104", + version: "19.3.0-experimental-dd048c3b-20251105", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-f646e8ff-20251104" + reconcilerVersion: "19.3.0-experimental-dd048c3b-20251105" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -32966,7 +32980,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.3.0-experimental-f646e8ff-20251104"; + exports.version = "19.3.0-experimental-dd048c3b-20251105"; "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 9a6418def1af4b..5828d85c174b32 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 @@ -274,7 +274,6 @@ var REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"); Symbol.for("react.tracing_marker"); var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), - REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { @@ -5126,7 +5125,7 @@ function pushOffscreenSuspenseHandler(fiber) { ? (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), null === shellBoundary && (shellBoundary = fiber)) - : reuseSuspenseHandlerOnStack(fiber); + : reuseSuspenseHandlerOnStack(); } function reuseSuspenseHandlerOnStack() { push(suspenseStackCursor, suspenseStackCursor.current); @@ -5138,6 +5137,15 @@ function popSuspenseHandler(fiber) { pop(suspenseStackCursor); } var suspenseStackCursor = createCursor(0); +function pushSuspenseListContext(fiber, newContext) { + push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); + push(suspenseStackCursor, newContext); +} +function popSuspenseListContext(fiber) { + pop(suspenseStackCursor); + pop(suspenseHandlerStackCursor); + shellBoundary === fiber && (shellBoundary = null); +} function findFirstSuspended(row) { for (var node = row; null !== node; ) { if (13 === node.tag) { @@ -6887,27 +6895,6 @@ function initializeClassErrorUpdate(update, root, fiber, errorInfo) { }); }); } -function resetSuspendedComponent(sourceFiber, rootRenderLanes) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); -} -function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes -) { - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; -} function throwException( root, returnFiber, @@ -6920,61 +6907,62 @@ function throwException( if ( null !== value && "object" === typeof value && - (value.$$typeof === REACT_POSTPONE_TYPE && - (value = { then: function () {} }), - "function" === typeof value.then) + "function" === typeof value.then ) { - resetSuspendedComponent(sourceFiber, rootRenderLanes); - var suspenseBoundary = suspenseHandlerStackCursor.current; - if (null !== suspenseBoundary) { - switch (suspenseBoundary.tag) { + returnFiber = sourceFiber.alternate; + null !== returnFiber && + propagateParentContextChanges( + returnFiber, + sourceFiber, + rootRenderLanes, + !0 + ); + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 31: case 13: + case 19: return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === suspenseBoundary.alternate && + : null === sourceFiber.alternate && 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 3), - (suspenseBoundary.flags &= -257), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? (suspenseBoundary.updateQueue = new Set([value])) - : sourceFiber.add(value), + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), attachPingListener(root, value, rootRenderLanes)), !1 ); case 22: return ( - (suspenseBoundary.flags |= 65536), + (sourceFiber.flags |= 65536), value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? ((sourceFiber = { + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { transitions: null, markerInstances: null, retryQueue: new Set([value]) }), - (suspenseBoundary.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), attachPingListener(root, value, rootRenderLanes)), !1 ); } - throw Error(formatProdErrorMessage(435, suspenseBoundary.tag)); + throw Error(formatProdErrorMessage(435, sourceFiber.tag)); } attachPingListener(root, value, rootRenderLanes); renderDidSuspendDelayIfPossible(); @@ -6982,17 +6970,11 @@ function throwException( } if (isHydrating) return ( - (suspenseBoundary = suspenseHandlerStackCursor.current), - null !== suspenseBoundary - ? (0 === (suspenseBoundary.flags & 65536) && - (suspenseBoundary.flags |= 256), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && ((root = Error(formatProdErrorMessage(422), { cause: value })), queueHydrationError(createCapturedValueAtFiber(root, sourceFiber)))) @@ -7007,10 +6989,10 @@ function throwException( (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -7018,58 +7000,54 @@ function throwException( (workInProgressRootExitStatus = 2)), !1 ); - suspenseBoundary = Error(formatProdErrorMessage(520), { cause: value }); - queueConcurrentError( - createCapturedValueAtFiber(suspenseBoundary, sourceFiber) - ); + var wrapperError = Error(formatProdErrorMessage(520), { cause: value }); + wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber); + null === workInProgressRootConcurrentErrors + ? (workInProgressRootConcurrentErrors = [wrapperError]) + : workInProgressRootConcurrentErrors.push(wrapperError); 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (returnFiber.tag) { + switch (sourceFiber.tag) { case 3: return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (returnFiber.lanes |= root), - (root = createRootErrorUpdate( - returnFiber.stateNode, - sourceFiber, - root - )), - enqueueCapturedUpdate(returnFiber, root), + (sourceFiber.lanes |= root), + (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((value = returnFiber.type), - (suspenseBoundary = returnFiber.stateNode), - 0 === (returnFiber.flags & 128) && - ("function" === typeof value.getDerivedStateFromError || - (null !== suspenseBoundary && - "function" === typeof suspenseBoundary.componentDidCatch && + ((returnFiber = sourceFiber.type), + (wrapperError = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== wrapperError && + "function" === typeof wrapperError.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - suspenseBoundary - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError))))) ) return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (returnFiber.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - returnFiber, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(returnFiber, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - returnFiber = returnFiber.return; - } while (null !== returnFiber); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } var SelectiveHydrationException = Error(formatProdErrorMessage(461)), @@ -7266,11 +7244,11 @@ function updateOffscreenComponent( null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), pushHiddenContext(workInProgress, prevState), - reuseSuspenseHandlerOnStack(workInProgress), + reuseSuspenseHandlerOnStack(), (workInProgress.memoizedState = null)) : (null !== current && pushTransition(workInProgress, null), reuseHiddenContextOnStack(), - reuseSuspenseHandlerOnStack(workInProgress)); + reuseSuspenseHandlerOnStack()); reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } @@ -7809,7 +7787,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { if (isHydrating) { showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress) - : reuseSuspenseHandlerOnStack(workInProgress); + : reuseSuspenseHandlerOnStack(); (current = nextHydratableInstance) ? ((current = canHydrateHydrationBoundary( current, @@ -7842,7 +7820,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextFallbackChildren = nextProps.fallback; if (showFallback) return ( - reuseSuspenseHandlerOnStack(workInProgress), + reuseSuspenseHandlerOnStack(), mountSuspenseFallbackChildren( workInProgress, nextPrimaryChildren, @@ -7861,7 +7839,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ); if ("number" === typeof nextProps.unstable_expectedLoadTime) return ( - reuseSuspenseHandlerOnStack(workInProgress), + reuseSuspenseHandlerOnStack(), mountSuspenseFallbackChildren( workInProgress, nextPrimaryChildren, @@ -7898,11 +7876,11 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes ))) : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), + ? (reuseSuspenseHandlerOnStack(), (workInProgress.child = current.child), (workInProgress.flags |= 128), (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), + : (reuseSuspenseHandlerOnStack(), (nextPrimaryChildren = nextProps.fallback), (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( @@ -7945,11 +7923,10 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextPrimaryChildren.nextSibling.dataset; if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; JSCompiler_temp = digest; - "POSTPONE" !== JSCompiler_temp && - ((nextProps = Error(formatProdErrorMessage(419))), - (nextProps.stack = ""), - (nextProps.digest = JSCompiler_temp), - queueHydrationError({ value: nextProps, source: null, stack: null })); + nextProps = Error(formatProdErrorMessage(419)); + nextProps.stack = ""; + nextProps.digest = JSCompiler_temp; + queueHydrationError({ value: nextProps, source: null, stack: null }); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -8004,7 +7981,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) return ( - reuseSuspenseHandlerOnStack(workInProgress), + reuseSuspenseHandlerOnStack(), (nextPrimaryChildren = nextProps.fallback), (showFallback = workInProgress.mode), (nextFallbackChildren = current.child), @@ -8181,13 +8158,15 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { revealOrder = nextProps.revealOrder, tailMode = nextProps.tail; nextProps = nextProps.children; - var suspenseContext = suspenseStackCursor.current, - shouldForceFallback = 0 !== (suspenseContext & 2); + var suspenseContext = suspenseStackCursor.current; + if (workInProgress.flags & 128) + return pushSuspenseListContext(workInProgress, suspenseContext), null; + var shouldForceFallback = 0 !== (suspenseContext & 2); shouldForceFallback ? ((suspenseContext = (suspenseContext & 1) | 2), (workInProgress.flags |= 128)) : (suspenseContext &= 1); - push(suspenseStackCursor, suspenseContext); + pushSuspenseListContext(workInProgress, suspenseContext); "backwards" === revealOrder && null !== current ? (reverseChildren(current), reconcileChildren(current, workInProgress, nextProps, renderLanes), @@ -8385,6 +8364,12 @@ function attemptEarlyBailoutIfNoScheduledUpdate( pushPrimaryTreeSuspenseHandler(workInProgress); break; case 19: + if (workInProgress.flags & 128) + return updateSuspenseListComponent( + current, + workInProgress, + renderLanes + ); var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); stateNode || @@ -8409,7 +8394,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( ((didSuspendBefore.rendering = null), (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); - push(suspenseStackCursor, suspenseStackCursor.current); + pushSuspenseListContext(workInProgress, suspenseStackCursor.current); if (stateNode) break; else return null; case 22: @@ -9466,7 +9451,7 @@ function completeWork(current, workInProgress, renderLanes) { popProvider(workInProgress.type), bubbleProperties(workInProgress), null ); case 19: - pop(suspenseStackCursor); + popSuspenseListContext(workInProgress); newProps = workInProgress.memoizedState; if (null === newProps) return bubbleProperties(workInProgress), null; type = 0 !== (workInProgress.flags & 128); @@ -9491,8 +9476,8 @@ function completeWork(current, workInProgress, renderLanes) { for (renderLanes = workInProgress.child; null !== renderLanes; ) resetWorkInProgress(renderLanes, current), (renderLanes = renderLanes.sibling); - push( - suspenseStackCursor, + pushSuspenseListContext( + workInProgress, (suspenseStackCursor.current & 1) | 2 ); isHydrating && @@ -9544,21 +9529,36 @@ function completeWork(current, workInProgress, renderLanes) { : (workInProgress.child = nextResource), (newProps.last = nextResource)); } - if (null !== newProps.tail) - return ( - (current = newProps.tail), - (newProps.rendering = current), - (newProps.tail = current.sibling), - (newProps.renderingStartTime = now$1()), - (current.sibling = null), - (renderLanes = suspenseStackCursor.current), - push( - suspenseStackCursor, - type ? (renderLanes & 1) | 2 : renderLanes & 1 - ), - isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount), - current - ); + if (null !== newProps.tail) { + current = newProps.tail; + a: { + for (renderLanes = current; null !== renderLanes; ) { + if (null !== renderLanes.alternate) { + renderLanes = !1; + break a; + } + renderLanes = renderLanes.sibling; + } + renderLanes = !0; + } + newProps.rendering = current; + newProps.tail = current.sibling; + newProps.renderingStartTime = now$1(); + current.sibling = null; + nextResource = suspenseStackCursor.current; + nextResource = type ? (nextResource & 1) | 2 : nextResource & 1; + "visible" === newProps.tailMode || + "collapsed" === newProps.tailMode || + !renderLanes || + isHydrating + ? pushSuspenseListContext(workInProgress, nextResource) + : ((renderLanes = nextResource), + push(suspenseHandlerStackCursor, workInProgress), + push(suspenseStackCursor, renderLanes), + null === shellBoundary && (shellBoundary = workInProgress)); + isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount); + return current; + } bubbleProperties(workInProgress); return null; case 22: @@ -9670,7 +9670,18 @@ function unwindWork(current, workInProgress) { workInProgress) : null; case 19: - return pop(suspenseStackCursor), null; + return ( + popSuspenseListContext(workInProgress), + (current = workInProgress.flags), + current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (current = workInProgress.memoizedState), + null !== current && + ((current.rendering = null), (current.tail = null)), + (workInProgress.flags |= 4), + workInProgress) + : null + ); case 4: return popHostContainer(), null; case 10: @@ -9720,7 +9731,7 @@ function unwindInterruptedWork(current, interruptedWork) { popSuspenseHandler(interruptedWork); break; case 19: - pop(suspenseStackCursor); + popSuspenseListContext(interruptedWork); break; case 10: popProvider(interruptedWork.type); @@ -9882,8 +9893,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$170) { - captureCommitPhaseError(current, nearestMountedAncestor, error$170); + } catch (error$171) { + captureCommitPhaseError(current, nearestMountedAncestor, error$171); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -9954,8 +9965,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$172) { - captureCommitPhaseError(current, nearestMountedAncestor, error$172); + } catch (error$173) { + captureCommitPhaseError(current, nearestMountedAncestor, error$173); } else ref.current = null; } @@ -10871,11 +10882,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$167) { + } catch (error$168) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$167 + error$168 ); } else { @@ -10892,11 +10903,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { prevState, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$168) { + } catch (error$169) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$168 + error$169 ); } recordEffectDuration(); @@ -10907,11 +10918,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { prevState, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$169) { + } catch (error$170) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$169 + error$170 ); } } @@ -11810,14 +11821,14 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { var wasHidden = null !== current && null !== current.memoizedState, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden, - prevOffscreenDirectParentIsHidden$191 = offscreenDirectParentIsHidden; + prevOffscreenDirectParentIsHidden$192 = offscreenDirectParentIsHidden; offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot; offscreenDirectParentIsHidden = - prevOffscreenDirectParentIsHidden$191 || hoistableRoot; + prevOffscreenDirectParentIsHidden$192 || hoistableRoot; offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden; recursivelyTraverseMutationEffects(root, finishedWork, lanes); offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - offscreenDirectParentIsHidden = prevOffscreenDirectParentIsHidden$191; + offscreenDirectParentIsHidden = prevOffscreenDirectParentIsHidden$192; offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; wasHidden && !hoistableRoot && @@ -12026,25 +12037,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$173 = hostParentFiber.stateNode; + var parent$174 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$173, ""), (hostParentFiber.flags &= -33)); - var before$174 = getHostSibling(finishedWork); + (setTextContent(parent$174, ""), (hostParentFiber.flags &= -33)); + var before$175 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$174, - parent$173, + before$175, + parent$174, parentFragmentInstances ); break; case 3: case 4: - var parent$175 = hostParentFiber.stateNode.containerInfo, - before$176 = getHostSibling(finishedWork); + var parent$176 = hostParentFiber.stateNode.containerInfo, + before$177 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$176, - parent$175, + before$177, + parent$176, parentFragmentInstances ); break; @@ -13620,7 +13631,7 @@ function recursivelyInsertClones( if (null === nextPhase) recursivelyInsertNewFiber(deletions, i, parentViewTransition, 5); else { - var nextPhase$218 = deletions.flags; + var nextPhase$219 = deletions.flags; switch (deletions.tag) { case 26: recursivelyInsertClones( @@ -13646,16 +13657,16 @@ function recursivelyInsertClones( (setTextContent(clone, ""), (viewTransitionMutationContext = !0))) : (clone = clone.cloneNode(!1)); - if (nextPhase$218 & 4) { - nextPhase$218 = clone; + if (nextPhase$219 & 4) { + nextPhase$219 = clone; var newProps = deletions.memoizedProps; updateProperties( - nextPhase$218, + nextPhase$219, deletions.type, nextPhase.memoizedProps, newProps ); - nextPhase$218[internalPropsKey] = newProps; + nextPhase$219[internalPropsKey] = newProps; } 1 === visitPhase || 2 === visitPhase ? (i.appendChild(clone), @@ -13674,7 +13685,7 @@ function recursivelyInsertClones( if (null === parentViewTransition) throw Error(formatProdErrorMessage(162)); parentViewTransition = parentViewTransition.cloneNode(!1); - nextPhase$218 & 4 && + nextPhase$219 & 4 && ((parentViewTransition.nodeValue = nextPhase.memoizedProps), (viewTransitionMutationContext = !0)); i.appendChild(parentViewTransition); @@ -13687,7 +13698,7 @@ function recursivelyInsertClones( case 22: null === deletions.memoizedState ? ((nextPhase = - 0 === visitPhase && 0 !== (nextPhase$218 & 8192) + 0 === visitPhase && 0 !== (nextPhase$219 & 8192) ? 1 : visitPhase), recursivelyInsertClones( @@ -13705,8 +13716,8 @@ function recursivelyInsertClones( parentViewTransition = pushMutationContext(); clone = deletions.stateNode; clone.clones = null; - nextPhase$218 = 1 === visitPhase ? 2 : visitPhase; - recursivelyInsertClones(deletions, i, clone, nextPhase$218); + nextPhase$219 = 1 === visitPhase ? 2 : visitPhase; + recursivelyInsertClones(deletions, i, clone, nextPhase$219); viewTransitionMutationContext && (deletions.flags |= 4); 1 === visitPhase ? applyExitViewTransition(deletions) @@ -14106,7 +14117,8 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { case 1: throw Error(formatProdErrorMessage(345)); case 4: - if ((lanes & 4194048) !== lanes) break; + if ((lanes & 4194048) !== lanes && (lanes & 62914560) !== lanes) + break; case 6: setCurrentTrackFromLanes(lanes); logSuspendedRenderPhase(renderStartTime, yieldDuration, lanes); @@ -14808,11 +14820,6 @@ function renderDidSuspendDelayIfPossible() { !1 ); } -function queueConcurrentError(error) { - null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [error]) - : workInProgressRootConcurrentErrors.push(error); -} function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; @@ -14868,8 +14875,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$229) { - handleThrow(root, thrownValue$229); + } catch (thrownValue$230) { + handleThrow(root, thrownValue$230); } while (1); lanes && root.shellSuspendCounter++; @@ -14994,8 +15001,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$231) { - handleThrow(root, thrownValue$231); + } catch (thrownValue$232) { + handleThrow(root, thrownValue$232); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -15844,26 +15851,26 @@ function commitGestureOnRoot( } var rotate = computedStyle.rotate; if ("none" !== rotate && "" !== rotate) { - var parts$310 = rotate.split(" "); + var parts$311 = rotate.split(" "); transform = - 1 === parts$310.length - ? "rotate(" + parts$310[0] + ") " + transform - : 2 === parts$310.length + 1 === parts$311.length + ? "rotate(" + parts$311[0] + ") " + transform + : 2 === parts$311.length ? "rotate" + - parts$310[0].toUpperCase() + + parts$311[0].toUpperCase() + "(" + - parts$310[1] + + parts$311[1] + ") " + transform - : "rotate3d(" + parts$310.join(", ") + ") " + transform; + : "rotate3d(" + parts$311.join(", ") + ") " + transform; } var translate = computedStyle.translate; if ("none" !== translate && "" !== translate) { - var parts$311 = translate.split(" "); + var parts$312 = translate.split(" "); transform = - (3 === parts$311.length ? "translate3d" : "translate") + + (3 === parts$312.length ? "translate3d" : "translate") + "(" + - parts$311.join(", ") + + parts$312.join(", ") + ") " + transform; } @@ -16246,14 +16253,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$238 = firstScheduledRoot; null !== root$238; ) { + for (var root$239 = firstScheduledRoot; null !== root$239; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$238.pendingLanes; + var pendingLanes = root$239.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$238.suspendedLanes, - pingedLanes = root$238.pingedLanes; + var suspendedLanes = root$239.suspendedLanes, + pingedLanes = root$239.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -16267,21 +16274,21 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$238, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$239, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$238, - root$238 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$238.cancelPendingCommit || - -1 !== root$238.timeoutHandle + root$239, + root$239 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$239.cancelPendingCommit || + -1 !== root$239.timeoutHandle )), (0 === (JSCompiler_inline_result & 3) && 64 !== JSCompiler_inline_result) || - checkIfRootIsPrerendering(root$238, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$239, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$238, JSCompiler_inline_result)); - root$238 = root$238.next; + performSyncWorkOnRoot(root$239, JSCompiler_inline_result)); + root$239 = root$239.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -16610,20 +16617,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_2092 = 0; - i$jscomp$inline_2092 < simpleEventPluginEvents.length; - i$jscomp$inline_2092++ + var i$jscomp$inline_2076 = 0; + i$jscomp$inline_2076 < simpleEventPluginEvents.length; + i$jscomp$inline_2076++ ) { - var eventName$jscomp$inline_2093 = - simpleEventPluginEvents[i$jscomp$inline_2092], - domEventName$jscomp$inline_2094 = - eventName$jscomp$inline_2093.toLowerCase(), - capitalizedEvent$jscomp$inline_2095 = - eventName$jscomp$inline_2093[0].toUpperCase() + - eventName$jscomp$inline_2093.slice(1); + var eventName$jscomp$inline_2077 = + simpleEventPluginEvents[i$jscomp$inline_2076], + domEventName$jscomp$inline_2078 = + eventName$jscomp$inline_2077.toLowerCase(), + capitalizedEvent$jscomp$inline_2079 = + eventName$jscomp$inline_2077[0].toUpperCase() + + eventName$jscomp$inline_2077.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_2094, - "on" + capitalizedEvent$jscomp$inline_2095 + domEventName$jscomp$inline_2078, + "on" + capitalizedEvent$jscomp$inline_2079 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -17857,34 +17864,34 @@ function setInitialProperties(domElement, tag, props) { var propKey = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$252 = props[hasSrc]; - if (null != propValue$252) + var propValue$253 = props[hasSrc]; + if (null != propValue$253) switch (hasSrc) { case "name": - hasSrcSet = propValue$252; + hasSrcSet = propValue$253; break; case "type": - propValue = propValue$252; + propValue = propValue$253; break; case "checked": - checked = propValue$252; + checked = propValue$253; break; case "defaultChecked": - propKey = propValue$252; + propKey = propValue$253; break; case "value": - value = propValue$252; + value = propValue$253; break; case "defaultValue": - defaultValue = propValue$252; + defaultValue = propValue$253; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$252) + if (null != propValue$253) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$252, props, null); + setProp(domElement, tag, hasSrc, propValue$253, props, null); } } a: { @@ -18067,14 +18074,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$252 in props) - props.hasOwnProperty(propValue$252) && - ((hasSrc = props[propValue$252]), + for (propValue$253 in props) + props.hasOwnProperty(propValue$253) && + ((hasSrc = props[propValue$253]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$252, + propValue$253, hasSrc, props, void 0 @@ -18121,14 +18128,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$269 in nextProps) { - var propKey = nextProps[propKey$269]; - lastProp = lastProps[propKey$269]; + for (var propKey$270 in nextProps) { + var propKey = nextProps[propKey$270]; + lastProp = lastProps[propKey$270]; if ( - nextProps.hasOwnProperty(propKey$269) && + nextProps.hasOwnProperty(propKey$270) && (null != propKey || null != lastProp) ) - switch (propKey$269) { + switch (propKey$270) { case "type": propKey !== lastProp && (viewTransitionMutationContext = !0); type = propKey; @@ -18163,7 +18170,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$269, + propKey$270, propKey, nextProps, lastProp @@ -18182,7 +18189,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$269 = null; + propKey = value = defaultValue = propKey$270 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -18214,7 +18221,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && (viewTransitionMutationContext = !0); - propKey$269 = type; + propKey$270 = type; break; case "defaultValue": type !== lastDefaultValue && (viewTransitionMutationContext = !0); @@ -18237,15 +18244,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$269 - ? updateOptions(domElement, !!lastProps, propKey$269, !1) + null != propKey$270 + ? updateOptions(domElement, !!lastProps, propKey$270, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$269 = null; + propKey = propKey$270 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -18270,7 +18277,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && (viewTransitionMutationContext = !0); - propKey$269 = name; + propKey$270 = name; break; case "defaultValue": name !== type && (viewTransitionMutationContext = !0); @@ -18285,17 +18292,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$269, propKey); + updateTextarea(domElement, propKey$270, propKey); return; case "option": - for (var propKey$285 in lastProps) + for (var propKey$286 in lastProps) if ( - ((propKey$269 = lastProps[propKey$285]), - lastProps.hasOwnProperty(propKey$285) && - null != propKey$269 && - !nextProps.hasOwnProperty(propKey$285)) + ((propKey$270 = lastProps[propKey$286]), + lastProps.hasOwnProperty(propKey$286) && + null != propKey$270 && + !nextProps.hasOwnProperty(propKey$286)) ) - switch (propKey$285) { + switch (propKey$286) { case "selected": domElement.selected = !1; break; @@ -18303,34 +18310,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$285, + propKey$286, null, nextProps, - propKey$269 + propKey$270 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$269 = nextProps[lastDefaultValue]), + ((propKey$270 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$269 !== propKey && - (null != propKey$269 || null != propKey)) + propKey$270 !== propKey && + (null != propKey$270 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$269 !== propKey && (viewTransitionMutationContext = !0); + propKey$270 !== propKey && (viewTransitionMutationContext = !0); domElement.selected = - propKey$269 && - "function" !== typeof propKey$269 && - "symbol" !== typeof propKey$269; + propKey$270 && + "function" !== typeof propKey$270 && + "symbol" !== typeof propKey$270; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$269, + propKey$270, nextProps, propKey ); @@ -18351,24 +18358,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$290 in lastProps) - (propKey$269 = lastProps[propKey$290]), - lastProps.hasOwnProperty(propKey$290) && - null != propKey$269 && - !nextProps.hasOwnProperty(propKey$290) && - setProp(domElement, tag, propKey$290, null, nextProps, propKey$269); + for (var propKey$291 in lastProps) + (propKey$270 = lastProps[propKey$291]), + lastProps.hasOwnProperty(propKey$291) && + null != propKey$270 && + !nextProps.hasOwnProperty(propKey$291) && + setProp(domElement, tag, propKey$291, null, nextProps, propKey$270); for (checked in nextProps) if ( - ((propKey$269 = nextProps[checked]), + ((propKey$270 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$269 !== propKey && - (null != propKey$269 || null != propKey)) + propKey$270 !== propKey && + (null != propKey$270 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$269) + if (null != propKey$270) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -18376,7 +18383,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$269, + propKey$270, nextProps, propKey ); @@ -18384,49 +18391,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$295 in lastProps) - (propKey$269 = lastProps[propKey$295]), - lastProps.hasOwnProperty(propKey$295) && - void 0 !== propKey$269 && - !nextProps.hasOwnProperty(propKey$295) && + for (var propKey$296 in lastProps) + (propKey$270 = lastProps[propKey$296]), + lastProps.hasOwnProperty(propKey$296) && + void 0 !== propKey$270 && + !nextProps.hasOwnProperty(propKey$296) && setPropOnCustomElement( domElement, tag, - propKey$295, + propKey$296, void 0, nextProps, - propKey$269 + propKey$270 ); for (defaultChecked in nextProps) - (propKey$269 = nextProps[defaultChecked]), + (propKey$270 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$269 === propKey || - (void 0 === propKey$269 && void 0 === propKey) || + propKey$270 === propKey || + (void 0 === propKey$270 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$269, + propKey$270, nextProps, propKey ); return; } } - for (var propKey$300 in lastProps) - (propKey$269 = lastProps[propKey$300]), - lastProps.hasOwnProperty(propKey$300) && - null != propKey$269 && - !nextProps.hasOwnProperty(propKey$300) && - setProp(domElement, tag, propKey$300, null, nextProps, propKey$269); + for (var propKey$301 in lastProps) + (propKey$270 = lastProps[propKey$301]), + lastProps.hasOwnProperty(propKey$301) && + null != propKey$270 && + !nextProps.hasOwnProperty(propKey$301) && + setProp(domElement, tag, propKey$301, null, nextProps, propKey$270); for (lastProp in nextProps) - (propKey$269 = nextProps[lastProp]), + (propKey$270 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$269 === propKey || - (null == propKey$269 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$269, nextProps, propKey); + propKey$270 === propKey || + (null == propKey$270 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$270, nextProps, propKey); } function isLikelyStaticResource(initiatorType) { switch (initiatorType) { @@ -19199,20 +19206,20 @@ function startGestureTransition( ))) : (isExitGroupAnim = !0); } - var timing$317 = pseudoElement.getTiming(); + var timing$318 = pseudoElement.getTiming(); anim = rangeEnd - - (("number" === typeof timing$317.duration - ? timing$317.duration + (("number" === typeof timing$318.duration + ? timing$318.duration : 0) + - timing$317.delay) * + timing$318.delay) * longestDuration; - groupName = rangeEnd - timing$317.delay * longestDuration; + groupName = rangeEnd - timing$318.delay * longestDuration; if ( - "reverse" === timing$317.direction || - "alternate-reverse" === timing$317.direction + "reverse" === timing$318.direction || + "alternate-reverse" === timing$318.direction ) - (timing$317 = anim), (anim = groupName), (groupName = timing$317); + (timing$318 = anim), (anim = groupName), (groupName = timing$318); animateGesture( pseudoElement.getKeyframes(), pseudoElement.target, @@ -20342,26 +20349,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$326 = getResourcesFromRoot( + var styles$327 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$327 = styles$326.get(type); - resource$327 || + resource$328 = styles$327.get(type); + resource$328 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$327 = { + (resource$328 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$326.set(type, resource$327), - (styles$326 = JSCompiler_inline_result.querySelector( + styles$327.set(type, resource$328), + (styles$327 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$326._p && - ((resource$327.instance = styles$326), - (resource$327.state.loading = 5)), + !styles$327._p && + ((resource$328.instance = styles$327), + (resource$328.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -20374,16 +20381,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$326 || + styles$327 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$327.state + resource$328.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$327; + return resource$328; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -20480,37 +20487,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$332 = hoistableRoot.querySelector( + var instance$333 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$332) + if (instance$333) return ( (resource.state.loading |= 4), - (resource.instance = instance$332), - markNodeAsHoistable(instance$332), - instance$332 + (resource.instance = instance$333), + markNodeAsHoistable(instance$333), + instance$333 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$332 = ( + instance$333 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$332); - var linkInstance = instance$332; + markNodeAsHoistable(instance$333); + var linkInstance = instance$333; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$332, "link", instance); + setInitialProperties(instance$333, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$332, props.precedence, hoistableRoot); - return (resource.instance = instance$332); + insertStylesheet(instance$333, props.precedence, hoistableRoot); + return (resource.instance = instance$333); case "script": - instance$332 = getScriptKey(props.src); + instance$333 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$332) + getScriptSelectorFromKey(instance$333) )) ) return ( @@ -20519,7 +20526,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$332))) + if ((styleProps = preloadPropsMap.get(instance$333))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -21663,16 +21670,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_2510 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2494 = React.version; if ( - "19.3.0-experimental-f646e8ff-20251104" !== - isomorphicReactPackageVersion$jscomp$inline_2510 + "19.3.0-experimental-dd048c3b-20251105" !== + isomorphicReactPackageVersion$jscomp$inline_2494 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2510, - "19.3.0-experimental-f646e8ff-20251104" + isomorphicReactPackageVersion$jscomp$inline_2494, + "19.3.0-experimental-dd048c3b-20251105" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -21692,24 +21699,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_3220 = { +var internals$jscomp$inline_3212 = { bundleType: 0, - version: "19.3.0-experimental-f646e8ff-20251104", + version: "19.3.0-experimental-dd048c3b-20251105", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-f646e8ff-20251104" + reconcilerVersion: "19.3.0-experimental-dd048c3b-20251105" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_3221 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_3213 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_3221.isDisabled && - hook$jscomp$inline_3221.supportsFiber + !hook$jscomp$inline_3213.isDisabled && + hook$jscomp$inline_3213.supportsFiber ) try { - (rendererID = hook$jscomp$inline_3221.inject( - internals$jscomp$inline_3220 + (rendererID = hook$jscomp$inline_3213.inject( + internals$jscomp$inline_3212 )), - (injectedHook = hook$jscomp$inline_3221); + (injectedHook = hook$jscomp$inline_3213); } catch (err) {} } function getCrossOriginStringAs(as, input) { @@ -21965,7 +21972,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.3.0-experimental-f646e8ff-20251104"; +exports.version = "19.3.0-experimental-dd048c3b-20251105"; "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 67f5af9ef9620b..7a6d6c3a257c4f 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 @@ -4659,7 +4659,6 @@ onShellReady, onShellError, onFatalError, - onPostpone, formState ) { var abortSet = new Set(); @@ -4682,7 +4681,6 @@ this.partialBoundaries = []; this.trackedPostpones = null; this.onError = void 0 === onError ? defaultErrorHandler : onError; - this.onPostpone = void 0 === onPostpone ? noop : onPostpone; this.onAllReady = void 0 === onAllReady ? noop : onAllReady; this.onShellReady = void 0 === onShellReady ? noop : onShellReady; this.onShellError = void 0 === onShellError ? noop : onShellError; @@ -4701,7 +4699,6 @@ onShellReady, onShellError, onFatalError, - onPostpone, formState ) { var now = getCurrentTime(); @@ -4718,7 +4715,6 @@ onShellReady, onShellError, onFatalError, - onPostpone, formState ); renderState = createPendingSegment( @@ -5080,12 +5076,6 @@ boundary.errorStack = null !== error ? wasAborted + error : null; boundary.errorComponentStack = thrownInfo.componentStack; } - function logPostpone(request, reason, postponeInfo, debugTask) { - request = request.onPostpone; - debugTask - ? debugTask.run(request.bind(null, reason, postponeInfo)) - : request(reason, postponeInfo); - } function logRecoverableError(request, error, errorInfo, debugTask) { request = request.onError; error = debugTask @@ -6280,20 +6270,7 @@ } else (contentRootSegment.status = ERRORED), (error = thrownValue$2); - var thrownInfo = getThrownInfo(task.componentStack); - if ( - "object" === typeof error && - null !== error && - error.$$typeof === REACT_POSTPONE_TYPE - ) { - logPostpone( - request, - error.message, - thrownInfo, - task.debugTask - ); - var errorDigest = "POSTPONE"; - } else + var thrownInfo = getThrownInfo(task.componentStack), errorDigest = logRecoverableError( request, error, @@ -6515,10 +6492,14 @@ name + ">. The tree doesn't match so React will fallback to client rendering." ); - var childNodes = node[2]; - name = node[3]; - keyOrIndex = task.node; - task.replay = { nodes: childNodes, slots: name, pendingTasks: 1 }; + var childNodes = node[2], + childSlots = node[3]; + name = task.node; + task.replay = { + nodes: childNodes, + slots: childSlots, + pendingTasks: 1 + }; try { renderElement(request, task, keyPath, type, props, ref); if ( @@ -6536,21 +6517,26 @@ (x === SuspenseException || "function" === typeof x.then) ) throw ( - (task.node === keyOrIndex + (task.node === name ? (task.replay = replay) : childIndex.splice(i, 1), x) ); task.replay.pendingTasks--; - props = getThrownInfo(task.componentStack); - erroredReplay( - request, - task.blockedBoundary, - x, + type = getThrownInfo(task.componentStack); + props = request; + keyPath = task.blockedBoundary; + request = x; + ref = logRecoverableError(props, request, type, task.debugTask); + abortRemainingReplayNodes( props, + keyPath, childNodes, - name, - task.debugTask + childSlots, + request, + ref, + type, + !1 ); } task.replay = replay; @@ -6562,14 +6548,14 @@ ">. The tree doesn't match so React will fallback to client rendering." ); a: { - replay = void 0; - type = node[5]; - ref = node[2]; - name = node[3]; - keyOrIndex = null === node[4] ? [] : node[4][2]; + replay = request; + request = node[5]; + type = node[2]; + ref = node[3]; + name = null === node[4] ? [] : node[4][2]; node = null === node[4] ? null : node[4][3]; - var prevKeyPath = task.keyPath, - prevContext = task.formatContext, + keyOrIndex = task.keyPath; + var prevContext = task.formatContext, prevRow = task.row, previousReplaySet = task.replay, parentBoundary = task.blockedBoundary, @@ -6578,25 +6564,25 @@ fallback = props.fallback, fallbackAbortSet = new Set(); props = createSuspenseBoundary( - request, + replay, task.row, fallbackAbortSet, null, null ); props.parentFlushed = !0; - props.rootSegmentID = type; + props.rootSegmentID = request; task.blockedBoundary = props; task.hoistableState = props.contentState; task.keyPath = keyPath; task.formatContext = getSuspenseContentFormatContext( - request.resumableState, + replay.resumableState, prevContext ); task.row = null; - task.replay = { nodes: ref, slots: name, pendingTasks: 1 }; + task.replay = { nodes: type, slots: ref, pendingTasks: 1 }; try { - renderNode(request, task, content, -1); + renderNode(replay, task, content, -1); if ( 1 === task.replay.pendingTasks && 0 < task.replay.nodes.length @@ -6607,43 +6593,39 @@ task.replay.pendingTasks--; if (0 === props.pendingTasks && props.status === PENDING) { props.status = COMPLETED; - request.completedBoundaries.push(props); + replay.completedBoundaries.push(props); break a; } } catch (error) { (props.status = CLIENT_RENDERED), (childNodes = getThrownInfo(task.componentStack)), - "object" === typeof error && - null !== error && - error.$$typeof === REACT_POSTPONE_TYPE - ? (logPostpone( - request, - error.message, - childNodes, - task.debugTask - ), - (replay = "POSTPONE")) - : (replay = logRecoverableError( - request, - error, - childNodes, - task.debugTask - )), - encodeErrorForBoundary(props, replay, error, childNodes, !1), + (childSlots = logRecoverableError( + replay, + error, + childNodes, + task.debugTask + )), + encodeErrorForBoundary( + props, + childSlots, + error, + childNodes, + !1 + ), task.replay.pendingTasks--, - request.clientRenderedBoundaries.push(props); + replay.clientRenderedBoundaries.push(props); } finally { (task.blockedBoundary = parentBoundary), (task.hoistableState = parentHoistableState), (task.replay = previousReplaySet), - (task.keyPath = prevKeyPath), + (task.keyPath = keyOrIndex), (task.formatContext = prevContext), (task.row = prevRow); } props = createReplayTask( - request, + replay, null, - { nodes: keyOrIndex, slots: node, pendingTasks: 0 }, + { nodes: name, slots: node, pendingTasks: 0 }, fallback, -1, parentBoundary, @@ -6651,7 +6633,7 @@ fallbackAbortSet, [keyPath[0], "Suspense Fallback", keyPath[2]], getSuspenseFallbackFormatContext( - request.resumableState, + replay.resumableState, task.formatContext ), task.context, @@ -6664,7 +6646,7 @@ task.debugTask ); pushComponentStack(props); - request.pingedTasks.push(props); + replay.pingedTasks.push(props); } } childIndex.splice(i, 1); @@ -6998,15 +6980,24 @@ ) throw x; task.replay.pendingTasks--; - children = getThrownInfo(task.componentStack); - erroredReplay( + var thrownInfo = getThrownInfo(task.componentStack); + children = task.blockedBoundary; + var error = x, + errorDigest = logRecoverableError( + request, + error, + thrownInfo, + task.debugTask + ); + abortRemainingReplayNodes( request, - task.blockedBoundary, - x, children, childIndex, node, - task.debugTask + error, + errorDigest, + thrownInfo, + !1 ); } task.replay = replay; @@ -7025,15 +7016,18 @@ null !== task.replay && ((j = task.replay.slots), null !== j && "object" === typeof j) ) { - for (childIndex = 0; childIndex < replayNodes; childIndex++) { - node = children[childIndex]; - task.treeContext = pushTreeContext(replay, replayNodes, childIndex); - var resumeSegmentID = j[childIndex]; - "number" === typeof resumeSegmentID - ? (resumeNode(request, task, resumeSegmentID, node, childIndex), - delete j[childIndex]) - : renderNode(request, task, node, childIndex); - } + for (childIndex = 0; childIndex < replayNodes; childIndex++) + (node = children[childIndex]), + (task.treeContext = pushTreeContext( + replay, + replayNodes, + childIndex + )), + (error = j[childIndex]), + "number" === typeof error + ? (resumeNode(request, task, error, node, childIndex), + delete j[childIndex]) + : renderNode(request, task, node, childIndex); task.treeContext = replay; task.keyPath = prevKeyPath; task.componentStack = previousComponentStack; @@ -7304,35 +7298,6 @@ switchContext(previousContext); return; } - if ( - node.$$typeof === REACT_POSTPONE_TYPE && - null !== request.trackedPostpones && - null !== task.blockedBoundary - ) { - segment = request.trackedPostpones; - childIndex = getThrownInfo(task.componentStack); - logPostpone(request, node.message, childIndex, task.debugTask); - node = task.blockedSegment; - childIndex = createPendingSegment( - request, - node.chunks.length, - null, - task.formatContext, - node.lastPushedText, - !0 - ); - node.children.push(childIndex); - node.lastPushedText = !1; - trackPostpone(request, segment, task, childIndex); - task.formatContext = previousFormatContext; - task.context = previousContext; - task.keyPath = previousKeyPath; - task.treeContext = previousTreeContext; - task.componentStack = previousComponentStack; - task.debugTask = previousDebugTask; - switchContext(previousContext); - return; - } if ("Maximum call stack size exceeded" === node.message) { segment = thrownValue$3 === SuspenseException @@ -7359,37 +7324,6 @@ switchContext(previousContext); throw node; } - function erroredReplay( - request, - boundary, - error, - errorInfo, - replayNodes, - resumeSlots, - debugTask - ) { - "object" === typeof error && - null !== error && - error.$$typeof === REACT_POSTPONE_TYPE - ? (logPostpone(request, error.message, errorInfo, debugTask), - (debugTask = "POSTPONE")) - : (debugTask = logRecoverableError( - request, - error, - errorInfo, - debugTask - )); - abortRemainingReplayNodes( - request, - boundary, - replayNodes, - resumeSlots, - error, - debugTask, - errorInfo, - !1 - ); - } function abortTaskSoft(task) { var boundary = task.blockedBoundary, segment = task.blockedSegment; @@ -7504,63 +7438,19 @@ if (13 !== request.status && request.status !== CLOSED) { boundary = task.replay; if (null === boundary) { - "object" === typeof error && - null !== error && - error.$$typeof === REACT_POSTPONE_TYPE + null !== request.trackedPostpones && null !== segment ? ((boundary = request.trackedPostpones), - null !== boundary && null !== segment - ? (logPostpone( - request, - error.message, - errorInfo, - task.debugTask - ), - trackPostpone(request, boundary, task, segment), - finishedTask(request, null, task.row, segment)) - : ((segment = Error( - "The render was aborted with postpone when the shell is incomplete. Reason: " + - error.message - )), - logRecoverableError( - request, - segment, - errorInfo, - task.debugTask - ), - fatalError(request, segment, errorInfo, task.debugTask))) - : null !== request.trackedPostpones && null !== segment - ? ((boundary = request.trackedPostpones), - logRecoverableError( - request, - error, - errorInfo, - task.debugTask - ), - trackPostpone(request, boundary, task, segment), - finishedTask(request, null, task.row, segment)) - : (logRecoverableError( - request, - error, - errorInfo, - task.debugTask - ), - fatalError(request, error, errorInfo, task.debugTask)); + logRecoverableError(request, error, errorInfo, task.debugTask), + trackPostpone(request, boundary, task, segment), + finishedTask(request, null, task.row, segment)) + : (logRecoverableError(request, error, errorInfo, task.debugTask), + fatalError(request, error, errorInfo, task.debugTask)); return; } boundary.pendingTasks--; 0 === boundary.pendingTasks && 0 < boundary.nodes.length && - ("object" === typeof error && - null !== error && - error.$$typeof === REACT_POSTPONE_TYPE - ? (logPostpone(request, error.message, errorInfo, task.debugTask), - (segment = "POSTPONE")) - : (segment = logRecoverableError( - request, - error, - errorInfo, - null - )), + ((segment = logRecoverableError(request, error, errorInfo, null)), abortRemainingReplayNodes( request, null, @@ -7579,16 +7469,7 @@ if (boundary.status !== CLIENT_RENDERED) { if (null !== node && null !== segment) return ( - "object" === typeof error && - null !== error && - error.$$typeof === REACT_POSTPONE_TYPE - ? logPostpone(request, error.message, errorInfo, task.debugTask) - : logRecoverableError( - request, - error, - errorInfo, - task.debugTask - ), + logRecoverableError(request, error, errorInfo, task.debugTask), trackPostpone(request, node, task, segment), boundary.fallbackAbortableTasks.forEach(function (fallbackTask) { return abortTask(fallbackTask, request, error); @@ -7597,29 +7478,12 @@ finishedTask(request, boundary, task.row, segment) ); boundary.status = CLIENT_RENDERED; - if ( - "object" === typeof error && - null !== error && - error.$$typeof === REACT_POSTPONE_TYPE - ) { - logPostpone(request, error.message, errorInfo, task.debugTask); - if (null !== request.trackedPostpones && null !== segment) { - trackPostpone(request, request.trackedPostpones, task, segment); - finishedTask(request, task.blockedBoundary, task.row, segment); - boundary.fallbackAbortableTasks.forEach(function (fallbackTask) { - return abortTask(fallbackTask, request, error); - }); - boundary.fallbackAbortableTasks.clear(); - return; - } - segment = "POSTPONE"; - } else - segment = logRecoverableError( - request, - error, - errorInfo, - task.debugTask - ); + segment = logRecoverableError( + request, + error, + errorInfo, + task.debugTask + ); boundary.status = CLIENT_RENDERED; encodeErrorForBoundary(boundary, segment, error, errorInfo, !0); untrackBoundary(request, boundary); @@ -7852,35 +7716,34 @@ segment = task.blockedSegment; if (null === segment) { var prevTaskInDEV = void 0, - request$jscomp$0 = request; - request = task; - if (0 !== request.replay.pendingTasks) { - switchContext(request.context); + task$jscomp$0 = task; + if (0 !== task$jscomp$0.replay.pendingTasks) { + switchContext(task$jscomp$0.context); prevTaskInDEV = currentTaskInDEV; - currentTaskInDEV = request; + currentTaskInDEV = task$jscomp$0; try { - "number" === typeof request.replay.slots + "number" === typeof task$jscomp$0.replay.slots ? resumeNode( - request$jscomp$0, request, - request.replay.slots, - request.node, - request.childIndex + task$jscomp$0, + task$jscomp$0.replay.slots, + task$jscomp$0.node, + task$jscomp$0.childIndex ) - : retryNode(request$jscomp$0, request); + : retryNode(request, task$jscomp$0); if ( - 1 === request.replay.pendingTasks && - 0 < request.replay.nodes.length + 1 === task$jscomp$0.replay.pendingTasks && + 0 < task$jscomp$0.replay.nodes.length ) throw Error( "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering." ); - request.replay.pendingTasks--; - request.abortSet.delete(request); + task$jscomp$0.replay.pendingTasks--; + task$jscomp$0.abortSet.delete(task$jscomp$0); finishedTask( - request$jscomp$0, - request.blockedBoundary, - request.row, + request, + task$jscomp$0.blockedBoundary, + task$jscomp$0.row, null ); } catch (thrownValue) { @@ -7894,223 +7757,179 @@ null !== x && "function" === typeof x.then ) { - var ping = request.ping; + var ping = task$jscomp$0.ping; x.then(ping, ping); - request.thenableState = + task$jscomp$0.thenableState = thrownValue === SuspenseException ? getThenableStateAfterSuspending() : null; } else { - request.replay.pendingTasks--; - request.abortSet.delete(request); - var errorInfo = getThrownInfo(request.componentStack); - erroredReplay( + task$jscomp$0.replay.pendingTasks--; + task$jscomp$0.abortSet.delete(task$jscomp$0); + var errorInfo = getThrownInfo(task$jscomp$0.componentStack), + request$jscomp$0 = request, + boundary = task$jscomp$0.blockedBoundary, + error$jscomp$0 = + 12 === request.status ? request.fatalError : x, + errorInfo$jscomp$0 = errorInfo, + replayNodes = task$jscomp$0.replay.nodes, + resumeSlots = task$jscomp$0.replay.slots, + errorDigest = logRecoverableError( + request$jscomp$0, + error$jscomp$0, + errorInfo$jscomp$0, + task$jscomp$0.debugTask + ); + abortRemainingReplayNodes( request$jscomp$0, - request.blockedBoundary, - 12 === request$jscomp$0.status - ? request$jscomp$0.fatalError - : x, - errorInfo, - request.replay.nodes, - request.replay.slots, - request.debugTask + boundary, + replayNodes, + resumeSlots, + error$jscomp$0, + errorDigest, + errorInfo$jscomp$0, + !1 ); - request$jscomp$0.pendingRootTasks--; - 0 === request$jscomp$0.pendingRootTasks && - completeShell(request$jscomp$0); - request$jscomp$0.allPendingTasks--; - 0 === request$jscomp$0.allPendingTasks && - completeAll(request$jscomp$0); + request.pendingRootTasks--; + 0 === request.pendingRootTasks && completeShell(request); + request.allPendingTasks--; + 0 === request.allPendingTasks && completeAll(request); } } finally { currentTaskInDEV = prevTaskInDEV; } } - } else - a: { - request$jscomp$0 = prevTaskInDEV = void 0; - var task$jscomp$0 = task, - segment$jscomp$0 = segment; - if (segment$jscomp$0.status === PENDING) { - segment$jscomp$0.status = 6; - switchContext(task$jscomp$0.context); - request$jscomp$0 = currentTaskInDEV; - currentTaskInDEV = task$jscomp$0; - var childrenLength = segment$jscomp$0.children.length, - chunkLength = segment$jscomp$0.chunks.length; - try { - retryNode(request, task$jscomp$0), - pushSegmentFinale( - segment$jscomp$0.chunks, - request.renderState, - segment$jscomp$0.lastPushedText, - segment$jscomp$0.textEmbedded - ), - task$jscomp$0.abortSet.delete(task$jscomp$0), - (segment$jscomp$0.status = COMPLETED), - finishedTask( - request, - task$jscomp$0.blockedBoundary, - task$jscomp$0.row, - segment$jscomp$0 - ); - } catch (thrownValue) { - resetHooksState(); - segment$jscomp$0.children.length = childrenLength; - segment$jscomp$0.chunks.length = chunkLength; - var x$jscomp$0 = - thrownValue === SuspenseException - ? getSuspendedThenable() - : 12 === request.status - ? request.fatalError - : thrownValue; - if ( - 12 === request.status && - null !== request.trackedPostpones - ) { - var trackedPostpones = request.trackedPostpones, - thrownInfo = getThrownInfo( - task$jscomp$0.componentStack - ); - task$jscomp$0.abortSet.delete(task$jscomp$0); - "object" === typeof x$jscomp$0 && - null !== x$jscomp$0 && - x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE - ? logPostpone( - request, - x$jscomp$0.message, - thrownInfo, - task$jscomp$0.debugTask - ) - : logRecoverableError( - request, - x$jscomp$0, - thrownInfo, - task$jscomp$0.debugTask - ); - trackPostpone( - request, - trackedPostpones, - task$jscomp$0, - segment$jscomp$0 - ); - finishedTask( - request, - task$jscomp$0.blockedBoundary, - task$jscomp$0.row, - segment$jscomp$0 - ); - } else { - if ( - "object" === typeof x$jscomp$0 && - null !== x$jscomp$0 - ) { - if ("function" === typeof x$jscomp$0.then) { - segment$jscomp$0.status = PENDING; - task$jscomp$0.thenableState = - thrownValue === SuspenseException - ? getThenableStateAfterSuspending() - : null; - var ping$jscomp$0 = task$jscomp$0.ping; - x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0); - break a; - } - if ( - null !== request.trackedPostpones && - x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE - ) { - var _trackedPostpones3 = request.trackedPostpones; - task$jscomp$0.abortSet.delete(task$jscomp$0); - var postponeInfo = getThrownInfo( - task$jscomp$0.componentStack - ); - logPostpone( - request, - x$jscomp$0.message, - postponeInfo, - task$jscomp$0.debugTask - ); - trackPostpone( - request, - _trackedPostpones3, - task$jscomp$0, - segment$jscomp$0 - ); - finishedTask( - request, - task$jscomp$0.blockedBoundary, - task$jscomp$0.row, - segment$jscomp$0 - ); - break a; - } - } - var errorInfo$jscomp$0 = getThrownInfo( - task$jscomp$0.componentStack - ); - task$jscomp$0.abortSet.delete(task$jscomp$0); - segment$jscomp$0.status = ERRORED; - var boundary = task$jscomp$0.blockedBoundary, - row = task$jscomp$0.row, - debugTask = task$jscomp$0.debugTask; - null !== row && - 0 === --row.pendingTasks && - finishSuspenseListRow(request, row); - request.allPendingTasks--; - "object" === typeof x$jscomp$0 && - null !== x$jscomp$0 && - x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE - ? (logPostpone( - request, - x$jscomp$0.message, - errorInfo$jscomp$0, - debugTask - ), - (prevTaskInDEV = "POSTPONE")) - : (prevTaskInDEV = logRecoverableError( - request, - x$jscomp$0, - errorInfo$jscomp$0, - debugTask - )); - if (null === boundary) - fatalError( - request, - x$jscomp$0, - errorInfo$jscomp$0, - debugTask - ); - else if ( - (boundary.pendingTasks--, - boundary.status !== CLIENT_RENDERED) - ) { - boundary.status = CLIENT_RENDERED; - encodeErrorForBoundary( - boundary, - prevTaskInDEV, - x$jscomp$0, - errorInfo$jscomp$0, - !1 - ); - untrackBoundary(request, boundary); - var boundaryRow = boundary.row; - null !== boundaryRow && - 0 === --boundaryRow.pendingTasks && - finishSuspenseListRow(request, boundaryRow); - boundary.parentFlushed && - request.clientRenderedBoundaries.push(boundary); - 0 === request.pendingRootTasks && - null === request.trackedPostpones && - null !== boundary.contentPreamble && - preparePreamble(request); - } - 0 === request.allPendingTasks && completeAll(request); - } - } finally { - currentTaskInDEV = request$jscomp$0; + } else if ( + ((prevTaskInDEV = void 0), + (task$jscomp$0 = task), + (request$jscomp$0 = segment), + request$jscomp$0.status === PENDING) + ) { + request$jscomp$0.status = 6; + switchContext(task$jscomp$0.context); + prevTaskInDEV = currentTaskInDEV; + currentTaskInDEV = task$jscomp$0; + var childrenLength = request$jscomp$0.children.length, + chunkLength = request$jscomp$0.chunks.length; + try { + retryNode(request, task$jscomp$0), + pushSegmentFinale( + request$jscomp$0.chunks, + request.renderState, + request$jscomp$0.lastPushedText, + request$jscomp$0.textEmbedded + ), + task$jscomp$0.abortSet.delete(task$jscomp$0), + (request$jscomp$0.status = COMPLETED), + finishedTask( + request, + task$jscomp$0.blockedBoundary, + task$jscomp$0.row, + request$jscomp$0 + ); + } catch (thrownValue) { + resetHooksState(); + request$jscomp$0.children.length = childrenLength; + request$jscomp$0.chunks.length = chunkLength; + var x$jscomp$0 = + thrownValue === SuspenseException + ? getSuspendedThenable() + : 12 === request.status + ? request.fatalError + : thrownValue; + if ( + 12 === request.status && + null !== request.trackedPostpones + ) { + var trackedPostpones = request.trackedPostpones, + thrownInfo = getThrownInfo(task$jscomp$0.componentStack); + task$jscomp$0.abortSet.delete(task$jscomp$0); + logRecoverableError( + request, + x$jscomp$0, + thrownInfo, + task$jscomp$0.debugTask + ); + trackPostpone( + request, + trackedPostpones, + task$jscomp$0, + request$jscomp$0 + ); + finishedTask( + request, + task$jscomp$0.blockedBoundary, + task$jscomp$0.row, + request$jscomp$0 + ); + } else if ( + "object" === typeof x$jscomp$0 && + null !== x$jscomp$0 && + "function" === typeof x$jscomp$0.then + ) { + request$jscomp$0.status = PENDING; + task$jscomp$0.thenableState = + thrownValue === SuspenseException + ? getThenableStateAfterSuspending() + : null; + var ping$jscomp$0 = task$jscomp$0.ping; + x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0); + } else { + var errorInfo$jscomp$1 = getThrownInfo( + task$jscomp$0.componentStack + ); + task$jscomp$0.abortSet.delete(task$jscomp$0); + request$jscomp$0.status = ERRORED; + var boundary$jscomp$0 = task$jscomp$0.blockedBoundary, + row = task$jscomp$0.row, + debugTask = task$jscomp$0.debugTask; + null !== row && + 0 === --row.pendingTasks && + finishSuspenseListRow(request, row); + request.allPendingTasks--; + var errorDigest$jscomp$0 = logRecoverableError( + request, + x$jscomp$0, + errorInfo$jscomp$1, + debugTask + ); + if (null === boundary$jscomp$0) + fatalError( + request, + x$jscomp$0, + errorInfo$jscomp$1, + debugTask + ); + else if ( + (boundary$jscomp$0.pendingTasks--, + boundary$jscomp$0.status !== CLIENT_RENDERED) + ) { + boundary$jscomp$0.status = CLIENT_RENDERED; + encodeErrorForBoundary( + boundary$jscomp$0, + errorDigest$jscomp$0, + x$jscomp$0, + errorInfo$jscomp$1, + !1 + ); + untrackBoundary(request, boundary$jscomp$0); + var boundaryRow = boundary$jscomp$0.row; + null !== boundaryRow && + 0 === --boundaryRow.pendingTasks && + finishSuspenseListRow(request, boundaryRow); + boundary$jscomp$0.parentFlushed && + request.clientRenderedBoundaries.push(boundary$jscomp$0); + 0 === request.pendingRootTasks && + null === request.trackedPostpones && + null !== boundary$jscomp$0.contentPreamble && + preparePreamble(request); } + 0 === request.allPendingTasks && completeAll(request); } + } finally { + currentTaskInDEV = prevTaskInDEV; } + } } pingedTasks.splice(0, i); null !== request$jscomp$1.destination && @@ -8924,12 +8743,11 @@ 0 === request.clientRenderedBoundaries.length && 0 === request.completedBoundaries.length && ((request.flushScheduled = !1), - null === request.trackedPostpones && - ((i = request.resumableState), - i.hasBody && - ((partialBoundaries = endChunkForTag("body")), - destination.push(partialBoundaries)), - i.hasHtml && ((i = endChunkForTag("html")), destination.push(i))), + (i = request.resumableState), + i.hasBody && + ((partialBoundaries = endChunkForTag("body")), + destination.push(partialBoundaries)), + i.hasHtml && ((i = endChunkForTag("html")), destination.push(i)), 0 !== request.abortableTasks.size && console.error( "There was still abortable task at the root when we closed. This is a bug in React." @@ -9089,7 +8907,6 @@ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"), REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), - REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, ASYNC_ITERATOR = Symbol.asyncIterator, @@ -10564,5 +10381,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.3.0-experimental-f646e8ff-20251104"; + exports.version = "19.3.0-experimental-dd048c3b-20251105"; })(); 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 04b44815e8fb55..dca7b39af76d8c 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 @@ -66,7 +66,6 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"), REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), - REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { @@ -2952,16 +2951,16 @@ function createRenderState(resumableState, generateStaticMarkup) { "\x3c/script>" )); bootstrapScriptContent = idPrefix + "P:"; - var JSCompiler_object_inline_segmentPrefix_1876 = idPrefix + "S:"; + var JSCompiler_object_inline_segmentPrefix_1881 = idPrefix + "S:"; idPrefix += "B:"; - var JSCompiler_object_inline_preconnects_1890 = new Set(), - JSCompiler_object_inline_fontPreloads_1891 = new Set(), - JSCompiler_object_inline_highImagePreloads_1892 = new Set(), - JSCompiler_object_inline_styles_1893 = new Map(), - JSCompiler_object_inline_bootstrapScripts_1894 = new Set(), - JSCompiler_object_inline_scripts_1895 = new Set(), - JSCompiler_object_inline_bulkPreloads_1896 = new Set(), - JSCompiler_object_inline_preloads_1897 = { + var JSCompiler_object_inline_preconnects_1895 = new Set(), + JSCompiler_object_inline_fontPreloads_1896 = new Set(), + JSCompiler_object_inline_highImagePreloads_1897 = new Set(), + JSCompiler_object_inline_styles_1898 = new Map(), + JSCompiler_object_inline_bootstrapScripts_1899 = new Set(), + JSCompiler_object_inline_scripts_1900 = new Set(), + JSCompiler_object_inline_bulkPreloads_1901 = new Set(), + JSCompiler_object_inline_preloads_1902 = { images: new Map(), stylesheets: new Map(), scripts: new Map(), @@ -2998,7 +2997,7 @@ function createRenderState(resumableState, generateStaticMarkup) { scriptConfig.moduleScriptResources[href] = null; scriptConfig = []; pushLinkImpl(scriptConfig, props); - JSCompiler_object_inline_bootstrapScripts_1894.add(scriptConfig); + JSCompiler_object_inline_bootstrapScripts_1899.add(scriptConfig); bootstrapChunks.push('