diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 75fec5d548..3fa55ccecf 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -dbfbfb3312db019183ef92fd2ef110cc7d807e80 +670d61bea23470e980ba13c1c8441e375779b0b8 diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 49334a8794..207b23809a 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "19.0.0-www-classic-36e84f9d"; + var ReactVersion = "19.0.0-www-classic-841735f0"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -16852,15 +16852,6 @@ if (__DEV__) { // This is the first render pass. Attempt to hydrate. pushPrimaryTreeSuspenseHandler(workInProgress); // We should never be hydrating at this point because it is the first pass, - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (isSuspenseInstanceFallback()) { // This boundary is in a permanent fallback state. In this case, we'll never // get an update and we'll never be able to hydrate the final content. Let's just try the diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index dda2b860df..4e49c78fab 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "19.0.0-www-modern-2edfe4d7"; + var ReactVersion = "19.0.0-www-modern-37e2c118"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -16546,15 +16546,6 @@ if (__DEV__) { // This is the first render pass. Attempt to hydrate. pushPrimaryTreeSuspenseHandler(workInProgress); // We should never be hydrating at this point because it is the first pass, - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (isSuspenseInstanceFallback()) { // This boundary is in a permanent fallback state. In this case, we'll never // get an update and we'll never be able to hydrate the final content. Let's just try the diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 6e9937d6fe..04c72fea21 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -4990,20 +4990,21 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { - didSuspend = nextProps.children; - var nextFallbackChildren = nextProps.fallback; + var nextPrimaryChildren = nextProps.children; + didSuspend = nextProps.fallback; if (showFallback) return ( reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, + nextPrimaryChildren, didSuspend, - nextFallbackChildren, renderLanes )), - (showFallback = workInProgress.child), - (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (showFallback.childLanes = getRemainingWorkInPrimaryTree( + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5017,9 +5018,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ((renderLanes = enableTransitionTracing ? markerInstanceStack.current : null), - (current = showFallback.updateQueue), + (current = nextPrimaryChildren.updateQueue), null === current - ? (showFallback.updateQueue = { + ? (nextPrimaryChildren.updateQueue = { transitions: workInProgress, markerInstances: renderLanes, retryQueue: null @@ -5033,13 +5034,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, + nextPrimaryChildren, didSuspend, - nextFallbackChildren, renderLanes )), - (showFallback = workInProgress.child), - (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (showFallback.childLanes = getRemainingWorkInPrimaryTree( + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5049,96 +5051,239 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - return mountSuspensePrimaryChildren(workInProgress, didSuspend); + return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren); } - nextFallbackChildren = current.memoizedState; - if (null !== nextFallbackChildren) { - var dehydrated = nextFallbackChildren.dehydrated; - if (null !== dehydrated) - return updateDehydratedSuspenseComponent( + nextPrimaryChildren = current.memoizedState; + if (null !== nextPrimaryChildren && null !== nextPrimaryChildren.dehydrated) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (JSCompiler_temp = createCapturedValueFromError( + Error(formatProdErrorMessage(422)) + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = nextProps.fallback), + (showFallback = workInProgress.mode), + (nextProps = createFiberFromOffscreen( + { mode: "visible", children: nextProps.children }, + showFallback, + 0, + null + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + showFallback, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2), + (nextProps.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (nextProps.sibling = nextPrimaryChildren), + (workInProgress.child = nextProps), + 0 !== (workInProgress.mode & 1) && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (nextProps = workInProgress.child), + (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (nextProps.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$2())) + (JSCompiler_temp = shim$2().digest), + (nextProps = Error(formatProdErrorMessage(419))), + (nextProps.digest = JSCompiler_temp), + (JSCompiler_temp = createCapturedValueFromError( + nextProps, + JSCompiler_temp, + void 0 + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + )); + else if ( + (enableLazyContextPropagation && + !didReceiveUpdate && + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_temp) + ) { + JSCompiler_temp = workInProgressRoot; + if (null !== JSCompiler_temp) { + nextProps = renderLanes & -renderLanes; + if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) + nextProps = 1; + else + switch (nextProps) { + case 2: + nextProps = 1; + break; + case 8: + nextProps = 4; + break; + case 32: + nextProps = 16; + break; + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + nextProps = 64; + break; + case 268435456: + nextProps = 134217728; + break; + default: + nextProps = 0; + } + nextProps = + 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) + ? 0 + : nextProps; + if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); + } + shim$2() || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - didSuspend, - JSCompiler_temp, - nextProps, - dehydrated, - nextFallbackChildren, - renderLanes + renderLanes, + null ); + } else + shim$2() + ? ((workInProgress.flags |= 128), + (workInProgress.child = current.child), + retryDehydratedSuspenseBoundary.bind(null, current), + shim$2(), + (workInProgress = null)) + : ((workInProgress = mountSuspensePrimaryChildren( + workInProgress, + nextProps.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - showFallback = nextProps.fallback; - didSuspend = workInProgress.mode; - nextFallbackChildren = current.child; - dehydrated = nextFallbackChildren.sibling; - var primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (didSuspend & 1) && workInProgress.child !== nextFallbackChildren + nextPrimaryChildren = nextProps.fallback; + showFallback = workInProgress.mode; + didSuspend = current.child; + var currentFallbackChildFragment = didSuspend.sibling, + primaryChildProps = { mode: "hidden", children: nextProps.children }; + 0 === (showFallback & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress( - nextFallbackChildren, - primaryChildProps - )), - (nextProps.subtreeFlags = - nextFallbackChildren.subtreeFlags & 31457280)); - null !== dehydrated - ? (showFallback = createWorkInProgress(dehydrated, showFallback)) - : ((showFallback = createFiberFromFragment( + : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), + (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280)); + null !== currentFallbackChildFragment + ? (nextPrimaryChildren = createWorkInProgress( + currentFallbackChildFragment, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, showFallback, - didSuspend, renderLanes, null )), - (showFallback.flags |= 2)); - showFallback.return = workInProgress; + (nextPrimaryChildren.flags |= 2)); + nextPrimaryChildren.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = showFallback; + nextProps.sibling = nextPrimaryChildren; workInProgress.child = nextProps; - nextProps = showFallback; - showFallback = workInProgress.child; - didSuspend = current.child.memoizedState; - null === didSuspend - ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) - : ((nextFallbackChildren = didSuspend.cachePool), - null !== nextFallbackChildren - ? ((dehydrated = CacheContext._currentValue2), - (nextFallbackChildren = - nextFallbackChildren.parent !== dehydrated - ? { parent: dehydrated, pool: dehydrated } - : nextFallbackChildren)) - : (nextFallbackChildren = getSuspendedCache()), - (didSuspend = { - baseLanes: didSuspend.baseLanes | renderLanes, - cachePool: nextFallbackChildren + nextProps = nextPrimaryChildren; + nextPrimaryChildren = workInProgress.child; + showFallback = current.child.memoizedState; + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = showFallback.cachePool), + null !== didSuspend + ? ((currentFallbackChildFragment = CacheContext._currentValue2), + (didSuspend = + didSuspend.parent !== currentFallbackChildFragment + ? { + parent: currentFallbackChildFragment, + pool: currentFallbackChildFragment + } + : didSuspend)) + : (didSuspend = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: didSuspend })); - showFallback.memoizedState = didSuspend; + nextPrimaryChildren.memoizedState = showFallback; enableTransitionTracing && - ((didSuspend = enableTransitionTracing ? transitionStack.current : null), - null !== didSuspend && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing + ? transitionStack.current + : null), + null !== showFallback && + ((didSuspend = enableTransitionTracing ? markerInstanceStack.current : null), - (dehydrated = showFallback.updateQueue), + (currentFallbackChildFragment = nextPrimaryChildren.updateQueue), (primaryChildProps = current.updateQueue), - null === dehydrated - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextFallbackChildren, + null === currentFallbackChildFragment + ? (nextPrimaryChildren.updateQueue = { + transitions: showFallback, + markerInstances: didSuspend, retryQueue: null }) - : dehydrated === primaryChildProps - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextFallbackChildren, + : currentFallbackChildFragment === primaryChildProps + ? (nextPrimaryChildren.updateQueue = { + transitions: showFallback, + markerInstances: didSuspend, retryQueue: null !== primaryChildProps ? primaryChildProps.retryQueue : null }) - : ((dehydrated.transitions = didSuspend), - (dehydrated.markerInstances = nextFallbackChildren)))); - showFallback.childLanes = getRemainingWorkInPrimaryTree( + : ((currentFallbackChildFragment.transitions = showFallback), + (currentFallbackChildFragment.markerInstances = didSuspend)))); + nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5224,176 +5369,6 @@ function retrySuspenseComponentWithoutHydrating( workInProgress.memoizedState = null; return current; } -function updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - didPrimaryChildrenDefer, - nextProps, - suspenseInstance, - suspenseState, - renderLanes -) { - if (didSuspend) { - if (workInProgress.flags & 256) - return ( - pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (didPrimaryChildrenDefer = createCapturedValueFromError( - Error(formatProdErrorMessage(422)) - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - didPrimaryChildrenDefer - ) - ); - if (null !== workInProgress.memoizedState) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - null - ); - reuseSuspenseHandlerOnStack(workInProgress); - suspenseState = nextProps.fallback; - didSuspend = workInProgress.mode; - nextProps = createFiberFromOffscreen( - { mode: "visible", children: nextProps.children }, - didSuspend, - 0, - null - ); - suspenseState = createFiberFromFragment( - suspenseState, - didSuspend, - renderLanes, - null - ); - suspenseState.flags |= 2; - nextProps.return = workInProgress; - suspenseState.return = workInProgress; - nextProps.sibling = suspenseState; - workInProgress.child = nextProps; - 0 !== (workInProgress.mode & 1) && - reconcileChildFibers(workInProgress, current.child, null, renderLanes); - nextProps = workInProgress.child; - nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes); - nextProps.childLanes = getRemainingWorkInPrimaryTree( - current, - didPrimaryChildrenDefer, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return suspenseState; - } - pushPrimaryTreeSuspenseHandler(workInProgress); - if (0 === (workInProgress.mode & 1)) - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - if (shim$2()) - return ( - (didPrimaryChildrenDefer = shim$2().digest), - (suspenseState = Error(formatProdErrorMessage(419))), - (suspenseState.digest = didPrimaryChildrenDefer), - (didPrimaryChildrenDefer = createCapturedValueFromError( - suspenseState, - didPrimaryChildrenDefer, - void 0 - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - didPrimaryChildrenDefer - ) - ); - enableLazyContextPropagation && - !didReceiveUpdate && - propagateParentContextChanges(current, workInProgress, renderLanes, !1); - didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes); - if (didReceiveUpdate || didPrimaryChildrenDefer) { - didPrimaryChildrenDefer = workInProgressRoot; - if (null !== didPrimaryChildrenDefer) { - nextProps = renderLanes & -renderLanes; - if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) - nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 64; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== suspenseState.retryLane) - throw ( - ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) - ); - } - shim$2() || renderDidSuspendDelayIfPossible(); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (shim$2()) - return ( - (workInProgress.flags |= 128), - (workInProgress.child = current.child), - retryDehydratedSuspenseBoundary.bind(null, current), - shim$2(), - null - ); - current = mountSuspensePrimaryChildren(workInProgress, nextProps.children); - current.flags |= 4096; - return current; -} function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; @@ -10634,19 +10609,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1140 = { + devToolsConfig$jscomp$inline_1133 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "19.0.0-www-classic-c169ad53", + version: "19.0.0-www-classic-a714d6cd", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1320 = { - bundleType: devToolsConfig$jscomp$inline_1140.bundleType, - version: devToolsConfig$jscomp$inline_1140.version, - rendererPackageName: devToolsConfig$jscomp$inline_1140.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1140.rendererConfig, +var internals$jscomp$inline_1338 = { + bundleType: devToolsConfig$jscomp$inline_1133.bundleType, + version: devToolsConfig$jscomp$inline_1133.version, + rendererPackageName: devToolsConfig$jscomp$inline_1133.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1133.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10663,26 +10638,26 @@ var internals$jscomp$inline_1320 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1140.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1133.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-c169ad53" + reconcilerVersion: "19.0.0-www-classic-a714d6cd" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1321 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1339 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1321.isDisabled && - hook$jscomp$inline_1321.supportsFiber + !hook$jscomp$inline_1339.isDisabled && + hook$jscomp$inline_1339.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1321.inject( - internals$jscomp$inline_1320 + (rendererID = hook$jscomp$inline_1339.inject( + internals$jscomp$inline_1338 )), - (injectedHook = hook$jscomp$inline_1321); + (injectedHook = hook$jscomp$inline_1339); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index e62f1728a6..9216ccd1de 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -4739,20 +4739,21 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { - didSuspend = nextProps.children; - var nextFallbackChildren = nextProps.fallback; + var nextPrimaryChildren = nextProps.children; + didSuspend = nextProps.fallback; if (showFallback) return ( reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, + nextPrimaryChildren, didSuspend, - nextFallbackChildren, renderLanes )), - (showFallback = workInProgress.child), - (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (showFallback.childLanes = getRemainingWorkInPrimaryTree( + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -4766,9 +4767,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ((renderLanes = enableTransitionTracing ? markerInstanceStack.current : null), - (current = showFallback.updateQueue), + (current = nextPrimaryChildren.updateQueue), null === current - ? (showFallback.updateQueue = { + ? (nextPrimaryChildren.updateQueue = { transitions: workInProgress, markerInstances: renderLanes, retryQueue: null @@ -4782,13 +4783,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, + nextPrimaryChildren, didSuspend, - nextFallbackChildren, renderLanes )), - (showFallback = workInProgress.child), - (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (showFallback.childLanes = getRemainingWorkInPrimaryTree( + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -4798,96 +4800,239 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - return mountSuspensePrimaryChildren(workInProgress, didSuspend); + return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren); } - nextFallbackChildren = current.memoizedState; - if (null !== nextFallbackChildren) { - var dehydrated = nextFallbackChildren.dehydrated; - if (null !== dehydrated) - return updateDehydratedSuspenseComponent( + nextPrimaryChildren = current.memoizedState; + if (null !== nextPrimaryChildren && null !== nextPrimaryChildren.dehydrated) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (JSCompiler_temp = createCapturedValueFromError( + Error(formatProdErrorMessage(422)) + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = nextProps.fallback), + (showFallback = workInProgress.mode), + (nextProps = createFiberFromOffscreen( + { mode: "visible", children: nextProps.children }, + showFallback, + 0, + null + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + showFallback, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2), + (nextProps.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (nextProps.sibling = nextPrimaryChildren), + (workInProgress.child = nextProps), + 0 !== (workInProgress.mode & 1) && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (nextProps = workInProgress.child), + (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (nextProps.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$2())) + (JSCompiler_temp = shim$2().digest), + (nextProps = Error(formatProdErrorMessage(419))), + (nextProps.digest = JSCompiler_temp), + (JSCompiler_temp = createCapturedValueFromError( + nextProps, + JSCompiler_temp, + void 0 + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + )); + else if ( + (enableLazyContextPropagation && + !didReceiveUpdate && + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_temp) + ) { + JSCompiler_temp = workInProgressRoot; + if (null !== JSCompiler_temp) { + nextProps = renderLanes & -renderLanes; + if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) + nextProps = 1; + else + switch (nextProps) { + case 2: + nextProps = 1; + break; + case 8: + nextProps = 4; + break; + case 32: + nextProps = 16; + break; + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + nextProps = 64; + break; + case 268435456: + nextProps = 134217728; + break; + default: + nextProps = 0; + } + nextProps = + 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) + ? 0 + : nextProps; + if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); + } + shim$2() || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - didSuspend, - JSCompiler_temp, - nextProps, - dehydrated, - nextFallbackChildren, - renderLanes + renderLanes, + null ); + } else + shim$2() + ? ((workInProgress.flags |= 128), + (workInProgress.child = current.child), + retryDehydratedSuspenseBoundary.bind(null, current), + shim$2(), + (workInProgress = null)) + : ((workInProgress = mountSuspensePrimaryChildren( + workInProgress, + nextProps.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - showFallback = nextProps.fallback; - didSuspend = workInProgress.mode; - nextFallbackChildren = current.child; - dehydrated = nextFallbackChildren.sibling; - var primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (didSuspend & 1) && workInProgress.child !== nextFallbackChildren + nextPrimaryChildren = nextProps.fallback; + showFallback = workInProgress.mode; + didSuspend = current.child; + var currentFallbackChildFragment = didSuspend.sibling, + primaryChildProps = { mode: "hidden", children: nextProps.children }; + 0 === (showFallback & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress( - nextFallbackChildren, - primaryChildProps - )), - (nextProps.subtreeFlags = - nextFallbackChildren.subtreeFlags & 31457280)); - null !== dehydrated - ? (showFallback = createWorkInProgress(dehydrated, showFallback)) - : ((showFallback = createFiberFromFragment( + : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), + (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280)); + null !== currentFallbackChildFragment + ? (nextPrimaryChildren = createWorkInProgress( + currentFallbackChildFragment, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, showFallback, - didSuspend, renderLanes, null )), - (showFallback.flags |= 2)); - showFallback.return = workInProgress; + (nextPrimaryChildren.flags |= 2)); + nextPrimaryChildren.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = showFallback; + nextProps.sibling = nextPrimaryChildren; workInProgress.child = nextProps; - nextProps = showFallback; - showFallback = workInProgress.child; - didSuspend = current.child.memoizedState; - null === didSuspend - ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) - : ((nextFallbackChildren = didSuspend.cachePool), - null !== nextFallbackChildren - ? ((dehydrated = CacheContext._currentValue2), - (nextFallbackChildren = - nextFallbackChildren.parent !== dehydrated - ? { parent: dehydrated, pool: dehydrated } - : nextFallbackChildren)) - : (nextFallbackChildren = getSuspendedCache()), - (didSuspend = { - baseLanes: didSuspend.baseLanes | renderLanes, - cachePool: nextFallbackChildren + nextProps = nextPrimaryChildren; + nextPrimaryChildren = workInProgress.child; + showFallback = current.child.memoizedState; + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = showFallback.cachePool), + null !== didSuspend + ? ((currentFallbackChildFragment = CacheContext._currentValue2), + (didSuspend = + didSuspend.parent !== currentFallbackChildFragment + ? { + parent: currentFallbackChildFragment, + pool: currentFallbackChildFragment + } + : didSuspend)) + : (didSuspend = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: didSuspend })); - showFallback.memoizedState = didSuspend; + nextPrimaryChildren.memoizedState = showFallback; enableTransitionTracing && - ((didSuspend = enableTransitionTracing ? transitionStack.current : null), - null !== didSuspend && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing + ? transitionStack.current + : null), + null !== showFallback && + ((didSuspend = enableTransitionTracing ? markerInstanceStack.current : null), - (dehydrated = showFallback.updateQueue), + (currentFallbackChildFragment = nextPrimaryChildren.updateQueue), (primaryChildProps = current.updateQueue), - null === dehydrated - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextFallbackChildren, + null === currentFallbackChildFragment + ? (nextPrimaryChildren.updateQueue = { + transitions: showFallback, + markerInstances: didSuspend, retryQueue: null }) - : dehydrated === primaryChildProps - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextFallbackChildren, + : currentFallbackChildFragment === primaryChildProps + ? (nextPrimaryChildren.updateQueue = { + transitions: showFallback, + markerInstances: didSuspend, retryQueue: null !== primaryChildProps ? primaryChildProps.retryQueue : null }) - : ((dehydrated.transitions = didSuspend), - (dehydrated.markerInstances = nextFallbackChildren)))); - showFallback.childLanes = getRemainingWorkInPrimaryTree( + : ((currentFallbackChildFragment.transitions = showFallback), + (currentFallbackChildFragment.markerInstances = didSuspend)))); + nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -4973,176 +5118,6 @@ function retrySuspenseComponentWithoutHydrating( workInProgress.memoizedState = null; return current; } -function updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - didPrimaryChildrenDefer, - nextProps, - suspenseInstance, - suspenseState, - renderLanes -) { - if (didSuspend) { - if (workInProgress.flags & 256) - return ( - pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (didPrimaryChildrenDefer = createCapturedValueFromError( - Error(formatProdErrorMessage(422)) - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - didPrimaryChildrenDefer - ) - ); - if (null !== workInProgress.memoizedState) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - null - ); - reuseSuspenseHandlerOnStack(workInProgress); - suspenseState = nextProps.fallback; - didSuspend = workInProgress.mode; - nextProps = createFiberFromOffscreen( - { mode: "visible", children: nextProps.children }, - didSuspend, - 0, - null - ); - suspenseState = createFiberFromFragment( - suspenseState, - didSuspend, - renderLanes, - null - ); - suspenseState.flags |= 2; - nextProps.return = workInProgress; - suspenseState.return = workInProgress; - nextProps.sibling = suspenseState; - workInProgress.child = nextProps; - 0 !== (workInProgress.mode & 1) && - reconcileChildFibers(workInProgress, current.child, null, renderLanes); - nextProps = workInProgress.child; - nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes); - nextProps.childLanes = getRemainingWorkInPrimaryTree( - current, - didPrimaryChildrenDefer, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return suspenseState; - } - pushPrimaryTreeSuspenseHandler(workInProgress); - if (0 === (workInProgress.mode & 1)) - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - if (shim$2()) - return ( - (didPrimaryChildrenDefer = shim$2().digest), - (suspenseState = Error(formatProdErrorMessage(419))), - (suspenseState.digest = didPrimaryChildrenDefer), - (didPrimaryChildrenDefer = createCapturedValueFromError( - suspenseState, - didPrimaryChildrenDefer, - void 0 - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - didPrimaryChildrenDefer - ) - ); - enableLazyContextPropagation && - !didReceiveUpdate && - propagateParentContextChanges(current, workInProgress, renderLanes, !1); - didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes); - if (didReceiveUpdate || didPrimaryChildrenDefer) { - didPrimaryChildrenDefer = workInProgressRoot; - if (null !== didPrimaryChildrenDefer) { - nextProps = renderLanes & -renderLanes; - if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) - nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 64; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== suspenseState.retryLane) - throw ( - ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) - ); - } - shim$2() || renderDidSuspendDelayIfPossible(); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (shim$2()) - return ( - (workInProgress.flags |= 128), - (workInProgress.child = current.child), - retryDehydratedSuspenseBoundary.bind(null, current), - shim$2(), - null - ); - current = mountSuspensePrimaryChildren(workInProgress, nextProps.children); - current.flags |= 4096; - return current; -} function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; @@ -10289,19 +10264,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1120 = { + devToolsConfig$jscomp$inline_1113 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "19.0.0-www-modern-f507f6fc", + version: "19.0.0-www-modern-3c09b75a", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1300 = { - bundleType: devToolsConfig$jscomp$inline_1120.bundleType, - version: devToolsConfig$jscomp$inline_1120.version, - rendererPackageName: devToolsConfig$jscomp$inline_1120.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1120.rendererConfig, +var internals$jscomp$inline_1318 = { + bundleType: devToolsConfig$jscomp$inline_1113.bundleType, + version: devToolsConfig$jscomp$inline_1113.version, + rendererPackageName: devToolsConfig$jscomp$inline_1113.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1113.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10318,26 +10293,26 @@ var internals$jscomp$inline_1300 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1120.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1113.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-f507f6fc" + reconcilerVersion: "19.0.0-www-modern-3c09b75a" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1301 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1319 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1301.isDisabled && - hook$jscomp$inline_1301.supportsFiber + !hook$jscomp$inline_1319.isDisabled && + hook$jscomp$inline_1319.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1301.inject( - internals$jscomp$inline_1300 + (rendererID = hook$jscomp$inline_1319.inject( + internals$jscomp$inline_1318 )), - (injectedHook = hook$jscomp$inline_1301); + (injectedHook = hook$jscomp$inline_1319); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index c5dc146189..374a05d326 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -8222,14 +8222,11 @@ if (__DEV__) { case HostSingleton: case HostComponent: { - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotHydrateInstance( returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, - instance, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode + instance ); break; } @@ -8247,20 +8244,6 @@ if (__DEV__) { } } - function deleteHydratableInstance(returnFiber, instance) { - var childToDelete = createFiberFromHostInstanceForDeletion(); - childToDelete.stateNode = instance; - childToDelete.return = returnFiber; - var deletions = returnFiber.deletions; - - if (deletions === null) { - returnFiber.deletions = [childToDelete]; - returnFiber.flags |= ChildDeletion; - } else { - deletions.push(childToDelete); - } - } - function warnNonHydratedInstance(returnFiber, fiber) { { if (didSuspendOrErrorDEV) { @@ -8306,32 +8289,22 @@ if (__DEV__) { case HostSingleton: case HostComponent: { var _type = fiber.type; - var _props = fiber.pendingProps; - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotFindHydratableInstance( parentType, parentProps, parentInstance, - _type, - _props, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode + _type ); break; } case HostText: { var _text = fiber.pendingProps; - - var _isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; - didNotFindHydratableTextInstance( parentType, parentProps, parentInstance, - _text, // TODO: Delete this argument when we remove the legacy root API. - _isConcurrentMode + _text ); break; } @@ -8371,10 +8344,6 @@ if (__DEV__) { } } - function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & ~Hydrating) | Placement; - } - function tryHydrateInstance(fiber, nextInstance) { // fiber is a HostComponent Fiber var instance = canHydrateInstance( @@ -8447,13 +8416,6 @@ if (__DEV__) { return false; } - function shouldClientRenderOnMismatch(fiber) { - return ( - (fiber.mode & ConcurrentMode) !== NoMode && - (fiber.flags & DidCapture) === NoFlags$1 - ); - } - function throwOnHydrationMismatch(fiber) { throw new Error( "Hydration failed because the initial UI does not match what was " + @@ -8493,77 +8455,14 @@ if (__DEV__) { fiber.pendingProps, currentHostContext ); - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); - + if (!nextInstance || !tryHydrateInstance(fiber, nextInstance)) { if (shouldKeepWarning) { warnNonHydratedInstance(hydrationParentFiber, fiber); } - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateInstance(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateInstance(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - if (shouldKeepWarning) { - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - } - - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8580,79 +8479,14 @@ if (__DEV__) { text, currentHostContext ); - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - // We exclude non hydrabable text because we know there are no matching hydratables. - // We either throw or insert depending on the render mode. - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); - + if (!nextInstance || !tryHydrateText(fiber, nextInstance)) { if (shouldKeepWarning) { warnNonHydratedInstance(hydrationParentFiber, fiber); } - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateText(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateText(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - if (shouldKeepWarning) { - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - } - - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8661,60 +8495,11 @@ if (__DEV__) { return; } - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); + if (!nextInstance || !tryHydrateSuspense(fiber, nextInstance)) { warnNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateSuspense(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateSuspense(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - warnNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8774,20 +8559,14 @@ if (__DEV__) { switch (returnFiber.tag) { case HostRoot: { var parentContainer = returnFiber.stateNode.containerInfo; - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotMatchHydratedContainerTextInstance( parentContainer, textInstance, - textContent, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode, + textContent, shouldWarnIfMismatchDev ); - if ( - isConcurrentMode && - enableClientRenderFallbackOnTextMismatch - ) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent mode we never update the mismatched text, // even if the error was ignored. return false; @@ -8801,24 +8580,16 @@ if (__DEV__) { var parentType = returnFiber.type; var parentProps = returnFiber.memoizedProps; var parentInstance = returnFiber.stateNode; - - var _isConcurrentMode2 = - (returnFiber.mode & ConcurrentMode) !== NoMode; - didNotMatchHydratedTextInstance( parentType, parentProps, parentInstance, textInstance, - textContent, // TODO: Delete this argument when we remove the legacy root API. - _isConcurrentMode2, + textContent, shouldWarnIfMismatchDev ); - if ( - _isConcurrentMode2 && - enableClientRenderFallbackOnTextMismatch - ) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent mode we never update the mismatched text, // even if the error was ignored. return false; @@ -8922,16 +8693,8 @@ if (__DEV__) { var nextInstance = nextHydratableInstance; if (nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - warnIfUnhydratedTailNodes(fiber); - throwOnHydrationMismatch(); - } else { - while (nextInstance) { - warnUnhydratedInstance(fiber, nextInstance); - deleteHydratableInstance(fiber, nextInstance); - nextInstance = getNextHydratableSibling(nextInstance); - } - } + warnIfUnhydratedTailNodes(fiber); + throwOnHydrationMismatch(); } } @@ -22025,19 +21788,7 @@ if (__DEV__) { ) { // During the first pass, we'll bail out and not drill into the children. // Instead, we'll leave the content in place and try to hydrate it later. - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - { - error( - "Cannot hydrate Suspense in legacy mode. Switch from " + - "ReactDOM.hydrate(element, container) to " + - "ReactDOMClient.hydrateRoot(container, )" + - ".render(element) or remove the Suspense components from " + - "the server rendered components." - ); - } - - workInProgress.lanes = laneToLanes(SyncLane); - } else if (isSuspenseInstanceFallback(suspenseInstance)) { + if (isSuspenseInstanceFallback(suspenseInstance)) { // This is a client-only boundary. Since we won't get any content from the server // for this, we need to schedule that at a higher priority based on when it would // have timed out. In theory we could render it in this pass but it would have the @@ -22076,15 +21827,6 @@ if (__DEV__) { warnIfHydrating(); - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (isSuspenseInstanceFallback(suspenseInstance)) { // This boundary is in a permanent fallback state. In this case, we'll never // get an update and we'll never be able to hydrate the final content. Let's just try the @@ -35672,11 +35414,6 @@ if (__DEV__) { fiber.lanes = lanes; return fiber; } - function createFiberFromHostInstanceForDeletion() { - var fiber = createFiber(HostComponent, null, null, NoMode); - fiber.elementType = "DELETED"; - return fiber; - } function createFiberFromDehydratedFragment(dehydratedNode) { var fiber = createFiber(DehydratedFragment, null, null, NoMode); fiber.stateNode = dehydratedNode; @@ -35845,7 +35582,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-7b93bfeb"; + var ReactVersion = "19.0.0-www-classic-08e73f78"; function createPortal$1( children, @@ -40600,12 +40337,7 @@ if (__DEV__) { .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } - function checkForUnmatchedText( - serverText, - clientText, - isConcurrentMode, - shouldWarnDev - ) { + function checkForUnmatchedText(serverText, clientText, shouldWarnDev) { var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); @@ -40627,7 +40359,7 @@ if (__DEV__) { } } - if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent roots, we throw when there's a text mismatch and revert to // client rendering, up to the nearest Suspense boundary. throw new Error("Text content does not match server-rendered HTML."); @@ -43381,7 +43113,6 @@ if (__DEV__) { domElement, tag, props, - isConcurrentMode, shouldWarnDev, hostContext ) { @@ -43517,12 +43248,11 @@ if (__DEV__) { checkForUnmatchedText( domElement.textContent, children, - isConcurrentMode, shouldWarnDev ); } - if (!isConcurrentMode || !enableClientRenderFallbackOnTextMismatch) { + if (!enableClientRenderFallbackOnTextMismatch) { // We really should be patching this in the commit phase but since // this only affects legacy mode hydration which is deprecated anyway // we can get away with it. @@ -43600,7 +43330,7 @@ if (__DEV__) { } } } - function diffHydratedText(textNode, text, isConcurrentMode) { + function diffHydratedText(textNode, text) { var isDifferent = textNode.nodeValue !== text; return isDifferent; } @@ -44845,19 +44575,8 @@ if (__DEV__) { precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events // get attached. - updateFiberProps(instance, props); // TODO: Temporary hack to check if we're in a concurrent root. We can delete - // when the legacy root API is removed. - - var isConcurrentMode = - (internalInstanceHandle.mode & ConcurrentMode) !== NoMode; - diffHydratedProperties( - instance, - type, - props, - isConcurrentMode, - shouldWarnDev, - hostContext - ); + updateFiberProps(instance, props); + diffHydratedProperties(instance, type, props, shouldWarnDev, hostContext); } function validateHydratableTextInstance(text, hostContext) { { @@ -44877,7 +44596,7 @@ if (__DEV__) { internalInstanceHandle, shouldWarnDev ) { - precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete + precacheFiberNode(internalInstanceHandle, textInstance); return diffHydratedText(textInstance, text); } function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) { @@ -44963,15 +44682,9 @@ if (__DEV__) { parentContainer, textInstance, text, - isConcurrentMode, shouldWarnDev ) { - checkForUnmatchedText( - textInstance.nodeValue, - text, - isConcurrentMode, - shouldWarnDev - ); + checkForUnmatchedText(textInstance.nodeValue, text, shouldWarnDev); } function didNotMatchHydratedTextInstance( parentType, @@ -44979,16 +44692,10 @@ if (__DEV__) { parentInstance, textInstance, text, - isConcurrentMode, shouldWarnDev ) { if (parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { - checkForUnmatchedText( - textInstance.nodeValue, - text, - isConcurrentMode, - shouldWarnDev - ); + checkForUnmatchedText(textInstance.nodeValue, text, shouldWarnDev); } } function didNotHydrateInstanceWithinContainer(parentContainer, instance) { @@ -45023,20 +44730,14 @@ if (__DEV__) { parentType, parentProps, parentInstance, - instance, - isConcurrentMode + instance ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - if (instance.nodeType === ELEMENT_NODE) { - warnForDeletedHydratableElement(parentInstance, instance); - } else if (instance.nodeType === COMMENT_NODE); - else { - warnForDeletedHydratableText(parentInstance, instance); - } + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentInstance, instance); + } else if (instance.nodeType === COMMENT_NODE); + else { + warnForDeletedHydratableText(parentInstance, instance); } } } @@ -45084,32 +44785,20 @@ if (__DEV__) { parentProps, parentInstance, type, - props, - isConcurrentMode + props ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - warnForInsertedHydratedElement(parentInstance, type); - } + warnForInsertedHydratedElement(parentInstance, type); } } function didNotFindHydratableTextInstance( parentType, parentProps, parentInstance, - text, - isConcurrentMode + text ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - warnForInsertedHydratedText(parentInstance, text); - } + warnForInsertedHydratedText(parentInstance, text); } } function errorHydratingContainer(parentContainer) { @@ -48491,42 +48180,6 @@ if (__DEV__) { return findHostInstanceWithWarning(componentOrElement, "findDOMNode"); } } - function hydrate(element, container, callback) { - { - error( - "ReactDOM.hydrate has not been supported since React 18. Use hydrateRoot " + - "instead. Until you switch to the new API, your app will behave as " + - "if it's running React 17. Learn " + - "more: https://react.dev/link/switch-to-createroot" - ); - } - - if (!isValidContainerLegacy(container)) { - throw new Error("Target container is not a DOM element."); - } - - { - var isModernRoot = - isContainerMarkedAsRoot(container) && - container._reactRootContainer === undefined; - - if (isModernRoot) { - error( - "You are calling ReactDOM.hydrate() on a container that was previously " + - "passed to ReactDOMClient.createRoot(). This is not supported. " + - "Did you mean to call hydrateRoot(container, element)?" - ); - } - } // TODO: throw or warn if we couldn't hydrate? - - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - true, - callback - ); - } function render(element, container, callback) { { error( @@ -49289,7 +48942,6 @@ if (__DEV__) { exports.createRoot = createRoot; exports.findDOMNode = findDOMNode; exports.flushSync = flushSync; - exports.hydrate = hydrate; exports.hydrateRoot = hydrateRoot; exports.preconnect = preconnect; exports.prefetchDNS = prefetchDNS; diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 3a6ebb03ca..e84562c6fb 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -8184,14 +8184,11 @@ if (__DEV__) { case HostSingleton: case HostComponent: { - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotHydrateInstance( returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, - instance, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode + instance ); break; } @@ -8209,20 +8206,6 @@ if (__DEV__) { } } - function deleteHydratableInstance(returnFiber, instance) { - var childToDelete = createFiberFromHostInstanceForDeletion(); - childToDelete.stateNode = instance; - childToDelete.return = returnFiber; - var deletions = returnFiber.deletions; - - if (deletions === null) { - returnFiber.deletions = [childToDelete]; - returnFiber.flags |= ChildDeletion; - } else { - deletions.push(childToDelete); - } - } - function warnNonHydratedInstance(returnFiber, fiber) { { if (didSuspendOrErrorDEV) { @@ -8268,32 +8251,22 @@ if (__DEV__) { case HostSingleton: case HostComponent: { var _type = fiber.type; - var _props = fiber.pendingProps; - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotFindHydratableInstance( parentType, parentProps, parentInstance, - _type, - _props, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode + _type ); break; } case HostText: { var _text = fiber.pendingProps; - - var _isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; - didNotFindHydratableTextInstance( parentType, parentProps, parentInstance, - _text, // TODO: Delete this argument when we remove the legacy root API. - _isConcurrentMode + _text ); break; } @@ -8333,10 +8306,6 @@ if (__DEV__) { } } - function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & ~Hydrating) | Placement; - } - function tryHydrateInstance(fiber, nextInstance) { // fiber is a HostComponent Fiber var instance = canHydrateInstance( @@ -8409,13 +8378,6 @@ if (__DEV__) { return false; } - function shouldClientRenderOnMismatch(fiber) { - return ( - (fiber.mode & ConcurrentMode) !== NoMode && - (fiber.flags & DidCapture) === NoFlags$1 - ); - } - function throwOnHydrationMismatch(fiber) { throw new Error( "Hydration failed because the initial UI does not match what was " + @@ -8455,77 +8417,14 @@ if (__DEV__) { fiber.pendingProps, currentHostContext ); - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); - + if (!nextInstance || !tryHydrateInstance(fiber, nextInstance)) { if (shouldKeepWarning) { warnNonHydratedInstance(hydrationParentFiber, fiber); } - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateInstance(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateInstance(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - if (shouldKeepWarning) { - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - } - - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8542,79 +8441,14 @@ if (__DEV__) { text, currentHostContext ); - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - // We exclude non hydrabable text because we know there are no matching hydratables. - // We either throw or insert depending on the render mode. - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); - + if (!nextInstance || !tryHydrateText(fiber, nextInstance)) { if (shouldKeepWarning) { warnNonHydratedInstance(hydrationParentFiber, fiber); } - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateText(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateText(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - if (shouldKeepWarning) { - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - } - - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8623,60 +8457,11 @@ if (__DEV__) { return; } - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); + if (!nextInstance || !tryHydrateSuspense(fiber, nextInstance)) { warnNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateSuspense(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateSuspense(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - warnNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8736,20 +8521,14 @@ if (__DEV__) { switch (returnFiber.tag) { case HostRoot: { var parentContainer = returnFiber.stateNode.containerInfo; - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotMatchHydratedContainerTextInstance( parentContainer, textInstance, - textContent, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode, + textContent, shouldWarnIfMismatchDev ); - if ( - isConcurrentMode && - enableClientRenderFallbackOnTextMismatch - ) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent mode we never update the mismatched text, // even if the error was ignored. return false; @@ -8763,24 +8542,16 @@ if (__DEV__) { var parentType = returnFiber.type; var parentProps = returnFiber.memoizedProps; var parentInstance = returnFiber.stateNode; - - var _isConcurrentMode2 = - (returnFiber.mode & ConcurrentMode) !== NoMode; - didNotMatchHydratedTextInstance( parentType, parentProps, parentInstance, textInstance, - textContent, // TODO: Delete this argument when we remove the legacy root API. - _isConcurrentMode2, + textContent, shouldWarnIfMismatchDev ); - if ( - _isConcurrentMode2 && - enableClientRenderFallbackOnTextMismatch - ) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent mode we never update the mismatched text, // even if the error was ignored. return false; @@ -8884,16 +8655,8 @@ if (__DEV__) { var nextInstance = nextHydratableInstance; if (nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - warnIfUnhydratedTailNodes(fiber); - throwOnHydrationMismatch(); - } else { - while (nextInstance) { - warnUnhydratedInstance(fiber, nextInstance); - deleteHydratableInstance(fiber, nextInstance); - nextInstance = getNextHydratableSibling(nextInstance); - } - } + warnIfUnhydratedTailNodes(fiber); + throwOnHydrationMismatch(); } } @@ -21916,19 +21679,7 @@ if (__DEV__) { ) { // During the first pass, we'll bail out and not drill into the children. // Instead, we'll leave the content in place and try to hydrate it later. - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - { - error( - "Cannot hydrate Suspense in legacy mode. Switch from " + - "ReactDOM.hydrate(element, container) to " + - "ReactDOMClient.hydrateRoot(container, )" + - ".render(element) or remove the Suspense components from " + - "the server rendered components." - ); - } - - workInProgress.lanes = laneToLanes(SyncLane); - } else if (isSuspenseInstanceFallback(suspenseInstance)) { + if (isSuspenseInstanceFallback(suspenseInstance)) { // This is a client-only boundary. Since we won't get any content from the server // for this, we need to schedule that at a higher priority based on when it would // have timed out. In theory we could render it in this pass but it would have the @@ -21967,15 +21718,6 @@ if (__DEV__) { warnIfHydrating(); - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (isSuspenseInstanceFallback(suspenseInstance)) { // This boundary is in a permanent fallback state. In this case, we'll never // get an update and we'll never be able to hydrate the final content. Let's just try the @@ -35519,11 +35261,6 @@ if (__DEV__) { fiber.lanes = lanes; return fiber; } - function createFiberFromHostInstanceForDeletion() { - var fiber = createFiber(HostComponent, null, null, NoMode); - fiber.elementType = "DELETED"; - return fiber; - } function createFiberFromDehydratedFragment(dehydratedNode) { var fiber = createFiber(DehydratedFragment, null, null, NoMode); fiber.stateNode = dehydratedNode; @@ -35692,7 +35429,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-6d2d5280"; + var ReactVersion = "19.0.0-www-modern-f82757b9"; function createPortal$1( children, @@ -41253,12 +40990,7 @@ if (__DEV__) { .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } - function checkForUnmatchedText( - serverText, - clientText, - isConcurrentMode, - shouldWarnDev - ) { + function checkForUnmatchedText(serverText, clientText, shouldWarnDev) { var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); @@ -41280,7 +41012,7 @@ if (__DEV__) { } } - if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent roots, we throw when there's a text mismatch and revert to // client rendering, up to the nearest Suspense boundary. throw new Error("Text content does not match server-rendered HTML."); @@ -44031,7 +43763,6 @@ if (__DEV__) { domElement, tag, props, - isConcurrentMode, shouldWarnDev, hostContext ) { @@ -44162,12 +43893,11 @@ if (__DEV__) { checkForUnmatchedText( domElement.textContent, children, - isConcurrentMode, shouldWarnDev ); } - if (!isConcurrentMode || !enableClientRenderFallbackOnTextMismatch) { + if (!enableClientRenderFallbackOnTextMismatch) { // We really should be patching this in the commit phase but since // this only affects legacy mode hydration which is deprecated anyway // we can get away with it. @@ -44245,7 +43975,7 @@ if (__DEV__) { } } } - function diffHydratedText(textNode, text, isConcurrentMode) { + function diffHydratedText(textNode, text) { var isDifferent = textNode.nodeValue !== text; return isDifferent; } @@ -45471,19 +45201,8 @@ if (__DEV__) { precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events // get attached. - updateFiberProps(instance, props); // TODO: Temporary hack to check if we're in a concurrent root. We can delete - // when the legacy root API is removed. - - var isConcurrentMode = - (internalInstanceHandle.mode & ConcurrentMode) !== NoMode; - diffHydratedProperties( - instance, - type, - props, - isConcurrentMode, - shouldWarnDev, - hostContext - ); + updateFiberProps(instance, props); + diffHydratedProperties(instance, type, props, shouldWarnDev, hostContext); } function validateHydratableTextInstance(text, hostContext) { { @@ -45503,7 +45222,7 @@ if (__DEV__) { internalInstanceHandle, shouldWarnDev ) { - precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete + precacheFiberNode(internalInstanceHandle, textInstance); return diffHydratedText(textInstance, text); } function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) { @@ -45589,15 +45308,9 @@ if (__DEV__) { parentContainer, textInstance, text, - isConcurrentMode, shouldWarnDev ) { - checkForUnmatchedText( - textInstance.nodeValue, - text, - isConcurrentMode, - shouldWarnDev - ); + checkForUnmatchedText(textInstance.nodeValue, text, shouldWarnDev); } function didNotMatchHydratedTextInstance( parentType, @@ -45605,16 +45318,10 @@ if (__DEV__) { parentInstance, textInstance, text, - isConcurrentMode, shouldWarnDev ) { if (parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { - checkForUnmatchedText( - textInstance.nodeValue, - text, - isConcurrentMode, - shouldWarnDev - ); + checkForUnmatchedText(textInstance.nodeValue, text, shouldWarnDev); } } function didNotHydrateInstanceWithinContainer(parentContainer, instance) { @@ -45649,20 +45356,14 @@ if (__DEV__) { parentType, parentProps, parentInstance, - instance, - isConcurrentMode + instance ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - if (instance.nodeType === ELEMENT_NODE) { - warnForDeletedHydratableElement(parentInstance, instance); - } else if (instance.nodeType === COMMENT_NODE); - else { - warnForDeletedHydratableText(parentInstance, instance); - } + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentInstance, instance); + } else if (instance.nodeType === COMMENT_NODE); + else { + warnForDeletedHydratableText(parentInstance, instance); } } } @@ -45710,32 +45411,20 @@ if (__DEV__) { parentProps, parentInstance, type, - props, - isConcurrentMode + props ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - warnForInsertedHydratedElement(parentInstance, type); - } + warnForInsertedHydratedElement(parentInstance, type); } } function didNotFindHydratableTextInstance( parentType, parentProps, parentInstance, - text, - isConcurrentMode + text ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - warnForInsertedHydratedText(parentInstance, text); - } + warnForInsertedHydratedText(parentInstance, text); } } function errorHydratingContainer(parentContainer) { diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 920a3d512d..9e1938781c 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -1706,85 +1706,6 @@ var hydrationParentFiber = null, isHydrating = !1, hydrationErrors = null, rootOrSingletonContext = !1; -function deleteHydratableInstance(returnFiber, instance) { - var fiber = createFiber(5, null, null, 0); - fiber.elementType = "DELETED"; - fiber.stateNode = instance; - fiber.return = returnFiber; - instance = returnFiber.deletions; - null === instance - ? ((returnFiber.deletions = [fiber]), (returnFiber.flags |= 16)) - : instance.push(fiber); -} -function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & -4097) | 2; -} -function tryHydrateInstance(fiber, nextInstance) { - nextInstance = canHydrateInstance( - nextInstance, - fiber.type, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = getNextHydratable(nextInstance.firstChild)), - (rootOrSingletonContext = !1), - !0) - : !1; -} -function tryHydrateText(fiber, nextInstance) { - nextInstance = canHydrateTextInstance( - nextInstance, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function tryHydrateSuspense(fiber, nextInstance) { - a: { - var instance = nextInstance; - for (nextInstance = rootOrSingletonContext; 8 !== instance.nodeType; ) { - if (!nextInstance) { - nextInstance = null; - break a; - } - instance = getNextHydratableSibling(instance); - if (null === instance) { - nextInstance = null; - break a; - } - } - nextInstance = instance; - } - return null !== nextInstance - ? ((instance = - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null), - (fiber.memoizedState = { - dehydrated: nextInstance, - treeContext: instance, - retryLane: 536870912 - }), - (instance = createFiber(18, null, null, 0)), - (instance.stateNode = nextInstance), - (instance.return = fiber), - (fiber.child = instance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function shouldClientRenderOnMismatch(fiber) { - return 0 !== (fiber.mode & 1) && 0 === (fiber.flags & 128); -} function throwOnHydrationMismatch() { throw Error(formatProdErrorMessage(418)); } @@ -1817,15 +1738,11 @@ function popHydrationState(fiber) { JSCompiler_temp = !JSCompiler_temp; } JSCompiler_temp && (shouldClear = !0); - if (shouldClear && (shouldClear = nextHydratableInstance)) - if (shouldClientRenderOnMismatch(fiber)) { - for (shouldClear = nextHydratableInstance; shouldClear; ) - shouldClear = getNextHydratableSibling(shouldClear); - throwOnHydrationMismatch(); - } else - for (; shouldClear; ) - deleteHydratableInstance(fiber, shouldClear), - (shouldClear = getNextHydratableSibling(shouldClear)); + if (shouldClear && nextHydratableInstance) { + for (shouldClear = nextHydratableInstance; shouldClear; ) + shouldClear = getNextHydratable(shouldClear.nextSibling); + throwOnHydrationMismatch(); + } popToNextHostParent(fiber); if (13 === fiber.tag) { fiber = fiber.memoizedState; @@ -1837,7 +1754,7 @@ function popHydrationState(fiber) { if (8 === fiber.nodeType) if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { if (0 === shouldClear) { - nextHydratableInstance = getNextHydratableSibling(fiber); + nextHydratableInstance = getNextHydratable(fiber.nextSibling); break a; } shouldClear--; @@ -1852,7 +1769,7 @@ function popHydrationState(fiber) { } } else nextHydratableInstance = hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) + ? getNextHydratable(fiber.stateNode.nextSibling) : null; return !0; } @@ -1967,39 +1884,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy || 0 === root$26.tag) { - var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes, + for (var root$25 = firstScheduledRoot; null !== root$25; ) { + if (!onlyLegacy || 0 === root$25.tag) { + var workInProgressRootRenderLanes$27 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$26, - root$26 === workInProgressRoot - ? workInProgressRootRenderLanes$28 + root$25, + root$25 === workInProgressRoot + ? workInProgressRootRenderLanes$27 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$28 = root$26; + workInProgressRootRenderLanes$27 = root$25; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$28.tag && + 0 !== workInProgressRootRenderLanes$27.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, originallyAttemptedLanes, errorRetryLanes ))); @@ -2007,39 +1924,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$28, 0), + prepareFreshStack(workInProgressRootRenderLanes$27, 0), markRootSuspended( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$28), + ensureRootIsScheduled(workInProgressRootRenderLanes$27), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$28.finishedWork = - workInProgressRootRenderLanes$28.current.alternate), - (workInProgressRootRenderLanes$28.finishedLanes = + : ((workInProgressRootRenderLanes$27.finishedWork = + workInProgressRootRenderLanes$27.current.alternate), + (workInProgressRootRenderLanes$27.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$28); + ensureRootIsScheduled(workInProgressRootRenderLanes$27); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$26 = root$26.next; + root$25 = root$25.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3646,7 +3563,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$53 = !1; + didReadFromEntangledAsyncAction$52 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3667,11 +3584,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$52 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$52 = !0); continue; } else (updateLane = { @@ -3717,7 +3634,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$53 && + didReadFromEntangledAsyncAction$52 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -3952,8 +3869,8 @@ function mountFormState(action, initialStateProp) { JSCompiler_inline_result = null; break b; } - JSCompiler_inline_result = getNextHydratableSibling( - JSCompiler_inline_result + JSCompiler_inline_result = getNextHydratable( + JSCompiler_inline_result.nextSibling ); if (null === JSCompiler_inline_result) { JSCompiler_inline_result = null; @@ -3967,8 +3884,8 @@ function mountFormState(action, initialStateProp) { : null; } if (JSCompiler_inline_result) { - nextHydratableInstance = getNextHydratableSibling( - JSCompiler_inline_result + nextHydratableInstance = getNextHydratable( + JSCompiler_inline_result.nextSibling ); JSCompiler_inline_result = "F!" === JSCompiler_inline_result.data; break a; @@ -4308,14 +4225,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$63 = enqueueUpdate(provider, fiber, lane); - null !== root$63 && - (scheduleUpdateOnFiber(root$63, provider, lane), - entangleTransitions(root$63, provider, lane)); + var root$62 = enqueueUpdate(provider, fiber, lane); + null !== root$62 && + (scheduleUpdateOnFiber(root$62, provider, lane), + entangleTransitions(root$62, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$63 && + null !== root$62 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4556,15 +4473,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$56 = workInProgressRoot; - if (null === root$56) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$56, workInProgressRootRenderLanes) || + var root$55 = workInProgressRoot; + if (null === root$55) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$55, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$56 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$56; - mountEffect(subscribeToStore.bind(null, fiber, root$56, subscribe), [ + root$55 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$55; + mountEffect(subscribeToStore.bind(null, fiber, root$55, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4573,7 +4490,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$56, + root$55, getServerSnapshot, getSnapshot ), @@ -5287,10 +5204,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$73 = workInProgress.stateNode; + root$72 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$73.incompleteTransitions.has(transition)) { + if (!root$72.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5298,11 +5215,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$73.incompleteTransitions.set(transition, markerInstance); + root$72.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$73.incompleteTransitions.forEach(function (markerInstance) { + root$72.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5925,52 +5842,72 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var nextInstance = (didSuspend = nextHydratableInstance); - if (!nextInstance) - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend); - else if (!tryHydrateSuspense(workInProgress, nextInstance)) { - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(); - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - nextHydratableInstance && - tryHydrateSuspense(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevHydrationParentFiber, nextInstance) - : (insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), + var nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance)) { + c: { + JSCompiler_temp$jscomp$0 = nextInstance; + for ( + nextInstance = rootOrSingletonContext; + 8 !== JSCompiler_temp$jscomp$0.nodeType; + + ) { + if (!nextInstance) { + nextInstance = null; + break c; + } + JSCompiler_temp$jscomp$0 = getNextHydratable( + JSCompiler_temp$jscomp$0.nextSibling + ); + if (null === JSCompiler_temp$jscomp$0) { + nextInstance = null; + break c; + } + } + nextInstance = JSCompiler_temp$jscomp$0; + } + null !== nextInstance + ? ((workInProgress.memoizedState = { + dehydrated: nextInstance, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912 + }), + (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), + (JSCompiler_temp$jscomp$0.stateNode = nextInstance), + (JSCompiler_temp$jscomp$0.return = workInProgress), + (workInProgress.child = JSCompiler_temp$jscomp$0), (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend)); + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(); } - didSuspend = workInProgress.memoizedState; + nextInstance = workInProgress.memoizedState; if ( - null !== didSuspend && - ((didSuspend = didSuspend.dehydrated), null !== didSuspend) + null !== nextInstance && + ((nextInstance = nextInstance.dehydrated), null !== nextInstance) ) return ( - 0 === (workInProgress.mode & 1) - ? (workInProgress.lanes = 2) - : "$!" === didSuspend.data + "$!" === nextInstance.data ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - didSuspend = nextProps.children; - nextInstance = nextProps.fallback; + nextInstance = nextProps.children; + JSCompiler_temp$jscomp$0 = nextProps.fallback; if (showFallback) return ( reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -6005,8 +5942,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -6021,106 +5958,273 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - return mountSuspensePrimaryChildren(workInProgress, didSuspend); + return mountSuspensePrimaryChildren(workInProgress, nextInstance); } - nextInstance = current.memoizedState; + JSCompiler_temp$jscomp$0 = current.memoizedState; if ( - null !== nextInstance && - ((prevHydrationParentFiber = nextInstance.dehydrated), - null !== prevHydrationParentFiber) - ) - return updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - JSCompiler_temp, - nextProps, - prevHydrationParentFiber, - nextInstance, - renderLanes - ); - if (showFallback) { - reuseSuspenseHandlerOnStack(workInProgress); - showFallback = nextProps.fallback; - didSuspend = workInProgress.mode; - nextInstance = current.child; - prevHydrationParentFiber = nextInstance.sibling; - var primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (didSuspend & 1) && workInProgress.child !== nextInstance - ? ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(nextInstance, primaryChildProps)), - (nextProps.subtreeFlags = nextInstance.subtreeFlags & 31457280)); - null !== prevHydrationParentFiber - ? (showFallback = createWorkInProgress( - prevHydrationParentFiber, - showFallback - )) - : ((showFallback = createFiberFromFragment( - showFallback, - didSuspend, - renderLanes, - null - )), - (showFallback.flags |= 2)); - showFallback.return = workInProgress; - nextProps.return = workInProgress; - nextProps.sibling = showFallback; - workInProgress.child = nextProps; - nextProps = showFallback; - showFallback = workInProgress.child; - didSuspend = current.child.memoizedState; - null === didSuspend - ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) - : ((nextInstance = didSuspend.cachePool), - null !== nextInstance - ? ((prevHydrationParentFiber = CacheContext._currentValue), - (nextInstance = - nextInstance.parent !== prevHydrationParentFiber - ? { - parent: prevHydrationParentFiber, - pool: prevHydrationParentFiber - } - : nextInstance)) - : (nextInstance = getSuspendedCache()), - (didSuspend = { - baseLanes: didSuspend.baseLanes | renderLanes, - cachePool: nextInstance - })); - showFallback.memoizedState = didSuspend; - enableTransitionTracing && - ((didSuspend = enableTransitionTracing ? transitionStack.current : null), - null !== didSuspend && - ((nextInstance = enableTransitionTracing - ? markerInstanceStack.current - : null), - (prevHydrationParentFiber = showFallback.updateQueue), - (primaryChildProps = current.updateQueue), - null === prevHydrationParentFiber - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: null - }) - : prevHydrationParentFiber === primaryChildProps - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: - null !== primaryChildProps ? primaryChildProps.retryQueue : null - }) - : ((prevHydrationParentFiber.transitions = didSuspend), - (prevHydrationParentFiber.markerInstances = nextInstance)))); - showFallback.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return nextProps; + null !== JSCompiler_temp$jscomp$0 && + ((nextInstance = JSCompiler_temp$jscomp$0.dehydrated), + null !== nextInstance) + ) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (JSCompiler_temp = createCapturedValueFromError( + Error(formatProdErrorMessage(422)) + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (nextProps = createFiberFromOffscreen( + { mode: "visible", children: nextProps.children }, + nextInstance, + 0, + null + )), + (showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2), + (nextProps.return = workInProgress), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + 0 !== (workInProgress.mode & 1) && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (nextProps = workInProgress.child), + (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (nextProps.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = showFallback)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + "$!" === nextInstance.data) + ) { + JSCompiler_temp = + nextInstance.nextSibling && nextInstance.nextSibling.dataset; + if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; + JSCompiler_temp = digest; + nextProps = Error(formatProdErrorMessage(419)); + nextProps.digest = JSCompiler_temp; + JSCompiler_temp = createCapturedValueFromError( + nextProps, + JSCompiler_temp, + void 0 + ); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ); + } else if ( + (enableLazyContextPropagation && + !didReceiveUpdate && + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_temp) + ) { + JSCompiler_temp = workInProgressRoot; + if (null !== JSCompiler_temp) { + nextProps = renderLanes & -renderLanes; + if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) + nextProps = 1; + else + switch (nextProps) { + case 2: + nextProps = 1; + break; + case 8: + nextProps = 4; + break; + case 32: + nextProps = 16; + break; + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + nextProps = 64; + break; + case 268435456: + nextProps = 134217728; + break; + default: + nextProps = 0; + } + nextProps = + 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) + ? 0 + : nextProps; + if (0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane) + throw ( + ((JSCompiler_temp$jscomp$0.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); + } + "$?" === nextInstance.data || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + null + ); + } else + "$?" === nextInstance.data + ? ((workInProgress.flags |= 128), + (workInProgress.child = current.child), + (workInProgress = retryDehydratedSuspenseBoundary.bind( + null, + current + )), + (nextInstance._reactRetry = workInProgress), + (workInProgress = null)) + : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + (nextHydratableInstance = getNextHydratable( + nextInstance.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + ((idStack[idStackIndex++] = treeContextId), + (idStack[idStackIndex++] = treeContextOverflow), + (idStack[idStackIndex++] = treeContextProvider), + (treeContextId = renderLanes.id), + (treeContextOverflow = renderLanes.overflow), + (treeContextProvider = workInProgress)), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + nextProps.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; } + if (showFallback) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (JSCompiler_temp$jscomp$0 = current.child), + (digest = JSCompiler_temp$jscomp$0.sibling), + (didSuspend = { mode: "hidden", children: nextProps.children }), + 0 === (nextInstance & 1) && + workInProgress.child !== JSCompiler_temp$jscomp$0 + ? ((nextProps = workInProgress.child), + (nextProps.childLanes = 0), + (nextProps.pendingProps = didSuspend), + (workInProgress.deletions = null)) + : ((nextProps = createWorkInProgress( + JSCompiler_temp$jscomp$0, + didSuspend + )), + (nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)), + null !== digest + ? (showFallback = createWorkInProgress(digest, showFallback)) + : ((showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2)), + (showFallback.return = workInProgress), + (nextProps.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + (nextProps = showFallback), + (showFallback = workInProgress.child), + (nextInstance = current.child.memoizedState), + null === nextInstance + ? (nextInstance = mountSuspenseOffscreenState(renderLanes)) + : ((JSCompiler_temp$jscomp$0 = nextInstance.cachePool), + null !== JSCompiler_temp$jscomp$0 + ? ((digest = CacheContext._currentValue), + (JSCompiler_temp$jscomp$0 = + JSCompiler_temp$jscomp$0.parent !== digest + ? { parent: digest, pool: digest } + : JSCompiler_temp$jscomp$0)) + : (JSCompiler_temp$jscomp$0 = getSuspendedCache()), + (nextInstance = { + baseLanes: nextInstance.baseLanes | renderLanes, + cachePool: JSCompiler_temp$jscomp$0 + })), + (showFallback.memoizedState = nextInstance), + enableTransitionTracing && + ((nextInstance = enableTransitionTracing + ? transitionStack.current + : null), + null !== nextInstance && + ((JSCompiler_temp$jscomp$0 = enableTransitionTracing + ? markerInstanceStack.current + : null), + (digest = showFallback.updateQueue), + (didSuspend = current.updateQueue), + null === digest + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null + }) + : digest === didSuspend + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null !== didSuspend ? didSuspend.retryQueue : null + }) + : ((digest.transitions = nextInstance), + (digest.markerInstances = JSCompiler_temp$jscomp$0)))), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + nextProps + ); pushPrimaryTreeSuspenseHandler(workInProgress); JSCompiler_temp = current.child; current = JSCompiler_temp.sibling; @@ -6196,194 +6300,6 @@ function retrySuspenseComponentWithoutHydrating( workInProgress.memoizedState = null; return current; } -function updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - didPrimaryChildrenDefer, - nextProps, - suspenseInstance, - suspenseState, - renderLanes -) { - if (didSuspend) { - if (workInProgress.flags & 256) - return ( - pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (suspenseInstance = createCapturedValueFromError( - Error(formatProdErrorMessage(422)) - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ) - ); - if (null !== workInProgress.memoizedState) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - null - ); - reuseSuspenseHandlerOnStack(workInProgress); - suspenseInstance = nextProps.fallback; - suspenseState = workInProgress.mode; - nextProps = createFiberFromOffscreen( - { mode: "visible", children: nextProps.children }, - suspenseState, - 0, - null - ); - suspenseInstance = createFiberFromFragment( - suspenseInstance, - suspenseState, - renderLanes, - null - ); - suspenseInstance.flags |= 2; - nextProps.return = workInProgress; - suspenseInstance.return = workInProgress; - nextProps.sibling = suspenseInstance; - workInProgress.child = nextProps; - 0 !== (workInProgress.mode & 1) && - reconcileChildFibers(workInProgress, current.child, null, renderLanes); - suspenseState = workInProgress.child; - suspenseState.memoizedState = mountSuspenseOffscreenState(renderLanes); - suspenseState.childLanes = getRemainingWorkInPrimaryTree( - current, - didPrimaryChildrenDefer, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return suspenseInstance; - } - pushPrimaryTreeSuspenseHandler(workInProgress); - if (0 === (workInProgress.mode & 1)) - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - if ("$!" === suspenseInstance.data) { - suspenseInstance = - suspenseInstance.nextSibling && suspenseInstance.nextSibling.dataset; - if (suspenseInstance) var digest = suspenseInstance.dgst; - suspenseInstance = digest; - didPrimaryChildrenDefer = Error(formatProdErrorMessage(419)); - didPrimaryChildrenDefer.digest = suspenseInstance; - suspenseInstance = createCapturedValueFromError( - didPrimaryChildrenDefer, - suspenseInstance, - void 0 - ); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ); - } - enableLazyContextPropagation && - !didReceiveUpdate && - propagateParentContextChanges(current, workInProgress, renderLanes, !1); - didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes); - if (didReceiveUpdate || didPrimaryChildrenDefer) { - didPrimaryChildrenDefer = workInProgressRoot; - if (null !== didPrimaryChildrenDefer) { - nextProps = renderLanes & -renderLanes; - if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) - nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 64; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== suspenseState.retryLane) - throw ( - ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) - ); - } - "$?" !== suspenseInstance.data && renderDidSuspendDelayIfPossible(); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if ("$?" === suspenseInstance.data) - return ( - (workInProgress.flags |= 128), - (workInProgress.child = current.child), - (workInProgress = retryDehydratedSuspenseBoundary.bind(null, current)), - (suspenseInstance._reactRetry = workInProgress), - null - ); - current = suspenseState.treeContext; - nextHydratableInstance = getNextHydratable(suspenseInstance.nextSibling); - hydrationParentFiber = workInProgress; - isHydrating = !0; - hydrationErrors = null; - rootOrSingletonContext = !1; - null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)); - workInProgress = mountSuspensePrimaryChildren( - workInProgress, - nextProps.children - ); - workInProgress.flags |= 4096; - return workInProgress; -} function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; @@ -6925,92 +6841,74 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 5: - return ( - null === current && - isHydrating && - (((context = Component = nextHydratableInstance), context) - ? tryHydrateInstance(workInProgress, context) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(context)), - (prevState = hydrationParentFiber), - nextHydratableInstance && - tryHydrateInstance(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevState, context) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))), - pushHostContext(workInProgress), - (context = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (Component = prevState.children), - shouldSetTextContent(context, prevState) - ? (Component = null) - : null !== nextState && - shouldSetTextContent(context, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((context = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes + if (null === current && isHydrating) { + if ((context = Component = nextHydratableInstance)) + (Component = canHydrateInstance( + Component, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext )), - (HostTransitionContext._currentValue = context), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== context && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), - workInProgress.child - ); + null !== Component + ? ((workInProgress.stateNode = Component), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + Component.firstChild + )), + (rootOrSingletonContext = !1), + (context = !0)) + : (context = !1); + context || throwOnHydrationMismatch(); + } + pushHostContext(workInProgress); + context = workInProgress.type; + prevState = workInProgress.pendingProps; + nextState = null !== current ? current.memoizedProps : null; + Component = prevState.children; + shouldSetTextContent(context, prevState) + ? (Component = null) + : null !== nextState && + shouldSetTextContent(context, nextState) && + (workInProgress.flags |= 32); + null !== workInProgress.memoizedState && + ((context = renderWithHooks( + current, + workInProgress, + TransitionAwareHostComponent, + null, + null, + renderLanes + )), + (HostTransitionContext._currentValue = context), + enableLazyContextPropagation || + (didReceiveUpdate && + null !== current && + current.memoizedState.memoizedState !== context && + propagateContextChange( + workInProgress, + HostTransitionContext, + renderLanes + ))); + markRef(current, workInProgress); + reconcileChildren(current, workInProgress, Component, renderLanes); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - (((current = renderLanes = nextHydratableInstance), current) - ? tryHydrateText(workInProgress, current) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(current)), - (Component = hydrationParentFiber), - nextHydratableInstance && - tryHydrateText(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(Component, current) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))), - null - ); + if (null === current && isHydrating) { + if ((current = renderLanes = nextHydratableInstance)) + (renderLanes = canHydrateTextInstance( + renderLanes, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== renderLanes + ? ((workInProgress.stateNode = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (current = !0)) + : (current = !1); + current || throwOnHydrationMismatch(); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: @@ -7761,14 +7659,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$112 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$112 = lastTailNode), + for (var lastTailNode$111 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$111 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$112 + null === lastTailNode$111 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$112.sibling = null); + : (lastTailNode$111.sibling = null); } } function bubbleProperties(completedWork) { @@ -7778,19 +7676,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$113 = completedWork.child; null !== child$113; ) - (newChildLanes |= child$113.lanes | child$113.childLanes), - (subtreeFlags |= child$113.subtreeFlags & 31457280), - (subtreeFlags |= child$113.flags & 31457280), - (child$113.return = completedWork), - (child$113 = child$113.sibling); + for (var child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags & 31457280), + (subtreeFlags |= child$112.flags & 31457280), + (child$112.return = completedWork), + (child$112 = child$112.sibling); else - for (child$113 = completedWork.child; null !== child$113; ) - (newChildLanes |= child$113.lanes | child$113.childLanes), - (subtreeFlags |= child$113.subtreeFlags), - (subtreeFlags |= child$113.flags), - (child$113.return = completedWork), - (child$113 = child$113.sibling); + for (child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags), + (subtreeFlags |= child$112.flags), + (child$112.return = completedWork), + (child$112 = child$112.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8053,33 +7951,20 @@ function completeWork(current, workInProgress, renderLanes) { ) switch (currentResource.tag) { case 3: - currentResource = 0 !== (currentResource.mode & 1); - checkForUnmatchedText( - current.nodeValue, - renderLanes, - currentResource - ); - if ( - currentResource && - enableClientRenderFallbackOnTextMismatch - ) { + checkForUnmatchedText(current.nodeValue, renderLanes); + if (enableClientRenderFallbackOnTextMismatch) { current = !1; break a; } break; case 27: case 5: - var isConcurrentMode$24 = 0 !== (currentResource.mode & 1); - !0 !== - currentResource.memoizedProps.suppressHydrationWarning && - checkForUnmatchedText( - current.nodeValue, - renderLanes, - isConcurrentMode$24 - ); if ( - isConcurrentMode$24 && - enableClientRenderFallbackOnTextMismatch + (!0 !== + currentResource.memoizedProps + .suppressHydrationWarning && + checkForUnmatchedText(current.nodeValue, renderLanes), + enableClientRenderFallbackOnTextMismatch) ) { current = !1; break a; @@ -8137,18 +8022,19 @@ function completeWork(current, workInProgress, renderLanes) { return (workInProgress.lanes = renderLanes), workInProgress; renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - renderLanes && - ((newProps = workInProgress.child), - (currentResource = null), + if (renderLanes) { + newProps = workInProgress.child; + currentResource = null; null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && - (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$24 = null), + (currentResource = newProps.alternate.memoizedState.cachePool.pool); + var cache$124 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$24 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$24 !== currentResource && (newProps.flags |= 2048)); + (cache$124 = newProps.memoizedState.cachePool.pool); + cache$124 !== currentResource && (newProps.flags |= 2048); + } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -8188,8 +8074,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$24 = currentResource.rendering; - if (null === isConcurrentMode$24) + cache$124 = currentResource.rendering; + if (null === cache$124) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8197,11 +8083,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$24 = findFirstSuspended(current); - if (null !== isConcurrentMode$24) { + cache$124 = findFirstSuspended(current); + if (null !== cache$124) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$24.updateQueue; + current = cache$124.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8226,10 +8112,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if ( - ((current = findFirstSuspended(isConcurrentMode$24)), - null !== current) - ) { + if (((current = findFirstSuspended(cache$124)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8239,7 +8122,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$24.alternate && + !cache$124.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8252,13 +8135,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$24.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$24)) + ? ((cache$124.sibling = workInProgress.child), + (workInProgress.child = cache$124)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$24) - : (workInProgress.child = isConcurrentMode$24), - (currentResource.last = isConcurrentMode$24)); + ? (current.sibling = cache$124) + : (workInProgress.child = cache$124), + (currentResource.last = cache$124)); } if (null !== currentResource.tail) return ( @@ -8523,8 +8406,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$143) { - captureCommitPhaseError(current, nearestMountedAncestor, error$143); + } catch (error$142) { + captureCommitPhaseError(current, nearestMountedAncestor, error$142); } else ref.current = null; } @@ -8561,7 +8444,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$193) { + } catch (e$192) { JSCompiler_temp = null; break a; } @@ -8827,11 +8710,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$145) { + } catch (error$144) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$145 + error$144 ); } } @@ -9511,8 +9394,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$158) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$158); + } catch (error$157) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$157); } } break; @@ -9684,11 +9567,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$159) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$158 ); } } @@ -9726,8 +9609,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$160) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$160); + } catch (error$159) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$159); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9738,8 +9621,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$162) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$162); } } break; @@ -9753,8 +9636,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$164) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$164); + } catch (error$163) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$163); } } break; @@ -9768,8 +9651,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } break; case 4: @@ -9799,8 +9682,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$167) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$167); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } current = finishedWork.updateQueue; null !== current && @@ -9878,11 +9761,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$148) { + } catch (error$147) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$148 + error$147 ); } } else if ( @@ -9957,21 +9840,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$149 = JSCompiler_inline_result.stateNode; + var parent$148 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$149, ""), + (setTextContent(parent$148, ""), (JSCompiler_inline_result.flags &= -33)); - var before$150 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$150, parent$149); + var before$149 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$149, parent$148); break; case 3: case 4: - var parent$151 = JSCompiler_inline_result.stateNode.containerInfo, - before$152 = getHostSibling(finishedWork); + var parent$150 = JSCompiler_inline_result.stateNode.containerInfo, + before$151 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$152, - parent$151 + before$151, + parent$150 ); break; default: @@ -10441,9 +10324,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$174 = finishedWork.stateNode; + var instance$173 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$174._visibility & 4 + ? instance$173._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10456,7 +10339,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$174._visibility |= 4), + : ((instance$173._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10464,7 +10347,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$174._visibility |= 4), + : ((instance$173._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10477,7 +10360,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$174 + instance$173 ); break; case 24: @@ -11421,8 +11304,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$182) { - handleThrow(root, thrownValue$182); + } catch (thrownValue$181) { + handleThrow(root, thrownValue$181); } while (1); lanes && root.shellSuspendCounter++; @@ -11527,8 +11410,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$184) { - handleThrow(root, thrownValue$184); + } catch (thrownValue$183) { + handleThrow(root, thrownValue$183); } while (1); resetContextDependencies(); @@ -11751,12 +11634,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$188 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$187 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$188 && + shouldFireAfterActiveInstanceBlur$187 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11837,7 +11720,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$189 = rootWithPendingPassiveEffects, + var root$188 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11853,7 +11736,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$189, remainingLanes); + releaseRootPooledCache(root$188, remainingLanes); } } return !1; @@ -12552,12 +12435,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$191 = fiber.stateNode; - if (root$191.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$191.pendingLanes); + var root$190 = fiber.stateNode; + if (root$190.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$190.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$191, lanes), - ensureRootIsScheduled(root$191), + (upgradePendingLanesToSync(root$190, lanes), + ensureRootIsScheduled(root$190), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13123,19 +13006,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$350; + var JSCompiler_inline_result$jscomp$345; if (canUseDOM) { - var isSupported$jscomp$inline_1550 = "oninput" in document; - if (!isSupported$jscomp$inline_1550) { - var element$jscomp$inline_1551 = document.createElement("div"); - element$jscomp$inline_1551.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1550 = - "function" === typeof element$jscomp$inline_1551.oninput; + var isSupported$jscomp$inline_1515 = "oninput" in document; + if (!isSupported$jscomp$inline_1515) { + var element$jscomp$inline_1516 = document.createElement("div"); + element$jscomp$inline_1516.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1515 = + "function" === typeof element$jscomp$inline_1516.oninput; } - JSCompiler_inline_result$jscomp$350 = isSupported$jscomp$inline_1550; - } else JSCompiler_inline_result$jscomp$350 = !1; + JSCompiler_inline_result$jscomp$345 = isSupported$jscomp$inline_1515; + } else JSCompiler_inline_result$jscomp$345 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$350 && + JSCompiler_inline_result$jscomp$345 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13507,20 +13390,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1591 = 0; - i$jscomp$inline_1591 < simpleEventPluginEvents.length; - i$jscomp$inline_1591++ + var i$jscomp$inline_1556 = 0; + i$jscomp$inline_1556 < simpleEventPluginEvents.length; + i$jscomp$inline_1556++ ) { - var eventName$jscomp$inline_1592 = - simpleEventPluginEvents[i$jscomp$inline_1591], - domEventName$jscomp$inline_1593 = - eventName$jscomp$inline_1592.toLowerCase(), - capitalizedEvent$jscomp$inline_1594 = - eventName$jscomp$inline_1592[0].toUpperCase() + - eventName$jscomp$inline_1592.slice(1); + var eventName$jscomp$inline_1557 = + simpleEventPluginEvents[i$jscomp$inline_1556], + domEventName$jscomp$inline_1558 = + eventName$jscomp$inline_1557.toLowerCase(), + capitalizedEvent$jscomp$inline_1559 = + eventName$jscomp$inline_1557[0].toUpperCase() + + eventName$jscomp$inline_1557.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1593, - "on" + capitalizedEvent$jscomp$inline_1594 + domEventName$jscomp$inline_1558, + "on" + capitalizedEvent$jscomp$inline_1559 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14366,11 +14249,10 @@ function normalizeMarkupForTextOrAttribute(markup) { .replace(NORMALIZE_NEWLINES_REGEX, "\n") .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } -function checkForUnmatchedText(serverText, clientText, isConcurrentMode) { +function checkForUnmatchedText(serverText, clientText) { clientText = normalizeMarkupForTextOrAttribute(clientText); if ( normalizeMarkupForTextOrAttribute(serverText) !== clientText && - isConcurrentMode && enableClientRenderFallbackOnTextMismatch ) throw Error(formatProdErrorMessage(425)); @@ -15008,14 +14890,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$220 in nextProps) { - var propKey = nextProps[propKey$220]; - lastProp = lastProps[propKey$220]; + for (var propKey$219 in nextProps) { + var propKey = nextProps[propKey$219]; + lastProp = lastProps[propKey$219]; if ( - nextProps.hasOwnProperty(propKey$220) && + nextProps.hasOwnProperty(propKey$219) && (null != propKey || null != lastProp) ) - switch (propKey$220) { + switch (propKey$219) { case "type": type = propKey; break; @@ -15044,7 +14926,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$220, + propKey$219, propKey, nextProps, lastProp @@ -15063,7 +14945,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$220 = null; + propKey = value = defaultValue = propKey$219 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15094,7 +14976,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$220 = type; + propKey$219 = type; break; case "defaultValue": defaultValue = type; @@ -15115,15 +14997,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$220 - ? updateOptions(domElement, !!lastProps, propKey$220, !1) + null != propKey$219 + ? updateOptions(domElement, !!lastProps, propKey$219, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$220 = null; + propKey = propKey$219 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15147,7 +15029,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$220 = name; + propKey$219 = name; break; case "defaultValue": propKey = name; @@ -15161,17 +15043,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$220, propKey); + updateTextarea(domElement, propKey$219, propKey); return; case "option": - for (var propKey$236 in lastProps) + for (var propKey$235 in lastProps) if ( - ((propKey$220 = lastProps[propKey$236]), - lastProps.hasOwnProperty(propKey$236) && - null != propKey$220 && - !nextProps.hasOwnProperty(propKey$236)) + ((propKey$219 = lastProps[propKey$235]), + lastProps.hasOwnProperty(propKey$235) && + null != propKey$219 && + !nextProps.hasOwnProperty(propKey$235)) ) - switch (propKey$236) { + switch (propKey$235) { case "selected": domElement.selected = !1; break; @@ -15179,33 +15061,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$236, + propKey$235, null, nextProps, - propKey$220 + propKey$219 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$220 = nextProps[lastDefaultValue]), + ((propKey$219 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$220 !== propKey && - (null != propKey$220 || null != propKey)) + propKey$219 !== propKey && + (null != propKey$219 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$220 && - "function" !== typeof propKey$220 && - "symbol" !== typeof propKey$220; + propKey$219 && + "function" !== typeof propKey$219 && + "symbol" !== typeof propKey$219; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$220, + propKey$219, nextProps, propKey ); @@ -15226,24 +15108,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$241 in lastProps) - (propKey$220 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - null != propKey$220 && - !nextProps.hasOwnProperty(propKey$241) && - setProp(domElement, tag, propKey$241, null, nextProps, propKey$220); + for (var propKey$240 in lastProps) + (propKey$219 = lastProps[propKey$240]), + lastProps.hasOwnProperty(propKey$240) && + null != propKey$219 && + !nextProps.hasOwnProperty(propKey$240) && + setProp(domElement, tag, propKey$240, null, nextProps, propKey$219); for (checked in nextProps) if ( - ((propKey$220 = nextProps[checked]), + ((propKey$219 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$220 !== propKey && - (null != propKey$220 || null != propKey)) + propKey$219 !== propKey && + (null != propKey$219 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$220) + if (null != propKey$219) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15251,7 +15133,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$220, + propKey$219, nextProps, propKey ); @@ -15259,49 +15141,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$246 in lastProps) - (propKey$220 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$220 && - !nextProps.hasOwnProperty(propKey$246) && + for (var propKey$245 in lastProps) + (propKey$219 = lastProps[propKey$245]), + lastProps.hasOwnProperty(propKey$245) && + null != propKey$219 && + !nextProps.hasOwnProperty(propKey$245) && setPropOnCustomElement( domElement, tag, - propKey$246, + propKey$245, null, nextProps, - propKey$220 + propKey$219 ); for (defaultChecked in nextProps) - (propKey$220 = nextProps[defaultChecked]), + (propKey$219 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$220 === propKey || - (null == propKey$220 && null == propKey) || + propKey$219 === propKey || + (null == propKey$219 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$220, + propKey$219, nextProps, propKey ); return; } } - for (var propKey$251 in lastProps) - (propKey$220 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - null != propKey$220 && - !nextProps.hasOwnProperty(propKey$251) && - setProp(domElement, tag, propKey$251, null, nextProps, propKey$220); + for (var propKey$250 in lastProps) + (propKey$219 = lastProps[propKey$250]), + lastProps.hasOwnProperty(propKey$250) && + null != propKey$219 && + !nextProps.hasOwnProperty(propKey$250) && + setProp(domElement, tag, propKey$250, null, nextProps, propKey$219); for (lastProp in nextProps) - (propKey$220 = nextProps[lastProp]), + (propKey$219 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$220 === propKey || - (null == propKey$220 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$220, nextProps, propKey); + propKey$219 === propKey || + (null == propKey$219 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$219, nextProps, propKey); } function noop$1() {} var Internals = { @@ -15532,7 +15414,7 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) { default: return instance; } - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) break; } return null; @@ -15547,7 +15429,7 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { !inRootOrSingleton ) return null; - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) return null; } return instance; @@ -15571,9 +15453,6 @@ function getNextHydratable(node) { } return node; } -function getNextHydratableSibling(instance) { - return getNextHydratable(instance.nextSibling); -} function hydrateInstance( instance, type, @@ -15583,7 +15462,6 @@ function hydrateInstance( ) { instance[internalInstanceKey] = internalInstanceHandle; instance[internalPropsKey] = props; - hostContext = 0 !== (internalInstanceHandle.mode & 1); switch (type) { case "dialog": listenToNonDelegatedEvent("cancel", instance); @@ -15596,15 +15474,8 @@ function hydrateInstance( break; case "video": case "audio": - for ( - internalInstanceHandle = 0; - internalInstanceHandle < mediaEventTypes.length; - internalInstanceHandle++ - ) - listenToNonDelegatedEvent( - mediaEventTypes[internalInstanceHandle], - instance - ); + for (hostContext = 0; hostContext < mediaEventTypes.length; hostContext++) + listenToNonDelegatedEvent(mediaEventTypes[hostContext], instance); break; case "source": listenToNonDelegatedEvent("error", instance); @@ -15640,20 +15511,16 @@ function hydrateInstance( initTextarea(instance, props.value, props.defaultValue, props.children), track(instance); } - internalInstanceHandle = props.children; - ("string" === typeof internalInstanceHandle || - "number" === typeof internalInstanceHandle || - (enableBigIntSupport && "bigint" === typeof internalInstanceHandle)) && - instance.textContent !== "" + internalInstanceHandle && + hostContext = props.children; + ("string" === typeof hostContext || + "number" === typeof hostContext || + (enableBigIntSupport && "bigint" === typeof hostContext)) && + instance.textContent !== "" + hostContext && (!0 !== props.suppressHydrationWarning && - checkForUnmatchedText( - instance.textContent, - internalInstanceHandle, - hostContext - ), - (hostContext && enableClientRenderFallbackOnTextMismatch) || + checkForUnmatchedText(instance.textContent, hostContext), + enableClientRenderFallbackOnTextMismatch || "body" === type || - (instance.textContent = internalInstanceHandle)); + (instance.textContent = hostContext)); null != props.onScroll && listenToNonDelegatedEvent("scroll", instance); null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", instance); null != props.onClick && (instance.onclick = noop$2); @@ -15976,17 +15843,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$259 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$260 = styles$259.get(type); - resource$260 || + var styles$258 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$259 = styles$258.get(type); + resource$259 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$260 = { + (resource$259 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$259.set(type, resource$260), + styles$258.set(type, resource$259), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16001,9 +15868,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$260.state + resource$259.state )); - return resource$260; + return resource$259; } return null; case "script": @@ -16086,37 +15953,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$264 = hoistableRoot.querySelector( + var instance$263 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$264) + if (instance$263) return ( (resource.state.loading |= 4), - (resource.instance = instance$264), - markNodeAsHoistable(instance$264), - instance$264 + (resource.instance = instance$263), + markNodeAsHoistable(instance$263), + instance$263 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$264 = ( + instance$263 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$264); - var linkInstance = instance$264; + markNodeAsHoistable(instance$263); + var linkInstance = instance$263; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$264, "link", instance); + setInitialProperties(instance$263, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$264, props.precedence, hoistableRoot); - return (resource.instance = instance$264); + insertStylesheet(instance$263, props.precedence, hoistableRoot); + return (resource.instance = instance$263); case "script": - instance$264 = getScriptKey(props.src); + instance$263 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$264) + getScriptSelectorFromKey(instance$263) )) ) return ( @@ -16125,7 +15992,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$264))) + if ((styleProps = preloadPropsMap.get(instance$263))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17130,11 +16997,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$285); + var instance = getPublicRootInstance(root$284); originalCallback.call(instance); }; } - var root$285 = createHydrationContainer( + var root$284 = createHydrationContainer( initialChildren, callback, container, @@ -17147,23 +17014,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$285; - container[internalContainerInstanceKey] = root$285.current; + container._reactRootContainer = root$284; + container[internalContainerInstanceKey] = root$284.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$285; + return root$284; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$286 = callback; + var originalCallback$285 = callback; callback = function () { - var instance = getPublicRootInstance(root$287); - originalCallback$286.call(instance); + var instance = getPublicRootInstance(root$286); + originalCallback$285.call(instance); }; } - var root$287 = createFiberRoot( + var root$286 = createFiberRoot( container, 0, !1, @@ -17176,15 +17043,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$287; - container[internalContainerInstanceKey] = root$287.current; + container._reactRootContainer = root$286; + container[internalContainerInstanceKey] = root$286.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$287, parentComponent, callback); + updateContainer(initialChildren, root$286, parentComponent, callback); }); - return root$287; + return root$286; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17249,17 +17116,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1816 = { +var devToolsConfig$jscomp$inline_1779 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-11e2b771", + version: "19.0.0-www-classic-f3967e51", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2175 = { - bundleType: devToolsConfig$jscomp$inline_1816.bundleType, - version: devToolsConfig$jscomp$inline_1816.version, - rendererPackageName: devToolsConfig$jscomp$inline_1816.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1816.rendererConfig, +var internals$jscomp$inline_2172 = { + bundleType: devToolsConfig$jscomp$inline_1779.bundleType, + version: devToolsConfig$jscomp$inline_1779.version, + rendererPackageName: devToolsConfig$jscomp$inline_1779.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1779.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17275,26 +17142,26 @@ var internals$jscomp$inline_2175 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1816.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1779.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-11e2b771" + reconcilerVersion: "19.0.0-www-classic-f3967e51" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2176 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2173 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2176.isDisabled && - hook$jscomp$inline_2176.supportsFiber + !hook$jscomp$inline_2173.isDisabled && + hook$jscomp$inline_2173.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2176.inject( - internals$jscomp$inline_2175 + (rendererID = hook$jscomp$inline_2173.inject( + internals$jscomp$inline_2172 )), - (injectedHook = hook$jscomp$inline_2176); + (injectedHook = hook$jscomp$inline_2173); } catch (err) {} } assign(Internals, { @@ -17366,17 +17233,6 @@ exports.findDOMNode = function (componentOrElement) { exports.flushSync = function (fn) { return flushSync$1(fn); }; -exports.hydrate = function (element, container, callback) { - if (!isValidContainerLegacy(container)) - throw Error(formatProdErrorMessage(299)); - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - !0, - callback - ); -}; exports.hydrateRoot = function (container, initialChildren, options) { if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299)); var isStrictMode = !1, @@ -17613,4 +17469,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-11e2b771"; +exports.version = "19.0.0-www-classic-f3967e51"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 289cb73f21..f78ba5fdc2 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -1600,85 +1600,6 @@ var hydrationParentFiber = null, isHydrating = !1, hydrationErrors = null, rootOrSingletonContext = !1; -function deleteHydratableInstance(returnFiber, instance) { - var fiber = createFiber(5, null, null, 0); - fiber.elementType = "DELETED"; - fiber.stateNode = instance; - fiber.return = returnFiber; - instance = returnFiber.deletions; - null === instance - ? ((returnFiber.deletions = [fiber]), (returnFiber.flags |= 16)) - : instance.push(fiber); -} -function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & -4097) | 2; -} -function tryHydrateInstance(fiber, nextInstance) { - nextInstance = canHydrateInstance( - nextInstance, - fiber.type, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = getNextHydratable(nextInstance.firstChild)), - (rootOrSingletonContext = !1), - !0) - : !1; -} -function tryHydrateText(fiber, nextInstance) { - nextInstance = canHydrateTextInstance( - nextInstance, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function tryHydrateSuspense(fiber, nextInstance) { - a: { - var instance = nextInstance; - for (nextInstance = rootOrSingletonContext; 8 !== instance.nodeType; ) { - if (!nextInstance) { - nextInstance = null; - break a; - } - instance = getNextHydratableSibling(instance); - if (null === instance) { - nextInstance = null; - break a; - } - } - nextInstance = instance; - } - return null !== nextInstance - ? ((instance = - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null), - (fiber.memoizedState = { - dehydrated: nextInstance, - treeContext: instance, - retryLane: 536870912 - }), - (instance = createFiber(18, null, null, 0)), - (instance.stateNode = nextInstance), - (instance.return = fiber), - (fiber.child = instance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function shouldClientRenderOnMismatch(fiber) { - return 0 !== (fiber.mode & 1) && 0 === (fiber.flags & 128); -} function throwOnHydrationMismatch() { throw Error(formatProdErrorMessage(418)); } @@ -1711,15 +1632,11 @@ function popHydrationState(fiber) { JSCompiler_temp = !JSCompiler_temp; } JSCompiler_temp && (shouldClear = !0); - if (shouldClear && (shouldClear = nextHydratableInstance)) - if (shouldClientRenderOnMismatch(fiber)) { - for (shouldClear = nextHydratableInstance; shouldClear; ) - shouldClear = getNextHydratableSibling(shouldClear); - throwOnHydrationMismatch(); - } else - for (; shouldClear; ) - deleteHydratableInstance(fiber, shouldClear), - (shouldClear = getNextHydratableSibling(shouldClear)); + if (shouldClear && nextHydratableInstance) { + for (shouldClear = nextHydratableInstance; shouldClear; ) + shouldClear = getNextHydratable(shouldClear.nextSibling); + throwOnHydrationMismatch(); + } popToNextHostParent(fiber); if (13 === fiber.tag) { fiber = fiber.memoizedState; @@ -1731,7 +1648,7 @@ function popHydrationState(fiber) { if (8 === fiber.nodeType) if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { if (0 === shouldClear) { - nextHydratableInstance = getNextHydratableSibling(fiber); + nextHydratableInstance = getNextHydratable(fiber.nextSibling); break a; } shouldClear--; @@ -1746,7 +1663,7 @@ function popHydrationState(fiber) { } } else nextHydratableInstance = hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) + ? getNextHydratable(fiber.stateNode.nextSibling) : null; return !0; } @@ -1861,39 +1778,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy || 0 === root$26.tag) { - var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes, + for (var root$25 = firstScheduledRoot; null !== root$25; ) { + if (!onlyLegacy || 0 === root$25.tag) { + var workInProgressRootRenderLanes$27 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$26, - root$26 === workInProgressRoot - ? workInProgressRootRenderLanes$28 + root$25, + root$25 === workInProgressRoot + ? workInProgressRootRenderLanes$27 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$28 = root$26; + workInProgressRootRenderLanes$27 = root$25; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$28.tag && + 0 !== workInProgressRootRenderLanes$27.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, originallyAttemptedLanes, errorRetryLanes ))); @@ -1901,39 +1818,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$28, 0), + prepareFreshStack(workInProgressRootRenderLanes$27, 0), markRootSuspended( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$28), + ensureRootIsScheduled(workInProgressRootRenderLanes$27), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$28.finishedWork = - workInProgressRootRenderLanes$28.current.alternate), - (workInProgressRootRenderLanes$28.finishedLanes = + : ((workInProgressRootRenderLanes$27.finishedWork = + workInProgressRootRenderLanes$27.current.alternate), + (workInProgressRootRenderLanes$27.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$28); + ensureRootIsScheduled(workInProgressRootRenderLanes$27); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$26 = root$26.next; + root$25 = root$25.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3540,7 +3457,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$53 = !1; + didReadFromEntangledAsyncAction$52 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3561,11 +3478,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$52 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$52 = !0); continue; } else (updateLane = { @@ -3611,7 +3528,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$53 && + didReadFromEntangledAsyncAction$52 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -3846,8 +3763,8 @@ function mountFormState(action, initialStateProp) { JSCompiler_inline_result = null; break b; } - JSCompiler_inline_result = getNextHydratableSibling( - JSCompiler_inline_result + JSCompiler_inline_result = getNextHydratable( + JSCompiler_inline_result.nextSibling ); if (null === JSCompiler_inline_result) { JSCompiler_inline_result = null; @@ -3861,8 +3778,8 @@ function mountFormState(action, initialStateProp) { : null; } if (JSCompiler_inline_result) { - nextHydratableInstance = getNextHydratableSibling( - JSCompiler_inline_result + nextHydratableInstance = getNextHydratable( + JSCompiler_inline_result.nextSibling ); JSCompiler_inline_result = "F!" === JSCompiler_inline_result.data; break a; @@ -4202,14 +4119,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$63 = enqueueUpdate(provider, fiber, lane); - null !== root$63 && - (scheduleUpdateOnFiber(root$63, provider, lane), - entangleTransitions(root$63, provider, lane)); + var root$62 = enqueueUpdate(provider, fiber, lane); + null !== root$62 && + (scheduleUpdateOnFiber(root$62, provider, lane), + entangleTransitions(root$62, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$63 && + null !== root$62 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4450,15 +4367,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$56 = workInProgressRoot; - if (null === root$56) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$56, workInProgressRootRenderLanes) || + var root$55 = workInProgressRoot; + if (null === root$55) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$55, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$56 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$56; - mountEffect(subscribeToStore.bind(null, fiber, root$56, subscribe), [ + root$55 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$55; + mountEffect(subscribeToStore.bind(null, fiber, root$55, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4467,7 +4384,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$56, + root$55, getServerSnapshot, getSnapshot ), @@ -5166,10 +5083,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$73 = workInProgress.stateNode; + root$72 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$73.incompleteTransitions.has(transition)) { + if (!root$72.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5177,11 +5094,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$73.incompleteTransitions.set(transition, markerInstance); + root$72.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$73.incompleteTransitions.forEach(function (markerInstance) { + root$72.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5772,52 +5689,72 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var nextInstance = (didSuspend = nextHydratableInstance); - if (!nextInstance) - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend); - else if (!tryHydrateSuspense(workInProgress, nextInstance)) { - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(); - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - nextHydratableInstance && - tryHydrateSuspense(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevHydrationParentFiber, nextInstance) - : (insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), + var nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance)) { + c: { + JSCompiler_temp$jscomp$0 = nextInstance; + for ( + nextInstance = rootOrSingletonContext; + 8 !== JSCompiler_temp$jscomp$0.nodeType; + + ) { + if (!nextInstance) { + nextInstance = null; + break c; + } + JSCompiler_temp$jscomp$0 = getNextHydratable( + JSCompiler_temp$jscomp$0.nextSibling + ); + if (null === JSCompiler_temp$jscomp$0) { + nextInstance = null; + break c; + } + } + nextInstance = JSCompiler_temp$jscomp$0; + } + null !== nextInstance + ? ((workInProgress.memoizedState = { + dehydrated: nextInstance, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912 + }), + (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), + (JSCompiler_temp$jscomp$0.stateNode = nextInstance), + (JSCompiler_temp$jscomp$0.return = workInProgress), + (workInProgress.child = JSCompiler_temp$jscomp$0), (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend)); + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(); } - didSuspend = workInProgress.memoizedState; + nextInstance = workInProgress.memoizedState; if ( - null !== didSuspend && - ((didSuspend = didSuspend.dehydrated), null !== didSuspend) + null !== nextInstance && + ((nextInstance = nextInstance.dehydrated), null !== nextInstance) ) return ( - 0 === (workInProgress.mode & 1) - ? (workInProgress.lanes = 2) - : "$!" === didSuspend.data + "$!" === nextInstance.data ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - didSuspend = nextProps.children; - nextInstance = nextProps.fallback; + nextInstance = nextProps.children; + JSCompiler_temp$jscomp$0 = nextProps.fallback; if (showFallback) return ( reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -5852,8 +5789,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -5868,106 +5805,273 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - return mountSuspensePrimaryChildren(workInProgress, didSuspend); + return mountSuspensePrimaryChildren(workInProgress, nextInstance); } - nextInstance = current.memoizedState; + JSCompiler_temp$jscomp$0 = current.memoizedState; if ( - null !== nextInstance && - ((prevHydrationParentFiber = nextInstance.dehydrated), - null !== prevHydrationParentFiber) - ) - return updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - JSCompiler_temp, - nextProps, - prevHydrationParentFiber, - nextInstance, - renderLanes - ); - if (showFallback) { - reuseSuspenseHandlerOnStack(workInProgress); - showFallback = nextProps.fallback; - didSuspend = workInProgress.mode; - nextInstance = current.child; - prevHydrationParentFiber = nextInstance.sibling; - var primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (didSuspend & 1) && workInProgress.child !== nextInstance - ? ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(nextInstance, primaryChildProps)), - (nextProps.subtreeFlags = nextInstance.subtreeFlags & 31457280)); - null !== prevHydrationParentFiber - ? (showFallback = createWorkInProgress( - prevHydrationParentFiber, - showFallback - )) - : ((showFallback = createFiberFromFragment( - showFallback, - didSuspend, - renderLanes, - null - )), - (showFallback.flags |= 2)); - showFallback.return = workInProgress; - nextProps.return = workInProgress; - nextProps.sibling = showFallback; - workInProgress.child = nextProps; - nextProps = showFallback; - showFallback = workInProgress.child; - didSuspend = current.child.memoizedState; - null === didSuspend - ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) - : ((nextInstance = didSuspend.cachePool), - null !== nextInstance - ? ((prevHydrationParentFiber = CacheContext._currentValue), - (nextInstance = - nextInstance.parent !== prevHydrationParentFiber - ? { - parent: prevHydrationParentFiber, - pool: prevHydrationParentFiber - } - : nextInstance)) - : (nextInstance = getSuspendedCache()), - (didSuspend = { - baseLanes: didSuspend.baseLanes | renderLanes, - cachePool: nextInstance - })); - showFallback.memoizedState = didSuspend; - enableTransitionTracing && - ((didSuspend = enableTransitionTracing ? transitionStack.current : null), - null !== didSuspend && - ((nextInstance = enableTransitionTracing - ? markerInstanceStack.current - : null), - (prevHydrationParentFiber = showFallback.updateQueue), - (primaryChildProps = current.updateQueue), - null === prevHydrationParentFiber - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: null - }) - : prevHydrationParentFiber === primaryChildProps - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: - null !== primaryChildProps ? primaryChildProps.retryQueue : null - }) - : ((prevHydrationParentFiber.transitions = didSuspend), - (prevHydrationParentFiber.markerInstances = nextInstance)))); - showFallback.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return nextProps; + null !== JSCompiler_temp$jscomp$0 && + ((nextInstance = JSCompiler_temp$jscomp$0.dehydrated), + null !== nextInstance) + ) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (JSCompiler_temp = createCapturedValueFromError( + Error(formatProdErrorMessage(422)) + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (nextProps = createFiberFromOffscreen( + { mode: "visible", children: nextProps.children }, + nextInstance, + 0, + null + )), + (showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2), + (nextProps.return = workInProgress), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + 0 !== (workInProgress.mode & 1) && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (nextProps = workInProgress.child), + (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (nextProps.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = showFallback)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + "$!" === nextInstance.data) + ) { + JSCompiler_temp = + nextInstance.nextSibling && nextInstance.nextSibling.dataset; + if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; + JSCompiler_temp = digest; + nextProps = Error(formatProdErrorMessage(419)); + nextProps.digest = JSCompiler_temp; + JSCompiler_temp = createCapturedValueFromError( + nextProps, + JSCompiler_temp, + void 0 + ); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ); + } else if ( + (enableLazyContextPropagation && + !didReceiveUpdate && + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_temp) + ) { + JSCompiler_temp = workInProgressRoot; + if (null !== JSCompiler_temp) { + nextProps = renderLanes & -renderLanes; + if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) + nextProps = 1; + else + switch (nextProps) { + case 2: + nextProps = 1; + break; + case 8: + nextProps = 4; + break; + case 32: + nextProps = 16; + break; + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + nextProps = 64; + break; + case 268435456: + nextProps = 134217728; + break; + default: + nextProps = 0; + } + nextProps = + 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) + ? 0 + : nextProps; + if (0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane) + throw ( + ((JSCompiler_temp$jscomp$0.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); + } + "$?" === nextInstance.data || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + null + ); + } else + "$?" === nextInstance.data + ? ((workInProgress.flags |= 128), + (workInProgress.child = current.child), + (workInProgress = retryDehydratedSuspenseBoundary.bind( + null, + current + )), + (nextInstance._reactRetry = workInProgress), + (workInProgress = null)) + : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + (nextHydratableInstance = getNextHydratable( + nextInstance.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + ((idStack[idStackIndex++] = treeContextId), + (idStack[idStackIndex++] = treeContextOverflow), + (idStack[idStackIndex++] = treeContextProvider), + (treeContextId = renderLanes.id), + (treeContextOverflow = renderLanes.overflow), + (treeContextProvider = workInProgress)), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + nextProps.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; } + if (showFallback) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (JSCompiler_temp$jscomp$0 = current.child), + (digest = JSCompiler_temp$jscomp$0.sibling), + (didSuspend = { mode: "hidden", children: nextProps.children }), + 0 === (nextInstance & 1) && + workInProgress.child !== JSCompiler_temp$jscomp$0 + ? ((nextProps = workInProgress.child), + (nextProps.childLanes = 0), + (nextProps.pendingProps = didSuspend), + (workInProgress.deletions = null)) + : ((nextProps = createWorkInProgress( + JSCompiler_temp$jscomp$0, + didSuspend + )), + (nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)), + null !== digest + ? (showFallback = createWorkInProgress(digest, showFallback)) + : ((showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2)), + (showFallback.return = workInProgress), + (nextProps.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + (nextProps = showFallback), + (showFallback = workInProgress.child), + (nextInstance = current.child.memoizedState), + null === nextInstance + ? (nextInstance = mountSuspenseOffscreenState(renderLanes)) + : ((JSCompiler_temp$jscomp$0 = nextInstance.cachePool), + null !== JSCompiler_temp$jscomp$0 + ? ((digest = CacheContext._currentValue), + (JSCompiler_temp$jscomp$0 = + JSCompiler_temp$jscomp$0.parent !== digest + ? { parent: digest, pool: digest } + : JSCompiler_temp$jscomp$0)) + : (JSCompiler_temp$jscomp$0 = getSuspendedCache()), + (nextInstance = { + baseLanes: nextInstance.baseLanes | renderLanes, + cachePool: JSCompiler_temp$jscomp$0 + })), + (showFallback.memoizedState = nextInstance), + enableTransitionTracing && + ((nextInstance = enableTransitionTracing + ? transitionStack.current + : null), + null !== nextInstance && + ((JSCompiler_temp$jscomp$0 = enableTransitionTracing + ? markerInstanceStack.current + : null), + (digest = showFallback.updateQueue), + (didSuspend = current.updateQueue), + null === digest + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null + }) + : digest === didSuspend + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null !== didSuspend ? didSuspend.retryQueue : null + }) + : ((digest.transitions = nextInstance), + (digest.markerInstances = JSCompiler_temp$jscomp$0)))), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + nextProps + ); pushPrimaryTreeSuspenseHandler(workInProgress); JSCompiler_temp = current.child; current = JSCompiler_temp.sibling; @@ -6043,194 +6147,6 @@ function retrySuspenseComponentWithoutHydrating( workInProgress.memoizedState = null; return current; } -function updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - didPrimaryChildrenDefer, - nextProps, - suspenseInstance, - suspenseState, - renderLanes -) { - if (didSuspend) { - if (workInProgress.flags & 256) - return ( - pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (suspenseInstance = createCapturedValueFromError( - Error(formatProdErrorMessage(422)) - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ) - ); - if (null !== workInProgress.memoizedState) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - null - ); - reuseSuspenseHandlerOnStack(workInProgress); - suspenseInstance = nextProps.fallback; - suspenseState = workInProgress.mode; - nextProps = createFiberFromOffscreen( - { mode: "visible", children: nextProps.children }, - suspenseState, - 0, - null - ); - suspenseInstance = createFiberFromFragment( - suspenseInstance, - suspenseState, - renderLanes, - null - ); - suspenseInstance.flags |= 2; - nextProps.return = workInProgress; - suspenseInstance.return = workInProgress; - nextProps.sibling = suspenseInstance; - workInProgress.child = nextProps; - 0 !== (workInProgress.mode & 1) && - reconcileChildFibers(workInProgress, current.child, null, renderLanes); - suspenseState = workInProgress.child; - suspenseState.memoizedState = mountSuspenseOffscreenState(renderLanes); - suspenseState.childLanes = getRemainingWorkInPrimaryTree( - current, - didPrimaryChildrenDefer, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return suspenseInstance; - } - pushPrimaryTreeSuspenseHandler(workInProgress); - if (0 === (workInProgress.mode & 1)) - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - if ("$!" === suspenseInstance.data) { - suspenseInstance = - suspenseInstance.nextSibling && suspenseInstance.nextSibling.dataset; - if (suspenseInstance) var digest = suspenseInstance.dgst; - suspenseInstance = digest; - didPrimaryChildrenDefer = Error(formatProdErrorMessage(419)); - didPrimaryChildrenDefer.digest = suspenseInstance; - suspenseInstance = createCapturedValueFromError( - didPrimaryChildrenDefer, - suspenseInstance, - void 0 - ); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ); - } - enableLazyContextPropagation && - !didReceiveUpdate && - propagateParentContextChanges(current, workInProgress, renderLanes, !1); - didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes); - if (didReceiveUpdate || didPrimaryChildrenDefer) { - didPrimaryChildrenDefer = workInProgressRoot; - if (null !== didPrimaryChildrenDefer) { - nextProps = renderLanes & -renderLanes; - if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) - nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 64; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== suspenseState.retryLane) - throw ( - ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) - ); - } - "$?" !== suspenseInstance.data && renderDidSuspendDelayIfPossible(); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if ("$?" === suspenseInstance.data) - return ( - (workInProgress.flags |= 128), - (workInProgress.child = current.child), - (workInProgress = retryDehydratedSuspenseBoundary.bind(null, current)), - (suspenseInstance._reactRetry = workInProgress), - null - ); - current = suspenseState.treeContext; - nextHydratableInstance = getNextHydratable(suspenseInstance.nextSibling); - hydrationParentFiber = workInProgress; - isHydrating = !0; - hydrationErrors = null; - rootOrSingletonContext = !1; - null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)); - workInProgress = mountSuspensePrimaryChildren( - workInProgress, - nextProps.children - ); - workInProgress.flags |= 4096; - return workInProgress; -} function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; @@ -6764,92 +6680,74 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 5: - return ( - null === current && - isHydrating && - (((init = Component = nextHydratableInstance), init) - ? tryHydrateInstance(workInProgress, init) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(init)), - (prevState = hydrationParentFiber), - nextHydratableInstance && - tryHydrateInstance(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevState, init) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))), - pushHostContext(workInProgress), - (init = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (Component = prevState.children), - shouldSetTextContent(init, prevState) - ? (Component = null) - : null !== nextState && - shouldSetTextContent(init, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((init = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes + if (null === current && isHydrating) { + if ((init = Component = nextHydratableInstance)) + (Component = canHydrateInstance( + Component, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext )), - (HostTransitionContext._currentValue = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), - workInProgress.child - ); + null !== Component + ? ((workInProgress.stateNode = Component), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + Component.firstChild + )), + (rootOrSingletonContext = !1), + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(); + } + pushHostContext(workInProgress); + init = workInProgress.type; + prevState = workInProgress.pendingProps; + nextState = null !== current ? current.memoizedProps : null; + Component = prevState.children; + shouldSetTextContent(init, prevState) + ? (Component = null) + : null !== nextState && + shouldSetTextContent(init, nextState) && + (workInProgress.flags |= 32); + null !== workInProgress.memoizedState && + ((init = renderWithHooks( + current, + workInProgress, + TransitionAwareHostComponent, + null, + null, + renderLanes + )), + (HostTransitionContext._currentValue = init), + enableLazyContextPropagation || + (didReceiveUpdate && + null !== current && + current.memoizedState.memoizedState !== init && + propagateContextChange( + workInProgress, + HostTransitionContext, + renderLanes + ))); + markRef(current, workInProgress); + reconcileChildren(current, workInProgress, Component, renderLanes); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - (((current = renderLanes = nextHydratableInstance), current) - ? tryHydrateText(workInProgress, current) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(current)), - (Component = hydrationParentFiber), - nextHydratableInstance && - tryHydrateText(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(Component, current) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))), - null - ); + if (null === current && isHydrating) { + if ((current = renderLanes = nextHydratableInstance)) + (renderLanes = canHydrateTextInstance( + renderLanes, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== renderLanes + ? ((workInProgress.stateNode = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (current = !0)) + : (current = !1); + current || throwOnHydrationMismatch(); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: @@ -7580,14 +7478,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$112 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$112 = lastTailNode), + for (var lastTailNode$111 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$111 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$112 + null === lastTailNode$111 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$112.sibling = null); + : (lastTailNode$111.sibling = null); } } function bubbleProperties(completedWork) { @@ -7597,19 +7495,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$113 = completedWork.child; null !== child$113; ) - (newChildLanes |= child$113.lanes | child$113.childLanes), - (subtreeFlags |= child$113.subtreeFlags & 31457280), - (subtreeFlags |= child$113.flags & 31457280), - (child$113.return = completedWork), - (child$113 = child$113.sibling); + for (var child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags & 31457280), + (subtreeFlags |= child$112.flags & 31457280), + (child$112.return = completedWork), + (child$112 = child$112.sibling); else - for (child$113 = completedWork.child; null !== child$113; ) - (newChildLanes |= child$113.lanes | child$113.childLanes), - (subtreeFlags |= child$113.subtreeFlags), - (subtreeFlags |= child$113.flags), - (child$113.return = completedWork), - (child$113 = child$113.sibling); + for (child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags), + (subtreeFlags |= child$112.flags), + (child$112.return = completedWork), + (child$112 = child$112.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7866,33 +7764,20 @@ function completeWork(current, workInProgress, renderLanes) { ) switch (currentResource.tag) { case 3: - currentResource = 0 !== (currentResource.mode & 1); - checkForUnmatchedText( - current.nodeValue, - renderLanes, - currentResource - ); - if ( - currentResource && - enableClientRenderFallbackOnTextMismatch - ) { + checkForUnmatchedText(current.nodeValue, renderLanes); + if (enableClientRenderFallbackOnTextMismatch) { current = !1; break a; } break; case 27: case 5: - var isConcurrentMode$24 = 0 !== (currentResource.mode & 1); - !0 !== - currentResource.memoizedProps.suppressHydrationWarning && - checkForUnmatchedText( - current.nodeValue, - renderLanes, - isConcurrentMode$24 - ); if ( - isConcurrentMode$24 && - enableClientRenderFallbackOnTextMismatch + (!0 !== + currentResource.memoizedProps + .suppressHydrationWarning && + checkForUnmatchedText(current.nodeValue, renderLanes), + enableClientRenderFallbackOnTextMismatch) ) { current = !1; break a; @@ -7950,18 +7835,19 @@ function completeWork(current, workInProgress, renderLanes) { return (workInProgress.lanes = renderLanes), workInProgress; renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - renderLanes && - ((newProps = workInProgress.child), - (currentResource = null), + if (renderLanes) { + newProps = workInProgress.child; + currentResource = null; null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && - (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$24 = null), + (currentResource = newProps.alternate.memoizedState.cachePool.pool); + var cache$124 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$24 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$24 !== currentResource && (newProps.flags |= 2048)); + (cache$124 = newProps.memoizedState.cachePool.pool); + cache$124 !== currentResource && (newProps.flags |= 2048); + } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -7997,8 +7883,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$24 = currentResource.rendering; - if (null === isConcurrentMode$24) + cache$124 = currentResource.rendering; + if (null === cache$124) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8006,11 +7892,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$24 = findFirstSuspended(current); - if (null !== isConcurrentMode$24) { + cache$124 = findFirstSuspended(current); + if (null !== cache$124) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$24.updateQueue; + current = cache$124.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8035,10 +7921,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if ( - ((current = findFirstSuspended(isConcurrentMode$24)), - null !== current) - ) { + if (((current = findFirstSuspended(cache$124)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8048,7 +7931,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$24.alternate && + !cache$124.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8061,13 +7944,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$24.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$24)) + ? ((cache$124.sibling = workInProgress.child), + (workInProgress.child = cache$124)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$24) - : (workInProgress.child = isConcurrentMode$24), - (currentResource.last = isConcurrentMode$24)); + ? (current.sibling = cache$124) + : (workInProgress.child = cache$124), + (currentResource.last = cache$124)); } if (null !== currentResource.tail) return ( @@ -8323,8 +8206,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$142) { - captureCommitPhaseError(current, nearestMountedAncestor, error$142); + } catch (error$141) { + captureCommitPhaseError(current, nearestMountedAncestor, error$141); } else ref.current = null; } @@ -8361,7 +8244,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$198) { + } catch (e$197) { JSCompiler_temp = null; break a; } @@ -8640,11 +8523,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$144) { + } catch (error$143) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$144 + error$143 ); } } @@ -9324,8 +9207,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$157) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$157); + } catch (error$156) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$156); } } break; @@ -9497,11 +9380,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$158) { + } catch (error$157) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$157 ); } } @@ -9539,8 +9422,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$159) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$159); + } catch (error$158) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$158); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9551,8 +9434,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$161) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$161); } } break; @@ -9566,8 +9449,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$162) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$162); } } break; @@ -9581,8 +9464,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$164) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$164); + } catch (error$163) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$163); } break; case 4: @@ -9612,8 +9495,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$166) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$166); + } catch (error$165) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$165); } current = finishedWork.updateQueue; null !== current && @@ -9691,11 +9574,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$147) { + } catch (error$146) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$147 + error$146 ); } } else if ( @@ -9770,21 +9653,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$148 = JSCompiler_inline_result.stateNode; + var parent$147 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$148, ""), + (setTextContent(parent$147, ""), (JSCompiler_inline_result.flags &= -33)); - var before$149 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$149, parent$148); + var before$148 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$148, parent$147); break; case 3: case 4: - var parent$150 = JSCompiler_inline_result.stateNode.containerInfo, - before$151 = getHostSibling(finishedWork); + var parent$149 = JSCompiler_inline_result.stateNode.containerInfo, + before$150 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$151, - parent$150 + before$150, + parent$149 ); break; default: @@ -10254,9 +10137,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$173 = finishedWork.stateNode; + var instance$172 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$173._visibility & 4 + ? instance$172._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10269,7 +10152,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$173._visibility |= 4), + : ((instance$172._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10277,7 +10160,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$173._visibility |= 4), + : ((instance$172._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10290,7 +10173,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$173 + instance$172 ); break; case 24: @@ -11234,8 +11117,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$181) { - handleThrow(root, thrownValue$181); + } catch (thrownValue$180) { + handleThrow(root, thrownValue$180); } while (1); lanes && root.shellSuspendCounter++; @@ -11340,8 +11223,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$182) { + handleThrow(root, thrownValue$182); } while (1); resetContextDependencies(); @@ -11560,12 +11443,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$187 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$186 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$187 && + shouldFireAfterActiveInstanceBlur$186 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11646,7 +11529,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$188 = rootWithPendingPassiveEffects, + var root$187 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11662,7 +11545,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$188, remainingLanes); + releaseRootPooledCache(root$187, remainingLanes); } } return !1; @@ -12273,12 +12156,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$190 = fiber.stateNode; - if (root$190.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$190.pendingLanes); + var root$189 = fiber.stateNode; + if (root$189.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$189.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$190, lanes), - ensureRootIsScheduled(root$190), + (upgradePendingLanesToSync(root$189, lanes), + ensureRootIsScheduled(root$189), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13490,19 +13373,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$348; + var JSCompiler_inline_result$jscomp$343; if (canUseDOM) { - var isSupported$jscomp$inline_1550 = "oninput" in document; - if (!isSupported$jscomp$inline_1550) { - var element$jscomp$inline_1551 = document.createElement("div"); - element$jscomp$inline_1551.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1550 = - "function" === typeof element$jscomp$inline_1551.oninput; + var isSupported$jscomp$inline_1515 = "oninput" in document; + if (!isSupported$jscomp$inline_1515) { + var element$jscomp$inline_1516 = document.createElement("div"); + element$jscomp$inline_1516.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1515 = + "function" === typeof element$jscomp$inline_1516.oninput; } - JSCompiler_inline_result$jscomp$348 = isSupported$jscomp$inline_1550; - } else JSCompiler_inline_result$jscomp$348 = !1; + JSCompiler_inline_result$jscomp$343 = isSupported$jscomp$inline_1515; + } else JSCompiler_inline_result$jscomp$343 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$348 && + JSCompiler_inline_result$jscomp$343 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13811,20 +13694,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1591 = 0; - i$jscomp$inline_1591 < simpleEventPluginEvents.length; - i$jscomp$inline_1591++ + var i$jscomp$inline_1556 = 0; + i$jscomp$inline_1556 < simpleEventPluginEvents.length; + i$jscomp$inline_1556++ ) { - var eventName$jscomp$inline_1592 = - simpleEventPluginEvents[i$jscomp$inline_1591], - domEventName$jscomp$inline_1593 = - eventName$jscomp$inline_1592.toLowerCase(), - capitalizedEvent$jscomp$inline_1594 = - eventName$jscomp$inline_1592[0].toUpperCase() + - eventName$jscomp$inline_1592.slice(1); + var eventName$jscomp$inline_1557 = + simpleEventPluginEvents[i$jscomp$inline_1556], + domEventName$jscomp$inline_1558 = + eventName$jscomp$inline_1557.toLowerCase(), + capitalizedEvent$jscomp$inline_1559 = + eventName$jscomp$inline_1557[0].toUpperCase() + + eventName$jscomp$inline_1557.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1593, - "on" + capitalizedEvent$jscomp$inline_1594 + domEventName$jscomp$inline_1558, + "on" + capitalizedEvent$jscomp$inline_1559 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14670,11 +14553,10 @@ function normalizeMarkupForTextOrAttribute(markup) { .replace(NORMALIZE_NEWLINES_REGEX, "\n") .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } -function checkForUnmatchedText(serverText, clientText, isConcurrentMode) { +function checkForUnmatchedText(serverText, clientText) { clientText = normalizeMarkupForTextOrAttribute(clientText); if ( normalizeMarkupForTextOrAttribute(serverText) !== clientText && - isConcurrentMode && enableClientRenderFallbackOnTextMismatch ) throw Error(formatProdErrorMessage(425)); @@ -15311,14 +15193,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$225 in nextProps) { - var propKey = nextProps[propKey$225]; - lastProp = lastProps[propKey$225]; + for (var propKey$224 in nextProps) { + var propKey = nextProps[propKey$224]; + lastProp = lastProps[propKey$224]; if ( - nextProps.hasOwnProperty(propKey$225) && + nextProps.hasOwnProperty(propKey$224) && (null != propKey || null != lastProp) ) - switch (propKey$225) { + switch (propKey$224) { case "type": type = propKey; break; @@ -15347,7 +15229,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$225, + propKey$224, propKey, nextProps, lastProp @@ -15366,7 +15248,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$225 = null; + propKey = value = defaultValue = propKey$224 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15397,7 +15279,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$225 = type; + propKey$224 = type; break; case "defaultValue": defaultValue = type; @@ -15418,15 +15300,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$225 - ? updateOptions(domElement, !!lastProps, propKey$225, !1) + null != propKey$224 + ? updateOptions(domElement, !!lastProps, propKey$224, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$225 = null; + propKey = propKey$224 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15450,7 +15332,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$225 = name; + propKey$224 = name; break; case "defaultValue": propKey = name; @@ -15464,17 +15346,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$225, propKey); + updateTextarea(domElement, propKey$224, propKey); return; case "option": - for (var propKey$241 in lastProps) + for (var propKey$240 in lastProps) if ( - ((propKey$225 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$241)) + ((propKey$224 = lastProps[propKey$240]), + lastProps.hasOwnProperty(propKey$240) && + null != propKey$224 && + !nextProps.hasOwnProperty(propKey$240)) ) - switch (propKey$241) { + switch (propKey$240) { case "selected": domElement.selected = !1; break; @@ -15482,33 +15364,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$241, + propKey$240, null, nextProps, - propKey$225 + propKey$224 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$225 = nextProps[lastDefaultValue]), + ((propKey$224 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$224 !== propKey && + (null != propKey$224 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$225 && - "function" !== typeof propKey$225 && - "symbol" !== typeof propKey$225; + propKey$224 && + "function" !== typeof propKey$224 && + "symbol" !== typeof propKey$224; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$225, + propKey$224, nextProps, propKey ); @@ -15529,24 +15411,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$246 in lastProps) - (propKey$225 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$246) && - setProp(domElement, tag, propKey$246, null, nextProps, propKey$225); + for (var propKey$245 in lastProps) + (propKey$224 = lastProps[propKey$245]), + lastProps.hasOwnProperty(propKey$245) && + null != propKey$224 && + !nextProps.hasOwnProperty(propKey$245) && + setProp(domElement, tag, propKey$245, null, nextProps, propKey$224); for (checked in nextProps) if ( - ((propKey$225 = nextProps[checked]), + ((propKey$224 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$224 !== propKey && + (null != propKey$224 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$225) + if (null != propKey$224) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15554,7 +15436,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$225, + propKey$224, nextProps, propKey ); @@ -15562,49 +15444,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$251 in lastProps) - (propKey$225 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$251) && + for (var propKey$250 in lastProps) + (propKey$224 = lastProps[propKey$250]), + lastProps.hasOwnProperty(propKey$250) && + null != propKey$224 && + !nextProps.hasOwnProperty(propKey$250) && setPropOnCustomElement( domElement, tag, - propKey$251, + propKey$250, null, nextProps, - propKey$225 + propKey$224 ); for (defaultChecked in nextProps) - (propKey$225 = nextProps[defaultChecked]), + (propKey$224 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$225 === propKey || - (null == propKey$225 && null == propKey) || + propKey$224 === propKey || + (null == propKey$224 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$225, + propKey$224, nextProps, propKey ); return; } } - for (var propKey$256 in lastProps) - (propKey$225 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$256) && - setProp(domElement, tag, propKey$256, null, nextProps, propKey$225); + for (var propKey$255 in lastProps) + (propKey$224 = lastProps[propKey$255]), + lastProps.hasOwnProperty(propKey$255) && + null != propKey$224 && + !nextProps.hasOwnProperty(propKey$255) && + setProp(domElement, tag, propKey$255, null, nextProps, propKey$224); for (lastProp in nextProps) - (propKey$225 = nextProps[lastProp]), + (propKey$224 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$225 === propKey || - (null == propKey$225 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$225, nextProps, propKey); + propKey$224 === propKey || + (null == propKey$224 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$224, nextProps, propKey); } var ReactDOMCurrentDispatcher$1 = Internals.ReactDOMCurrentDispatcher, eventsEnabled = null, @@ -15805,7 +15687,7 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) { default: return instance; } - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) break; } return null; @@ -15820,7 +15702,7 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { !inRootOrSingleton ) return null; - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) return null; } return instance; @@ -15844,9 +15726,6 @@ function getNextHydratable(node) { } return node; } -function getNextHydratableSibling(instance) { - return getNextHydratable(instance.nextSibling); -} function hydrateInstance( instance, type, @@ -15856,7 +15735,6 @@ function hydrateInstance( ) { instance[internalInstanceKey] = internalInstanceHandle; instance[internalPropsKey] = props; - hostContext = 0 !== (internalInstanceHandle.mode & 1); switch (type) { case "dialog": listenToNonDelegatedEvent("cancel", instance); @@ -15869,15 +15747,8 @@ function hydrateInstance( break; case "video": case "audio": - for ( - internalInstanceHandle = 0; - internalInstanceHandle < mediaEventTypes.length; - internalInstanceHandle++ - ) - listenToNonDelegatedEvent( - mediaEventTypes[internalInstanceHandle], - instance - ); + for (hostContext = 0; hostContext < mediaEventTypes.length; hostContext++) + listenToNonDelegatedEvent(mediaEventTypes[hostContext], instance); break; case "source": listenToNonDelegatedEvent("error", instance); @@ -15913,20 +15784,16 @@ function hydrateInstance( initTextarea(instance, props.value, props.defaultValue), track(instance); } - internalInstanceHandle = props.children; - ("string" === typeof internalInstanceHandle || - "number" === typeof internalInstanceHandle || - (enableBigIntSupport && "bigint" === typeof internalInstanceHandle)) && - instance.textContent !== "" + internalInstanceHandle && + hostContext = props.children; + ("string" === typeof hostContext || + "number" === typeof hostContext || + (enableBigIntSupport && "bigint" === typeof hostContext)) && + instance.textContent !== "" + hostContext && (!0 !== props.suppressHydrationWarning && - checkForUnmatchedText( - instance.textContent, - internalInstanceHandle, - hostContext - ), - (hostContext && enableClientRenderFallbackOnTextMismatch) || + checkForUnmatchedText(instance.textContent, hostContext), + enableClientRenderFallbackOnTextMismatch || "body" === type || - (instance.textContent = internalInstanceHandle)); + (instance.textContent = hostContext)); null != props.onScroll && listenToNonDelegatedEvent("scroll", instance); null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", instance); null != props.onClick && (instance.onclick = noop$1); @@ -16249,17 +16116,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$264 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$265 = styles$264.get(type); - resource$265 || + var styles$263 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$264 = styles$263.get(type); + resource$264 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$265 = { + (resource$264 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$264.set(type, resource$265), + styles$263.set(type, resource$264), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16274,9 +16141,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$265.state + resource$264.state )); - return resource$265; + return resource$264; } return null; case "script": @@ -16359,37 +16226,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$269 = hoistableRoot.querySelector( + var instance$268 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$269) + if (instance$268) return ( (resource.state.loading |= 4), - (resource.instance = instance$269), - markNodeAsHoistable(instance$269), - instance$269 + (resource.instance = instance$268), + markNodeAsHoistable(instance$268), + instance$268 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$269 = ( + instance$268 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$269); - var linkInstance = instance$269; + markNodeAsHoistable(instance$268); + var linkInstance = instance$268; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$269, "link", instance); + setInitialProperties(instance$268, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$269, props.precedence, hoistableRoot); - return (resource.instance = instance$269); + insertStylesheet(instance$268, props.precedence, hoistableRoot); + return (resource.instance = instance$268); case "script": - instance$269 = getScriptKey(props.src); + instance$268 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$269) + getScriptSelectorFromKey(instance$268) )) ) return ( @@ -16398,7 +16265,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$269))) + if ((styleProps = preloadPropsMap.get(instance$268))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16765,17 +16632,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1775 = { +var devToolsConfig$jscomp$inline_1738 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-1edd09db", + version: "19.0.0-www-modern-ea423e5c", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2139 = { - bundleType: devToolsConfig$jscomp$inline_1775.bundleType, - version: devToolsConfig$jscomp$inline_1775.version, - rendererPackageName: devToolsConfig$jscomp$inline_1775.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1775.rendererConfig, +var internals$jscomp$inline_2136 = { + bundleType: devToolsConfig$jscomp$inline_1738.bundleType, + version: devToolsConfig$jscomp$inline_1738.version, + rendererPackageName: devToolsConfig$jscomp$inline_1738.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1738.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -16792,26 +16659,26 @@ var internals$jscomp$inline_2139 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1775.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1738.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-1edd09db" + reconcilerVersion: "19.0.0-www-modern-ea423e5c" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2140 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2137 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2140.isDisabled && - hook$jscomp$inline_2140.supportsFiber + !hook$jscomp$inline_2137.isDisabled && + hook$jscomp$inline_2137.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2140.inject( - internals$jscomp$inline_2139 + (rendererID = hook$jscomp$inline_2137.inject( + internals$jscomp$inline_2136 )), - (injectedHook = hook$jscomp$inline_2140); + (injectedHook = hook$jscomp$inline_2137); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; @@ -17058,4 +16925,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-1edd09db"; +exports.version = "19.0.0-www-modern-ea423e5c"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index d963423c41..e6f8a5a95f 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -1842,85 +1842,6 @@ var hydrationParentFiber = null, isHydrating = !1, hydrationErrors = null, rootOrSingletonContext = !1; -function deleteHydratableInstance(returnFiber, instance) { - var fiber = createFiber(5, null, null, 0); - fiber.elementType = "DELETED"; - fiber.stateNode = instance; - fiber.return = returnFiber; - instance = returnFiber.deletions; - null === instance - ? ((returnFiber.deletions = [fiber]), (returnFiber.flags |= 16)) - : instance.push(fiber); -} -function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & -4097) | 2; -} -function tryHydrateInstance(fiber, nextInstance) { - nextInstance = canHydrateInstance( - nextInstance, - fiber.type, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = getNextHydratable(nextInstance.firstChild)), - (rootOrSingletonContext = !1), - !0) - : !1; -} -function tryHydrateText(fiber, nextInstance) { - nextInstance = canHydrateTextInstance( - nextInstance, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function tryHydrateSuspense(fiber, nextInstance) { - a: { - var instance = nextInstance; - for (nextInstance = rootOrSingletonContext; 8 !== instance.nodeType; ) { - if (!nextInstance) { - nextInstance = null; - break a; - } - instance = getNextHydratableSibling(instance); - if (null === instance) { - nextInstance = null; - break a; - } - } - nextInstance = instance; - } - return null !== nextInstance - ? ((instance = - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null), - (fiber.memoizedState = { - dehydrated: nextInstance, - treeContext: instance, - retryLane: 536870912 - }), - (instance = createFiber(18, null, null, 0)), - (instance.stateNode = nextInstance), - (instance.return = fiber), - (fiber.child = instance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function shouldClientRenderOnMismatch(fiber) { - return 0 !== (fiber.mode & 1) && 0 === (fiber.flags & 128); -} function throwOnHydrationMismatch() { throw Error(formatProdErrorMessage(418)); } @@ -1953,15 +1874,11 @@ function popHydrationState(fiber) { JSCompiler_temp = !JSCompiler_temp; } JSCompiler_temp && (shouldClear = !0); - if (shouldClear && (shouldClear = nextHydratableInstance)) - if (shouldClientRenderOnMismatch(fiber)) { - for (shouldClear = nextHydratableInstance; shouldClear; ) - shouldClear = getNextHydratableSibling(shouldClear); - throwOnHydrationMismatch(); - } else - for (; shouldClear; ) - deleteHydratableInstance(fiber, shouldClear), - (shouldClear = getNextHydratableSibling(shouldClear)); + if (shouldClear && nextHydratableInstance) { + for (shouldClear = nextHydratableInstance; shouldClear; ) + shouldClear = getNextHydratable(shouldClear.nextSibling); + throwOnHydrationMismatch(); + } popToNextHostParent(fiber); if (13 === fiber.tag) { fiber = fiber.memoizedState; @@ -1973,7 +1890,7 @@ function popHydrationState(fiber) { if (8 === fiber.nodeType) if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { if (0 === shouldClear) { - nextHydratableInstance = getNextHydratableSibling(fiber); + nextHydratableInstance = getNextHydratable(fiber.nextSibling); break a; } shouldClear--; @@ -1988,7 +1905,7 @@ function popHydrationState(fiber) { } } else nextHydratableInstance = hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) + ? getNextHydratable(fiber.stateNode.nextSibling) : null; return !0; } @@ -2103,41 +2020,41 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$29 = firstScheduledRoot; null !== root$29; ) { - if (!onlyLegacy || 0 === root$29.tag) { - var workInProgressRootRenderLanes$31 = workInProgressRootRenderLanes, + for (var root$28 = firstScheduledRoot; null !== root$28; ) { + if (!onlyLegacy || 0 === root$28.tag) { + var workInProgressRootRenderLanes$30 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$29, - root$29 === workInProgressRoot - ? workInProgressRootRenderLanes$31 + root$28, + root$28 === workInProgressRoot + ? workInProgressRootRenderLanes$30 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$31 = root$29; + workInProgressRootRenderLanes$30 = root$28; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$31.tag && + 0 !== workInProgressRootRenderLanes$30.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, originallyAttemptedLanes, errorRetryLanes ))); @@ -2145,39 +2062,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$31, 0), + prepareFreshStack(workInProgressRootRenderLanes$30, 0), markRootSuspended( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$31), + ensureRootIsScheduled(workInProgressRootRenderLanes$30), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$31.finishedWork = - workInProgressRootRenderLanes$31.current.alternate), - (workInProgressRootRenderLanes$31.finishedLanes = + : ((workInProgressRootRenderLanes$30.finishedWork = + workInProgressRootRenderLanes$30.current.alternate), + (workInProgressRootRenderLanes$30.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$31); + ensureRootIsScheduled(workInProgressRootRenderLanes$30); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$29 = root$29.next; + root$28 = root$28.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3784,7 +3701,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$56 = !1; + didReadFromEntangledAsyncAction$55 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3805,11 +3722,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$56 = !0); + (didReadFromEntangledAsyncAction$55 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$56 = !0); + (didReadFromEntangledAsyncAction$55 = !0); continue; } else (updateLane = { @@ -3855,7 +3772,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$56 && + didReadFromEntangledAsyncAction$55 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4090,8 +4007,8 @@ function mountFormState(action, initialStateProp) { JSCompiler_inline_result = null; break b; } - JSCompiler_inline_result = getNextHydratableSibling( - JSCompiler_inline_result + JSCompiler_inline_result = getNextHydratable( + JSCompiler_inline_result.nextSibling ); if (null === JSCompiler_inline_result) { JSCompiler_inline_result = null; @@ -4105,8 +4022,8 @@ function mountFormState(action, initialStateProp) { : null; } if (JSCompiler_inline_result) { - nextHydratableInstance = getNextHydratableSibling( - JSCompiler_inline_result + nextHydratableInstance = getNextHydratable( + JSCompiler_inline_result.nextSibling ); JSCompiler_inline_result = "F!" === JSCompiler_inline_result.data; break a; @@ -4446,14 +4363,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$66 = enqueueUpdate(provider, fiber, lane); - null !== root$66 && - (scheduleUpdateOnFiber(root$66, provider, lane), - entangleTransitions(root$66, provider, lane)); + var root$65 = enqueueUpdate(provider, fiber, lane); + null !== root$65 && + (scheduleUpdateOnFiber(root$65, provider, lane), + entangleTransitions(root$65, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$66 && + null !== root$65 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4697,15 +4614,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$59 = workInProgressRoot; - if (null === root$59) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$59, workInProgressRootRenderLanes) || + var root$58 = workInProgressRoot; + if (null === root$58) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$58, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$59 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$59; - mountEffect(subscribeToStore.bind(null, fiber, root$59, subscribe), [ + root$58 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$58; + mountEffect(subscribeToStore.bind(null, fiber, root$58, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4714,7 +4631,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$59, + root$58, getServerSnapshot, getSnapshot ), @@ -5498,10 +5415,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$78 = workInProgress.stateNode; + root$77 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$78.incompleteTransitions.has(transition)) { + if (!root$77.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5509,11 +5426,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$78.incompleteTransitions.set(transition, markerInstance); + root$77.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$78.incompleteTransitions.forEach(function (markerInstance) { + root$77.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6149,52 +6066,72 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var nextInstance = (didSuspend = nextHydratableInstance); - if (!nextInstance) - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend); - else if (!tryHydrateSuspense(workInProgress, nextInstance)) { - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(); - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - nextHydratableInstance && - tryHydrateSuspense(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevHydrationParentFiber, nextInstance) - : (insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), + var nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance)) { + c: { + JSCompiler_temp$jscomp$0 = nextInstance; + for ( + nextInstance = rootOrSingletonContext; + 8 !== JSCompiler_temp$jscomp$0.nodeType; + + ) { + if (!nextInstance) { + nextInstance = null; + break c; + } + JSCompiler_temp$jscomp$0 = getNextHydratable( + JSCompiler_temp$jscomp$0.nextSibling + ); + if (null === JSCompiler_temp$jscomp$0) { + nextInstance = null; + break c; + } + } + nextInstance = JSCompiler_temp$jscomp$0; + } + null !== nextInstance + ? ((workInProgress.memoizedState = { + dehydrated: nextInstance, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912 + }), + (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), + (JSCompiler_temp$jscomp$0.stateNode = nextInstance), + (JSCompiler_temp$jscomp$0.return = workInProgress), + (workInProgress.child = JSCompiler_temp$jscomp$0), (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend)); + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(); } - didSuspend = workInProgress.memoizedState; + nextInstance = workInProgress.memoizedState; if ( - null !== didSuspend && - ((didSuspend = didSuspend.dehydrated), null !== didSuspend) + null !== nextInstance && + ((nextInstance = nextInstance.dehydrated), null !== nextInstance) ) return ( - 0 === (workInProgress.mode & 1) - ? (workInProgress.lanes = 2) - : "$!" === didSuspend.data + "$!" === nextInstance.data ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - didSuspend = nextProps.children; - nextInstance = nextProps.fallback; + nextInstance = nextProps.children; + JSCompiler_temp$jscomp$0 = nextProps.fallback; if (showFallback) return ( reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -6229,8 +6166,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -6245,111 +6182,280 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - return mountSuspensePrimaryChildren(workInProgress, didSuspend); + return mountSuspensePrimaryChildren(workInProgress, nextInstance); } - nextInstance = current.memoizedState; + JSCompiler_temp$jscomp$0 = current.memoizedState; if ( - null !== nextInstance && - ((prevHydrationParentFiber = nextInstance.dehydrated), - null !== prevHydrationParentFiber) - ) - return updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - JSCompiler_temp, - nextProps, - prevHydrationParentFiber, - nextInstance, - renderLanes - ); - if (showFallback) { - reuseSuspenseHandlerOnStack(workInProgress); - showFallback = nextProps.fallback; - didSuspend = workInProgress.mode; - nextInstance = current.child; - prevHydrationParentFiber = nextInstance.sibling; - var primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (didSuspend & 1) && workInProgress.child !== nextInstance - ? ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - workInProgress.mode & 2 && - ((nextProps.actualDuration = 0), - (nextProps.actualStartTime = -1), - (nextProps.selfBaseDuration = nextInstance.selfBaseDuration), - (nextProps.treeBaseDuration = nextInstance.treeBaseDuration)), - (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(nextInstance, primaryChildProps)), - (nextProps.subtreeFlags = nextInstance.subtreeFlags & 31457280)); - null !== prevHydrationParentFiber - ? (showFallback = createWorkInProgress( - prevHydrationParentFiber, - showFallback - )) - : ((showFallback = createFiberFromFragment( - showFallback, - didSuspend, - renderLanes, - null - )), - (showFallback.flags |= 2)); - showFallback.return = workInProgress; - nextProps.return = workInProgress; - nextProps.sibling = showFallback; - workInProgress.child = nextProps; - nextProps = showFallback; - showFallback = workInProgress.child; - didSuspend = current.child.memoizedState; - null === didSuspend - ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) - : ((nextInstance = didSuspend.cachePool), - null !== nextInstance - ? ((prevHydrationParentFiber = CacheContext._currentValue), - (nextInstance = - nextInstance.parent !== prevHydrationParentFiber - ? { - parent: prevHydrationParentFiber, - pool: prevHydrationParentFiber - } - : nextInstance)) - : (nextInstance = getSuspendedCache()), - (didSuspend = { - baseLanes: didSuspend.baseLanes | renderLanes, - cachePool: nextInstance - })); - showFallback.memoizedState = didSuspend; - enableTransitionTracing && - ((didSuspend = enableTransitionTracing ? transitionStack.current : null), - null !== didSuspend && - ((nextInstance = enableTransitionTracing - ? markerInstanceStack.current - : null), - (prevHydrationParentFiber = showFallback.updateQueue), - (primaryChildProps = current.updateQueue), - null === prevHydrationParentFiber - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: null - }) - : prevHydrationParentFiber === primaryChildProps - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: - null !== primaryChildProps ? primaryChildProps.retryQueue : null - }) - : ((prevHydrationParentFiber.transitions = didSuspend), - (prevHydrationParentFiber.markerInstances = nextInstance)))); - showFallback.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return nextProps; + null !== JSCompiler_temp$jscomp$0 && + ((nextInstance = JSCompiler_temp$jscomp$0.dehydrated), + null !== nextInstance) + ) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (JSCompiler_temp = createCapturedValueFromError( + Error(formatProdErrorMessage(422)) + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (nextProps = createFiberFromOffscreen( + { mode: "visible", children: nextProps.children }, + nextInstance, + 0, + null + )), + (showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2), + (nextProps.return = workInProgress), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + 0 !== (workInProgress.mode & 1) && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (nextProps = workInProgress.child), + (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (nextProps.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = showFallback)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + "$!" === nextInstance.data) + ) { + JSCompiler_temp = + nextInstance.nextSibling && nextInstance.nextSibling.dataset; + if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; + JSCompiler_temp = digest; + nextProps = Error(formatProdErrorMessage(419)); + nextProps.digest = JSCompiler_temp; + JSCompiler_temp = createCapturedValueFromError( + nextProps, + JSCompiler_temp, + void 0 + ); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ); + } else if ( + (enableLazyContextPropagation && + !didReceiveUpdate && + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_temp) + ) { + JSCompiler_temp = workInProgressRoot; + if (null !== JSCompiler_temp) { + nextProps = renderLanes & -renderLanes; + if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) + nextProps = 1; + else + switch (nextProps) { + case 2: + nextProps = 1; + break; + case 8: + nextProps = 4; + break; + case 32: + nextProps = 16; + break; + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + nextProps = 64; + break; + case 268435456: + nextProps = 134217728; + break; + default: + nextProps = 0; + } + nextProps = + 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) + ? 0 + : nextProps; + if (0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane) + throw ( + ((JSCompiler_temp$jscomp$0.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); + } + "$?" === nextInstance.data || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + null + ); + } else + "$?" === nextInstance.data + ? ((workInProgress.flags |= 128), + (workInProgress.child = current.child), + (workInProgress = retryDehydratedSuspenseBoundary.bind( + null, + current + )), + (nextInstance._reactRetry = workInProgress), + (workInProgress = null)) + : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + (nextHydratableInstance = getNextHydratable( + nextInstance.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + ((idStack[idStackIndex++] = treeContextId), + (idStack[idStackIndex++] = treeContextOverflow), + (idStack[idStackIndex++] = treeContextProvider), + (treeContextId = renderLanes.id), + (treeContextOverflow = renderLanes.overflow), + (treeContextProvider = workInProgress)), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + nextProps.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; } + if (showFallback) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (JSCompiler_temp$jscomp$0 = current.child), + (digest = JSCompiler_temp$jscomp$0.sibling), + (didSuspend = { mode: "hidden", children: nextProps.children }), + 0 === (nextInstance & 1) && + workInProgress.child !== JSCompiler_temp$jscomp$0 + ? ((nextProps = workInProgress.child), + (nextProps.childLanes = 0), + (nextProps.pendingProps = didSuspend), + workInProgress.mode & 2 && + ((nextProps.actualDuration = 0), + (nextProps.actualStartTime = -1), + (nextProps.selfBaseDuration = + JSCompiler_temp$jscomp$0.selfBaseDuration), + (nextProps.treeBaseDuration = + JSCompiler_temp$jscomp$0.treeBaseDuration)), + (workInProgress.deletions = null)) + : ((nextProps = createWorkInProgress( + JSCompiler_temp$jscomp$0, + didSuspend + )), + (nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)), + null !== digest + ? (showFallback = createWorkInProgress(digest, showFallback)) + : ((showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2)), + (showFallback.return = workInProgress), + (nextProps.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + (nextProps = showFallback), + (showFallback = workInProgress.child), + (nextInstance = current.child.memoizedState), + null === nextInstance + ? (nextInstance = mountSuspenseOffscreenState(renderLanes)) + : ((JSCompiler_temp$jscomp$0 = nextInstance.cachePool), + null !== JSCompiler_temp$jscomp$0 + ? ((digest = CacheContext._currentValue), + (JSCompiler_temp$jscomp$0 = + JSCompiler_temp$jscomp$0.parent !== digest + ? { parent: digest, pool: digest } + : JSCompiler_temp$jscomp$0)) + : (JSCompiler_temp$jscomp$0 = getSuspendedCache()), + (nextInstance = { + baseLanes: nextInstance.baseLanes | renderLanes, + cachePool: JSCompiler_temp$jscomp$0 + })), + (showFallback.memoizedState = nextInstance), + enableTransitionTracing && + ((nextInstance = enableTransitionTracing + ? transitionStack.current + : null), + null !== nextInstance && + ((JSCompiler_temp$jscomp$0 = enableTransitionTracing + ? markerInstanceStack.current + : null), + (digest = showFallback.updateQueue), + (didSuspend = current.updateQueue), + null === digest + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null + }) + : digest === didSuspend + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null !== didSuspend ? didSuspend.retryQueue : null + }) + : ((digest.transitions = nextInstance), + (digest.markerInstances = JSCompiler_temp$jscomp$0)))), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + nextProps + ); pushPrimaryTreeSuspenseHandler(workInProgress); JSCompiler_temp = current.child; current = JSCompiler_temp.sibling; @@ -6430,194 +6536,6 @@ function retrySuspenseComponentWithoutHydrating( workInProgress.memoizedState = null; return current; } -function updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - didPrimaryChildrenDefer, - nextProps, - suspenseInstance, - suspenseState, - renderLanes -) { - if (didSuspend) { - if (workInProgress.flags & 256) - return ( - pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (suspenseInstance = createCapturedValueFromError( - Error(formatProdErrorMessage(422)) - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ) - ); - if (null !== workInProgress.memoizedState) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - null - ); - reuseSuspenseHandlerOnStack(workInProgress); - suspenseInstance = nextProps.fallback; - suspenseState = workInProgress.mode; - nextProps = createFiberFromOffscreen( - { mode: "visible", children: nextProps.children }, - suspenseState, - 0, - null - ); - suspenseInstance = createFiberFromFragment( - suspenseInstance, - suspenseState, - renderLanes, - null - ); - suspenseInstance.flags |= 2; - nextProps.return = workInProgress; - suspenseInstance.return = workInProgress; - nextProps.sibling = suspenseInstance; - workInProgress.child = nextProps; - 0 !== (workInProgress.mode & 1) && - reconcileChildFibers(workInProgress, current.child, null, renderLanes); - suspenseState = workInProgress.child; - suspenseState.memoizedState = mountSuspenseOffscreenState(renderLanes); - suspenseState.childLanes = getRemainingWorkInPrimaryTree( - current, - didPrimaryChildrenDefer, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return suspenseInstance; - } - pushPrimaryTreeSuspenseHandler(workInProgress); - if (0 === (workInProgress.mode & 1)) - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - if ("$!" === suspenseInstance.data) { - suspenseInstance = - suspenseInstance.nextSibling && suspenseInstance.nextSibling.dataset; - if (suspenseInstance) var digest = suspenseInstance.dgst; - suspenseInstance = digest; - didPrimaryChildrenDefer = Error(formatProdErrorMessage(419)); - didPrimaryChildrenDefer.digest = suspenseInstance; - suspenseInstance = createCapturedValueFromError( - didPrimaryChildrenDefer, - suspenseInstance, - void 0 - ); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ); - } - enableLazyContextPropagation && - !didReceiveUpdate && - propagateParentContextChanges(current, workInProgress, renderLanes, !1); - didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes); - if (didReceiveUpdate || didPrimaryChildrenDefer) { - didPrimaryChildrenDefer = workInProgressRoot; - if (null !== didPrimaryChildrenDefer) { - nextProps = renderLanes & -renderLanes; - if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) - nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 64; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== suspenseState.retryLane) - throw ( - ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) - ); - } - "$?" !== suspenseInstance.data && renderDidSuspendDelayIfPossible(); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if ("$?" === suspenseInstance.data) - return ( - (workInProgress.flags |= 128), - (workInProgress.child = current.child), - (workInProgress = retryDehydratedSuspenseBoundary.bind(null, current)), - (suspenseInstance._reactRetry = workInProgress), - null - ); - current = suspenseState.treeContext; - nextHydratableInstance = getNextHydratable(suspenseInstance.nextSibling); - hydrationParentFiber = workInProgress; - isHydrating = !0; - hydrationErrors = null; - rootOrSingletonContext = !1; - null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)); - workInProgress = mountSuspensePrimaryChildren( - workInProgress, - nextProps.children - ); - workInProgress.flags |= 4096; - return workInProgress; -} function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; @@ -7169,92 +7087,74 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 5: - return ( - null === current && - isHydrating && - (((context = Component = nextHydratableInstance), context) - ? tryHydrateInstance(workInProgress, context) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(context)), - (prevState = hydrationParentFiber), - nextHydratableInstance && - tryHydrateInstance(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevState, context) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))), - pushHostContext(workInProgress), - (context = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (Component = prevState.children), - shouldSetTextContent(context, prevState) - ? (Component = null) - : null !== nextState && - shouldSetTextContent(context, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((context = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes + if (null === current && isHydrating) { + if ((context = Component = nextHydratableInstance)) + (Component = canHydrateInstance( + Component, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext )), - (HostTransitionContext._currentValue = context), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== context && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), - workInProgress.child - ); + null !== Component + ? ((workInProgress.stateNode = Component), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + Component.firstChild + )), + (rootOrSingletonContext = !1), + (context = !0)) + : (context = !1); + context || throwOnHydrationMismatch(); + } + pushHostContext(workInProgress); + context = workInProgress.type; + prevState = workInProgress.pendingProps; + nextState = null !== current ? current.memoizedProps : null; + Component = prevState.children; + shouldSetTextContent(context, prevState) + ? (Component = null) + : null !== nextState && + shouldSetTextContent(context, nextState) && + (workInProgress.flags |= 32); + null !== workInProgress.memoizedState && + ((context = renderWithHooks( + current, + workInProgress, + TransitionAwareHostComponent, + null, + null, + renderLanes + )), + (HostTransitionContext._currentValue = context), + enableLazyContextPropagation || + (didReceiveUpdate && + null !== current && + current.memoizedState.memoizedState !== context && + propagateContextChange( + workInProgress, + HostTransitionContext, + renderLanes + ))); + markRef(current, workInProgress); + reconcileChildren(current, workInProgress, Component, renderLanes); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - (((current = renderLanes = nextHydratableInstance), current) - ? tryHydrateText(workInProgress, current) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(current)), - (Component = hydrationParentFiber), - nextHydratableInstance && - tryHydrateText(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(Component, current) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))), - null - ); + if (null === current && isHydrating) { + if ((current = renderLanes = nextHydratableInstance)) + (renderLanes = canHydrateTextInstance( + renderLanes, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== renderLanes + ? ((workInProgress.stateNode = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (current = !0)) + : (current = !1); + current || throwOnHydrationMismatch(); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: @@ -8011,14 +7911,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$118 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$118 = lastTailNode), + for (var lastTailNode$117 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$117 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$118 + null === lastTailNode$117 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$118.sibling = null); + : (lastTailNode$117.sibling = null); } } function bubbleProperties(completedWork) { @@ -8030,53 +7930,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$120 = completedWork.selfBaseDuration, - child$121 = completedWork.child; - null !== child$121; + var treeBaseDuration$119 = completedWork.selfBaseDuration, + child$120 = completedWork.child; + null !== child$120; ) - (newChildLanes |= child$121.lanes | child$121.childLanes), - (subtreeFlags |= child$121.subtreeFlags & 31457280), - (subtreeFlags |= child$121.flags & 31457280), - (treeBaseDuration$120 += child$121.treeBaseDuration), - (child$121 = child$121.sibling); - completedWork.treeBaseDuration = treeBaseDuration$120; + (newChildLanes |= child$120.lanes | child$120.childLanes), + (subtreeFlags |= child$120.subtreeFlags & 31457280), + (subtreeFlags |= child$120.flags & 31457280), + (treeBaseDuration$119 += child$120.treeBaseDuration), + (child$120 = child$120.sibling); + completedWork.treeBaseDuration = treeBaseDuration$119; } else for ( - treeBaseDuration$120 = completedWork.child; - null !== treeBaseDuration$120; + treeBaseDuration$119 = completedWork.child; + null !== treeBaseDuration$119; ) (newChildLanes |= - treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), - (subtreeFlags |= treeBaseDuration$120.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$120.flags & 31457280), - (treeBaseDuration$120.return = completedWork), - (treeBaseDuration$120 = treeBaseDuration$120.sibling); + treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), + (subtreeFlags |= treeBaseDuration$119.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$119.flags & 31457280), + (treeBaseDuration$119.return = completedWork), + (treeBaseDuration$119 = treeBaseDuration$119.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$120 = completedWork.actualDuration; - child$121 = completedWork.selfBaseDuration; + treeBaseDuration$119 = completedWork.actualDuration; + child$120 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$120 += child.actualDuration), - (child$121 += child.treeBaseDuration), + (treeBaseDuration$119 += child.actualDuration), + (child$120 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$120; - completedWork.treeBaseDuration = child$121; + completedWork.actualDuration = treeBaseDuration$119; + completedWork.treeBaseDuration = child$120; } else for ( - treeBaseDuration$120 = completedWork.child; - null !== treeBaseDuration$120; + treeBaseDuration$119 = completedWork.child; + null !== treeBaseDuration$119; ) (newChildLanes |= - treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), - (subtreeFlags |= treeBaseDuration$120.subtreeFlags), - (subtreeFlags |= treeBaseDuration$120.flags), - (treeBaseDuration$120.return = completedWork), - (treeBaseDuration$120 = treeBaseDuration$120.sibling); + treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), + (subtreeFlags |= treeBaseDuration$119.subtreeFlags), + (subtreeFlags |= treeBaseDuration$119.flags), + (treeBaseDuration$119.return = completedWork), + (treeBaseDuration$119 = treeBaseDuration$119.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8339,33 +8239,20 @@ function completeWork(current, workInProgress, renderLanes) { ) switch (currentResource.tag) { case 3: - currentResource = 0 !== (currentResource.mode & 1); - checkForUnmatchedText( - current.nodeValue, - renderLanes, - currentResource - ); - if ( - currentResource && - enableClientRenderFallbackOnTextMismatch - ) { + checkForUnmatchedText(current.nodeValue, renderLanes); + if (enableClientRenderFallbackOnTextMismatch) { current = !1; break a; } break; case 27: case 5: - var isConcurrentMode$27 = 0 !== (currentResource.mode & 1); - !0 !== - currentResource.memoizedProps.suppressHydrationWarning && - checkForUnmatchedText( - current.nodeValue, - renderLanes, - isConcurrentMode$27 - ); if ( - isConcurrentMode$27 && - enableClientRenderFallbackOnTextMismatch + (!0 !== + currentResource.memoizedProps + .suppressHydrationWarning && + checkForUnmatchedText(current.nodeValue, renderLanes), + enableClientRenderFallbackOnTextMismatch) ) { current = !1; break a; @@ -8441,18 +8328,19 @@ function completeWork(current, workInProgress, renderLanes) { ); renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - renderLanes && - ((newProps = workInProgress.child), - (currentResource = null), + if (renderLanes) { + newProps = workInProgress.child; + currentResource = null; null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && - (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$27 = null), + (currentResource = newProps.alternate.memoizedState.cachePool.pool); + var cache$135 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$27 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$27 !== currentResource && (newProps.flags |= 2048)); + (cache$135 = newProps.memoizedState.cachePool.pool); + cache$135 !== currentResource && (newProps.flags |= 2048); + } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -8497,8 +8385,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$27 = currentResource.rendering; - if (null === isConcurrentMode$27) + cache$135 = currentResource.rendering; + if (null === cache$135) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8506,11 +8394,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$27 = findFirstSuspended(current); - if (null !== isConcurrentMode$27) { + cache$135 = findFirstSuspended(current); + if (null !== cache$135) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$27.updateQueue; + current = cache$135.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8535,10 +8423,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if ( - ((current = findFirstSuspended(isConcurrentMode$27)), - null !== current) - ) { + if (((current = findFirstSuspended(cache$135)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8548,7 +8433,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$27.alternate && + !cache$135.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8561,13 +8446,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$27.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$27)) + ? ((cache$135.sibling = workInProgress.child), + (workInProgress.child = cache$135)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$27) - : (workInProgress.child = isConcurrentMode$27), - (currentResource.last = isConcurrentMode$27)); + ? (current.sibling = cache$135) + : (workInProgress.child = cache$135), + (currentResource.last = cache$135)); } if (null !== currentResource.tail) return ( @@ -8875,8 +8760,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$154) { - captureCommitPhaseError(current, nearestMountedAncestor, error$154); + } catch (error$153) { + captureCommitPhaseError(current, nearestMountedAncestor, error$153); } else ref.current = null; } @@ -8913,7 +8798,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$214) { + } catch (e$213) { JSCompiler_temp = null; break a; } @@ -9170,11 +9055,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$156 = commitTime, + var commitTime$155 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$156); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$155); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -9201,8 +9086,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$158) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$158); + } catch (error$157) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$157); } } function commitClassCallbacks(finishedWork) { @@ -9301,11 +9186,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$159) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$158 ); } else { @@ -9322,11 +9207,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$160) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$159 ); } recordLayoutEffectDuration(finishedWork); @@ -9337,11 +9222,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$161) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$161 + error$160 ); } } @@ -10047,22 +9932,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$176) { + } catch (error$175) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$175 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$177) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$177 + error$176 ); } } @@ -10235,11 +10120,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$178) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$178 + error$177 ); } } @@ -10277,8 +10162,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$179) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$179); + } catch (error$178) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$178); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -10289,8 +10174,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$182) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$182); + } catch (error$181) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$181); } } break; @@ -10304,8 +10189,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$183) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$183); + } catch (error$182) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$182); } } break; @@ -10319,8 +10204,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$184) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$184); + } catch (error$183) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$183); } break; case 4: @@ -10350,8 +10235,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$186) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$186); + } catch (error$185) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$185); } current = finishedWork.updateQueue; null !== current && @@ -10429,11 +10314,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$166) { + } catch (error$165) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$166 + error$165 ); } } else if ( @@ -10508,21 +10393,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$167 = JSCompiler_inline_result.stateNode; + var parent$166 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$167, ""), + (setTextContent(parent$166, ""), (JSCompiler_inline_result.flags &= -33)); - var before$168 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$168, parent$167); + var before$167 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$167, parent$166); break; case 3: case 4: - var parent$169 = JSCompiler_inline_result.stateNode.containerInfo, - before$170 = getHostSibling(finishedWork); + var parent$168 = JSCompiler_inline_result.stateNode.containerInfo, + before$169 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$170, - parent$169 + before$169, + parent$168 ); break; default: @@ -10714,8 +10599,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$189) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$189); + } catch (error$188) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$188); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -11014,9 +10899,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$194 = finishedWork.stateNode; + var instance$193 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$194._visibility & 4 + ? instance$193._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11029,7 +10914,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$194._visibility |= 4), + : ((instance$193._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11037,7 +10922,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$194._visibility |= 4), + : ((instance$193._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11050,7 +10935,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$194 + instance$193 ); break; case 24: @@ -12054,8 +11939,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$202) { - handleThrow(root, thrownValue$202); + } catch (thrownValue$201) { + handleThrow(root, thrownValue$201); } while (1); lanes && root.shellSuspendCounter++; @@ -12171,8 +12056,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$204) { - handleThrow(root, thrownValue$204); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); resetContextDependencies(); @@ -12429,13 +12314,13 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$208 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$207 = commitBeforeMutationEffects( root, finishedWork ); commitTime = now(); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$208 && + shouldFireAfterActiveInstanceBlur$207 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12529,7 +12414,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$209 = rootWithPendingPassiveEffects, + var root$208 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -12545,7 +12430,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$209, remainingLanes); + releaseRootPooledCache(root$208, remainingLanes); } } return !1; @@ -13299,12 +13184,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$212 = fiber.stateNode; - if (root$212.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$212.pendingLanes); + var root$211 = fiber.stateNode; + if (root$211.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$211.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$212, lanes), - ensureRootIsScheduled(root$212), + (upgradePendingLanesToSync(root$211, lanes), + ensureRootIsScheduled(root$211), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now$1() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13870,19 +13755,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$371; + var JSCompiler_inline_result$jscomp$366; if (canUseDOM) { - var isSupported$jscomp$inline_1635 = "oninput" in document; - if (!isSupported$jscomp$inline_1635) { - var element$jscomp$inline_1636 = document.createElement("div"); - element$jscomp$inline_1636.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1635 = - "function" === typeof element$jscomp$inline_1636.oninput; + var isSupported$jscomp$inline_1600 = "oninput" in document; + if (!isSupported$jscomp$inline_1600) { + var element$jscomp$inline_1601 = document.createElement("div"); + element$jscomp$inline_1601.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1600 = + "function" === typeof element$jscomp$inline_1601.oninput; } - JSCompiler_inline_result$jscomp$371 = isSupported$jscomp$inline_1635; - } else JSCompiler_inline_result$jscomp$371 = !1; + JSCompiler_inline_result$jscomp$366 = isSupported$jscomp$inline_1600; + } else JSCompiler_inline_result$jscomp$366 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$371 && + JSCompiler_inline_result$jscomp$366 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14254,20 +14139,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1676 = 0; - i$jscomp$inline_1676 < simpleEventPluginEvents.length; - i$jscomp$inline_1676++ + var i$jscomp$inline_1641 = 0; + i$jscomp$inline_1641 < simpleEventPluginEvents.length; + i$jscomp$inline_1641++ ) { - var eventName$jscomp$inline_1677 = - simpleEventPluginEvents[i$jscomp$inline_1676], - domEventName$jscomp$inline_1678 = - eventName$jscomp$inline_1677.toLowerCase(), - capitalizedEvent$jscomp$inline_1679 = - eventName$jscomp$inline_1677[0].toUpperCase() + - eventName$jscomp$inline_1677.slice(1); + var eventName$jscomp$inline_1642 = + simpleEventPluginEvents[i$jscomp$inline_1641], + domEventName$jscomp$inline_1643 = + eventName$jscomp$inline_1642.toLowerCase(), + capitalizedEvent$jscomp$inline_1644 = + eventName$jscomp$inline_1642[0].toUpperCase() + + eventName$jscomp$inline_1642.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1678, - "on" + capitalizedEvent$jscomp$inline_1679 + domEventName$jscomp$inline_1643, + "on" + capitalizedEvent$jscomp$inline_1644 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15113,11 +14998,10 @@ function normalizeMarkupForTextOrAttribute(markup) { .replace(NORMALIZE_NEWLINES_REGEX, "\n") .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } -function checkForUnmatchedText(serverText, clientText, isConcurrentMode) { +function checkForUnmatchedText(serverText, clientText) { clientText = normalizeMarkupForTextOrAttribute(clientText); if ( normalizeMarkupForTextOrAttribute(serverText) !== clientText && - isConcurrentMode && enableClientRenderFallbackOnTextMismatch ) throw Error(formatProdErrorMessage(425)); @@ -15755,14 +15639,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$241 in nextProps) { - var propKey = nextProps[propKey$241]; - lastProp = lastProps[propKey$241]; + for (var propKey$240 in nextProps) { + var propKey = nextProps[propKey$240]; + lastProp = lastProps[propKey$240]; if ( - nextProps.hasOwnProperty(propKey$241) && + nextProps.hasOwnProperty(propKey$240) && (null != propKey || null != lastProp) ) - switch (propKey$241) { + switch (propKey$240) { case "type": type = propKey; break; @@ -15791,7 +15675,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$241, + propKey$240, propKey, nextProps, lastProp @@ -15810,7 +15694,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$241 = null; + propKey = value = defaultValue = propKey$240 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15841,7 +15725,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$241 = type; + propKey$240 = type; break; case "defaultValue": defaultValue = type; @@ -15862,15 +15746,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$241 - ? updateOptions(domElement, !!lastProps, propKey$241, !1) + null != propKey$240 + ? updateOptions(domElement, !!lastProps, propKey$240, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$241 = null; + propKey = propKey$240 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15894,7 +15778,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$241 = name; + propKey$240 = name; break; case "defaultValue": propKey = name; @@ -15908,17 +15792,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$241, propKey); + updateTextarea(domElement, propKey$240, propKey); return; case "option": - for (var propKey$257 in lastProps) + for (var propKey$256 in lastProps) if ( - ((propKey$241 = lastProps[propKey$257]), - lastProps.hasOwnProperty(propKey$257) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$257)) + ((propKey$240 = lastProps[propKey$256]), + lastProps.hasOwnProperty(propKey$256) && + null != propKey$240 && + !nextProps.hasOwnProperty(propKey$256)) ) - switch (propKey$257) { + switch (propKey$256) { case "selected": domElement.selected = !1; break; @@ -15926,33 +15810,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$257, + propKey$256, null, nextProps, - propKey$241 + propKey$240 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$241 = nextProps[lastDefaultValue]), + ((propKey$240 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$241 !== propKey && - (null != propKey$241 || null != propKey)) + propKey$240 !== propKey && + (null != propKey$240 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$241 && - "function" !== typeof propKey$241 && - "symbol" !== typeof propKey$241; + propKey$240 && + "function" !== typeof propKey$240 && + "symbol" !== typeof propKey$240; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$241, + propKey$240, nextProps, propKey ); @@ -15973,24 +15857,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$262 in lastProps) - (propKey$241 = lastProps[propKey$262]), - lastProps.hasOwnProperty(propKey$262) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$262) && - setProp(domElement, tag, propKey$262, null, nextProps, propKey$241); + for (var propKey$261 in lastProps) + (propKey$240 = lastProps[propKey$261]), + lastProps.hasOwnProperty(propKey$261) && + null != propKey$240 && + !nextProps.hasOwnProperty(propKey$261) && + setProp(domElement, tag, propKey$261, null, nextProps, propKey$240); for (checked in nextProps) if ( - ((propKey$241 = nextProps[checked]), + ((propKey$240 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$241 !== propKey && - (null != propKey$241 || null != propKey)) + propKey$240 !== propKey && + (null != propKey$240 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$241) + if (null != propKey$240) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15998,7 +15882,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$241, + propKey$240, nextProps, propKey ); @@ -16006,49 +15890,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$267 in lastProps) - (propKey$241 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$267) && + for (var propKey$266 in lastProps) + (propKey$240 = lastProps[propKey$266]), + lastProps.hasOwnProperty(propKey$266) && + null != propKey$240 && + !nextProps.hasOwnProperty(propKey$266) && setPropOnCustomElement( domElement, tag, - propKey$267, + propKey$266, null, nextProps, - propKey$241 + propKey$240 ); for (defaultChecked in nextProps) - (propKey$241 = nextProps[defaultChecked]), + (propKey$240 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$241 === propKey || - (null == propKey$241 && null == propKey) || + propKey$240 === propKey || + (null == propKey$240 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$241, + propKey$240, nextProps, propKey ); return; } } - for (var propKey$272 in lastProps) - (propKey$241 = lastProps[propKey$272]), - lastProps.hasOwnProperty(propKey$272) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$272) && - setProp(domElement, tag, propKey$272, null, nextProps, propKey$241); + for (var propKey$271 in lastProps) + (propKey$240 = lastProps[propKey$271]), + lastProps.hasOwnProperty(propKey$271) && + null != propKey$240 && + !nextProps.hasOwnProperty(propKey$271) && + setProp(domElement, tag, propKey$271, null, nextProps, propKey$240); for (lastProp in nextProps) - (propKey$241 = nextProps[lastProp]), + (propKey$240 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$241 === propKey || - (null == propKey$241 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$241, nextProps, propKey); + propKey$240 === propKey || + (null == propKey$240 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$240, nextProps, propKey); } function noop$1() {} var Internals = { @@ -16279,7 +16163,7 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) { default: return instance; } - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) break; } return null; @@ -16294,7 +16178,7 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { !inRootOrSingleton ) return null; - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) return null; } return instance; @@ -16318,9 +16202,6 @@ function getNextHydratable(node) { } return node; } -function getNextHydratableSibling(instance) { - return getNextHydratable(instance.nextSibling); -} function hydrateInstance( instance, type, @@ -16330,7 +16211,6 @@ function hydrateInstance( ) { instance[internalInstanceKey] = internalInstanceHandle; instance[internalPropsKey] = props; - hostContext = 0 !== (internalInstanceHandle.mode & 1); switch (type) { case "dialog": listenToNonDelegatedEvent("cancel", instance); @@ -16343,15 +16223,8 @@ function hydrateInstance( break; case "video": case "audio": - for ( - internalInstanceHandle = 0; - internalInstanceHandle < mediaEventTypes.length; - internalInstanceHandle++ - ) - listenToNonDelegatedEvent( - mediaEventTypes[internalInstanceHandle], - instance - ); + for (hostContext = 0; hostContext < mediaEventTypes.length; hostContext++) + listenToNonDelegatedEvent(mediaEventTypes[hostContext], instance); break; case "source": listenToNonDelegatedEvent("error", instance); @@ -16387,20 +16260,16 @@ function hydrateInstance( initTextarea(instance, props.value, props.defaultValue, props.children), track(instance); } - internalInstanceHandle = props.children; - ("string" === typeof internalInstanceHandle || - "number" === typeof internalInstanceHandle || - (enableBigIntSupport && "bigint" === typeof internalInstanceHandle)) && - instance.textContent !== "" + internalInstanceHandle && + hostContext = props.children; + ("string" === typeof hostContext || + "number" === typeof hostContext || + (enableBigIntSupport && "bigint" === typeof hostContext)) && + instance.textContent !== "" + hostContext && (!0 !== props.suppressHydrationWarning && - checkForUnmatchedText( - instance.textContent, - internalInstanceHandle, - hostContext - ), - (hostContext && enableClientRenderFallbackOnTextMismatch) || + checkForUnmatchedText(instance.textContent, hostContext), + enableClientRenderFallbackOnTextMismatch || "body" === type || - (instance.textContent = internalInstanceHandle)); + (instance.textContent = hostContext)); null != props.onScroll && listenToNonDelegatedEvent("scroll", instance); null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", instance); null != props.onClick && (instance.onclick = noop$2); @@ -16723,17 +16592,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$280 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$281 = styles$280.get(type); - resource$281 || + var styles$279 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$280 = styles$279.get(type); + resource$280 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$281 = { + (resource$280 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$280.set(type, resource$281), + styles$279.set(type, resource$280), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16748,9 +16617,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$281.state + resource$280.state )); - return resource$281; + return resource$280; } return null; case "script": @@ -16833,37 +16702,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$285 = hoistableRoot.querySelector( + var instance$284 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$285) + if (instance$284) return ( (resource.state.loading |= 4), - (resource.instance = instance$285), - markNodeAsHoistable(instance$285), - instance$285 + (resource.instance = instance$284), + markNodeAsHoistable(instance$284), + instance$284 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$285 = ( + instance$284 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$285); - var linkInstance = instance$285; + markNodeAsHoistable(instance$284); + var linkInstance = instance$284; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$285, "link", instance); + setInitialProperties(instance$284, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$285, props.precedence, hoistableRoot); - return (resource.instance = instance$285); + insertStylesheet(instance$284, props.precedence, hoistableRoot); + return (resource.instance = instance$284); case "script": - instance$285 = getScriptKey(props.src); + instance$284 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$285) + getScriptSelectorFromKey(instance$284) )) ) return ( @@ -16872,7 +16741,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$285))) + if ((styleProps = preloadPropsMap.get(instance$284))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17877,11 +17746,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$306); + var instance = getPublicRootInstance(root$305); originalCallback.call(instance); }; } - var root$306 = createHydrationContainer( + var root$305 = createHydrationContainer( initialChildren, callback, container, @@ -17894,23 +17763,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$306; - container[internalContainerInstanceKey] = root$306.current; + container._reactRootContainer = root$305; + container[internalContainerInstanceKey] = root$305.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$306; + return root$305; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$307 = callback; + var originalCallback$306 = callback; callback = function () { - var instance = getPublicRootInstance(root$308); - originalCallback$307.call(instance); + var instance = getPublicRootInstance(root$307); + originalCallback$306.call(instance); }; } - var root$308 = createFiberRoot( + var root$307 = createFiberRoot( container, 0, !1, @@ -17923,15 +17792,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$308; - container[internalContainerInstanceKey] = root$308.current; + container._reactRootContainer = root$307; + container[internalContainerInstanceKey] = root$307.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$308, parentComponent, callback); + updateContainer(initialChildren, root$307, parentComponent, callback); }); - return root$308; + return root$307; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17996,10 +17865,10 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1901 = { +var devToolsConfig$jscomp$inline_1864 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-9734c976", + version: "19.0.0-www-classic-d197dd61", rendererPackageName: "react-dom" }; (function (internals) { @@ -18017,10 +17886,10 @@ var devToolsConfig$jscomp$inline_1901 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1901.bundleType, - version: devToolsConfig$jscomp$inline_1901.version, - rendererPackageName: devToolsConfig$jscomp$inline_1901.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1901.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1864.bundleType, + version: devToolsConfig$jscomp$inline_1864.version, + rendererPackageName: devToolsConfig$jscomp$inline_1864.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1864.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -18036,14 +17905,14 @@ var devToolsConfig$jscomp$inline_1901 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1901.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1864.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-9734c976" + reconcilerVersion: "19.0.0-www-classic-d197dd61" }); assign(Internals, { ReactBrowserEventEmitter: { @@ -18114,17 +17983,6 @@ exports.findDOMNode = function (componentOrElement) { exports.flushSync = function (fn) { return flushSync$1(fn); }; -exports.hydrate = function (element, container, callback) { - if (!isValidContainerLegacy(container)) - throw Error(formatProdErrorMessage(299)); - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - !0, - callback - ); -}; exports.hydrateRoot = function (container, initialChildren, options) { if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299)); var isStrictMode = !1, @@ -18361,7 +18219,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-9734c976"; +exports.version = "19.0.0-www-classic-d197dd61"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 5ba0699596..541bed687f 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -1736,85 +1736,6 @@ var hydrationParentFiber = null, isHydrating = !1, hydrationErrors = null, rootOrSingletonContext = !1; -function deleteHydratableInstance(returnFiber, instance) { - var fiber = createFiber(5, null, null, 0); - fiber.elementType = "DELETED"; - fiber.stateNode = instance; - fiber.return = returnFiber; - instance = returnFiber.deletions; - null === instance - ? ((returnFiber.deletions = [fiber]), (returnFiber.flags |= 16)) - : instance.push(fiber); -} -function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & -4097) | 2; -} -function tryHydrateInstance(fiber, nextInstance) { - nextInstance = canHydrateInstance( - nextInstance, - fiber.type, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = getNextHydratable(nextInstance.firstChild)), - (rootOrSingletonContext = !1), - !0) - : !1; -} -function tryHydrateText(fiber, nextInstance) { - nextInstance = canHydrateTextInstance( - nextInstance, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function tryHydrateSuspense(fiber, nextInstance) { - a: { - var instance = nextInstance; - for (nextInstance = rootOrSingletonContext; 8 !== instance.nodeType; ) { - if (!nextInstance) { - nextInstance = null; - break a; - } - instance = getNextHydratableSibling(instance); - if (null === instance) { - nextInstance = null; - break a; - } - } - nextInstance = instance; - } - return null !== nextInstance - ? ((instance = - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null), - (fiber.memoizedState = { - dehydrated: nextInstance, - treeContext: instance, - retryLane: 536870912 - }), - (instance = createFiber(18, null, null, 0)), - (instance.stateNode = nextInstance), - (instance.return = fiber), - (fiber.child = instance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function shouldClientRenderOnMismatch(fiber) { - return 0 !== (fiber.mode & 1) && 0 === (fiber.flags & 128); -} function throwOnHydrationMismatch() { throw Error(formatProdErrorMessage(418)); } @@ -1847,15 +1768,11 @@ function popHydrationState(fiber) { JSCompiler_temp = !JSCompiler_temp; } JSCompiler_temp && (shouldClear = !0); - if (shouldClear && (shouldClear = nextHydratableInstance)) - if (shouldClientRenderOnMismatch(fiber)) { - for (shouldClear = nextHydratableInstance; shouldClear; ) - shouldClear = getNextHydratableSibling(shouldClear); - throwOnHydrationMismatch(); - } else - for (; shouldClear; ) - deleteHydratableInstance(fiber, shouldClear), - (shouldClear = getNextHydratableSibling(shouldClear)); + if (shouldClear && nextHydratableInstance) { + for (shouldClear = nextHydratableInstance; shouldClear; ) + shouldClear = getNextHydratable(shouldClear.nextSibling); + throwOnHydrationMismatch(); + } popToNextHostParent(fiber); if (13 === fiber.tag) { fiber = fiber.memoizedState; @@ -1867,7 +1784,7 @@ function popHydrationState(fiber) { if (8 === fiber.nodeType) if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { if (0 === shouldClear) { - nextHydratableInstance = getNextHydratableSibling(fiber); + nextHydratableInstance = getNextHydratable(fiber.nextSibling); break a; } shouldClear--; @@ -1882,7 +1799,7 @@ function popHydrationState(fiber) { } } else nextHydratableInstance = hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) + ? getNextHydratable(fiber.stateNode.nextSibling) : null; return !0; } @@ -1997,41 +1914,41 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$29 = firstScheduledRoot; null !== root$29; ) { - if (!onlyLegacy || 0 === root$29.tag) { - var workInProgressRootRenderLanes$31 = workInProgressRootRenderLanes, + for (var root$28 = firstScheduledRoot; null !== root$28; ) { + if (!onlyLegacy || 0 === root$28.tag) { + var workInProgressRootRenderLanes$30 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$29, - root$29 === workInProgressRoot - ? workInProgressRootRenderLanes$31 + root$28, + root$28 === workInProgressRoot + ? workInProgressRootRenderLanes$30 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$31 = root$29; + workInProgressRootRenderLanes$30 = root$28; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$31.tag && + 0 !== workInProgressRootRenderLanes$30.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, originallyAttemptedLanes, errorRetryLanes ))); @@ -2039,39 +1956,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$31, 0), + prepareFreshStack(workInProgressRootRenderLanes$30, 0), markRootSuspended( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$31), + ensureRootIsScheduled(workInProgressRootRenderLanes$30), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$31.finishedWork = - workInProgressRootRenderLanes$31.current.alternate), - (workInProgressRootRenderLanes$31.finishedLanes = + : ((workInProgressRootRenderLanes$30.finishedWork = + workInProgressRootRenderLanes$30.current.alternate), + (workInProgressRootRenderLanes$30.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$31, + workInProgressRootRenderLanes$30, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$31); + ensureRootIsScheduled(workInProgressRootRenderLanes$30); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$29 = root$29.next; + root$28 = root$28.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3678,7 +3595,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$56 = !1; + didReadFromEntangledAsyncAction$55 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3699,11 +3616,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$56 = !0); + (didReadFromEntangledAsyncAction$55 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$56 = !0); + (didReadFromEntangledAsyncAction$55 = !0); continue; } else (updateLane = { @@ -3749,7 +3666,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$56 && + didReadFromEntangledAsyncAction$55 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -3984,8 +3901,8 @@ function mountFormState(action, initialStateProp) { JSCompiler_inline_result = null; break b; } - JSCompiler_inline_result = getNextHydratableSibling( - JSCompiler_inline_result + JSCompiler_inline_result = getNextHydratable( + JSCompiler_inline_result.nextSibling ); if (null === JSCompiler_inline_result) { JSCompiler_inline_result = null; @@ -3999,8 +3916,8 @@ function mountFormState(action, initialStateProp) { : null; } if (JSCompiler_inline_result) { - nextHydratableInstance = getNextHydratableSibling( - JSCompiler_inline_result + nextHydratableInstance = getNextHydratable( + JSCompiler_inline_result.nextSibling ); JSCompiler_inline_result = "F!" === JSCompiler_inline_result.data; break a; @@ -4340,14 +4257,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$66 = enqueueUpdate(provider, fiber, lane); - null !== root$66 && - (scheduleUpdateOnFiber(root$66, provider, lane), - entangleTransitions(root$66, provider, lane)); + var root$65 = enqueueUpdate(provider, fiber, lane); + null !== root$65 && + (scheduleUpdateOnFiber(root$65, provider, lane), + entangleTransitions(root$65, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$66 && + null !== root$65 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4591,15 +4508,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$59 = workInProgressRoot; - if (null === root$59) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$59, workInProgressRootRenderLanes) || + var root$58 = workInProgressRoot; + if (null === root$58) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$58, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$59 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$59; - mountEffect(subscribeToStore.bind(null, fiber, root$59, subscribe), [ + root$58 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$58; + mountEffect(subscribeToStore.bind(null, fiber, root$58, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4608,7 +4525,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$59, + root$58, getServerSnapshot, getSnapshot ), @@ -5377,10 +5294,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$78 = workInProgress.stateNode; + root$77 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$78.incompleteTransitions.has(transition)) { + if (!root$77.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5388,11 +5305,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$78.incompleteTransitions.set(transition, markerInstance); + root$77.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$78.incompleteTransitions.forEach(function (markerInstance) { + root$77.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5990,52 +5907,72 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var nextInstance = (didSuspend = nextHydratableInstance); - if (!nextInstance) - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend); - else if (!tryHydrateSuspense(workInProgress, nextInstance)) { - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(); - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - nextHydratableInstance && - tryHydrateSuspense(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevHydrationParentFiber, nextInstance) - : (insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), + var nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance)) { + c: { + JSCompiler_temp$jscomp$0 = nextInstance; + for ( + nextInstance = rootOrSingletonContext; + 8 !== JSCompiler_temp$jscomp$0.nodeType; + + ) { + if (!nextInstance) { + nextInstance = null; + break c; + } + JSCompiler_temp$jscomp$0 = getNextHydratable( + JSCompiler_temp$jscomp$0.nextSibling + ); + if (null === JSCompiler_temp$jscomp$0) { + nextInstance = null; + break c; + } + } + nextInstance = JSCompiler_temp$jscomp$0; + } + null !== nextInstance + ? ((workInProgress.memoizedState = { + dehydrated: nextInstance, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912 + }), + (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), + (JSCompiler_temp$jscomp$0.stateNode = nextInstance), + (JSCompiler_temp$jscomp$0.return = workInProgress), + (workInProgress.child = JSCompiler_temp$jscomp$0), (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend)); + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(); } - didSuspend = workInProgress.memoizedState; + nextInstance = workInProgress.memoizedState; if ( - null !== didSuspend && - ((didSuspend = didSuspend.dehydrated), null !== didSuspend) + null !== nextInstance && + ((nextInstance = nextInstance.dehydrated), null !== nextInstance) ) return ( - 0 === (workInProgress.mode & 1) - ? (workInProgress.lanes = 2) - : "$!" === didSuspend.data + "$!" === nextInstance.data ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - didSuspend = nextProps.children; - nextInstance = nextProps.fallback; + nextInstance = nextProps.children; + JSCompiler_temp$jscomp$0 = nextProps.fallback; if (showFallback) return ( reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -6070,8 +6007,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -6086,111 +6023,280 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - return mountSuspensePrimaryChildren(workInProgress, didSuspend); + return mountSuspensePrimaryChildren(workInProgress, nextInstance); } - nextInstance = current.memoizedState; + JSCompiler_temp$jscomp$0 = current.memoizedState; if ( - null !== nextInstance && - ((prevHydrationParentFiber = nextInstance.dehydrated), - null !== prevHydrationParentFiber) - ) - return updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - JSCompiler_temp, - nextProps, - prevHydrationParentFiber, - nextInstance, - renderLanes - ); - if (showFallback) { - reuseSuspenseHandlerOnStack(workInProgress); - showFallback = nextProps.fallback; - didSuspend = workInProgress.mode; - nextInstance = current.child; - prevHydrationParentFiber = nextInstance.sibling; - var primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (didSuspend & 1) && workInProgress.child !== nextInstance - ? ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - workInProgress.mode & 2 && - ((nextProps.actualDuration = 0), - (nextProps.actualStartTime = -1), - (nextProps.selfBaseDuration = nextInstance.selfBaseDuration), - (nextProps.treeBaseDuration = nextInstance.treeBaseDuration)), - (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(nextInstance, primaryChildProps)), - (nextProps.subtreeFlags = nextInstance.subtreeFlags & 31457280)); - null !== prevHydrationParentFiber - ? (showFallback = createWorkInProgress( - prevHydrationParentFiber, - showFallback - )) - : ((showFallback = createFiberFromFragment( - showFallback, - didSuspend, - renderLanes, - null - )), - (showFallback.flags |= 2)); - showFallback.return = workInProgress; - nextProps.return = workInProgress; - nextProps.sibling = showFallback; - workInProgress.child = nextProps; - nextProps = showFallback; - showFallback = workInProgress.child; - didSuspend = current.child.memoizedState; - null === didSuspend - ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) - : ((nextInstance = didSuspend.cachePool), - null !== nextInstance - ? ((prevHydrationParentFiber = CacheContext._currentValue), - (nextInstance = - nextInstance.parent !== prevHydrationParentFiber - ? { - parent: prevHydrationParentFiber, - pool: prevHydrationParentFiber - } - : nextInstance)) - : (nextInstance = getSuspendedCache()), - (didSuspend = { - baseLanes: didSuspend.baseLanes | renderLanes, - cachePool: nextInstance - })); - showFallback.memoizedState = didSuspend; - enableTransitionTracing && - ((didSuspend = enableTransitionTracing ? transitionStack.current : null), - null !== didSuspend && - ((nextInstance = enableTransitionTracing - ? markerInstanceStack.current - : null), - (prevHydrationParentFiber = showFallback.updateQueue), - (primaryChildProps = current.updateQueue), - null === prevHydrationParentFiber - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: null - }) - : prevHydrationParentFiber === primaryChildProps - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: - null !== primaryChildProps ? primaryChildProps.retryQueue : null - }) - : ((prevHydrationParentFiber.transitions = didSuspend), - (prevHydrationParentFiber.markerInstances = nextInstance)))); - showFallback.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return nextProps; + null !== JSCompiler_temp$jscomp$0 && + ((nextInstance = JSCompiler_temp$jscomp$0.dehydrated), + null !== nextInstance) + ) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (JSCompiler_temp = createCapturedValueFromError( + Error(formatProdErrorMessage(422)) + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (nextProps = createFiberFromOffscreen( + { mode: "visible", children: nextProps.children }, + nextInstance, + 0, + null + )), + (showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2), + (nextProps.return = workInProgress), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + 0 !== (workInProgress.mode & 1) && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (nextProps = workInProgress.child), + (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (nextProps.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = showFallback)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + "$!" === nextInstance.data) + ) { + JSCompiler_temp = + nextInstance.nextSibling && nextInstance.nextSibling.dataset; + if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; + JSCompiler_temp = digest; + nextProps = Error(formatProdErrorMessage(419)); + nextProps.digest = JSCompiler_temp; + JSCompiler_temp = createCapturedValueFromError( + nextProps, + JSCompiler_temp, + void 0 + ); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ); + } else if ( + (enableLazyContextPropagation && + !didReceiveUpdate && + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_temp) + ) { + JSCompiler_temp = workInProgressRoot; + if (null !== JSCompiler_temp) { + nextProps = renderLanes & -renderLanes; + if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) + nextProps = 1; + else + switch (nextProps) { + case 2: + nextProps = 1; + break; + case 8: + nextProps = 4; + break; + case 32: + nextProps = 16; + break; + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + nextProps = 64; + break; + case 268435456: + nextProps = 134217728; + break; + default: + nextProps = 0; + } + nextProps = + 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) + ? 0 + : nextProps; + if (0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane) + throw ( + ((JSCompiler_temp$jscomp$0.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); + } + "$?" === nextInstance.data || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + null + ); + } else + "$?" === nextInstance.data + ? ((workInProgress.flags |= 128), + (workInProgress.child = current.child), + (workInProgress = retryDehydratedSuspenseBoundary.bind( + null, + current + )), + (nextInstance._reactRetry = workInProgress), + (workInProgress = null)) + : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + (nextHydratableInstance = getNextHydratable( + nextInstance.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + ((idStack[idStackIndex++] = treeContextId), + (idStack[idStackIndex++] = treeContextOverflow), + (idStack[idStackIndex++] = treeContextProvider), + (treeContextId = renderLanes.id), + (treeContextOverflow = renderLanes.overflow), + (treeContextProvider = workInProgress)), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + nextProps.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; } + if (showFallback) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (JSCompiler_temp$jscomp$0 = current.child), + (digest = JSCompiler_temp$jscomp$0.sibling), + (didSuspend = { mode: "hidden", children: nextProps.children }), + 0 === (nextInstance & 1) && + workInProgress.child !== JSCompiler_temp$jscomp$0 + ? ((nextProps = workInProgress.child), + (nextProps.childLanes = 0), + (nextProps.pendingProps = didSuspend), + workInProgress.mode & 2 && + ((nextProps.actualDuration = 0), + (nextProps.actualStartTime = -1), + (nextProps.selfBaseDuration = + JSCompiler_temp$jscomp$0.selfBaseDuration), + (nextProps.treeBaseDuration = + JSCompiler_temp$jscomp$0.treeBaseDuration)), + (workInProgress.deletions = null)) + : ((nextProps = createWorkInProgress( + JSCompiler_temp$jscomp$0, + didSuspend + )), + (nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)), + null !== digest + ? (showFallback = createWorkInProgress(digest, showFallback)) + : ((showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2)), + (showFallback.return = workInProgress), + (nextProps.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + (nextProps = showFallback), + (showFallback = workInProgress.child), + (nextInstance = current.child.memoizedState), + null === nextInstance + ? (nextInstance = mountSuspenseOffscreenState(renderLanes)) + : ((JSCompiler_temp$jscomp$0 = nextInstance.cachePool), + null !== JSCompiler_temp$jscomp$0 + ? ((digest = CacheContext._currentValue), + (JSCompiler_temp$jscomp$0 = + JSCompiler_temp$jscomp$0.parent !== digest + ? { parent: digest, pool: digest } + : JSCompiler_temp$jscomp$0)) + : (JSCompiler_temp$jscomp$0 = getSuspendedCache()), + (nextInstance = { + baseLanes: nextInstance.baseLanes | renderLanes, + cachePool: JSCompiler_temp$jscomp$0 + })), + (showFallback.memoizedState = nextInstance), + enableTransitionTracing && + ((nextInstance = enableTransitionTracing + ? transitionStack.current + : null), + null !== nextInstance && + ((JSCompiler_temp$jscomp$0 = enableTransitionTracing + ? markerInstanceStack.current + : null), + (digest = showFallback.updateQueue), + (didSuspend = current.updateQueue), + null === digest + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null + }) + : digest === didSuspend + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null !== didSuspend ? didSuspend.retryQueue : null + }) + : ((digest.transitions = nextInstance), + (digest.markerInstances = JSCompiler_temp$jscomp$0)))), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + nextProps + ); pushPrimaryTreeSuspenseHandler(workInProgress); JSCompiler_temp = current.child; current = JSCompiler_temp.sibling; @@ -6271,194 +6377,6 @@ function retrySuspenseComponentWithoutHydrating( workInProgress.memoizedState = null; return current; } -function updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - didPrimaryChildrenDefer, - nextProps, - suspenseInstance, - suspenseState, - renderLanes -) { - if (didSuspend) { - if (workInProgress.flags & 256) - return ( - pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (suspenseInstance = createCapturedValueFromError( - Error(formatProdErrorMessage(422)) - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ) - ); - if (null !== workInProgress.memoizedState) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - null - ); - reuseSuspenseHandlerOnStack(workInProgress); - suspenseInstance = nextProps.fallback; - suspenseState = workInProgress.mode; - nextProps = createFiberFromOffscreen( - { mode: "visible", children: nextProps.children }, - suspenseState, - 0, - null - ); - suspenseInstance = createFiberFromFragment( - suspenseInstance, - suspenseState, - renderLanes, - null - ); - suspenseInstance.flags |= 2; - nextProps.return = workInProgress; - suspenseInstance.return = workInProgress; - nextProps.sibling = suspenseInstance; - workInProgress.child = nextProps; - 0 !== (workInProgress.mode & 1) && - reconcileChildFibers(workInProgress, current.child, null, renderLanes); - suspenseState = workInProgress.child; - suspenseState.memoizedState = mountSuspenseOffscreenState(renderLanes); - suspenseState.childLanes = getRemainingWorkInPrimaryTree( - current, - didPrimaryChildrenDefer, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return suspenseInstance; - } - pushPrimaryTreeSuspenseHandler(workInProgress); - if (0 === (workInProgress.mode & 1)) - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - if ("$!" === suspenseInstance.data) { - suspenseInstance = - suspenseInstance.nextSibling && suspenseInstance.nextSibling.dataset; - if (suspenseInstance) var digest = suspenseInstance.dgst; - suspenseInstance = digest; - didPrimaryChildrenDefer = Error(formatProdErrorMessage(419)); - didPrimaryChildrenDefer.digest = suspenseInstance; - suspenseInstance = createCapturedValueFromError( - didPrimaryChildrenDefer, - suspenseInstance, - void 0 - ); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ); - } - enableLazyContextPropagation && - !didReceiveUpdate && - propagateParentContextChanges(current, workInProgress, renderLanes, !1); - didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes); - if (didReceiveUpdate || didPrimaryChildrenDefer) { - didPrimaryChildrenDefer = workInProgressRoot; - if (null !== didPrimaryChildrenDefer) { - nextProps = renderLanes & -renderLanes; - if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) - nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 64; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== suspenseState.retryLane) - throw ( - ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) - ); - } - "$?" !== suspenseInstance.data && renderDidSuspendDelayIfPossible(); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if ("$?" === suspenseInstance.data) - return ( - (workInProgress.flags |= 128), - (workInProgress.child = current.child), - (workInProgress = retryDehydratedSuspenseBoundary.bind(null, current)), - (suspenseInstance._reactRetry = workInProgress), - null - ); - current = suspenseState.treeContext; - nextHydratableInstance = getNextHydratable(suspenseInstance.nextSibling); - hydrationParentFiber = workInProgress; - isHydrating = !0; - hydrationErrors = null; - rootOrSingletonContext = !1; - null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)); - workInProgress = mountSuspensePrimaryChildren( - workInProgress, - nextProps.children - ); - workInProgress.flags |= 4096; - return workInProgress; -} function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; @@ -7002,92 +6920,74 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 5: - return ( - null === current && - isHydrating && - (((init = Component = nextHydratableInstance), init) - ? tryHydrateInstance(workInProgress, init) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(init)), - (prevState = hydrationParentFiber), - nextHydratableInstance && - tryHydrateInstance(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevState, init) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))), - pushHostContext(workInProgress), - (init = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (Component = prevState.children), - shouldSetTextContent(init, prevState) - ? (Component = null) - : null !== nextState && - shouldSetTextContent(init, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((init = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes + if (null === current && isHydrating) { + if ((init = Component = nextHydratableInstance)) + (Component = canHydrateInstance( + Component, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext )), - (HostTransitionContext._currentValue = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), - workInProgress.child - ); + null !== Component + ? ((workInProgress.stateNode = Component), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + Component.firstChild + )), + (rootOrSingletonContext = !1), + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(); + } + pushHostContext(workInProgress); + init = workInProgress.type; + prevState = workInProgress.pendingProps; + nextState = null !== current ? current.memoizedProps : null; + Component = prevState.children; + shouldSetTextContent(init, prevState) + ? (Component = null) + : null !== nextState && + shouldSetTextContent(init, nextState) && + (workInProgress.flags |= 32); + null !== workInProgress.memoizedState && + ((init = renderWithHooks( + current, + workInProgress, + TransitionAwareHostComponent, + null, + null, + renderLanes + )), + (HostTransitionContext._currentValue = init), + enableLazyContextPropagation || + (didReceiveUpdate && + null !== current && + current.memoizedState.memoizedState !== init && + propagateContextChange( + workInProgress, + HostTransitionContext, + renderLanes + ))); + markRef(current, workInProgress); + reconcileChildren(current, workInProgress, Component, renderLanes); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - (((current = renderLanes = nextHydratableInstance), current) - ? tryHydrateText(workInProgress, current) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(current)), - (Component = hydrationParentFiber), - nextHydratableInstance && - tryHydrateText(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(Component, current) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))), - null - ); + if (null === current && isHydrating) { + if ((current = renderLanes = nextHydratableInstance)) + (renderLanes = canHydrateTextInstance( + renderLanes, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== renderLanes + ? ((workInProgress.stateNode = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (current = !0)) + : (current = !1); + current || throwOnHydrationMismatch(); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: @@ -7824,14 +7724,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$118 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$118 = lastTailNode), + for (var lastTailNode$117 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$117 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$118 + null === lastTailNode$117 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$118.sibling = null); + : (lastTailNode$117.sibling = null); } } function bubbleProperties(completedWork) { @@ -7843,53 +7743,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$120 = completedWork.selfBaseDuration, - child$121 = completedWork.child; - null !== child$121; + var treeBaseDuration$119 = completedWork.selfBaseDuration, + child$120 = completedWork.child; + null !== child$120; ) - (newChildLanes |= child$121.lanes | child$121.childLanes), - (subtreeFlags |= child$121.subtreeFlags & 31457280), - (subtreeFlags |= child$121.flags & 31457280), - (treeBaseDuration$120 += child$121.treeBaseDuration), - (child$121 = child$121.sibling); - completedWork.treeBaseDuration = treeBaseDuration$120; + (newChildLanes |= child$120.lanes | child$120.childLanes), + (subtreeFlags |= child$120.subtreeFlags & 31457280), + (subtreeFlags |= child$120.flags & 31457280), + (treeBaseDuration$119 += child$120.treeBaseDuration), + (child$120 = child$120.sibling); + completedWork.treeBaseDuration = treeBaseDuration$119; } else for ( - treeBaseDuration$120 = completedWork.child; - null !== treeBaseDuration$120; + treeBaseDuration$119 = completedWork.child; + null !== treeBaseDuration$119; ) (newChildLanes |= - treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), - (subtreeFlags |= treeBaseDuration$120.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$120.flags & 31457280), - (treeBaseDuration$120.return = completedWork), - (treeBaseDuration$120 = treeBaseDuration$120.sibling); + treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), + (subtreeFlags |= treeBaseDuration$119.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$119.flags & 31457280), + (treeBaseDuration$119.return = completedWork), + (treeBaseDuration$119 = treeBaseDuration$119.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$120 = completedWork.actualDuration; - child$121 = completedWork.selfBaseDuration; + treeBaseDuration$119 = completedWork.actualDuration; + child$120 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$120 += child.actualDuration), - (child$121 += child.treeBaseDuration), + (treeBaseDuration$119 += child.actualDuration), + (child$120 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$120; - completedWork.treeBaseDuration = child$121; + completedWork.actualDuration = treeBaseDuration$119; + completedWork.treeBaseDuration = child$120; } else for ( - treeBaseDuration$120 = completedWork.child; - null !== treeBaseDuration$120; + treeBaseDuration$119 = completedWork.child; + null !== treeBaseDuration$119; ) (newChildLanes |= - treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), - (subtreeFlags |= treeBaseDuration$120.subtreeFlags), - (subtreeFlags |= treeBaseDuration$120.flags), - (treeBaseDuration$120.return = completedWork), - (treeBaseDuration$120 = treeBaseDuration$120.sibling); + treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), + (subtreeFlags |= treeBaseDuration$119.subtreeFlags), + (subtreeFlags |= treeBaseDuration$119.flags), + (treeBaseDuration$119.return = completedWork), + (treeBaseDuration$119 = treeBaseDuration$119.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8146,33 +8046,20 @@ function completeWork(current, workInProgress, renderLanes) { ) switch (currentResource.tag) { case 3: - currentResource = 0 !== (currentResource.mode & 1); - checkForUnmatchedText( - current.nodeValue, - renderLanes, - currentResource - ); - if ( - currentResource && - enableClientRenderFallbackOnTextMismatch - ) { + checkForUnmatchedText(current.nodeValue, renderLanes); + if (enableClientRenderFallbackOnTextMismatch) { current = !1; break a; } break; case 27: case 5: - var isConcurrentMode$27 = 0 !== (currentResource.mode & 1); - !0 !== - currentResource.memoizedProps.suppressHydrationWarning && - checkForUnmatchedText( - current.nodeValue, - renderLanes, - isConcurrentMode$27 - ); if ( - isConcurrentMode$27 && - enableClientRenderFallbackOnTextMismatch + (!0 !== + currentResource.memoizedProps + .suppressHydrationWarning && + checkForUnmatchedText(current.nodeValue, renderLanes), + enableClientRenderFallbackOnTextMismatch) ) { current = !1; break a; @@ -8248,18 +8135,19 @@ function completeWork(current, workInProgress, renderLanes) { ); renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - renderLanes && - ((newProps = workInProgress.child), - (currentResource = null), + if (renderLanes) { + newProps = workInProgress.child; + currentResource = null; null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && - (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$27 = null), + (currentResource = newProps.alternate.memoizedState.cachePool.pool); + var cache$135 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$27 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$27 !== currentResource && (newProps.flags |= 2048)); + (cache$135 = newProps.memoizedState.cachePool.pool); + cache$135 !== currentResource && (newProps.flags |= 2048); + } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -8300,8 +8188,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$27 = currentResource.rendering; - if (null === isConcurrentMode$27) + cache$135 = currentResource.rendering; + if (null === cache$135) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8309,11 +8197,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$27 = findFirstSuspended(current); - if (null !== isConcurrentMode$27) { + cache$135 = findFirstSuspended(current); + if (null !== cache$135) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$27.updateQueue; + current = cache$135.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8338,10 +8226,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if ( - ((current = findFirstSuspended(isConcurrentMode$27)), - null !== current) - ) { + if (((current = findFirstSuspended(cache$135)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8351,7 +8236,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$27.alternate && + !cache$135.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8364,13 +8249,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$27.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$27)) + ? ((cache$135.sibling = workInProgress.child), + (workInProgress.child = cache$135)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$27) - : (workInProgress.child = isConcurrentMode$27), - (currentResource.last = isConcurrentMode$27)); + ? (current.sibling = cache$135) + : (workInProgress.child = cache$135), + (currentResource.last = cache$135)); } if (null !== currentResource.tail) return ( @@ -8669,8 +8554,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$153) { - captureCommitPhaseError(current, nearestMountedAncestor, error$153); + } catch (error$152) { + captureCommitPhaseError(current, nearestMountedAncestor, error$152); } else ref.current = null; } @@ -8707,7 +8592,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$219) { + } catch (e$218) { JSCompiler_temp = null; break a; } @@ -8977,11 +8862,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$155 = commitTime, + var commitTime$154 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$155); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$154); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -9008,8 +8893,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$157) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$157); + } catch (error$156) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$156); } } function commitClassCallbacks(finishedWork) { @@ -9108,11 +8993,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$158) { + } catch (error$157) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$157 ); } else { @@ -9129,11 +9014,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$159) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$158 ); } recordLayoutEffectDuration(finishedWork); @@ -9144,11 +9029,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$160) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$159 ); } } @@ -9854,22 +9739,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$175) { + } catch (error$174) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$174 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$176) { + } catch (error$175) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$175 ); } } @@ -10042,11 +9927,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$177) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$177 + error$176 ); } } @@ -10084,8 +9969,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$178) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$178); + } catch (error$177) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$177); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -10096,8 +9981,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$181) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$181); + } catch (error$180) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$180); } } break; @@ -10111,8 +9996,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$182) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$182); + } catch (error$181) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$181); } } break; @@ -10126,8 +10011,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$183) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$183); + } catch (error$182) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$182); } break; case 4: @@ -10157,8 +10042,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$185) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$185); + } catch (error$184) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$184); } current = finishedWork.updateQueue; null !== current && @@ -10236,11 +10121,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$165) { + } catch (error$164) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$165 + error$164 ); } } else if ( @@ -10315,21 +10200,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$166 = JSCompiler_inline_result.stateNode; + var parent$165 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$166, ""), + (setTextContent(parent$165, ""), (JSCompiler_inline_result.flags &= -33)); - var before$167 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$167, parent$166); + var before$166 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$166, parent$165); break; case 3: case 4: - var parent$168 = JSCompiler_inline_result.stateNode.containerInfo, - before$169 = getHostSibling(finishedWork); + var parent$167 = JSCompiler_inline_result.stateNode.containerInfo, + before$168 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$169, - parent$168 + before$168, + parent$167 ); break; default: @@ -10521,8 +10406,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$188) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$188); + } catch (error$187) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$187); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -10821,9 +10706,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$193 = finishedWork.stateNode; + var instance$192 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$193._visibility & 4 + ? instance$192._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10836,7 +10721,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$193._visibility |= 4), + : ((instance$192._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10844,7 +10729,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$193._visibility |= 4), + : ((instance$192._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10857,7 +10742,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$193 + instance$192 ); break; case 24: @@ -11861,8 +11746,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$201) { - handleThrow(root, thrownValue$201); + } catch (thrownValue$200) { + handleThrow(root, thrownValue$200); } while (1); lanes && root.shellSuspendCounter++; @@ -11978,8 +11863,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$203) { - handleThrow(root, thrownValue$203); + } catch (thrownValue$202) { + handleThrow(root, thrownValue$202); } while (1); resetContextDependencies(); @@ -12232,13 +12117,13 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$207 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$206 = commitBeforeMutationEffects( root, finishedWork ); commitTime = now(); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$207 && + shouldFireAfterActiveInstanceBlur$206 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12332,7 +12217,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$208 = rootWithPendingPassiveEffects, + var root$207 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -12348,7 +12233,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$208, remainingLanes); + releaseRootPooledCache(root$207, remainingLanes); } } return !1; @@ -13014,12 +12899,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$211 = fiber.stateNode; - if (root$211.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$211.pendingLanes); + var root$210 = fiber.stateNode; + if (root$210.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$210.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$211, lanes), - ensureRootIsScheduled(root$211), + (upgradePendingLanesToSync(root$210, lanes), + ensureRootIsScheduled(root$210), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now$1() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -14231,19 +14116,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$369; + var JSCompiler_inline_result$jscomp$364; if (canUseDOM) { - var isSupported$jscomp$inline_1635 = "oninput" in document; - if (!isSupported$jscomp$inline_1635) { - var element$jscomp$inline_1636 = document.createElement("div"); - element$jscomp$inline_1636.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1635 = - "function" === typeof element$jscomp$inline_1636.oninput; + var isSupported$jscomp$inline_1600 = "oninput" in document; + if (!isSupported$jscomp$inline_1600) { + var element$jscomp$inline_1601 = document.createElement("div"); + element$jscomp$inline_1601.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1600 = + "function" === typeof element$jscomp$inline_1601.oninput; } - JSCompiler_inline_result$jscomp$369 = isSupported$jscomp$inline_1635; - } else JSCompiler_inline_result$jscomp$369 = !1; + JSCompiler_inline_result$jscomp$364 = isSupported$jscomp$inline_1600; + } else JSCompiler_inline_result$jscomp$364 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$369 && + JSCompiler_inline_result$jscomp$364 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14552,20 +14437,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1676 = 0; - i$jscomp$inline_1676 < simpleEventPluginEvents.length; - i$jscomp$inline_1676++ + var i$jscomp$inline_1641 = 0; + i$jscomp$inline_1641 < simpleEventPluginEvents.length; + i$jscomp$inline_1641++ ) { - var eventName$jscomp$inline_1677 = - simpleEventPluginEvents[i$jscomp$inline_1676], - domEventName$jscomp$inline_1678 = - eventName$jscomp$inline_1677.toLowerCase(), - capitalizedEvent$jscomp$inline_1679 = - eventName$jscomp$inline_1677[0].toUpperCase() + - eventName$jscomp$inline_1677.slice(1); + var eventName$jscomp$inline_1642 = + simpleEventPluginEvents[i$jscomp$inline_1641], + domEventName$jscomp$inline_1643 = + eventName$jscomp$inline_1642.toLowerCase(), + capitalizedEvent$jscomp$inline_1644 = + eventName$jscomp$inline_1642[0].toUpperCase() + + eventName$jscomp$inline_1642.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1678, - "on" + capitalizedEvent$jscomp$inline_1679 + domEventName$jscomp$inline_1643, + "on" + capitalizedEvent$jscomp$inline_1644 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15411,11 +15296,10 @@ function normalizeMarkupForTextOrAttribute(markup) { .replace(NORMALIZE_NEWLINES_REGEX, "\n") .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } -function checkForUnmatchedText(serverText, clientText, isConcurrentMode) { +function checkForUnmatchedText(serverText, clientText) { clientText = normalizeMarkupForTextOrAttribute(clientText); if ( normalizeMarkupForTextOrAttribute(serverText) !== clientText && - isConcurrentMode && enableClientRenderFallbackOnTextMismatch ) throw Error(formatProdErrorMessage(425)); @@ -16052,14 +15936,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$246 in nextProps) { - var propKey = nextProps[propKey$246]; - lastProp = lastProps[propKey$246]; + for (var propKey$245 in nextProps) { + var propKey = nextProps[propKey$245]; + lastProp = lastProps[propKey$245]; if ( - nextProps.hasOwnProperty(propKey$246) && + nextProps.hasOwnProperty(propKey$245) && (null != propKey || null != lastProp) ) - switch (propKey$246) { + switch (propKey$245) { case "type": type = propKey; break; @@ -16088,7 +15972,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$246, + propKey$245, propKey, nextProps, lastProp @@ -16107,7 +15991,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$246 = null; + propKey = value = defaultValue = propKey$245 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16138,7 +16022,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$246 = type; + propKey$245 = type; break; case "defaultValue": defaultValue = type; @@ -16159,15 +16043,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$246 - ? updateOptions(domElement, !!lastProps, propKey$246, !1) + null != propKey$245 + ? updateOptions(domElement, !!lastProps, propKey$245, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$246 = null; + propKey = propKey$245 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16191,7 +16075,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$246 = name; + propKey$245 = name; break; case "defaultValue": propKey = name; @@ -16205,17 +16089,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$246, propKey); + updateTextarea(domElement, propKey$245, propKey); return; case "option": - for (var propKey$262 in lastProps) + for (var propKey$261 in lastProps) if ( - ((propKey$246 = lastProps[propKey$262]), - lastProps.hasOwnProperty(propKey$262) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$262)) + ((propKey$245 = lastProps[propKey$261]), + lastProps.hasOwnProperty(propKey$261) && + null != propKey$245 && + !nextProps.hasOwnProperty(propKey$261)) ) - switch (propKey$262) { + switch (propKey$261) { case "selected": domElement.selected = !1; break; @@ -16223,33 +16107,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$262, + propKey$261, null, nextProps, - propKey$246 + propKey$245 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$246 = nextProps[lastDefaultValue]), + ((propKey$245 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$246 !== propKey && - (null != propKey$246 || null != propKey)) + propKey$245 !== propKey && + (null != propKey$245 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$246 && - "function" !== typeof propKey$246 && - "symbol" !== typeof propKey$246; + propKey$245 && + "function" !== typeof propKey$245 && + "symbol" !== typeof propKey$245; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$246, + propKey$245, nextProps, propKey ); @@ -16270,24 +16154,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$267 in lastProps) - (propKey$246 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$267) && - setProp(domElement, tag, propKey$267, null, nextProps, propKey$246); + for (var propKey$266 in lastProps) + (propKey$245 = lastProps[propKey$266]), + lastProps.hasOwnProperty(propKey$266) && + null != propKey$245 && + !nextProps.hasOwnProperty(propKey$266) && + setProp(domElement, tag, propKey$266, null, nextProps, propKey$245); for (checked in nextProps) if ( - ((propKey$246 = nextProps[checked]), + ((propKey$245 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$246 !== propKey && - (null != propKey$246 || null != propKey)) + propKey$245 !== propKey && + (null != propKey$245 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$246) + if (null != propKey$245) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16295,7 +16179,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$246, + propKey$245, nextProps, propKey ); @@ -16303,49 +16187,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$272 in lastProps) - (propKey$246 = lastProps[propKey$272]), - lastProps.hasOwnProperty(propKey$272) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$272) && + for (var propKey$271 in lastProps) + (propKey$245 = lastProps[propKey$271]), + lastProps.hasOwnProperty(propKey$271) && + null != propKey$245 && + !nextProps.hasOwnProperty(propKey$271) && setPropOnCustomElement( domElement, tag, - propKey$272, + propKey$271, null, nextProps, - propKey$246 + propKey$245 ); for (defaultChecked in nextProps) - (propKey$246 = nextProps[defaultChecked]), + (propKey$245 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$246 === propKey || - (null == propKey$246 && null == propKey) || + propKey$245 === propKey || + (null == propKey$245 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$246, + propKey$245, nextProps, propKey ); return; } } - for (var propKey$277 in lastProps) - (propKey$246 = lastProps[propKey$277]), - lastProps.hasOwnProperty(propKey$277) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$277) && - setProp(domElement, tag, propKey$277, null, nextProps, propKey$246); + for (var propKey$276 in lastProps) + (propKey$245 = lastProps[propKey$276]), + lastProps.hasOwnProperty(propKey$276) && + null != propKey$245 && + !nextProps.hasOwnProperty(propKey$276) && + setProp(domElement, tag, propKey$276, null, nextProps, propKey$245); for (lastProp in nextProps) - (propKey$246 = nextProps[lastProp]), + (propKey$245 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$246 === propKey || - (null == propKey$246 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$246, nextProps, propKey); + propKey$245 === propKey || + (null == propKey$245 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$245, nextProps, propKey); } var ReactDOMCurrentDispatcher$1 = Internals.ReactDOMCurrentDispatcher, eventsEnabled = null, @@ -16546,7 +16430,7 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) { default: return instance; } - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) break; } return null; @@ -16561,7 +16445,7 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { !inRootOrSingleton ) return null; - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) return null; } return instance; @@ -16585,9 +16469,6 @@ function getNextHydratable(node) { } return node; } -function getNextHydratableSibling(instance) { - return getNextHydratable(instance.nextSibling); -} function hydrateInstance( instance, type, @@ -16597,7 +16478,6 @@ function hydrateInstance( ) { instance[internalInstanceKey] = internalInstanceHandle; instance[internalPropsKey] = props; - hostContext = 0 !== (internalInstanceHandle.mode & 1); switch (type) { case "dialog": listenToNonDelegatedEvent("cancel", instance); @@ -16610,15 +16490,8 @@ function hydrateInstance( break; case "video": case "audio": - for ( - internalInstanceHandle = 0; - internalInstanceHandle < mediaEventTypes.length; - internalInstanceHandle++ - ) - listenToNonDelegatedEvent( - mediaEventTypes[internalInstanceHandle], - instance - ); + for (hostContext = 0; hostContext < mediaEventTypes.length; hostContext++) + listenToNonDelegatedEvent(mediaEventTypes[hostContext], instance); break; case "source": listenToNonDelegatedEvent("error", instance); @@ -16654,20 +16527,16 @@ function hydrateInstance( initTextarea(instance, props.value, props.defaultValue), track(instance); } - internalInstanceHandle = props.children; - ("string" === typeof internalInstanceHandle || - "number" === typeof internalInstanceHandle || - (enableBigIntSupport && "bigint" === typeof internalInstanceHandle)) && - instance.textContent !== "" + internalInstanceHandle && + hostContext = props.children; + ("string" === typeof hostContext || + "number" === typeof hostContext || + (enableBigIntSupport && "bigint" === typeof hostContext)) && + instance.textContent !== "" + hostContext && (!0 !== props.suppressHydrationWarning && - checkForUnmatchedText( - instance.textContent, - internalInstanceHandle, - hostContext - ), - (hostContext && enableClientRenderFallbackOnTextMismatch) || + checkForUnmatchedText(instance.textContent, hostContext), + enableClientRenderFallbackOnTextMismatch || "body" === type || - (instance.textContent = internalInstanceHandle)); + (instance.textContent = hostContext)); null != props.onScroll && listenToNonDelegatedEvent("scroll", instance); null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", instance); null != props.onClick && (instance.onclick = noop$1); @@ -16990,17 +16859,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$285 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$286 = styles$285.get(type); - resource$286 || + var styles$284 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$285 = styles$284.get(type); + resource$285 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$286 = { + (resource$285 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$285.set(type, resource$286), + styles$284.set(type, resource$285), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -17015,9 +16884,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$286.state + resource$285.state )); - return resource$286; + return resource$285; } return null; case "script": @@ -17100,37 +16969,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$290 = hoistableRoot.querySelector( + var instance$289 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$290) + if (instance$289) return ( (resource.state.loading |= 4), - (resource.instance = instance$290), - markNodeAsHoistable(instance$290), - instance$290 + (resource.instance = instance$289), + markNodeAsHoistable(instance$289), + instance$289 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$290 = ( + instance$289 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$290); - var linkInstance = instance$290; + markNodeAsHoistable(instance$289); + var linkInstance = instance$289; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$290, "link", instance); + setInitialProperties(instance$289, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$290, props.precedence, hoistableRoot); - return (resource.instance = instance$290); + insertStylesheet(instance$289, props.precedence, hoistableRoot); + return (resource.instance = instance$289); case "script": - instance$290 = getScriptKey(props.src); + instance$289 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$290) + getScriptSelectorFromKey(instance$289) )) ) return ( @@ -17139,7 +17008,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$290))) + if ((styleProps = preloadPropsMap.get(instance$289))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17506,10 +17375,10 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1860 = { +var devToolsConfig$jscomp$inline_1823 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-b8f6a39e", + version: "19.0.0-www-modern-67e6e1a2", rendererPackageName: "react-dom" }; (function (internals) { @@ -17527,10 +17396,10 @@ var devToolsConfig$jscomp$inline_1860 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1860.bundleType, - version: devToolsConfig$jscomp$inline_1860.version, - rendererPackageName: devToolsConfig$jscomp$inline_1860.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1860.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1823.bundleType, + version: devToolsConfig$jscomp$inline_1823.version, + rendererPackageName: devToolsConfig$jscomp$inline_1823.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1823.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17547,14 +17416,14 @@ var devToolsConfig$jscomp$inline_1860 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1860.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1823.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-b8f6a39e" + reconcilerVersion: "19.0.0-www-modern-67e6e1a2" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.createPortal = function (children, container) { @@ -17800,7 +17669,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-b8f6a39e"; +exports.version = "19.0.0-www-modern-67e6e1a2"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index c523ef7c8f..401e9a603a 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -8359,14 +8359,11 @@ if (__DEV__) { case HostSingleton: case HostComponent: { - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotHydrateInstance( returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, - instance, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode + instance ); break; } @@ -8384,20 +8381,6 @@ if (__DEV__) { } } - function deleteHydratableInstance(returnFiber, instance) { - var childToDelete = createFiberFromHostInstanceForDeletion(); - childToDelete.stateNode = instance; - childToDelete.return = returnFiber; - var deletions = returnFiber.deletions; - - if (deletions === null) { - returnFiber.deletions = [childToDelete]; - returnFiber.flags |= ChildDeletion; - } else { - deletions.push(childToDelete); - } - } - function warnNonHydratedInstance(returnFiber, fiber) { { if (didSuspendOrErrorDEV) { @@ -8443,32 +8426,22 @@ if (__DEV__) { case HostSingleton: case HostComponent: { var _type = fiber.type; - var _props = fiber.pendingProps; - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotFindHydratableInstance( parentType, parentProps, parentInstance, - _type, - _props, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode + _type ); break; } case HostText: { var _text = fiber.pendingProps; - - var _isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; - didNotFindHydratableTextInstance( parentType, parentProps, parentInstance, - _text, // TODO: Delete this argument when we remove the legacy root API. - _isConcurrentMode + _text ); break; } @@ -8508,10 +8481,6 @@ if (__DEV__) { } } - function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & ~Hydrating) | Placement; - } - function tryHydrateInstance(fiber, nextInstance) { // fiber is a HostComponent Fiber var instance = canHydrateInstance( @@ -8584,13 +8553,6 @@ if (__DEV__) { return false; } - function shouldClientRenderOnMismatch(fiber) { - return ( - (fiber.mode & ConcurrentMode) !== NoMode && - (fiber.flags & DidCapture) === NoFlags$1 - ); - } - function throwOnHydrationMismatch(fiber) { throw new Error( "Hydration failed because the initial UI does not match what was " + @@ -8630,77 +8592,14 @@ if (__DEV__) { fiber.pendingProps, currentHostContext ); - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); - + if (!nextInstance || !tryHydrateInstance(fiber, nextInstance)) { if (shouldKeepWarning) { warnNonHydratedInstance(hydrationParentFiber, fiber); } - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateInstance(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateInstance(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - if (shouldKeepWarning) { - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - } - - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8717,79 +8616,14 @@ if (__DEV__) { text, currentHostContext ); - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - // We exclude non hydrabable text because we know there are no matching hydratables. - // We either throw or insert depending on the render mode. - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); - + if (!nextInstance || !tryHydrateText(fiber, nextInstance)) { if (shouldKeepWarning) { warnNonHydratedInstance(hydrationParentFiber, fiber); } - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateText(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateText(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - if (shouldKeepWarning) { - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - } - - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8798,60 +8632,11 @@ if (__DEV__) { return; } - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); + if (!nextInstance || !tryHydrateSuspense(fiber, nextInstance)) { warnNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateSuspense(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateSuspense(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - warnNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8911,20 +8696,14 @@ if (__DEV__) { switch (returnFiber.tag) { case HostRoot: { var parentContainer = returnFiber.stateNode.containerInfo; - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotMatchHydratedContainerTextInstance( parentContainer, textInstance, - textContent, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode, + textContent, shouldWarnIfMismatchDev ); - if ( - isConcurrentMode && - enableClientRenderFallbackOnTextMismatch - ) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent mode we never update the mismatched text, // even if the error was ignored. return false; @@ -8938,24 +8717,16 @@ if (__DEV__) { var parentType = returnFiber.type; var parentProps = returnFiber.memoizedProps; var parentInstance = returnFiber.stateNode; - - var _isConcurrentMode2 = - (returnFiber.mode & ConcurrentMode) !== NoMode; - didNotMatchHydratedTextInstance( parentType, parentProps, parentInstance, textInstance, - textContent, // TODO: Delete this argument when we remove the legacy root API. - _isConcurrentMode2, + textContent, shouldWarnIfMismatchDev ); - if ( - _isConcurrentMode2 && - enableClientRenderFallbackOnTextMismatch - ) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent mode we never update the mismatched text, // even if the error was ignored. return false; @@ -9059,16 +8830,8 @@ if (__DEV__) { var nextInstance = nextHydratableInstance; if (nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - warnIfUnhydratedTailNodes(fiber); - throwOnHydrationMismatch(); - } else { - while (nextInstance) { - warnUnhydratedInstance(fiber, nextInstance); - deleteHydratableInstance(fiber, nextInstance); - nextInstance = getNextHydratableSibling(nextInstance); - } - } + warnIfUnhydratedTailNodes(fiber); + throwOnHydrationMismatch(); } } @@ -22162,19 +21925,7 @@ if (__DEV__) { ) { // During the first pass, we'll bail out and not drill into the children. // Instead, we'll leave the content in place and try to hydrate it later. - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - { - error( - "Cannot hydrate Suspense in legacy mode. Switch from " + - "ReactDOM.hydrate(element, container) to " + - "ReactDOMClient.hydrateRoot(container, )" + - ".render(element) or remove the Suspense components from " + - "the server rendered components." - ); - } - - workInProgress.lanes = laneToLanes(SyncLane); - } else if (isSuspenseInstanceFallback(suspenseInstance)) { + if (isSuspenseInstanceFallback(suspenseInstance)) { // This is a client-only boundary. Since we won't get any content from the server // for this, we need to schedule that at a higher priority based on when it would // have timed out. In theory we could render it in this pass but it would have the @@ -22213,15 +21964,6 @@ if (__DEV__) { warnIfHydrating(); - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (isSuspenseInstanceFallback(suspenseInstance)) { // This boundary is in a permanent fallback state. In this case, we'll never // get an update and we'll never be able to hydrate the final content. Let's just try the @@ -36296,11 +36038,6 @@ if (__DEV__) { fiber.lanes = lanes; return fiber; } - function createFiberFromHostInstanceForDeletion() { - var fiber = createFiber(HostComponent, null, null, NoMode); - fiber.elementType = "DELETED"; - return fiber; - } function createFiberFromDehydratedFragment(dehydratedNode) { var fiber = createFiber(DehydratedFragment, null, null, NoMode); fiber.stateNode = dehydratedNode; @@ -36469,7 +36206,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-7628a4df"; + var ReactVersion = "19.0.0-www-classic-9b26c97a"; function createPortal$1( children, @@ -41224,12 +40961,7 @@ if (__DEV__) { .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } - function checkForUnmatchedText( - serverText, - clientText, - isConcurrentMode, - shouldWarnDev - ) { + function checkForUnmatchedText(serverText, clientText, shouldWarnDev) { var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); @@ -41251,7 +40983,7 @@ if (__DEV__) { } } - if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent roots, we throw when there's a text mismatch and revert to // client rendering, up to the nearest Suspense boundary. throw new Error("Text content does not match server-rendered HTML."); @@ -44005,7 +43737,6 @@ if (__DEV__) { domElement, tag, props, - isConcurrentMode, shouldWarnDev, hostContext ) { @@ -44141,12 +43872,11 @@ if (__DEV__) { checkForUnmatchedText( domElement.textContent, children, - isConcurrentMode, shouldWarnDev ); } - if (!isConcurrentMode || !enableClientRenderFallbackOnTextMismatch) { + if (!enableClientRenderFallbackOnTextMismatch) { // We really should be patching this in the commit phase but since // this only affects legacy mode hydration which is deprecated anyway // we can get away with it. @@ -44224,7 +43954,7 @@ if (__DEV__) { } } } - function diffHydratedText(textNode, text, isConcurrentMode) { + function diffHydratedText(textNode, text) { var isDifferent = textNode.nodeValue !== text; return isDifferent; } @@ -45469,19 +45199,8 @@ if (__DEV__) { precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events // get attached. - updateFiberProps(instance, props); // TODO: Temporary hack to check if we're in a concurrent root. We can delete - // when the legacy root API is removed. - - var isConcurrentMode = - (internalInstanceHandle.mode & ConcurrentMode) !== NoMode; - diffHydratedProperties( - instance, - type, - props, - isConcurrentMode, - shouldWarnDev, - hostContext - ); + updateFiberProps(instance, props); + diffHydratedProperties(instance, type, props, shouldWarnDev, hostContext); } function validateHydratableTextInstance(text, hostContext) { { @@ -45501,7 +45220,7 @@ if (__DEV__) { internalInstanceHandle, shouldWarnDev ) { - precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete + precacheFiberNode(internalInstanceHandle, textInstance); return diffHydratedText(textInstance, text); } function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) { @@ -45587,15 +45306,9 @@ if (__DEV__) { parentContainer, textInstance, text, - isConcurrentMode, shouldWarnDev ) { - checkForUnmatchedText( - textInstance.nodeValue, - text, - isConcurrentMode, - shouldWarnDev - ); + checkForUnmatchedText(textInstance.nodeValue, text, shouldWarnDev); } function didNotMatchHydratedTextInstance( parentType, @@ -45603,16 +45316,10 @@ if (__DEV__) { parentInstance, textInstance, text, - isConcurrentMode, shouldWarnDev ) { if (parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { - checkForUnmatchedText( - textInstance.nodeValue, - text, - isConcurrentMode, - shouldWarnDev - ); + checkForUnmatchedText(textInstance.nodeValue, text, shouldWarnDev); } } function didNotHydrateInstanceWithinContainer(parentContainer, instance) { @@ -45647,20 +45354,14 @@ if (__DEV__) { parentType, parentProps, parentInstance, - instance, - isConcurrentMode + instance ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - if (instance.nodeType === ELEMENT_NODE) { - warnForDeletedHydratableElement(parentInstance, instance); - } else if (instance.nodeType === COMMENT_NODE); - else { - warnForDeletedHydratableText(parentInstance, instance); - } + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentInstance, instance); + } else if (instance.nodeType === COMMENT_NODE); + else { + warnForDeletedHydratableText(parentInstance, instance); } } } @@ -45708,32 +45409,20 @@ if (__DEV__) { parentProps, parentInstance, type, - props, - isConcurrentMode + props ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - warnForInsertedHydratedElement(parentInstance, type); - } + warnForInsertedHydratedElement(parentInstance, type); } } function didNotFindHydratableTextInstance( parentType, parentProps, parentInstance, - text, - isConcurrentMode + text ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - warnForInsertedHydratedText(parentInstance, text); - } + warnForInsertedHydratedText(parentInstance, text); } } function errorHydratingContainer(parentContainer) { @@ -49247,42 +48936,6 @@ if (__DEV__) { return findHostInstanceWithWarning(componentOrElement, "findDOMNode"); } } - function hydrate(element, container, callback) { - { - error( - "ReactDOM.hydrate has not been supported since React 18. Use hydrateRoot " + - "instead. Until you switch to the new API, your app will behave as " + - "if it's running React 17. Learn " + - "more: https://react.dev/link/switch-to-createroot" - ); - } - - if (!isValidContainerLegacy(container)) { - throw new Error("Target container is not a DOM element."); - } - - { - var isModernRoot = - isContainerMarkedAsRoot(container) && - container._reactRootContainer === undefined; - - if (isModernRoot) { - error( - "You are calling ReactDOM.hydrate() on a container that was previously " + - "passed to ReactDOMClient.createRoot(). This is not supported. " + - "Did you mean to call hydrateRoot(container, element)?" - ); - } - } // TODO: throw or warn if we couldn't hydrate? - - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - true, - callback - ); - } function render(element, container, callback) { { error( @@ -50082,7 +49735,6 @@ if (__DEV__) { exports.focusWithin = focusWithin; exports.getFindAllNodesFailureDescription = getFindAllNodesFailureDescription; - exports.hydrate = hydrate; exports.hydrateRoot = hydrateRoot; exports.observeVisibleRects = observeVisibleRects; exports.preconnect = preconnect; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index d35b05069b..faab4b194c 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -8321,14 +8321,11 @@ if (__DEV__) { case HostSingleton: case HostComponent: { - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotHydrateInstance( returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, - instance, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode + instance ); break; } @@ -8346,20 +8343,6 @@ if (__DEV__) { } } - function deleteHydratableInstance(returnFiber, instance) { - var childToDelete = createFiberFromHostInstanceForDeletion(); - childToDelete.stateNode = instance; - childToDelete.return = returnFiber; - var deletions = returnFiber.deletions; - - if (deletions === null) { - returnFiber.deletions = [childToDelete]; - returnFiber.flags |= ChildDeletion; - } else { - deletions.push(childToDelete); - } - } - function warnNonHydratedInstance(returnFiber, fiber) { { if (didSuspendOrErrorDEV) { @@ -8405,32 +8388,22 @@ if (__DEV__) { case HostSingleton: case HostComponent: { var _type = fiber.type; - var _props = fiber.pendingProps; - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotFindHydratableInstance( parentType, parentProps, parentInstance, - _type, - _props, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode + _type ); break; } case HostText: { var _text = fiber.pendingProps; - - var _isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; - didNotFindHydratableTextInstance( parentType, parentProps, parentInstance, - _text, // TODO: Delete this argument when we remove the legacy root API. - _isConcurrentMode + _text ); break; } @@ -8470,10 +8443,6 @@ if (__DEV__) { } } - function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & ~Hydrating) | Placement; - } - function tryHydrateInstance(fiber, nextInstance) { // fiber is a HostComponent Fiber var instance = canHydrateInstance( @@ -8546,13 +8515,6 @@ if (__DEV__) { return false; } - function shouldClientRenderOnMismatch(fiber) { - return ( - (fiber.mode & ConcurrentMode) !== NoMode && - (fiber.flags & DidCapture) === NoFlags$1 - ); - } - function throwOnHydrationMismatch(fiber) { throw new Error( "Hydration failed because the initial UI does not match what was " + @@ -8592,77 +8554,14 @@ if (__DEV__) { fiber.pendingProps, currentHostContext ); - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); - + if (!nextInstance || !tryHydrateInstance(fiber, nextInstance)) { if (shouldKeepWarning) { warnNonHydratedInstance(hydrationParentFiber, fiber); } - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateInstance(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateInstance(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - if (shouldKeepWarning) { - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - } - - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8679,79 +8578,14 @@ if (__DEV__) { text, currentHostContext ); - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - // We exclude non hydrabable text because we know there are no matching hydratables. - // We either throw or insert depending on the render mode. - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); - + if (!nextInstance || !tryHydrateText(fiber, nextInstance)) { if (shouldKeepWarning) { warnNonHydratedInstance(hydrationParentFiber, fiber); } - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateText(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateText(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - - if (shouldKeepWarning) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - } - - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - if (shouldKeepWarning) { - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - } - - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8760,60 +8594,11 @@ if (__DEV__) { return; } - var initialInstance = nextHydratableInstance; var nextInstance = nextHydratableInstance; - if (!nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - throwOnHydrationMismatch(); - } // Nothing to hydrate. Make it an insertion. - - insertNonHydratedInstance(hydrationParentFiber, fiber); + if (!nextInstance || !tryHydrateSuspense(fiber, nextInstance)) { warnNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrateSuspense(fiber, nextInstance)) { - if (shouldClientRenderOnMismatch(fiber)) { - warnNonHydratedInstance(hydrationParentFiber, fiber); - throwOnHydrationMismatch(); - } // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - - if ( - !nextHydratableInstance || - !tryHydrateSuspense(fiber, nextHydratableInstance) - ) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - warnNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - nextHydratableInstance = initialInstance; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - warnUnhydratedInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); - deleteHydratableInstance( - prevHydrationParentFiber, - firstAttemptedInstance - ); + throwOnHydrationMismatch(); } } @@ -8873,20 +8658,14 @@ if (__DEV__) { switch (returnFiber.tag) { case HostRoot: { var parentContainer = returnFiber.stateNode.containerInfo; - var isConcurrentMode = - (returnFiber.mode & ConcurrentMode) !== NoMode; didNotMatchHydratedContainerTextInstance( parentContainer, textInstance, - textContent, // TODO: Delete this argument when we remove the legacy root API. - isConcurrentMode, + textContent, shouldWarnIfMismatchDev ); - if ( - isConcurrentMode && - enableClientRenderFallbackOnTextMismatch - ) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent mode we never update the mismatched text, // even if the error was ignored. return false; @@ -8900,24 +8679,16 @@ if (__DEV__) { var parentType = returnFiber.type; var parentProps = returnFiber.memoizedProps; var parentInstance = returnFiber.stateNode; - - var _isConcurrentMode2 = - (returnFiber.mode & ConcurrentMode) !== NoMode; - didNotMatchHydratedTextInstance( parentType, parentProps, parentInstance, textInstance, - textContent, // TODO: Delete this argument when we remove the legacy root API. - _isConcurrentMode2, + textContent, shouldWarnIfMismatchDev ); - if ( - _isConcurrentMode2 && - enableClientRenderFallbackOnTextMismatch - ) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent mode we never update the mismatched text, // even if the error was ignored. return false; @@ -9021,16 +8792,8 @@ if (__DEV__) { var nextInstance = nextHydratableInstance; if (nextInstance) { - if (shouldClientRenderOnMismatch(fiber)) { - warnIfUnhydratedTailNodes(fiber); - throwOnHydrationMismatch(); - } else { - while (nextInstance) { - warnUnhydratedInstance(fiber, nextInstance); - deleteHydratableInstance(fiber, nextInstance); - nextInstance = getNextHydratableSibling(nextInstance); - } - } + warnIfUnhydratedTailNodes(fiber); + throwOnHydrationMismatch(); } } @@ -22053,19 +21816,7 @@ if (__DEV__) { ) { // During the first pass, we'll bail out and not drill into the children. // Instead, we'll leave the content in place and try to hydrate it later. - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - { - error( - "Cannot hydrate Suspense in legacy mode. Switch from " + - "ReactDOM.hydrate(element, container) to " + - "ReactDOMClient.hydrateRoot(container, )" + - ".render(element) or remove the Suspense components from " + - "the server rendered components." - ); - } - - workInProgress.lanes = laneToLanes(SyncLane); - } else if (isSuspenseInstanceFallback(suspenseInstance)) { + if (isSuspenseInstanceFallback(suspenseInstance)) { // This is a client-only boundary. Since we won't get any content from the server // for this, we need to schedule that at a higher priority based on when it would // have timed out. In theory we could render it in this pass but it would have the @@ -22104,15 +21855,6 @@ if (__DEV__) { warnIfHydrating(); - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (isSuspenseInstanceFallback(suspenseInstance)) { // This boundary is in a permanent fallback state. In this case, we'll never // get an update and we'll never be able to hydrate the final content. Let's just try the @@ -36143,11 +35885,6 @@ if (__DEV__) { fiber.lanes = lanes; return fiber; } - function createFiberFromHostInstanceForDeletion() { - var fiber = createFiber(HostComponent, null, null, NoMode); - fiber.elementType = "DELETED"; - return fiber; - } function createFiberFromDehydratedFragment(dehydratedNode) { var fiber = createFiber(DehydratedFragment, null, null, NoMode); fiber.stateNode = dehydratedNode; @@ -36316,7 +36053,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-6d858044"; + var ReactVersion = "19.0.0-www-modern-c1b9cb5d"; function createPortal$1( children, @@ -41877,12 +41614,7 @@ if (__DEV__) { .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } - function checkForUnmatchedText( - serverText, - clientText, - isConcurrentMode, - shouldWarnDev - ) { + function checkForUnmatchedText(serverText, clientText, shouldWarnDev) { var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); @@ -41904,7 +41636,7 @@ if (__DEV__) { } } - if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) { + if (enableClientRenderFallbackOnTextMismatch) { // In concurrent roots, we throw when there's a text mismatch and revert to // client rendering, up to the nearest Suspense boundary. throw new Error("Text content does not match server-rendered HTML."); @@ -44655,7 +44387,6 @@ if (__DEV__) { domElement, tag, props, - isConcurrentMode, shouldWarnDev, hostContext ) { @@ -44786,12 +44517,11 @@ if (__DEV__) { checkForUnmatchedText( domElement.textContent, children, - isConcurrentMode, shouldWarnDev ); } - if (!isConcurrentMode || !enableClientRenderFallbackOnTextMismatch) { + if (!enableClientRenderFallbackOnTextMismatch) { // We really should be patching this in the commit phase but since // this only affects legacy mode hydration which is deprecated anyway // we can get away with it. @@ -44869,7 +44599,7 @@ if (__DEV__) { } } } - function diffHydratedText(textNode, text, isConcurrentMode) { + function diffHydratedText(textNode, text) { var isDifferent = textNode.nodeValue !== text; return isDifferent; } @@ -46095,19 +45825,8 @@ if (__DEV__) { precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events // get attached. - updateFiberProps(instance, props); // TODO: Temporary hack to check if we're in a concurrent root. We can delete - // when the legacy root API is removed. - - var isConcurrentMode = - (internalInstanceHandle.mode & ConcurrentMode) !== NoMode; - diffHydratedProperties( - instance, - type, - props, - isConcurrentMode, - shouldWarnDev, - hostContext - ); + updateFiberProps(instance, props); + diffHydratedProperties(instance, type, props, shouldWarnDev, hostContext); } function validateHydratableTextInstance(text, hostContext) { { @@ -46127,7 +45846,7 @@ if (__DEV__) { internalInstanceHandle, shouldWarnDev ) { - precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete + precacheFiberNode(internalInstanceHandle, textInstance); return diffHydratedText(textInstance, text); } function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) { @@ -46213,15 +45932,9 @@ if (__DEV__) { parentContainer, textInstance, text, - isConcurrentMode, shouldWarnDev ) { - checkForUnmatchedText( - textInstance.nodeValue, - text, - isConcurrentMode, - shouldWarnDev - ); + checkForUnmatchedText(textInstance.nodeValue, text, shouldWarnDev); } function didNotMatchHydratedTextInstance( parentType, @@ -46229,16 +45942,10 @@ if (__DEV__) { parentInstance, textInstance, text, - isConcurrentMode, shouldWarnDev ) { if (parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { - checkForUnmatchedText( - textInstance.nodeValue, - text, - isConcurrentMode, - shouldWarnDev - ); + checkForUnmatchedText(textInstance.nodeValue, text, shouldWarnDev); } } function didNotHydrateInstanceWithinContainer(parentContainer, instance) { @@ -46273,20 +45980,14 @@ if (__DEV__) { parentType, parentProps, parentInstance, - instance, - isConcurrentMode + instance ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - if (instance.nodeType === ELEMENT_NODE) { - warnForDeletedHydratableElement(parentInstance, instance); - } else if (instance.nodeType === COMMENT_NODE); - else { - warnForDeletedHydratableText(parentInstance, instance); - } + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentInstance, instance); + } else if (instance.nodeType === COMMENT_NODE); + else { + warnForDeletedHydratableText(parentInstance, instance); } } } @@ -46334,32 +46035,20 @@ if (__DEV__) { parentProps, parentInstance, type, - props, - isConcurrentMode + props ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - warnForInsertedHydratedElement(parentInstance, type); - } + warnForInsertedHydratedElement(parentInstance, type); } } function didNotFindHydratableTextInstance( parentType, parentProps, parentInstance, - text, - isConcurrentMode + text ) { { - if ( - isConcurrentMode || - parentProps[SUPPRESS_HYDRATION_WARNING] !== true - ) { - warnForInsertedHydratedText(parentInstance, text); - } + warnForInsertedHydratedText(parentInstance, text); } } function errorHydratingContainer(parentContainer) { diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 8e9522d602..f573509aa4 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -1792,85 +1792,6 @@ var hydrationParentFiber = null, isHydrating = !1, hydrationErrors = null, rootOrSingletonContext = !1; -function deleteHydratableInstance(returnFiber, instance) { - var fiber = createFiber(5, null, null, 0); - fiber.elementType = "DELETED"; - fiber.stateNode = instance; - fiber.return = returnFiber; - instance = returnFiber.deletions; - null === instance - ? ((returnFiber.deletions = [fiber]), (returnFiber.flags |= 16)) - : instance.push(fiber); -} -function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & -4097) | 2; -} -function tryHydrateInstance(fiber, nextInstance) { - nextInstance = canHydrateInstance( - nextInstance, - fiber.type, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = getNextHydratable(nextInstance.firstChild)), - (rootOrSingletonContext = !1), - !0) - : !1; -} -function tryHydrateText(fiber, nextInstance) { - nextInstance = canHydrateTextInstance( - nextInstance, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function tryHydrateSuspense(fiber, nextInstance) { - a: { - var instance = nextInstance; - for (nextInstance = rootOrSingletonContext; 8 !== instance.nodeType; ) { - if (!nextInstance) { - nextInstance = null; - break a; - } - instance = getNextHydratableSibling(instance); - if (null === instance) { - nextInstance = null; - break a; - } - } - nextInstance = instance; - } - return null !== nextInstance - ? ((instance = - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null), - (fiber.memoizedState = { - dehydrated: nextInstance, - treeContext: instance, - retryLane: 536870912 - }), - (instance = createFiber(18, null, null, 0)), - (instance.stateNode = nextInstance), - (instance.return = fiber), - (fiber.child = instance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function shouldClientRenderOnMismatch(fiber) { - return 0 !== (fiber.mode & 1) && 0 === (fiber.flags & 128); -} function throwOnHydrationMismatch() { throw Error(formatProdErrorMessage(418)); } @@ -1903,15 +1824,11 @@ function popHydrationState(fiber) { JSCompiler_temp = !JSCompiler_temp; } JSCompiler_temp && (shouldClear = !0); - if (shouldClear && (shouldClear = nextHydratableInstance)) - if (shouldClientRenderOnMismatch(fiber)) { - for (shouldClear = nextHydratableInstance; shouldClear; ) - shouldClear = getNextHydratableSibling(shouldClear); - throwOnHydrationMismatch(); - } else - for (; shouldClear; ) - deleteHydratableInstance(fiber, shouldClear), - (shouldClear = getNextHydratableSibling(shouldClear)); + if (shouldClear && nextHydratableInstance) { + for (shouldClear = nextHydratableInstance; shouldClear; ) + shouldClear = getNextHydratable(shouldClear.nextSibling); + throwOnHydrationMismatch(); + } popToNextHostParent(fiber); if (13 === fiber.tag) { fiber = fiber.memoizedState; @@ -1923,7 +1840,7 @@ function popHydrationState(fiber) { if (8 === fiber.nodeType) if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { if (0 === shouldClear) { - nextHydratableInstance = getNextHydratableSibling(fiber); + nextHydratableInstance = getNextHydratable(fiber.nextSibling); break a; } shouldClear--; @@ -1938,7 +1855,7 @@ function popHydrationState(fiber) { } } else nextHydratableInstance = hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) + ? getNextHydratable(fiber.stateNode.nextSibling) : null; return !0; } @@ -2053,39 +1970,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy || 0 === root$26.tag) { - var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes, + for (var root$25 = firstScheduledRoot; null !== root$25; ) { + if (!onlyLegacy || 0 === root$25.tag) { + var workInProgressRootRenderLanes$27 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$26, - root$26 === workInProgressRoot - ? workInProgressRootRenderLanes$28 + root$25, + root$25 === workInProgressRoot + ? workInProgressRootRenderLanes$27 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$28 = root$26; + workInProgressRootRenderLanes$27 = root$25; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$28.tag && + 0 !== workInProgressRootRenderLanes$27.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, originallyAttemptedLanes, errorRetryLanes ))); @@ -2093,39 +2010,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$28, 0), + prepareFreshStack(workInProgressRootRenderLanes$27, 0), markRootSuspended( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$28), + ensureRootIsScheduled(workInProgressRootRenderLanes$27), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$28.finishedWork = - workInProgressRootRenderLanes$28.current.alternate), - (workInProgressRootRenderLanes$28.finishedLanes = + : ((workInProgressRootRenderLanes$27.finishedWork = + workInProgressRootRenderLanes$27.current.alternate), + (workInProgressRootRenderLanes$27.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$28); + ensureRootIsScheduled(workInProgressRootRenderLanes$27); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$26 = root$26.next; + root$25 = root$25.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3732,7 +3649,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$53 = !1; + didReadFromEntangledAsyncAction$52 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3753,11 +3670,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$52 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$52 = !0); continue; } else (updateLane = { @@ -3803,7 +3720,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$53 && + didReadFromEntangledAsyncAction$52 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4038,8 +3955,8 @@ function mountFormState(action, initialStateProp) { JSCompiler_inline_result = null; break b; } - JSCompiler_inline_result = getNextHydratableSibling( - JSCompiler_inline_result + JSCompiler_inline_result = getNextHydratable( + JSCompiler_inline_result.nextSibling ); if (null === JSCompiler_inline_result) { JSCompiler_inline_result = null; @@ -4053,8 +3970,8 @@ function mountFormState(action, initialStateProp) { : null; } if (JSCompiler_inline_result) { - nextHydratableInstance = getNextHydratableSibling( - JSCompiler_inline_result + nextHydratableInstance = getNextHydratable( + JSCompiler_inline_result.nextSibling ); JSCompiler_inline_result = "F!" === JSCompiler_inline_result.data; break a; @@ -4394,14 +4311,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$63 = enqueueUpdate(provider, fiber, lane); - null !== root$63 && - (scheduleUpdateOnFiber(root$63, provider, lane), - entangleTransitions(root$63, provider, lane)); + var root$62 = enqueueUpdate(provider, fiber, lane); + null !== root$62 && + (scheduleUpdateOnFiber(root$62, provider, lane), + entangleTransitions(root$62, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$63 && + null !== root$62 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4642,15 +4559,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$56 = workInProgressRoot; - if (null === root$56) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$56, workInProgressRootRenderLanes) || + var root$55 = workInProgressRoot; + if (null === root$55) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$55, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$56 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$56; - mountEffect(subscribeToStore.bind(null, fiber, root$56, subscribe), [ + root$55 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$55; + mountEffect(subscribeToStore.bind(null, fiber, root$55, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4659,7 +4576,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$56, + root$55, getServerSnapshot, getSnapshot ), @@ -5373,10 +5290,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$73 = workInProgress.stateNode; + root$72 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$73.incompleteTransitions.has(transition)) { + if (!root$72.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5384,11 +5301,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$73.incompleteTransitions.set(transition, markerInstance); + root$72.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$73.incompleteTransitions.forEach(function (markerInstance) { + root$72.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6011,52 +5928,72 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var nextInstance = (didSuspend = nextHydratableInstance); - if (!nextInstance) - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend); - else if (!tryHydrateSuspense(workInProgress, nextInstance)) { - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(); - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - nextHydratableInstance && - tryHydrateSuspense(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevHydrationParentFiber, nextInstance) - : (insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), + var nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance)) { + c: { + JSCompiler_temp$jscomp$0 = nextInstance; + for ( + nextInstance = rootOrSingletonContext; + 8 !== JSCompiler_temp$jscomp$0.nodeType; + + ) { + if (!nextInstance) { + nextInstance = null; + break c; + } + JSCompiler_temp$jscomp$0 = getNextHydratable( + JSCompiler_temp$jscomp$0.nextSibling + ); + if (null === JSCompiler_temp$jscomp$0) { + nextInstance = null; + break c; + } + } + nextInstance = JSCompiler_temp$jscomp$0; + } + null !== nextInstance + ? ((workInProgress.memoizedState = { + dehydrated: nextInstance, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912 + }), + (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), + (JSCompiler_temp$jscomp$0.stateNode = nextInstance), + (JSCompiler_temp$jscomp$0.return = workInProgress), + (workInProgress.child = JSCompiler_temp$jscomp$0), (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend)); + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(); } - didSuspend = workInProgress.memoizedState; + nextInstance = workInProgress.memoizedState; if ( - null !== didSuspend && - ((didSuspend = didSuspend.dehydrated), null !== didSuspend) + null !== nextInstance && + ((nextInstance = nextInstance.dehydrated), null !== nextInstance) ) return ( - 0 === (workInProgress.mode & 1) - ? (workInProgress.lanes = 2) - : "$!" === didSuspend.data + "$!" === nextInstance.data ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - didSuspend = nextProps.children; - nextInstance = nextProps.fallback; + nextInstance = nextProps.children; + JSCompiler_temp$jscomp$0 = nextProps.fallback; if (showFallback) return ( reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -6091,8 +6028,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -6107,106 +6044,273 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - return mountSuspensePrimaryChildren(workInProgress, didSuspend); + return mountSuspensePrimaryChildren(workInProgress, nextInstance); } - nextInstance = current.memoizedState; + JSCompiler_temp$jscomp$0 = current.memoizedState; if ( - null !== nextInstance && - ((prevHydrationParentFiber = nextInstance.dehydrated), - null !== prevHydrationParentFiber) - ) - return updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - JSCompiler_temp, - nextProps, - prevHydrationParentFiber, - nextInstance, - renderLanes - ); - if (showFallback) { - reuseSuspenseHandlerOnStack(workInProgress); - showFallback = nextProps.fallback; - didSuspend = workInProgress.mode; - nextInstance = current.child; - prevHydrationParentFiber = nextInstance.sibling; - var primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (didSuspend & 1) && workInProgress.child !== nextInstance - ? ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(nextInstance, primaryChildProps)), - (nextProps.subtreeFlags = nextInstance.subtreeFlags & 31457280)); - null !== prevHydrationParentFiber - ? (showFallback = createWorkInProgress( - prevHydrationParentFiber, - showFallback - )) - : ((showFallback = createFiberFromFragment( - showFallback, - didSuspend, - renderLanes, - null - )), - (showFallback.flags |= 2)); - showFallback.return = workInProgress; - nextProps.return = workInProgress; - nextProps.sibling = showFallback; - workInProgress.child = nextProps; - nextProps = showFallback; - showFallback = workInProgress.child; - didSuspend = current.child.memoizedState; - null === didSuspend - ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) - : ((nextInstance = didSuspend.cachePool), - null !== nextInstance - ? ((prevHydrationParentFiber = CacheContext._currentValue), - (nextInstance = - nextInstance.parent !== prevHydrationParentFiber - ? { - parent: prevHydrationParentFiber, - pool: prevHydrationParentFiber - } - : nextInstance)) - : (nextInstance = getSuspendedCache()), - (didSuspend = { - baseLanes: didSuspend.baseLanes | renderLanes, - cachePool: nextInstance - })); - showFallback.memoizedState = didSuspend; - enableTransitionTracing && - ((didSuspend = enableTransitionTracing ? transitionStack.current : null), - null !== didSuspend && - ((nextInstance = enableTransitionTracing - ? markerInstanceStack.current - : null), - (prevHydrationParentFiber = showFallback.updateQueue), - (primaryChildProps = current.updateQueue), - null === prevHydrationParentFiber - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: null - }) - : prevHydrationParentFiber === primaryChildProps - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: - null !== primaryChildProps ? primaryChildProps.retryQueue : null - }) - : ((prevHydrationParentFiber.transitions = didSuspend), - (prevHydrationParentFiber.markerInstances = nextInstance)))); - showFallback.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return nextProps; + null !== JSCompiler_temp$jscomp$0 && + ((nextInstance = JSCompiler_temp$jscomp$0.dehydrated), + null !== nextInstance) + ) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (JSCompiler_temp = createCapturedValueFromError( + Error(formatProdErrorMessage(422)) + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (nextProps = createFiberFromOffscreen( + { mode: "visible", children: nextProps.children }, + nextInstance, + 0, + null + )), + (showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2), + (nextProps.return = workInProgress), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + 0 !== (workInProgress.mode & 1) && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (nextProps = workInProgress.child), + (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (nextProps.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = showFallback)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + "$!" === nextInstance.data) + ) { + JSCompiler_temp = + nextInstance.nextSibling && nextInstance.nextSibling.dataset; + if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; + JSCompiler_temp = digest; + nextProps = Error(formatProdErrorMessage(419)); + nextProps.digest = JSCompiler_temp; + JSCompiler_temp = createCapturedValueFromError( + nextProps, + JSCompiler_temp, + void 0 + ); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ); + } else if ( + (enableLazyContextPropagation && + !didReceiveUpdate && + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_temp) + ) { + JSCompiler_temp = workInProgressRoot; + if (null !== JSCompiler_temp) { + nextProps = renderLanes & -renderLanes; + if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) + nextProps = 1; + else + switch (nextProps) { + case 2: + nextProps = 1; + break; + case 8: + nextProps = 4; + break; + case 32: + nextProps = 16; + break; + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + nextProps = 64; + break; + case 268435456: + nextProps = 134217728; + break; + default: + nextProps = 0; + } + nextProps = + 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) + ? 0 + : nextProps; + if (0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane) + throw ( + ((JSCompiler_temp$jscomp$0.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); + } + "$?" === nextInstance.data || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + null + ); + } else + "$?" === nextInstance.data + ? ((workInProgress.flags |= 128), + (workInProgress.child = current.child), + (workInProgress = retryDehydratedSuspenseBoundary.bind( + null, + current + )), + (nextInstance._reactRetry = workInProgress), + (workInProgress = null)) + : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + (nextHydratableInstance = getNextHydratable( + nextInstance.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + ((idStack[idStackIndex++] = treeContextId), + (idStack[idStackIndex++] = treeContextOverflow), + (idStack[idStackIndex++] = treeContextProvider), + (treeContextId = renderLanes.id), + (treeContextOverflow = renderLanes.overflow), + (treeContextProvider = workInProgress)), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + nextProps.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; } + if (showFallback) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (JSCompiler_temp$jscomp$0 = current.child), + (digest = JSCompiler_temp$jscomp$0.sibling), + (didSuspend = { mode: "hidden", children: nextProps.children }), + 0 === (nextInstance & 1) && + workInProgress.child !== JSCompiler_temp$jscomp$0 + ? ((nextProps = workInProgress.child), + (nextProps.childLanes = 0), + (nextProps.pendingProps = didSuspend), + (workInProgress.deletions = null)) + : ((nextProps = createWorkInProgress( + JSCompiler_temp$jscomp$0, + didSuspend + )), + (nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)), + null !== digest + ? (showFallback = createWorkInProgress(digest, showFallback)) + : ((showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2)), + (showFallback.return = workInProgress), + (nextProps.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + (nextProps = showFallback), + (showFallback = workInProgress.child), + (nextInstance = current.child.memoizedState), + null === nextInstance + ? (nextInstance = mountSuspenseOffscreenState(renderLanes)) + : ((JSCompiler_temp$jscomp$0 = nextInstance.cachePool), + null !== JSCompiler_temp$jscomp$0 + ? ((digest = CacheContext._currentValue), + (JSCompiler_temp$jscomp$0 = + JSCompiler_temp$jscomp$0.parent !== digest + ? { parent: digest, pool: digest } + : JSCompiler_temp$jscomp$0)) + : (JSCompiler_temp$jscomp$0 = getSuspendedCache()), + (nextInstance = { + baseLanes: nextInstance.baseLanes | renderLanes, + cachePool: JSCompiler_temp$jscomp$0 + })), + (showFallback.memoizedState = nextInstance), + enableTransitionTracing && + ((nextInstance = enableTransitionTracing + ? transitionStack.current + : null), + null !== nextInstance && + ((JSCompiler_temp$jscomp$0 = enableTransitionTracing + ? markerInstanceStack.current + : null), + (digest = showFallback.updateQueue), + (didSuspend = current.updateQueue), + null === digest + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null + }) + : digest === didSuspend + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null !== didSuspend ? didSuspend.retryQueue : null + }) + : ((digest.transitions = nextInstance), + (digest.markerInstances = JSCompiler_temp$jscomp$0)))), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + nextProps + ); pushPrimaryTreeSuspenseHandler(workInProgress); JSCompiler_temp = current.child; current = JSCompiler_temp.sibling; @@ -6282,194 +6386,6 @@ function retrySuspenseComponentWithoutHydrating( workInProgress.memoizedState = null; return current; } -function updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - didPrimaryChildrenDefer, - nextProps, - suspenseInstance, - suspenseState, - renderLanes -) { - if (didSuspend) { - if (workInProgress.flags & 256) - return ( - pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (suspenseInstance = createCapturedValueFromError( - Error(formatProdErrorMessage(422)) - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ) - ); - if (null !== workInProgress.memoizedState) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - null - ); - reuseSuspenseHandlerOnStack(workInProgress); - suspenseInstance = nextProps.fallback; - suspenseState = workInProgress.mode; - nextProps = createFiberFromOffscreen( - { mode: "visible", children: nextProps.children }, - suspenseState, - 0, - null - ); - suspenseInstance = createFiberFromFragment( - suspenseInstance, - suspenseState, - renderLanes, - null - ); - suspenseInstance.flags |= 2; - nextProps.return = workInProgress; - suspenseInstance.return = workInProgress; - nextProps.sibling = suspenseInstance; - workInProgress.child = nextProps; - 0 !== (workInProgress.mode & 1) && - reconcileChildFibers(workInProgress, current.child, null, renderLanes); - suspenseState = workInProgress.child; - suspenseState.memoizedState = mountSuspenseOffscreenState(renderLanes); - suspenseState.childLanes = getRemainingWorkInPrimaryTree( - current, - didPrimaryChildrenDefer, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return suspenseInstance; - } - pushPrimaryTreeSuspenseHandler(workInProgress); - if (0 === (workInProgress.mode & 1)) - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - if ("$!" === suspenseInstance.data) { - suspenseInstance = - suspenseInstance.nextSibling && suspenseInstance.nextSibling.dataset; - if (suspenseInstance) var digest = suspenseInstance.dgst; - suspenseInstance = digest; - didPrimaryChildrenDefer = Error(formatProdErrorMessage(419)); - didPrimaryChildrenDefer.digest = suspenseInstance; - suspenseInstance = createCapturedValueFromError( - didPrimaryChildrenDefer, - suspenseInstance, - void 0 - ); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ); - } - enableLazyContextPropagation && - !didReceiveUpdate && - propagateParentContextChanges(current, workInProgress, renderLanes, !1); - didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes); - if (didReceiveUpdate || didPrimaryChildrenDefer) { - didPrimaryChildrenDefer = workInProgressRoot; - if (null !== didPrimaryChildrenDefer) { - nextProps = renderLanes & -renderLanes; - if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) - nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 64; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== suspenseState.retryLane) - throw ( - ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) - ); - } - "$?" !== suspenseInstance.data && renderDidSuspendDelayIfPossible(); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if ("$?" === suspenseInstance.data) - return ( - (workInProgress.flags |= 128), - (workInProgress.child = current.child), - (workInProgress = retryDehydratedSuspenseBoundary.bind(null, current)), - (suspenseInstance._reactRetry = workInProgress), - null - ); - current = suspenseState.treeContext; - nextHydratableInstance = getNextHydratable(suspenseInstance.nextSibling); - hydrationParentFiber = workInProgress; - isHydrating = !0; - hydrationErrors = null; - rootOrSingletonContext = !1; - null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)); - workInProgress = mountSuspensePrimaryChildren( - workInProgress, - nextProps.children - ); - workInProgress.flags |= 4096; - return workInProgress; -} function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; @@ -7011,92 +6927,74 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 5: - return ( - null === current && - isHydrating && - (((context = Component = nextHydratableInstance), context) - ? tryHydrateInstance(workInProgress, context) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(context)), - (prevState = hydrationParentFiber), - nextHydratableInstance && - tryHydrateInstance(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevState, context) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))), - pushHostContext(workInProgress), - (context = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (Component = prevState.children), - shouldSetTextContent(context, prevState) - ? (Component = null) - : null !== nextState && - shouldSetTextContent(context, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((context = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes + if (null === current && isHydrating) { + if ((context = Component = nextHydratableInstance)) + (Component = canHydrateInstance( + Component, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext )), - (HostTransitionContext._currentValue = context), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== context && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), - workInProgress.child - ); + null !== Component + ? ((workInProgress.stateNode = Component), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + Component.firstChild + )), + (rootOrSingletonContext = !1), + (context = !0)) + : (context = !1); + context || throwOnHydrationMismatch(); + } + pushHostContext(workInProgress); + context = workInProgress.type; + prevState = workInProgress.pendingProps; + nextState = null !== current ? current.memoizedProps : null; + Component = prevState.children; + shouldSetTextContent(context, prevState) + ? (Component = null) + : null !== nextState && + shouldSetTextContent(context, nextState) && + (workInProgress.flags |= 32); + null !== workInProgress.memoizedState && + ((context = renderWithHooks( + current, + workInProgress, + TransitionAwareHostComponent, + null, + null, + renderLanes + )), + (HostTransitionContext._currentValue = context), + enableLazyContextPropagation || + (didReceiveUpdate && + null !== current && + current.memoizedState.memoizedState !== context && + propagateContextChange( + workInProgress, + HostTransitionContext, + renderLanes + ))); + markRef(current, workInProgress); + reconcileChildren(current, workInProgress, Component, renderLanes); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - (((current = renderLanes = nextHydratableInstance), current) - ? tryHydrateText(workInProgress, current) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(current)), - (Component = hydrationParentFiber), - nextHydratableInstance && - tryHydrateText(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(Component, current) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))), - null - ); + if (null === current && isHydrating) { + if ((current = renderLanes = nextHydratableInstance)) + (renderLanes = canHydrateTextInstance( + renderLanes, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== renderLanes + ? ((workInProgress.stateNode = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (current = !0)) + : (current = !1); + current || throwOnHydrationMismatch(); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: @@ -7847,14 +7745,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$112 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$112 = lastTailNode), + for (var lastTailNode$111 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$111 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$112 + null === lastTailNode$111 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$112.sibling = null); + : (lastTailNode$111.sibling = null); } } function bubbleProperties(completedWork) { @@ -7864,19 +7762,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$113 = completedWork.child; null !== child$113; ) - (newChildLanes |= child$113.lanes | child$113.childLanes), - (subtreeFlags |= child$113.subtreeFlags & 31457280), - (subtreeFlags |= child$113.flags & 31457280), - (child$113.return = completedWork), - (child$113 = child$113.sibling); + for (var child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags & 31457280), + (subtreeFlags |= child$112.flags & 31457280), + (child$112.return = completedWork), + (child$112 = child$112.sibling); else - for (child$113 = completedWork.child; null !== child$113; ) - (newChildLanes |= child$113.lanes | child$113.childLanes), - (subtreeFlags |= child$113.subtreeFlags), - (subtreeFlags |= child$113.flags), - (child$113.return = completedWork), - (child$113 = child$113.sibling); + for (child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags), + (subtreeFlags |= child$112.flags), + (child$112.return = completedWork), + (child$112 = child$112.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8139,33 +8037,20 @@ function completeWork(current, workInProgress, renderLanes) { ) switch (currentResource.tag) { case 3: - currentResource = 0 !== (currentResource.mode & 1); - checkForUnmatchedText( - current.nodeValue, - renderLanes, - currentResource - ); - if ( - currentResource && - enableClientRenderFallbackOnTextMismatch - ) { + checkForUnmatchedText(current.nodeValue, renderLanes); + if (enableClientRenderFallbackOnTextMismatch) { current = !1; break a; } break; case 27: case 5: - var isConcurrentMode$24 = 0 !== (currentResource.mode & 1); - !0 !== - currentResource.memoizedProps.suppressHydrationWarning && - checkForUnmatchedText( - current.nodeValue, - renderLanes, - isConcurrentMode$24 - ); if ( - isConcurrentMode$24 && - enableClientRenderFallbackOnTextMismatch + (!0 !== + currentResource.memoizedProps + .suppressHydrationWarning && + checkForUnmatchedText(current.nodeValue, renderLanes), + enableClientRenderFallbackOnTextMismatch) ) { current = !1; break a; @@ -8223,18 +8108,19 @@ function completeWork(current, workInProgress, renderLanes) { return (workInProgress.lanes = renderLanes), workInProgress; renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - renderLanes && - ((newProps = workInProgress.child), - (currentResource = null), + if (renderLanes) { + newProps = workInProgress.child; + currentResource = null; null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && - (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$24 = null), + (currentResource = newProps.alternate.memoizedState.cachePool.pool); + var cache$124 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$24 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$24 !== currentResource && (newProps.flags |= 2048)); + (cache$124 = newProps.memoizedState.cachePool.pool); + cache$124 !== currentResource && (newProps.flags |= 2048); + } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -8274,8 +8160,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$24 = currentResource.rendering; - if (null === isConcurrentMode$24) + cache$124 = currentResource.rendering; + if (null === cache$124) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8283,11 +8169,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$24 = findFirstSuspended(current); - if (null !== isConcurrentMode$24) { + cache$124 = findFirstSuspended(current); + if (null !== cache$124) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$24.updateQueue; + current = cache$124.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8312,10 +8198,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if ( - ((current = findFirstSuspended(isConcurrentMode$24)), - null !== current) - ) { + if (((current = findFirstSuspended(cache$124)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8325,7 +8208,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$24.alternate && + !cache$124.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8338,13 +8221,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$24.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$24)) + ? ((cache$124.sibling = workInProgress.child), + (workInProgress.child = cache$124)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$24) - : (workInProgress.child = isConcurrentMode$24), - (currentResource.last = isConcurrentMode$24)); + ? (current.sibling = cache$124) + : (workInProgress.child = cache$124), + (currentResource.last = cache$124)); } if (null !== currentResource.tail) return ( @@ -8609,8 +8492,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$143) { - captureCommitPhaseError(current, nearestMountedAncestor, error$143); + } catch (error$142) { + captureCommitPhaseError(current, nearestMountedAncestor, error$142); } else ref.current = null; } @@ -8647,7 +8530,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$194) { + } catch (e$193) { JSCompiler_temp = null; break a; } @@ -8913,11 +8796,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$145) { + } catch (error$144) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$145 + error$144 ); } } @@ -9597,8 +9480,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$158) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$158); + } catch (error$157) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$157); } } break; @@ -9770,11 +9653,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$159) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$158 ); } } @@ -9812,8 +9695,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$160) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$160); + } catch (error$159) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$159); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9824,8 +9707,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$162) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$162); } } break; @@ -9839,8 +9722,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$164) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$164); + } catch (error$163) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$163); } } break; @@ -9854,8 +9737,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } break; case 4: @@ -9885,8 +9768,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$167) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$167); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } current = finishedWork.updateQueue; null !== current && @@ -9964,11 +9847,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$148) { + } catch (error$147) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$148 + error$147 ); } } else if ( @@ -10043,21 +9926,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$149 = JSCompiler_inline_result.stateNode; + var parent$148 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$149, ""), + (setTextContent(parent$148, ""), (JSCompiler_inline_result.flags &= -33)); - var before$150 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$150, parent$149); + var before$149 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$149, parent$148); break; case 3: case 4: - var parent$151 = JSCompiler_inline_result.stateNode.containerInfo, - before$152 = getHostSibling(finishedWork); + var parent$150 = JSCompiler_inline_result.stateNode.containerInfo, + before$151 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$152, - parent$151 + before$151, + parent$150 ); break; default: @@ -10527,9 +10410,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$174 = finishedWork.stateNode; + var instance$173 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$174._visibility & 4 + ? instance$173._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10542,7 +10425,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$174._visibility |= 4), + : ((instance$173._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10550,7 +10433,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$174._visibility |= 4), + : ((instance$173._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10563,7 +10446,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$174 + instance$173 ); break; case 24: @@ -11693,8 +11576,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$182) { + handleThrow(root, thrownValue$182); } while (1); lanes && root.shellSuspendCounter++; @@ -11799,8 +11682,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$185) { - handleThrow(root, thrownValue$185); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); resetContextDependencies(); @@ -12023,12 +11906,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$189 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$188 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$189 && + shouldFireAfterActiveInstanceBlur$188 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12109,7 +11992,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$190 = rootWithPendingPassiveEffects, + var root$189 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -12125,7 +12008,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$190, remainingLanes); + releaseRootPooledCache(root$189, remainingLanes); } } return !1; @@ -12824,12 +12707,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$192 = fiber.stateNode; - if (root$192.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$192.pendingLanes); + var root$191 = fiber.stateNode; + if (root$191.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$191.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$192, lanes), - ensureRootIsScheduled(root$192), + (upgradePendingLanesToSync(root$191, lanes), + ensureRootIsScheduled(root$191), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13395,19 +13278,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$352; + var JSCompiler_inline_result$jscomp$347; if (canUseDOM) { - var isSupported$jscomp$inline_1577 = "oninput" in document; - if (!isSupported$jscomp$inline_1577) { - var element$jscomp$inline_1578 = document.createElement("div"); - element$jscomp$inline_1578.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1577 = - "function" === typeof element$jscomp$inline_1578.oninput; + var isSupported$jscomp$inline_1542 = "oninput" in document; + if (!isSupported$jscomp$inline_1542) { + var element$jscomp$inline_1543 = document.createElement("div"); + element$jscomp$inline_1543.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1542 = + "function" === typeof element$jscomp$inline_1543.oninput; } - JSCompiler_inline_result$jscomp$352 = isSupported$jscomp$inline_1577; - } else JSCompiler_inline_result$jscomp$352 = !1; + JSCompiler_inline_result$jscomp$347 = isSupported$jscomp$inline_1542; + } else JSCompiler_inline_result$jscomp$347 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$352 && + JSCompiler_inline_result$jscomp$347 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13779,20 +13662,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1618 = 0; - i$jscomp$inline_1618 < simpleEventPluginEvents.length; - i$jscomp$inline_1618++ + var i$jscomp$inline_1583 = 0; + i$jscomp$inline_1583 < simpleEventPluginEvents.length; + i$jscomp$inline_1583++ ) { - var eventName$jscomp$inline_1619 = - simpleEventPluginEvents[i$jscomp$inline_1618], - domEventName$jscomp$inline_1620 = - eventName$jscomp$inline_1619.toLowerCase(), - capitalizedEvent$jscomp$inline_1621 = - eventName$jscomp$inline_1619[0].toUpperCase() + - eventName$jscomp$inline_1619.slice(1); + var eventName$jscomp$inline_1584 = + simpleEventPluginEvents[i$jscomp$inline_1583], + domEventName$jscomp$inline_1585 = + eventName$jscomp$inline_1584.toLowerCase(), + capitalizedEvent$jscomp$inline_1586 = + eventName$jscomp$inline_1584[0].toUpperCase() + + eventName$jscomp$inline_1584.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1620, - "on" + capitalizedEvent$jscomp$inline_1621 + domEventName$jscomp$inline_1585, + "on" + capitalizedEvent$jscomp$inline_1586 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14638,11 +14521,10 @@ function normalizeMarkupForTextOrAttribute(markup) { .replace(NORMALIZE_NEWLINES_REGEX, "\n") .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } -function checkForUnmatchedText(serverText, clientText, isConcurrentMode) { +function checkForUnmatchedText(serverText, clientText) { clientText = normalizeMarkupForTextOrAttribute(clientText); if ( normalizeMarkupForTextOrAttribute(serverText) !== clientText && - isConcurrentMode && enableClientRenderFallbackOnTextMismatch ) throw Error(formatProdErrorMessage(425)); @@ -15280,14 +15162,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$221 in nextProps) { - var propKey = nextProps[propKey$221]; - lastProp = lastProps[propKey$221]; + for (var propKey$220 in nextProps) { + var propKey = nextProps[propKey$220]; + lastProp = lastProps[propKey$220]; if ( - nextProps.hasOwnProperty(propKey$221) && + nextProps.hasOwnProperty(propKey$220) && (null != propKey || null != lastProp) ) - switch (propKey$221) { + switch (propKey$220) { case "type": type = propKey; break; @@ -15316,7 +15198,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$221, + propKey$220, propKey, nextProps, lastProp @@ -15335,7 +15217,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$221 = null; + propKey = value = defaultValue = propKey$220 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15366,7 +15248,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$221 = type; + propKey$220 = type; break; case "defaultValue": defaultValue = type; @@ -15387,15 +15269,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$221 - ? updateOptions(domElement, !!lastProps, propKey$221, !1) + null != propKey$220 + ? updateOptions(domElement, !!lastProps, propKey$220, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$221 = null; + propKey = propKey$220 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15419,7 +15301,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$221 = name; + propKey$220 = name; break; case "defaultValue": propKey = name; @@ -15433,17 +15315,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$221, propKey); + updateTextarea(domElement, propKey$220, propKey); return; case "option": - for (var propKey$237 in lastProps) + for (var propKey$236 in lastProps) if ( - ((propKey$221 = lastProps[propKey$237]), - lastProps.hasOwnProperty(propKey$237) && - null != propKey$221 && - !nextProps.hasOwnProperty(propKey$237)) + ((propKey$220 = lastProps[propKey$236]), + lastProps.hasOwnProperty(propKey$236) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$236)) ) - switch (propKey$237) { + switch (propKey$236) { case "selected": domElement.selected = !1; break; @@ -15451,33 +15333,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$237, + propKey$236, null, nextProps, - propKey$221 + propKey$220 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$221 = nextProps[lastDefaultValue]), + ((propKey$220 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$221 !== propKey && - (null != propKey$221 || null != propKey)) + propKey$220 !== propKey && + (null != propKey$220 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$221 && - "function" !== typeof propKey$221 && - "symbol" !== typeof propKey$221; + propKey$220 && + "function" !== typeof propKey$220 && + "symbol" !== typeof propKey$220; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$221, + propKey$220, nextProps, propKey ); @@ -15498,24 +15380,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$242 in lastProps) - (propKey$221 = lastProps[propKey$242]), - lastProps.hasOwnProperty(propKey$242) && - null != propKey$221 && - !nextProps.hasOwnProperty(propKey$242) && - setProp(domElement, tag, propKey$242, null, nextProps, propKey$221); + for (var propKey$241 in lastProps) + (propKey$220 = lastProps[propKey$241]), + lastProps.hasOwnProperty(propKey$241) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$241) && + setProp(domElement, tag, propKey$241, null, nextProps, propKey$220); for (checked in nextProps) if ( - ((propKey$221 = nextProps[checked]), + ((propKey$220 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$221 !== propKey && - (null != propKey$221 || null != propKey)) + propKey$220 !== propKey && + (null != propKey$220 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$221) + if (null != propKey$220) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15523,7 +15405,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$221, + propKey$220, nextProps, propKey ); @@ -15531,49 +15413,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$247 in lastProps) - (propKey$221 = lastProps[propKey$247]), - lastProps.hasOwnProperty(propKey$247) && - null != propKey$221 && - !nextProps.hasOwnProperty(propKey$247) && + for (var propKey$246 in lastProps) + (propKey$220 = lastProps[propKey$246]), + lastProps.hasOwnProperty(propKey$246) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$246) && setPropOnCustomElement( domElement, tag, - propKey$247, + propKey$246, null, nextProps, - propKey$221 + propKey$220 ); for (defaultChecked in nextProps) - (propKey$221 = nextProps[defaultChecked]), + (propKey$220 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$221 === propKey || - (null == propKey$221 && null == propKey) || + propKey$220 === propKey || + (null == propKey$220 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$221, + propKey$220, nextProps, propKey ); return; } } - for (var propKey$252 in lastProps) - (propKey$221 = lastProps[propKey$252]), - lastProps.hasOwnProperty(propKey$252) && - null != propKey$221 && - !nextProps.hasOwnProperty(propKey$252) && - setProp(domElement, tag, propKey$252, null, nextProps, propKey$221); + for (var propKey$251 in lastProps) + (propKey$220 = lastProps[propKey$251]), + lastProps.hasOwnProperty(propKey$251) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$251) && + setProp(domElement, tag, propKey$251, null, nextProps, propKey$220); for (lastProp in nextProps) - (propKey$221 = nextProps[lastProp]), + (propKey$220 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$221 === propKey || - (null == propKey$221 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$221, nextProps, propKey); + propKey$220 === propKey || + (null == propKey$220 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$220, nextProps, propKey); } function noop$1() {} var Internals = { @@ -15804,7 +15686,7 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) { default: return instance; } - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) break; } return null; @@ -15819,7 +15701,7 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { !inRootOrSingleton ) return null; - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) return null; } return instance; @@ -15843,9 +15725,6 @@ function getNextHydratable(node) { } return node; } -function getNextHydratableSibling(instance) { - return getNextHydratable(instance.nextSibling); -} function hydrateInstance( instance, type, @@ -15855,7 +15734,6 @@ function hydrateInstance( ) { instance[internalInstanceKey] = internalInstanceHandle; instance[internalPropsKey] = props; - hostContext = 0 !== (internalInstanceHandle.mode & 1); switch (type) { case "dialog": listenToNonDelegatedEvent("cancel", instance); @@ -15868,15 +15746,8 @@ function hydrateInstance( break; case "video": case "audio": - for ( - internalInstanceHandle = 0; - internalInstanceHandle < mediaEventTypes.length; - internalInstanceHandle++ - ) - listenToNonDelegatedEvent( - mediaEventTypes[internalInstanceHandle], - instance - ); + for (hostContext = 0; hostContext < mediaEventTypes.length; hostContext++) + listenToNonDelegatedEvent(mediaEventTypes[hostContext], instance); break; case "source": listenToNonDelegatedEvent("error", instance); @@ -15912,20 +15783,16 @@ function hydrateInstance( initTextarea(instance, props.value, props.defaultValue, props.children), track(instance); } - internalInstanceHandle = props.children; - ("string" === typeof internalInstanceHandle || - "number" === typeof internalInstanceHandle || - (enableBigIntSupport && "bigint" === typeof internalInstanceHandle)) && - instance.textContent !== "" + internalInstanceHandle && + hostContext = props.children; + ("string" === typeof hostContext || + "number" === typeof hostContext || + (enableBigIntSupport && "bigint" === typeof hostContext)) && + instance.textContent !== "" + hostContext && (!0 !== props.suppressHydrationWarning && - checkForUnmatchedText( - instance.textContent, - internalInstanceHandle, - hostContext - ), - (hostContext && enableClientRenderFallbackOnTextMismatch) || + checkForUnmatchedText(instance.textContent, hostContext), + enableClientRenderFallbackOnTextMismatch || "body" === type || - (instance.textContent = internalInstanceHandle)); + (instance.textContent = hostContext)); null != props.onScroll && listenToNonDelegatedEvent("scroll", instance); null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", instance); null != props.onClick && (instance.onclick = noop$2); @@ -16305,17 +16172,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$260 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$261 = styles$260.get(type); - resource$261 || + var styles$259 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$260 = styles$259.get(type); + resource$260 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$261 = { + (resource$260 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$260.set(type, resource$261), + styles$259.set(type, resource$260), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16330,9 +16197,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$261.state + resource$260.state )); - return resource$261; + return resource$260; } return null; case "script": @@ -16415,37 +16282,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$265 = hoistableRoot.querySelector( + var instance$264 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$265) + if (instance$264) return ( (resource.state.loading |= 4), - (resource.instance = instance$265), - markNodeAsHoistable(instance$265), - instance$265 + (resource.instance = instance$264), + markNodeAsHoistable(instance$264), + instance$264 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$265 = ( + instance$264 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$265); - var linkInstance = instance$265; + markNodeAsHoistable(instance$264); + var linkInstance = instance$264; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$265, "link", instance); + setInitialProperties(instance$264, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$265, props.precedence, hoistableRoot); - return (resource.instance = instance$265); + insertStylesheet(instance$264, props.precedence, hoistableRoot); + return (resource.instance = instance$264); case "script": - instance$265 = getScriptKey(props.src); + instance$264 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$265) + getScriptSelectorFromKey(instance$264) )) ) return ( @@ -16454,7 +16321,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$265))) + if ((styleProps = preloadPropsMap.get(instance$264))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17459,11 +17326,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$286); + var instance = getPublicRootInstance(root$285); originalCallback.call(instance); }; } - var root$286 = createHydrationContainer( + var root$285 = createHydrationContainer( initialChildren, callback, container, @@ -17476,23 +17343,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$286; - container[internalContainerInstanceKey] = root$286.current; + container._reactRootContainer = root$285; + container[internalContainerInstanceKey] = root$285.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$286; + return root$285; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$287 = callback; + var originalCallback$286 = callback; callback = function () { - var instance = getPublicRootInstance(root$288); - originalCallback$287.call(instance); + var instance = getPublicRootInstance(root$287); + originalCallback$286.call(instance); }; } - var root$288 = createFiberRoot( + var root$287 = createFiberRoot( container, 0, !1, @@ -17505,15 +17372,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$288; - container[internalContainerInstanceKey] = root$288.current; + container._reactRootContainer = root$287; + container[internalContainerInstanceKey] = root$287.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$288, parentComponent, callback); + updateContainer(initialChildren, root$287, parentComponent, callback); }); - return root$288; + return root$287; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17578,17 +17445,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1821 = { +var devToolsConfig$jscomp$inline_1784 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-506df81f", + version: "19.0.0-www-classic-68fab760", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2187 = { - bundleType: devToolsConfig$jscomp$inline_1821.bundleType, - version: devToolsConfig$jscomp$inline_1821.version, - rendererPackageName: devToolsConfig$jscomp$inline_1821.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1821.rendererConfig, +var internals$jscomp$inline_2184 = { + bundleType: devToolsConfig$jscomp$inline_1784.bundleType, + version: devToolsConfig$jscomp$inline_1784.version, + rendererPackageName: devToolsConfig$jscomp$inline_1784.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1784.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17604,26 +17471,26 @@ var internals$jscomp$inline_2187 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1821.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1784.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-506df81f" + reconcilerVersion: "19.0.0-www-classic-68fab760" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2188 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2185 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2188.isDisabled && - hook$jscomp$inline_2188.supportsFiber + !hook$jscomp$inline_2185.isDisabled && + hook$jscomp$inline_2185.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2188.inject( - internals$jscomp$inline_2187 + (rendererID = hook$jscomp$inline_2185.inject( + internals$jscomp$inline_2184 )), - (injectedHook = hook$jscomp$inline_2188); + (injectedHook = hook$jscomp$inline_2185); } catch (err) {} } assign(Internals, { @@ -17828,17 +17695,6 @@ exports.getFindAllNodesFailureDescription = function (hostRoot, selectors) { } return null; }; -exports.hydrate = function (element, container, callback) { - if (!isValidContainerLegacy(container)) - throw Error(formatProdErrorMessage(299)); - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - !0, - callback - ); -}; exports.hydrateRoot = function (container, children, options) { if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299)); var isStrictMode = !1, @@ -18093,4 +17949,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-506df81f"; +exports.version = "19.0.0-www-classic-68fab760"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 89200fe715..8b8867817d 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -1747,85 +1747,6 @@ var hydrationParentFiber = null, isHydrating = !1, hydrationErrors = null, rootOrSingletonContext = !1; -function deleteHydratableInstance(returnFiber, instance) { - var fiber = createFiber(5, null, null, 0); - fiber.elementType = "DELETED"; - fiber.stateNode = instance; - fiber.return = returnFiber; - instance = returnFiber.deletions; - null === instance - ? ((returnFiber.deletions = [fiber]), (returnFiber.flags |= 16)) - : instance.push(fiber); -} -function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = (fiber.flags & -4097) | 2; -} -function tryHydrateInstance(fiber, nextInstance) { - nextInstance = canHydrateInstance( - nextInstance, - fiber.type, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = getNextHydratable(nextInstance.firstChild)), - (rootOrSingletonContext = !1), - !0) - : !1; -} -function tryHydrateText(fiber, nextInstance) { - nextInstance = canHydrateTextInstance( - nextInstance, - fiber.pendingProps, - rootOrSingletonContext - ); - return null !== nextInstance - ? ((fiber.stateNode = nextInstance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function tryHydrateSuspense(fiber, nextInstance) { - a: { - var instance = nextInstance; - for (nextInstance = rootOrSingletonContext; 8 !== instance.nodeType; ) { - if (!nextInstance) { - nextInstance = null; - break a; - } - instance = getNextHydratableSibling(instance); - if (null === instance) { - nextInstance = null; - break a; - } - } - nextInstance = instance; - } - return null !== nextInstance - ? ((instance = - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null), - (fiber.memoizedState = { - dehydrated: nextInstance, - treeContext: instance, - retryLane: 536870912 - }), - (instance = createFiber(18, null, null, 0)), - (instance.stateNode = nextInstance), - (instance.return = fiber), - (fiber.child = instance), - (hydrationParentFiber = fiber), - (nextHydratableInstance = null), - !0) - : !1; -} -function shouldClientRenderOnMismatch(fiber) { - return 0 !== (fiber.mode & 1) && 0 === (fiber.flags & 128); -} function throwOnHydrationMismatch() { throw Error(formatProdErrorMessage(418)); } @@ -1858,15 +1779,11 @@ function popHydrationState(fiber) { JSCompiler_temp = !JSCompiler_temp; } JSCompiler_temp && (shouldClear = !0); - if (shouldClear && (shouldClear = nextHydratableInstance)) - if (shouldClientRenderOnMismatch(fiber)) { - for (shouldClear = nextHydratableInstance; shouldClear; ) - shouldClear = getNextHydratableSibling(shouldClear); - throwOnHydrationMismatch(); - } else - for (; shouldClear; ) - deleteHydratableInstance(fiber, shouldClear), - (shouldClear = getNextHydratableSibling(shouldClear)); + if (shouldClear && nextHydratableInstance) { + for (shouldClear = nextHydratableInstance; shouldClear; ) + shouldClear = getNextHydratable(shouldClear.nextSibling); + throwOnHydrationMismatch(); + } popToNextHostParent(fiber); if (13 === fiber.tag) { fiber = fiber.memoizedState; @@ -1878,7 +1795,7 @@ function popHydrationState(fiber) { if (8 === fiber.nodeType) if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { if (0 === shouldClear) { - nextHydratableInstance = getNextHydratableSibling(fiber); + nextHydratableInstance = getNextHydratable(fiber.nextSibling); break a; } shouldClear--; @@ -1893,7 +1810,7 @@ function popHydrationState(fiber) { } } else nextHydratableInstance = hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) + ? getNextHydratable(fiber.stateNode.nextSibling) : null; return !0; } @@ -2008,39 +1925,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy || 0 === root$26.tag) { - var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes, + for (var root$25 = firstScheduledRoot; null !== root$25; ) { + if (!onlyLegacy || 0 === root$25.tag) { + var workInProgressRootRenderLanes$27 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$26, - root$26 === workInProgressRoot - ? workInProgressRootRenderLanes$28 + root$25, + root$25 === workInProgressRoot + ? workInProgressRootRenderLanes$27 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$28 = root$26; + workInProgressRootRenderLanes$27 = root$25; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$28.tag && + 0 !== workInProgressRootRenderLanes$27.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, originallyAttemptedLanes, errorRetryLanes ))); @@ -2048,39 +1965,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$28, 0), + prepareFreshStack(workInProgressRootRenderLanes$27, 0), markRootSuspended( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$28), + ensureRootIsScheduled(workInProgressRootRenderLanes$27), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$28.finishedWork = - workInProgressRootRenderLanes$28.current.alternate), - (workInProgressRootRenderLanes$28.finishedLanes = + : ((workInProgressRootRenderLanes$27.finishedWork = + workInProgressRootRenderLanes$27.current.alternate), + (workInProgressRootRenderLanes$27.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$28, + workInProgressRootRenderLanes$27, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$28); + ensureRootIsScheduled(workInProgressRootRenderLanes$27); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$26 = root$26.next; + root$25 = root$25.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3687,7 +3604,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$53 = !1; + didReadFromEntangledAsyncAction$52 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3708,11 +3625,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$52 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$52 = !0); continue; } else (updateLane = { @@ -3758,7 +3675,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$53 && + didReadFromEntangledAsyncAction$52 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -3993,8 +3910,8 @@ function mountFormState(action, initialStateProp) { JSCompiler_inline_result = null; break b; } - JSCompiler_inline_result = getNextHydratableSibling( - JSCompiler_inline_result + JSCompiler_inline_result = getNextHydratable( + JSCompiler_inline_result.nextSibling ); if (null === JSCompiler_inline_result) { JSCompiler_inline_result = null; @@ -4008,8 +3925,8 @@ function mountFormState(action, initialStateProp) { : null; } if (JSCompiler_inline_result) { - nextHydratableInstance = getNextHydratableSibling( - JSCompiler_inline_result + nextHydratableInstance = getNextHydratable( + JSCompiler_inline_result.nextSibling ); JSCompiler_inline_result = "F!" === JSCompiler_inline_result.data; break a; @@ -4349,14 +4266,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$63 = enqueueUpdate(provider, fiber, lane); - null !== root$63 && - (scheduleUpdateOnFiber(root$63, provider, lane), - entangleTransitions(root$63, provider, lane)); + var root$62 = enqueueUpdate(provider, fiber, lane); + null !== root$62 && + (scheduleUpdateOnFiber(root$62, provider, lane), + entangleTransitions(root$62, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$63 && + null !== root$62 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4597,15 +4514,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$56 = workInProgressRoot; - if (null === root$56) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$56, workInProgressRootRenderLanes) || + var root$55 = workInProgressRoot; + if (null === root$55) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$55, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$56 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$56; - mountEffect(subscribeToStore.bind(null, fiber, root$56, subscribe), [ + root$55 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$55; + mountEffect(subscribeToStore.bind(null, fiber, root$55, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4614,7 +4531,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$56, + root$55, getServerSnapshot, getSnapshot ), @@ -5313,10 +5230,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$73 = workInProgress.stateNode; + root$72 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$73.incompleteTransitions.has(transition)) { + if (!root$72.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5324,11 +5241,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$73.incompleteTransitions.set(transition, markerInstance); + root$72.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$73.incompleteTransitions.forEach(function (markerInstance) { + root$72.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5919,52 +5836,72 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var nextInstance = (didSuspend = nextHydratableInstance); - if (!nextInstance) - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend); - else if (!tryHydrateSuspense(workInProgress, nextInstance)) { - shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(); - nextHydratableInstance = getNextHydratableSibling(nextInstance); - var prevHydrationParentFiber = hydrationParentFiber; - nextHydratableInstance && - tryHydrateSuspense(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevHydrationParentFiber, nextInstance) - : (insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), + var nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance)) { + c: { + JSCompiler_temp$jscomp$0 = nextInstance; + for ( + nextInstance = rootOrSingletonContext; + 8 !== JSCompiler_temp$jscomp$0.nodeType; + + ) { + if (!nextInstance) { + nextInstance = null; + break c; + } + JSCompiler_temp$jscomp$0 = getNextHydratable( + JSCompiler_temp$jscomp$0.nextSibling + ); + if (null === JSCompiler_temp$jscomp$0) { + nextInstance = null; + break c; + } + } + nextInstance = JSCompiler_temp$jscomp$0; + } + null !== nextInstance + ? ((workInProgress.memoizedState = { + dehydrated: nextInstance, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912 + }), + (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), + (JSCompiler_temp$jscomp$0.stateNode = nextInstance), + (JSCompiler_temp$jscomp$0.return = workInProgress), + (workInProgress.child = JSCompiler_temp$jscomp$0), (hydrationParentFiber = workInProgress), - (nextHydratableInstance = didSuspend)); + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(); } - didSuspend = workInProgress.memoizedState; + nextInstance = workInProgress.memoizedState; if ( - null !== didSuspend && - ((didSuspend = didSuspend.dehydrated), null !== didSuspend) + null !== nextInstance && + ((nextInstance = nextInstance.dehydrated), null !== nextInstance) ) return ( - 0 === (workInProgress.mode & 1) - ? (workInProgress.lanes = 2) - : "$!" === didSuspend.data + "$!" === nextInstance.data ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - didSuspend = nextProps.children; - nextInstance = nextProps.fallback; + nextInstance = nextProps.children; + JSCompiler_temp$jscomp$0 = nextProps.fallback; if (showFallback) return ( reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -5999,8 +5936,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { reuseSuspenseHandlerOnStack(workInProgress), (nextProps = mountSuspenseFallbackChildren( workInProgress, - didSuspend, nextInstance, + JSCompiler_temp$jscomp$0, renderLanes )), (showFallback = workInProgress.child), @@ -6015,106 +5952,273 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - return mountSuspensePrimaryChildren(workInProgress, didSuspend); + return mountSuspensePrimaryChildren(workInProgress, nextInstance); } - nextInstance = current.memoizedState; + JSCompiler_temp$jscomp$0 = current.memoizedState; if ( - null !== nextInstance && - ((prevHydrationParentFiber = nextInstance.dehydrated), - null !== prevHydrationParentFiber) - ) - return updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - JSCompiler_temp, - nextProps, - prevHydrationParentFiber, - nextInstance, - renderLanes - ); - if (showFallback) { - reuseSuspenseHandlerOnStack(workInProgress); - showFallback = nextProps.fallback; - didSuspend = workInProgress.mode; - nextInstance = current.child; - prevHydrationParentFiber = nextInstance.sibling; - var primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (didSuspend & 1) && workInProgress.child !== nextInstance - ? ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(nextInstance, primaryChildProps)), - (nextProps.subtreeFlags = nextInstance.subtreeFlags & 31457280)); - null !== prevHydrationParentFiber - ? (showFallback = createWorkInProgress( - prevHydrationParentFiber, - showFallback - )) - : ((showFallback = createFiberFromFragment( - showFallback, - didSuspend, - renderLanes, - null - )), - (showFallback.flags |= 2)); - showFallback.return = workInProgress; - nextProps.return = workInProgress; - nextProps.sibling = showFallback; - workInProgress.child = nextProps; - nextProps = showFallback; - showFallback = workInProgress.child; - didSuspend = current.child.memoizedState; - null === didSuspend - ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) - : ((nextInstance = didSuspend.cachePool), - null !== nextInstance - ? ((prevHydrationParentFiber = CacheContext._currentValue), - (nextInstance = - nextInstance.parent !== prevHydrationParentFiber - ? { - parent: prevHydrationParentFiber, - pool: prevHydrationParentFiber - } - : nextInstance)) - : (nextInstance = getSuspendedCache()), - (didSuspend = { - baseLanes: didSuspend.baseLanes | renderLanes, - cachePool: nextInstance - })); - showFallback.memoizedState = didSuspend; - enableTransitionTracing && - ((didSuspend = enableTransitionTracing ? transitionStack.current : null), - null !== didSuspend && - ((nextInstance = enableTransitionTracing - ? markerInstanceStack.current - : null), - (prevHydrationParentFiber = showFallback.updateQueue), - (primaryChildProps = current.updateQueue), - null === prevHydrationParentFiber - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: null - }) - : prevHydrationParentFiber === primaryChildProps - ? (showFallback.updateQueue = { - transitions: didSuspend, - markerInstances: nextInstance, - retryQueue: - null !== primaryChildProps ? primaryChildProps.retryQueue : null - }) - : ((prevHydrationParentFiber.transitions = didSuspend), - (prevHydrationParentFiber.markerInstances = nextInstance)))); - showFallback.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return nextProps; + null !== JSCompiler_temp$jscomp$0 && + ((nextInstance = JSCompiler_temp$jscomp$0.dehydrated), + null !== nextInstance) + ) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (JSCompiler_temp = createCapturedValueFromError( + Error(formatProdErrorMessage(422)) + )), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (nextProps = createFiberFromOffscreen( + { mode: "visible", children: nextProps.children }, + nextInstance, + 0, + null + )), + (showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2), + (nextProps.return = workInProgress), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + 0 !== (workInProgress.mode & 1) && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (nextProps = workInProgress.child), + (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (nextProps.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = showFallback)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + "$!" === nextInstance.data) + ) { + JSCompiler_temp = + nextInstance.nextSibling && nextInstance.nextSibling.dataset; + if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; + JSCompiler_temp = digest; + nextProps = Error(formatProdErrorMessage(419)); + nextProps.digest = JSCompiler_temp; + JSCompiler_temp = createCapturedValueFromError( + nextProps, + JSCompiler_temp, + void 0 + ); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + JSCompiler_temp + ); + } else if ( + (enableLazyContextPropagation && + !didReceiveUpdate && + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_temp) + ) { + JSCompiler_temp = workInProgressRoot; + if (null !== JSCompiler_temp) { + nextProps = renderLanes & -renderLanes; + if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) + nextProps = 1; + else + switch (nextProps) { + case 2: + nextProps = 1; + break; + case 8: + nextProps = 4; + break; + case 32: + nextProps = 16; + break; + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + nextProps = 64; + break; + case 268435456: + nextProps = 134217728; + break; + default: + nextProps = 0; + } + nextProps = + 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) + ? 0 + : nextProps; + if (0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane) + throw ( + ((JSCompiler_temp$jscomp$0.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); + } + "$?" === nextInstance.data || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes, + null + ); + } else + "$?" === nextInstance.data + ? ((workInProgress.flags |= 128), + (workInProgress.child = current.child), + (workInProgress = retryDehydratedSuspenseBoundary.bind( + null, + current + )), + (nextInstance._reactRetry = workInProgress), + (workInProgress = null)) + : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + (nextHydratableInstance = getNextHydratable( + nextInstance.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + ((idStack[idStackIndex++] = treeContextId), + (idStack[idStackIndex++] = treeContextOverflow), + (idStack[idStackIndex++] = treeContextProvider), + (treeContextId = renderLanes.id), + (treeContextOverflow = renderLanes.overflow), + (treeContextProvider = workInProgress)), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + nextProps.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; } + if (showFallback) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = nextProps.fallback), + (nextInstance = workInProgress.mode), + (JSCompiler_temp$jscomp$0 = current.child), + (digest = JSCompiler_temp$jscomp$0.sibling), + (didSuspend = { mode: "hidden", children: nextProps.children }), + 0 === (nextInstance & 1) && + workInProgress.child !== JSCompiler_temp$jscomp$0 + ? ((nextProps = workInProgress.child), + (nextProps.childLanes = 0), + (nextProps.pendingProps = didSuspend), + (workInProgress.deletions = null)) + : ((nextProps = createWorkInProgress( + JSCompiler_temp$jscomp$0, + didSuspend + )), + (nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)), + null !== digest + ? (showFallback = createWorkInProgress(digest, showFallback)) + : ((showFallback = createFiberFromFragment( + showFallback, + nextInstance, + renderLanes, + null + )), + (showFallback.flags |= 2)), + (showFallback.return = workInProgress), + (nextProps.return = workInProgress), + (nextProps.sibling = showFallback), + (workInProgress.child = nextProps), + (nextProps = showFallback), + (showFallback = workInProgress.child), + (nextInstance = current.child.memoizedState), + null === nextInstance + ? (nextInstance = mountSuspenseOffscreenState(renderLanes)) + : ((JSCompiler_temp$jscomp$0 = nextInstance.cachePool), + null !== JSCompiler_temp$jscomp$0 + ? ((digest = CacheContext._currentValue), + (JSCompiler_temp$jscomp$0 = + JSCompiler_temp$jscomp$0.parent !== digest + ? { parent: digest, pool: digest } + : JSCompiler_temp$jscomp$0)) + : (JSCompiler_temp$jscomp$0 = getSuspendedCache()), + (nextInstance = { + baseLanes: nextInstance.baseLanes | renderLanes, + cachePool: JSCompiler_temp$jscomp$0 + })), + (showFallback.memoizedState = nextInstance), + enableTransitionTracing && + ((nextInstance = enableTransitionTracing + ? transitionStack.current + : null), + null !== nextInstance && + ((JSCompiler_temp$jscomp$0 = enableTransitionTracing + ? markerInstanceStack.current + : null), + (digest = showFallback.updateQueue), + (didSuspend = current.updateQueue), + null === digest + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null + }) + : digest === didSuspend + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null !== didSuspend ? didSuspend.retryQueue : null + }) + : ((digest.transitions = nextInstance), + (digest.markerInstances = JSCompiler_temp$jscomp$0)))), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + nextProps + ); pushPrimaryTreeSuspenseHandler(workInProgress); JSCompiler_temp = current.child; current = JSCompiler_temp.sibling; @@ -6190,194 +6294,6 @@ function retrySuspenseComponentWithoutHydrating( workInProgress.memoizedState = null; return current; } -function updateDehydratedSuspenseComponent( - current, - workInProgress, - didSuspend, - didPrimaryChildrenDefer, - nextProps, - suspenseInstance, - suspenseState, - renderLanes -) { - if (didSuspend) { - if (workInProgress.flags & 256) - return ( - pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (suspenseInstance = createCapturedValueFromError( - Error(formatProdErrorMessage(422)) - )), - retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ) - ); - if (null !== workInProgress.memoizedState) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - null - ); - reuseSuspenseHandlerOnStack(workInProgress); - suspenseInstance = nextProps.fallback; - suspenseState = workInProgress.mode; - nextProps = createFiberFromOffscreen( - { mode: "visible", children: nextProps.children }, - suspenseState, - 0, - null - ); - suspenseInstance = createFiberFromFragment( - suspenseInstance, - suspenseState, - renderLanes, - null - ); - suspenseInstance.flags |= 2; - nextProps.return = workInProgress; - suspenseInstance.return = workInProgress; - nextProps.sibling = suspenseInstance; - workInProgress.child = nextProps; - 0 !== (workInProgress.mode & 1) && - reconcileChildFibers(workInProgress, current.child, null, renderLanes); - suspenseState = workInProgress.child; - suspenseState.memoizedState = mountSuspenseOffscreenState(renderLanes); - suspenseState.childLanes = getRemainingWorkInPrimaryTree( - current, - didPrimaryChildrenDefer, - renderLanes - ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return suspenseInstance; - } - pushPrimaryTreeSuspenseHandler(workInProgress); - if (0 === (workInProgress.mode & 1)) - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - if ("$!" === suspenseInstance.data) { - suspenseInstance = - suspenseInstance.nextSibling && suspenseInstance.nextSibling.dataset; - if (suspenseInstance) var digest = suspenseInstance.dgst; - suspenseInstance = digest; - didPrimaryChildrenDefer = Error(formatProdErrorMessage(419)); - didPrimaryChildrenDefer.digest = suspenseInstance; - suspenseInstance = createCapturedValueFromError( - didPrimaryChildrenDefer, - suspenseInstance, - void 0 - ); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - suspenseInstance - ); - } - enableLazyContextPropagation && - !didReceiveUpdate && - propagateParentContextChanges(current, workInProgress, renderLanes, !1); - didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes); - if (didReceiveUpdate || didPrimaryChildrenDefer) { - didPrimaryChildrenDefer = workInProgressRoot; - if (null !== didPrimaryChildrenDefer) { - nextProps = renderLanes & -renderLanes; - if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes)) - nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 64; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== suspenseState.retryLane) - throw ( - ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) - ); - } - "$?" !== suspenseInstance.data && renderDidSuspendDelayIfPossible(); - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if ("$?" === suspenseInstance.data) - return ( - (workInProgress.flags |= 128), - (workInProgress.child = current.child), - (workInProgress = retryDehydratedSuspenseBoundary.bind(null, current)), - (suspenseInstance._reactRetry = workInProgress), - null - ); - current = suspenseState.treeContext; - nextHydratableInstance = getNextHydratable(suspenseInstance.nextSibling); - hydrationParentFiber = workInProgress; - isHydrating = !0; - hydrationErrors = null; - rootOrSingletonContext = !1; - null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)); - workInProgress = mountSuspensePrimaryChildren( - workInProgress, - nextProps.children - ); - workInProgress.flags |= 4096; - return workInProgress; -} function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; @@ -6911,92 +6827,74 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 5: - return ( - null === current && - isHydrating && - (((init = Component = nextHydratableInstance), init) - ? tryHydrateInstance(workInProgress, init) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(init)), - (prevState = hydrationParentFiber), - nextHydratableInstance && - tryHydrateInstance(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(prevState, init) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = Component))), - pushHostContext(workInProgress), - (init = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (Component = prevState.children), - shouldSetTextContent(init, prevState) - ? (Component = null) - : null !== nextState && - shouldSetTextContent(init, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((init = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes + if (null === current && isHydrating) { + if ((init = Component = nextHydratableInstance)) + (Component = canHydrateInstance( + Component, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext )), - (HostTransitionContext._currentValue = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), - workInProgress.child - ); + null !== Component + ? ((workInProgress.stateNode = Component), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + Component.firstChild + )), + (rootOrSingletonContext = !1), + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(); + } + pushHostContext(workInProgress); + init = workInProgress.type; + prevState = workInProgress.pendingProps; + nextState = null !== current ? current.memoizedProps : null; + Component = prevState.children; + shouldSetTextContent(init, prevState) + ? (Component = null) + : null !== nextState && + shouldSetTextContent(init, nextState) && + (workInProgress.flags |= 32); + null !== workInProgress.memoizedState && + ((init = renderWithHooks( + current, + workInProgress, + TransitionAwareHostComponent, + null, + null, + renderLanes + )), + (HostTransitionContext._currentValue = init), + enableLazyContextPropagation || + (didReceiveUpdate && + null !== current && + current.memoizedState.memoizedState !== init && + propagateContextChange( + workInProgress, + HostTransitionContext, + renderLanes + ))); + markRef(current, workInProgress); + reconcileChildren(current, workInProgress, Component, renderLanes); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - (((current = renderLanes = nextHydratableInstance), current) - ? tryHydrateText(workInProgress, current) || - (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - (nextHydratableInstance = getNextHydratableSibling(current)), - (Component = hydrationParentFiber), - nextHydratableInstance && - tryHydrateText(workInProgress, nextHydratableInstance) - ? deleteHydratableInstance(Component, current) - : (insertNonHydratedInstance( - hydrationParentFiber, - workInProgress - ), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))) - : (shouldClientRenderOnMismatch(workInProgress) && - throwOnHydrationMismatch(), - insertNonHydratedInstance(hydrationParentFiber, workInProgress), - (isHydrating = !1), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = renderLanes))), - null - ); + if (null === current && isHydrating) { + if ((current = renderLanes = nextHydratableInstance)) + (renderLanes = canHydrateTextInstance( + renderLanes, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== renderLanes + ? ((workInProgress.stateNode = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (current = !0)) + : (current = !1); + current || throwOnHydrationMismatch(); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: @@ -7727,14 +7625,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$112 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$112 = lastTailNode), + for (var lastTailNode$111 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$111 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$112 + null === lastTailNode$111 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$112.sibling = null); + : (lastTailNode$111.sibling = null); } } function bubbleProperties(completedWork) { @@ -7744,19 +7642,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$113 = completedWork.child; null !== child$113; ) - (newChildLanes |= child$113.lanes | child$113.childLanes), - (subtreeFlags |= child$113.subtreeFlags & 31457280), - (subtreeFlags |= child$113.flags & 31457280), - (child$113.return = completedWork), - (child$113 = child$113.sibling); + for (var child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags & 31457280), + (subtreeFlags |= child$112.flags & 31457280), + (child$112.return = completedWork), + (child$112 = child$112.sibling); else - for (child$113 = completedWork.child; null !== child$113; ) - (newChildLanes |= child$113.lanes | child$113.childLanes), - (subtreeFlags |= child$113.subtreeFlags), - (subtreeFlags |= child$113.flags), - (child$113.return = completedWork), - (child$113 = child$113.sibling); + for (child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags), + (subtreeFlags |= child$112.flags), + (child$112.return = completedWork), + (child$112 = child$112.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8013,33 +7911,20 @@ function completeWork(current, workInProgress, renderLanes) { ) switch (currentResource.tag) { case 3: - currentResource = 0 !== (currentResource.mode & 1); - checkForUnmatchedText( - current.nodeValue, - renderLanes, - currentResource - ); - if ( - currentResource && - enableClientRenderFallbackOnTextMismatch - ) { + checkForUnmatchedText(current.nodeValue, renderLanes); + if (enableClientRenderFallbackOnTextMismatch) { current = !1; break a; } break; case 27: case 5: - var isConcurrentMode$24 = 0 !== (currentResource.mode & 1); - !0 !== - currentResource.memoizedProps.suppressHydrationWarning && - checkForUnmatchedText( - current.nodeValue, - renderLanes, - isConcurrentMode$24 - ); if ( - isConcurrentMode$24 && - enableClientRenderFallbackOnTextMismatch + (!0 !== + currentResource.memoizedProps + .suppressHydrationWarning && + checkForUnmatchedText(current.nodeValue, renderLanes), + enableClientRenderFallbackOnTextMismatch) ) { current = !1; break a; @@ -8097,18 +7982,19 @@ function completeWork(current, workInProgress, renderLanes) { return (workInProgress.lanes = renderLanes), workInProgress; renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - renderLanes && - ((newProps = workInProgress.child), - (currentResource = null), + if (renderLanes) { + newProps = workInProgress.child; + currentResource = null; null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && - (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$24 = null), + (currentResource = newProps.alternate.memoizedState.cachePool.pool); + var cache$124 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$24 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$24 !== currentResource && (newProps.flags |= 2048)); + (cache$124 = newProps.memoizedState.cachePool.pool); + cache$124 !== currentResource && (newProps.flags |= 2048); + } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -8144,8 +8030,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$24 = currentResource.rendering; - if (null === isConcurrentMode$24) + cache$124 = currentResource.rendering; + if (null === cache$124) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8153,11 +8039,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$24 = findFirstSuspended(current); - if (null !== isConcurrentMode$24) { + cache$124 = findFirstSuspended(current); + if (null !== cache$124) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$24.updateQueue; + current = cache$124.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8182,10 +8068,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if ( - ((current = findFirstSuspended(isConcurrentMode$24)), - null !== current) - ) { + if (((current = findFirstSuspended(cache$124)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8195,7 +8078,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$24.alternate && + !cache$124.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8208,13 +8091,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$24.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$24)) + ? ((cache$124.sibling = workInProgress.child), + (workInProgress.child = cache$124)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$24) - : (workInProgress.child = isConcurrentMode$24), - (currentResource.last = isConcurrentMode$24)); + ? (current.sibling = cache$124) + : (workInProgress.child = cache$124), + (currentResource.last = cache$124)); } if (null !== currentResource.tail) return ( @@ -8470,8 +8353,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$142) { - captureCommitPhaseError(current, nearestMountedAncestor, error$142); + } catch (error$141) { + captureCommitPhaseError(current, nearestMountedAncestor, error$141); } else ref.current = null; } @@ -8508,7 +8391,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$199) { + } catch (e$198) { JSCompiler_temp = null; break a; } @@ -8787,11 +8670,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$144) { + } catch (error$143) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$144 + error$143 ); } } @@ -9471,8 +9354,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$157) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$157); + } catch (error$156) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$156); } } break; @@ -9644,11 +9527,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$158) { + } catch (error$157) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$157 ); } } @@ -9686,8 +9569,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$159) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$159); + } catch (error$158) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$158); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9698,8 +9581,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$161) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$161); } } break; @@ -9713,8 +9596,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$162) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$162); } } break; @@ -9728,8 +9611,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$164) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$164); + } catch (error$163) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$163); } break; case 4: @@ -9759,8 +9642,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$166) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$166); + } catch (error$165) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$165); } current = finishedWork.updateQueue; null !== current && @@ -9838,11 +9721,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$147) { + } catch (error$146) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$147 + error$146 ); } } else if ( @@ -9917,21 +9800,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$148 = JSCompiler_inline_result.stateNode; + var parent$147 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$148, ""), + (setTextContent(parent$147, ""), (JSCompiler_inline_result.flags &= -33)); - var before$149 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$149, parent$148); + var before$148 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$148, parent$147); break; case 3: case 4: - var parent$150 = JSCompiler_inline_result.stateNode.containerInfo, - before$151 = getHostSibling(finishedWork); + var parent$149 = JSCompiler_inline_result.stateNode.containerInfo, + before$150 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$151, - parent$150 + before$150, + parent$149 ); break; default: @@ -10401,9 +10284,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$173 = finishedWork.stateNode; + var instance$172 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$173._visibility & 4 + ? instance$172._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10416,7 +10299,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$173._visibility |= 4), + : ((instance$172._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10424,7 +10307,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$173._visibility |= 4), + : ((instance$172._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10437,7 +10320,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$173 + instance$172 ); break; case 24: @@ -11567,8 +11450,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$182) { - handleThrow(root, thrownValue$182); + } catch (thrownValue$181) { + handleThrow(root, thrownValue$181); } while (1); lanes && root.shellSuspendCounter++; @@ -11673,8 +11556,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$184) { - handleThrow(root, thrownValue$184); + } catch (thrownValue$183) { + handleThrow(root, thrownValue$183); } while (1); resetContextDependencies(); @@ -11893,12 +11776,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$188 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$187 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$188 && + shouldFireAfterActiveInstanceBlur$187 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11979,7 +11862,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$189 = rootWithPendingPassiveEffects, + var root$188 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11995,7 +11878,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$189, remainingLanes); + releaseRootPooledCache(root$188, remainingLanes); } } return !1; @@ -12606,12 +12489,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$191 = fiber.stateNode; - if (root$191.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$191.pendingLanes); + var root$190 = fiber.stateNode; + if (root$190.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$190.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$191, lanes), - ensureRootIsScheduled(root$191), + (upgradePendingLanesToSync(root$190, lanes), + ensureRootIsScheduled(root$190), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13823,19 +13706,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$350; + var JSCompiler_inline_result$jscomp$345; if (canUseDOM) { - var isSupported$jscomp$inline_1577 = "oninput" in document; - if (!isSupported$jscomp$inline_1577) { - var element$jscomp$inline_1578 = document.createElement("div"); - element$jscomp$inline_1578.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1577 = - "function" === typeof element$jscomp$inline_1578.oninput; + var isSupported$jscomp$inline_1542 = "oninput" in document; + if (!isSupported$jscomp$inline_1542) { + var element$jscomp$inline_1543 = document.createElement("div"); + element$jscomp$inline_1543.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1542 = + "function" === typeof element$jscomp$inline_1543.oninput; } - JSCompiler_inline_result$jscomp$350 = isSupported$jscomp$inline_1577; - } else JSCompiler_inline_result$jscomp$350 = !1; + JSCompiler_inline_result$jscomp$345 = isSupported$jscomp$inline_1542; + } else JSCompiler_inline_result$jscomp$345 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$350 && + JSCompiler_inline_result$jscomp$345 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14144,20 +14027,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1618 = 0; - i$jscomp$inline_1618 < simpleEventPluginEvents.length; - i$jscomp$inline_1618++ + var i$jscomp$inline_1583 = 0; + i$jscomp$inline_1583 < simpleEventPluginEvents.length; + i$jscomp$inline_1583++ ) { - var eventName$jscomp$inline_1619 = - simpleEventPluginEvents[i$jscomp$inline_1618], - domEventName$jscomp$inline_1620 = - eventName$jscomp$inline_1619.toLowerCase(), - capitalizedEvent$jscomp$inline_1621 = - eventName$jscomp$inline_1619[0].toUpperCase() + - eventName$jscomp$inline_1619.slice(1); + var eventName$jscomp$inline_1584 = + simpleEventPluginEvents[i$jscomp$inline_1583], + domEventName$jscomp$inline_1585 = + eventName$jscomp$inline_1584.toLowerCase(), + capitalizedEvent$jscomp$inline_1586 = + eventName$jscomp$inline_1584[0].toUpperCase() + + eventName$jscomp$inline_1584.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1620, - "on" + capitalizedEvent$jscomp$inline_1621 + domEventName$jscomp$inline_1585, + "on" + capitalizedEvent$jscomp$inline_1586 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15003,11 +14886,10 @@ function normalizeMarkupForTextOrAttribute(markup) { .replace(NORMALIZE_NEWLINES_REGEX, "\n") .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ""); } -function checkForUnmatchedText(serverText, clientText, isConcurrentMode) { +function checkForUnmatchedText(serverText, clientText) { clientText = normalizeMarkupForTextOrAttribute(clientText); if ( normalizeMarkupForTextOrAttribute(serverText) !== clientText && - isConcurrentMode && enableClientRenderFallbackOnTextMismatch ) throw Error(formatProdErrorMessage(425)); @@ -15644,14 +15526,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$225 in nextProps) { + var propKey = nextProps[propKey$225]; + lastProp = lastProps[propKey$225]; if ( - nextProps.hasOwnProperty(propKey$226) && + nextProps.hasOwnProperty(propKey$225) && (null != propKey || null != lastProp) ) - switch (propKey$226) { + switch (propKey$225) { case "type": type = propKey; break; @@ -15680,7 +15562,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$226, + propKey$225, propKey, nextProps, lastProp @@ -15699,7 +15581,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$226 = null; + propKey = value = defaultValue = propKey$225 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15730,7 +15612,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$226 = type; + propKey$225 = type; break; case "defaultValue": defaultValue = type; @@ -15751,15 +15633,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$226 - ? updateOptions(domElement, !!lastProps, propKey$226, !1) + null != propKey$225 + ? updateOptions(domElement, !!lastProps, propKey$225, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$226 = null; + propKey = propKey$225 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15783,7 +15665,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$226 = name; + propKey$225 = name; break; case "defaultValue": propKey = name; @@ -15797,17 +15679,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$226, propKey); + updateTextarea(domElement, propKey$225, propKey); return; case "option": - for (var propKey$242 in lastProps) + for (var propKey$241 in lastProps) if ( - ((propKey$226 = lastProps[propKey$242]), - lastProps.hasOwnProperty(propKey$242) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$242)) + ((propKey$225 = lastProps[propKey$241]), + lastProps.hasOwnProperty(propKey$241) && + null != propKey$225 && + !nextProps.hasOwnProperty(propKey$241)) ) - switch (propKey$242) { + switch (propKey$241) { case "selected": domElement.selected = !1; break; @@ -15815,33 +15697,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$242, + propKey$241, null, nextProps, - propKey$226 + propKey$225 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$226 = nextProps[lastDefaultValue]), + ((propKey$225 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$225 !== propKey && + (null != propKey$225 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$226 && - "function" !== typeof propKey$226 && - "symbol" !== typeof propKey$226; + propKey$225 && + "function" !== typeof propKey$225 && + "symbol" !== typeof propKey$225; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$226, + propKey$225, nextProps, propKey ); @@ -15862,24 +15744,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$246 in lastProps) + (propKey$225 = lastProps[propKey$246]), + lastProps.hasOwnProperty(propKey$246) && + null != propKey$225 && + !nextProps.hasOwnProperty(propKey$246) && + setProp(domElement, tag, propKey$246, null, nextProps, propKey$225); for (checked in nextProps) if ( - ((propKey$226 = nextProps[checked]), + ((propKey$225 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$225 !== propKey && + (null != propKey$225 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$226) + if (null != propKey$225) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15887,7 +15769,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$226, + propKey$225, nextProps, propKey ); @@ -15895,49 +15777,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) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$252) && + for (var propKey$251 in lastProps) + (propKey$225 = lastProps[propKey$251]), + lastProps.hasOwnProperty(propKey$251) && + null != propKey$225 && + !nextProps.hasOwnProperty(propKey$251) && setPropOnCustomElement( domElement, tag, - propKey$252, + propKey$251, null, nextProps, - propKey$226 + propKey$225 ); for (defaultChecked in nextProps) - (propKey$226 = nextProps[defaultChecked]), + (propKey$225 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$226 === propKey || - (null == propKey$226 && null == propKey) || + propKey$225 === propKey || + (null == propKey$225 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$226, + propKey$225, 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$256 in lastProps) + (propKey$225 = lastProps[propKey$256]), + lastProps.hasOwnProperty(propKey$256) && + null != propKey$225 && + !nextProps.hasOwnProperty(propKey$256) && + setProp(domElement, tag, propKey$256, null, nextProps, propKey$225); for (lastProp in nextProps) - (propKey$226 = nextProps[lastProp]), + (propKey$225 = 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$225 === propKey || + (null == propKey$225 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$225, nextProps, propKey); } var ReactDOMCurrentDispatcher$1 = Internals.ReactDOMCurrentDispatcher, eventsEnabled = null, @@ -16138,7 +16020,7 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) { default: return instance; } - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) break; } return null; @@ -16153,7 +16035,7 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { !inRootOrSingleton ) return null; - instance = getNextHydratableSibling(instance); + instance = getNextHydratable(instance.nextSibling); if (null === instance) return null; } return instance; @@ -16177,9 +16059,6 @@ function getNextHydratable(node) { } return node; } -function getNextHydratableSibling(instance) { - return getNextHydratable(instance.nextSibling); -} function hydrateInstance( instance, type, @@ -16189,7 +16068,6 @@ function hydrateInstance( ) { instance[internalInstanceKey] = internalInstanceHandle; instance[internalPropsKey] = props; - hostContext = 0 !== (internalInstanceHandle.mode & 1); switch (type) { case "dialog": listenToNonDelegatedEvent("cancel", instance); @@ -16202,15 +16080,8 @@ function hydrateInstance( break; case "video": case "audio": - for ( - internalInstanceHandle = 0; - internalInstanceHandle < mediaEventTypes.length; - internalInstanceHandle++ - ) - listenToNonDelegatedEvent( - mediaEventTypes[internalInstanceHandle], - instance - ); + for (hostContext = 0; hostContext < mediaEventTypes.length; hostContext++) + listenToNonDelegatedEvent(mediaEventTypes[hostContext], instance); break; case "source": listenToNonDelegatedEvent("error", instance); @@ -16246,20 +16117,16 @@ function hydrateInstance( initTextarea(instance, props.value, props.defaultValue), track(instance); } - internalInstanceHandle = props.children; - ("string" === typeof internalInstanceHandle || - "number" === typeof internalInstanceHandle || - (enableBigIntSupport && "bigint" === typeof internalInstanceHandle)) && - instance.textContent !== "" + internalInstanceHandle && + hostContext = props.children; + ("string" === typeof hostContext || + "number" === typeof hostContext || + (enableBigIntSupport && "bigint" === typeof hostContext)) && + instance.textContent !== "" + hostContext && (!0 !== props.suppressHydrationWarning && - checkForUnmatchedText( - instance.textContent, - internalInstanceHandle, - hostContext - ), - (hostContext && enableClientRenderFallbackOnTextMismatch) || + checkForUnmatchedText(instance.textContent, hostContext), + enableClientRenderFallbackOnTextMismatch || "body" === type || - (instance.textContent = internalInstanceHandle)); + (instance.textContent = hostContext)); null != props.onScroll && listenToNonDelegatedEvent("scroll", instance); null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", instance); null != props.onClick && (instance.onclick = noop$1); @@ -16639,17 +16506,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$265 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$266 = styles$265.get(type); - resource$266 || + var styles$264 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$265 = styles$264.get(type); + resource$265 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$266 = { + (resource$265 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$265.set(type, resource$266), + styles$264.set(type, resource$265), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16664,9 +16531,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$266.state + resource$265.state )); - return resource$266; + return resource$265; } return null; case "script": @@ -16749,37 +16616,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$270 = hoistableRoot.querySelector( + var instance$269 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$270) + if (instance$269) return ( (resource.state.loading |= 4), - (resource.instance = instance$270), - markNodeAsHoistable(instance$270), - instance$270 + (resource.instance = instance$269), + markNodeAsHoistable(instance$269), + instance$269 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$270 = ( + instance$269 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$270); - var linkInstance = instance$270; + markNodeAsHoistable(instance$269); + var linkInstance = instance$269; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$270, "link", instance); + setInitialProperties(instance$269, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$270, props.precedence, hoistableRoot); - return (resource.instance = instance$270); + insertStylesheet(instance$269, props.precedence, hoistableRoot); + return (resource.instance = instance$269); case "script": - instance$270 = getScriptKey(props.src); + instance$269 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$270) + getScriptSelectorFromKey(instance$269) )) ) return ( @@ -16788,7 +16655,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$270))) + if ((styleProps = preloadPropsMap.get(instance$269))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17155,17 +17022,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1780 = { +var devToolsConfig$jscomp$inline_1743 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-e1eb6655", + version: "19.0.0-www-modern-e6929f83", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2150 = { - bundleType: devToolsConfig$jscomp$inline_1780.bundleType, - version: devToolsConfig$jscomp$inline_1780.version, - rendererPackageName: devToolsConfig$jscomp$inline_1780.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1780.rendererConfig, +var internals$jscomp$inline_2147 = { + bundleType: devToolsConfig$jscomp$inline_1743.bundleType, + version: devToolsConfig$jscomp$inline_1743.version, + rendererPackageName: devToolsConfig$jscomp$inline_1743.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1743.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17182,26 +17049,26 @@ var internals$jscomp$inline_2150 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1780.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1743.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-e1eb6655" + reconcilerVersion: "19.0.0-www-modern-e6929f83" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2151 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2148 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2151.isDisabled && - hook$jscomp$inline_2151.supportsFiber + !hook$jscomp$inline_2148.isDisabled && + hook$jscomp$inline_2148.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2151.inject( - internals$jscomp$inline_2150 + (rendererID = hook$jscomp$inline_2148.inject( + internals$jscomp$inline_2147 )), - (injectedHook = hook$jscomp$inline_2151); + (injectedHook = hook$jscomp$inline_2148); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; @@ -17598,4 +17465,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-e1eb6655"; +exports.version = "19.0.0-www-modern-e6929f83"; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 4c6c037b03..a9a7c77a19 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -14910,15 +14910,6 @@ if (__DEV__) { // This is the first render pass. Attempt to hydrate. pushPrimaryTreeSuspenseHandler(workInProgress); // We should never be hydrating at this point because it is the first pass, - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (isSuspenseInstanceFallback()) { // This boundary is in a permanent fallback state. In this case, we'll never // get an update and we'll never be able to hydrate the final content. Let's just try the @@ -26119,7 +26110,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-3977f999"; + var ReactVersion = "19.0.0-www-classic-b116d297"; // Might add PROFILE later. diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 5a44166d55..7e66227854 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -14910,15 +14910,6 @@ if (__DEV__) { // This is the first render pass. Attempt to hydrate. pushPrimaryTreeSuspenseHandler(workInProgress); // We should never be hydrating at this point because it is the first pass, - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - return retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes, - null - ); - } - if (isSuspenseInstanceFallback()) { // This boundary is in a permanent fallback state. In this case, we'll never // get an update and we'll never be able to hydrate the final content. Let's just try the @@ -26119,7 +26110,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-3977f999"; + var ReactVersion = "19.0.0-www-modern-b116d297"; // Might add PROFILE later. diff --git a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js index 490b7bb9e1..b3eea6897d 100644 --- a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js +++ b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js @@ -99,7 +99,6 @@ export default [ "Cannot bind \"this\" of a Server Action. Pass null or undefined as the first argument to .bind().", "Cannot call startTransition while rendering.", "Cannot find single active touch.", - "Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, ).render(element) or remove the Suspense components from the server rendered components.", "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to