diff --git a/examples/reproduction-template/package.json b/examples/reproduction-template/package.json index e46540ae538d74..23f3dc79a87ff1 100644 --- a/examples/reproduction-template/package.json +++ b/examples/reproduction-template/package.json @@ -7,8 +7,8 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-7771d3a7-20240827", - "react-dom": "19.0.0-rc-7771d3a7-20240827" + "react": "19.0.0-rc-4c58fce7-20240904", + "react-dom": "19.0.0-rc-4c58fce7-20240904" }, "devDependencies": { "@types/node": "20.12.12", diff --git a/package.json b/package.json index 1402a0e080b8e8..3a7ebe6bfd9cf8 100644 --- a/package.json +++ b/package.json @@ -206,19 +206,19 @@ "pretty-bytes": "5.3.0", "pretty-ms": "7.0.0", "random-seed": "0.3.0", - "react": "19.0.0-rc-7771d3a7-20240827", + "react": "19.0.0-rc-4c58fce7-20240904", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@19.0.0-rc-7771d3a7-20240827", - "react-dom": "19.0.0-rc-7771d3a7-20240827", + "react-builtin": "npm:react@19.0.0-rc-4c58fce7-20240904", + "react-dom": "19.0.0-rc-4c58fce7-20240904", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@19.0.0-rc-7771d3a7-20240827", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-7771d3a7-20240827", - "react-experimental-builtin": "npm:react@0.0.0-experimental-7771d3a7-20240827", - "react-is-builtin": "npm:react-is@19.0.0-rc-7771d3a7-20240827", - "react-server-dom-turbopack": "19.0.0-rc-7771d3a7-20240827", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-7771d3a7-20240827", - "react-server-dom-webpack": "19.0.0-rc-7771d3a7-20240827", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-7771d3a7-20240827", + "react-dom-builtin": "npm:react-dom@19.0.0-rc-4c58fce7-20240904", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-4c58fce7-20240904", + "react-experimental-builtin": "npm:react@0.0.0-experimental-4c58fce7-20240904", + "react-is-builtin": "npm:react-is@19.0.0-rc-4c58fce7-20240904", + "react-server-dom-turbopack": "19.0.0-rc-4c58fce7-20240904", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-4c58fce7-20240904", + "react-server-dom-webpack": "19.0.0-rc-4c58fce7-20240904", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-4c58fce7-20240904", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -228,8 +228,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.9", - "scheduler-builtin": "npm:scheduler@0.25.0-rc-7771d3a7-20240827", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-7771d3a7-20240827", + "scheduler-builtin": "npm:scheduler@0.25.0-rc-4c58fce7-20240904", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-4c58fce7-20240904", "seedrandom": "3.0.5", "semver": "7.3.7", "shell-quote": "1.7.3", @@ -269,10 +269,10 @@ "@babel/traverse": "7.22.5", "@types/react": "npm:types-react@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", - "react": "19.0.0-rc-7771d3a7-20240827", - "react-dom": "19.0.0-rc-7771d3a7-20240827", - "react-is": "19.0.0-rc-7771d3a7-20240827", - "scheduler": "0.25.0-rc-7771d3a7-20240827" + "react": "19.0.0-rc-4c58fce7-20240904", + "react-dom": "19.0.0-rc-4c58fce7-20240904", + "react-is": "19.0.0-rc-4c58fce7-20240904", + "scheduler": "0.25.0-rc-4c58fce7-20240904" }, "patchedDependencies": { "webpack-sources@3.2.3": "patches/webpack-sources@3.2.3.patch" diff --git a/packages/create-next-app/templates/index.ts b/packages/create-next-app/templates/index.ts index ffbcd544c9b583..7d0be6d1f92b6d 100644 --- a/packages/create-next-app/templates/index.ts +++ b/packages/create-next-app/templates/index.ts @@ -13,7 +13,7 @@ import { GetTemplateFileArgs, InstallTemplateArgs } from "./types"; // Do not rename or format. sync-react script relies on this line. // prettier-ignore -const nextjsReactPeerVersion = "19.0.0-rc-7771d3a7-20240827"; +const nextjsReactPeerVersion = "19.0.0-rc-4c58fce7-20240904"; /** * Get the file path for a given file in a template, e.g. "next.config.js". diff --git a/packages/next/package.json b/packages/next/package.json index 5a44c7c7d04f3a..22a045f5f68006 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -108,8 +108,8 @@ "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", - "react": "19.0.0-rc-7771d3a7-20240827", - "react-dom": "19.0.0-rc-7771d3a7-20240827", + "react": "19.0.0-rc-4c58fce7-20240904", + "react-dom": "19.0.0-rc-4c58fce7-20240904", "sass": "^1.3.0" }, "peerDependenciesMeta": { diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js index 5b1d8511cab05f..ef6468eef91774 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js @@ -1094,28 +1094,37 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -1194,6 +1203,7 @@ root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -5855,6 +5865,14 @@ } function finishRenderingHooks(current, workInProgress) { workInProgress._debugHookTypes = hookTypesDev; + null === workInProgress.dependencies + ? null !== thenableState && + (workInProgress.dependencies = { + lanes: 0, + firstContext: null, + _debugThenableState: thenableState + }) + : (workInProgress.dependencies._debugThenableState = thenableState); ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; @@ -8695,33 +8713,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2306; - var JSCompiler_object_inline_stack_2305 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2309; + var JSCompiler_object_inline_stack_2308 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2303 = !1; + var JSCompiler_object_inline_message_2306 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2306 = didSuspend) || - (JSCompiler_object_inline_componentStack_2306 = + (JSCompiler_object_inline_componentStack_2309 = didSuspend) || + (JSCompiler_object_inline_componentStack_2309 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2306 && - ((JSCompiler_object_inline_message_2303 = !0), + JSCompiler_object_inline_componentStack_2309 && + ((JSCompiler_object_inline_message_2306 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2306 = + JSCompiler_object_inline_componentStack_2309 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2303 + JSCompiler_object_inline_message_2306 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2304 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2307 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2304)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2307)) { c: { - var instance = JSCompiler_object_inline_digest_2304; + var instance = JSCompiler_object_inline_digest_2307; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8762,19 +8780,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2304 + JSCompiler_object_inline_digest_2307 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2304 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2307 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2304 && - ((JSCompiler_object_inline_digest_2304 = - JSCompiler_object_inline_digest_2304.dehydrated), - null !== JSCompiler_object_inline_digest_2304) + null !== JSCompiler_object_inline_digest_2307 && + ((JSCompiler_object_inline_digest_2307 = + JSCompiler_object_inline_digest_2307.dehydrated), + null !== JSCompiler_object_inline_digest_2307) ) return ( - JSCompiler_object_inline_digest_2304.data === + JSCompiler_object_inline_digest_2307.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8782,68 +8800,68 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2304 = - JSCompiler_object_inline_stack_2305.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2305.fallback; - if (JSCompiler_object_inline_message_2303) + JSCompiler_object_inline_digest_2307 = + JSCompiler_object_inline_stack_2308.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2308.fallback; + if (JSCompiler_object_inline_message_2306) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2305 = + (JSCompiler_object_inline_stack_2308 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2304, + JSCompiler_object_inline_digest_2307, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2303 = workInProgress.child), - (JSCompiler_object_inline_message_2303.memoizedState = + (JSCompiler_object_inline_message_2306 = workInProgress.child), + (JSCompiler_object_inline_message_2306.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2303.childLanes = + (JSCompiler_object_inline_message_2306.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2306, + JSCompiler_object_inline_componentStack_2309, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2305 + JSCompiler_object_inline_stack_2308 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2305.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2308.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2305 = + (JSCompiler_object_inline_stack_2308 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2304, + JSCompiler_object_inline_digest_2307, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2303 = workInProgress.child), - (JSCompiler_object_inline_message_2303.memoizedState = + (JSCompiler_object_inline_message_2306 = workInProgress.child), + (JSCompiler_object_inline_message_2306.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2303.childLanes = + (JSCompiler_object_inline_message_2306.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2306, + JSCompiler_object_inline_componentStack_2309, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2305 + JSCompiler_object_inline_stack_2308 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2304 + JSCompiler_object_inline_digest_2307 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2304 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2304) + ((JSCompiler_object_inline_digest_2307 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2307) ) { if (didSuspend) workInProgress.flags & 256 @@ -8860,94 +8878,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2303 = - JSCompiler_object_inline_stack_2305.fallback), - (JSCompiler_object_inline_digest_2304 = workInProgress.mode), - (JSCompiler_object_inline_stack_2305 = + (JSCompiler_object_inline_message_2306 = + JSCompiler_object_inline_stack_2308.fallback), + (JSCompiler_object_inline_digest_2307 = workInProgress.mode), + (JSCompiler_object_inline_stack_2308 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2305.children + children: JSCompiler_object_inline_stack_2308.children }, - JSCompiler_object_inline_digest_2304 + JSCompiler_object_inline_digest_2307 )), - (JSCompiler_object_inline_message_2303 = + (JSCompiler_object_inline_message_2306 = createFiberFromFragment( - JSCompiler_object_inline_message_2303, - JSCompiler_object_inline_digest_2304, + JSCompiler_object_inline_message_2306, + JSCompiler_object_inline_digest_2307, renderLanes, null )), - (JSCompiler_object_inline_message_2303.flags |= 2), - (JSCompiler_object_inline_stack_2305.return = workInProgress), - (JSCompiler_object_inline_message_2303.return = workInProgress), - (JSCompiler_object_inline_stack_2305.sibling = - JSCompiler_object_inline_message_2303), - (workInProgress.child = JSCompiler_object_inline_stack_2305), + (JSCompiler_object_inline_message_2306.flags |= 2), + (JSCompiler_object_inline_stack_2308.return = workInProgress), + (JSCompiler_object_inline_message_2306.return = workInProgress), + (JSCompiler_object_inline_stack_2308.sibling = + JSCompiler_object_inline_message_2306), + (workInProgress.child = JSCompiler_object_inline_stack_2308), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2305 = workInProgress.child), - (JSCompiler_object_inline_stack_2305.memoizedState = + (JSCompiler_object_inline_stack_2308 = workInProgress.child), + (JSCompiler_object_inline_stack_2308.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2305.childLanes = + (JSCompiler_object_inline_stack_2308.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2306, + JSCompiler_object_inline_componentStack_2309, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2303)); + (workInProgress = JSCompiler_object_inline_message_2306)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_digest_2304.data === + JSCompiler_object_inline_digest_2307.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_componentStack_2306 = - JSCompiler_object_inline_digest_2304.nextSibling && - JSCompiler_object_inline_digest_2304.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2306) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2306.dgst; - var message = JSCompiler_object_inline_componentStack_2306.msg; - instance = JSCompiler_object_inline_componentStack_2306.stck; + JSCompiler_object_inline_componentStack_2309 = + JSCompiler_object_inline_digest_2307.nextSibling && + JSCompiler_object_inline_digest_2307.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2309) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2309.dgst; + var message = JSCompiler_object_inline_componentStack_2309.msg; + instance = JSCompiler_object_inline_componentStack_2309.stck; var componentStack = - JSCompiler_object_inline_componentStack_2306.cstck; + JSCompiler_object_inline_componentStack_2309.cstck; } - JSCompiler_object_inline_message_2303 = message; - JSCompiler_object_inline_digest_2304 = JSCompiler_temp; - JSCompiler_object_inline_stack_2305 = instance; - JSCompiler_object_inline_componentStack_2306 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2304 && - ((JSCompiler_object_inline_message_2303 = - JSCompiler_object_inline_message_2303 - ? Error(JSCompiler_object_inline_message_2303) + JSCompiler_object_inline_message_2306 = message; + JSCompiler_object_inline_digest_2307 = JSCompiler_temp; + JSCompiler_object_inline_stack_2308 = instance; + JSCompiler_object_inline_componentStack_2309 = componentStack; + "POSTPONE" !== JSCompiler_object_inline_digest_2307 && + ((JSCompiler_object_inline_message_2306 = + JSCompiler_object_inline_message_2306 + ? Error(JSCompiler_object_inline_message_2306) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_message_2303.stack = - JSCompiler_object_inline_stack_2305 || ""), - (JSCompiler_object_inline_message_2303.digest = - JSCompiler_object_inline_digest_2304), - (JSCompiler_object_inline_componentStack_2306 = - void 0 === JSCompiler_object_inline_componentStack_2306 + (JSCompiler_object_inline_message_2306.stack = + JSCompiler_object_inline_stack_2308 || ""), + (JSCompiler_object_inline_message_2306.digest = + JSCompiler_object_inline_digest_2307), + (JSCompiler_object_inline_componentStack_2309 = + void 0 === JSCompiler_object_inline_componentStack_2309 ? null - : JSCompiler_object_inline_componentStack_2306), - "string" === typeof JSCompiler_object_inline_componentStack_2306 && + : JSCompiler_object_inline_componentStack_2309), + "string" === typeof JSCompiler_object_inline_componentStack_2309 && CapturedStacks.set( - JSCompiler_object_inline_message_2303, - JSCompiler_object_inline_componentStack_2306 + JSCompiler_object_inline_message_2306, + JSCompiler_object_inline_componentStack_2309 ), queueHydrationError({ - value: JSCompiler_object_inline_message_2303, + value: JSCompiler_object_inline_message_2306, source: null, - stack: JSCompiler_object_inline_componentStack_2306 + stack: JSCompiler_object_inline_componentStack_2309 })); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8962,25 +8980,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2306 = + (JSCompiler_object_inline_componentStack_2309 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2306) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2309) ) { - JSCompiler_object_inline_componentStack_2306 = workInProgressRoot; - if (null !== JSCompiler_object_inline_componentStack_2306) { - JSCompiler_object_inline_stack_2305 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2305 & 42)) - JSCompiler_object_inline_stack_2305 = 1; + JSCompiler_object_inline_componentStack_2309 = workInProgressRoot; + if (null !== JSCompiler_object_inline_componentStack_2309) { + JSCompiler_object_inline_stack_2308 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2308 & 42)) + JSCompiler_object_inline_stack_2308 = 1; else - switch (JSCompiler_object_inline_stack_2305) { + switch (JSCompiler_object_inline_stack_2308) { case 2: - JSCompiler_object_inline_stack_2305 = 1; + JSCompiler_object_inline_stack_2308 = 1; break; case 8: - JSCompiler_object_inline_stack_2305 = 4; + JSCompiler_object_inline_stack_2308 = 4; break; case 32: - JSCompiler_object_inline_stack_2305 = 16; + JSCompiler_object_inline_stack_2308 = 16; break; case 128: case 256: @@ -9001,40 +9019,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2305 = 64; + JSCompiler_object_inline_stack_2308 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2305 = 134217728; + JSCompiler_object_inline_stack_2308 = 134217728; break; default: - JSCompiler_object_inline_stack_2305 = 0; + JSCompiler_object_inline_stack_2308 = 0; } - JSCompiler_object_inline_stack_2305 = + JSCompiler_object_inline_stack_2308 = 0 !== - (JSCompiler_object_inline_stack_2305 & - (JSCompiler_object_inline_componentStack_2306.suspendedLanes | + (JSCompiler_object_inline_stack_2308 & + (JSCompiler_object_inline_componentStack_2309.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2305; + : JSCompiler_object_inline_stack_2308; if ( - 0 !== JSCompiler_object_inline_stack_2305 && - JSCompiler_object_inline_stack_2305 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2308 && + JSCompiler_object_inline_stack_2308 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2305), + ((prevState.retryLane = JSCompiler_object_inline_stack_2308), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2305 + JSCompiler_object_inline_stack_2308 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2306, + JSCompiler_object_inline_componentStack_2309, current, - JSCompiler_object_inline_stack_2305 + JSCompiler_object_inline_stack_2308 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_digest_2304.data === + JSCompiler_object_inline_digest_2307.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9042,7 +9060,7 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2304.data === + JSCompiler_object_inline_digest_2307.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9050,12 +9068,12 @@ null, current )), - (JSCompiler_object_inline_digest_2304._reactRetry = + (JSCompiler_object_inline_digest_2307._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2304.nextSibling + JSCompiler_object_inline_digest_2307.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9073,54 +9091,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2305.children + JSCompiler_object_inline_stack_2308.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2303) + if (JSCompiler_object_inline_message_2306) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2303 = - JSCompiler_object_inline_stack_2305.fallback), - (JSCompiler_object_inline_digest_2304 = workInProgress.mode), + (JSCompiler_object_inline_message_2306 = + JSCompiler_object_inline_stack_2308.fallback), + (JSCompiler_object_inline_digest_2307 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2305 = createWorkInProgress( + (JSCompiler_object_inline_stack_2308 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2305.children + children: JSCompiler_object_inline_stack_2308.children } )), - (JSCompiler_object_inline_stack_2305.subtreeFlags = + (JSCompiler_object_inline_stack_2308.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_message_2303 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2306 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2303 + JSCompiler_object_inline_message_2306 )) - : ((JSCompiler_object_inline_message_2303 = createFiberFromFragment( - JSCompiler_object_inline_message_2303, - JSCompiler_object_inline_digest_2304, + : ((JSCompiler_object_inline_message_2306 = createFiberFromFragment( + JSCompiler_object_inline_message_2306, + JSCompiler_object_inline_digest_2307, renderLanes, null )), - (JSCompiler_object_inline_message_2303.flags |= 2)), - (JSCompiler_object_inline_message_2303.return = workInProgress), - (JSCompiler_object_inline_stack_2305.return = workInProgress), - (JSCompiler_object_inline_stack_2305.sibling = - JSCompiler_object_inline_message_2303), - (workInProgress.child = JSCompiler_object_inline_stack_2305), - (JSCompiler_object_inline_stack_2305 = - JSCompiler_object_inline_message_2303), - (JSCompiler_object_inline_message_2303 = workInProgress.child), - (JSCompiler_object_inline_digest_2304 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2304 - ? (JSCompiler_object_inline_digest_2304 = + (JSCompiler_object_inline_message_2306.flags |= 2)), + (JSCompiler_object_inline_message_2306.return = workInProgress), + (JSCompiler_object_inline_stack_2308.return = workInProgress), + (JSCompiler_object_inline_stack_2308.sibling = + JSCompiler_object_inline_message_2306), + (workInProgress.child = JSCompiler_object_inline_stack_2308), + (JSCompiler_object_inline_stack_2308 = + JSCompiler_object_inline_message_2306), + (JSCompiler_object_inline_message_2306 = workInProgress.child), + (JSCompiler_object_inline_digest_2307 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2307 + ? (JSCompiler_object_inline_digest_2307 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2304.cachePool), + JSCompiler_object_inline_digest_2307.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9128,38 +9146,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2304 = { + (JSCompiler_object_inline_digest_2307 = { baseLanes: - JSCompiler_object_inline_digest_2304.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2307.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2303.memoizedState = - JSCompiler_object_inline_digest_2304), - (JSCompiler_object_inline_message_2303.childLanes = + (JSCompiler_object_inline_message_2306.memoizedState = + JSCompiler_object_inline_digest_2307), + (JSCompiler_object_inline_message_2306.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2306, + JSCompiler_object_inline_componentStack_2309, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2305 + JSCompiler_object_inline_stack_2308 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2305.children + children: JSCompiler_object_inline_stack_2308.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2306 = + ((JSCompiler_object_inline_componentStack_2309 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2306 + null === JSCompiler_object_inline_componentStack_2309 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2306.push(current)); + : JSCompiler_object_inline_componentStack_2309.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10444,7 +10462,11 @@ "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; @@ -13359,7 +13381,8 @@ ? null : { lanes: pendingProps.lanes, - firstContext: pendingProps.firstContext + firstContext: pendingProps.firstContext, + _debugThenableState: pendingProps._debugThenableState }; workInProgress.sibling = current.sibling; workInProgress.index = current.index; @@ -13412,7 +13435,8 @@ ? null : { lanes: renderLanes.lanes, - firstContext: renderLanes.firstContext + firstContext: renderLanes.firstContext, + _debugThenableState: renderLanes._debugThenableState }), (workInProgress.selfBaseDuration = current.selfBaseDuration), (workInProgress.treeBaseDuration = current.treeBaseDuration)); @@ -13634,13 +13658,26 @@ (resource.state.loading & Inserted) !== NotLoaded ) workInProgress.flags &= -16777217; - else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) - if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192; - else + else if ( + ((workInProgress.flags |= 16777216), !preloadResource(resource)) + ) { + resource = suspenseHandlerStackCursor.current; + if ( + null !== resource && + ((workInProgressRootRenderLanes & 4194176) === + workInProgressRootRenderLanes + ? null !== shellBoundary + : ((workInProgressRootRenderLanes & 62914560) !== + workInProgressRootRenderLanes && + 0 === (workInProgressRootRenderLanes & 536870912)) || + resource !== shellBoundary) + ) throw ( ((suspendedThenable = noopSuspenseyCommitThenable), SuspenseyCommitException) ); + workInProgress.flags |= 8192; + } } function scheduleRetryEffect(workInProgress, retryQueue) { null !== retryQueue @@ -14445,7 +14482,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if ( @@ -14487,7 +14525,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -14512,7 +14551,12 @@ var renderWasConcurrent = shouldTimeSlice; do { if (didTimeout === RootDidNotComplete) - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -14544,7 +14588,12 @@ } if (didTimeout === RootFatalErrored) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -14560,7 +14609,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -14594,7 +14644,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -14606,7 +14657,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -14619,7 +14671,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -14674,7 +14727,8 @@ transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -14693,7 +14747,7 @@ didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -14741,26 +14795,31 @@ function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended(root, suspendedLanes, spawnedLane) { + function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings + ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - expirationTimes[index] = -1; + didSkipSuspendedSiblings[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -14790,13 +14849,18 @@ if (exitStatus === RootFatalErrored) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (exitStatus === RootDidNotComplete) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -14849,6 +14913,12 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; + workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressDeferredLane = @@ -14885,12 +14955,7 @@ current = null; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), - (workInProgressSuspendedReason = - shouldRemainOnPreviousScreen() && - 0 === (workInProgressRootSkippedLanes & 134217727) && - 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) - ? SuspendedOnData - : SuspendedOnImmediate)) + (workInProgressSuspendedReason = SuspendedOnImmediate)) : thrownValue === SuspenseyCommitException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = SuspendedOnInstance)) @@ -14941,21 +15006,6 @@ ); } } - function shouldRemainOnPreviousScreen() { - var handler = suspenseHandlerStackCursor.current; - return null === handler - ? !0 - : (workInProgressRootRenderLanes & 4194176) === - workInProgressRootRenderLanes - ? null === shellBoundary - ? !0 - : !1 - : (workInProgressRootRenderLanes & 62914560) === - workInProgressRootRenderLanes || - 0 !== (workInProgressRootRenderLanes & 536870912) - ? handler === shellBoundary - : !1; - } function pushDispatcher() { var prevDispatcher = ReactSharedInternals.H; ReactSharedInternals.H = ContextOnlyDispatcher; @@ -14974,7 +15024,8 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function queueConcurrentError(error) { @@ -15296,43 +15347,25 @@ workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - if ((root.mode & ProfileMode) !== NoMode) { - stopProfilerTimerIfRunningAndRecordDelta(root, !1); - unitOfWork = root.actualDuration; - for (thrownValue = root.child; null !== thrownValue; ) - (unitOfWork += thrownValue.actualDuration), - (thrownValue = thrownValue.sibling); - root.actualDuration = unitOfWork; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = RootDidNotComplete; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? (isHydrating || workInProgressSuspendedReason === SuspendedOnError + ? (root = !0) + : workInProgressRootIsPrerendering + ? (root = !1) + : (workInProgressRootDidSkipSuspendedSiblings = root = !0), + unwindUnitOfWork(unitOfWork, root)) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { - 0 !== (completedWork.flags & 32768) && - console.error( - "Internal React error: Expected this fiber to be complete, but it isn't. It should have been unwound. This is a bug in React." + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings ); + return; + } var current = completedWork.alternate; unitOfWork = completedWork.return; (completedWork.mode & ProfileMode) === NoMode @@ -15366,6 +15399,38 @@ workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted); } + function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + if ((unitOfWork.mode & ProfileMode) !== NoMode) { + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1); + next = unitOfWork.actualDuration; + for (var child = unitOfWork.child; null !== child; ) + (next += child.actualDuration), (child = child.sibling); + unitOfWork.actualDuration = next; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), + (next.subtreeFlags = 0), + (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = RootDidNotComplete; + workInProgress = null; + } function commitRoot( root, recoverableErrors, @@ -15763,6 +15828,7 @@ var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && @@ -20198,6 +20264,7 @@ this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -24039,6 +24106,8 @@ SuspendedOnHydration = 8, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, + workInProgressRootIsPrerendering = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = RootInProgress, @@ -24615,11 +24684,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24656,11 +24725,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-7771d3a7-20240827", + version: "19.0.0-experimental-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-7771d3a7-20240827" + reconcilerVersion: "19.0.0-experimental-4c58fce7-20240904" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24804,7 +24873,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js index 1cf7cbe835a8d4..f229e980cdd8f2 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js @@ -597,28 +597,37 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -689,6 +698,7 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -700,18 +710,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$6 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$6; - remainingLanes[index$6] = 0; - expirationTimes[index$6] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$6]; + var index$7 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$7; + remainingLanes[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$6] = null, index$6 = 0; - index$6 < hiddenUpdatesForLane.length; - index$6++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$6]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -731,10 +741,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$7 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$7; - (lane & entangledLanes) | (root[index$7] & entangledLanes) && - (root[index$7] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -884,8 +894,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$9 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$9 && "aria-" !== prefix$9) { + var prefix$10 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$10 && "aria-" !== prefix$10) { node.removeAttribute(name); return; } @@ -1218,15 +1228,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$15 in styles) - (styleName = styles[styleName$15]), - styles.hasOwnProperty(styleName$15) && - prevStyles[styleName$15] !== styleName && - setValueForStyle(node, styleName$15, styleName); - } else for (var styleName$16 in styles) - styles.hasOwnProperty(styleName$16) && - setValueForStyle(node, styleName$16, styles[styleName$16]); + (styleName = styles[styleName$16]), + styles.hasOwnProperty(styleName$16) && + prevStyles[styleName$16] !== styleName && + setValueForStyle(node, styleName$16, styleName); + } else + for (var styleName$17 in styles) + styles.hasOwnProperty(styleName$17) && + setValueForStyle(node, styleName$17, styles[styleName$17]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1955,19 +1965,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$290; + var JSCompiler_inline_result$jscomp$291; if (canUseDOM) { - var isSupported$jscomp$inline_425 = "oninput" in document; - if (!isSupported$jscomp$inline_425) { - var element$jscomp$inline_426 = document.createElement("div"); - element$jscomp$inline_426.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_425 = - "function" === typeof element$jscomp$inline_426.oninput; + var isSupported$jscomp$inline_426 = "oninput" in document; + if (!isSupported$jscomp$inline_426) { + var element$jscomp$inline_427 = document.createElement("div"); + element$jscomp$inline_427.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_426 = + "function" === typeof element$jscomp$inline_427.oninput; } - JSCompiler_inline_result$jscomp$290 = isSupported$jscomp$inline_425; - } else JSCompiler_inline_result$jscomp$290 = !1; + JSCompiler_inline_result$jscomp$291 = isSupported$jscomp$inline_426; + } else JSCompiler_inline_result$jscomp$291 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$290 && + JSCompiler_inline_result$jscomp$291 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3901,7 +3911,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$54 = !1; + didReadFromEntangledAsyncAction$55 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3922,11 +3932,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$54 = !0); + (didReadFromEntangledAsyncAction$55 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$54 = !0); + (didReadFromEntangledAsyncAction$55 = !0); continue; } else (updateLane = { @@ -3972,7 +3982,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$54 && + didReadFromEntangledAsyncAction$55 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4170,8 +4180,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$60) { - onActionError(actionQueue, node, error$60); + } catch (error$61) { + onActionError(actionQueue, node, error$61); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4609,14 +4619,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$63 = enqueueUpdate(provider, fiber, lane); - null !== root$63 && - (scheduleUpdateOnFiber(root$63, provider, lane), - entangleTransitions(root$63, provider, lane)); + var root$64 = enqueueUpdate(provider, fiber, lane); + null !== root$64 && + (scheduleUpdateOnFiber(root$64, provider, lane), + entangleTransitions(root$64, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$63 && + null !== root$64 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -5085,9 +5095,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$67) { + } catch (e$68) { setTimeout(function () { - throw e$67; + throw e$68; }); } } @@ -5098,9 +5108,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$68) { + } catch (e$69) { setTimeout(function () { - throw e$68; + throw e$69; }); } } @@ -7536,9 +7546,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$112 in Component) - void 0 === newProps[propName$112] && - (newProps[propName$112] = Component[propName$112]); + for (var propName$113 in Component) + void 0 === newProps[propName$113] && + (newProps[propName$113] = Component[propName$113]); } return newProps; } @@ -7602,8 +7612,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$113) { - captureCommitPhaseError(current, nearestMountedAncestor, error$113); + } catch (error$114) { + captureCommitPhaseError(current, nearestMountedAncestor, error$114); } else ref.current = null; } @@ -7639,7 +7649,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$19) { + } catch (e$20) { JSCompiler_temp = null; break a; } @@ -7877,11 +7887,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$115) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$115 + error$116 ); } } @@ -8332,8 +8342,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$127) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$127); + } catch (error$128) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$128); } } break; @@ -8506,11 +8516,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$128) { + } catch (error$129) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$128 + error$129 ); } break; @@ -8547,8 +8557,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$129) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$129); + } catch (error$130) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$130); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -8558,8 +8568,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$131) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$131); + } catch (error$132) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$132); } } flags & 1024 && (needsFormReset = !0); @@ -8574,8 +8584,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$132) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$132); + } catch (error$133) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$133); } } break; @@ -8589,8 +8599,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$133) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$133); + } catch (error$134) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$134); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -8684,11 +8694,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$117) { + } catch (error$118) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$117 + error$118 ); } } else if ( @@ -8757,21 +8767,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$118 = JSCompiler_inline_result.stateNode; + var parent$119 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$118, ""), + (setTextContent(parent$119, ""), (JSCompiler_inline_result.flags &= -33)); - var before$119 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$119, parent$118); + var before$120 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$120, parent$119); break; case 3: case 4: - var parent$120 = JSCompiler_inline_result.stateNode.containerInfo, - before$121 = getHostSibling(finishedWork); + var parent$121 = JSCompiler_inline_result.stateNode.containerInfo, + before$122 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$121, - parent$120 + before$122, + parent$121 ); break; default: @@ -9618,13 +9628,24 @@ function markUpdate(workInProgress) { function preloadResourceAndSuspendIfNeeded(workInProgress, resource) { if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4)) workInProgress.flags &= -16777217; - else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) - if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192; - else + else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) { + resource = suspenseHandlerStackCursor.current; + if ( + null !== resource && + ((workInProgressRootRenderLanes & 4194176) === + workInProgressRootRenderLanes + ? null !== shellBoundary + : ((workInProgressRootRenderLanes & 62914560) !== + workInProgressRootRenderLanes && + 0 === (workInProgressRootRenderLanes & 536870912)) || + resource !== shellBoundary) + ) throw ( ((suspendedThenable = noopSuspenseyCommitThenable), SuspenseyCommitException) ); + workInProgress.flags |= 8192; + } } function scheduleRetryEffect(workInProgress, retryQueue) { null !== retryQueue @@ -9649,14 +9670,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$143 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$143 = lastTailNode), + for (var lastTailNode$144 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$144 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$143 + null === lastTailNode$144 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$143.sibling = null); + : (lastTailNode$144.sibling = null); } } function bubbleProperties(completedWork) { @@ -9666,19 +9687,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$144 = completedWork.child; null !== child$144; ) - (newChildLanes |= child$144.lanes | child$144.childLanes), - (subtreeFlags |= child$144.subtreeFlags & 31457280), - (subtreeFlags |= child$144.flags & 31457280), - (child$144.return = completedWork), - (child$144 = child$144.sibling); + for (var child$145 = completedWork.child; null !== child$145; ) + (newChildLanes |= child$145.lanes | child$145.childLanes), + (subtreeFlags |= child$145.subtreeFlags & 31457280), + (subtreeFlags |= child$145.flags & 31457280), + (child$145.return = completedWork), + (child$145 = child$145.sibling); else - for (child$144 = completedWork.child; null !== child$144; ) - (newChildLanes |= child$144.lanes | child$144.childLanes), - (subtreeFlags |= child$144.subtreeFlags), - (subtreeFlags |= child$144.flags), - (child$144.return = completedWork), - (child$144 = child$144.sibling); + for (child$145 = completedWork.child; null !== child$145; ) + (newChildLanes |= child$145.lanes | child$145.childLanes), + (subtreeFlags |= child$145.subtreeFlags), + (subtreeFlags |= child$145.flags), + (child$145.return = completedWork), + (child$145 = child$145.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -9955,11 +9976,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$156 = null; + var cache$157 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$156 = newProps.memoizedState.cachePool.pool); - cache$156 !== type && (newProps.flags |= 2048); + (cache$157 = newProps.memoizedState.cachePool.pool); + cache$157 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -9984,8 +10005,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$156 = type.rendering; - if (null === cache$156) + cache$157 = type.rendering; + if (null === cache$157) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -9993,11 +10014,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$156 = findFirstSuspended(current); - if (null !== cache$156) { + cache$157 = findFirstSuspended(current); + if (null !== cache$157) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$156.updateQueue; + current = cache$157.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10022,7 +10043,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$156)), null !== current)) { + if (((current = findFirstSuspended(cache$157)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10032,7 +10053,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$156.alternate && + !cache$157.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10045,13 +10066,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$156.sibling = workInProgress.child), - (workInProgress.child = cache$156)) + ? ((cache$157.sibling = workInProgress.child), + (workInProgress.child = cache$157)) : ((current = type.last), null !== current - ? (current.sibling = cache$156) - : (workInProgress.child = cache$156), - (type.last = cache$156)); + ? (current.sibling = cache$157) + : (workInProgress.child = cache$157), + (type.last = cache$157)); } if (null !== type.tail) return ( @@ -10224,6 +10245,8 @@ var DefaultAsyncDispatcher = { workInProgressRootRenderLanes = 0, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, + workInProgressRootIsPrerendering = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = 0, @@ -10274,7 +10297,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10285,7 +10309,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -10307,7 +10332,13 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (0 !== didTimeout) { var renderWasConcurrent = shouldTimeSlice; do { - if (6 === didTimeout) markRootSuspended(root, lanes, 0); + if (6 === didTimeout) + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -10339,7 +10370,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } if (1 === didTimeout) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -10355,7 +10391,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -10377,7 +10414,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -10389,7 +10427,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -10402,7 +10441,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -10454,7 +10494,8 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -10473,7 +10514,7 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -10521,25 +10562,28 @@ function isRenderConsistentWithExternalStores(finishedWork) { function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0)); executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended(root, suspendedLanes, spawnedLane) { +function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings +) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5; - expirationTimes[index$5] = -1; + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didSkipSuspendedSiblings[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10566,13 +10610,18 @@ function performSyncWorkOnRoot(root, lanes) { if (1 === exitStatus) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (6 === exitStatus) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -10625,6 +10674,10 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; + workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); workInProgressRootDidAttachPingListener = !1; workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -10643,9 +10696,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$3 = 31 - clz32(allEntangledLanes), - lane = 1 << index$3; - lanes |= root[index$3]; + var index$4 = 31 - clz32(allEntangledLanes), + lane = 1 << index$4; + lanes |= root[index$4]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -10657,12 +10710,7 @@ function handleThrow(root, thrownValue) { ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), - (workInProgressSuspendedReason = - shouldRemainOnPreviousScreen() && - 0 === (workInProgressRootSkippedLanes & 134217727) && - 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) - ? 2 - : 3)) + (workInProgressSuspendedReason = 3)) : thrownValue === SuspenseyCommitException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = 4)) @@ -10682,21 +10730,6 @@ function handleThrow(root, thrownValue) { createCapturedValueAtFiber(thrownValue, root.current) )); } -function shouldRemainOnPreviousScreen() { - var handler = suspenseHandlerStackCursor.current; - return null === handler - ? !0 - : (workInProgressRootRenderLanes & 4194176) === - workInProgressRootRenderLanes - ? null === shellBoundary - ? !0 - : !1 - : (workInProgressRootRenderLanes & 62914560) === - workInProgressRootRenderLanes || - 0 !== (workInProgressRootRenderLanes & 536870912) - ? handler === shellBoundary - : !1; -} function pushDispatcher() { var prevDispatcher = ReactSharedInternals.H; ReactSharedInternals.H = ContextOnlyDispatcher; @@ -10715,7 +10748,8 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function queueConcurrentError(error) { @@ -10754,8 +10788,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$171) { - handleThrow(root, thrownValue$171); + } catch (thrownValue$172) { + handleThrow(root, thrownValue$172); } while (1); lanes && root.shellSuspendCounter++; @@ -10864,8 +10898,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$173) { - handleThrow(root, thrownValue$173); + } catch (thrownValue$174) { + handleThrow(root, thrownValue$174); } while (1); resetContextDependencies(); @@ -10957,31 +10991,25 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = 6; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? (isHydrating || 1 === workInProgressSuspendedReason + ? (root = !0) + : workInProgressRootIsPrerendering + ? (root = !1) + : (workInProgressRootDidSkipSuspendedSiblings = root = !0), + unwindUnitOfWork(unitOfWork, root)) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings + ); + return; + } unitOfWork = completedWork.return; var next = completeWork( completedWork.alternate, @@ -11001,6 +11029,29 @@ function completeUnitOfWork(unitOfWork) { } while (null !== completedWork); 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5); } +function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = 6; + workInProgress = null; +} function commitRoot( root, recoverableErrors, @@ -11123,7 +11174,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$177 = rootWithPendingPassiveEffects, + var root$178 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11162,7 +11213,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$177, remainingLanes); + releaseRootPooledCache(root$178, remainingLanes); } } return !1; @@ -11233,6 +11284,7 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); @@ -11318,14 +11370,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$179 = firstScheduledRoot; null !== root$179; ) { + for (var root$180 = firstScheduledRoot; null !== root$180; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$179.pendingLanes; + var pendingLanes = root$180.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$179.suspendedLanes, - pingedLanes = root$179.pingedLanes; + var suspendedLanes = root$180.suspendedLanes, + pingedLanes = root$180.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -11339,17 +11391,17 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$179, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$180, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$179, - root$179 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$180, + root$180 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 !== (JSCompiler_inline_result & 3) && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$179, JSCompiler_inline_result)); - root$179 = root$179.next; + performSyncWorkOnRoot(root$180, JSCompiler_inline_result)); + root$180 = root$180.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -11390,12 +11442,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4, - expirationTime = expirationTimes[index$4]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$4] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -11559,20 +11611,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1388 = 0; - i$jscomp$inline_1388 < simpleEventPluginEvents.length; - i$jscomp$inline_1388++ + var i$jscomp$inline_1391 = 0; + i$jscomp$inline_1391 < simpleEventPluginEvents.length; + i$jscomp$inline_1391++ ) { - var eventName$jscomp$inline_1389 = - simpleEventPluginEvents[i$jscomp$inline_1388], - domEventName$jscomp$inline_1390 = - eventName$jscomp$inline_1389.toLowerCase(), - capitalizedEvent$jscomp$inline_1391 = - eventName$jscomp$inline_1389[0].toUpperCase() + - eventName$jscomp$inline_1389.slice(1); + var eventName$jscomp$inline_1392 = + simpleEventPluginEvents[i$jscomp$inline_1391], + domEventName$jscomp$inline_1393 = + eventName$jscomp$inline_1392.toLowerCase(), + capitalizedEvent$jscomp$inline_1394 = + eventName$jscomp$inline_1392[0].toUpperCase() + + eventName$jscomp$inline_1392.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1390, - "on" + capitalizedEvent$jscomp$inline_1391 + domEventName$jscomp$inline_1393, + "on" + capitalizedEvent$jscomp$inline_1394 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -12755,34 +12807,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$193 = props[hasSrc]; - if (null != propValue$193) + var propValue$194 = props[hasSrc]; + if (null != propValue$194) switch (hasSrc) { case "name": - hasSrcSet = propValue$193; + hasSrcSet = propValue$194; break; case "type": - propValue = propValue$193; + propValue = propValue$194; break; case "checked": - checked = propValue$193; + checked = propValue$194; break; case "defaultChecked": - defaultChecked = propValue$193; + defaultChecked = propValue$194; break; case "value": - propKey = propValue$193; + propKey = propValue$194; break; case "defaultValue": - defaultValue = propValue$193; + defaultValue = propValue$194; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$193) + if (null != propValue$194) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$193, props, null); + setProp(domElement, tag, hasSrc, propValue$194, props, null); } } initInput( @@ -12919,14 +12971,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$193 in props) - props.hasOwnProperty(propValue$193) && - ((hasSrc = props[propValue$193]), + for (propValue$194 in props) + props.hasOwnProperty(propValue$194) && + ((hasSrc = props[propValue$194]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$193, + propValue$194, hasSrc, props, void 0 @@ -12974,14 +13026,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$210 in nextProps) { - var propKey = nextProps[propKey$210]; - lastProp = lastProps[propKey$210]; + for (var propKey$211 in nextProps) { + var propKey = nextProps[propKey$211]; + lastProp = lastProps[propKey$211]; if ( - nextProps.hasOwnProperty(propKey$210) && + nextProps.hasOwnProperty(propKey$211) && (null != propKey || null != lastProp) ) - switch (propKey$210) { + switch (propKey$211) { case "type": type = propKey; break; @@ -13010,7 +13062,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$210, + propKey$211, propKey, nextProps, lastProp @@ -13029,7 +13081,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$210 = null; + propKey = value = defaultValue = propKey$211 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13060,7 +13112,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$210 = type; + propKey$211 = type; break; case "defaultValue": defaultValue = type; @@ -13081,15 +13133,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$210 - ? updateOptions(domElement, !!lastProps, propKey$210, !1) + null != propKey$211 + ? updateOptions(domElement, !!lastProps, propKey$211, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$210 = null; + propKey = propKey$211 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -13113,7 +13165,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$210 = name; + propKey$211 = name; break; case "defaultValue": propKey = name; @@ -13127,17 +13179,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$210, propKey); + updateTextarea(domElement, propKey$211, propKey); return; case "option": - for (var propKey$226 in lastProps) + for (var propKey$227 in lastProps) if ( - ((propKey$210 = lastProps[propKey$226]), - lastProps.hasOwnProperty(propKey$226) && - null != propKey$210 && - !nextProps.hasOwnProperty(propKey$226)) + ((propKey$211 = lastProps[propKey$227]), + lastProps.hasOwnProperty(propKey$227) && + null != propKey$211 && + !nextProps.hasOwnProperty(propKey$227)) ) - switch (propKey$226) { + switch (propKey$227) { case "selected": domElement.selected = !1; break; @@ -13145,33 +13197,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$226, + propKey$227, null, nextProps, - propKey$210 + propKey$211 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$210 = nextProps[lastDefaultValue]), + ((propKey$211 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$210 !== propKey && - (null != propKey$210 || null != propKey)) + propKey$211 !== propKey && + (null != propKey$211 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$210 && - "function" !== typeof propKey$210 && - "symbol" !== typeof propKey$210; + propKey$211 && + "function" !== typeof propKey$211 && + "symbol" !== typeof propKey$211; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$210, + propKey$211, nextProps, propKey ); @@ -13192,24 +13244,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$231 in lastProps) - (propKey$210 = lastProps[propKey$231]), - lastProps.hasOwnProperty(propKey$231) && - null != propKey$210 && - !nextProps.hasOwnProperty(propKey$231) && - setProp(domElement, tag, propKey$231, null, nextProps, propKey$210); + for (var propKey$232 in lastProps) + (propKey$211 = lastProps[propKey$232]), + lastProps.hasOwnProperty(propKey$232) && + null != propKey$211 && + !nextProps.hasOwnProperty(propKey$232) && + setProp(domElement, tag, propKey$232, null, nextProps, propKey$211); for (checked in nextProps) if ( - ((propKey$210 = nextProps[checked]), + ((propKey$211 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$210 !== propKey && - (null != propKey$210 || null != propKey)) + propKey$211 !== propKey && + (null != propKey$211 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$210) + if (null != propKey$211) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -13217,7 +13269,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$210, + propKey$211, nextProps, propKey ); @@ -13225,49 +13277,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$236 in lastProps) - (propKey$210 = lastProps[propKey$236]), - lastProps.hasOwnProperty(propKey$236) && - void 0 !== propKey$210 && - !nextProps.hasOwnProperty(propKey$236) && + for (var propKey$237 in lastProps) + (propKey$211 = lastProps[propKey$237]), + lastProps.hasOwnProperty(propKey$237) && + void 0 !== propKey$211 && + !nextProps.hasOwnProperty(propKey$237) && setPropOnCustomElement( domElement, tag, - propKey$236, + propKey$237, void 0, nextProps, - propKey$210 + propKey$211 ); for (defaultChecked in nextProps) - (propKey$210 = nextProps[defaultChecked]), + (propKey$211 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$210 === propKey || - (void 0 === propKey$210 && void 0 === propKey) || + propKey$211 === propKey || + (void 0 === propKey$211 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$210, + propKey$211, nextProps, propKey ); return; } } - for (var propKey$241 in lastProps) - (propKey$210 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - null != propKey$210 && - !nextProps.hasOwnProperty(propKey$241) && - setProp(domElement, tag, propKey$241, null, nextProps, propKey$210); + for (var propKey$242 in lastProps) + (propKey$211 = lastProps[propKey$242]), + lastProps.hasOwnProperty(propKey$242) && + null != propKey$211 && + !nextProps.hasOwnProperty(propKey$242) && + setProp(domElement, tag, propKey$242, null, nextProps, propKey$211); for (lastProp in nextProps) - (propKey$210 = nextProps[lastProp]), + (propKey$211 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$210 === propKey || - (null == propKey$210 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$210, nextProps, propKey); + propKey$211 === propKey || + (null == propKey$211 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$211, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -13812,26 +13864,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$249 = getResourcesFromRoot( + var styles$250 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$250 = styles$249.get(type); - resource$250 || + resource$251 = styles$250.get(type); + resource$251 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$250 = { + (resource$251 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$249.set(type, resource$250), - (styles$249 = JSCompiler_inline_result.querySelector( + styles$250.set(type, resource$251), + (styles$250 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$249._p && - ((resource$250.instance = styles$249), - (resource$250.state.loading = 5)), + !styles$250._p && + ((resource$251.instance = styles$250), + (resource$251.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -13844,16 +13896,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$249 || + styles$250 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$250.state + resource$251.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$250; + return resource$251; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -13950,37 +14002,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$255 = hoistableRoot.querySelector( + var instance$256 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$255) + if (instance$256) return ( (resource.state.loading |= 4), - (resource.instance = instance$255), - markNodeAsHoistable(instance$255), - instance$255 + (resource.instance = instance$256), + markNodeAsHoistable(instance$256), + instance$256 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$255 = ( + instance$256 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$255); - var linkInstance = instance$255; + markNodeAsHoistable(instance$256); + var linkInstance = instance$256; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$255, "link", instance); + setInitialProperties(instance$256, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$255, props.precedence, hoistableRoot); - return (resource.instance = instance$255); + insertStylesheet(instance$256, props.precedence, hoistableRoot); + return (resource.instance = instance$256); case "script": - instance$255 = getScriptKey(props.src); + instance$256 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$255) + getScriptSelectorFromKey(instance$256) )) ) return ( @@ -13989,7 +14041,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$255))) + if ((styleProps = preloadPropsMap.get(instance$256))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -14312,6 +14364,7 @@ function FiberRootNode( this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -15012,16 +15065,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1635 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1638 = React.version; if ( - "19.0.0-experimental-7771d3a7-20240827" !== - isomorphicReactPackageVersion$jscomp$inline_1635 + "19.0.0-experimental-4c58fce7-20240904" !== + isomorphicReactPackageVersion$jscomp$inline_1638 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1635, - "19.0.0-experimental-7771d3a7-20240827" + isomorphicReactPackageVersion$jscomp$inline_1638, + "19.0.0-experimental-4c58fce7-20240904" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15041,25 +15094,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2043 = { +var internals$jscomp$inline_2049 = { bundleType: 0, - version: "19.0.0-experimental-7771d3a7-20240827", + version: "19.0.0-experimental-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-7771d3a7-20240827" + reconcilerVersion: "19.0.0-experimental-4c58fce7-20240904" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2044 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2050 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2044.isDisabled && - hook$jscomp$inline_2044.supportsFiber + !hook$jscomp$inline_2050.isDisabled && + hook$jscomp$inline_2050.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2044.inject( - internals$jscomp$inline_2043 + (rendererID = hook$jscomp$inline_2050.inject( + internals$jscomp$inline_2049 )), - (injectedHook = hook$jscomp$inline_2044); + (injectedHook = hook$jscomp$inline_2050); } catch (err) {} } exports.createRoot = function (container, options) { @@ -15151,4 +15204,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js index f51edc5ffb27b5..9b89d1ecacb91c 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js @@ -1102,28 +1102,37 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -1202,6 +1211,7 @@ root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -5863,6 +5873,14 @@ } function finishRenderingHooks(current, workInProgress) { workInProgress._debugHookTypes = hookTypesDev; + null === workInProgress.dependencies + ? null !== thenableState && + (workInProgress.dependencies = { + lanes: 0, + firstContext: null, + _debugThenableState: thenableState + }) + : (workInProgress.dependencies._debugThenableState = thenableState); ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; @@ -8703,33 +8721,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2311; - var JSCompiler_object_inline_stack_2310 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2314; + var JSCompiler_object_inline_stack_2313 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2308 = !1; + var JSCompiler_object_inline_message_2311 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2311 = didSuspend) || - (JSCompiler_object_inline_componentStack_2311 = + (JSCompiler_object_inline_componentStack_2314 = didSuspend) || + (JSCompiler_object_inline_componentStack_2314 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2311 && - ((JSCompiler_object_inline_message_2308 = !0), + JSCompiler_object_inline_componentStack_2314 && + ((JSCompiler_object_inline_message_2311 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2311 = + JSCompiler_object_inline_componentStack_2314 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2308 + JSCompiler_object_inline_message_2311 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2309 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2312 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2309)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2312)) { c: { - var instance = JSCompiler_object_inline_digest_2309; + var instance = JSCompiler_object_inline_digest_2312; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8770,19 +8788,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2309 + JSCompiler_object_inline_digest_2312 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2309 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2312 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2309 && - ((JSCompiler_object_inline_digest_2309 = - JSCompiler_object_inline_digest_2309.dehydrated), - null !== JSCompiler_object_inline_digest_2309) + null !== JSCompiler_object_inline_digest_2312 && + ((JSCompiler_object_inline_digest_2312 = + JSCompiler_object_inline_digest_2312.dehydrated), + null !== JSCompiler_object_inline_digest_2312) ) return ( - JSCompiler_object_inline_digest_2309.data === + JSCompiler_object_inline_digest_2312.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8790,68 +8808,68 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2309 = - JSCompiler_object_inline_stack_2310.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2310.fallback; - if (JSCompiler_object_inline_message_2308) + JSCompiler_object_inline_digest_2312 = + JSCompiler_object_inline_stack_2313.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2313.fallback; + if (JSCompiler_object_inline_message_2311) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2310 = + (JSCompiler_object_inline_stack_2313 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2309, + JSCompiler_object_inline_digest_2312, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2308 = workInProgress.child), - (JSCompiler_object_inline_message_2308.memoizedState = + (JSCompiler_object_inline_message_2311 = workInProgress.child), + (JSCompiler_object_inline_message_2311.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2308.childLanes = + (JSCompiler_object_inline_message_2311.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2311, + JSCompiler_object_inline_componentStack_2314, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2310 + JSCompiler_object_inline_stack_2313 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2310.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2313.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2310 = + (JSCompiler_object_inline_stack_2313 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2309, + JSCompiler_object_inline_digest_2312, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2308 = workInProgress.child), - (JSCompiler_object_inline_message_2308.memoizedState = + (JSCompiler_object_inline_message_2311 = workInProgress.child), + (JSCompiler_object_inline_message_2311.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2308.childLanes = + (JSCompiler_object_inline_message_2311.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2311, + JSCompiler_object_inline_componentStack_2314, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2310 + JSCompiler_object_inline_stack_2313 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2309 + JSCompiler_object_inline_digest_2312 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2309 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2309) + ((JSCompiler_object_inline_digest_2312 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2312) ) { if (didSuspend) workInProgress.flags & 256 @@ -8868,94 +8886,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2308 = - JSCompiler_object_inline_stack_2310.fallback), - (JSCompiler_object_inline_digest_2309 = workInProgress.mode), - (JSCompiler_object_inline_stack_2310 = + (JSCompiler_object_inline_message_2311 = + JSCompiler_object_inline_stack_2313.fallback), + (JSCompiler_object_inline_digest_2312 = workInProgress.mode), + (JSCompiler_object_inline_stack_2313 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2310.children + children: JSCompiler_object_inline_stack_2313.children }, - JSCompiler_object_inline_digest_2309 + JSCompiler_object_inline_digest_2312 )), - (JSCompiler_object_inline_message_2308 = + (JSCompiler_object_inline_message_2311 = createFiberFromFragment( - JSCompiler_object_inline_message_2308, - JSCompiler_object_inline_digest_2309, + JSCompiler_object_inline_message_2311, + JSCompiler_object_inline_digest_2312, renderLanes, null )), - (JSCompiler_object_inline_message_2308.flags |= 2), - (JSCompiler_object_inline_stack_2310.return = workInProgress), - (JSCompiler_object_inline_message_2308.return = workInProgress), - (JSCompiler_object_inline_stack_2310.sibling = - JSCompiler_object_inline_message_2308), - (workInProgress.child = JSCompiler_object_inline_stack_2310), + (JSCompiler_object_inline_message_2311.flags |= 2), + (JSCompiler_object_inline_stack_2313.return = workInProgress), + (JSCompiler_object_inline_message_2311.return = workInProgress), + (JSCompiler_object_inline_stack_2313.sibling = + JSCompiler_object_inline_message_2311), + (workInProgress.child = JSCompiler_object_inline_stack_2313), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2310 = workInProgress.child), - (JSCompiler_object_inline_stack_2310.memoizedState = + (JSCompiler_object_inline_stack_2313 = workInProgress.child), + (JSCompiler_object_inline_stack_2313.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2310.childLanes = + (JSCompiler_object_inline_stack_2313.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2311, + JSCompiler_object_inline_componentStack_2314, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2308)); + (workInProgress = JSCompiler_object_inline_message_2311)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_digest_2309.data === + JSCompiler_object_inline_digest_2312.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_componentStack_2311 = - JSCompiler_object_inline_digest_2309.nextSibling && - JSCompiler_object_inline_digest_2309.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2311) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2311.dgst; - var message = JSCompiler_object_inline_componentStack_2311.msg; - instance = JSCompiler_object_inline_componentStack_2311.stck; + JSCompiler_object_inline_componentStack_2314 = + JSCompiler_object_inline_digest_2312.nextSibling && + JSCompiler_object_inline_digest_2312.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2314) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2314.dgst; + var message = JSCompiler_object_inline_componentStack_2314.msg; + instance = JSCompiler_object_inline_componentStack_2314.stck; var componentStack = - JSCompiler_object_inline_componentStack_2311.cstck; + JSCompiler_object_inline_componentStack_2314.cstck; } - JSCompiler_object_inline_message_2308 = message; - JSCompiler_object_inline_digest_2309 = JSCompiler_temp; - JSCompiler_object_inline_stack_2310 = instance; - JSCompiler_object_inline_componentStack_2311 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2309 && - ((JSCompiler_object_inline_message_2308 = - JSCompiler_object_inline_message_2308 - ? Error(JSCompiler_object_inline_message_2308) + JSCompiler_object_inline_message_2311 = message; + JSCompiler_object_inline_digest_2312 = JSCompiler_temp; + JSCompiler_object_inline_stack_2313 = instance; + JSCompiler_object_inline_componentStack_2314 = componentStack; + "POSTPONE" !== JSCompiler_object_inline_digest_2312 && + ((JSCompiler_object_inline_message_2311 = + JSCompiler_object_inline_message_2311 + ? Error(JSCompiler_object_inline_message_2311) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_message_2308.stack = - JSCompiler_object_inline_stack_2310 || ""), - (JSCompiler_object_inline_message_2308.digest = - JSCompiler_object_inline_digest_2309), - (JSCompiler_object_inline_componentStack_2311 = - void 0 === JSCompiler_object_inline_componentStack_2311 + (JSCompiler_object_inline_message_2311.stack = + JSCompiler_object_inline_stack_2313 || ""), + (JSCompiler_object_inline_message_2311.digest = + JSCompiler_object_inline_digest_2312), + (JSCompiler_object_inline_componentStack_2314 = + void 0 === JSCompiler_object_inline_componentStack_2314 ? null - : JSCompiler_object_inline_componentStack_2311), - "string" === typeof JSCompiler_object_inline_componentStack_2311 && + : JSCompiler_object_inline_componentStack_2314), + "string" === typeof JSCompiler_object_inline_componentStack_2314 && CapturedStacks.set( - JSCompiler_object_inline_message_2308, - JSCompiler_object_inline_componentStack_2311 + JSCompiler_object_inline_message_2311, + JSCompiler_object_inline_componentStack_2314 ), queueHydrationError({ - value: JSCompiler_object_inline_message_2308, + value: JSCompiler_object_inline_message_2311, source: null, - stack: JSCompiler_object_inline_componentStack_2311 + stack: JSCompiler_object_inline_componentStack_2314 })); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8970,25 +8988,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2311 = + (JSCompiler_object_inline_componentStack_2314 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2311) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2314) ) { - JSCompiler_object_inline_componentStack_2311 = workInProgressRoot; - if (null !== JSCompiler_object_inline_componentStack_2311) { - JSCompiler_object_inline_stack_2310 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2310 & 42)) - JSCompiler_object_inline_stack_2310 = 1; + JSCompiler_object_inline_componentStack_2314 = workInProgressRoot; + if (null !== JSCompiler_object_inline_componentStack_2314) { + JSCompiler_object_inline_stack_2313 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2313 & 42)) + JSCompiler_object_inline_stack_2313 = 1; else - switch (JSCompiler_object_inline_stack_2310) { + switch (JSCompiler_object_inline_stack_2313) { case 2: - JSCompiler_object_inline_stack_2310 = 1; + JSCompiler_object_inline_stack_2313 = 1; break; case 8: - JSCompiler_object_inline_stack_2310 = 4; + JSCompiler_object_inline_stack_2313 = 4; break; case 32: - JSCompiler_object_inline_stack_2310 = 16; + JSCompiler_object_inline_stack_2313 = 16; break; case 128: case 256: @@ -9009,40 +9027,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2310 = 64; + JSCompiler_object_inline_stack_2313 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2310 = 134217728; + JSCompiler_object_inline_stack_2313 = 134217728; break; default: - JSCompiler_object_inline_stack_2310 = 0; + JSCompiler_object_inline_stack_2313 = 0; } - JSCompiler_object_inline_stack_2310 = + JSCompiler_object_inline_stack_2313 = 0 !== - (JSCompiler_object_inline_stack_2310 & - (JSCompiler_object_inline_componentStack_2311.suspendedLanes | + (JSCompiler_object_inline_stack_2313 & + (JSCompiler_object_inline_componentStack_2314.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2310; + : JSCompiler_object_inline_stack_2313; if ( - 0 !== JSCompiler_object_inline_stack_2310 && - JSCompiler_object_inline_stack_2310 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2313 && + JSCompiler_object_inline_stack_2313 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2310), + ((prevState.retryLane = JSCompiler_object_inline_stack_2313), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2310 + JSCompiler_object_inline_stack_2313 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2311, + JSCompiler_object_inline_componentStack_2314, current, - JSCompiler_object_inline_stack_2310 + JSCompiler_object_inline_stack_2313 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_digest_2309.data === + JSCompiler_object_inline_digest_2312.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9050,7 +9068,7 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2309.data === + JSCompiler_object_inline_digest_2312.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9058,12 +9076,12 @@ null, current )), - (JSCompiler_object_inline_digest_2309._reactRetry = + (JSCompiler_object_inline_digest_2312._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2309.nextSibling + JSCompiler_object_inline_digest_2312.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9081,54 +9099,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2310.children + JSCompiler_object_inline_stack_2313.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2308) + if (JSCompiler_object_inline_message_2311) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2308 = - JSCompiler_object_inline_stack_2310.fallback), - (JSCompiler_object_inline_digest_2309 = workInProgress.mode), + (JSCompiler_object_inline_message_2311 = + JSCompiler_object_inline_stack_2313.fallback), + (JSCompiler_object_inline_digest_2312 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2310 = createWorkInProgress( + (JSCompiler_object_inline_stack_2313 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2310.children + children: JSCompiler_object_inline_stack_2313.children } )), - (JSCompiler_object_inline_stack_2310.subtreeFlags = + (JSCompiler_object_inline_stack_2313.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_message_2308 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2311 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2308 + JSCompiler_object_inline_message_2311 )) - : ((JSCompiler_object_inline_message_2308 = createFiberFromFragment( - JSCompiler_object_inline_message_2308, - JSCompiler_object_inline_digest_2309, + : ((JSCompiler_object_inline_message_2311 = createFiberFromFragment( + JSCompiler_object_inline_message_2311, + JSCompiler_object_inline_digest_2312, renderLanes, null )), - (JSCompiler_object_inline_message_2308.flags |= 2)), - (JSCompiler_object_inline_message_2308.return = workInProgress), - (JSCompiler_object_inline_stack_2310.return = workInProgress), - (JSCompiler_object_inline_stack_2310.sibling = - JSCompiler_object_inline_message_2308), - (workInProgress.child = JSCompiler_object_inline_stack_2310), - (JSCompiler_object_inline_stack_2310 = - JSCompiler_object_inline_message_2308), - (JSCompiler_object_inline_message_2308 = workInProgress.child), - (JSCompiler_object_inline_digest_2309 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2309 - ? (JSCompiler_object_inline_digest_2309 = + (JSCompiler_object_inline_message_2311.flags |= 2)), + (JSCompiler_object_inline_message_2311.return = workInProgress), + (JSCompiler_object_inline_stack_2313.return = workInProgress), + (JSCompiler_object_inline_stack_2313.sibling = + JSCompiler_object_inline_message_2311), + (workInProgress.child = JSCompiler_object_inline_stack_2313), + (JSCompiler_object_inline_stack_2313 = + JSCompiler_object_inline_message_2311), + (JSCompiler_object_inline_message_2311 = workInProgress.child), + (JSCompiler_object_inline_digest_2312 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2312 + ? (JSCompiler_object_inline_digest_2312 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2309.cachePool), + JSCompiler_object_inline_digest_2312.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9136,38 +9154,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2309 = { + (JSCompiler_object_inline_digest_2312 = { baseLanes: - JSCompiler_object_inline_digest_2309.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2312.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2308.memoizedState = - JSCompiler_object_inline_digest_2309), - (JSCompiler_object_inline_message_2308.childLanes = + (JSCompiler_object_inline_message_2311.memoizedState = + JSCompiler_object_inline_digest_2312), + (JSCompiler_object_inline_message_2311.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2311, + JSCompiler_object_inline_componentStack_2314, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2310 + JSCompiler_object_inline_stack_2313 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2310.children + children: JSCompiler_object_inline_stack_2313.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2311 = + ((JSCompiler_object_inline_componentStack_2314 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2311 + null === JSCompiler_object_inline_componentStack_2314 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2311.push(current)); + : JSCompiler_object_inline_componentStack_2314.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10452,7 +10470,11 @@ "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; @@ -13367,7 +13389,8 @@ ? null : { lanes: pendingProps.lanes, - firstContext: pendingProps.firstContext + firstContext: pendingProps.firstContext, + _debugThenableState: pendingProps._debugThenableState }; workInProgress.sibling = current.sibling; workInProgress.index = current.index; @@ -13420,7 +13443,8 @@ ? null : { lanes: renderLanes.lanes, - firstContext: renderLanes.firstContext + firstContext: renderLanes.firstContext, + _debugThenableState: renderLanes._debugThenableState }), (workInProgress.selfBaseDuration = current.selfBaseDuration), (workInProgress.treeBaseDuration = current.treeBaseDuration)); @@ -13642,13 +13666,26 @@ (resource.state.loading & Inserted) !== NotLoaded ) workInProgress.flags &= -16777217; - else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) - if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192; - else + else if ( + ((workInProgress.flags |= 16777216), !preloadResource(resource)) + ) { + resource = suspenseHandlerStackCursor.current; + if ( + null !== resource && + ((workInProgressRootRenderLanes & 4194176) === + workInProgressRootRenderLanes + ? null !== shellBoundary + : ((workInProgressRootRenderLanes & 62914560) !== + workInProgressRootRenderLanes && + 0 === (workInProgressRootRenderLanes & 536870912)) || + resource !== shellBoundary) + ) throw ( ((suspendedThenable = noopSuspenseyCommitThenable), SuspenseyCommitException) ); + workInProgress.flags |= 8192; + } } function scheduleRetryEffect(workInProgress, retryQueue) { null !== retryQueue @@ -14453,7 +14490,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if ( @@ -14495,7 +14533,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -14520,7 +14559,12 @@ var renderWasConcurrent = shouldTimeSlice; do { if (didTimeout === RootDidNotComplete) - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -14552,7 +14596,12 @@ } if (didTimeout === RootFatalErrored) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -14568,7 +14617,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -14602,7 +14652,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -14614,7 +14665,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -14627,7 +14679,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -14682,7 +14735,8 @@ transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -14705,7 +14759,7 @@ didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -14753,26 +14807,31 @@ function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended(root, suspendedLanes, spawnedLane) { + function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings + ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - expirationTimes[index] = -1; + didSkipSuspendedSiblings[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -14802,13 +14861,18 @@ if (exitStatus === RootFatalErrored) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (exitStatus === RootDidNotComplete) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -14861,6 +14925,12 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; + workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressDeferredLane = @@ -14897,12 +14967,7 @@ current = null; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), - (workInProgressSuspendedReason = - shouldRemainOnPreviousScreen() && - 0 === (workInProgressRootSkippedLanes & 134217727) && - 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) - ? SuspendedOnData - : SuspendedOnImmediate)) + (workInProgressSuspendedReason = SuspendedOnImmediate)) : thrownValue === SuspenseyCommitException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = SuspendedOnInstance)) @@ -14953,21 +15018,6 @@ ); } } - function shouldRemainOnPreviousScreen() { - var handler = suspenseHandlerStackCursor.current; - return null === handler - ? !0 - : (workInProgressRootRenderLanes & 4194176) === - workInProgressRootRenderLanes - ? null === shellBoundary - ? !0 - : !1 - : (workInProgressRootRenderLanes & 62914560) === - workInProgressRootRenderLanes || - 0 !== (workInProgressRootRenderLanes & 536870912) - ? handler === shellBoundary - : !1; - } function pushDispatcher() { var prevDispatcher = ReactSharedInternals.H; ReactSharedInternals.H = ContextOnlyDispatcher; @@ -14986,7 +15036,8 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function queueConcurrentError(error) { @@ -15308,43 +15359,25 @@ workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - if ((root.mode & ProfileMode) !== NoMode) { - stopProfilerTimerIfRunningAndRecordDelta(root, !1); - unitOfWork = root.actualDuration; - for (thrownValue = root.child; null !== thrownValue; ) - (unitOfWork += thrownValue.actualDuration), - (thrownValue = thrownValue.sibling); - root.actualDuration = unitOfWork; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = RootDidNotComplete; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? (isHydrating || workInProgressSuspendedReason === SuspendedOnError + ? (root = !0) + : workInProgressRootIsPrerendering + ? (root = !1) + : (workInProgressRootDidSkipSuspendedSiblings = root = !0), + unwindUnitOfWork(unitOfWork, root)) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { - 0 !== (completedWork.flags & 32768) && - console.error( - "Internal React error: Expected this fiber to be complete, but it isn't. It should have been unwound. This is a bug in React." + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings ); + return; + } var current = completedWork.alternate; unitOfWork = completedWork.return; (completedWork.mode & ProfileMode) === NoMode @@ -15378,6 +15411,38 @@ workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted); } + function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + if ((unitOfWork.mode & ProfileMode) !== NoMode) { + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1); + next = unitOfWork.actualDuration; + for (var child = unitOfWork.child; null !== child; ) + (next += child.actualDuration), (child = child.sibling); + unitOfWork.actualDuration = next; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), + (next.subtreeFlags = 0), + (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = RootDidNotComplete; + workInProgress = null; + } function commitRoot( root, recoverableErrors, @@ -15775,6 +15840,7 @@ var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && @@ -20210,6 +20276,7 @@ this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -24096,6 +24163,8 @@ SuspendedOnHydration = 8, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, + workInProgressRootIsPrerendering = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = RootInProgress, @@ -24672,11 +24741,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24713,11 +24782,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-7771d3a7-20240827", + version: "19.0.0-experimental-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-7771d3a7-20240827" + reconcilerVersion: "19.0.0-experimental-4c58fce7-20240904" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25191,7 +25260,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js index 54ef1f04a431f3..780def86103782 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js @@ -678,28 +678,37 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -770,6 +779,7 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -781,18 +791,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$6 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$6; - remainingLanes[index$6] = 0; - expirationTimes[index$6] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$6]; + var index$7 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$7; + remainingLanes[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$6] = null, index$6 = 0; - index$6 < hiddenUpdatesForLane.length; - index$6++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$6]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -812,19 +822,19 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$7 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$7; - (lane & entangledLanes) | (root[index$7] & entangledLanes) && - (root[index$7] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index$9 = 31 - clz32(lanes), - lane = 1 << index$9; - root[index$9].add(fiber); + var index$10 = 31 - clz32(lanes), + lane = 1 << index$10; + root[index$10].add(fiber); lanes &= ~lane; } } @@ -836,16 +846,16 @@ function movePendingFibersToMemoized(root, lanes) { 0 < lanes; ) { - var index$10 = 31 - clz32(lanes); - root = 1 << index$10; - index$10 = pendingUpdatersLaneMap[index$10]; - 0 < index$10.size && - (index$10.forEach(function (fiber) { + var index$11 = 31 - clz32(lanes); + root = 1 << index$11; + index$11 = pendingUpdatersLaneMap[index$11]; + 0 < index$11.size && + (index$11.forEach(function (fiber) { var alternate = fiber.alternate; (null !== alternate && memoizedUpdaters.has(alternate)) || memoizedUpdaters.add(fiber); }), - index$10.clear()); + index$11.clear()); lanes &= ~root; } } @@ -995,8 +1005,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$11 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$11 && "aria-" !== prefix$11) { + var prefix$12 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$12 && "aria-" !== prefix$12) { node.removeAttribute(name); return; } @@ -1329,15 +1339,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$17 in styles) - (styleName = styles[styleName$17]), - styles.hasOwnProperty(styleName$17) && - prevStyles[styleName$17] !== styleName && - setValueForStyle(node, styleName$17, styleName); - } else for (var styleName$18 in styles) - styles.hasOwnProperty(styleName$18) && - setValueForStyle(node, styleName$18, styles[styleName$18]); + (styleName = styles[styleName$18]), + styles.hasOwnProperty(styleName$18) && + prevStyles[styleName$18] !== styleName && + setValueForStyle(node, styleName$18, styleName); + } else + for (var styleName$19 in styles) + styles.hasOwnProperty(styleName$19) && + setValueForStyle(node, styleName$19, styles[styleName$19]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -2066,19 +2076,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$311; + var JSCompiler_inline_result$jscomp$312; if (canUseDOM) { - var isSupported$jscomp$inline_447 = "oninput" in document; - if (!isSupported$jscomp$inline_447) { - var element$jscomp$inline_448 = document.createElement("div"); - element$jscomp$inline_448.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_447 = - "function" === typeof element$jscomp$inline_448.oninput; + var isSupported$jscomp$inline_448 = "oninput" in document; + if (!isSupported$jscomp$inline_448) { + var element$jscomp$inline_449 = document.createElement("div"); + element$jscomp$inline_449.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_448 = + "function" === typeof element$jscomp$inline_449.oninput; } - JSCompiler_inline_result$jscomp$311 = isSupported$jscomp$inline_447; - } else JSCompiler_inline_result$jscomp$311 = !1; + JSCompiler_inline_result$jscomp$312 = isSupported$jscomp$inline_448; + } else JSCompiler_inline_result$jscomp$312 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$311 && + JSCompiler_inline_result$jscomp$312 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -4012,7 +4022,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$56 = !1; + didReadFromEntangledAsyncAction$57 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -4033,11 +4043,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$56 = !0); + (didReadFromEntangledAsyncAction$57 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$56 = !0); + (didReadFromEntangledAsyncAction$57 = !0); continue; } else (updateLane = { @@ -4083,7 +4093,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$56 && + didReadFromEntangledAsyncAction$57 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4281,8 +4291,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$62) { - onActionError(actionQueue, node, error$62); + } catch (error$63) { + onActionError(actionQueue, node, error$63); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4720,14 +4730,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$65 = enqueueUpdate(provider, fiber, lane); - null !== root$65 && - (scheduleUpdateOnFiber(root$65, provider, lane), - entangleTransitions(root$65, provider, lane)); + var root$66 = enqueueUpdate(provider, fiber, lane); + null !== root$66 && + (scheduleUpdateOnFiber(root$66, provider, lane), + entangleTransitions(root$66, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$65 && + null !== root$66 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -5261,9 +5271,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$71) { + } catch (e$72) { setTimeout(function () { - throw e$71; + throw e$72; }); } } @@ -5274,9 +5284,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$72) { + } catch (e$73) { setTimeout(function () { - throw e$72; + throw e$73; }); } } @@ -7739,9 +7749,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$117 in Component) - void 0 === newProps[propName$117] && - (newProps[propName$117] = Component[propName$117]); + for (var propName$118 in Component) + void 0 === newProps[propName$118] && + (newProps[propName$118] = Component[propName$118]); } return newProps; } @@ -7776,8 +7786,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$118) { - captureCommitPhaseError(current, nearestMountedAncestor, error$118); + } catch (error$119) { + captureCommitPhaseError(current, nearestMountedAncestor, error$119); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -7837,8 +7847,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$119) { - captureCommitPhaseError(current, nearestMountedAncestor, error$119); + } catch (error$120) { + captureCommitPhaseError(current, nearestMountedAncestor, error$120); } else ref.current = null; } @@ -7874,7 +7884,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$21) { + } catch (e$22) { JSCompiler_temp = null; break a; } @@ -8094,8 +8104,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$123) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$123); + } catch (error$124) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$124); } } function commitClassCallbacks(finishedWork) { @@ -8197,11 +8207,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$124) { + } catch (error$125) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$124 + error$125 ); } else { @@ -8218,11 +8228,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$125) { + } catch (error$126) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$125 + error$126 ); } recordLayoutEffectDuration(finishedWork); @@ -8233,11 +8243,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$126) { + } catch (error$127) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$126 + error$127 ); } } @@ -8714,22 +8724,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$140) { + } catch (error$141) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$140 + error$141 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$141) { + } catch (error$142) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$141 + error$142 ); } } @@ -8903,11 +8913,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$142) { + } catch (error$143) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$142 + error$143 ); } break; @@ -8944,8 +8954,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$143) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$143); + } catch (error$144) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$144); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -8955,8 +8965,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$145) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$145); + } catch (error$146) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$146); } } flags & 1024 && (needsFormReset = !0); @@ -8971,8 +8981,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$146) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$146); + } catch (error$147) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$147); } } break; @@ -8986,8 +8996,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$147) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$147); + } catch (error$148) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$148); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -9081,11 +9091,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$130) { + } catch (error$131) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$130 + error$131 ); } } else if ( @@ -9154,21 +9164,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$131 = JSCompiler_inline_result.stateNode; + var parent$132 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$131, ""), + (setTextContent(parent$132, ""), (JSCompiler_inline_result.flags &= -33)); - var before$132 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$132, parent$131); + var before$133 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$133, parent$132); break; case 3: case 4: - var parent$133 = JSCompiler_inline_result.stateNode.containerInfo, - before$134 = getHostSibling(finishedWork); + var parent$134 = JSCompiler_inline_result.stateNode.containerInfo, + before$135 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$134, - parent$133 + before$135, + parent$134 ); break; default: @@ -9366,8 +9376,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$152) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$152); + } catch (error$153) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$153); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -10071,13 +10081,24 @@ function markUpdate(workInProgress) { function preloadResourceAndSuspendIfNeeded(workInProgress, resource) { if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4)) workInProgress.flags &= -16777217; - else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) - if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192; - else + else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) { + resource = suspenseHandlerStackCursor.current; + if ( + null !== resource && + ((workInProgressRootRenderLanes & 4194176) === + workInProgressRootRenderLanes + ? null !== shellBoundary + : ((workInProgressRootRenderLanes & 62914560) !== + workInProgressRootRenderLanes && + 0 === (workInProgressRootRenderLanes & 536870912)) || + resource !== shellBoundary) + ) throw ( ((suspendedThenable = noopSuspenseyCommitThenable), SuspenseyCommitException) ); + workInProgress.flags |= 8192; + } } function scheduleRetryEffect(workInProgress, retryQueue) { null !== retryQueue @@ -10102,14 +10123,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$158 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$158 = lastTailNode), + for (var lastTailNode$159 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$159 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$158 + null === lastTailNode$159 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$158.sibling = null); + : (lastTailNode$159.sibling = null); } } function bubbleProperties(completedWork) { @@ -10121,53 +10142,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$160 = completedWork.selfBaseDuration, - child$161 = completedWork.child; - null !== child$161; + var treeBaseDuration$161 = completedWork.selfBaseDuration, + child$162 = completedWork.child; + null !== child$162; ) - (newChildLanes |= child$161.lanes | child$161.childLanes), - (subtreeFlags |= child$161.subtreeFlags & 31457280), - (subtreeFlags |= child$161.flags & 31457280), - (treeBaseDuration$160 += child$161.treeBaseDuration), - (child$161 = child$161.sibling); - completedWork.treeBaseDuration = treeBaseDuration$160; + (newChildLanes |= child$162.lanes | child$162.childLanes), + (subtreeFlags |= child$162.subtreeFlags & 31457280), + (subtreeFlags |= child$162.flags & 31457280), + (treeBaseDuration$161 += child$162.treeBaseDuration), + (child$162 = child$162.sibling); + completedWork.treeBaseDuration = treeBaseDuration$161; } else for ( - treeBaseDuration$160 = completedWork.child; - null !== treeBaseDuration$160; + treeBaseDuration$161 = completedWork.child; + null !== treeBaseDuration$161; ) (newChildLanes |= - treeBaseDuration$160.lanes | treeBaseDuration$160.childLanes), - (subtreeFlags |= treeBaseDuration$160.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$160.flags & 31457280), - (treeBaseDuration$160.return = completedWork), - (treeBaseDuration$160 = treeBaseDuration$160.sibling); + treeBaseDuration$161.lanes | treeBaseDuration$161.childLanes), + (subtreeFlags |= treeBaseDuration$161.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$161.flags & 31457280), + (treeBaseDuration$161.return = completedWork), + (treeBaseDuration$161 = treeBaseDuration$161.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$160 = completedWork.actualDuration; - child$161 = completedWork.selfBaseDuration; + treeBaseDuration$161 = completedWork.actualDuration; + child$162 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$160 += child.actualDuration), - (child$161 += child.treeBaseDuration), + (treeBaseDuration$161 += child.actualDuration), + (child$162 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$160; - completedWork.treeBaseDuration = child$161; + completedWork.actualDuration = treeBaseDuration$161; + completedWork.treeBaseDuration = child$162; } else for ( - treeBaseDuration$160 = completedWork.child; - null !== treeBaseDuration$160; + treeBaseDuration$161 = completedWork.child; + null !== treeBaseDuration$161; ) (newChildLanes |= - treeBaseDuration$160.lanes | treeBaseDuration$160.childLanes), - (subtreeFlags |= treeBaseDuration$160.subtreeFlags), - (subtreeFlags |= treeBaseDuration$160.flags), - (treeBaseDuration$160.return = completedWork), - (treeBaseDuration$160 = treeBaseDuration$160.sibling); + treeBaseDuration$161.lanes | treeBaseDuration$161.childLanes), + (subtreeFlags |= treeBaseDuration$161.subtreeFlags), + (subtreeFlags |= treeBaseDuration$161.flags), + (treeBaseDuration$161.return = completedWork), + (treeBaseDuration$161 = treeBaseDuration$161.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10460,11 +10481,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$176 = null; + var cache$177 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$176 = newProps.memoizedState.cachePool.pool); - cache$176 !== type && (newProps.flags |= 2048); + (cache$177 = newProps.memoizedState.cachePool.pool); + cache$177 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -10494,8 +10515,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$176 = type.rendering; - if (null === cache$176) + cache$177 = type.rendering; + if (null === cache$177) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10503,11 +10524,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$176 = findFirstSuspended(current); - if (null !== cache$176) { + cache$177 = findFirstSuspended(current); + if (null !== cache$177) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$176.updateQueue; + current = cache$177.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10532,7 +10553,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$176)), null !== current)) { + if (((current = findFirstSuspended(cache$177)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10542,7 +10563,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$176.alternate && + !cache$177.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10555,13 +10576,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$176.sibling = workInProgress.child), - (workInProgress.child = cache$176)) + ? ((cache$177.sibling = workInProgress.child), + (workInProgress.child = cache$177)) : ((current = type.last), null !== current - ? (current.sibling = cache$176) - : (workInProgress.child = cache$176), - (type.last = cache$176)); + ? (current.sibling = cache$177) + : (workInProgress.child = cache$177), + (type.last = cache$177)); } if (null !== type.tail) return ( @@ -10743,6 +10764,8 @@ var DefaultAsyncDispatcher = { workInProgressRootRenderLanes = 0, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, + workInProgressRootIsPrerendering = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = 0, @@ -10794,7 +10817,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10806,7 +10830,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -10829,7 +10854,13 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (0 !== didTimeout) { var renderWasConcurrent = shouldTimeSlice; do { - if (6 === didTimeout) markRootSuspended(root, lanes, 0); + if (6 === didTimeout) + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -10861,7 +10892,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } if (1 === didTimeout) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -10877,7 +10913,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -10899,7 +10936,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -10911,7 +10949,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -10924,7 +10963,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -10976,7 +11016,8 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -10995,7 +11036,7 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -11043,25 +11084,28 @@ function isRenderConsistentWithExternalStores(finishedWork) { function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0)); executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended(root, suspendedLanes, spawnedLane) { +function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings +) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5; - expirationTimes[index$5] = -1; + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didSkipSuspendedSiblings[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11090,13 +11134,18 @@ function performSyncWorkOnRoot(root, lanes) { if (1 === exitStatus) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (6 === exitStatus) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -11149,6 +11198,10 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; + workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); workInProgressRootDidAttachPingListener = !1; workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -11167,9 +11220,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$3 = 31 - clz32(allEntangledLanes), - lane = 1 << index$3; - lanes |= root[index$3]; + var index$4 = 31 - clz32(allEntangledLanes), + lane = 1 << index$4; + lanes |= root[index$4]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -11181,12 +11234,7 @@ function handleThrow(root, thrownValue) { ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), - (workInProgressSuspendedReason = - shouldRemainOnPreviousScreen() && - 0 === (workInProgressRootSkippedLanes & 134217727) && - 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) - ? 2 - : 3)) + (workInProgressSuspendedReason = 3)) : thrownValue === SuspenseyCommitException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = 4)) @@ -11235,21 +11283,6 @@ function handleThrow(root, thrownValue) { ); } } -function shouldRemainOnPreviousScreen() { - var handler = suspenseHandlerStackCursor.current; - return null === handler - ? !0 - : (workInProgressRootRenderLanes & 4194176) === - workInProgressRootRenderLanes - ? null === shellBoundary - ? !0 - : !1 - : (workInProgressRootRenderLanes & 62914560) === - workInProgressRootRenderLanes || - 0 !== (workInProgressRootRenderLanes & 536870912) - ? handler === shellBoundary - : !1; -} function pushDispatcher() { var prevDispatcher = ReactSharedInternals.H; ReactSharedInternals.H = ContextOnlyDispatcher; @@ -11268,7 +11301,8 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function queueConcurrentError(error) { @@ -11317,8 +11351,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$191) { - handleThrow(root, thrownValue$191); + } catch (thrownValue$192) { + handleThrow(root, thrownValue$192); } while (1); lanes && root.shellSuspendCounter++; @@ -11438,8 +11472,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$193) { - handleThrow(root, thrownValue$193); + } catch (thrownValue$194) { + handleThrow(root, thrownValue$194); } while (1); resetContextDependencies(); @@ -11549,39 +11583,25 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - if (0 !== (root.mode & 2)) { - stopProfilerTimerIfRunningAndRecordDelta(root, !1); - unitOfWork = root.actualDuration; - for (thrownValue = root.child; null !== thrownValue; ) - (unitOfWork += thrownValue.actualDuration), - (thrownValue = thrownValue.sibling); - root.actualDuration = unitOfWork; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = 6; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? (isHydrating || 1 === workInProgressSuspendedReason + ? (root = !0) + : workInProgressRootIsPrerendering + ? (root = !1) + : (workInProgressRootDidSkipSuspendedSiblings = root = !0), + unwindUnitOfWork(unitOfWork, root)) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings + ); + return; + } var current = completedWork.alternate; unitOfWork = completedWork.return; 0 === (completedWork.mode & 2) @@ -11602,6 +11622,36 @@ function completeUnitOfWork(unitOfWork) { } while (null !== completedWork); 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5); } +function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + if (0 !== (unitOfWork.mode & 2)) { + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1); + next = unitOfWork.actualDuration; + for (var child = unitOfWork.child; null !== child; ) + (next += child.actualDuration), (child = child.sibling); + unitOfWork.actualDuration = next; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = 6; + workInProgress = null; +} function commitRoot( root, recoverableErrors, @@ -11737,7 +11787,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$197 = rootWithPendingPassiveEffects, + var root$198 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11782,7 +11832,7 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$121 = commitTime, + commitTime$122 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && @@ -11790,7 +11840,7 @@ function flushPassiveEffects() { id, phase, passiveEffectDuration, - commitTime$121 + commitTime$122 ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { @@ -11830,7 +11880,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$197, remainingLanes); + releaseRootPooledCache(root$198, remainingLanes); } } return !1; @@ -11911,6 +11961,7 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); @@ -12002,14 +12053,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$199 = firstScheduledRoot; null !== root$199; ) { + for (var root$200 = firstScheduledRoot; null !== root$200; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$199.pendingLanes; + var pendingLanes = root$200.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$199.suspendedLanes, - pingedLanes = root$199.pingedLanes; + var suspendedLanes = root$200.suspendedLanes, + pingedLanes = root$200.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12023,17 +12074,17 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$200, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$199, - root$199 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$200, + root$200 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 !== (JSCompiler_inline_result & 3) && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); - root$199 = root$199.next; + performSyncWorkOnRoot(root$200, JSCompiler_inline_result)); + root$200 = root$200.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12074,12 +12125,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4, - expirationTime = expirationTimes[index$4]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$4] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -12243,20 +12294,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1475 = 0; - i$jscomp$inline_1475 < simpleEventPluginEvents.length; - i$jscomp$inline_1475++ + var i$jscomp$inline_1476 = 0; + i$jscomp$inline_1476 < simpleEventPluginEvents.length; + i$jscomp$inline_1476++ ) { - var eventName$jscomp$inline_1476 = - simpleEventPluginEvents[i$jscomp$inline_1475], - domEventName$jscomp$inline_1477 = - eventName$jscomp$inline_1476.toLowerCase(), - capitalizedEvent$jscomp$inline_1478 = - eventName$jscomp$inline_1476[0].toUpperCase() + - eventName$jscomp$inline_1476.slice(1); + var eventName$jscomp$inline_1477 = + simpleEventPluginEvents[i$jscomp$inline_1476], + domEventName$jscomp$inline_1478 = + eventName$jscomp$inline_1477.toLowerCase(), + capitalizedEvent$jscomp$inline_1479 = + eventName$jscomp$inline_1477[0].toUpperCase() + + eventName$jscomp$inline_1477.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1477, - "on" + capitalizedEvent$jscomp$inline_1478 + domEventName$jscomp$inline_1478, + "on" + capitalizedEvent$jscomp$inline_1479 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13439,34 +13490,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$213 = props[hasSrc]; - if (null != propValue$213) + var propValue$214 = props[hasSrc]; + if (null != propValue$214) switch (hasSrc) { case "name": - hasSrcSet = propValue$213; + hasSrcSet = propValue$214; break; case "type": - propValue = propValue$213; + propValue = propValue$214; break; case "checked": - checked = propValue$213; + checked = propValue$214; break; case "defaultChecked": - defaultChecked = propValue$213; + defaultChecked = propValue$214; break; case "value": - propKey = propValue$213; + propKey = propValue$214; break; case "defaultValue": - defaultValue = propValue$213; + defaultValue = propValue$214; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$213) + if (null != propValue$214) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$213, props, null); + setProp(domElement, tag, hasSrc, propValue$214, props, null); } } initInput( @@ -13603,14 +13654,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$213 in props) - props.hasOwnProperty(propValue$213) && - ((hasSrc = props[propValue$213]), + for (propValue$214 in props) + props.hasOwnProperty(propValue$214) && + ((hasSrc = props[propValue$214]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$213, + propValue$214, hasSrc, props, void 0 @@ -13658,14 +13709,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$230 in nextProps) { - var propKey = nextProps[propKey$230]; - lastProp = lastProps[propKey$230]; + for (var propKey$231 in nextProps) { + var propKey = nextProps[propKey$231]; + lastProp = lastProps[propKey$231]; if ( - nextProps.hasOwnProperty(propKey$230) && + nextProps.hasOwnProperty(propKey$231) && (null != propKey || null != lastProp) ) - switch (propKey$230) { + switch (propKey$231) { case "type": type = propKey; break; @@ -13694,7 +13745,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$230, + propKey$231, propKey, nextProps, lastProp @@ -13713,7 +13764,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$230 = null; + propKey = value = defaultValue = propKey$231 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13744,7 +13795,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$230 = type; + propKey$231 = type; break; case "defaultValue": defaultValue = type; @@ -13765,15 +13816,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$230 - ? updateOptions(domElement, !!lastProps, propKey$230, !1) + null != propKey$231 + ? updateOptions(domElement, !!lastProps, propKey$231, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$230 = null; + propKey = propKey$231 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -13797,7 +13848,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$230 = name; + propKey$231 = name; break; case "defaultValue": propKey = name; @@ -13811,17 +13862,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$230, propKey); + updateTextarea(domElement, propKey$231, propKey); return; case "option": - for (var propKey$246 in lastProps) + for (var propKey$247 in lastProps) if ( - ((propKey$230 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$230 && - !nextProps.hasOwnProperty(propKey$246)) + ((propKey$231 = lastProps[propKey$247]), + lastProps.hasOwnProperty(propKey$247) && + null != propKey$231 && + !nextProps.hasOwnProperty(propKey$247)) ) - switch (propKey$246) { + switch (propKey$247) { case "selected": domElement.selected = !1; break; @@ -13829,33 +13880,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$246, + propKey$247, null, nextProps, - propKey$230 + propKey$231 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$230 = nextProps[lastDefaultValue]), + ((propKey$231 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$230 !== propKey && - (null != propKey$230 || null != propKey)) + propKey$231 !== propKey && + (null != propKey$231 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$230 && - "function" !== typeof propKey$230 && - "symbol" !== typeof propKey$230; + propKey$231 && + "function" !== typeof propKey$231 && + "symbol" !== typeof propKey$231; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$230, + propKey$231, nextProps, propKey ); @@ -13876,24 +13927,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$251 in lastProps) - (propKey$230 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - null != propKey$230 && - !nextProps.hasOwnProperty(propKey$251) && - setProp(domElement, tag, propKey$251, null, nextProps, propKey$230); + for (var propKey$252 in lastProps) + (propKey$231 = lastProps[propKey$252]), + lastProps.hasOwnProperty(propKey$252) && + null != propKey$231 && + !nextProps.hasOwnProperty(propKey$252) && + setProp(domElement, tag, propKey$252, null, nextProps, propKey$231); for (checked in nextProps) if ( - ((propKey$230 = nextProps[checked]), + ((propKey$231 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$230 !== propKey && - (null != propKey$230 || null != propKey)) + propKey$231 !== propKey && + (null != propKey$231 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$230) + if (null != propKey$231) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -13901,7 +13952,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$230, + propKey$231, nextProps, propKey ); @@ -13909,49 +13960,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$256 in lastProps) - (propKey$230 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - void 0 !== propKey$230 && - !nextProps.hasOwnProperty(propKey$256) && + for (var propKey$257 in lastProps) + (propKey$231 = lastProps[propKey$257]), + lastProps.hasOwnProperty(propKey$257) && + void 0 !== propKey$231 && + !nextProps.hasOwnProperty(propKey$257) && setPropOnCustomElement( domElement, tag, - propKey$256, + propKey$257, void 0, nextProps, - propKey$230 + propKey$231 ); for (defaultChecked in nextProps) - (propKey$230 = nextProps[defaultChecked]), + (propKey$231 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$230 === propKey || - (void 0 === propKey$230 && void 0 === propKey) || + propKey$231 === propKey || + (void 0 === propKey$231 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$230, + propKey$231, nextProps, propKey ); return; } } - for (var propKey$261 in lastProps) - (propKey$230 = lastProps[propKey$261]), - lastProps.hasOwnProperty(propKey$261) && - null != propKey$230 && - !nextProps.hasOwnProperty(propKey$261) && - setProp(domElement, tag, propKey$261, null, nextProps, propKey$230); + for (var propKey$262 in lastProps) + (propKey$231 = lastProps[propKey$262]), + lastProps.hasOwnProperty(propKey$262) && + null != propKey$231 && + !nextProps.hasOwnProperty(propKey$262) && + setProp(domElement, tag, propKey$262, null, nextProps, propKey$231); for (lastProp in nextProps) - (propKey$230 = nextProps[lastProp]), + (propKey$231 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$230 === propKey || - (null == propKey$230 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$230, nextProps, propKey); + propKey$231 === propKey || + (null == propKey$231 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$231, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14496,26 +14547,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$269 = getResourcesFromRoot( + var styles$270 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$270 = styles$269.get(type); - resource$270 || + resource$271 = styles$270.get(type); + resource$271 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$270 = { + (resource$271 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$269.set(type, resource$270), - (styles$269 = JSCompiler_inline_result.querySelector( + styles$270.set(type, resource$271), + (styles$270 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$269._p && - ((resource$270.instance = styles$269), - (resource$270.state.loading = 5)), + !styles$270._p && + ((resource$271.instance = styles$270), + (resource$271.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14528,16 +14579,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$269 || + styles$270 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$270.state + resource$271.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$270; + return resource$271; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -14634,37 +14685,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$275 = hoistableRoot.querySelector( + var instance$276 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$275) + if (instance$276) return ( (resource.state.loading |= 4), - (resource.instance = instance$275), - markNodeAsHoistable(instance$275), - instance$275 + (resource.instance = instance$276), + markNodeAsHoistable(instance$276), + instance$276 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$275 = ( + instance$276 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$275); - var linkInstance = instance$275; + markNodeAsHoistable(instance$276); + var linkInstance = instance$276; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$275, "link", instance); + setInitialProperties(instance$276, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$275, props.precedence, hoistableRoot); - return (resource.instance = instance$275); + insertStylesheet(instance$276, props.precedence, hoistableRoot); + return (resource.instance = instance$276); case "script": - instance$275 = getScriptKey(props.src); + instance$276 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$275) + getScriptSelectorFromKey(instance$276) )) ) return ( @@ -14673,7 +14724,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$275))) + if ((styleProps = preloadPropsMap.get(instance$276))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -14996,6 +15047,7 @@ function FiberRootNode( this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -15715,16 +15767,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1724 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1725 = React.version; if ( - "19.0.0-experimental-7771d3a7-20240827" !== - isomorphicReactPackageVersion$jscomp$inline_1724 + "19.0.0-experimental-4c58fce7-20240904" !== + isomorphicReactPackageVersion$jscomp$inline_1725 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1724, - "19.0.0-experimental-7771d3a7-20240827" + isomorphicReactPackageVersion$jscomp$inline_1725, + "19.0.0-experimental-4c58fce7-20240904" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15744,18 +15796,18 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1731 = { +var internals$jscomp$inline_1732 = { bundleType: 0, - version: "19.0.0-experimental-7771d3a7-20240827", + version: "19.0.0-experimental-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-7771d3a7-20240827", + reconcilerVersion: "19.0.0-experimental-4c58fce7-20240904", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$292 = 0; - 31 > index$292; - index$292++ + var map = new Map(), lane = 1, index$293 = 0; + 31 > index$293; + index$293++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -15768,16 +15820,16 @@ var internals$jscomp$inline_1731 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2134 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2138 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2134.isDisabled && - hook$jscomp$inline_2134.supportsFiber + !hook$jscomp$inline_2138.isDisabled && + hook$jscomp$inline_2138.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2134.inject( - internals$jscomp$inline_1731 + (rendererID = hook$jscomp$inline_2138.inject( + internals$jscomp$inline_1732 )), - (injectedHook = hook$jscomp$inline_2134); + (injectedHook = hook$jscomp$inline_2138); } catch (err) {} } function noop() {} @@ -16030,7 +16082,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index 9452c5647daaac..8ac77ebcc617f7 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -9291,5 +9291,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js index c64e10d12e0824..7834328dc792ce 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js @@ -6055,4 +6055,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js index 833ba505cf282e..9f0174355cc08b 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js @@ -9291,5 +9291,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js index 50185798793184..52b7ccc9b60eca 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js @@ -6147,4 +6147,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js index 52c68dfb5f0a46..1c6816fa6c4a48 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js @@ -8177,11 +8177,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -9911,5 +9911,5 @@ startWork(request); }); }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js index 61dc6978be305b..1280b3fc10d120 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js @@ -6572,12 +6572,12 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion, - "19.0.0-experimental-7771d3a7-20240827" + "19.0.0-experimental-4c58fce7-20240904" ) ); } @@ -6782,4 +6782,4 @@ exports.resume = function (children, postponedState, options) { startWork(request); }); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js index 5bb3c96ecf27df..379af49b8b40e8 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js @@ -6068,13 +6068,13 @@ function addToReplayParent(node, parentKeyPath, trackedPostpones) { } var isomorphicReactPackageVersion$jscomp$inline_783 = React.version; if ( - "19.0.0-experimental-7771d3a7-20240827" !== + "19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion$jscomp$inline_783 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_783 + - "\n - react-dom: 19.0.0-experimental-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -6162,4 +6162,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js index 726fd2f3c6d576..426f702636757e 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js @@ -8200,11 +8200,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -9941,5 +9941,5 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js index 5035b4f547a6b2..eeffa249176e74 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js @@ -6680,11 +6680,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -6899,4 +6899,4 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js index eeee07bf4a2f73..9fb13f167f1b4a 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js @@ -7928,11 +7928,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); } function createDrainHandler(destination, request) { @@ -9740,5 +9740,5 @@ } }; }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js index a47861424a372d..832d69f2b76eef 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js @@ -6427,11 +6427,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -6716,4 +6716,4 @@ exports.resumeToPipeableStream = function (children, postponedState, options) { } }; }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js index 4e354411663193..1924292963eb75 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js @@ -1094,28 +1094,37 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -1194,6 +1203,7 @@ root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -5896,6 +5906,14 @@ } function finishRenderingHooks(current, workInProgress) { workInProgress._debugHookTypes = hookTypesDev; + null === workInProgress.dependencies + ? null !== thenableState && + (workInProgress.dependencies = { + lanes: 0, + firstContext: null, + _debugThenableState: thenableState + }) + : (workInProgress.dependencies._debugThenableState = thenableState); ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; @@ -8736,33 +8754,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2340; - var JSCompiler_object_inline_stack_2339 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2343; + var JSCompiler_object_inline_stack_2342 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2337 = !1; + var JSCompiler_object_inline_message_2340 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2340 = didSuspend) || - (JSCompiler_object_inline_componentStack_2340 = + (JSCompiler_object_inline_componentStack_2343 = didSuspend) || + (JSCompiler_object_inline_componentStack_2343 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2340 && - ((JSCompiler_object_inline_message_2337 = !0), + JSCompiler_object_inline_componentStack_2343 && + ((JSCompiler_object_inline_message_2340 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2340 = + JSCompiler_object_inline_componentStack_2343 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2337 + JSCompiler_object_inline_message_2340 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2338 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2341 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2338)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2341)) { c: { - var instance = JSCompiler_object_inline_digest_2338; + var instance = JSCompiler_object_inline_digest_2341; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8803,19 +8821,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2338 + JSCompiler_object_inline_digest_2341 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2338 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2341 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2338 && - ((JSCompiler_object_inline_digest_2338 = - JSCompiler_object_inline_digest_2338.dehydrated), - null !== JSCompiler_object_inline_digest_2338) + null !== JSCompiler_object_inline_digest_2341 && + ((JSCompiler_object_inline_digest_2341 = + JSCompiler_object_inline_digest_2341.dehydrated), + null !== JSCompiler_object_inline_digest_2341) ) return ( - JSCompiler_object_inline_digest_2338.data === + JSCompiler_object_inline_digest_2341.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8823,68 +8841,68 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2338 = - JSCompiler_object_inline_stack_2339.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2339.fallback; - if (JSCompiler_object_inline_message_2337) + JSCompiler_object_inline_digest_2341 = + JSCompiler_object_inline_stack_2342.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2342.fallback; + if (JSCompiler_object_inline_message_2340) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2339 = + (JSCompiler_object_inline_stack_2342 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2338, + JSCompiler_object_inline_digest_2341, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2337 = workInProgress.child), - (JSCompiler_object_inline_message_2337.memoizedState = + (JSCompiler_object_inline_message_2340 = workInProgress.child), + (JSCompiler_object_inline_message_2340.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2337.childLanes = + (JSCompiler_object_inline_message_2340.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2340, + JSCompiler_object_inline_componentStack_2343, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2339 + JSCompiler_object_inline_stack_2342 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2339.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2342.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2339 = + (JSCompiler_object_inline_stack_2342 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2338, + JSCompiler_object_inline_digest_2341, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2337 = workInProgress.child), - (JSCompiler_object_inline_message_2337.memoizedState = + (JSCompiler_object_inline_message_2340 = workInProgress.child), + (JSCompiler_object_inline_message_2340.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2337.childLanes = + (JSCompiler_object_inline_message_2340.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2340, + JSCompiler_object_inline_componentStack_2343, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2339 + JSCompiler_object_inline_stack_2342 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2338 + JSCompiler_object_inline_digest_2341 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2338 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2338) + ((JSCompiler_object_inline_digest_2341 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2341) ) { if (didSuspend) workInProgress.flags & 256 @@ -8901,94 +8919,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2337 = - JSCompiler_object_inline_stack_2339.fallback), - (JSCompiler_object_inline_digest_2338 = workInProgress.mode), - (JSCompiler_object_inline_stack_2339 = + (JSCompiler_object_inline_message_2340 = + JSCompiler_object_inline_stack_2342.fallback), + (JSCompiler_object_inline_digest_2341 = workInProgress.mode), + (JSCompiler_object_inline_stack_2342 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2339.children + children: JSCompiler_object_inline_stack_2342.children }, - JSCompiler_object_inline_digest_2338 + JSCompiler_object_inline_digest_2341 )), - (JSCompiler_object_inline_message_2337 = + (JSCompiler_object_inline_message_2340 = createFiberFromFragment( - JSCompiler_object_inline_message_2337, - JSCompiler_object_inline_digest_2338, + JSCompiler_object_inline_message_2340, + JSCompiler_object_inline_digest_2341, renderLanes, null )), - (JSCompiler_object_inline_message_2337.flags |= 2), - (JSCompiler_object_inline_stack_2339.return = workInProgress), - (JSCompiler_object_inline_message_2337.return = workInProgress), - (JSCompiler_object_inline_stack_2339.sibling = - JSCompiler_object_inline_message_2337), - (workInProgress.child = JSCompiler_object_inline_stack_2339), + (JSCompiler_object_inline_message_2340.flags |= 2), + (JSCompiler_object_inline_stack_2342.return = workInProgress), + (JSCompiler_object_inline_message_2340.return = workInProgress), + (JSCompiler_object_inline_stack_2342.sibling = + JSCompiler_object_inline_message_2340), + (workInProgress.child = JSCompiler_object_inline_stack_2342), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2339 = workInProgress.child), - (JSCompiler_object_inline_stack_2339.memoizedState = + (JSCompiler_object_inline_stack_2342 = workInProgress.child), + (JSCompiler_object_inline_stack_2342.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2339.childLanes = + (JSCompiler_object_inline_stack_2342.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2340, + JSCompiler_object_inline_componentStack_2343, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2337)); + (workInProgress = JSCompiler_object_inline_message_2340)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_digest_2338.data === + JSCompiler_object_inline_digest_2341.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_componentStack_2340 = - JSCompiler_object_inline_digest_2338.nextSibling && - JSCompiler_object_inline_digest_2338.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2340) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2340.dgst; - var message = JSCompiler_object_inline_componentStack_2340.msg; - instance = JSCompiler_object_inline_componentStack_2340.stck; + JSCompiler_object_inline_componentStack_2343 = + JSCompiler_object_inline_digest_2341.nextSibling && + JSCompiler_object_inline_digest_2341.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2343) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2343.dgst; + var message = JSCompiler_object_inline_componentStack_2343.msg; + instance = JSCompiler_object_inline_componentStack_2343.stck; var componentStack = - JSCompiler_object_inline_componentStack_2340.cstck; + JSCompiler_object_inline_componentStack_2343.cstck; } - JSCompiler_object_inline_message_2337 = message; - JSCompiler_object_inline_digest_2338 = JSCompiler_temp; - JSCompiler_object_inline_stack_2339 = instance; - JSCompiler_object_inline_componentStack_2340 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2338 && - ((JSCompiler_object_inline_message_2337 = - JSCompiler_object_inline_message_2337 - ? Error(JSCompiler_object_inline_message_2337) + JSCompiler_object_inline_message_2340 = message; + JSCompiler_object_inline_digest_2341 = JSCompiler_temp; + JSCompiler_object_inline_stack_2342 = instance; + JSCompiler_object_inline_componentStack_2343 = componentStack; + "POSTPONE" !== JSCompiler_object_inline_digest_2341 && + ((JSCompiler_object_inline_message_2340 = + JSCompiler_object_inline_message_2340 + ? Error(JSCompiler_object_inline_message_2340) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_message_2337.stack = - JSCompiler_object_inline_stack_2339 || ""), - (JSCompiler_object_inline_message_2337.digest = - JSCompiler_object_inline_digest_2338), - (JSCompiler_object_inline_componentStack_2340 = - void 0 === JSCompiler_object_inline_componentStack_2340 + (JSCompiler_object_inline_message_2340.stack = + JSCompiler_object_inline_stack_2342 || ""), + (JSCompiler_object_inline_message_2340.digest = + JSCompiler_object_inline_digest_2341), + (JSCompiler_object_inline_componentStack_2343 = + void 0 === JSCompiler_object_inline_componentStack_2343 ? null - : JSCompiler_object_inline_componentStack_2340), - "string" === typeof JSCompiler_object_inline_componentStack_2340 && + : JSCompiler_object_inline_componentStack_2343), + "string" === typeof JSCompiler_object_inline_componentStack_2343 && CapturedStacks.set( - JSCompiler_object_inline_message_2337, - JSCompiler_object_inline_componentStack_2340 + JSCompiler_object_inline_message_2340, + JSCompiler_object_inline_componentStack_2343 ), queueHydrationError({ - value: JSCompiler_object_inline_message_2337, + value: JSCompiler_object_inline_message_2340, source: null, - stack: JSCompiler_object_inline_componentStack_2340 + stack: JSCompiler_object_inline_componentStack_2343 })); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9003,25 +9021,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2340 = + (JSCompiler_object_inline_componentStack_2343 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2340) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2343) ) { - JSCompiler_object_inline_componentStack_2340 = workInProgressRoot; - if (null !== JSCompiler_object_inline_componentStack_2340) { - JSCompiler_object_inline_stack_2339 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2339 & 42)) - JSCompiler_object_inline_stack_2339 = 1; + JSCompiler_object_inline_componentStack_2343 = workInProgressRoot; + if (null !== JSCompiler_object_inline_componentStack_2343) { + JSCompiler_object_inline_stack_2342 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2342 & 42)) + JSCompiler_object_inline_stack_2342 = 1; else - switch (JSCompiler_object_inline_stack_2339) { + switch (JSCompiler_object_inline_stack_2342) { case 2: - JSCompiler_object_inline_stack_2339 = 1; + JSCompiler_object_inline_stack_2342 = 1; break; case 8: - JSCompiler_object_inline_stack_2339 = 4; + JSCompiler_object_inline_stack_2342 = 4; break; case 32: - JSCompiler_object_inline_stack_2339 = 16; + JSCompiler_object_inline_stack_2342 = 16; break; case 128: case 256: @@ -9042,40 +9060,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2339 = 64; + JSCompiler_object_inline_stack_2342 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2339 = 134217728; + JSCompiler_object_inline_stack_2342 = 134217728; break; default: - JSCompiler_object_inline_stack_2339 = 0; + JSCompiler_object_inline_stack_2342 = 0; } - JSCompiler_object_inline_stack_2339 = + JSCompiler_object_inline_stack_2342 = 0 !== - (JSCompiler_object_inline_stack_2339 & - (JSCompiler_object_inline_componentStack_2340.suspendedLanes | + (JSCompiler_object_inline_stack_2342 & + (JSCompiler_object_inline_componentStack_2343.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2339; + : JSCompiler_object_inline_stack_2342; if ( - 0 !== JSCompiler_object_inline_stack_2339 && - JSCompiler_object_inline_stack_2339 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2342 && + JSCompiler_object_inline_stack_2342 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2339), + ((prevState.retryLane = JSCompiler_object_inline_stack_2342), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2339 + JSCompiler_object_inline_stack_2342 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2340, + JSCompiler_object_inline_componentStack_2343, current, - JSCompiler_object_inline_stack_2339 + JSCompiler_object_inline_stack_2342 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_digest_2338.data === + JSCompiler_object_inline_digest_2341.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9083,7 +9101,7 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2338.data === + JSCompiler_object_inline_digest_2341.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9091,12 +9109,12 @@ null, current )), - (JSCompiler_object_inline_digest_2338._reactRetry = + (JSCompiler_object_inline_digest_2341._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2338.nextSibling + JSCompiler_object_inline_digest_2341.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9114,54 +9132,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2339.children + JSCompiler_object_inline_stack_2342.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2337) + if (JSCompiler_object_inline_message_2340) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2337 = - JSCompiler_object_inline_stack_2339.fallback), - (JSCompiler_object_inline_digest_2338 = workInProgress.mode), + (JSCompiler_object_inline_message_2340 = + JSCompiler_object_inline_stack_2342.fallback), + (JSCompiler_object_inline_digest_2341 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2339 = createWorkInProgress( + (JSCompiler_object_inline_stack_2342 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2339.children + children: JSCompiler_object_inline_stack_2342.children } )), - (JSCompiler_object_inline_stack_2339.subtreeFlags = + (JSCompiler_object_inline_stack_2342.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_message_2337 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2340 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2337 + JSCompiler_object_inline_message_2340 )) - : ((JSCompiler_object_inline_message_2337 = createFiberFromFragment( - JSCompiler_object_inline_message_2337, - JSCompiler_object_inline_digest_2338, + : ((JSCompiler_object_inline_message_2340 = createFiberFromFragment( + JSCompiler_object_inline_message_2340, + JSCompiler_object_inline_digest_2341, renderLanes, null )), - (JSCompiler_object_inline_message_2337.flags |= 2)), - (JSCompiler_object_inline_message_2337.return = workInProgress), - (JSCompiler_object_inline_stack_2339.return = workInProgress), - (JSCompiler_object_inline_stack_2339.sibling = - JSCompiler_object_inline_message_2337), - (workInProgress.child = JSCompiler_object_inline_stack_2339), - (JSCompiler_object_inline_stack_2339 = - JSCompiler_object_inline_message_2337), - (JSCompiler_object_inline_message_2337 = workInProgress.child), - (JSCompiler_object_inline_digest_2338 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2338 - ? (JSCompiler_object_inline_digest_2338 = + (JSCompiler_object_inline_message_2340.flags |= 2)), + (JSCompiler_object_inline_message_2340.return = workInProgress), + (JSCompiler_object_inline_stack_2342.return = workInProgress), + (JSCompiler_object_inline_stack_2342.sibling = + JSCompiler_object_inline_message_2340), + (workInProgress.child = JSCompiler_object_inline_stack_2342), + (JSCompiler_object_inline_stack_2342 = + JSCompiler_object_inline_message_2340), + (JSCompiler_object_inline_message_2340 = workInProgress.child), + (JSCompiler_object_inline_digest_2341 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2341 + ? (JSCompiler_object_inline_digest_2341 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2338.cachePool), + JSCompiler_object_inline_digest_2341.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9169,38 +9187,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2338 = { + (JSCompiler_object_inline_digest_2341 = { baseLanes: - JSCompiler_object_inline_digest_2338.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2341.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2337.memoizedState = - JSCompiler_object_inline_digest_2338), - (JSCompiler_object_inline_message_2337.childLanes = + (JSCompiler_object_inline_message_2340.memoizedState = + JSCompiler_object_inline_digest_2341), + (JSCompiler_object_inline_message_2340.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2340, + JSCompiler_object_inline_componentStack_2343, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2339 + JSCompiler_object_inline_stack_2342 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2339.children + children: JSCompiler_object_inline_stack_2342.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2340 = + ((JSCompiler_object_inline_componentStack_2343 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2340 + null === JSCompiler_object_inline_componentStack_2343 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2340.push(current)); + : JSCompiler_object_inline_componentStack_2343.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10485,7 +10503,11 @@ "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; @@ -13400,7 +13422,8 @@ ? null : { lanes: pendingProps.lanes, - firstContext: pendingProps.firstContext + firstContext: pendingProps.firstContext, + _debugThenableState: pendingProps._debugThenableState }; workInProgress.sibling = current.sibling; workInProgress.index = current.index; @@ -13453,7 +13476,8 @@ ? null : { lanes: renderLanes.lanes, - firstContext: renderLanes.firstContext + firstContext: renderLanes.firstContext, + _debugThenableState: renderLanes._debugThenableState }), (workInProgress.selfBaseDuration = current.selfBaseDuration), (workInProgress.treeBaseDuration = current.treeBaseDuration)); @@ -13675,13 +13699,26 @@ (resource.state.loading & Inserted) !== NotLoaded ) workInProgress.flags &= -16777217; - else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) - if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192; - else + else if ( + ((workInProgress.flags |= 16777216), !preloadResource(resource)) + ) { + resource = suspenseHandlerStackCursor.current; + if ( + null !== resource && + ((workInProgressRootRenderLanes & 4194176) === + workInProgressRootRenderLanes + ? null !== shellBoundary + : ((workInProgressRootRenderLanes & 62914560) !== + workInProgressRootRenderLanes && + 0 === (workInProgressRootRenderLanes & 536870912)) || + resource !== shellBoundary) + ) throw ( ((suspendedThenable = noopSuspenseyCommitThenable), SuspenseyCommitException) ); + workInProgress.flags |= 8192; + } } function scheduleRetryEffect(workInProgress, retryQueue) { null !== retryQueue @@ -14668,7 +14705,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if ( @@ -14710,7 +14748,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -14735,7 +14774,12 @@ var renderWasConcurrent = shouldTimeSlice; do { if (didTimeout === RootDidNotComplete) - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -14767,7 +14811,12 @@ } if (didTimeout === RootFatalErrored) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -14783,7 +14832,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -14817,7 +14867,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -14829,7 +14880,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -14842,7 +14894,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -14897,7 +14950,8 @@ transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -14916,7 +14970,7 @@ didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -14964,26 +15018,31 @@ function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended(root, suspendedLanes, spawnedLane) { + function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings + ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - expirationTimes[index] = -1; + didSkipSuspendedSiblings[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -15013,13 +15072,18 @@ if (exitStatus === RootFatalErrored) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (exitStatus === RootDidNotComplete) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -15072,6 +15136,12 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; + workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressDeferredLane = @@ -15108,12 +15178,7 @@ current = null; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), - (workInProgressSuspendedReason = - shouldRemainOnPreviousScreen() && - 0 === (workInProgressRootSkippedLanes & 134217727) && - 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) - ? SuspendedOnData - : SuspendedOnImmediate)) + (workInProgressSuspendedReason = SuspendedOnImmediate)) : thrownValue === SuspenseyCommitException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = SuspendedOnInstance)) @@ -15164,21 +15229,6 @@ ); } } - function shouldRemainOnPreviousScreen() { - var handler = suspenseHandlerStackCursor.current; - return null === handler - ? !0 - : (workInProgressRootRenderLanes & 4194176) === - workInProgressRootRenderLanes - ? null === shellBoundary - ? !0 - : !1 - : (workInProgressRootRenderLanes & 62914560) === - workInProgressRootRenderLanes || - 0 !== (workInProgressRootRenderLanes & 536870912) - ? handler === shellBoundary - : !1; - } function pushDispatcher() { var prevDispatcher = ReactSharedInternals.H; ReactSharedInternals.H = ContextOnlyDispatcher; @@ -15197,7 +15247,8 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function queueConcurrentError(error) { @@ -15519,43 +15570,25 @@ workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - if ((root.mode & ProfileMode) !== NoMode) { - stopProfilerTimerIfRunningAndRecordDelta(root, !1); - unitOfWork = root.actualDuration; - for (thrownValue = root.child; null !== thrownValue; ) - (unitOfWork += thrownValue.actualDuration), - (thrownValue = thrownValue.sibling); - root.actualDuration = unitOfWork; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = RootDidNotComplete; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? (isHydrating || workInProgressSuspendedReason === SuspendedOnError + ? (root = !0) + : workInProgressRootIsPrerendering + ? (root = !1) + : (workInProgressRootDidSkipSuspendedSiblings = root = !0), + unwindUnitOfWork(unitOfWork, root)) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { - 0 !== (completedWork.flags & 32768) && - console.error( - "Internal React error: Expected this fiber to be complete, but it isn't. It should have been unwound. This is a bug in React." + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings ); + return; + } var current = completedWork.alternate; unitOfWork = completedWork.return; (completedWork.mode & ProfileMode) === NoMode @@ -15589,6 +15622,38 @@ workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted); } + function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + if ((unitOfWork.mode & ProfileMode) !== NoMode) { + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1); + next = unitOfWork.actualDuration; + for (var child = unitOfWork.child; null !== child; ) + (next += child.actualDuration), (child = child.sibling); + unitOfWork.actualDuration = next; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), + (next.subtreeFlags = 0), + (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = RootDidNotComplete; + workInProgress = null; + } function commitRoot( root, recoverableErrors, @@ -15986,6 +16051,7 @@ var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && @@ -20486,6 +20552,7 @@ this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -24373,6 +24440,8 @@ SuspendedOnHydration = 8, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, + workInProgressRootIsPrerendering = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = RootInProgress, @@ -24949,11 +25018,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24990,11 +25059,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-7771d3a7-20240827", + version: "19.0.0-experimental-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-7771d3a7-20240827" + reconcilerVersion: "19.0.0-experimental-4c58fce7-20240904" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25304,5 +25373,5 @@ } }; }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js index f126ef43e4d076..b22158455f9c73 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js @@ -597,28 +597,37 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -689,6 +698,7 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -700,18 +710,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$6 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$6; - remainingLanes[index$6] = 0; - expirationTimes[index$6] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$6]; + var index$7 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$7; + remainingLanes[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$6] = null, index$6 = 0; - index$6 < hiddenUpdatesForLane.length; - index$6++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$6]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -731,10 +741,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$7 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$7; - (lane & entangledLanes) | (root[index$7] & entangledLanes) && - (root[index$7] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -970,8 +980,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$9 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$9 && "aria-" !== prefix$9) { + var prefix$10 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$10 && "aria-" !== prefix$10) { node.removeAttribute(name); return; } @@ -1304,15 +1314,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$15 in styles) - (styleName = styles[styleName$15]), - styles.hasOwnProperty(styleName$15) && - prevStyles[styleName$15] !== styleName && - setValueForStyle(node, styleName$15, styleName); - } else for (var styleName$16 in styles) - styles.hasOwnProperty(styleName$16) && - setValueForStyle(node, styleName$16, styles[styleName$16]); + (styleName = styles[styleName$16]), + styles.hasOwnProperty(styleName$16) && + prevStyles[styleName$16] !== styleName && + setValueForStyle(node, styleName$16, styleName); + } else + for (var styleName$17 in styles) + styles.hasOwnProperty(styleName$17) && + setValueForStyle(node, styleName$17, styles[styleName$17]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -2041,19 +2051,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$291; + var JSCompiler_inline_result$jscomp$292; if (canUseDOM) { - var isSupported$jscomp$inline_430 = "oninput" in document; - if (!isSupported$jscomp$inline_430) { - var element$jscomp$inline_431 = document.createElement("div"); - element$jscomp$inline_431.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_430 = - "function" === typeof element$jscomp$inline_431.oninput; + var isSupported$jscomp$inline_431 = "oninput" in document; + if (!isSupported$jscomp$inline_431) { + var element$jscomp$inline_432 = document.createElement("div"); + element$jscomp$inline_432.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_431 = + "function" === typeof element$jscomp$inline_432.oninput; } - JSCompiler_inline_result$jscomp$291 = isSupported$jscomp$inline_430; - } else JSCompiler_inline_result$jscomp$291 = !1; + JSCompiler_inline_result$jscomp$292 = isSupported$jscomp$inline_431; + } else JSCompiler_inline_result$jscomp$292 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$291 && + JSCompiler_inline_result$jscomp$292 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3987,7 +3997,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$54 = !1; + didReadFromEntangledAsyncAction$55 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -4008,11 +4018,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$54 = !0); + (didReadFromEntangledAsyncAction$55 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$54 = !0); + (didReadFromEntangledAsyncAction$55 = !0); continue; } else (updateLane = { @@ -4058,7 +4068,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$54 && + didReadFromEntangledAsyncAction$55 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4256,8 +4266,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$60) { - onActionError(actionQueue, node, error$60); + } catch (error$61) { + onActionError(actionQueue, node, error$61); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4695,14 +4705,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$63 = enqueueUpdate(provider, fiber, lane); - null !== root$63 && - (scheduleUpdateOnFiber(root$63, provider, lane), - entangleTransitions(root$63, provider, lane)); + var root$64 = enqueueUpdate(provider, fiber, lane); + null !== root$64 && + (scheduleUpdateOnFiber(root$64, provider, lane), + entangleTransitions(root$64, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$63 && + null !== root$64 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -5171,9 +5181,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$67) { + } catch (e$68) { setTimeout(function () { - throw e$67; + throw e$68; }); } } @@ -5184,9 +5194,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$68) { + } catch (e$69) { setTimeout(function () { - throw e$68; + throw e$69; }); } } @@ -7622,9 +7632,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$112 in Component) - void 0 === newProps[propName$112] && - (newProps[propName$112] = Component[propName$112]); + for (var propName$113 in Component) + void 0 === newProps[propName$113] && + (newProps[propName$113] = Component[propName$113]); } return newProps; } @@ -7688,8 +7698,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$113) { - captureCommitPhaseError(current, nearestMountedAncestor, error$113); + } catch (error$114) { + captureCommitPhaseError(current, nearestMountedAncestor, error$114); } else ref.current = null; } @@ -7725,7 +7735,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$19) { + } catch (e$20) { JSCompiler_temp = null; break a; } @@ -7963,11 +7973,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$115) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$115 + error$116 ); } } @@ -8418,8 +8428,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$127) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$127); + } catch (error$128) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$128); } } break; @@ -8592,11 +8602,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$128) { + } catch (error$129) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$128 + error$129 ); } break; @@ -8633,8 +8643,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$129) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$129); + } catch (error$130) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$130); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -8644,8 +8654,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$131) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$131); + } catch (error$132) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$132); } } flags & 1024 && (needsFormReset = !0); @@ -8660,8 +8670,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$132) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$132); + } catch (error$133) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$133); } } break; @@ -8675,8 +8685,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$133) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$133); + } catch (error$134) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$134); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -8770,11 +8780,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$117) { + } catch (error$118) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$117 + error$118 ); } } else if ( @@ -8843,21 +8853,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$118 = JSCompiler_inline_result.stateNode; + var parent$119 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$118, ""), + (setTextContent(parent$119, ""), (JSCompiler_inline_result.flags &= -33)); - var before$119 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$119, parent$118); + var before$120 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$120, parent$119); break; case 3: case 4: - var parent$120 = JSCompiler_inline_result.stateNode.containerInfo, - before$121 = getHostSibling(finishedWork); + var parent$121 = JSCompiler_inline_result.stateNode.containerInfo, + before$122 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$121, - parent$120 + before$122, + parent$121 ); break; default: @@ -9704,13 +9714,24 @@ function markUpdate(workInProgress) { function preloadResourceAndSuspendIfNeeded(workInProgress, resource) { if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4)) workInProgress.flags &= -16777217; - else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) - if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192; - else + else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) { + resource = suspenseHandlerStackCursor.current; + if ( + null !== resource && + ((workInProgressRootRenderLanes & 4194176) === + workInProgressRootRenderLanes + ? null !== shellBoundary + : ((workInProgressRootRenderLanes & 62914560) !== + workInProgressRootRenderLanes && + 0 === (workInProgressRootRenderLanes & 536870912)) || + resource !== shellBoundary) + ) throw ( ((suspendedThenable = noopSuspenseyCommitThenable), SuspenseyCommitException) ); + workInProgress.flags |= 8192; + } } function scheduleRetryEffect(workInProgress, retryQueue) { null !== retryQueue @@ -9735,14 +9756,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$143 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$143 = lastTailNode), + for (var lastTailNode$144 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$144 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$143 + null === lastTailNode$144 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$143.sibling = null); + : (lastTailNode$144.sibling = null); } } function bubbleProperties(completedWork) { @@ -9752,19 +9773,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$144 = completedWork.child; null !== child$144; ) - (newChildLanes |= child$144.lanes | child$144.childLanes), - (subtreeFlags |= child$144.subtreeFlags & 31457280), - (subtreeFlags |= child$144.flags & 31457280), - (child$144.return = completedWork), - (child$144 = child$144.sibling); + for (var child$145 = completedWork.child; null !== child$145; ) + (newChildLanes |= child$145.lanes | child$145.childLanes), + (subtreeFlags |= child$145.subtreeFlags & 31457280), + (subtreeFlags |= child$145.flags & 31457280), + (child$145.return = completedWork), + (child$145 = child$145.sibling); else - for (child$144 = completedWork.child; null !== child$144; ) - (newChildLanes |= child$144.lanes | child$144.childLanes), - (subtreeFlags |= child$144.subtreeFlags), - (subtreeFlags |= child$144.flags), - (child$144.return = completedWork), - (child$144 = child$144.sibling); + for (child$145 = completedWork.child; null !== child$145; ) + (newChildLanes |= child$145.lanes | child$145.childLanes), + (subtreeFlags |= child$145.subtreeFlags), + (subtreeFlags |= child$145.flags), + (child$145.return = completedWork), + (child$145 = child$145.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10041,11 +10062,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$156 = null; + var cache$157 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$156 = newProps.memoizedState.cachePool.pool); - cache$156 !== type && (newProps.flags |= 2048); + (cache$157 = newProps.memoizedState.cachePool.pool); + cache$157 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -10070,8 +10091,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$156 = type.rendering; - if (null === cache$156) + cache$157 = type.rendering; + if (null === cache$157) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10079,11 +10100,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$156 = findFirstSuspended(current); - if (null !== cache$156) { + cache$157 = findFirstSuspended(current); + if (null !== cache$157) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$156.updateQueue; + current = cache$157.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10108,7 +10129,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$156)), null !== current)) { + if (((current = findFirstSuspended(cache$157)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10118,7 +10139,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$156.alternate && + !cache$157.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10131,13 +10152,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$156.sibling = workInProgress.child), - (workInProgress.child = cache$156)) + ? ((cache$157.sibling = workInProgress.child), + (workInProgress.child = cache$157)) : ((current = type.last), null !== current - ? (current.sibling = cache$156) - : (workInProgress.child = cache$156), - (type.last = cache$156)); + ? (current.sibling = cache$157) + : (workInProgress.child = cache$157), + (type.last = cache$157)); } if (null !== type.tail) return ( @@ -10496,6 +10517,8 @@ var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, workInProgressRootRenderLanes = 0, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, + workInProgressRootIsPrerendering = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = 0, @@ -10546,7 +10569,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10557,7 +10581,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -10579,7 +10604,13 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (0 !== didTimeout) { var renderWasConcurrent = shouldTimeSlice; do { - if (6 === didTimeout) markRootSuspended(root, lanes, 0); + if (6 === didTimeout) + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -10611,7 +10642,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } if (1 === didTimeout) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -10627,7 +10663,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -10649,7 +10686,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -10661,7 +10699,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -10674,7 +10713,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -10726,7 +10766,8 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -10745,7 +10786,7 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -10793,25 +10834,28 @@ function isRenderConsistentWithExternalStores(finishedWork) { function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0)); executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended(root, suspendedLanes, spawnedLane) { +function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings +) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5; - expirationTimes[index$5] = -1; + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didSkipSuspendedSiblings[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10838,13 +10882,18 @@ function performSyncWorkOnRoot(root, lanes) { if (1 === exitStatus) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (6 === exitStatus) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -10897,6 +10946,10 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; + workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootIsPrerendering = + 0 === + (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); workInProgressRootDidAttachPingListener = !1; workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -10915,9 +10968,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$3 = 31 - clz32(allEntangledLanes), - lane = 1 << index$3; - lanes |= root[index$3]; + var index$4 = 31 - clz32(allEntangledLanes), + lane = 1 << index$4; + lanes |= root[index$4]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -10929,12 +10982,7 @@ function handleThrow(root, thrownValue) { ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), - (workInProgressSuspendedReason = - shouldRemainOnPreviousScreen() && - 0 === (workInProgressRootSkippedLanes & 134217727) && - 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) - ? 2 - : 3)) + (workInProgressSuspendedReason = 3)) : thrownValue === SuspenseyCommitException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = 4)) @@ -10954,21 +11002,6 @@ function handleThrow(root, thrownValue) { createCapturedValueAtFiber(thrownValue, root.current) )); } -function shouldRemainOnPreviousScreen() { - var handler = suspenseHandlerStackCursor.current; - return null === handler - ? !0 - : (workInProgressRootRenderLanes & 4194176) === - workInProgressRootRenderLanes - ? null === shellBoundary - ? !0 - : !1 - : (workInProgressRootRenderLanes & 62914560) === - workInProgressRootRenderLanes || - 0 !== (workInProgressRootRenderLanes & 536870912) - ? handler === shellBoundary - : !1; -} function pushDispatcher() { var prevDispatcher = ReactSharedInternals.H; ReactSharedInternals.H = ContextOnlyDispatcher; @@ -10987,7 +11020,8 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function queueConcurrentError(error) { @@ -11026,8 +11060,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$172) { - handleThrow(root, thrownValue$172); + } catch (thrownValue$173) { + handleThrow(root, thrownValue$173); } while (1); lanes && root.shellSuspendCounter++; @@ -11136,8 +11170,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$174) { - handleThrow(root, thrownValue$174); + } catch (thrownValue$175) { + handleThrow(root, thrownValue$175); } while (1); resetContextDependencies(); @@ -11229,31 +11263,25 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = 6; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? (isHydrating || 1 === workInProgressSuspendedReason + ? (root = !0) + : workInProgressRootIsPrerendering + ? (root = !1) + : (workInProgressRootDidSkipSuspendedSiblings = root = !0), + unwindUnitOfWork(unitOfWork, root)) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings + ); + return; + } unitOfWork = completedWork.return; var next = completeWork( completedWork.alternate, @@ -11273,6 +11301,29 @@ function completeUnitOfWork(unitOfWork) { } while (null !== completedWork); 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5); } +function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = 6; + workInProgress = null; +} function commitRoot( root, recoverableErrors, @@ -11395,7 +11446,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$178 = rootWithPendingPassiveEffects, + var root$179 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11434,7 +11485,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$178, remainingLanes); + releaseRootPooledCache(root$179, remainingLanes); } } return !1; @@ -11505,6 +11556,7 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); @@ -11590,14 +11642,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$180 = firstScheduledRoot; null !== root$180; ) { + for (var root$181 = firstScheduledRoot; null !== root$181; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$180.pendingLanes; + var pendingLanes = root$181.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$180.suspendedLanes, - pingedLanes = root$180.pingedLanes; + var suspendedLanes = root$181.suspendedLanes, + pingedLanes = root$181.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -11611,17 +11663,17 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$180, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$181, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$180, - root$180 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$181, + root$181 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 !== (JSCompiler_inline_result & 3) && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$180, JSCompiler_inline_result)); - root$180 = root$180.next; + performSyncWorkOnRoot(root$181, JSCompiler_inline_result)); + root$181 = root$181.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -11662,12 +11714,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4, - expirationTime = expirationTimes[index$4]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$4] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -11831,20 +11883,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1417 = 0; - i$jscomp$inline_1417 < simpleEventPluginEvents.length; - i$jscomp$inline_1417++ + var i$jscomp$inline_1420 = 0; + i$jscomp$inline_1420 < simpleEventPluginEvents.length; + i$jscomp$inline_1420++ ) { - var eventName$jscomp$inline_1418 = - simpleEventPluginEvents[i$jscomp$inline_1417], - domEventName$jscomp$inline_1419 = - eventName$jscomp$inline_1418.toLowerCase(), - capitalizedEvent$jscomp$inline_1420 = - eventName$jscomp$inline_1418[0].toUpperCase() + - eventName$jscomp$inline_1418.slice(1); + var eventName$jscomp$inline_1421 = + simpleEventPluginEvents[i$jscomp$inline_1420], + domEventName$jscomp$inline_1422 = + eventName$jscomp$inline_1421.toLowerCase(), + capitalizedEvent$jscomp$inline_1423 = + eventName$jscomp$inline_1421[0].toUpperCase() + + eventName$jscomp$inline_1421.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1419, - "on" + capitalizedEvent$jscomp$inline_1420 + domEventName$jscomp$inline_1422, + "on" + capitalizedEvent$jscomp$inline_1423 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13027,34 +13079,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$194 = props[hasSrc]; - if (null != propValue$194) + var propValue$195 = props[hasSrc]; + if (null != propValue$195) switch (hasSrc) { case "name": - hasSrcSet = propValue$194; + hasSrcSet = propValue$195; break; case "type": - propValue = propValue$194; + propValue = propValue$195; break; case "checked": - checked = propValue$194; + checked = propValue$195; break; case "defaultChecked": - defaultChecked = propValue$194; + defaultChecked = propValue$195; break; case "value": - propKey = propValue$194; + propKey = propValue$195; break; case "defaultValue": - defaultValue = propValue$194; + defaultValue = propValue$195; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$194) + if (null != propValue$195) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$194, props, null); + setProp(domElement, tag, hasSrc, propValue$195, props, null); } } initInput( @@ -13191,14 +13243,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$194 in props) - props.hasOwnProperty(propValue$194) && - ((hasSrc = props[propValue$194]), + for (propValue$195 in props) + props.hasOwnProperty(propValue$195) && + ((hasSrc = props[propValue$195]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$194, + propValue$195, hasSrc, props, void 0 @@ -13246,14 +13298,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$211 in nextProps) { - var propKey = nextProps[propKey$211]; - lastProp = lastProps[propKey$211]; + for (var propKey$212 in nextProps) { + var propKey = nextProps[propKey$212]; + lastProp = lastProps[propKey$212]; if ( - nextProps.hasOwnProperty(propKey$211) && + nextProps.hasOwnProperty(propKey$212) && (null != propKey || null != lastProp) ) - switch (propKey$211) { + switch (propKey$212) { case "type": type = propKey; break; @@ -13282,7 +13334,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$211, + propKey$212, propKey, nextProps, lastProp @@ -13301,7 +13353,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$211 = null; + propKey = value = defaultValue = propKey$212 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13332,7 +13384,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$211 = type; + propKey$212 = type; break; case "defaultValue": defaultValue = type; @@ -13353,15 +13405,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$211 - ? updateOptions(domElement, !!lastProps, propKey$211, !1) + null != propKey$212 + ? updateOptions(domElement, !!lastProps, propKey$212, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$211 = null; + propKey = propKey$212 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -13385,7 +13437,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$211 = name; + propKey$212 = name; break; case "defaultValue": propKey = name; @@ -13399,17 +13451,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$211, propKey); + updateTextarea(domElement, propKey$212, propKey); return; case "option": - for (var propKey$227 in lastProps) + for (var propKey$228 in lastProps) if ( - ((propKey$211 = lastProps[propKey$227]), - lastProps.hasOwnProperty(propKey$227) && - null != propKey$211 && - !nextProps.hasOwnProperty(propKey$227)) + ((propKey$212 = lastProps[propKey$228]), + lastProps.hasOwnProperty(propKey$228) && + null != propKey$212 && + !nextProps.hasOwnProperty(propKey$228)) ) - switch (propKey$227) { + switch (propKey$228) { case "selected": domElement.selected = !1; break; @@ -13417,33 +13469,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$227, + propKey$228, null, nextProps, - propKey$211 + propKey$212 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$211 = nextProps[lastDefaultValue]), + ((propKey$212 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$211 !== propKey && - (null != propKey$211 || null != propKey)) + propKey$212 !== propKey && + (null != propKey$212 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$211 && - "function" !== typeof propKey$211 && - "symbol" !== typeof propKey$211; + propKey$212 && + "function" !== typeof propKey$212 && + "symbol" !== typeof propKey$212; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$211, + propKey$212, nextProps, propKey ); @@ -13464,24 +13516,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$232 in lastProps) - (propKey$211 = lastProps[propKey$232]), - lastProps.hasOwnProperty(propKey$232) && - null != propKey$211 && - !nextProps.hasOwnProperty(propKey$232) && - setProp(domElement, tag, propKey$232, null, nextProps, propKey$211); + for (var propKey$233 in lastProps) + (propKey$212 = lastProps[propKey$233]), + lastProps.hasOwnProperty(propKey$233) && + null != propKey$212 && + !nextProps.hasOwnProperty(propKey$233) && + setProp(domElement, tag, propKey$233, null, nextProps, propKey$212); for (checked in nextProps) if ( - ((propKey$211 = nextProps[checked]), + ((propKey$212 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$211 !== propKey && - (null != propKey$211 || null != propKey)) + propKey$212 !== propKey && + (null != propKey$212 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$211) + if (null != propKey$212) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -13489,7 +13541,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$211, + propKey$212, nextProps, propKey ); @@ -13497,49 +13549,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$237 in lastProps) - (propKey$211 = lastProps[propKey$237]), - lastProps.hasOwnProperty(propKey$237) && - void 0 !== propKey$211 && - !nextProps.hasOwnProperty(propKey$237) && + for (var propKey$238 in lastProps) + (propKey$212 = lastProps[propKey$238]), + lastProps.hasOwnProperty(propKey$238) && + void 0 !== propKey$212 && + !nextProps.hasOwnProperty(propKey$238) && setPropOnCustomElement( domElement, tag, - propKey$237, + propKey$238, void 0, nextProps, - propKey$211 + propKey$212 ); for (defaultChecked in nextProps) - (propKey$211 = nextProps[defaultChecked]), + (propKey$212 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$211 === propKey || - (void 0 === propKey$211 && void 0 === propKey) || + propKey$212 === propKey || + (void 0 === propKey$212 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$211, + propKey$212, nextProps, propKey ); return; } } - for (var propKey$242 in lastProps) - (propKey$211 = lastProps[propKey$242]), - lastProps.hasOwnProperty(propKey$242) && - null != propKey$211 && - !nextProps.hasOwnProperty(propKey$242) && - setProp(domElement, tag, propKey$242, null, nextProps, propKey$211); + for (var propKey$243 in lastProps) + (propKey$212 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$212 && + !nextProps.hasOwnProperty(propKey$243) && + setProp(domElement, tag, propKey$243, null, nextProps, propKey$212); for (lastProp in nextProps) - (propKey$211 = nextProps[lastProp]), + (propKey$212 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$211 === propKey || - (null == propKey$211 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$211, nextProps, propKey); + propKey$212 === propKey || + (null == propKey$212 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$212, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14141,26 +14193,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$250 = getResourcesFromRoot( + var styles$251 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$251 = styles$250.get(type); - resource$251 || + resource$252 = styles$251.get(type); + resource$252 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$251 = { + (resource$252 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$250.set(type, resource$251), - (styles$250 = JSCompiler_inline_result.querySelector( + styles$251.set(type, resource$252), + (styles$251 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$250._p && - ((resource$251.instance = styles$250), - (resource$251.state.loading = 5)), + !styles$251._p && + ((resource$252.instance = styles$251), + (resource$252.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14173,16 +14225,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$250 || + styles$251 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$251.state + resource$252.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$251; + return resource$252; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -14279,37 +14331,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$256 = hoistableRoot.querySelector( + var instance$257 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$256) + if (instance$257) return ( (resource.state.loading |= 4), - (resource.instance = instance$256), - markNodeAsHoistable(instance$256), - instance$256 + (resource.instance = instance$257), + markNodeAsHoistable(instance$257), + instance$257 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$256 = ( + instance$257 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$256); - var linkInstance = instance$256; + markNodeAsHoistable(instance$257); + var linkInstance = instance$257; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$256, "link", instance); + setInitialProperties(instance$257, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$256, props.precedence, hoistableRoot); - return (resource.instance = instance$256); + insertStylesheet(instance$257, props.precedence, hoistableRoot); + return (resource.instance = instance$257); case "script": - instance$256 = getScriptKey(props.src); + instance$257 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$256) + getScriptSelectorFromKey(instance$257) )) ) return ( @@ -14318,7 +14370,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$256))) + if ((styleProps = preloadPropsMap.get(instance$257))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -14641,6 +14693,7 @@ function FiberRootNode( this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -15341,16 +15394,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1664 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1667 = React.version; if ( - "19.0.0-experimental-7771d3a7-20240827" !== - isomorphicReactPackageVersion$jscomp$inline_1664 + "19.0.0-experimental-4c58fce7-20240904" !== + isomorphicReactPackageVersion$jscomp$inline_1667 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1664, - "19.0.0-experimental-7771d3a7-20240827" + isomorphicReactPackageVersion$jscomp$inline_1667, + "19.0.0-experimental-4c58fce7-20240904" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15370,25 +15423,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2077 = { +var internals$jscomp$inline_2083 = { bundleType: 0, - version: "19.0.0-experimental-7771d3a7-20240827", + version: "19.0.0-experimental-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-7771d3a7-20240827" + reconcilerVersion: "19.0.0-experimental-4c58fce7-20240904" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2078 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2084 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2078.isDisabled && - hook$jscomp$inline_2078.supportsFiber + !hook$jscomp$inline_2084.isDisabled && + hook$jscomp$inline_2084.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2078.inject( - internals$jscomp$inline_2077 + (rendererID = hook$jscomp$inline_2084.inject( + internals$jscomp$inline_2083 )), - (injectedHook = hook$jscomp$inline_2078); + (injectedHook = hook$jscomp$inline_2084); } catch (err) {} } exports.createComponentSelector = function (component) { @@ -15631,4 +15684,4 @@ exports.observeVisibleRects = function ( } }; }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js index b45f16a4441fab..6935479bf46aab 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js @@ -416,7 +416,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js index 8c5bd8d2651e93..a4e27c3b29b016 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js @@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js index d57323bc53c711..d0071e5c60b7d0 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js index 5c57438156f5f4..a76983b4b0a371 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom-experimental/package.json b/packages/next/src/compiled/react-dom-experimental/package.json index 05d7b4f62c03ae..f28dfecc210660 100644 --- a/packages/next/src/compiled/react-dom-experimental/package.json +++ b/packages/next/src/compiled/react-dom-experimental/package.json @@ -72,10 +72,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.0.0-experimental-7771d3a7-20240827" + "scheduler": "0.0.0-experimental-4c58fce7-20240904" }, "peerDependencies": { - "react": "0.0.0-experimental-7771d3a7-20240827" + "react": "0.0.0-experimental-4c58fce7-20240904" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js index 17b494b4e35fc5..4195357eeb79ff 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js @@ -1010,28 +1010,37 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -1110,6 +1119,7 @@ root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -5695,6 +5705,14 @@ } function finishRenderingHooks(current, workInProgress) { workInProgress._debugHookTypes = hookTypesDev; + null === workInProgress.dependencies + ? null !== thenableState && + (workInProgress.dependencies = { + lanes: 0, + firstContext: null, + _debugThenableState: thenableState + }) + : (workInProgress.dependencies._debugThenableState = thenableState); ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; @@ -8447,32 +8465,32 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2299; - var JSCompiler_object_inline_stack_2300 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2292; + var JSCompiler_object_inline_stack_2293 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2301 = !1; + var JSCompiler_object_inline_componentStack_2294 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2299 = didSuspend) || - (JSCompiler_object_inline_digest_2299 = + (JSCompiler_object_inline_digest_2292 = didSuspend) || + (JSCompiler_object_inline_digest_2292 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2299 && - ((JSCompiler_object_inline_componentStack_2301 = !0), + JSCompiler_object_inline_digest_2292 && + ((JSCompiler_object_inline_componentStack_2294 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2299 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2292 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2301 + JSCompiler_object_inline_componentStack_2294 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2298 = nextHydratableInstance; + var JSCompiler_object_inline_message_2291 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2298)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2291)) { c: { - var instance = JSCompiler_object_inline_message_2298; + var instance = JSCompiler_object_inline_message_2291; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8513,19 +8531,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2298 + JSCompiler_object_inline_message_2291 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2298 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2291 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2298 && - ((JSCompiler_object_inline_message_2298 = - JSCompiler_object_inline_message_2298.dehydrated), - null !== JSCompiler_object_inline_message_2298) + null !== JSCompiler_object_inline_message_2291 && + ((JSCompiler_object_inline_message_2291 = + JSCompiler_object_inline_message_2291.dehydrated), + null !== JSCompiler_object_inline_message_2291) ) return ( - JSCompiler_object_inline_message_2298.data === + JSCompiler_object_inline_message_2291.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8533,58 +8551,58 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2298 = - JSCompiler_object_inline_stack_2300.children; - JSCompiler_object_inline_stack_2300 = - JSCompiler_object_inline_stack_2300.fallback; - if (JSCompiler_object_inline_componentStack_2301) + JSCompiler_object_inline_message_2291 = + JSCompiler_object_inline_stack_2293.children; + JSCompiler_object_inline_stack_2293 = + JSCompiler_object_inline_stack_2293.fallback; + if (JSCompiler_object_inline_componentStack_2294) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2301 = + (JSCompiler_object_inline_componentStack_2294 = workInProgress.mode), - (JSCompiler_object_inline_message_2298 = + (JSCompiler_object_inline_message_2291 = mountWorkInProgressOffscreenFiber( { mode: "hidden", - children: JSCompiler_object_inline_message_2298 + children: JSCompiler_object_inline_message_2291 }, - JSCompiler_object_inline_componentStack_2301 + JSCompiler_object_inline_componentStack_2294 )), - (JSCompiler_object_inline_stack_2300 = createFiberFromFragment( - JSCompiler_object_inline_stack_2300, - JSCompiler_object_inline_componentStack_2301, + (JSCompiler_object_inline_stack_2293 = createFiberFromFragment( + JSCompiler_object_inline_stack_2293, + JSCompiler_object_inline_componentStack_2294, renderLanes, null )), - (JSCompiler_object_inline_message_2298.return = workInProgress), - (JSCompiler_object_inline_stack_2300.return = workInProgress), - (JSCompiler_object_inline_message_2298.sibling = - JSCompiler_object_inline_stack_2300), - (workInProgress.child = JSCompiler_object_inline_message_2298), - (JSCompiler_object_inline_componentStack_2301 = + (JSCompiler_object_inline_message_2291.return = workInProgress), + (JSCompiler_object_inline_stack_2293.return = workInProgress), + (JSCompiler_object_inline_message_2291.sibling = + JSCompiler_object_inline_stack_2293), + (workInProgress.child = JSCompiler_object_inline_message_2291), + (JSCompiler_object_inline_componentStack_2294 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2301.memoizedState = + (JSCompiler_object_inline_componentStack_2294.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2301.childLanes = + (JSCompiler_object_inline_componentStack_2294.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2299, + JSCompiler_object_inline_digest_2292, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2300 + JSCompiler_object_inline_stack_2293 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2298 + JSCompiler_object_inline_message_2291 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2298 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2298) + ((JSCompiler_object_inline_message_2291 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2291) ) { if (didSuspend) workInProgress.flags & 256 @@ -8601,94 +8619,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2301 = - JSCompiler_object_inline_stack_2300.fallback), - (JSCompiler_object_inline_message_2298 = workInProgress.mode), - (JSCompiler_object_inline_stack_2300 = + (JSCompiler_object_inline_componentStack_2294 = + JSCompiler_object_inline_stack_2293.fallback), + (JSCompiler_object_inline_message_2291 = workInProgress.mode), + (JSCompiler_object_inline_stack_2293 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2300.children + children: JSCompiler_object_inline_stack_2293.children }, - JSCompiler_object_inline_message_2298 + JSCompiler_object_inline_message_2291 )), - (JSCompiler_object_inline_componentStack_2301 = + (JSCompiler_object_inline_componentStack_2294 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2301, - JSCompiler_object_inline_message_2298, + JSCompiler_object_inline_componentStack_2294, + JSCompiler_object_inline_message_2291, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2301.flags |= 2), - (JSCompiler_object_inline_stack_2300.return = workInProgress), - (JSCompiler_object_inline_componentStack_2301.return = + (JSCompiler_object_inline_componentStack_2294.flags |= 2), + (JSCompiler_object_inline_stack_2293.return = workInProgress), + (JSCompiler_object_inline_componentStack_2294.return = workInProgress), - (JSCompiler_object_inline_stack_2300.sibling = - JSCompiler_object_inline_componentStack_2301), - (workInProgress.child = JSCompiler_object_inline_stack_2300), + (JSCompiler_object_inline_stack_2293.sibling = + JSCompiler_object_inline_componentStack_2294), + (workInProgress.child = JSCompiler_object_inline_stack_2293), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2300 = workInProgress.child), - (JSCompiler_object_inline_stack_2300.memoizedState = + (JSCompiler_object_inline_stack_2293 = workInProgress.child), + (JSCompiler_object_inline_stack_2293.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2300.childLanes = + (JSCompiler_object_inline_stack_2293.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2299, + JSCompiler_object_inline_digest_2292, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2301)); + JSCompiler_object_inline_componentStack_2294)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2298.data === + JSCompiler_object_inline_message_2291.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2299 = - JSCompiler_object_inline_message_2298.nextSibling && - JSCompiler_object_inline_message_2298.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2299) { - JSCompiler_temp = JSCompiler_object_inline_digest_2299.dgst; - var message = JSCompiler_object_inline_digest_2299.msg; - instance = JSCompiler_object_inline_digest_2299.stck; - var componentStack = JSCompiler_object_inline_digest_2299.cstck; + JSCompiler_object_inline_digest_2292 = + JSCompiler_object_inline_message_2291.nextSibling && + JSCompiler_object_inline_message_2291.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2292) { + JSCompiler_temp = JSCompiler_object_inline_digest_2292.dgst; + var message = JSCompiler_object_inline_digest_2292.msg; + instance = JSCompiler_object_inline_digest_2292.stck; + var componentStack = JSCompiler_object_inline_digest_2292.cstck; } - JSCompiler_object_inline_message_2298 = message; - JSCompiler_object_inline_digest_2299 = JSCompiler_temp; - JSCompiler_object_inline_stack_2300 = instance; - JSCompiler_object_inline_componentStack_2301 = componentStack; - JSCompiler_object_inline_message_2298 = - JSCompiler_object_inline_message_2298 - ? Error(JSCompiler_object_inline_message_2298) + JSCompiler_object_inline_message_2291 = message; + JSCompiler_object_inline_digest_2292 = JSCompiler_temp; + JSCompiler_object_inline_stack_2293 = instance; + JSCompiler_object_inline_componentStack_2294 = componentStack; + JSCompiler_object_inline_message_2291 = + JSCompiler_object_inline_message_2291 + ? Error(JSCompiler_object_inline_message_2291) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2298.stack = - JSCompiler_object_inline_stack_2300 || ""; - JSCompiler_object_inline_message_2298.digest = - JSCompiler_object_inline_digest_2299; - JSCompiler_object_inline_digest_2299 = - void 0 === JSCompiler_object_inline_componentStack_2301 + JSCompiler_object_inline_message_2291.stack = + JSCompiler_object_inline_stack_2293 || ""; + JSCompiler_object_inline_message_2291.digest = + JSCompiler_object_inline_digest_2292; + JSCompiler_object_inline_digest_2292 = + void 0 === JSCompiler_object_inline_componentStack_2294 ? null - : JSCompiler_object_inline_componentStack_2301; - "string" === typeof JSCompiler_object_inline_digest_2299 && + : JSCompiler_object_inline_componentStack_2294; + "string" === typeof JSCompiler_object_inline_digest_2292 && CapturedStacks.set( - JSCompiler_object_inline_message_2298, - JSCompiler_object_inline_digest_2299 + JSCompiler_object_inline_message_2291, + JSCompiler_object_inline_digest_2292 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2298, + value: JSCompiler_object_inline_message_2291, source: null, - stack: JSCompiler_object_inline_digest_2299 + stack: JSCompiler_object_inline_digest_2292 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8696,25 +8714,25 @@ renderLanes ); } else if ( - ((JSCompiler_object_inline_digest_2299 = + ((JSCompiler_object_inline_digest_2292 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2299) + didReceiveUpdate || JSCompiler_object_inline_digest_2292) ) { - JSCompiler_object_inline_digest_2299 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2299) { - JSCompiler_object_inline_stack_2300 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2300 & 42)) - JSCompiler_object_inline_stack_2300 = 1; + JSCompiler_object_inline_digest_2292 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2292) { + JSCompiler_object_inline_stack_2293 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2293 & 42)) + JSCompiler_object_inline_stack_2293 = 1; else - switch (JSCompiler_object_inline_stack_2300) { + switch (JSCompiler_object_inline_stack_2293) { case 2: - JSCompiler_object_inline_stack_2300 = 1; + JSCompiler_object_inline_stack_2293 = 1; break; case 8: - JSCompiler_object_inline_stack_2300 = 4; + JSCompiler_object_inline_stack_2293 = 4; break; case 32: - JSCompiler_object_inline_stack_2300 = 16; + JSCompiler_object_inline_stack_2293 = 16; break; case 128: case 256: @@ -8735,40 +8753,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2300 = 64; + JSCompiler_object_inline_stack_2293 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2300 = 134217728; + JSCompiler_object_inline_stack_2293 = 134217728; break; default: - JSCompiler_object_inline_stack_2300 = 0; + JSCompiler_object_inline_stack_2293 = 0; } - JSCompiler_object_inline_stack_2300 = + JSCompiler_object_inline_stack_2293 = 0 !== - (JSCompiler_object_inline_stack_2300 & - (JSCompiler_object_inline_digest_2299.suspendedLanes | + (JSCompiler_object_inline_stack_2293 & + (JSCompiler_object_inline_digest_2292.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2300; + : JSCompiler_object_inline_stack_2293; if ( - 0 !== JSCompiler_object_inline_stack_2300 && - JSCompiler_object_inline_stack_2300 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2293 && + JSCompiler_object_inline_stack_2293 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2300), + ((prevState.retryLane = JSCompiler_object_inline_stack_2293), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2300 + JSCompiler_object_inline_stack_2293 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2299, + JSCompiler_object_inline_digest_2292, current, - JSCompiler_object_inline_stack_2300 + JSCompiler_object_inline_stack_2293 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2298.data === + JSCompiler_object_inline_message_2291.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8776,7 +8794,7 @@ renderLanes ); } else - JSCompiler_object_inline_message_2298.data === + JSCompiler_object_inline_message_2291.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -8784,12 +8802,12 @@ null, current )), - (JSCompiler_object_inline_message_2298._reactRetry = + (JSCompiler_object_inline_message_2291._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2298.nextSibling + JSCompiler_object_inline_message_2291.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -8807,57 +8825,57 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2300.children + JSCompiler_object_inline_stack_2293.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2301) + if (JSCompiler_object_inline_componentStack_2294) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2301 = - JSCompiler_object_inline_stack_2300.fallback), - (JSCompiler_object_inline_message_2298 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2294 = + JSCompiler_object_inline_stack_2293.fallback), + (JSCompiler_object_inline_message_2291 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2300 = createWorkInProgress( + (JSCompiler_object_inline_stack_2293 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2300.children + children: JSCompiler_object_inline_stack_2293.children } )), - (JSCompiler_object_inline_stack_2300.subtreeFlags = + (JSCompiler_object_inline_stack_2293.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2301 = + ? (JSCompiler_object_inline_componentStack_2294 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2301 + JSCompiler_object_inline_componentStack_2294 )) - : ((JSCompiler_object_inline_componentStack_2301 = + : ((JSCompiler_object_inline_componentStack_2294 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2301, - JSCompiler_object_inline_message_2298, + JSCompiler_object_inline_componentStack_2294, + JSCompiler_object_inline_message_2291, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2301.flags |= 2)), - (JSCompiler_object_inline_componentStack_2301.return = + (JSCompiler_object_inline_componentStack_2294.flags |= 2)), + (JSCompiler_object_inline_componentStack_2294.return = workInProgress), - (JSCompiler_object_inline_stack_2300.return = workInProgress), - (JSCompiler_object_inline_stack_2300.sibling = - JSCompiler_object_inline_componentStack_2301), - (workInProgress.child = JSCompiler_object_inline_stack_2300), - (JSCompiler_object_inline_stack_2300 = - JSCompiler_object_inline_componentStack_2301), - (JSCompiler_object_inline_componentStack_2301 = workInProgress.child), - (JSCompiler_object_inline_message_2298 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2298 - ? (JSCompiler_object_inline_message_2298 = + (JSCompiler_object_inline_stack_2293.return = workInProgress), + (JSCompiler_object_inline_stack_2293.sibling = + JSCompiler_object_inline_componentStack_2294), + (workInProgress.child = JSCompiler_object_inline_stack_2293), + (JSCompiler_object_inline_stack_2293 = + JSCompiler_object_inline_componentStack_2294), + (JSCompiler_object_inline_componentStack_2294 = workInProgress.child), + (JSCompiler_object_inline_message_2291 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2291 + ? (JSCompiler_object_inline_message_2291 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2298.cachePool), + JSCompiler_object_inline_message_2291.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -8865,37 +8883,37 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2298 = { + (JSCompiler_object_inline_message_2291 = { baseLanes: - JSCompiler_object_inline_message_2298.baseLanes | renderLanes, + JSCompiler_object_inline_message_2291.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2301.memoizedState = - JSCompiler_object_inline_message_2298), - (JSCompiler_object_inline_componentStack_2301.childLanes = + (JSCompiler_object_inline_componentStack_2294.memoizedState = + JSCompiler_object_inline_message_2291), + (JSCompiler_object_inline_componentStack_2294.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2299, + JSCompiler_object_inline_digest_2292, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2300 + JSCompiler_object_inline_stack_2293 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2300.children + children: JSCompiler_object_inline_stack_2293.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2299 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2299 + ((JSCompiler_object_inline_digest_2292 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2292 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2299.push(current)); + : JSCompiler_object_inline_digest_2292.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10095,7 +10113,11 @@ "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -12994,7 +13016,8 @@ ? null : { lanes: pendingProps.lanes, - firstContext: pendingProps.firstContext + firstContext: pendingProps.firstContext, + _debugThenableState: pendingProps._debugThenableState }; workInProgress.sibling = current.sibling; workInProgress.index = current.index; @@ -13047,7 +13070,8 @@ ? null : { lanes: renderLanes.lanes, - firstContext: renderLanes.firstContext + firstContext: renderLanes.firstContext, + _debugThenableState: renderLanes._debugThenableState }), (workInProgress.selfBaseDuration = current.selfBaseDuration), (workInProgress.treeBaseDuration = current.treeBaseDuration)); @@ -14078,7 +14102,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if ( @@ -14120,7 +14145,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -14145,7 +14171,12 @@ var renderWasConcurrent = shouldTimeSlice; do { if (didTimeout === RootDidNotComplete) - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -14177,7 +14208,12 @@ } if (didTimeout === RootFatalErrored) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -14193,7 +14229,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -14227,7 +14264,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -14239,7 +14277,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -14252,7 +14291,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -14307,7 +14347,8 @@ transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -14326,7 +14367,7 @@ didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -14374,26 +14415,31 @@ function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended(root, suspendedLanes, spawnedLane) { + function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings + ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - expirationTimes[index] = -1; + didSkipSuspendedSiblings[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -14423,13 +14469,18 @@ if (exitStatus === RootFatalErrored) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (exitStatus === RootDidNotComplete) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -14482,7 +14533,8 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = !1; + workInProgressRootDidAttachPingListener = + workInProgressRootDidSkipSuspendedSiblings = !1; workInProgressRootExitStatus = RootInProgress; workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -14607,7 +14659,8 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function renderRootSync(root, lanes) { @@ -14924,43 +14977,20 @@ workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - if ((root.mode & ProfileMode) !== NoMode) { - stopProfilerTimerIfRunningAndRecordDelta(root, !1); - unitOfWork = root.actualDuration; - for (thrownValue = root.child; null !== thrownValue; ) - (unitOfWork += thrownValue.actualDuration), - (thrownValue = thrownValue.sibling); - root.actualDuration = unitOfWork; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = RootDidNotComplete; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? unwindUnitOfWork(unitOfWork, !0) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { - 0 !== (completedWork.flags & 32768) && - console.error( - "Internal React error: Expected this fiber to be complete, but it isn't. It should have been unwound. This is a bug in React." + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings ); + return; + } var current = completedWork.alternate; unitOfWork = completedWork.return; (completedWork.mode & ProfileMode) === NoMode @@ -14994,6 +15024,38 @@ workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted); } + function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + if ((unitOfWork.mode & ProfileMode) !== NoMode) { + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1); + next = unitOfWork.actualDuration; + for (var child = unitOfWork.child; null !== child; ) + (next += child.actualDuration), (child = child.sibling); + unitOfWork.actualDuration = next; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), + (next.subtreeFlags = 0), + (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = RootDidNotComplete; + workInProgress = null; + } function commitRoot( root, recoverableErrors, @@ -15391,6 +15453,7 @@ var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && @@ -19847,6 +19910,7 @@ this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -23645,6 +23709,7 @@ SuspendedOnHydration = 8, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = RootInProgress, @@ -24221,11 +24286,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24262,11 +24327,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-rc-7771d3a7-20240827", + version: "19.0.0-rc-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-7771d3a7-20240827" + reconcilerVersion: "19.0.0-rc-4c58fce7-20240904" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24410,7 +24475,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js index 1adfa7be203f66..33be1c34618e49 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js @@ -595,28 +595,37 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -687,6 +696,7 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -698,18 +708,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$6 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$6; - remainingLanes[index$6] = 0; - expirationTimes[index$6] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$6]; + var index$7 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$7; + remainingLanes[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$6] = null, index$6 = 0; - index$6 < hiddenUpdatesForLane.length; - index$6++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$6]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -729,10 +739,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$7 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$7; - (lane & entangledLanes) | (root[index$7] & entangledLanes) && - (root[index$7] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -882,8 +892,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$9 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$9 && "aria-" !== prefix$9) { + var prefix$10 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$10 && "aria-" !== prefix$10) { node.removeAttribute(name); return; } @@ -1216,15 +1226,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$15 in styles) - (styleName = styles[styleName$15]), - styles.hasOwnProperty(styleName$15) && - prevStyles[styleName$15] !== styleName && - setValueForStyle(node, styleName$15, styleName); - } else for (var styleName$16 in styles) - styles.hasOwnProperty(styleName$16) && - setValueForStyle(node, styleName$16, styles[styleName$16]); + (styleName = styles[styleName$16]), + styles.hasOwnProperty(styleName$16) && + prevStyles[styleName$16] !== styleName && + setValueForStyle(node, styleName$16, styleName); + } else + for (var styleName$17 in styles) + styles.hasOwnProperty(styleName$17) && + setValueForStyle(node, styleName$17, styles[styleName$17]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1953,19 +1963,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$286; + var JSCompiler_inline_result$jscomp$287; if (canUseDOM) { - var isSupported$jscomp$inline_422 = "oninput" in document; - if (!isSupported$jscomp$inline_422) { - var element$jscomp$inline_423 = document.createElement("div"); - element$jscomp$inline_423.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_422 = - "function" === typeof element$jscomp$inline_423.oninput; + var isSupported$jscomp$inline_423 = "oninput" in document; + if (!isSupported$jscomp$inline_423) { + var element$jscomp$inline_424 = document.createElement("div"); + element$jscomp$inline_424.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_423 = + "function" === typeof element$jscomp$inline_424.oninput; } - JSCompiler_inline_result$jscomp$286 = isSupported$jscomp$inline_422; - } else JSCompiler_inline_result$jscomp$286 = !1; + JSCompiler_inline_result$jscomp$287 = isSupported$jscomp$inline_423; + } else JSCompiler_inline_result$jscomp$287 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$286 && + JSCompiler_inline_result$jscomp$287 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3855,7 +3865,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$53 = !1; + didReadFromEntangledAsyncAction$54 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3876,11 +3886,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$54 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$53 = !0); + (didReadFromEntangledAsyncAction$54 = !0); continue; } else (updateLane = { @@ -3926,7 +3936,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$53 && + didReadFromEntangledAsyncAction$54 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4124,8 +4134,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$59) { - onActionError(actionQueue, node, error$59); + } catch (error$60) { + onActionError(actionQueue, node, error$60); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4541,10 +4551,10 @@ function refreshCache(fiber) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$62 = enqueueUpdate(provider, fiber, lane); - null !== root$62 && - (scheduleUpdateOnFiber(root$62, provider, lane), - entangleTransitions(root$62, provider, lane)); + var root$63 = enqueueUpdate(provider, fiber, lane); + null !== root$63 && + (scheduleUpdateOnFiber(root$63, provider, lane), + entangleTransitions(root$63, provider, lane)); provider = { cache: createCache() }; fiber.payload = provider; return; @@ -5001,9 +5011,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$66) { + } catch (e$67) { setTimeout(function () { - throw e$66; + throw e$67; }); } } @@ -5014,9 +5024,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$67) { + } catch (e$68) { setTimeout(function () { - throw e$67; + throw e$68; }); } } @@ -7298,9 +7308,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$108 in Component) - void 0 === newProps[propName$108] && - (newProps[propName$108] = Component[propName$108]); + for (var propName$109 in Component) + void 0 === newProps[propName$109] && + (newProps[propName$109] = Component[propName$109]); } return newProps; } @@ -7364,8 +7374,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$109) { - captureCommitPhaseError(current, nearestMountedAncestor, error$109); + } catch (error$110) { + captureCommitPhaseError(current, nearestMountedAncestor, error$110); } else ref.current = null; } @@ -7401,7 +7411,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$19) { + } catch (e$20) { JSCompiler_temp = null; break a; } @@ -7629,11 +7639,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$111) { + } catch (error$112) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$111 + error$112 ); } } @@ -8084,8 +8094,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$123) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$123); + } catch (error$124) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$124); } } break; @@ -8258,11 +8268,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$124) { + } catch (error$125) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$124 + error$125 ); } break; @@ -8299,8 +8309,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$125) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$125); + } catch (error$126) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$126); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -8310,8 +8320,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$127) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$127); + } catch (error$128) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$128); } } flags & 1024 && (needsFormReset = !0); @@ -8326,8 +8336,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$128) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$128); + } catch (error$129) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$129); } } break; @@ -8341,8 +8351,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$129) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$129); + } catch (error$130) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$130); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -8436,11 +8446,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$113) { + } catch (error$114) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$113 + error$114 ); } } else if ( @@ -8509,21 +8519,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$114 = JSCompiler_inline_result.stateNode; + var parent$115 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$114, ""), + (setTextContent(parent$115, ""), (JSCompiler_inline_result.flags &= -33)); - var before$115 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$115, parent$114); + var before$116 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$116, parent$115); break; case 3: case 4: - var parent$116 = JSCompiler_inline_result.stateNode.containerInfo, - before$117 = getHostSibling(finishedWork); + var parent$117 = JSCompiler_inline_result.stateNode.containerInfo, + before$118 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$117, - parent$116 + before$118, + parent$117 ); break; default: @@ -9401,14 +9411,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$139 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$139 = lastTailNode), + for (var lastTailNode$140 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$140 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$139 + null === lastTailNode$140 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$139.sibling = null); + : (lastTailNode$140.sibling = null); } } function bubbleProperties(completedWork) { @@ -9418,19 +9428,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$140 = completedWork.child; null !== child$140; ) - (newChildLanes |= child$140.lanes | child$140.childLanes), - (subtreeFlags |= child$140.subtreeFlags & 31457280), - (subtreeFlags |= child$140.flags & 31457280), - (child$140.return = completedWork), - (child$140 = child$140.sibling); + for (var child$141 = completedWork.child; null !== child$141; ) + (newChildLanes |= child$141.lanes | child$141.childLanes), + (subtreeFlags |= child$141.subtreeFlags & 31457280), + (subtreeFlags |= child$141.flags & 31457280), + (child$141.return = completedWork), + (child$141 = child$141.sibling); else - for (child$140 = completedWork.child; null !== child$140; ) - (newChildLanes |= child$140.lanes | child$140.childLanes), - (subtreeFlags |= child$140.subtreeFlags), - (subtreeFlags |= child$140.flags), - (child$140.return = completedWork), - (child$140 = child$140.sibling); + for (child$141 = completedWork.child; null !== child$141; ) + (newChildLanes |= child$141.lanes | child$141.childLanes), + (subtreeFlags |= child$141.subtreeFlags), + (subtreeFlags |= child$141.flags), + (child$141.return = completedWork), + (child$141 = child$141.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -9707,11 +9717,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$152 = null; + var cache$153 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$152 = newProps.memoizedState.cachePool.pool); - cache$152 !== type && (newProps.flags |= 2048); + (cache$153 = newProps.memoizedState.cachePool.pool); + cache$153 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -9736,8 +9746,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$152 = type.rendering; - if (null === cache$152) + cache$153 = type.rendering; + if (null === cache$153) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -9745,11 +9755,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$152 = findFirstSuspended(current); - if (null !== cache$152) { + cache$153 = findFirstSuspended(current); + if (null !== cache$153) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$152.updateQueue; + current = cache$153.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -9774,7 +9784,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$152)), null !== current)) { + if (((current = findFirstSuspended(cache$153)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -9784,7 +9794,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$152.alternate && + !cache$153.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -9797,13 +9807,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$152.sibling = workInProgress.child), - (workInProgress.child = cache$152)) + ? ((cache$153.sibling = workInProgress.child), + (workInProgress.child = cache$153)) : ((current = type.last), null !== current - ? (current.sibling = cache$152) - : (workInProgress.child = cache$152), - (type.last = cache$152)); + ? (current.sibling = cache$153) + : (workInProgress.child = cache$153), + (type.last = cache$153)); } if (null !== type.tail) return ( @@ -9976,6 +9986,7 @@ var DefaultAsyncDispatcher = { workInProgressRootRenderLanes = 0, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = 0, @@ -10026,7 +10037,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10037,7 +10049,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -10059,7 +10072,13 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (0 !== didTimeout) { var renderWasConcurrent = shouldTimeSlice; do { - if (6 === didTimeout) markRootSuspended(root, lanes, 0); + if (6 === didTimeout) + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -10091,7 +10110,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } if (1 === didTimeout) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -10107,7 +10131,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -10129,7 +10154,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -10141,7 +10167,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -10154,7 +10181,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -10206,7 +10234,8 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -10225,7 +10254,7 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -10273,25 +10302,28 @@ function isRenderConsistentWithExternalStores(finishedWork) { function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0)); executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended(root, suspendedLanes, spawnedLane) { +function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings +) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5; - expirationTimes[index$5] = -1; + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didSkipSuspendedSiblings[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10318,13 +10350,18 @@ function performSyncWorkOnRoot(root, lanes) { if (1 === exitStatus) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (6 === exitStatus) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -10377,7 +10414,8 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = !1; + workInProgressRootDidAttachPingListener = + workInProgressRootDidSkipSuspendedSiblings = !1; workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = @@ -10395,9 +10433,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$3 = 31 - clz32(allEntangledLanes), - lane = 1 << index$3; - lanes |= root[index$3]; + var index$4 = 31 - clz32(allEntangledLanes), + lane = 1 << index$4; + lanes |= root[index$4]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -10467,7 +10505,8 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function renderRootSync(root, lanes) { @@ -10501,8 +10540,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$167) { - handleThrow(root, thrownValue$167); + } catch (thrownValue$168) { + handleThrow(root, thrownValue$168); } while (1); lanes && root.shellSuspendCounter++; @@ -10611,8 +10650,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$169) { - handleThrow(root, thrownValue$169); + } catch (thrownValue$170) { + handleThrow(root, thrownValue$170); } while (1); resetContextDependencies(); @@ -10704,31 +10743,20 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = 6; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? unwindUnitOfWork(unitOfWork, !0) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings + ); + return; + } unitOfWork = completedWork.return; var next = completeWork( completedWork.alternate, @@ -10748,6 +10776,29 @@ function completeUnitOfWork(unitOfWork) { } while (null !== completedWork); 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5); } +function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = 6; + workInProgress = null; +} function commitRoot( root, recoverableErrors, @@ -10870,7 +10921,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$173 = rootWithPendingPassiveEffects, + var root$174 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -10909,7 +10960,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$173, remainingLanes); + releaseRootPooledCache(root$174, remainingLanes); } } return !1; @@ -10980,6 +11031,7 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); @@ -11065,14 +11117,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$175 = firstScheduledRoot; null !== root$175; ) { + for (var root$176 = firstScheduledRoot; null !== root$176; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$175.pendingLanes; + var pendingLanes = root$176.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$175.suspendedLanes, - pingedLanes = root$175.pingedLanes; + var suspendedLanes = root$176.suspendedLanes, + pingedLanes = root$176.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -11086,17 +11138,17 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$175, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$176, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$175, - root$175 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$176, + root$176 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 !== (JSCompiler_inline_result & 3) && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$175, JSCompiler_inline_result)); - root$175 = root$175.next; + performSyncWorkOnRoot(root$176, JSCompiler_inline_result)); + root$176 = root$176.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -11137,12 +11189,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4, - expirationTime = expirationTimes[index$4]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$4] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -11306,20 +11358,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1417 = 0; - i$jscomp$inline_1417 < simpleEventPluginEvents.length; - i$jscomp$inline_1417++ + var i$jscomp$inline_1413 = 0; + i$jscomp$inline_1413 < simpleEventPluginEvents.length; + i$jscomp$inline_1413++ ) { - var eventName$jscomp$inline_1418 = - simpleEventPluginEvents[i$jscomp$inline_1417], - domEventName$jscomp$inline_1419 = - eventName$jscomp$inline_1418.toLowerCase(), - capitalizedEvent$jscomp$inline_1420 = - eventName$jscomp$inline_1418[0].toUpperCase() + - eventName$jscomp$inline_1418.slice(1); + var eventName$jscomp$inline_1414 = + simpleEventPluginEvents[i$jscomp$inline_1413], + domEventName$jscomp$inline_1415 = + eventName$jscomp$inline_1414.toLowerCase(), + capitalizedEvent$jscomp$inline_1416 = + eventName$jscomp$inline_1414[0].toUpperCase() + + eventName$jscomp$inline_1414.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1419, - "on" + capitalizedEvent$jscomp$inline_1420 + domEventName$jscomp$inline_1415, + "on" + capitalizedEvent$jscomp$inline_1416 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -12502,34 +12554,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$189 = props[hasSrc]; - if (null != propValue$189) + var propValue$190 = props[hasSrc]; + if (null != propValue$190) switch (hasSrc) { case "name": - hasSrcSet = propValue$189; + hasSrcSet = propValue$190; break; case "type": - propValue = propValue$189; + propValue = propValue$190; break; case "checked": - checked = propValue$189; + checked = propValue$190; break; case "defaultChecked": - defaultChecked = propValue$189; + defaultChecked = propValue$190; break; case "value": - propKey = propValue$189; + propKey = propValue$190; break; case "defaultValue": - defaultValue = propValue$189; + defaultValue = propValue$190; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$189) + if (null != propValue$190) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$189, props, null); + setProp(domElement, tag, hasSrc, propValue$190, props, null); } } initInput( @@ -12666,14 +12718,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$189 in props) - props.hasOwnProperty(propValue$189) && - ((hasSrc = props[propValue$189]), + for (propValue$190 in props) + props.hasOwnProperty(propValue$190) && + ((hasSrc = props[propValue$190]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$189, + propValue$190, hasSrc, props, void 0 @@ -12721,14 +12773,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$206 in nextProps) { - var propKey = nextProps[propKey$206]; - lastProp = lastProps[propKey$206]; + for (var propKey$207 in nextProps) { + var propKey = nextProps[propKey$207]; + lastProp = lastProps[propKey$207]; if ( - nextProps.hasOwnProperty(propKey$206) && + nextProps.hasOwnProperty(propKey$207) && (null != propKey || null != lastProp) ) - switch (propKey$206) { + switch (propKey$207) { case "type": type = propKey; break; @@ -12757,7 +12809,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$206, + propKey$207, propKey, nextProps, lastProp @@ -12776,7 +12828,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$206 = null; + propKey = value = defaultValue = propKey$207 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -12807,7 +12859,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$206 = type; + propKey$207 = type; break; case "defaultValue": defaultValue = type; @@ -12828,15 +12880,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$206 - ? updateOptions(domElement, !!lastProps, propKey$206, !1) + null != propKey$207 + ? updateOptions(domElement, !!lastProps, propKey$207, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$206 = null; + propKey = propKey$207 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -12860,7 +12912,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$206 = name; + propKey$207 = name; break; case "defaultValue": propKey = name; @@ -12874,17 +12926,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$206, propKey); + updateTextarea(domElement, propKey$207, propKey); return; case "option": - for (var propKey$222 in lastProps) + for (var propKey$223 in lastProps) if ( - ((propKey$206 = lastProps[propKey$222]), - lastProps.hasOwnProperty(propKey$222) && - null != propKey$206 && - !nextProps.hasOwnProperty(propKey$222)) + ((propKey$207 = lastProps[propKey$223]), + lastProps.hasOwnProperty(propKey$223) && + null != propKey$207 && + !nextProps.hasOwnProperty(propKey$223)) ) - switch (propKey$222) { + switch (propKey$223) { case "selected": domElement.selected = !1; break; @@ -12892,33 +12944,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$222, + propKey$223, null, nextProps, - propKey$206 + propKey$207 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$206 = nextProps[lastDefaultValue]), + ((propKey$207 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$206 !== propKey && - (null != propKey$206 || null != propKey)) + propKey$207 !== propKey && + (null != propKey$207 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$206 && - "function" !== typeof propKey$206 && - "symbol" !== typeof propKey$206; + propKey$207 && + "function" !== typeof propKey$207 && + "symbol" !== typeof propKey$207; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$206, + propKey$207, nextProps, propKey ); @@ -12939,24 +12991,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$227 in lastProps) - (propKey$206 = lastProps[propKey$227]), - lastProps.hasOwnProperty(propKey$227) && - null != propKey$206 && - !nextProps.hasOwnProperty(propKey$227) && - setProp(domElement, tag, propKey$227, null, nextProps, propKey$206); + for (var propKey$228 in lastProps) + (propKey$207 = lastProps[propKey$228]), + lastProps.hasOwnProperty(propKey$228) && + null != propKey$207 && + !nextProps.hasOwnProperty(propKey$228) && + setProp(domElement, tag, propKey$228, null, nextProps, propKey$207); for (checked in nextProps) if ( - ((propKey$206 = nextProps[checked]), + ((propKey$207 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$206 !== propKey && - (null != propKey$206 || null != propKey)) + propKey$207 !== propKey && + (null != propKey$207 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$206) + if (null != propKey$207) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -12964,7 +13016,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$206, + propKey$207, nextProps, propKey ); @@ -12972,49 +13024,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$232 in lastProps) - (propKey$206 = lastProps[propKey$232]), - lastProps.hasOwnProperty(propKey$232) && - void 0 !== propKey$206 && - !nextProps.hasOwnProperty(propKey$232) && + for (var propKey$233 in lastProps) + (propKey$207 = lastProps[propKey$233]), + lastProps.hasOwnProperty(propKey$233) && + void 0 !== propKey$207 && + !nextProps.hasOwnProperty(propKey$233) && setPropOnCustomElement( domElement, tag, - propKey$232, + propKey$233, void 0, nextProps, - propKey$206 + propKey$207 ); for (defaultChecked in nextProps) - (propKey$206 = nextProps[defaultChecked]), + (propKey$207 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$206 === propKey || - (void 0 === propKey$206 && void 0 === propKey) || + propKey$207 === propKey || + (void 0 === propKey$207 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$206, + propKey$207, nextProps, propKey ); return; } } - for (var propKey$237 in lastProps) - (propKey$206 = lastProps[propKey$237]), - lastProps.hasOwnProperty(propKey$237) && - null != propKey$206 && - !nextProps.hasOwnProperty(propKey$237) && - setProp(domElement, tag, propKey$237, null, nextProps, propKey$206); + for (var propKey$238 in lastProps) + (propKey$207 = lastProps[propKey$238]), + lastProps.hasOwnProperty(propKey$238) && + null != propKey$207 && + !nextProps.hasOwnProperty(propKey$238) && + setProp(domElement, tag, propKey$238, null, nextProps, propKey$207); for (lastProp in nextProps) - (propKey$206 = nextProps[lastProp]), + (propKey$207 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$206 === propKey || - (null == propKey$206 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$206, nextProps, propKey); + propKey$207 === propKey || + (null == propKey$207 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$207, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -13559,26 +13611,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$245 = getResourcesFromRoot( + var styles$246 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$246 = styles$245.get(type); - resource$246 || + resource$247 = styles$246.get(type); + resource$247 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$246 = { + (resource$247 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$245.set(type, resource$246), - (styles$245 = JSCompiler_inline_result.querySelector( + styles$246.set(type, resource$247), + (styles$246 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$245._p && - ((resource$246.instance = styles$245), - (resource$246.state.loading = 5)), + !styles$246._p && + ((resource$247.instance = styles$246), + (resource$247.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -13591,16 +13643,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$245 || + styles$246 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$246.state + resource$247.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$246; + return resource$247; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -13697,37 +13749,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$251 = hoistableRoot.querySelector( + var instance$252 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$251) + if (instance$252) return ( (resource.state.loading |= 4), - (resource.instance = instance$251), - markNodeAsHoistable(instance$251), - instance$251 + (resource.instance = instance$252), + markNodeAsHoistable(instance$252), + instance$252 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$251 = ( + instance$252 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$251); - var linkInstance = instance$251; + markNodeAsHoistable(instance$252); + var linkInstance = instance$252; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$251, "link", instance); + setInitialProperties(instance$252, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$251, props.precedence, hoistableRoot); - return (resource.instance = instance$251); + insertStylesheet(instance$252, props.precedence, hoistableRoot); + return (resource.instance = instance$252); case "script": - instance$251 = getScriptKey(props.src); + instance$252 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$251) + getScriptSelectorFromKey(instance$252) )) ) return ( @@ -13736,7 +13788,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$251))) + if ((styleProps = preloadPropsMap.get(instance$252))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -14059,6 +14111,7 @@ function FiberRootNode( this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -14759,16 +14812,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1664 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1660 = React.version; if ( - "19.0.0-rc-7771d3a7-20240827" !== - isomorphicReactPackageVersion$jscomp$inline_1664 + "19.0.0-rc-4c58fce7-20240904" !== + isomorphicReactPackageVersion$jscomp$inline_1660 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1664, - "19.0.0-rc-7771d3a7-20240827" + isomorphicReactPackageVersion$jscomp$inline_1660, + "19.0.0-rc-4c58fce7-20240904" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -14788,25 +14841,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2049 = { +var internals$jscomp$inline_2045 = { bundleType: 0, - version: "19.0.0-rc-7771d3a7-20240827", + version: "19.0.0-rc-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-7771d3a7-20240827" + reconcilerVersion: "19.0.0-rc-4c58fce7-20240904" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2050 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2046 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2050.isDisabled && - hook$jscomp$inline_2050.supportsFiber + !hook$jscomp$inline_2046.isDisabled && + hook$jscomp$inline_2046.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2050.inject( - internals$jscomp$inline_2049 + (rendererID = hook$jscomp$inline_2046.inject( + internals$jscomp$inline_2045 )), - (injectedHook = hook$jscomp$inline_2050); + (injectedHook = hook$jscomp$inline_2046); } catch (err) {} } exports.createRoot = function (container, options) { @@ -14898,4 +14951,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js index 65dbcede073bf4..155d2ecbd28554 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js @@ -1018,28 +1018,37 @@ var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -1118,6 +1127,7 @@ root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -5703,6 +5713,14 @@ } function finishRenderingHooks(current, workInProgress) { workInProgress._debugHookTypes = hookTypesDev; + null === workInProgress.dependencies + ? null !== thenableState && + (workInProgress.dependencies = { + lanes: 0, + firstContext: null, + _debugThenableState: thenableState + }) + : (workInProgress.dependencies._debugThenableState = thenableState); ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; @@ -8455,32 +8473,32 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2304; - var JSCompiler_object_inline_stack_2305 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2297; + var JSCompiler_object_inline_stack_2298 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2306 = !1; + var JSCompiler_object_inline_componentStack_2299 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2304 = didSuspend) || - (JSCompiler_object_inline_digest_2304 = + (JSCompiler_object_inline_digest_2297 = didSuspend) || + (JSCompiler_object_inline_digest_2297 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2304 && - ((JSCompiler_object_inline_componentStack_2306 = !0), + JSCompiler_object_inline_digest_2297 && + ((JSCompiler_object_inline_componentStack_2299 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2304 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2297 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2306 + JSCompiler_object_inline_componentStack_2299 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2303 = nextHydratableInstance; + var JSCompiler_object_inline_message_2296 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2303)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2296)) { c: { - var instance = JSCompiler_object_inline_message_2303; + var instance = JSCompiler_object_inline_message_2296; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8521,19 +8539,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2303 + JSCompiler_object_inline_message_2296 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2303 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2296 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2303 && - ((JSCompiler_object_inline_message_2303 = - JSCompiler_object_inline_message_2303.dehydrated), - null !== JSCompiler_object_inline_message_2303) + null !== JSCompiler_object_inline_message_2296 && + ((JSCompiler_object_inline_message_2296 = + JSCompiler_object_inline_message_2296.dehydrated), + null !== JSCompiler_object_inline_message_2296) ) return ( - JSCompiler_object_inline_message_2303.data === + JSCompiler_object_inline_message_2296.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8541,58 +8559,58 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2303 = - JSCompiler_object_inline_stack_2305.children; - JSCompiler_object_inline_stack_2305 = - JSCompiler_object_inline_stack_2305.fallback; - if (JSCompiler_object_inline_componentStack_2306) + JSCompiler_object_inline_message_2296 = + JSCompiler_object_inline_stack_2298.children; + JSCompiler_object_inline_stack_2298 = + JSCompiler_object_inline_stack_2298.fallback; + if (JSCompiler_object_inline_componentStack_2299) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2306 = + (JSCompiler_object_inline_componentStack_2299 = workInProgress.mode), - (JSCompiler_object_inline_message_2303 = + (JSCompiler_object_inline_message_2296 = mountWorkInProgressOffscreenFiber( { mode: "hidden", - children: JSCompiler_object_inline_message_2303 + children: JSCompiler_object_inline_message_2296 }, - JSCompiler_object_inline_componentStack_2306 + JSCompiler_object_inline_componentStack_2299 )), - (JSCompiler_object_inline_stack_2305 = createFiberFromFragment( - JSCompiler_object_inline_stack_2305, - JSCompiler_object_inline_componentStack_2306, + (JSCompiler_object_inline_stack_2298 = createFiberFromFragment( + JSCompiler_object_inline_stack_2298, + JSCompiler_object_inline_componentStack_2299, renderLanes, null )), - (JSCompiler_object_inline_message_2303.return = workInProgress), - (JSCompiler_object_inline_stack_2305.return = workInProgress), - (JSCompiler_object_inline_message_2303.sibling = - JSCompiler_object_inline_stack_2305), - (workInProgress.child = JSCompiler_object_inline_message_2303), - (JSCompiler_object_inline_componentStack_2306 = + (JSCompiler_object_inline_message_2296.return = workInProgress), + (JSCompiler_object_inline_stack_2298.return = workInProgress), + (JSCompiler_object_inline_message_2296.sibling = + JSCompiler_object_inline_stack_2298), + (workInProgress.child = JSCompiler_object_inline_message_2296), + (JSCompiler_object_inline_componentStack_2299 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2306.memoizedState = + (JSCompiler_object_inline_componentStack_2299.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2306.childLanes = + (JSCompiler_object_inline_componentStack_2299.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2304, + JSCompiler_object_inline_digest_2297, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2305 + JSCompiler_object_inline_stack_2298 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2303 + JSCompiler_object_inline_message_2296 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2303 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2303) + ((JSCompiler_object_inline_message_2296 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2296) ) { if (didSuspend) workInProgress.flags & 256 @@ -8609,94 +8627,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2306 = - JSCompiler_object_inline_stack_2305.fallback), - (JSCompiler_object_inline_message_2303 = workInProgress.mode), - (JSCompiler_object_inline_stack_2305 = + (JSCompiler_object_inline_componentStack_2299 = + JSCompiler_object_inline_stack_2298.fallback), + (JSCompiler_object_inline_message_2296 = workInProgress.mode), + (JSCompiler_object_inline_stack_2298 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2305.children + children: JSCompiler_object_inline_stack_2298.children }, - JSCompiler_object_inline_message_2303 + JSCompiler_object_inline_message_2296 )), - (JSCompiler_object_inline_componentStack_2306 = + (JSCompiler_object_inline_componentStack_2299 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2306, - JSCompiler_object_inline_message_2303, + JSCompiler_object_inline_componentStack_2299, + JSCompiler_object_inline_message_2296, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2306.flags |= 2), - (JSCompiler_object_inline_stack_2305.return = workInProgress), - (JSCompiler_object_inline_componentStack_2306.return = + (JSCompiler_object_inline_componentStack_2299.flags |= 2), + (JSCompiler_object_inline_stack_2298.return = workInProgress), + (JSCompiler_object_inline_componentStack_2299.return = workInProgress), - (JSCompiler_object_inline_stack_2305.sibling = - JSCompiler_object_inline_componentStack_2306), - (workInProgress.child = JSCompiler_object_inline_stack_2305), + (JSCompiler_object_inline_stack_2298.sibling = + JSCompiler_object_inline_componentStack_2299), + (workInProgress.child = JSCompiler_object_inline_stack_2298), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2305 = workInProgress.child), - (JSCompiler_object_inline_stack_2305.memoizedState = + (JSCompiler_object_inline_stack_2298 = workInProgress.child), + (JSCompiler_object_inline_stack_2298.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2305.childLanes = + (JSCompiler_object_inline_stack_2298.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2304, + JSCompiler_object_inline_digest_2297, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2306)); + JSCompiler_object_inline_componentStack_2299)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2303.data === + JSCompiler_object_inline_message_2296.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2304 = - JSCompiler_object_inline_message_2303.nextSibling && - JSCompiler_object_inline_message_2303.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2304) { - JSCompiler_temp = JSCompiler_object_inline_digest_2304.dgst; - var message = JSCompiler_object_inline_digest_2304.msg; - instance = JSCompiler_object_inline_digest_2304.stck; - var componentStack = JSCompiler_object_inline_digest_2304.cstck; + JSCompiler_object_inline_digest_2297 = + JSCompiler_object_inline_message_2296.nextSibling && + JSCompiler_object_inline_message_2296.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2297) { + JSCompiler_temp = JSCompiler_object_inline_digest_2297.dgst; + var message = JSCompiler_object_inline_digest_2297.msg; + instance = JSCompiler_object_inline_digest_2297.stck; + var componentStack = JSCompiler_object_inline_digest_2297.cstck; } - JSCompiler_object_inline_message_2303 = message; - JSCompiler_object_inline_digest_2304 = JSCompiler_temp; - JSCompiler_object_inline_stack_2305 = instance; - JSCompiler_object_inline_componentStack_2306 = componentStack; - JSCompiler_object_inline_message_2303 = - JSCompiler_object_inline_message_2303 - ? Error(JSCompiler_object_inline_message_2303) + JSCompiler_object_inline_message_2296 = message; + JSCompiler_object_inline_digest_2297 = JSCompiler_temp; + JSCompiler_object_inline_stack_2298 = instance; + JSCompiler_object_inline_componentStack_2299 = componentStack; + JSCompiler_object_inline_message_2296 = + JSCompiler_object_inline_message_2296 + ? Error(JSCompiler_object_inline_message_2296) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2303.stack = - JSCompiler_object_inline_stack_2305 || ""; - JSCompiler_object_inline_message_2303.digest = - JSCompiler_object_inline_digest_2304; - JSCompiler_object_inline_digest_2304 = - void 0 === JSCompiler_object_inline_componentStack_2306 + JSCompiler_object_inline_message_2296.stack = + JSCompiler_object_inline_stack_2298 || ""; + JSCompiler_object_inline_message_2296.digest = + JSCompiler_object_inline_digest_2297; + JSCompiler_object_inline_digest_2297 = + void 0 === JSCompiler_object_inline_componentStack_2299 ? null - : JSCompiler_object_inline_componentStack_2306; - "string" === typeof JSCompiler_object_inline_digest_2304 && + : JSCompiler_object_inline_componentStack_2299; + "string" === typeof JSCompiler_object_inline_digest_2297 && CapturedStacks.set( - JSCompiler_object_inline_message_2303, - JSCompiler_object_inline_digest_2304 + JSCompiler_object_inline_message_2296, + JSCompiler_object_inline_digest_2297 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2303, + value: JSCompiler_object_inline_message_2296, source: null, - stack: JSCompiler_object_inline_digest_2304 + stack: JSCompiler_object_inline_digest_2297 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8704,25 +8722,25 @@ renderLanes ); } else if ( - ((JSCompiler_object_inline_digest_2304 = + ((JSCompiler_object_inline_digest_2297 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2304) + didReceiveUpdate || JSCompiler_object_inline_digest_2297) ) { - JSCompiler_object_inline_digest_2304 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2304) { - JSCompiler_object_inline_stack_2305 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2305 & 42)) - JSCompiler_object_inline_stack_2305 = 1; + JSCompiler_object_inline_digest_2297 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2297) { + JSCompiler_object_inline_stack_2298 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2298 & 42)) + JSCompiler_object_inline_stack_2298 = 1; else - switch (JSCompiler_object_inline_stack_2305) { + switch (JSCompiler_object_inline_stack_2298) { case 2: - JSCompiler_object_inline_stack_2305 = 1; + JSCompiler_object_inline_stack_2298 = 1; break; case 8: - JSCompiler_object_inline_stack_2305 = 4; + JSCompiler_object_inline_stack_2298 = 4; break; case 32: - JSCompiler_object_inline_stack_2305 = 16; + JSCompiler_object_inline_stack_2298 = 16; break; case 128: case 256: @@ -8743,40 +8761,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2305 = 64; + JSCompiler_object_inline_stack_2298 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2305 = 134217728; + JSCompiler_object_inline_stack_2298 = 134217728; break; default: - JSCompiler_object_inline_stack_2305 = 0; + JSCompiler_object_inline_stack_2298 = 0; } - JSCompiler_object_inline_stack_2305 = + JSCompiler_object_inline_stack_2298 = 0 !== - (JSCompiler_object_inline_stack_2305 & - (JSCompiler_object_inline_digest_2304.suspendedLanes | + (JSCompiler_object_inline_stack_2298 & + (JSCompiler_object_inline_digest_2297.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2305; + : JSCompiler_object_inline_stack_2298; if ( - 0 !== JSCompiler_object_inline_stack_2305 && - JSCompiler_object_inline_stack_2305 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2298 && + JSCompiler_object_inline_stack_2298 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2305), + ((prevState.retryLane = JSCompiler_object_inline_stack_2298), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2305 + JSCompiler_object_inline_stack_2298 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2304, + JSCompiler_object_inline_digest_2297, current, - JSCompiler_object_inline_stack_2305 + JSCompiler_object_inline_stack_2298 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2303.data === + JSCompiler_object_inline_message_2296.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8784,7 +8802,7 @@ renderLanes ); } else - JSCompiler_object_inline_message_2303.data === + JSCompiler_object_inline_message_2296.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -8792,12 +8810,12 @@ null, current )), - (JSCompiler_object_inline_message_2303._reactRetry = + (JSCompiler_object_inline_message_2296._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2303.nextSibling + JSCompiler_object_inline_message_2296.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -8815,57 +8833,57 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2305.children + JSCompiler_object_inline_stack_2298.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2306) + if (JSCompiler_object_inline_componentStack_2299) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2306 = - JSCompiler_object_inline_stack_2305.fallback), - (JSCompiler_object_inline_message_2303 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2299 = + JSCompiler_object_inline_stack_2298.fallback), + (JSCompiler_object_inline_message_2296 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2305 = createWorkInProgress( + (JSCompiler_object_inline_stack_2298 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2305.children + children: JSCompiler_object_inline_stack_2298.children } )), - (JSCompiler_object_inline_stack_2305.subtreeFlags = + (JSCompiler_object_inline_stack_2298.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2306 = + ? (JSCompiler_object_inline_componentStack_2299 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2306 + JSCompiler_object_inline_componentStack_2299 )) - : ((JSCompiler_object_inline_componentStack_2306 = + : ((JSCompiler_object_inline_componentStack_2299 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2306, - JSCompiler_object_inline_message_2303, + JSCompiler_object_inline_componentStack_2299, + JSCompiler_object_inline_message_2296, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2306.flags |= 2)), - (JSCompiler_object_inline_componentStack_2306.return = + (JSCompiler_object_inline_componentStack_2299.flags |= 2)), + (JSCompiler_object_inline_componentStack_2299.return = workInProgress), - (JSCompiler_object_inline_stack_2305.return = workInProgress), - (JSCompiler_object_inline_stack_2305.sibling = - JSCompiler_object_inline_componentStack_2306), - (workInProgress.child = JSCompiler_object_inline_stack_2305), - (JSCompiler_object_inline_stack_2305 = - JSCompiler_object_inline_componentStack_2306), - (JSCompiler_object_inline_componentStack_2306 = workInProgress.child), - (JSCompiler_object_inline_message_2303 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2303 - ? (JSCompiler_object_inline_message_2303 = + (JSCompiler_object_inline_stack_2298.return = workInProgress), + (JSCompiler_object_inline_stack_2298.sibling = + JSCompiler_object_inline_componentStack_2299), + (workInProgress.child = JSCompiler_object_inline_stack_2298), + (JSCompiler_object_inline_stack_2298 = + JSCompiler_object_inline_componentStack_2299), + (JSCompiler_object_inline_componentStack_2299 = workInProgress.child), + (JSCompiler_object_inline_message_2296 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2296 + ? (JSCompiler_object_inline_message_2296 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2303.cachePool), + JSCompiler_object_inline_message_2296.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -8873,37 +8891,37 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2303 = { + (JSCompiler_object_inline_message_2296 = { baseLanes: - JSCompiler_object_inline_message_2303.baseLanes | renderLanes, + JSCompiler_object_inline_message_2296.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2306.memoizedState = - JSCompiler_object_inline_message_2303), - (JSCompiler_object_inline_componentStack_2306.childLanes = + (JSCompiler_object_inline_componentStack_2299.memoizedState = + JSCompiler_object_inline_message_2296), + (JSCompiler_object_inline_componentStack_2299.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2304, + JSCompiler_object_inline_digest_2297, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2305 + JSCompiler_object_inline_stack_2298 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2305.children + children: JSCompiler_object_inline_stack_2298.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2304 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2304 + ((JSCompiler_object_inline_digest_2297 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2297 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2304.push(current)); + : JSCompiler_object_inline_digest_2297.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10103,7 +10121,11 @@ "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -13002,7 +13024,8 @@ ? null : { lanes: pendingProps.lanes, - firstContext: pendingProps.firstContext + firstContext: pendingProps.firstContext, + _debugThenableState: pendingProps._debugThenableState }; workInProgress.sibling = current.sibling; workInProgress.index = current.index; @@ -13055,7 +13078,8 @@ ? null : { lanes: renderLanes.lanes, - firstContext: renderLanes.firstContext + firstContext: renderLanes.firstContext, + _debugThenableState: renderLanes._debugThenableState }), (workInProgress.selfBaseDuration = current.selfBaseDuration), (workInProgress.treeBaseDuration = current.treeBaseDuration)); @@ -14086,7 +14110,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if ( @@ -14128,7 +14153,8 @@ markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -14153,7 +14179,12 @@ var renderWasConcurrent = shouldTimeSlice; do { if (didTimeout === RootDidNotComplete) - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -14185,7 +14216,12 @@ } if (didTimeout === RootFatalErrored) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -14201,7 +14237,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -14235,7 +14272,8 @@ markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -14247,7 +14285,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -14260,7 +14299,8 @@ workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -14315,7 +14355,8 @@ transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -14338,7 +14379,7 @@ didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -14386,26 +14427,31 @@ function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended(root, suspendedLanes, spawnedLane) { + function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings + ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - expirationTimes[index] = -1; + didSkipSuspendedSiblings[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -14435,13 +14481,18 @@ if (exitStatus === RootFatalErrored) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (exitStatus === RootDidNotComplete) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -14494,7 +14545,8 @@ workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = !1; + workInProgressRootDidAttachPingListener = + workInProgressRootDidSkipSuspendedSiblings = !1; workInProgressRootExitStatus = RootInProgress; workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -14619,7 +14671,8 @@ markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function renderRootSync(root, lanes) { @@ -14936,43 +14989,20 @@ workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - if ((root.mode & ProfileMode) !== NoMode) { - stopProfilerTimerIfRunningAndRecordDelta(root, !1); - unitOfWork = root.actualDuration; - for (thrownValue = root.child; null !== thrownValue; ) - (unitOfWork += thrownValue.actualDuration), - (thrownValue = thrownValue.sibling); - root.actualDuration = unitOfWork; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = RootDidNotComplete; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? unwindUnitOfWork(unitOfWork, !0) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { - 0 !== (completedWork.flags & 32768) && - console.error( - "Internal React error: Expected this fiber to be complete, but it isn't. It should have been unwound. This is a bug in React." + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings ); + return; + } var current = completedWork.alternate; unitOfWork = completedWork.return; (completedWork.mode & ProfileMode) === NoMode @@ -15006,6 +15036,38 @@ workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted); } + function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + if ((unitOfWork.mode & ProfileMode) !== NoMode) { + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1); + next = unitOfWork.actualDuration; + for (var child = unitOfWork.child; null !== child; ) + (next += child.actualDuration), (child = child.sibling); + unitOfWork.actualDuration = next; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), + (next.subtreeFlags = 0), + (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = RootDidNotComplete; + workInProgress = null; + } function commitRoot( root, recoverableErrors, @@ -15403,6 +15465,7 @@ var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & RenderContext ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & CommitContext && @@ -19859,6 +19922,7 @@ this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -23702,6 +23766,7 @@ SuspendedOnHydration = 8, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = RootInProgress, @@ -24278,11 +24343,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24319,11 +24384,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-rc-7771d3a7-20240827", + version: "19.0.0-rc-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-7771d3a7-20240827" + reconcilerVersion: "19.0.0-rc-4c58fce7-20240904" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24797,7 +24862,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js index 60cd03dc8d647a..0d568539729be0 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js @@ -676,28 +676,37 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes; - root = root.pingedLanes; + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((root &= nonIdlePendingLanes), - 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) - : ((pendingLanes &= ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = nonIdlePendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : ((pingedLanes = pendingLanes & ~root), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || - (32 === suspendedLanes && 0 !== (root & 4194176))) + (pingedLanes = wipLanes & -wipLanes), + suspendedLanes >= pingedLanes || + (32 === suspendedLanes && 0 !== (pingedLanes & 4194176))) ? wipLanes : nextLanes; } @@ -768,6 +777,7 @@ function markRootFinished(root, remainingLanes, spawnedLane) { root.pendingLanes = remainingLanes; root.suspendedLanes = 0; root.pingedLanes = 0; + root.warmLanes = 0; root.expiredLanes &= remainingLanes; root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; @@ -779,18 +789,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$6 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$6; - remainingLanes[index$6] = 0; - expirationTimes[index$6] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$6]; + var index$7 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$7; + remainingLanes[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$6] = null, index$6 = 0; - index$6 < hiddenUpdatesForLane.length; - index$6++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$6]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -810,19 +820,19 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$7 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$7; - (lane & entangledLanes) | (root[index$7] & entangledLanes) && - (root[index$7] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index$9 = 31 - clz32(lanes), - lane = 1 << index$9; - root[index$9].add(fiber); + var index$10 = 31 - clz32(lanes), + lane = 1 << index$10; + root[index$10].add(fiber); lanes &= ~lane; } } @@ -834,16 +844,16 @@ function movePendingFibersToMemoized(root, lanes) { 0 < lanes; ) { - var index$10 = 31 - clz32(lanes); - root = 1 << index$10; - index$10 = pendingUpdatersLaneMap[index$10]; - 0 < index$10.size && - (index$10.forEach(function (fiber) { + var index$11 = 31 - clz32(lanes); + root = 1 << index$11; + index$11 = pendingUpdatersLaneMap[index$11]; + 0 < index$11.size && + (index$11.forEach(function (fiber) { var alternate = fiber.alternate; (null !== alternate && memoizedUpdaters.has(alternate)) || memoizedUpdaters.add(fiber); }), - index$10.clear()); + index$11.clear()); lanes &= ~root; } } @@ -993,8 +1003,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$11 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$11 && "aria-" !== prefix$11) { + var prefix$12 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$12 && "aria-" !== prefix$12) { node.removeAttribute(name); return; } @@ -1327,15 +1337,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$17 in styles) - (styleName = styles[styleName$17]), - styles.hasOwnProperty(styleName$17) && - prevStyles[styleName$17] !== styleName && - setValueForStyle(node, styleName$17, styleName); - } else for (var styleName$18 in styles) - styles.hasOwnProperty(styleName$18) && - setValueForStyle(node, styleName$18, styles[styleName$18]); + (styleName = styles[styleName$18]), + styles.hasOwnProperty(styleName$18) && + prevStyles[styleName$18] !== styleName && + setValueForStyle(node, styleName$18, styleName); + } else + for (var styleName$19 in styles) + styles.hasOwnProperty(styleName$19) && + setValueForStyle(node, styleName$19, styles[styleName$19]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -2064,19 +2074,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$307; + var JSCompiler_inline_result$jscomp$308; if (canUseDOM) { - var isSupported$jscomp$inline_444 = "oninput" in document; - if (!isSupported$jscomp$inline_444) { - var element$jscomp$inline_445 = document.createElement("div"); - element$jscomp$inline_445.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_444 = - "function" === typeof element$jscomp$inline_445.oninput; + var isSupported$jscomp$inline_445 = "oninput" in document; + if (!isSupported$jscomp$inline_445) { + var element$jscomp$inline_446 = document.createElement("div"); + element$jscomp$inline_446.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_445 = + "function" === typeof element$jscomp$inline_446.oninput; } - JSCompiler_inline_result$jscomp$307 = isSupported$jscomp$inline_444; - } else JSCompiler_inline_result$jscomp$307 = !1; + JSCompiler_inline_result$jscomp$308 = isSupported$jscomp$inline_445; + } else JSCompiler_inline_result$jscomp$308 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$307 && + JSCompiler_inline_result$jscomp$308 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3966,7 +3976,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$55 = !1; + didReadFromEntangledAsyncAction$56 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3987,11 +3997,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); continue; } else (updateLane = { @@ -4037,7 +4047,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$55 && + didReadFromEntangledAsyncAction$56 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4235,8 +4245,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$61) { - onActionError(actionQueue, node, error$61); + } catch (error$62) { + onActionError(actionQueue, node, error$62); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -4652,10 +4662,10 @@ function refreshCache(fiber) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$64 = enqueueUpdate(provider, fiber, lane); - null !== root$64 && - (scheduleUpdateOnFiber(root$64, provider, lane), - entangleTransitions(root$64, provider, lane)); + var root$65 = enqueueUpdate(provider, fiber, lane); + null !== root$65 && + (scheduleUpdateOnFiber(root$65, provider, lane), + entangleTransitions(root$65, provider, lane)); provider = { cache: createCache() }; fiber.payload = provider; return; @@ -5177,9 +5187,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$70) { + } catch (e$71) { setTimeout(function () { - throw e$70; + throw e$71; }); } } @@ -5190,9 +5200,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$71) { + } catch (e$72) { setTimeout(function () { - throw e$71; + throw e$72; }); } } @@ -7501,9 +7511,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$113 in Component) - void 0 === newProps[propName$113] && - (newProps[propName$113] = Component[propName$113]); + for (var propName$114 in Component) + void 0 === newProps[propName$114] && + (newProps[propName$114] = Component[propName$114]); } return newProps; } @@ -7538,8 +7548,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$114) { - captureCommitPhaseError(current, nearestMountedAncestor, error$114); + } catch (error$115) { + captureCommitPhaseError(current, nearestMountedAncestor, error$115); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -7599,8 +7609,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$115) { - captureCommitPhaseError(current, nearestMountedAncestor, error$115); + } catch (error$116) { + captureCommitPhaseError(current, nearestMountedAncestor, error$116); } else ref.current = null; } @@ -7636,7 +7646,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$21) { + } catch (e$22) { JSCompiler_temp = null; break a; } @@ -7846,8 +7856,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$119) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$119); + } catch (error$120) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$120); } } function commitClassCallbacks(finishedWork) { @@ -7949,11 +7959,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$120) { + } catch (error$121) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$120 + error$121 ); } else { @@ -7970,11 +7980,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$121) { + } catch (error$122) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$121 + error$122 ); } recordLayoutEffectDuration(finishedWork); @@ -7985,11 +7995,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$122) { + } catch (error$123) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$122 + error$123 ); } } @@ -8466,22 +8476,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$136) { + } catch (error$137) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$136 + error$137 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$137) { + } catch (error$138) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$137 + error$138 ); } } @@ -8655,11 +8665,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$138) { + } catch (error$139) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$138 + error$139 ); } break; @@ -8696,8 +8706,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$139) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$139); + } catch (error$140) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$140); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -8707,8 +8717,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$141) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$141); + } catch (error$142) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$142); } } flags & 1024 && (needsFormReset = !0); @@ -8723,8 +8733,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$142) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$142); + } catch (error$143) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$143); } } break; @@ -8738,8 +8748,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$143) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$143); + } catch (error$144) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$144); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -8833,11 +8843,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$126) { + } catch (error$127) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$126 + error$127 ); } } else if ( @@ -8906,21 +8916,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$127 = JSCompiler_inline_result.stateNode; + var parent$128 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$127, ""), + (setTextContent(parent$128, ""), (JSCompiler_inline_result.flags &= -33)); - var before$128 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$128, parent$127); + var before$129 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$129, parent$128); break; case 3: case 4: - var parent$129 = JSCompiler_inline_result.stateNode.containerInfo, - before$130 = getHostSibling(finishedWork); + var parent$130 = JSCompiler_inline_result.stateNode.containerInfo, + before$131 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$130, - parent$129 + before$131, + parent$130 ); break; default: @@ -9118,8 +9128,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$148) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$148); + } catch (error$149) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$149); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -9854,14 +9864,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$154 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$154 = lastTailNode), + for (var lastTailNode$155 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$155 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$154 + null === lastTailNode$155 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$154.sibling = null); + : (lastTailNode$155.sibling = null); } } function bubbleProperties(completedWork) { @@ -9873,53 +9883,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$156 = completedWork.selfBaseDuration, - child$157 = completedWork.child; - null !== child$157; + var treeBaseDuration$157 = completedWork.selfBaseDuration, + child$158 = completedWork.child; + null !== child$158; ) - (newChildLanes |= child$157.lanes | child$157.childLanes), - (subtreeFlags |= child$157.subtreeFlags & 31457280), - (subtreeFlags |= child$157.flags & 31457280), - (treeBaseDuration$156 += child$157.treeBaseDuration), - (child$157 = child$157.sibling); - completedWork.treeBaseDuration = treeBaseDuration$156; + (newChildLanes |= child$158.lanes | child$158.childLanes), + (subtreeFlags |= child$158.subtreeFlags & 31457280), + (subtreeFlags |= child$158.flags & 31457280), + (treeBaseDuration$157 += child$158.treeBaseDuration), + (child$158 = child$158.sibling); + completedWork.treeBaseDuration = treeBaseDuration$157; } else for ( - treeBaseDuration$156 = completedWork.child; - null !== treeBaseDuration$156; + treeBaseDuration$157 = completedWork.child; + null !== treeBaseDuration$157; ) (newChildLanes |= - treeBaseDuration$156.lanes | treeBaseDuration$156.childLanes), - (subtreeFlags |= treeBaseDuration$156.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$156.flags & 31457280), - (treeBaseDuration$156.return = completedWork), - (treeBaseDuration$156 = treeBaseDuration$156.sibling); + treeBaseDuration$157.lanes | treeBaseDuration$157.childLanes), + (subtreeFlags |= treeBaseDuration$157.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$157.flags & 31457280), + (treeBaseDuration$157.return = completedWork), + (treeBaseDuration$157 = treeBaseDuration$157.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$156 = completedWork.actualDuration; - child$157 = completedWork.selfBaseDuration; + treeBaseDuration$157 = completedWork.actualDuration; + child$158 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$156 += child.actualDuration), - (child$157 += child.treeBaseDuration), + (treeBaseDuration$157 += child.actualDuration), + (child$158 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$156; - completedWork.treeBaseDuration = child$157; + completedWork.actualDuration = treeBaseDuration$157; + completedWork.treeBaseDuration = child$158; } else for ( - treeBaseDuration$156 = completedWork.child; - null !== treeBaseDuration$156; + treeBaseDuration$157 = completedWork.child; + null !== treeBaseDuration$157; ) (newChildLanes |= - treeBaseDuration$156.lanes | treeBaseDuration$156.childLanes), - (subtreeFlags |= treeBaseDuration$156.subtreeFlags), - (subtreeFlags |= treeBaseDuration$156.flags), - (treeBaseDuration$156.return = completedWork), - (treeBaseDuration$156 = treeBaseDuration$156.sibling); + treeBaseDuration$157.lanes | treeBaseDuration$157.childLanes), + (subtreeFlags |= treeBaseDuration$157.subtreeFlags), + (subtreeFlags |= treeBaseDuration$157.flags), + (treeBaseDuration$157.return = completedWork), + (treeBaseDuration$157 = treeBaseDuration$157.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10212,11 +10222,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$172 = null; + var cache$173 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$172 = newProps.memoizedState.cachePool.pool); - cache$172 !== type && (newProps.flags |= 2048); + (cache$173 = newProps.memoizedState.cachePool.pool); + cache$173 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -10246,8 +10256,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$172 = type.rendering; - if (null === cache$172) + cache$173 = type.rendering; + if (null === cache$173) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10255,11 +10265,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$172 = findFirstSuspended(current); - if (null !== cache$172) { + cache$173 = findFirstSuspended(current); + if (null !== cache$173) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$172.updateQueue; + current = cache$173.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10284,7 +10294,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$172)), null !== current)) { + if (((current = findFirstSuspended(cache$173)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10294,7 +10304,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$172.alternate && + !cache$173.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10307,13 +10317,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$172.sibling = workInProgress.child), - (workInProgress.child = cache$172)) + ? ((cache$173.sibling = workInProgress.child), + (workInProgress.child = cache$173)) : ((current = type.last), null !== current - ? (current.sibling = cache$172) - : (workInProgress.child = cache$172), - (type.last = cache$172)); + ? (current.sibling = cache$173) + : (workInProgress.child = cache$173), + (type.last = cache$173)); } if (null !== type.tail) return ( @@ -10495,6 +10505,7 @@ var DefaultAsyncDispatcher = { workInProgressRootRenderLanes = 0, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, + workInProgressRootDidSkipSuspendedSiblings = !1, workInProgressRootDidAttachPingListener = !1, entangledRenderLanes = 0, workInProgressRootExitStatus = 0, @@ -10546,7 +10557,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10558,7 +10570,8 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings )), ensureRootIsScheduled(root); } @@ -10581,7 +10594,13 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if (0 !== didTimeout) { var renderWasConcurrent = shouldTimeSlice; do { - if (6 === didTimeout) markRootSuspended(root, lanes, 0); + if (6 === didTimeout) + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); else { shouldTimeSlice = root.current.alternate; if ( @@ -10613,7 +10632,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { } if (1 === didTimeout) { prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); + markRootSuspended( + root, + lanes, + 0, + workInProgressRootDidSkipSuspendedSiblings + ); break; } root.finishedWork = shouldTimeSlice; @@ -10629,7 +10653,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); break a; } @@ -10651,7 +10676,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { markRootSuspended( renderWasConcurrent, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; renderWasConcurrent.timeoutHandle = scheduleTimeout( @@ -10663,7 +10689,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ), didTimeout ); @@ -10676,7 +10703,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) { workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } } @@ -10728,7 +10756,8 @@ function commitRootWhenReady( transitions, didIncludeRenderPhaseUpdate, lanes, - spawnedLane + spawnedLane, + didSkipSuspendedSiblings ) { var subtreeFlags = finishedWork.subtreeFlags; if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) @@ -10747,7 +10776,7 @@ function commitRootWhenReady( didIncludeRenderPhaseUpdate ) ); - markRootSuspended(root, lanes, spawnedLane); + markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); return; } commitRoot( @@ -10795,25 +10824,28 @@ function isRenderConsistentWithExternalStores(finishedWork) { function markRootUpdated(root, updatedLanes) { root.pendingLanes |= updatedLanes; 268435456 !== updatedLanes && - ((root.suspendedLanes = 0), (root.pingedLanes = 0)); + ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0)); executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended(root, suspendedLanes, spawnedLane) { +function markRootSuspended( + root, + suspendedLanes, + spawnedLane, + didSkipSuspendedSiblings +) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - for ( - var expirationTimes = root.expirationTimes, lanes = suspendedLanes; - 0 < lanes; - - ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5; - expirationTimes[index$5] = -1; + didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); + didSkipSuspendedSiblings = root.expirationTimes; + for (var lanes = suspendedLanes; 0 < lanes; ) { + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didSkipSuspendedSiblings[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10842,13 +10874,18 @@ function performSyncWorkOnRoot(root, lanes) { if (1 === exitStatus) return ( prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), + markRootSuspended(root, lanes, 0, !1), ensureRootIsScheduled(root), null ); if (6 === exitStatus) return ( - markRootSuspended(root, lanes, workInProgressDeferredLane), + markRootSuspended( + root, + lanes, + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings + ), ensureRootIsScheduled(root), null ); @@ -10901,7 +10938,8 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = !1; + workInProgressRootDidAttachPingListener = + workInProgressRootDidSkipSuspendedSiblings = !1; workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = @@ -10919,9 +10957,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$3 = 31 - clz32(allEntangledLanes), - lane = 1 << index$3; - lanes |= root[index$3]; + var index$4 = 31 - clz32(allEntangledLanes), + lane = 1 << index$4; + lanes |= root[index$4]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -11020,7 +11058,8 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane + workInProgressDeferredLane, + workInProgressRootDidSkipSuspendedSiblings ); } function renderRootSync(root, lanes) { @@ -11064,8 +11103,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$187) { - handleThrow(root, thrownValue$187); + } catch (thrownValue$188) { + handleThrow(root, thrownValue$188); } while (1); lanes && root.shellSuspendCounter++; @@ -11185,8 +11224,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$189) { - handleThrow(root, thrownValue$189); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); resetContextDependencies(); @@ -11296,39 +11335,20 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { workInProgress = null; return; } - if (unitOfWork.flags & 32768) - a: { - root = unitOfWork; - do { - unitOfWork = unwindWork(root.alternate, root); - if (null !== unitOfWork) { - unitOfWork.flags &= 32767; - workInProgress = unitOfWork; - break a; - } - if (0 !== (root.mode & 2)) { - stopProfilerTimerIfRunningAndRecordDelta(root, !1); - unitOfWork = root.actualDuration; - for (thrownValue = root.child; null !== thrownValue; ) - (unitOfWork += thrownValue.actualDuration), - (thrownValue = thrownValue.sibling); - root.actualDuration = unitOfWork; - } - root = root.return; - null !== root && - ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); - workInProgress = root; - } while (null !== root); - workInProgressRootExitStatus = 6; - workInProgress = null; - } - else completeUnitOfWork(unitOfWork); + unitOfWork.flags & 32768 + ? unwindUnitOfWork(unitOfWork, !0) + : completeUnitOfWork(unitOfWork); } function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { + if (0 !== (completedWork.flags & 32768)) { + unwindUnitOfWork( + completedWork, + workInProgressRootDidSkipSuspendedSiblings + ); + return; + } var current = completedWork.alternate; unitOfWork = completedWork.return; 0 === (completedWork.mode & 2) @@ -11349,6 +11369,36 @@ function completeUnitOfWork(unitOfWork) { } while (null !== completedWork); 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5); } +function unwindUnitOfWork(unitOfWork, skipSiblings) { + do { + var next = unwindWork(unitOfWork.alternate, unitOfWork); + if (null !== next) { + next.flags &= 32767; + workInProgress = next; + return; + } + if (0 !== (unitOfWork.mode & 2)) { + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1); + next = unitOfWork.actualDuration; + for (var child = unitOfWork.child; null !== child; ) + (next += child.actualDuration), (child = child.sibling); + unitOfWork.actualDuration = next; + } + next = unitOfWork.return; + null !== next && + ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null)); + if ( + !skipSiblings && + ((unitOfWork = unitOfWork.sibling), null !== unitOfWork) + ) { + workInProgress = unitOfWork; + return; + } + workInProgress = unitOfWork = next; + } while (null !== unitOfWork); + workInProgressRootExitStatus = 6; + workInProgress = null; +} function commitRoot( root, recoverableErrors, @@ -11484,7 +11534,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$193 = rootWithPendingPassiveEffects, + var root$194 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11529,7 +11579,7 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$117 = commitTime, + commitTime$118 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && @@ -11537,7 +11587,7 @@ function flushPassiveEffects() { id, phase, passiveEffectDuration, - commitTime$117 + commitTime$118 ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { @@ -11577,7 +11627,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$193, remainingLanes); + releaseRootPooledCache(root$194, remainingLanes); } } return !1; @@ -11658,6 +11708,7 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { var pingCache = root.pingCache; null !== pingCache && pingCache.delete(wakeable); root.pingedLanes |= root.suspendedLanes & pingedLanes; + root.warmLanes &= ~pingedLanes; executionContext & 2 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0) : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); @@ -11749,14 +11800,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$195 = firstScheduledRoot; null !== root$195; ) { + for (var root$196 = firstScheduledRoot; null !== root$196; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$195.pendingLanes; + var pendingLanes = root$196.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$195.suspendedLanes, - pingedLanes = root$195.pingedLanes; + var suspendedLanes = root$196.suspendedLanes, + pingedLanes = root$196.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -11770,17 +11821,17 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$195, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$196, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$195, - root$195 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$196, + root$196 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 !== (JSCompiler_inline_result & 3) && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$195, JSCompiler_inline_result)); - root$195 = root$195.next; + performSyncWorkOnRoot(root$196, JSCompiler_inline_result)); + root$196 = root$196.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -11821,12 +11872,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4, - expirationTime = expirationTimes[index$4]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$4] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -11990,20 +12041,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1504 = 0; - i$jscomp$inline_1504 < simpleEventPluginEvents.length; - i$jscomp$inline_1504++ + var i$jscomp$inline_1498 = 0; + i$jscomp$inline_1498 < simpleEventPluginEvents.length; + i$jscomp$inline_1498++ ) { - var eventName$jscomp$inline_1505 = - simpleEventPluginEvents[i$jscomp$inline_1504], - domEventName$jscomp$inline_1506 = - eventName$jscomp$inline_1505.toLowerCase(), - capitalizedEvent$jscomp$inline_1507 = - eventName$jscomp$inline_1505[0].toUpperCase() + - eventName$jscomp$inline_1505.slice(1); + var eventName$jscomp$inline_1499 = + simpleEventPluginEvents[i$jscomp$inline_1498], + domEventName$jscomp$inline_1500 = + eventName$jscomp$inline_1499.toLowerCase(), + capitalizedEvent$jscomp$inline_1501 = + eventName$jscomp$inline_1499[0].toUpperCase() + + eventName$jscomp$inline_1499.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1506, - "on" + capitalizedEvent$jscomp$inline_1507 + domEventName$jscomp$inline_1500, + "on" + capitalizedEvent$jscomp$inline_1501 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13186,34 +13237,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$209 = props[hasSrc]; - if (null != propValue$209) + var propValue$210 = props[hasSrc]; + if (null != propValue$210) switch (hasSrc) { case "name": - hasSrcSet = propValue$209; + hasSrcSet = propValue$210; break; case "type": - propValue = propValue$209; + propValue = propValue$210; break; case "checked": - checked = propValue$209; + checked = propValue$210; break; case "defaultChecked": - defaultChecked = propValue$209; + defaultChecked = propValue$210; break; case "value": - propKey = propValue$209; + propKey = propValue$210; break; case "defaultValue": - defaultValue = propValue$209; + defaultValue = propValue$210; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$209) + if (null != propValue$210) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$209, props, null); + setProp(domElement, tag, hasSrc, propValue$210, props, null); } } initInput( @@ -13350,14 +13401,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$209 in props) - props.hasOwnProperty(propValue$209) && - ((hasSrc = props[propValue$209]), + for (propValue$210 in props) + props.hasOwnProperty(propValue$210) && + ((hasSrc = props[propValue$210]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$209, + propValue$210, hasSrc, props, void 0 @@ -13405,14 +13456,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$226 in nextProps) { - var propKey = nextProps[propKey$226]; - lastProp = lastProps[propKey$226]; + for (var propKey$227 in nextProps) { + var propKey = nextProps[propKey$227]; + lastProp = lastProps[propKey$227]; if ( - nextProps.hasOwnProperty(propKey$226) && + nextProps.hasOwnProperty(propKey$227) && (null != propKey || null != lastProp) ) - switch (propKey$226) { + switch (propKey$227) { case "type": type = propKey; break; @@ -13441,7 +13492,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$226, + propKey$227, propKey, nextProps, lastProp @@ -13460,7 +13511,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$226 = null; + propKey = value = defaultValue = propKey$227 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13491,7 +13542,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$226 = type; + propKey$227 = type; break; case "defaultValue": defaultValue = type; @@ -13512,15 +13563,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$226 - ? updateOptions(domElement, !!lastProps, propKey$226, !1) + null != propKey$227 + ? updateOptions(domElement, !!lastProps, propKey$227, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$226 = null; + propKey = propKey$227 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -13544,7 +13595,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$226 = name; + propKey$227 = name; break; case "defaultValue": propKey = name; @@ -13558,17 +13609,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$226, propKey); + updateTextarea(domElement, propKey$227, propKey); return; case "option": - for (var propKey$242 in lastProps) + for (var propKey$243 in lastProps) if ( - ((propKey$226 = lastProps[propKey$242]), - lastProps.hasOwnProperty(propKey$242) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$242)) + ((propKey$227 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$243)) ) - switch (propKey$242) { + switch (propKey$243) { case "selected": domElement.selected = !1; break; @@ -13576,33 +13627,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$242, + propKey$243, null, nextProps, - propKey$226 + propKey$227 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$226 = nextProps[lastDefaultValue]), + ((propKey$227 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$226 && - "function" !== typeof propKey$226 && - "symbol" !== typeof propKey$226; + propKey$227 && + "function" !== typeof propKey$227 && + "symbol" !== typeof propKey$227; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$226, + propKey$227, nextProps, propKey ); @@ -13623,24 +13674,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$247 in lastProps) - (propKey$226 = lastProps[propKey$247]), - lastProps.hasOwnProperty(propKey$247) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$247) && - setProp(domElement, tag, propKey$247, null, nextProps, propKey$226); + for (var propKey$248 in lastProps) + (propKey$227 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$248) && + setProp(domElement, tag, propKey$248, null, nextProps, propKey$227); for (checked in nextProps) if ( - ((propKey$226 = nextProps[checked]), + ((propKey$227 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$226) + if (null != propKey$227) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -13648,7 +13699,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$226, + propKey$227, nextProps, propKey ); @@ -13656,49 +13707,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$252 in lastProps) - (propKey$226 = lastProps[propKey$252]), - lastProps.hasOwnProperty(propKey$252) && - void 0 !== propKey$226 && - !nextProps.hasOwnProperty(propKey$252) && + for (var propKey$253 in lastProps) + (propKey$227 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + void 0 !== propKey$227 && + !nextProps.hasOwnProperty(propKey$253) && setPropOnCustomElement( domElement, tag, - propKey$252, + propKey$253, void 0, nextProps, - propKey$226 + propKey$227 ); for (defaultChecked in nextProps) - (propKey$226 = nextProps[defaultChecked]), + (propKey$227 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$226 === propKey || - (void 0 === propKey$226 && void 0 === propKey) || + propKey$227 === propKey || + (void 0 === propKey$227 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$226, + propKey$227, nextProps, propKey ); return; } } - for (var propKey$257 in lastProps) - (propKey$226 = lastProps[propKey$257]), - lastProps.hasOwnProperty(propKey$257) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$257) && - setProp(domElement, tag, propKey$257, null, nextProps, propKey$226); + for (var propKey$258 in lastProps) + (propKey$227 = lastProps[propKey$258]), + lastProps.hasOwnProperty(propKey$258) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$258) && + setProp(domElement, tag, propKey$258, null, nextProps, propKey$227); for (lastProp in nextProps) - (propKey$226 = nextProps[lastProp]), + (propKey$227 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$226 === propKey || - (null == propKey$226 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$226, nextProps, propKey); + propKey$227 === propKey || + (null == propKey$227 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$227, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14243,26 +14294,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$265 = getResourcesFromRoot( + var styles$266 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$266 = styles$265.get(type); - resource$266 || + resource$267 = styles$266.get(type); + resource$267 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$266 = { + (resource$267 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$265.set(type, resource$266), - (styles$265 = JSCompiler_inline_result.querySelector( + styles$266.set(type, resource$267), + (styles$266 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$265._p && - ((resource$266.instance = styles$265), - (resource$266.state.loading = 5)), + !styles$266._p && + ((resource$267.instance = styles$266), + (resource$267.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14275,16 +14326,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$265 || + styles$266 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$266.state + resource$267.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$266; + return resource$267; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -14381,37 +14432,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$271 = hoistableRoot.querySelector( + var instance$272 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$271) + if (instance$272) return ( (resource.state.loading |= 4), - (resource.instance = instance$271), - markNodeAsHoistable(instance$271), - instance$271 + (resource.instance = instance$272), + markNodeAsHoistable(instance$272), + instance$272 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$271 = ( + instance$272 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$271); - var linkInstance = instance$271; + markNodeAsHoistable(instance$272); + var linkInstance = instance$272; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$271, "link", instance); + setInitialProperties(instance$272, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$271, props.precedence, hoistableRoot); - return (resource.instance = instance$271); + insertStylesheet(instance$272, props.precedence, hoistableRoot); + return (resource.instance = instance$272); case "script": - instance$271 = getScriptKey(props.src); + instance$272 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$271) + getScriptSelectorFromKey(instance$272) )) ) return ( @@ -14420,7 +14471,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$271))) + if ((styleProps = preloadPropsMap.get(instance$272))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -14743,6 +14794,7 @@ function FiberRootNode( this.errorRecoveryDisabledLanes = this.finishedLanes = this.expiredLanes = + this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = @@ -15462,16 +15514,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1753 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1747 = React.version; if ( - "19.0.0-rc-7771d3a7-20240827" !== - isomorphicReactPackageVersion$jscomp$inline_1753 + "19.0.0-rc-4c58fce7-20240904" !== + isomorphicReactPackageVersion$jscomp$inline_1747 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1753, - "19.0.0-rc-7771d3a7-20240827" + isomorphicReactPackageVersion$jscomp$inline_1747, + "19.0.0-rc-4c58fce7-20240904" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15491,18 +15543,18 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1760 = { +var internals$jscomp$inline_1754 = { bundleType: 0, - version: "19.0.0-rc-7771d3a7-20240827", + version: "19.0.0-rc-4c58fce7-20240904", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-7771d3a7-20240827", + reconcilerVersion: "19.0.0-rc-4c58fce7-20240904", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$288 = 0; - 31 > index$288; - index$288++ + var map = new Map(), lane = 1, index$289 = 0; + 31 > index$289; + index$289++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -15515,16 +15567,16 @@ var internals$jscomp$inline_1760 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2140 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2134 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2140.isDisabled && - hook$jscomp$inline_2140.supportsFiber + !hook$jscomp$inline_2134.isDisabled && + hook$jscomp$inline_2134.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2140.inject( - internals$jscomp$inline_1760 + (rendererID = hook$jscomp$inline_2134.inject( + internals$jscomp$inline_1754 )), - (injectedHook = hook$jscomp$inline_2140); + (injectedHook = hook$jscomp$inline_2134); } catch (err) {} } function noop() {} @@ -15777,7 +15829,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js index 67393878d6c6fe..f914553de536f9 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js @@ -8566,5 +8566,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js index 8bda064d2ffaa7..da04f2f4748b38 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js @@ -5622,4 +5622,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js index f6c07e29a80c13..c1f96c3f11479f 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js @@ -8566,5 +8566,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js index 5c80916be670d5..3632315fd0af60 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js @@ -5700,4 +5700,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js index f671015c168cbe..76d8d089592a79 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js @@ -8753,11 +8753,11 @@ didWarnAboutMaps = !1; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); exports.renderToReadableStream = function (children, options) { @@ -8850,5 +8850,5 @@ startWork(request$jscomp$0); }); }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js index 86d98a463a33c4..99071f53060b40 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js @@ -5911,14 +5911,14 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_731 = React.version; if ( - "19.0.0-rc-7771d3a7-20240827" !== + "19.0.0-rc-4c58fce7-20240904" !== isomorphicReactPackageVersion$jscomp$inline_731 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_731, - "19.0.0-rc-7771d3a7-20240827" + "19.0.0-rc-4c58fce7-20240904" ) ); exports.renderToReadableStream = function (children, options) { @@ -6007,4 +6007,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js index 9e667cb8837145..2dd15fc5859d4f 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js @@ -5595,13 +5595,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_735 = React.version; if ( - "19.0.0-rc-7771d3a7-20240827" !== + "19.0.0-rc-4c58fce7-20240904" !== isomorphicReactPackageVersion$jscomp$inline_735 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_735 + - "\n - react-dom: 19.0.0-rc-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -5689,4 +5689,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js index 3c19a28a57bf64..f1b053dd25abeb 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js @@ -8772,11 +8772,11 @@ didWarnAboutMaps = !1; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); exports.renderToReadableStream = function (children, options) { @@ -8880,5 +8880,5 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js index f3d80f80cef731..c432f85ca78f6d 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js @@ -6005,13 +6005,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_739 = React.version; if ( - "19.0.0-rc-7771d3a7-20240827" !== + "19.0.0-rc-4c58fce7-20240904" !== isomorphicReactPackageVersion$jscomp$inline_739 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_739 + - "\n - react-dom: 19.0.0-rc-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -6110,4 +6110,4 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js index 179ce3f6d8eaf0..b23bbfbf26f55c 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js @@ -8630,11 +8630,11 @@ didWarnAboutMaps = !1; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-7771d3a7-20240827" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-4c58fce7-20240904" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-rc-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); exports.renderToPipeableStream = function (children, options) { @@ -8676,5 +8676,5 @@ } }; }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js index 6475e58abd9cef..201f35668ad1c5 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js @@ -5654,13 +5654,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_762 = React.version; if ( - "19.0.0-rc-7771d3a7-20240827" !== + "19.0.0-rc-4c58fce7-20240904" !== isomorphicReactPackageVersion$jscomp$inline_762 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_762 + - "\n - react-dom: 19.0.0-rc-7771d3a7-20240827\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-4c58fce7-20240904\nLearn more: https://react.dev/warnings/version-mismatch") ); function createDrainHandler(destination, request) { return function () { @@ -5935,4 +5935,4 @@ exports.renderToPipeableStream = function (children, options) { } }; }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js index 173968e695fe59..52f1609ced5614 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js @@ -416,7 +416,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js index 095b510774e87b..ebebf67f6aa019 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js @@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js index b8e5b5d5d88232..33bf69ea19823d 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js index 677e60302ca72a..57bd2fb34fd8bc 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-dom/package.json b/packages/next/src/compiled/react-dom/package.json index 9cade623320bed..47f47c16003460 100644 --- a/packages/next/src/compiled/react-dom/package.json +++ b/packages/next/src/compiled/react-dom/package.json @@ -67,10 +67,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.25.0-rc-7771d3a7-20240827" + "scheduler": "0.25.0-rc-4c58fce7-20240904" }, "peerDependencies": { - "react": "19.0.0-rc-7771d3a7-20240827" + "react": "19.0.0-rc-4c58fce7-20240904" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-experimental/cjs/react.development.js b/packages/next/src/compiled/react-experimental/cjs/react.development.js index ef45f672d3fdaf..bf72d6095794c4 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.development.js @@ -1233,7 +1233,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-experimental/cjs/react.production.js b/packages/next/src/compiled/react-experimental/cjs/react.production.js index 9916bf518ef8c5..b315bc1990183e 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.production.js @@ -562,4 +562,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js index d39f411b29a547..1fc7c0def6ee63 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js @@ -979,5 +979,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.0.0-experimental-7771d3a7-20240827"; + exports.version = "19.0.0-experimental-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js index 8e16a838764cf5..7b31c8709874ac 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js @@ -567,4 +567,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.0.0-experimental-7771d3a7-20240827"; +exports.version = "19.0.0-experimental-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react-is/package.json b/packages/next/src/compiled/react-is/package.json index db9e4d60538621..aaa95a393f340c 100644 --- a/packages/next/src/compiled/react-is/package.json +++ b/packages/next/src/compiled/react-is/package.json @@ -1,6 +1,6 @@ { "name": "react-is", - "version": "19.0.0-rc-7771d3a7-20240827", + "version": "19.0.0-rc-4c58fce7-20240904", "description": "Brand checking of React Elements.", "main": "index.js", "sideEffects": false, diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json index 58e09426b50e0f..9ad126e2fdbfed 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json @@ -48,7 +48,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "0.0.0-experimental-7771d3a7-20240827", - "react-dom": "0.0.0-experimental-7771d3a7-20240827" + "react": "0.0.0-experimental-4c58fce7-20240904", + "react-dom": "0.0.0-experimental-4c58fce7-20240904" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js index 4f9fc1562a7778..4f6e91f12fc753 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js @@ -324,6 +324,9 @@ function unsupportedContext() { throw Error("Cannot read a Client Context from a Server Component."); } + function resolveOwner() { + return currentOwner ? currentOwner : null; + } function isObjectPrototype(object) { if (!object) return !1; var ObjectPrototype = Object.prototype; @@ -521,6 +524,55 @@ !filename.includes("node_modules") ); } + function filterStackTrace(request, error, skipFrames) { + request = request.filterStackFrame; + error = parseStackTrace(error, skipFrames); + for (skipFrames = 0; skipFrames < error.length; skipFrames++) { + var callsite = error[skipFrames], + functionName = callsite[0], + url = callsite[1]; + if (url.startsWith("rsc://React/")) { + var envIdx = url.indexOf("/", 12), + suffixIdx = url.lastIndexOf("?"); + -1 < envIdx && + -1 < suffixIdx && + (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); + } + request(url, functionName) || + (error.splice(skipFrames, 1), skipFrames--); + } + return error; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = currentRequest ? currentRequest : null; + if (("assert" !== methodName || !arguments[0]) && null !== request) { + var stack = filterStackTrace( + request, + Error("react-stack-top-frame"), + 1 + ); + request.pendingChunks++; + var id = request.nextChunkId++, + owner = resolveOwner(); + emitConsoleChunk(request, id, methodName, owner, stack, arguments); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } function getCurrentStackInDEV() { return ""; } @@ -622,14 +674,14 @@ task = thenable.reason; var digest = logRecoverableError(request, task, null); emitErrorChunk(request, newTask.id, digest, task); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); return newTask.id; default: - if (11 === request.status) + if (request.status === ABORTING) return ( request.abortableTasks.delete(newTask), - (newTask.status = 3), + (newTask.status = ABORTED), (task = stringify(serializeByValueID(request.fatalError))), emitModelChunk(request, newTask.id, task), newTask.id @@ -656,7 +708,7 @@ function (reason) { var _digest = logRecoverableError(request, reason, newTask); emitErrorChunk(request, newTask.id, _digest, reason); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); enqueueFlush(request); } @@ -807,10 +859,9 @@ function emitHint(request, code, model) { model = stringify(model); var id = request.nextChunkId++; - code = "H" + code; - code = id.toString(16) + ":" + code; - model = stringToChunk(code + model + "\n"); - request.completedHintChunks.push(model); + code = serializeRowHeader("H" + code, id) + model + "\n"; + code = stringToChunk(code); + request.completedHintChunks.push(code); enqueueFlush(request); } function readThenable(thenable) { @@ -882,7 +933,7 @@ } prepareToUseHooksForComponent(prevThenableState, componentDebugInfo); props = callComponentInDEV(Component, props, componentDebugInfo); - if (11 === request.status) + if (request.status === ABORTING) throw ( ("object" !== typeof props || null === props || @@ -1015,7 +1066,7 @@ task.debugOwner ); retryTask(request, task); - return 1 === task.status + return task.status === COMPLETED ? serializeByValueID(task.id) : "$L" + task.id.toString(16); } @@ -1055,7 +1106,7 @@ switch (type.$$typeof) { case REACT_LAZY_TYPE: type = callLazyInitInDEV(type); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; return renderElement(request, task, type, key, ref, props); case REACT_FORWARD_REF_TYPE: return renderFunctionComponent( @@ -1085,7 +1136,7 @@ pingedTasks.push(task); 1 === pingedTasks.length && ((request.flushScheduled = null !== request.destination), - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { return performWork(request); }) @@ -1110,7 +1161,7 @@ request.writtenObjects.set(model, serializeByValueID(id)); var task = { id: id, - status: 0, + status: PENDING$1, model: model, keyPath: keyPath, implicitSlot: implicitSlot, @@ -1164,6 +1215,9 @@ ? "$-Infinity" : "$NaN"; } + function serializeRowHeader(tag, id) { + return id.toString(16) + ":" + tag; + } function encodeReferenceChunk(request, id, reference) { request = stringify(reference); id = id.toString(16) + ":" + request + "\n"; @@ -1209,7 +1263,7 @@ request.pendingChunks++; var importId = request.nextChunkId++, json = stringify(clientReferenceMetadata), - row = importId.toString(16) + ":I" + json + "\n", + row = serializeRowHeader("I", importId) + json + "\n", processedChunk = stringToChunk(row); request.completedImportChunks.push(processedChunk); writtenClientReferences.set(clientReferenceKey, importId); @@ -1362,9 +1416,9 @@ null !== parent && (parent.$$typeof === REACT_ELEMENT_TYPE || parent.$$typeof === REACT_LAZY_TYPE); - if (11 === request.status) + if (request.status === ABORTING) return ( - (task.status = 3), + (task.status = ABORTED), (task = request.fatalError), parent ? "$L" + task.toString(16) : serializeByValueID(task) ); @@ -1458,7 +1512,7 @@ case REACT_LAZY_TYPE: task.thenableState = null; elementReference = callLazyInitInDEV(value); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; if ((_writtenObjects = value._debugInfo)) { if (null === debugID) return outlineTask(request, task); forwardDebugInfo(request, debugID, _writtenObjects); @@ -1732,33 +1786,14 @@ null !== request.destination ? ((request.status = CLOSED), closeWithError(request.destination, error)) - : ((request.status = 12), (request.fatalError = error)); + : ((request.status = CLOSING), (request.fatalError = error)); } function emitErrorChunk(request, id, digest, error) { var env = (0, request.environmentName)(); try { if (error instanceof Error) { var message = String(error.message); - for ( - var filterStackFrame = request.filterStackFrame, - stack = parseStackTrace(error, 0), - i = 0; - i < stack.length; - i++ - ) { - var callsite = stack[i], - functionName = callsite[0], - url = callsite[1]; - if (url.startsWith("rsc://React/")) { - var envIdx = url.indexOf("/", 12), - suffixIdx = url.lastIndexOf("?"); - -1 < envIdx && - -1 < suffixIdx && - (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); - } - filterStackFrame(url, functionName) || (stack.splice(i, 1), i--); - } - var stack$jscomp$0 = stack; + var stack = filterStackTrace(request, error, 0); var errorEnv = error.environmentName; "string" === typeof errorEnv && (env = errorEnv); } else @@ -1766,19 +1801,14 @@ "object" === typeof error && null !== error ? describeObjectForErrorMessage(error) : String(error)), - (stack$jscomp$0 = []); + (stack = []); } catch (x) { (message = "An error occurred but serializing the error message failed."), - (stack$jscomp$0 = []); + (stack = []); } - digest = { - digest: digest, - message: message, - stack: stack$jscomp$0, - env: env - }; - id = id.toString(16) + ":E" + stringify(digest) + "\n"; + digest = { digest: digest, message: message, stack: stack, env: env }; + id = serializeRowHeader("E", id) + stringify(digest) + "\n"; id = stringToChunk(id); request.completedErrorChunks.push(id); } @@ -1802,7 +1832,7 @@ value ); }); - id = id.toString(16) + ":D" + debugInfo + "\n"; + id = serializeRowHeader("D", id) + debugInfo + "\n"; id = stringToChunk(id); request.completedRegularChunks.push(id); } @@ -1994,6 +2024,35 @@ request.completedRegularChunks.push(json); return model; } + function emitConsoleChunk( + request, + id, + methodName, + owner, + stackTrace, + args + ) { + var counter = { objectCount: 0 }, + env = (0, request.environmentName)(); + methodName = [methodName, stackTrace, owner, env]; + methodName.push.apply(methodName, args); + args = stringify(methodName, function (parentPropertyName, value) { + try { + return renderConsoleValue( + request, + counter, + this, + parentPropertyName, + value + ); + } catch (x) { + return "unknown value"; + } + }); + id = serializeRowHeader("W", id) + args + "\n"; + id = stringToChunk(id); + request.completedRegularChunks.push(id); + } function forwardDebugInfo(request, id, debugInfo) { for (var i = 0; i < debugInfo.length; i++) request.pendingChunks++, @@ -2035,9 +2094,9 @@ emitModelChunk(request, task.id, value)); } function retryTask(request, task) { - if (0 === task.status) { + if (task.status === PENDING$1) { var prevDebugID = debugID; - task.status = 5; + task.status = RENDERING; try { modelRoot = task.model; debugID = task.id; @@ -2069,11 +2128,11 @@ emitModelChunk(request, task.id, json); } request.abortableTasks.delete(task); - task.status = 1; + task.status = COMPLETED; } catch (thrownValue) { - if (11 === request.status) { + if (request.status === ABORTING) { request.abortableTasks.delete(task); - task.status = 3; + task.status = ABORTED; var model = stringify(serializeByValueID(request.fatalError)); emitModelChunk(request, task.id, model); } else { @@ -2086,13 +2145,13 @@ null !== x && "function" === typeof x.then ) { - task.status = 0; + task.status = PENDING$1; task.thenableState = getThenableStateAfterSuspending(); var ping = task.ping; x.then(ping, ping); } else { request.abortableTasks.delete(task); - task.status = 4; + task.status = ERRORED$1; var digest = logRecoverableError(request, x, task); emitErrorChunk(request, task.id, digest, x); } @@ -2201,7 +2260,7 @@ } function startWork(request) { request.flushScheduled = null !== request.destination; - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { return performWork(request); }) @@ -2222,7 +2281,7 @@ } function abort(request, reason) { try { - 10 === request.status && (request.status = 11); + 10 === request.status && (request.status = ABORTING); var abortableTasks = request.abortableTasks; if (0 < abortableTasks.size) { var error = @@ -2243,8 +2302,8 @@ request.pendingChunks++; emitErrorChunk(request, _errorId2, digest, error); abortableTasks.forEach(function (task) { - if (5 !== task.status) { - task.status = 3; + if (task.status !== RENDERING) { + task.status = ABORTED; var ref = serializeByValueID(_errorId2); task = encodeReferenceChunk(request, task.id, ref); request.completedErrorChunks.push(task); @@ -3361,13 +3420,11 @@ void 0 === entry && ((entry = resourceType()), cache.set(resourceType, entry)); return entry; - }, - getOwner: function () { - return currentOwner ? currentOwner : null; } - }, - ReactSharedInternalsServer = - React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; if (!ReactSharedInternalsServer) throw Error( 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' @@ -3408,10 +3465,33 @@ getPrototypeOf = Object.getPrototypeOf, jsxPropsParents = new WeakMap(), jsxChildrenParents = new WeakMap(), - CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), - ObjectPrototype = Object.prototype, + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, stringify = JSON.stringify, + PENDING$1 = 0, + COMPLETED = 1, + ABORTED = 3, + ERRORED$1 = 4, + RENDERING = 5, + ABORTING = 11, + CLOSING = 12, CLOSED = 13, + PRERENDER = 21, currentRequest = null, debugID = null, modelRoot = !1, @@ -3563,7 +3643,7 @@ startWork(request); }, pull: function (controller) { - if (12 === request.status) + if (request.status === CLOSING) (request.status = CLOSED), closeWithError(controller, request.fatalError); else if ( diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js index b902bf461ac3c4..68f4c93c24597b 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js @@ -320,6 +320,14 @@ function unsupportedContext() { throw Error("Cannot read a Client Context from a Server Component."); } + function resolveOwner() { + if (currentOwner) return currentOwner; + if (supportsComponentStorage) { + var owner = componentStorage.getStore(); + if (owner) return owner; + } + return null; + } function isObjectPrototype(object) { if (!object) return !1; var ObjectPrototype = Object.prototype; @@ -517,6 +525,55 @@ !filename.includes("node_modules") ); } + function filterStackTrace(request, error, skipFrames) { + request = request.filterStackFrame; + error = parseStackTrace(error, skipFrames); + for (skipFrames = 0; skipFrames < error.length; skipFrames++) { + var callsite = error[skipFrames], + functionName = callsite[0], + url = callsite[1]; + if (url.startsWith("rsc://React/")) { + var envIdx = url.indexOf("/", 12), + suffixIdx = url.lastIndexOf("?"); + -1 < envIdx && + -1 < suffixIdx && + (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); + } + request(url, functionName) || + (error.splice(skipFrames, 1), skipFrames--); + } + return error; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = resolveRequest(); + if (("assert" !== methodName || !arguments[0]) && null !== request) { + var stack = filterStackTrace( + request, + Error("react-stack-top-frame"), + 1 + ); + request.pendingChunks++; + var id = request.nextChunkId++, + owner = resolveOwner(); + emitConsoleChunk(request, id, methodName, owner, stack, arguments); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } function getCurrentStackInDEV() { return ""; } @@ -626,14 +683,14 @@ task = thenable.reason; var digest = logRecoverableError(request, task, null); emitErrorChunk(request, newTask.id, digest, task); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); return newTask.id; default: - if (11 === request.status) + if (request.status === ABORTING) return ( request.abortableTasks.delete(newTask), - (newTask.status = 3), + (newTask.status = ABORTED), (task = stringify(serializeByValueID(request.fatalError))), emitModelChunk(request, newTask.id, task), newTask.id @@ -660,7 +717,7 @@ function (reason) { var _digest = logRecoverableError(request, reason, newTask); emitErrorChunk(request, newTask.id, _digest, reason); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); enqueueFlush(request); } @@ -811,10 +868,9 @@ function emitHint(request, code, model) { model = stringify(model); var id = request.nextChunkId++; - code = "H" + code; - code = id.toString(16) + ":" + code; - model = stringToChunk(code + model + "\n"); - request.completedHintChunks.push(model); + code = serializeRowHeader("H" + code, id) + model + "\n"; + code = stringToChunk(code); + request.completedHintChunks.push(code); enqueueFlush(request); } function readThenable(thenable) { @@ -894,7 +950,7 @@ componentDebugInfo ) : callComponentInDEV(Component, props, componentDebugInfo); - if (11 === request.status) + if (request.status === ABORTING) throw ( ("object" !== typeof props || null === props || @@ -1027,7 +1083,7 @@ task.debugOwner ); retryTask(request, task); - return 1 === task.status + return task.status === COMPLETED ? serializeByValueID(task.id) : "$L" + task.id.toString(16); } @@ -1067,7 +1123,7 @@ switch (type.$$typeof) { case REACT_LAZY_TYPE: type = callLazyInitInDEV(type); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; return renderElement(request, task, type, key, ref, props); case REACT_FORWARD_REF_TYPE: return renderFunctionComponent( @@ -1097,7 +1153,7 @@ pingedTasks.push(task); 1 === pingedTasks.length && ((request.flushScheduled = null !== request.destination), - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { return performWork(request); }) @@ -1122,7 +1178,7 @@ request.writtenObjects.set(model, serializeByValueID(id)); var task = { id: id, - status: 0, + status: PENDING$1, model: model, keyPath: keyPath, implicitSlot: implicitSlot, @@ -1176,6 +1232,9 @@ ? "$-Infinity" : "$NaN"; } + function serializeRowHeader(tag, id) { + return id.toString(16) + ":" + tag; + } function encodeReferenceChunk(request, id, reference) { request = stringify(reference); id = id.toString(16) + ":" + request + "\n"; @@ -1221,7 +1280,7 @@ request.pendingChunks++; var importId = request.nextChunkId++, json = stringify(clientReferenceMetadata), - row = importId.toString(16) + ":I" + json + "\n", + row = serializeRowHeader("I", importId) + json + "\n", processedChunk = stringToChunk(row); request.completedImportChunks.push(processedChunk); writtenClientReferences.set(clientReferenceKey, importId); @@ -1374,9 +1433,9 @@ null !== parent && (parent.$$typeof === REACT_ELEMENT_TYPE || parent.$$typeof === REACT_LAZY_TYPE); - if (11 === request.status) + if (request.status === ABORTING) return ( - (task.status = 3), + (task.status = ABORTED), (task = request.fatalError), parent ? "$L" + task.toString(16) : serializeByValueID(task) ); @@ -1470,7 +1529,7 @@ case REACT_LAZY_TYPE: task.thenableState = null; elementReference = callLazyInitInDEV(value); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; if ((_writtenObjects = value._debugInfo)) { if (null === debugID) return outlineTask(request, task); forwardDebugInfo(request, debugID, _writtenObjects); @@ -1755,33 +1814,14 @@ null !== request.destination ? ((request.status = CLOSED), closeWithError(request.destination, error)) - : ((request.status = 12), (request.fatalError = error)); + : ((request.status = CLOSING), (request.fatalError = error)); } function emitErrorChunk(request, id, digest, error) { var env = (0, request.environmentName)(); try { if (error instanceof Error) { var message = String(error.message); - for ( - var filterStackFrame = request.filterStackFrame, - stack = parseStackTrace(error, 0), - i = 0; - i < stack.length; - i++ - ) { - var callsite = stack[i], - functionName = callsite[0], - url = callsite[1]; - if (url.startsWith("rsc://React/")) { - var envIdx = url.indexOf("/", 12), - suffixIdx = url.lastIndexOf("?"); - -1 < envIdx && - -1 < suffixIdx && - (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); - } - filterStackFrame(url, functionName) || (stack.splice(i, 1), i--); - } - var stack$jscomp$0 = stack; + var stack = filterStackTrace(request, error, 0); var errorEnv = error.environmentName; "string" === typeof errorEnv && (env = errorEnv); } else @@ -1789,19 +1829,14 @@ "object" === typeof error && null !== error ? describeObjectForErrorMessage(error) : String(error)), - (stack$jscomp$0 = []); + (stack = []); } catch (x) { (message = "An error occurred but serializing the error message failed."), - (stack$jscomp$0 = []); + (stack = []); } - digest = { - digest: digest, - message: message, - stack: stack$jscomp$0, - env: env - }; - id = id.toString(16) + ":E" + stringify(digest) + "\n"; + digest = { digest: digest, message: message, stack: stack, env: env }; + id = serializeRowHeader("E", id) + stringify(digest) + "\n"; id = stringToChunk(id); request.completedErrorChunks.push(id); } @@ -1825,7 +1860,7 @@ value ); }); - id = id.toString(16) + ":D" + debugInfo + "\n"; + id = serializeRowHeader("D", id) + debugInfo + "\n"; id = stringToChunk(id); request.completedRegularChunks.push(id); } @@ -2017,6 +2052,35 @@ request.completedRegularChunks.push(json); return model; } + function emitConsoleChunk( + request, + id, + methodName, + owner, + stackTrace, + args + ) { + var counter = { objectCount: 0 }, + env = (0, request.environmentName)(); + methodName = [methodName, stackTrace, owner, env]; + methodName.push.apply(methodName, args); + args = stringify(methodName, function (parentPropertyName, value) { + try { + return renderConsoleValue( + request, + counter, + this, + parentPropertyName, + value + ); + } catch (x) { + return "unknown value"; + } + }); + id = serializeRowHeader("W", id) + args + "\n"; + id = stringToChunk(id); + request.completedRegularChunks.push(id); + } function forwardDebugInfo(request, id, debugInfo) { for (var i = 0; i < debugInfo.length; i++) request.pendingChunks++, @@ -2058,9 +2122,9 @@ emitModelChunk(request, task.id, value)); } function retryTask(request, task) { - if (0 === task.status) { + if (task.status === PENDING$1) { var prevDebugID = debugID; - task.status = 5; + task.status = RENDERING; try { modelRoot = task.model; debugID = task.id; @@ -2092,11 +2156,11 @@ emitModelChunk(request, task.id, json); } request.abortableTasks.delete(task); - task.status = 1; + task.status = COMPLETED; } catch (thrownValue) { - if (11 === request.status) { + if (request.status === ABORTING) { request.abortableTasks.delete(task); - task.status = 3; + task.status = ABORTED; var model = stringify(serializeByValueID(request.fatalError)); emitModelChunk(request, task.id, model); } else { @@ -2109,13 +2173,13 @@ null !== x && "function" === typeof x.then ) { - task.status = 0; + task.status = PENDING$1; task.thenableState = getThenableStateAfterSuspending(); var ping = task.ping; x.then(ping, ping); } else { request.abortableTasks.delete(task); - task.status = 4; + task.status = ERRORED$1; var digest = logRecoverableError(request, x, task); emitErrorChunk(request, task.id, digest, x); } @@ -2224,7 +2288,7 @@ } function startWork(request) { request.flushScheduled = null !== request.destination; - 21 === request.type + request.type === PRERENDER ? supportsRequestStorage ? scheduleMicrotask(function () { requestStorage.run(request, performWork, request); @@ -2253,7 +2317,7 @@ } function abort(request, reason) { try { - 10 === request.status && (request.status = 11); + 10 === request.status && (request.status = ABORTING); var abortableTasks = request.abortableTasks; if (0 < abortableTasks.size) { var error = @@ -2274,8 +2338,8 @@ request.pendingChunks++; emitErrorChunk(request, _errorId2, digest, error); abortableTasks.forEach(function (task) { - if (5 !== task.status) { - task.status = 3; + if (task.status !== RENDERING) { + task.status = ABORTED; var ref = serializeByValueID(_errorId2); task = encodeReferenceChunk(request, task.id, ref); request.completedErrorChunks.push(task); @@ -3396,18 +3460,11 @@ void 0 === entry && ((entry = resourceType()), cache.set(resourceType, entry)); return entry; - }, - getOwner: function () { - if (currentOwner) return currentOwner; - if (supportsComponentStorage) { - var owner = componentStorage.getStore(); - if (owner) return owner; - } - return null; } - }, - ReactSharedInternalsServer = - React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; if (!ReactSharedInternalsServer) throw Error( 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' @@ -3448,10 +3505,33 @@ getPrototypeOf = Object.getPrototypeOf, jsxPropsParents = new WeakMap(), jsxChildrenParents = new WeakMap(), - CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), - ObjectPrototype = Object.prototype, + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, stringify = JSON.stringify, + PENDING$1 = 0, + COMPLETED = 1, + ABORTED = 3, + ERRORED$1 = 4, + RENDERING = 5, + ABORTING = 11, + CLOSING = 12, CLOSED = 13, + PRERENDER = 21, currentRequest = null, debugID = null, modelRoot = !1, @@ -3614,7 +3694,7 @@ const setTimeoutOrImmediate = startWork(request); }, pull: function (controller) { - if (12 === request.status) + if (request.status === CLOSING) (request.status = CLOSED), closeWithError(controller, request.fatalError); else if ( diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js index 2bbb0ad1f8c236..9afa158423241d 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js @@ -347,6 +347,11 @@ function unsupportedContext() { throw Error("Cannot read a Client Context from a Server Component."); } + function resolveOwner() { + if (currentOwner) return currentOwner; + var owner = componentStorage.getStore(); + return owner ? owner : null; + } function isObjectPrototype(object) { if (!object) return !1; var ObjectPrototype = Object.prototype; @@ -544,6 +549,55 @@ !filename.includes("node_modules") ); } + function filterStackTrace(request, error, skipFrames) { + request = request.filterStackFrame; + error = parseStackTrace(error, skipFrames); + for (skipFrames = 0; skipFrames < error.length; skipFrames++) { + var callsite = error[skipFrames], + functionName = callsite[0], + url = callsite[1]; + if (url.startsWith("rsc://React/")) { + var envIdx = url.indexOf("/", 12), + suffixIdx = url.lastIndexOf("?"); + -1 < envIdx && + -1 < suffixIdx && + (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); + } + request(url, functionName) || + (error.splice(skipFrames, 1), skipFrames--); + } + return error; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = resolveRequest(); + if (("assert" !== methodName || !arguments[0]) && null !== request) { + var stack = filterStackTrace( + request, + Error("react-stack-top-frame"), + 1 + ); + request.pendingChunks++; + var id = request.nextChunkId++, + owner = resolveOwner(); + emitConsoleChunk(request, id, methodName, owner, stack, arguments); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } function getCurrentStackInDEV() { return ""; } @@ -650,14 +704,14 @@ task = thenable.reason; var digest = logRecoverableError(request, task, null); emitErrorChunk(request, newTask.id, digest, task); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); return newTask.id; default: - if (11 === request.status) + if (request.status === ABORTING) return ( request.abortableTasks.delete(newTask), - (newTask.status = 3), + (newTask.status = ABORTED), (task = stringify(serializeByValueID(request.fatalError))), emitModelChunk(request, newTask.id, task), newTask.id @@ -684,7 +738,7 @@ function (reason) { var _digest = logRecoverableError(request, reason, newTask); emitErrorChunk(request, newTask.id, _digest, reason); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); enqueueFlush(request); } @@ -835,9 +889,8 @@ function emitHint(request, code, model) { model = stringify(model); var id = request.nextChunkId++; - code = "H" + code; - code = id.toString(16) + ":" + code; - request.completedHintChunks.push(code + model + "\n"); + code = serializeRowHeader("H" + code, id) + model + "\n"; + request.completedHintChunks.push(code); enqueueFlush(request); } function readThenable(thenable) { @@ -915,7 +968,7 @@ props, componentDebugInfo ); - if (11 === request.status) + if (request.status === ABORTING) throw ( ("object" !== typeof props || null === props || @@ -1048,7 +1101,7 @@ task.debugOwner ); retryTask(request, task); - return 1 === task.status + return task.status === COMPLETED ? serializeByValueID(task.id) : "$L" + task.id.toString(16); } @@ -1088,7 +1141,7 @@ switch (type.$$typeof) { case REACT_LAZY_TYPE: type = callLazyInitInDEV(type); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; return renderElement(request, task, type, key, ref, props); case REACT_FORWARD_REF_TYPE: return renderFunctionComponent( @@ -1118,7 +1171,7 @@ pingedTasks.push(task); 1 === pingedTasks.length && ((request.flushScheduled = null !== request.destination), - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { return performWork(request); }) @@ -1143,7 +1196,7 @@ request.writtenObjects.set(model, serializeByValueID(id)); var task = { id: id, - status: 0, + status: PENDING$1, model: model, keyPath: keyPath, implicitSlot: implicitSlot, @@ -1197,6 +1250,9 @@ ? "$-Infinity" : "$NaN"; } + function serializeRowHeader(tag, id) { + return id.toString(16) + ":" + tag; + } function encodeReferenceChunk(request, id, reference) { request = stringify(reference); return id.toString(16) + ":" + request + "\n"; @@ -1241,7 +1297,7 @@ request.pendingChunks++; var importId = request.nextChunkId++, json = stringify(clientReferenceMetadata), - processedChunk = importId.toString(16) + ":I" + json + "\n"; + processedChunk = serializeRowHeader("I", importId) + json + "\n"; request.completedImportChunks.push(processedChunk); writtenClientReferences.set(clientReferenceKey, importId); return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName @@ -1393,9 +1449,9 @@ null !== parent && (parent.$$typeof === REACT_ELEMENT_TYPE || parent.$$typeof === REACT_LAZY_TYPE); - if (11 === request.status) + if (request.status === ABORTING) return ( - (task.status = 3), + (task.status = ABORTED), (task = request.fatalError), parent ? "$L" + task.toString(16) : serializeByValueID(task) ); @@ -1489,7 +1545,7 @@ case REACT_LAZY_TYPE: task.thenableState = null; elementReference = callLazyInitInDEV(value); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; if ((_writtenObjects = value._debugInfo)) { if (null === debugID) return outlineTask(request, task); forwardDebugInfo(request, debugID, _writtenObjects); @@ -1769,33 +1825,14 @@ onFatalError(error); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) - : ((request.status = 12), (request.fatalError = error)); + : ((request.status = CLOSING), (request.fatalError = error)); } function emitErrorChunk(request, id, digest, error) { var env = (0, request.environmentName)(); try { if (error instanceof Error) { var message = String(error.message); - for ( - var filterStackFrame = request.filterStackFrame, - stack = parseStackTrace(error, 0), - i = 0; - i < stack.length; - i++ - ) { - var callsite = stack[i], - functionName = callsite[0], - url = callsite[1]; - if (url.startsWith("rsc://React/")) { - var envIdx = url.indexOf("/", 12), - suffixIdx = url.lastIndexOf("?"); - -1 < envIdx && - -1 < suffixIdx && - (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); - } - filterStackFrame(url, functionName) || (stack.splice(i, 1), i--); - } - var stack$jscomp$0 = stack; + var stack = filterStackTrace(request, error, 0); var errorEnv = error.environmentName; "string" === typeof errorEnv && (env = errorEnv); } else @@ -1803,19 +1840,14 @@ "object" === typeof error && null !== error ? describeObjectForErrorMessage(error) : String(error)), - (stack$jscomp$0 = []); + (stack = []); } catch (x) { (message = "An error occurred but serializing the error message failed."), - (stack$jscomp$0 = []); + (stack = []); } - digest = { - digest: digest, - message: message, - stack: stack$jscomp$0, - env: env - }; - id = id.toString(16) + ":E" + stringify(digest) + "\n"; + digest = { digest: digest, message: message, stack: stack, env: env }; + id = serializeRowHeader("E", id) + stringify(digest) + "\n"; request.completedErrorChunks.push(id); } function emitSymbolChunk(request, id, name) { @@ -1837,7 +1869,7 @@ value ); }); - id = id.toString(16) + ":D" + debugInfo + "\n"; + id = serializeRowHeader("D", id) + debugInfo + "\n"; request.completedRegularChunks.push(id); } function emitTypedArrayChunk(request, id, tag, typedArray) { @@ -2023,6 +2055,34 @@ request.completedRegularChunks.push(json); return model; } + function emitConsoleChunk( + request, + id, + methodName, + owner, + stackTrace, + args + ) { + var counter = { objectCount: 0 }, + env = (0, request.environmentName)(); + methodName = [methodName, stackTrace, owner, env]; + methodName.push.apply(methodName, args); + args = stringify(methodName, function (parentPropertyName, value) { + try { + return renderConsoleValue( + request, + counter, + this, + parentPropertyName, + value + ); + } catch (x) { + return "unknown value"; + } + }); + id = serializeRowHeader("W", id) + args + "\n"; + request.completedRegularChunks.push(id); + } function forwardDebugInfo(request, id, debugInfo) { for (var i = 0; i < debugInfo.length; i++) request.pendingChunks++, @@ -2064,9 +2124,9 @@ emitModelChunk(request, task.id, value)); } function retryTask(request, task) { - if (0 === task.status) { + if (task.status === PENDING$1) { var prevDebugID = debugID; - task.status = 5; + task.status = RENDERING; try { modelRoot = task.model; debugID = task.id; @@ -2098,11 +2158,11 @@ emitModelChunk(request, task.id, json); } request.abortableTasks.delete(task); - task.status = 1; + task.status = COMPLETED; } catch (thrownValue) { - if (11 === request.status) { + if (request.status === ABORTING) { request.abortableTasks.delete(task); - task.status = 3; + task.status = ABORTED; var model = stringify(serializeByValueID(request.fatalError)); emitModelChunk(request, task.id, model); } else { @@ -2115,13 +2175,13 @@ null !== x && "function" === typeof x.then ) { - task.status = 0; + task.status = PENDING$1; task.thenableState = getThenableStateAfterSuspending(); var ping = task.ping; x.then(ping, ping); } else { request.abortableTasks.delete(task); - task.status = 4; + task.status = ERRORED$1; var digest = logRecoverableError(request, x, task); emitErrorChunk(request, task.id, digest, x); } @@ -2231,7 +2291,7 @@ } function startWork(request) { request.flushScheduled = null !== request.destination; - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { requestStorage.run(request, performWork, request); }) @@ -2251,7 +2311,7 @@ })); } function startFlowing(request, destination) { - if (12 === request.status) + if (request.status === CLOSING) (request.status = CLOSED), destination.destroy(request.fatalError); else if (request.status !== CLOSED && null === request.destination) { request.destination = destination; @@ -2264,7 +2324,7 @@ } function abort(request, reason) { try { - 10 === request.status && (request.status = 11); + 10 === request.status && (request.status = ABORTING); var abortableTasks = request.abortableTasks; if (0 < abortableTasks.size) { var error = @@ -2285,8 +2345,8 @@ request.pendingChunks++; emitErrorChunk(request, _errorId2, digest, error); abortableTasks.forEach(function (task) { - if (5 !== task.status) { - task.status = 3; + if (task.status !== RENDERING) { + task.status = ABORTED; var ref = serializeByValueID(_errorId2); task = encodeReferenceChunk(request, task.id, ref); request.completedErrorChunks.push(task); @@ -3412,15 +3472,11 @@ void 0 === entry && ((entry = resourceType()), cache.set(resourceType, entry)); return entry; - }, - getOwner: function () { - if (currentOwner) return currentOwner; - var owner = componentStorage.getStore(); - return owner ? owner : null; } - }, - ReactSharedInternalsServer = - React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; if (!ReactSharedInternalsServer) throw Error( 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' @@ -3461,10 +3517,33 @@ getPrototypeOf = Object.getPrototypeOf, jsxPropsParents = new WeakMap(), jsxChildrenParents = new WeakMap(), - CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), - ObjectPrototype = Object.prototype, + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, stringify = JSON.stringify, + PENDING$1 = 0, + COMPLETED = 1, + ABORTED = 3, + ERRORED$1 = 4, + RENDERING = 5, + ABORTING = 11, + CLOSING = 12, CLOSED = 13, + PRERENDER = 21, currentRequest = null, debugID = null, modelRoot = !1, diff --git a/packages/next/src/compiled/react-server-dom-turbopack/package.json b/packages/next/src/compiled/react-server-dom-turbopack/package.json index d95937760dc98c..959b9d45a54944 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack/package.json @@ -48,7 +48,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "19.0.0-rc-7771d3a7-20240827", - "react-dom": "19.0.0-rc-7771d3a7-20240827" + "react": "19.0.0-rc-4c58fce7-20240904", + "react-dom": "19.0.0-rc-4c58fce7-20240904" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json index 352747126cc0ba..b275090b12c7a9 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json @@ -64,8 +64,8 @@ "webpack-sources": "^3.2.0" }, "peerDependencies": { - "react": "0.0.0-experimental-7771d3a7-20240827", - "react-dom": "0.0.0-experimental-7771d3a7-20240827", + "react": "0.0.0-experimental-4c58fce7-20240904", + "react-dom": "0.0.0-experimental-4c58fce7-20240904", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js index 0f6d80d7ebd731..25797e2f8a0a20 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js @@ -324,6 +324,9 @@ function unsupportedContext() { throw Error("Cannot read a Client Context from a Server Component."); } + function resolveOwner() { + return currentOwner ? currentOwner : null; + } function isObjectPrototype(object) { if (!object) return !1; var ObjectPrototype = Object.prototype; @@ -521,6 +524,55 @@ !filename.includes("node_modules") ); } + function filterStackTrace(request, error, skipFrames) { + request = request.filterStackFrame; + error = parseStackTrace(error, skipFrames); + for (skipFrames = 0; skipFrames < error.length; skipFrames++) { + var callsite = error[skipFrames], + functionName = callsite[0], + url = callsite[1]; + if (url.startsWith("rsc://React/")) { + var envIdx = url.indexOf("/", 12), + suffixIdx = url.lastIndexOf("?"); + -1 < envIdx && + -1 < suffixIdx && + (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); + } + request(url, functionName) || + (error.splice(skipFrames, 1), skipFrames--); + } + return error; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = currentRequest ? currentRequest : null; + if (("assert" !== methodName || !arguments[0]) && null !== request) { + var stack = filterStackTrace( + request, + Error("react-stack-top-frame"), + 1 + ); + request.pendingChunks++; + var id = request.nextChunkId++, + owner = resolveOwner(); + emitConsoleChunk(request, id, methodName, owner, stack, arguments); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } function getCurrentStackInDEV() { return ""; } @@ -622,14 +674,14 @@ task = thenable.reason; var digest = logRecoverableError(request, task, null); emitErrorChunk(request, newTask.id, digest, task); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); return newTask.id; default: - if (11 === request.status) + if (request.status === ABORTING) return ( request.abortableTasks.delete(newTask), - (newTask.status = 3), + (newTask.status = ABORTED), (task = stringify(serializeByValueID(request.fatalError))), emitModelChunk(request, newTask.id, task), newTask.id @@ -656,7 +708,7 @@ function (reason) { var _digest = logRecoverableError(request, reason, newTask); emitErrorChunk(request, newTask.id, _digest, reason); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); enqueueFlush(request); } @@ -807,10 +859,9 @@ function emitHint(request, code, model) { model = stringify(model); var id = request.nextChunkId++; - code = "H" + code; - code = id.toString(16) + ":" + code; - model = stringToChunk(code + model + "\n"); - request.completedHintChunks.push(model); + code = serializeRowHeader("H" + code, id) + model + "\n"; + code = stringToChunk(code); + request.completedHintChunks.push(code); enqueueFlush(request); } function readThenable(thenable) { @@ -882,7 +933,7 @@ } prepareToUseHooksForComponent(prevThenableState, componentDebugInfo); props = callComponentInDEV(Component, props, componentDebugInfo); - if (11 === request.status) + if (request.status === ABORTING) throw ( ("object" !== typeof props || null === props || @@ -1015,7 +1066,7 @@ task.debugOwner ); retryTask(request, task); - return 1 === task.status + return task.status === COMPLETED ? serializeByValueID(task.id) : "$L" + task.id.toString(16); } @@ -1055,7 +1106,7 @@ switch (type.$$typeof) { case REACT_LAZY_TYPE: type = callLazyInitInDEV(type); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; return renderElement(request, task, type, key, ref, props); case REACT_FORWARD_REF_TYPE: return renderFunctionComponent( @@ -1085,7 +1136,7 @@ pingedTasks.push(task); 1 === pingedTasks.length && ((request.flushScheduled = null !== request.destination), - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { return performWork(request); }) @@ -1110,7 +1161,7 @@ request.writtenObjects.set(model, serializeByValueID(id)); var task = { id: id, - status: 0, + status: PENDING$1, model: model, keyPath: keyPath, implicitSlot: implicitSlot, @@ -1164,6 +1215,9 @@ ? "$-Infinity" : "$NaN"; } + function serializeRowHeader(tag, id) { + return id.toString(16) + ":" + tag; + } function encodeReferenceChunk(request, id, reference) { request = stringify(reference); id = id.toString(16) + ":" + request + "\n"; @@ -1209,7 +1263,7 @@ request.pendingChunks++; var importId = request.nextChunkId++, json = stringify(clientReferenceMetadata), - row = importId.toString(16) + ":I" + json + "\n", + row = serializeRowHeader("I", importId) + json + "\n", processedChunk = stringToChunk(row); request.completedImportChunks.push(processedChunk); writtenClientReferences.set(clientReferenceKey, importId); @@ -1362,9 +1416,9 @@ null !== parent && (parent.$$typeof === REACT_ELEMENT_TYPE || parent.$$typeof === REACT_LAZY_TYPE); - if (11 === request.status) + if (request.status === ABORTING) return ( - (task.status = 3), + (task.status = ABORTED), (task = request.fatalError), parent ? "$L" + task.toString(16) : serializeByValueID(task) ); @@ -1458,7 +1512,7 @@ case REACT_LAZY_TYPE: task.thenableState = null; elementReference = callLazyInitInDEV(value); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; if ((_writtenObjects = value._debugInfo)) { if (null === debugID) return outlineTask(request, task); forwardDebugInfo(request, debugID, _writtenObjects); @@ -1732,33 +1786,14 @@ null !== request.destination ? ((request.status = CLOSED), closeWithError(request.destination, error)) - : ((request.status = 12), (request.fatalError = error)); + : ((request.status = CLOSING), (request.fatalError = error)); } function emitErrorChunk(request, id, digest, error) { var env = (0, request.environmentName)(); try { if (error instanceof Error) { var message = String(error.message); - for ( - var filterStackFrame = request.filterStackFrame, - stack = parseStackTrace(error, 0), - i = 0; - i < stack.length; - i++ - ) { - var callsite = stack[i], - functionName = callsite[0], - url = callsite[1]; - if (url.startsWith("rsc://React/")) { - var envIdx = url.indexOf("/", 12), - suffixIdx = url.lastIndexOf("?"); - -1 < envIdx && - -1 < suffixIdx && - (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); - } - filterStackFrame(url, functionName) || (stack.splice(i, 1), i--); - } - var stack$jscomp$0 = stack; + var stack = filterStackTrace(request, error, 0); var errorEnv = error.environmentName; "string" === typeof errorEnv && (env = errorEnv); } else @@ -1766,19 +1801,14 @@ "object" === typeof error && null !== error ? describeObjectForErrorMessage(error) : String(error)), - (stack$jscomp$0 = []); + (stack = []); } catch (x) { (message = "An error occurred but serializing the error message failed."), - (stack$jscomp$0 = []); + (stack = []); } - digest = { - digest: digest, - message: message, - stack: stack$jscomp$0, - env: env - }; - id = id.toString(16) + ":E" + stringify(digest) + "\n"; + digest = { digest: digest, message: message, stack: stack, env: env }; + id = serializeRowHeader("E", id) + stringify(digest) + "\n"; id = stringToChunk(id); request.completedErrorChunks.push(id); } @@ -1802,7 +1832,7 @@ value ); }); - id = id.toString(16) + ":D" + debugInfo + "\n"; + id = serializeRowHeader("D", id) + debugInfo + "\n"; id = stringToChunk(id); request.completedRegularChunks.push(id); } @@ -1994,6 +2024,35 @@ request.completedRegularChunks.push(json); return model; } + function emitConsoleChunk( + request, + id, + methodName, + owner, + stackTrace, + args + ) { + var counter = { objectCount: 0 }, + env = (0, request.environmentName)(); + methodName = [methodName, stackTrace, owner, env]; + methodName.push.apply(methodName, args); + args = stringify(methodName, function (parentPropertyName, value) { + try { + return renderConsoleValue( + request, + counter, + this, + parentPropertyName, + value + ); + } catch (x) { + return "unknown value"; + } + }); + id = serializeRowHeader("W", id) + args + "\n"; + id = stringToChunk(id); + request.completedRegularChunks.push(id); + } function forwardDebugInfo(request, id, debugInfo) { for (var i = 0; i < debugInfo.length; i++) request.pendingChunks++, @@ -2035,9 +2094,9 @@ emitModelChunk(request, task.id, value)); } function retryTask(request, task) { - if (0 === task.status) { + if (task.status === PENDING$1) { var prevDebugID = debugID; - task.status = 5; + task.status = RENDERING; try { modelRoot = task.model; debugID = task.id; @@ -2069,11 +2128,11 @@ emitModelChunk(request, task.id, json); } request.abortableTasks.delete(task); - task.status = 1; + task.status = COMPLETED; } catch (thrownValue) { - if (11 === request.status) { + if (request.status === ABORTING) { request.abortableTasks.delete(task); - task.status = 3; + task.status = ABORTED; var model = stringify(serializeByValueID(request.fatalError)); emitModelChunk(request, task.id, model); } else { @@ -2086,13 +2145,13 @@ null !== x && "function" === typeof x.then ) { - task.status = 0; + task.status = PENDING$1; task.thenableState = getThenableStateAfterSuspending(); var ping = task.ping; x.then(ping, ping); } else { request.abortableTasks.delete(task); - task.status = 4; + task.status = ERRORED$1; var digest = logRecoverableError(request, x, task); emitErrorChunk(request, task.id, digest, x); } @@ -2201,7 +2260,7 @@ } function startWork(request) { request.flushScheduled = null !== request.destination; - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { return performWork(request); }) @@ -2222,7 +2281,7 @@ } function abort(request, reason) { try { - 10 === request.status && (request.status = 11); + 10 === request.status && (request.status = ABORTING); var abortableTasks = request.abortableTasks; if (0 < abortableTasks.size) { var error = @@ -2243,8 +2302,8 @@ request.pendingChunks++; emitErrorChunk(request, _errorId2, digest, error); abortableTasks.forEach(function (task) { - if (5 !== task.status) { - task.status = 3; + if (task.status !== RENDERING) { + task.status = ABORTED; var ref = serializeByValueID(_errorId2); task = encodeReferenceChunk(request, task.id, ref); request.completedErrorChunks.push(task); @@ -3366,13 +3425,11 @@ void 0 === entry && ((entry = resourceType()), cache.set(resourceType, entry)); return entry; - }, - getOwner: function () { - return currentOwner ? currentOwner : null; } - }, - ReactSharedInternalsServer = - React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; if (!ReactSharedInternalsServer) throw Error( 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' @@ -3413,10 +3470,33 @@ getPrototypeOf = Object.getPrototypeOf, jsxPropsParents = new WeakMap(), jsxChildrenParents = new WeakMap(), - CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), - ObjectPrototype = Object.prototype, + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, stringify = JSON.stringify, + PENDING$1 = 0, + COMPLETED = 1, + ABORTED = 3, + ERRORED$1 = 4, + RENDERING = 5, + ABORTING = 11, + CLOSING = 12, CLOSED = 13, + PRERENDER = 21, currentRequest = null, debugID = null, modelRoot = !1, @@ -3576,7 +3656,7 @@ startWork(request); }, pull: function (controller) { - if (12 === request.status) + if (request.status === CLOSING) (request.status = CLOSED), closeWithError(controller, request.fatalError); else if ( diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js index c5eabf83b8a582..33e21c07b0e7a3 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js @@ -320,6 +320,14 @@ function unsupportedContext() { throw Error("Cannot read a Client Context from a Server Component."); } + function resolveOwner() { + if (currentOwner) return currentOwner; + if (supportsComponentStorage) { + var owner = componentStorage.getStore(); + if (owner) return owner; + } + return null; + } function isObjectPrototype(object) { if (!object) return !1; var ObjectPrototype = Object.prototype; @@ -517,6 +525,55 @@ !filename.includes("node_modules") ); } + function filterStackTrace(request, error, skipFrames) { + request = request.filterStackFrame; + error = parseStackTrace(error, skipFrames); + for (skipFrames = 0; skipFrames < error.length; skipFrames++) { + var callsite = error[skipFrames], + functionName = callsite[0], + url = callsite[1]; + if (url.startsWith("rsc://React/")) { + var envIdx = url.indexOf("/", 12), + suffixIdx = url.lastIndexOf("?"); + -1 < envIdx && + -1 < suffixIdx && + (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); + } + request(url, functionName) || + (error.splice(skipFrames, 1), skipFrames--); + } + return error; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = resolveRequest(); + if (("assert" !== methodName || !arguments[0]) && null !== request) { + var stack = filterStackTrace( + request, + Error("react-stack-top-frame"), + 1 + ); + request.pendingChunks++; + var id = request.nextChunkId++, + owner = resolveOwner(); + emitConsoleChunk(request, id, methodName, owner, stack, arguments); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } function getCurrentStackInDEV() { return ""; } @@ -626,14 +683,14 @@ task = thenable.reason; var digest = logRecoverableError(request, task, null); emitErrorChunk(request, newTask.id, digest, task); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); return newTask.id; default: - if (11 === request.status) + if (request.status === ABORTING) return ( request.abortableTasks.delete(newTask), - (newTask.status = 3), + (newTask.status = ABORTED), (task = stringify(serializeByValueID(request.fatalError))), emitModelChunk(request, newTask.id, task), newTask.id @@ -660,7 +717,7 @@ function (reason) { var _digest = logRecoverableError(request, reason, newTask); emitErrorChunk(request, newTask.id, _digest, reason); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); enqueueFlush(request); } @@ -811,10 +868,9 @@ function emitHint(request, code, model) { model = stringify(model); var id = request.nextChunkId++; - code = "H" + code; - code = id.toString(16) + ":" + code; - model = stringToChunk(code + model + "\n"); - request.completedHintChunks.push(model); + code = serializeRowHeader("H" + code, id) + model + "\n"; + code = stringToChunk(code); + request.completedHintChunks.push(code); enqueueFlush(request); } function readThenable(thenable) { @@ -894,7 +950,7 @@ componentDebugInfo ) : callComponentInDEV(Component, props, componentDebugInfo); - if (11 === request.status) + if (request.status === ABORTING) throw ( ("object" !== typeof props || null === props || @@ -1027,7 +1083,7 @@ task.debugOwner ); retryTask(request, task); - return 1 === task.status + return task.status === COMPLETED ? serializeByValueID(task.id) : "$L" + task.id.toString(16); } @@ -1067,7 +1123,7 @@ switch (type.$$typeof) { case REACT_LAZY_TYPE: type = callLazyInitInDEV(type); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; return renderElement(request, task, type, key, ref, props); case REACT_FORWARD_REF_TYPE: return renderFunctionComponent( @@ -1097,7 +1153,7 @@ pingedTasks.push(task); 1 === pingedTasks.length && ((request.flushScheduled = null !== request.destination), - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { return performWork(request); }) @@ -1122,7 +1178,7 @@ request.writtenObjects.set(model, serializeByValueID(id)); var task = { id: id, - status: 0, + status: PENDING$1, model: model, keyPath: keyPath, implicitSlot: implicitSlot, @@ -1176,6 +1232,9 @@ ? "$-Infinity" : "$NaN"; } + function serializeRowHeader(tag, id) { + return id.toString(16) + ":" + tag; + } function encodeReferenceChunk(request, id, reference) { request = stringify(reference); id = id.toString(16) + ":" + request + "\n"; @@ -1221,7 +1280,7 @@ request.pendingChunks++; var importId = request.nextChunkId++, json = stringify(clientReferenceMetadata), - row = importId.toString(16) + ":I" + json + "\n", + row = serializeRowHeader("I", importId) + json + "\n", processedChunk = stringToChunk(row); request.completedImportChunks.push(processedChunk); writtenClientReferences.set(clientReferenceKey, importId); @@ -1374,9 +1433,9 @@ null !== parent && (parent.$$typeof === REACT_ELEMENT_TYPE || parent.$$typeof === REACT_LAZY_TYPE); - if (11 === request.status) + if (request.status === ABORTING) return ( - (task.status = 3), + (task.status = ABORTED), (task = request.fatalError), parent ? "$L" + task.toString(16) : serializeByValueID(task) ); @@ -1470,7 +1529,7 @@ case REACT_LAZY_TYPE: task.thenableState = null; elementReference = callLazyInitInDEV(value); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; if ((_writtenObjects = value._debugInfo)) { if (null === debugID) return outlineTask(request, task); forwardDebugInfo(request, debugID, _writtenObjects); @@ -1755,33 +1814,14 @@ null !== request.destination ? ((request.status = CLOSED), closeWithError(request.destination, error)) - : ((request.status = 12), (request.fatalError = error)); + : ((request.status = CLOSING), (request.fatalError = error)); } function emitErrorChunk(request, id, digest, error) { var env = (0, request.environmentName)(); try { if (error instanceof Error) { var message = String(error.message); - for ( - var filterStackFrame = request.filterStackFrame, - stack = parseStackTrace(error, 0), - i = 0; - i < stack.length; - i++ - ) { - var callsite = stack[i], - functionName = callsite[0], - url = callsite[1]; - if (url.startsWith("rsc://React/")) { - var envIdx = url.indexOf("/", 12), - suffixIdx = url.lastIndexOf("?"); - -1 < envIdx && - -1 < suffixIdx && - (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); - } - filterStackFrame(url, functionName) || (stack.splice(i, 1), i--); - } - var stack$jscomp$0 = stack; + var stack = filterStackTrace(request, error, 0); var errorEnv = error.environmentName; "string" === typeof errorEnv && (env = errorEnv); } else @@ -1789,19 +1829,14 @@ "object" === typeof error && null !== error ? describeObjectForErrorMessage(error) : String(error)), - (stack$jscomp$0 = []); + (stack = []); } catch (x) { (message = "An error occurred but serializing the error message failed."), - (stack$jscomp$0 = []); + (stack = []); } - digest = { - digest: digest, - message: message, - stack: stack$jscomp$0, - env: env - }; - id = id.toString(16) + ":E" + stringify(digest) + "\n"; + digest = { digest: digest, message: message, stack: stack, env: env }; + id = serializeRowHeader("E", id) + stringify(digest) + "\n"; id = stringToChunk(id); request.completedErrorChunks.push(id); } @@ -1825,7 +1860,7 @@ value ); }); - id = id.toString(16) + ":D" + debugInfo + "\n"; + id = serializeRowHeader("D", id) + debugInfo + "\n"; id = stringToChunk(id); request.completedRegularChunks.push(id); } @@ -2017,6 +2052,35 @@ request.completedRegularChunks.push(json); return model; } + function emitConsoleChunk( + request, + id, + methodName, + owner, + stackTrace, + args + ) { + var counter = { objectCount: 0 }, + env = (0, request.environmentName)(); + methodName = [methodName, stackTrace, owner, env]; + methodName.push.apply(methodName, args); + args = stringify(methodName, function (parentPropertyName, value) { + try { + return renderConsoleValue( + request, + counter, + this, + parentPropertyName, + value + ); + } catch (x) { + return "unknown value"; + } + }); + id = serializeRowHeader("W", id) + args + "\n"; + id = stringToChunk(id); + request.completedRegularChunks.push(id); + } function forwardDebugInfo(request, id, debugInfo) { for (var i = 0; i < debugInfo.length; i++) request.pendingChunks++, @@ -2058,9 +2122,9 @@ emitModelChunk(request, task.id, value)); } function retryTask(request, task) { - if (0 === task.status) { + if (task.status === PENDING$1) { var prevDebugID = debugID; - task.status = 5; + task.status = RENDERING; try { modelRoot = task.model; debugID = task.id; @@ -2092,11 +2156,11 @@ emitModelChunk(request, task.id, json); } request.abortableTasks.delete(task); - task.status = 1; + task.status = COMPLETED; } catch (thrownValue) { - if (11 === request.status) { + if (request.status === ABORTING) { request.abortableTasks.delete(task); - task.status = 3; + task.status = ABORTED; var model = stringify(serializeByValueID(request.fatalError)); emitModelChunk(request, task.id, model); } else { @@ -2109,13 +2173,13 @@ null !== x && "function" === typeof x.then ) { - task.status = 0; + task.status = PENDING$1; task.thenableState = getThenableStateAfterSuspending(); var ping = task.ping; x.then(ping, ping); } else { request.abortableTasks.delete(task); - task.status = 4; + task.status = ERRORED$1; var digest = logRecoverableError(request, x, task); emitErrorChunk(request, task.id, digest, x); } @@ -2224,7 +2288,7 @@ } function startWork(request) { request.flushScheduled = null !== request.destination; - 21 === request.type + request.type === PRERENDER ? supportsRequestStorage ? scheduleMicrotask(function () { requestStorage.run(request, performWork, request); @@ -2253,7 +2317,7 @@ } function abort(request, reason) { try { - 10 === request.status && (request.status = 11); + 10 === request.status && (request.status = ABORTING); var abortableTasks = request.abortableTasks; if (0 < abortableTasks.size) { var error = @@ -2274,8 +2338,8 @@ request.pendingChunks++; emitErrorChunk(request, _errorId2, digest, error); abortableTasks.forEach(function (task) { - if (5 !== task.status) { - task.status = 3; + if (task.status !== RENDERING) { + task.status = ABORTED; var ref = serializeByValueID(_errorId2); task = encodeReferenceChunk(request, task.id, ref); request.completedErrorChunks.push(task); @@ -3397,18 +3461,11 @@ void 0 === entry && ((entry = resourceType()), cache.set(resourceType, entry)); return entry; - }, - getOwner: function () { - if (currentOwner) return currentOwner; - if (supportsComponentStorage) { - var owner = componentStorage.getStore(); - if (owner) return owner; - } - return null; } - }, - ReactSharedInternalsServer = - React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; if (!ReactSharedInternalsServer) throw Error( 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' @@ -3449,10 +3506,33 @@ getPrototypeOf = Object.getPrototypeOf, jsxPropsParents = new WeakMap(), jsxChildrenParents = new WeakMap(), - CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), - ObjectPrototype = Object.prototype, + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, stringify = JSON.stringify, + PENDING$1 = 0, + COMPLETED = 1, + ABORTED = 3, + ERRORED$1 = 4, + RENDERING = 5, + ABORTING = 11, + CLOSING = 12, CLOSED = 13, + PRERENDER = 21, currentRequest = null, debugID = null, modelRoot = !1, @@ -3615,7 +3695,7 @@ const setTimeoutOrImmediate = startWork(request); }, pull: function (controller) { - if (12 === request.status) + if (request.status === CLOSING) (request.status = CLOSED), closeWithError(controller, request.fatalError); else if ( diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js index 87fb8b4e467128..4f59bff1c89d82 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js @@ -347,6 +347,11 @@ function unsupportedContext() { throw Error("Cannot read a Client Context from a Server Component."); } + function resolveOwner() { + if (currentOwner) return currentOwner; + var owner = componentStorage.getStore(); + return owner ? owner : null; + } function isObjectPrototype(object) { if (!object) return !1; var ObjectPrototype = Object.prototype; @@ -544,6 +549,55 @@ !filename.includes("node_modules") ); } + function filterStackTrace(request, error, skipFrames) { + request = request.filterStackFrame; + error = parseStackTrace(error, skipFrames); + for (skipFrames = 0; skipFrames < error.length; skipFrames++) { + var callsite = error[skipFrames], + functionName = callsite[0], + url = callsite[1]; + if (url.startsWith("rsc://React/")) { + var envIdx = url.indexOf("/", 12), + suffixIdx = url.lastIndexOf("?"); + -1 < envIdx && + -1 < suffixIdx && + (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); + } + request(url, functionName) || + (error.splice(skipFrames, 1), skipFrames--); + } + return error; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = resolveRequest(); + if (("assert" !== methodName || !arguments[0]) && null !== request) { + var stack = filterStackTrace( + request, + Error("react-stack-top-frame"), + 1 + ); + request.pendingChunks++; + var id = request.nextChunkId++, + owner = resolveOwner(); + emitConsoleChunk(request, id, methodName, owner, stack, arguments); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } function getCurrentStackInDEV() { return ""; } @@ -650,14 +704,14 @@ task = thenable.reason; var digest = logRecoverableError(request, task, null); emitErrorChunk(request, newTask.id, digest, task); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); return newTask.id; default: - if (11 === request.status) + if (request.status === ABORTING) return ( request.abortableTasks.delete(newTask), - (newTask.status = 3), + (newTask.status = ABORTED), (task = stringify(serializeByValueID(request.fatalError))), emitModelChunk(request, newTask.id, task), newTask.id @@ -684,7 +738,7 @@ function (reason) { var _digest = logRecoverableError(request, reason, newTask); emitErrorChunk(request, newTask.id, _digest, reason); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); enqueueFlush(request); } @@ -835,9 +889,8 @@ function emitHint(request, code, model) { model = stringify(model); var id = request.nextChunkId++; - code = "H" + code; - code = id.toString(16) + ":" + code; - request.completedHintChunks.push(code + model + "\n"); + code = serializeRowHeader("H" + code, id) + model + "\n"; + request.completedHintChunks.push(code); enqueueFlush(request); } function readThenable(thenable) { @@ -915,7 +968,7 @@ props, componentDebugInfo ); - if (11 === request.status) + if (request.status === ABORTING) throw ( ("object" !== typeof props || null === props || @@ -1048,7 +1101,7 @@ task.debugOwner ); retryTask(request, task); - return 1 === task.status + return task.status === COMPLETED ? serializeByValueID(task.id) : "$L" + task.id.toString(16); } @@ -1088,7 +1141,7 @@ switch (type.$$typeof) { case REACT_LAZY_TYPE: type = callLazyInitInDEV(type); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; return renderElement(request, task, type, key, ref, props); case REACT_FORWARD_REF_TYPE: return renderFunctionComponent( @@ -1118,7 +1171,7 @@ pingedTasks.push(task); 1 === pingedTasks.length && ((request.flushScheduled = null !== request.destination), - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { return performWork(request); }) @@ -1143,7 +1196,7 @@ request.writtenObjects.set(model, serializeByValueID(id)); var task = { id: id, - status: 0, + status: PENDING$1, model: model, keyPath: keyPath, implicitSlot: implicitSlot, @@ -1197,6 +1250,9 @@ ? "$-Infinity" : "$NaN"; } + function serializeRowHeader(tag, id) { + return id.toString(16) + ":" + tag; + } function encodeReferenceChunk(request, id, reference) { request = stringify(reference); return id.toString(16) + ":" + request + "\n"; @@ -1241,7 +1297,7 @@ request.pendingChunks++; var importId = request.nextChunkId++, json = stringify(clientReferenceMetadata), - processedChunk = importId.toString(16) + ":I" + json + "\n"; + processedChunk = serializeRowHeader("I", importId) + json + "\n"; request.completedImportChunks.push(processedChunk); writtenClientReferences.set(clientReferenceKey, importId); return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName @@ -1393,9 +1449,9 @@ null !== parent && (parent.$$typeof === REACT_ELEMENT_TYPE || parent.$$typeof === REACT_LAZY_TYPE); - if (11 === request.status) + if (request.status === ABORTING) return ( - (task.status = 3), + (task.status = ABORTED), (task = request.fatalError), parent ? "$L" + task.toString(16) : serializeByValueID(task) ); @@ -1489,7 +1545,7 @@ case REACT_LAZY_TYPE: task.thenableState = null; elementReference = callLazyInitInDEV(value); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; if ((_writtenObjects = value._debugInfo)) { if (null === debugID) return outlineTask(request, task); forwardDebugInfo(request, debugID, _writtenObjects); @@ -1769,33 +1825,14 @@ onFatalError(error); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) - : ((request.status = 12), (request.fatalError = error)); + : ((request.status = CLOSING), (request.fatalError = error)); } function emitErrorChunk(request, id, digest, error) { var env = (0, request.environmentName)(); try { if (error instanceof Error) { var message = String(error.message); - for ( - var filterStackFrame = request.filterStackFrame, - stack = parseStackTrace(error, 0), - i = 0; - i < stack.length; - i++ - ) { - var callsite = stack[i], - functionName = callsite[0], - url = callsite[1]; - if (url.startsWith("rsc://React/")) { - var envIdx = url.indexOf("/", 12), - suffixIdx = url.lastIndexOf("?"); - -1 < envIdx && - -1 < suffixIdx && - (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); - } - filterStackFrame(url, functionName) || (stack.splice(i, 1), i--); - } - var stack$jscomp$0 = stack; + var stack = filterStackTrace(request, error, 0); var errorEnv = error.environmentName; "string" === typeof errorEnv && (env = errorEnv); } else @@ -1803,19 +1840,14 @@ "object" === typeof error && null !== error ? describeObjectForErrorMessage(error) : String(error)), - (stack$jscomp$0 = []); + (stack = []); } catch (x) { (message = "An error occurred but serializing the error message failed."), - (stack$jscomp$0 = []); + (stack = []); } - digest = { - digest: digest, - message: message, - stack: stack$jscomp$0, - env: env - }; - id = id.toString(16) + ":E" + stringify(digest) + "\n"; + digest = { digest: digest, message: message, stack: stack, env: env }; + id = serializeRowHeader("E", id) + stringify(digest) + "\n"; request.completedErrorChunks.push(id); } function emitSymbolChunk(request, id, name) { @@ -1837,7 +1869,7 @@ value ); }); - id = id.toString(16) + ":D" + debugInfo + "\n"; + id = serializeRowHeader("D", id) + debugInfo + "\n"; request.completedRegularChunks.push(id); } function emitTypedArrayChunk(request, id, tag, typedArray) { @@ -2023,6 +2055,34 @@ request.completedRegularChunks.push(json); return model; } + function emitConsoleChunk( + request, + id, + methodName, + owner, + stackTrace, + args + ) { + var counter = { objectCount: 0 }, + env = (0, request.environmentName)(); + methodName = [methodName, stackTrace, owner, env]; + methodName.push.apply(methodName, args); + args = stringify(methodName, function (parentPropertyName, value) { + try { + return renderConsoleValue( + request, + counter, + this, + parentPropertyName, + value + ); + } catch (x) { + return "unknown value"; + } + }); + id = serializeRowHeader("W", id) + args + "\n"; + request.completedRegularChunks.push(id); + } function forwardDebugInfo(request, id, debugInfo) { for (var i = 0; i < debugInfo.length; i++) request.pendingChunks++, @@ -2064,9 +2124,9 @@ emitModelChunk(request, task.id, value)); } function retryTask(request, task) { - if (0 === task.status) { + if (task.status === PENDING$1) { var prevDebugID = debugID; - task.status = 5; + task.status = RENDERING; try { modelRoot = task.model; debugID = task.id; @@ -2098,11 +2158,11 @@ emitModelChunk(request, task.id, json); } request.abortableTasks.delete(task); - task.status = 1; + task.status = COMPLETED; } catch (thrownValue) { - if (11 === request.status) { + if (request.status === ABORTING) { request.abortableTasks.delete(task); - task.status = 3; + task.status = ABORTED; var model = stringify(serializeByValueID(request.fatalError)); emitModelChunk(request, task.id, model); } else { @@ -2115,13 +2175,13 @@ null !== x && "function" === typeof x.then ) { - task.status = 0; + task.status = PENDING$1; task.thenableState = getThenableStateAfterSuspending(); var ping = task.ping; x.then(ping, ping); } else { request.abortableTasks.delete(task); - task.status = 4; + task.status = ERRORED$1; var digest = logRecoverableError(request, x, task); emitErrorChunk(request, task.id, digest, x); } @@ -2231,7 +2291,7 @@ } function startWork(request) { request.flushScheduled = null !== request.destination; - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { requestStorage.run(request, performWork, request); }) @@ -2251,7 +2311,7 @@ })); } function startFlowing(request, destination) { - if (12 === request.status) + if (request.status === CLOSING) (request.status = CLOSED), destination.destroy(request.fatalError); else if (request.status !== CLOSED && null === request.destination) { request.destination = destination; @@ -2264,7 +2324,7 @@ } function abort(request, reason) { try { - 10 === request.status && (request.status = 11); + 10 === request.status && (request.status = ABORTING); var abortableTasks = request.abortableTasks; if (0 < abortableTasks.size) { var error = @@ -2285,8 +2345,8 @@ request.pendingChunks++; emitErrorChunk(request, _errorId2, digest, error); abortableTasks.forEach(function (task) { - if (5 !== task.status) { - task.status = 3; + if (task.status !== RENDERING) { + task.status = ABORTED; var ref = serializeByValueID(_errorId2); task = encodeReferenceChunk(request, task.id, ref); request.completedErrorChunks.push(task); @@ -3413,15 +3473,11 @@ void 0 === entry && ((entry = resourceType()), cache.set(resourceType, entry)); return entry; - }, - getOwner: function () { - if (currentOwner) return currentOwner; - var owner = componentStorage.getStore(); - return owner ? owner : null; } - }, - ReactSharedInternalsServer = - React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; if (!ReactSharedInternalsServer) throw Error( 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' @@ -3462,10 +3518,33 @@ getPrototypeOf = Object.getPrototypeOf, jsxPropsParents = new WeakMap(), jsxChildrenParents = new WeakMap(), - CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), - ObjectPrototype = Object.prototype, + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, stringify = JSON.stringify, + PENDING$1 = 0, + COMPLETED = 1, + ABORTED = 3, + ERRORED$1 = 4, + RENDERING = 5, + ABORTING = 11, + CLOSING = 12, CLOSED = 13, + PRERENDER = 21, currentRequest = null, debugID = null, modelRoot = !1, diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js index 56fe8a4040e4e7..ff55e31013a325 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js @@ -347,6 +347,11 @@ function unsupportedContext() { throw Error("Cannot read a Client Context from a Server Component."); } + function resolveOwner() { + if (currentOwner) return currentOwner; + var owner = componentStorage.getStore(); + return owner ? owner : null; + } function isObjectPrototype(object) { if (!object) return !1; var ObjectPrototype = Object.prototype; @@ -544,6 +549,55 @@ !filename.includes("node_modules") ); } + function filterStackTrace(request, error, skipFrames) { + request = request.filterStackFrame; + error = parseStackTrace(error, skipFrames); + for (skipFrames = 0; skipFrames < error.length; skipFrames++) { + var callsite = error[skipFrames], + functionName = callsite[0], + url = callsite[1]; + if (url.startsWith("rsc://React/")) { + var envIdx = url.indexOf("/", 12), + suffixIdx = url.lastIndexOf("?"); + -1 < envIdx && + -1 < suffixIdx && + (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); + } + request(url, functionName) || + (error.splice(skipFrames, 1), skipFrames--); + } + return error; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = resolveRequest(); + if (("assert" !== methodName || !arguments[0]) && null !== request) { + var stack = filterStackTrace( + request, + Error("react-stack-top-frame"), + 1 + ); + request.pendingChunks++; + var id = request.nextChunkId++, + owner = resolveOwner(); + emitConsoleChunk(request, id, methodName, owner, stack, arguments); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } function getCurrentStackInDEV() { return ""; } @@ -650,14 +704,14 @@ task = thenable.reason; var digest = logRecoverableError(request, task, null); emitErrorChunk(request, newTask.id, digest, task); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); return newTask.id; default: - if (11 === request.status) + if (request.status === ABORTING) return ( request.abortableTasks.delete(newTask), - (newTask.status = 3), + (newTask.status = ABORTED), (task = stringify(serializeByValueID(request.fatalError))), emitModelChunk(request, newTask.id, task), newTask.id @@ -684,7 +738,7 @@ function (reason) { var _digest = logRecoverableError(request, reason, newTask); emitErrorChunk(request, newTask.id, _digest, reason); - newTask.status = 4; + newTask.status = ERRORED$1; request.abortableTasks.delete(newTask); enqueueFlush(request); } @@ -835,9 +889,8 @@ function emitHint(request, code, model) { model = stringify(model); var id = request.nextChunkId++; - code = "H" + code; - code = id.toString(16) + ":" + code; - request.completedHintChunks.push(code + model + "\n"); + code = serializeRowHeader("H" + code, id) + model + "\n"; + request.completedHintChunks.push(code); enqueueFlush(request); } function readThenable(thenable) { @@ -915,7 +968,7 @@ props, componentDebugInfo ); - if (11 === request.status) + if (request.status === ABORTING) throw ( ("object" !== typeof props || null === props || @@ -1048,7 +1101,7 @@ task.debugOwner ); retryTask(request, task); - return 1 === task.status + return task.status === COMPLETED ? serializeByValueID(task.id) : "$L" + task.id.toString(16); } @@ -1088,7 +1141,7 @@ switch (type.$$typeof) { case REACT_LAZY_TYPE: type = callLazyInitInDEV(type); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; return renderElement(request, task, type, key, ref, props); case REACT_FORWARD_REF_TYPE: return renderFunctionComponent( @@ -1118,7 +1171,7 @@ pingedTasks.push(task); 1 === pingedTasks.length && ((request.flushScheduled = null !== request.destination), - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { return performWork(request); }) @@ -1143,7 +1196,7 @@ request.writtenObjects.set(model, serializeByValueID(id)); var task = { id: id, - status: 0, + status: PENDING$1, model: model, keyPath: keyPath, implicitSlot: implicitSlot, @@ -1197,6 +1250,9 @@ ? "$-Infinity" : "$NaN"; } + function serializeRowHeader(tag, id) { + return id.toString(16) + ":" + tag; + } function encodeReferenceChunk(request, id, reference) { request = stringify(reference); return id.toString(16) + ":" + request + "\n"; @@ -1241,7 +1297,7 @@ request.pendingChunks++; var importId = request.nextChunkId++, json = stringify(clientReferenceMetadata), - processedChunk = importId.toString(16) + ":I" + json + "\n"; + processedChunk = serializeRowHeader("I", importId) + json + "\n"; request.completedImportChunks.push(processedChunk); writtenClientReferences.set(clientReferenceKey, importId); return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName @@ -1393,9 +1449,9 @@ null !== parent && (parent.$$typeof === REACT_ELEMENT_TYPE || parent.$$typeof === REACT_LAZY_TYPE); - if (11 === request.status) + if (request.status === ABORTING) return ( - (task.status = 3), + (task.status = ABORTED), (task = request.fatalError), parent ? "$L" + task.toString(16) : serializeByValueID(task) ); @@ -1489,7 +1545,7 @@ case REACT_LAZY_TYPE: task.thenableState = null; elementReference = callLazyInitInDEV(value); - if (11 === request.status) throw null; + if (request.status === ABORTING) throw null; if ((_writtenObjects = value._debugInfo)) { if (null === debugID) return outlineTask(request, task); forwardDebugInfo(request, debugID, _writtenObjects); @@ -1769,33 +1825,14 @@ onFatalError(error); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) - : ((request.status = 12), (request.fatalError = error)); + : ((request.status = CLOSING), (request.fatalError = error)); } function emitErrorChunk(request, id, digest, error) { var env = (0, request.environmentName)(); try { if (error instanceof Error) { var message = String(error.message); - for ( - var filterStackFrame = request.filterStackFrame, - stack = parseStackTrace(error, 0), - i = 0; - i < stack.length; - i++ - ) { - var callsite = stack[i], - functionName = callsite[0], - url = callsite[1]; - if (url.startsWith("rsc://React/")) { - var envIdx = url.indexOf("/", 12), - suffixIdx = url.lastIndexOf("?"); - -1 < envIdx && - -1 < suffixIdx && - (url = callsite[1] = url.slice(envIdx + 1, suffixIdx)); - } - filterStackFrame(url, functionName) || (stack.splice(i, 1), i--); - } - var stack$jscomp$0 = stack; + var stack = filterStackTrace(request, error, 0); var errorEnv = error.environmentName; "string" === typeof errorEnv && (env = errorEnv); } else @@ -1803,19 +1840,14 @@ "object" === typeof error && null !== error ? describeObjectForErrorMessage(error) : String(error)), - (stack$jscomp$0 = []); + (stack = []); } catch (x) { (message = "An error occurred but serializing the error message failed."), - (stack$jscomp$0 = []); + (stack = []); } - digest = { - digest: digest, - message: message, - stack: stack$jscomp$0, - env: env - }; - id = id.toString(16) + ":E" + stringify(digest) + "\n"; + digest = { digest: digest, message: message, stack: stack, env: env }; + id = serializeRowHeader("E", id) + stringify(digest) + "\n"; request.completedErrorChunks.push(id); } function emitSymbolChunk(request, id, name) { @@ -1837,7 +1869,7 @@ value ); }); - id = id.toString(16) + ":D" + debugInfo + "\n"; + id = serializeRowHeader("D", id) + debugInfo + "\n"; request.completedRegularChunks.push(id); } function emitTypedArrayChunk(request, id, tag, typedArray) { @@ -2023,6 +2055,34 @@ request.completedRegularChunks.push(json); return model; } + function emitConsoleChunk( + request, + id, + methodName, + owner, + stackTrace, + args + ) { + var counter = { objectCount: 0 }, + env = (0, request.environmentName)(); + methodName = [methodName, stackTrace, owner, env]; + methodName.push.apply(methodName, args); + args = stringify(methodName, function (parentPropertyName, value) { + try { + return renderConsoleValue( + request, + counter, + this, + parentPropertyName, + value + ); + } catch (x) { + return "unknown value"; + } + }); + id = serializeRowHeader("W", id) + args + "\n"; + request.completedRegularChunks.push(id); + } function forwardDebugInfo(request, id, debugInfo) { for (var i = 0; i < debugInfo.length; i++) request.pendingChunks++, @@ -2064,9 +2124,9 @@ emitModelChunk(request, task.id, value)); } function retryTask(request, task) { - if (0 === task.status) { + if (task.status === PENDING$1) { var prevDebugID = debugID; - task.status = 5; + task.status = RENDERING; try { modelRoot = task.model; debugID = task.id; @@ -2098,11 +2158,11 @@ emitModelChunk(request, task.id, json); } request.abortableTasks.delete(task); - task.status = 1; + task.status = COMPLETED; } catch (thrownValue) { - if (11 === request.status) { + if (request.status === ABORTING) { request.abortableTasks.delete(task); - task.status = 3; + task.status = ABORTED; var model = stringify(serializeByValueID(request.fatalError)); emitModelChunk(request, task.id, model); } else { @@ -2115,13 +2175,13 @@ null !== x && "function" === typeof x.then ) { - task.status = 0; + task.status = PENDING$1; task.thenableState = getThenableStateAfterSuspending(); var ping = task.ping; x.then(ping, ping); } else { request.abortableTasks.delete(task); - task.status = 4; + task.status = ERRORED$1; var digest = logRecoverableError(request, x, task); emitErrorChunk(request, task.id, digest, x); } @@ -2231,7 +2291,7 @@ } function startWork(request) { request.flushScheduled = null !== request.destination; - 21 === request.type + request.type === PRERENDER ? scheduleMicrotask(function () { requestStorage.run(request, performWork, request); }) @@ -2251,7 +2311,7 @@ })); } function startFlowing(request, destination) { - if (12 === request.status) + if (request.status === CLOSING) (request.status = CLOSED), destination.destroy(request.fatalError); else if (request.status !== CLOSED && null === request.destination) { request.destination = destination; @@ -2264,7 +2324,7 @@ } function abort(request, reason) { try { - 10 === request.status && (request.status = 11); + 10 === request.status && (request.status = ABORTING); var abortableTasks = request.abortableTasks; if (0 < abortableTasks.size) { var error = @@ -2285,8 +2345,8 @@ request.pendingChunks++; emitErrorChunk(request, _errorId2, digest, error); abortableTasks.forEach(function (task) { - if (5 !== task.status) { - task.status = 3; + if (task.status !== RENDERING) { + task.status = ABORTED; var ref = serializeByValueID(_errorId2); task = encodeReferenceChunk(request, task.id, ref); request.completedErrorChunks.push(task); @@ -3378,15 +3438,11 @@ void 0 === entry && ((entry = resourceType()), cache.set(resourceType, entry)); return entry; - }, - getOwner: function () { - if (currentOwner) return currentOwner; - var owner = componentStorage.getStore(); - return owner ? owner : null; } - }, - ReactSharedInternalsServer = - React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; if (!ReactSharedInternalsServer) throw Error( 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' @@ -3427,10 +3483,33 @@ getPrototypeOf = Object.getPrototypeOf, jsxPropsParents = new WeakMap(), jsxChildrenParents = new WeakMap(), - CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), - ObjectPrototype = Object.prototype, + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, stringify = JSON.stringify, + PENDING$1 = 0, + COMPLETED = 1, + ABORTED = 3, + ERRORED$1 = 4, + RENDERING = 5, + ABORTING = 11, + CLOSING = 12, CLOSED = 13, + PRERENDER = 21, currentRequest = null, debugID = null, modelRoot = !1, diff --git a/packages/next/src/compiled/react-server-dom-webpack/package.json b/packages/next/src/compiled/react-server-dom-webpack/package.json index 4d1d9dfc69f72a..af392fd9854b70 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack/package.json @@ -64,8 +64,8 @@ "webpack-sources": "^3.2.0" }, "peerDependencies": { - "react": "19.0.0-rc-7771d3a7-20240827", - "react-dom": "19.0.0-rc-7771d3a7-20240827", + "react": "19.0.0-rc-4c58fce7-20240904", + "react-dom": "19.0.0-rc-4c58fce7-20240904", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react/cjs/react.development.js b/packages/next/src/compiled/react/cjs/react.development.js index 7126d341e05ed9..46501b570e8f25 100644 --- a/packages/next/src/compiled/react/cjs/react.development.js +++ b/packages/next/src/compiled/react/cjs/react.development.js @@ -1517,7 +1517,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react/cjs/react.production.js b/packages/next/src/compiled/react/cjs/react.production.js index 2a9081477239c6..b66830fbc860eb 100644 --- a/packages/next/src/compiled/react/cjs/react.production.js +++ b/packages/next/src/compiled/react/cjs/react.production.js @@ -536,4 +536,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/react/cjs/react.react-server.development.js b/packages/next/src/compiled/react/cjs/react.react-server.development.js index 5129867cd65f2c..94ecedf3a5da83 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.development.js @@ -1113,5 +1113,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.0.0-rc-7771d3a7-20240827"; + exports.version = "19.0.0-rc-4c58fce7-20240904"; })(); diff --git a/packages/next/src/compiled/react/cjs/react.react-server.production.js b/packages/next/src/compiled/react/cjs/react.react-server.production.js index 17974fedf0a073..4f5b16ece5cb1b 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.production.js @@ -424,4 +424,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.0.0-rc-7771d3a7-20240827"; +exports.version = "19.0.0-rc-4c58fce7-20240904"; diff --git a/packages/next/src/compiled/unistore/unistore.js b/packages/next/src/compiled/unistore/unistore.js index ecfa6bcdddea5e..2054003f3f0efb 100644 --- a/packages/next/src/compiled/unistore/unistore.js +++ b/packages/next/src/compiled/unistore/unistore.js @@ -1 +1 @@ -(()=>{var t={583:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a{var t={841:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a=18'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: '@types/react': optional: true @@ -5920,8 +5920,8 @@ packages: peerDependencies: '@babel/core': 7.22.5 - babel-plugin-react-compiler@0.0.0-experimental-4e0eccf-20240903: - resolution: {integrity: sha512-4PSoBfsZrxtodjG1aIvU+yRIHEXfmDn980pOeUvf/9yN5GpZOBXiijRHheIVY8MeB7T9KHyV45F9ae4xx5ovwg==} + babel-plugin-react-compiler@0.0.0-experimental-7449567-20240904: + resolution: {integrity: sha512-IqCWVU3ItO/BOTJA9gM+FNLwe8CGnCky5ZC3EULqMKkG7NVr/9XzUOApj8xtmQIM9WuZzzqRaJMXmW88xF+0Tw==} babel-plugin-react-compiler@0.0.0-experimental-c23de8d-20240515: resolution: {integrity: sha512-0XN2gmpT55QtAz5n7d5g91y1AuO9tRhWBaLgCRyc4ExHrlr7+LfxW+YTb3mOwxngkkiggwM8HyYsaEK9MqhnlQ==} @@ -10368,7 +10368,7 @@ packages: lucide-react@0.383.0: resolution: {integrity: sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} @@ -12604,28 +12604,28 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-dom@0.0.0-experimental-7771d3a7-20240827: - resolution: {integrity: sha512-lgOBiTipHJIKgJyiaV/YhL28X0vdt30fuHQxiW73/3WSu/ePSO/hV8uSefpiPhqMTq4TUKKylOBHhcG1/fy3Jw==} + react-dom@0.0.0-experimental-4c58fce7-20240904: + resolution: {integrity: sha512-Z+hTN4sGEVVXeRm84RVmfnq88RPIMCe16U6+oivDfl7rO4aHyr/s9OBRCuA6SoF/Cx4r/y8JVW/e8gkd/cqjrg==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 react-dom@17.0.2: resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 - react-dom@19.0.0-rc-7771d3a7-20240827: - resolution: {integrity: sha512-EMgZJX6EEQEr+pso+9ySkrEMPv3N7zF2fbi0f6uB+X7r8E+O2GqPRcIHtFigMdW8uS0XCVFHAocMnIc4yPULYQ==} + react-dom@19.0.0-rc-4c58fce7-20240904: + resolution: {integrity: sha512-Qmp34cw7mUxI6J7KaFn0LkA0GfwzvLM5Yb4tkM3cjPkSpaPEw2xgRNj2NIrjnbheWNEtCK8dJBgpV90Hv/HENA==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 react-dom@19.0.0-rc-f90a6bcc-20240827: resolution: {integrity: sha512-oUa/reDvGtjRcxi8u+GYHaDHanudaO28+G+Wvxm50CItW1xwIFN2Nn7foJxxDS9lFLGdRWZvjxldZEPAUSuXbg==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 - react-is@19.0.0-rc-7771d3a7-20240827: - resolution: {integrity: sha512-vy9RwFmrhsGQAJEbFQyTskRWXVm39Ax2Ikao51VX2GBXoV2XOQ17vdhyhltCOa+yuoNj0p3X2C90+bxG+w2u0Q==} + react-is@19.0.0-rc-4c58fce7-20240904: + resolution: {integrity: sha512-E5NCQCIjG2VtWbHpbAFqlQllL7BfBXaTjCjAVMF+bhQS1jRNIYLIagzcnGp2U+1vzlToCZaa6e/1RxNl85sEZA==} react-is@19.0.0-rc-f90a6bcc-20240827: resolution: {integrity: sha512-1tXoLFzVbqHAQeY3CwpyF5IYbkwgSoNHhrhS8qOrfiZIh2461h/C1BP/JVIxwyL51wHhUgLsAc/M8g0OcEhV1A==} @@ -12636,8 +12636,8 @@ packages: react-number-format@5.4.0: resolution: {integrity: sha512-NWdICrqLhI7rAS8yUeLVd6Wr4cN7UjJ9IBTS0f/a9i7UB4x4Ti70kGnksBtZ7o4Z7YRbvCMMR/jQmkoOBa/4fg==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904 react-refresh@0.12.0: resolution: {integrity: sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A==} @@ -12648,7 +12648,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: '@types/react': optional: true @@ -12658,58 +12658,58 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: '@types/react': optional: true - react-server-dom-turbopack@0.0.0-experimental-7771d3a7-20240827: - resolution: {integrity: sha512-5j6sur5W5Oj7XZfS8EjvwmnbvaW42HHPY00ur0/HCvUxZNEPsTg7Ri4y3WlP4ebZTKdubCU5hD/Nt5/GkxvnuQ==} + react-server-dom-turbopack@0.0.0-experimental-4c58fce7-20240904: + resolution: {integrity: sha512-qhYKpl6XwGgBRCHtaKt0P4KG/3XDnQ4mV5pWc8NcaKZwNuRW9VmsTJry99++THR6KPEiiwh1S2zZRswy0zOoxg==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904 - react-server-dom-turbopack@19.0.0-rc-7771d3a7-20240827: - resolution: {integrity: sha512-KkipAuYaTTQivseV0DNwRS8K6o8K5YuohXlXS5NY9QPXAyyk/Q2LSFUayMrk9ICAmty+Fs5xVjN4UAIpi1gmOQ==} + react-server-dom-turbopack@19.0.0-rc-4c58fce7-20240904: + resolution: {integrity: sha512-H8p90BDYFj0XmusbJlCg9UvdNeKca9WycGlxCwz6YxdvFME/TKs+f3kJHaBWJAAmTPKFh73eX6zFML0Qvj40wA==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904 - react-server-dom-webpack@0.0.0-experimental-7771d3a7-20240827: - resolution: {integrity: sha512-swlsAzmGKLEp+afolIWJo8jIwt0GLux2j4IQzqVRRw1j/1nn7aO6a5po/rveOMR6XT/ktsE307vre8rEBungxQ==} + react-server-dom-webpack@0.0.0-experimental-4c58fce7-20240904: + resolution: {integrity: sha512-wxytzb8L5bL9drGa+A5eH3lNJJ9fNn8mg3Rjr4p4sMfMcYT+Blh46XUHGDJRiE7dHwir2ARE4jyryg/MlG2/1g==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904 webpack: 5.90.0 - react-server-dom-webpack@19.0.0-rc-7771d3a7-20240827: - resolution: {integrity: sha512-2r7481kcNjYtQ97f9fuVnT6YSPk4b6RCno+4UoBSKYDq1nCU/Ybj0b1O/68BqYGdpu5fYI0UVDrfI3ywWVuvbg==} + react-server-dom-webpack@19.0.0-rc-4c58fce7-20240904: + resolution: {integrity: sha512-tDm/RIHSsGOKwXDXuggMZvfby2mQ+Dw9IImktEKyRCjpQjzAtgM0ZONUyxMaKbh57H/tHxJFGF/cmQWTqNtj1w==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904 webpack: 5.90.0 react-shallow-renderer@16.15.0: resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 react-ssr-prepass@1.0.8: resolution: {integrity: sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 - react-is: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-is: 19.0.0-rc-4c58fce7-20240904 react-style-singleton@2.2.1: resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: '@types/react': optional: true @@ -12717,30 +12717,30 @@ packages: react-test-renderer@18.2.0: resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 react-textarea-autosize@8.5.3: resolution: {integrity: sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==} engines: {node: '>=10'} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 react-virtualized@9.22.3: resolution: {integrity: sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904 - react@0.0.0-experimental-7771d3a7-20240827: - resolution: {integrity: sha512-Jh40juQIRyTl4q5yH53JzVLCP5h5CcnDBgfcz8hYQTLvvKoxWFr5dR78mUIrc8IPInn8bcOconodGJaXYVqTSQ==} + react@0.0.0-experimental-4c58fce7-20240904: + resolution: {integrity: sha512-efqx4uUALi0OR+1sIEoAOt9E3w6jM+nR2Qrh0SGSCmRjUaJg+ILsZeHcHG+V3W4r2xS+QD/D9YfdHyr30zrDrQ==} engines: {node: '>=0.10.0'} react@17.0.2: resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} engines: {node: '>=0.10.0'} - react@19.0.0-rc-7771d3a7-20240827: - resolution: {integrity: sha512-Xg6LoxgPpT4efYHzRB2gUUQCoNXu2df3sOBRgiUvzTVT1qQNOV611/w80JiOmnTWlIyCaUfSkNrMG8OUO/D+AA==} + react@19.0.0-rc-4c58fce7-20240904: + resolution: {integrity: sha512-zyekIzYByBxumlv+VL5pN7Kk0153ud6ZA17IU54GrURWFXJsQzv/ZZ0zF8rsBasQ55VEm74VVeVefYOKbOZTQA==} engines: {node: '>=0.10.0'} react@19.0.0-rc-f90a6bcc-20240827: @@ -13266,11 +13266,11 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - scheduler@0.0.0-experimental-7771d3a7-20240827: - resolution: {integrity: sha512-/5YtUIFqGx1aHcSLqT9VBmzJ1nX8XOYkooipvfwH4ZRYuGptkHypXx+FUO4caZoN0O29dI3yUBUk3msVp6wMyg==} + scheduler@0.0.0-experimental-4c58fce7-20240904: + resolution: {integrity: sha512-WBAFaqVSbXIsd5JaQOw0NMce8fTgfWaXD1Tu6gRu2a18XcojN9atoWzf22y7m3UeLN2VWG6sZeJn7HsCUB4nHA==} - scheduler@0.25.0-rc-7771d3a7-20240827: - resolution: {integrity: sha512-n4nHmAoerbIOSrH24w0+fcdCUwQ4Npm7yXfsrn09FL01OWIaxpuo4P0rj3qPyLFgsJDbn18sWvLVB/e/KPnR+A==} + scheduler@0.25.0-rc-4c58fce7-20240904: + resolution: {integrity: sha512-eU7RBVIRjFNzLI3oWxMGUYy872yVmN7gDcJiNiWo8Jh+lKfh/k003fgFTZNBCE7DgVCIc6k6/afMuMDqDcUwcw==} schema-utils@2.7.1: resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} @@ -13844,8 +13844,8 @@ packages: engines: {node: '>= 16'} peerDependencies: babel-plugin-styled-components: '>= 2' - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: babel-plugin-styled-components: optional: true @@ -13859,7 +13859,7 @@ packages: peerDependencies: '@babel/core': '*' babel-plugin-macros: '*' - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: '@babel/core': optional: true @@ -13936,7 +13936,7 @@ packages: swr@2.2.4: resolution: {integrity: sha512-njiZ/4RiIhoOlAaLYDqwz5qH/KZXVilRLvomrx83HjzCWTfa+InyfAjv05PSFxnmLzZkNO9ZfvgoqzAaEI4sGQ==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 symbol-observable@1.0.1: resolution: {integrity: sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==} @@ -14674,7 +14674,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: '@types/react': optional: true @@ -14682,13 +14682,13 @@ packages: use-composed-ref@1.3.0: resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 use-isomorphic-layout-effect@1.1.2: resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: '@types/react': optional: true @@ -14697,7 +14697,7 @@ packages: resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==} peerDependencies: '@types/react': '*' - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: '@types/react': optional: true @@ -14707,7 +14707,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 peerDependenciesMeta: '@types/react': optional: true @@ -14715,7 +14715,7 @@ packages: use-sync-external-store@1.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 use@3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} @@ -17103,17 +17103,17 @@ snapshots: '@emotion/memoize@0.8.1': {} - '@emotion/react@11.11.1(react@19.0.0-rc-7771d3a7-20240827)(types-react@19.0.0-rc.0)': + '@emotion/react@11.11.1(react@19.0.0-rc-4c58fce7-20240904)(types-react@19.0.0-rc.0)': dependencies: '@babel/runtime': 7.22.5 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.2 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.0.0-rc-7771d3a7-20240827) + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.0.0-rc-4c58fce7-20240904) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 hoist-non-react-statics: 3.3.2 - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 optionalDependencies: '@types/react': types-react@19.0.0-rc.0 @@ -17129,9 +17129,9 @@ snapshots: '@emotion/unitless@0.8.1': {} - '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.0.0-rc-7771d3a7-20240827)': + '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.0.0-rc-4c58fce7-20240904)': dependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 '@emotion/utils@1.2.1': {} @@ -18491,11 +18491,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@2.2.1(react@19.0.0-rc-7771d3a7-20240827)': + '@mdx-js/react@2.2.1(react@19.0.0-rc-4c58fce7-20240904)': dependencies: '@types/mdx': 2.0.3 '@types/react': types-react@19.0.0-rc.0 - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 '@mdx-js/react@2.2.1(react@19.0.0-rc-f90a6bcc-20240827)': dependencies: @@ -19314,13 +19314,13 @@ snapshots: '@types/jest': 29.5.5 jest: 29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0) - '@testing-library/react@15.0.7(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)(types-react@19.0.0-rc.0)': + '@testing-library/react@15.0.7(react-dom@19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904))(react@19.0.0-rc-4c58fce7-20240904)(types-react@19.0.0-rc.0)': dependencies: '@babel/runtime': 7.22.5 '@testing-library/dom': 10.1.0 '@types/react-dom': types-react-dom@19.0.0-rc.0 - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827) + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904) optionalDependencies: '@types/react': types-react@19.0.0-rc.0 @@ -20568,7 +20568,7 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-react-compiler@0.0.0-experimental-4e0eccf-20240903: + babel-plugin-react-compiler@0.0.0-experimental-7449567-20240904: dependencies: '@babel/generator': 7.2.0 '@babel/types': 7.22.5 @@ -24247,7 +24247,7 @@ snapshots: hoist-non-react-statics@3.3.2: dependencies: - react-is: 19.0.0-rc-7771d3a7-20240827 + react-is: 19.0.0-rc-4c58fce7-20240904 homedir-polyfill@1.0.3: dependencies: @@ -28686,25 +28686,25 @@ snapshots: '@jest/types': 24.9.0 ansi-regex: 4.1.0 ansi-styles: 3.2.1 - react-is: 19.0.0-rc-7771d3a7-20240827 + react-is: 19.0.0-rc-4c58fce7-20240904 pretty-format@27.5.1: dependencies: ansi-regex: 5.0.1 ansi-styles: 5.2.0 - react-is: 19.0.0-rc-7771d3a7-20240827 + react-is: 19.0.0-rc-4c58fce7-20240904 pretty-format@29.5.0: dependencies: '@jest/schemas': 29.4.3 ansi-styles: 5.2.0 - react-is: 19.0.0-rc-7771d3a7-20240827 + react-is: 19.0.0-rc-4c58fce7-20240904 pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 19.0.0-rc-7771d3a7-20240827 + react-is: 19.0.0-rc-4c58fce7-20240904 pretty-ms@7.0.0: dependencies: @@ -28761,7 +28761,7 @@ snapshots: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react-is: 19.0.0-rc-7771d3a7-20240827 + react-is: 19.0.0-rc-4c58fce7-20240904 property-information@5.6.0: dependencies: @@ -28933,29 +28933,29 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-dom@0.0.0-experimental-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827): + react-dom@0.0.0-experimental-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904): dependencies: - react: 19.0.0-rc-7771d3a7-20240827 - scheduler: 0.25.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + scheduler: 0.25.0-rc-4c58fce7-20240904 - react-dom@17.0.2(react@19.0.0-rc-7771d3a7-20240827): + react-dom@17.0.2(react@19.0.0-rc-4c58fce7-20240904): dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react: 19.0.0-rc-7771d3a7-20240827 - scheduler: 0.25.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + scheduler: 0.25.0-rc-4c58fce7-20240904 - react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827): + react-dom@19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904): dependencies: - react: 19.0.0-rc-7771d3a7-20240827 - scheduler: 0.25.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + scheduler: 0.25.0-rc-4c58fce7-20240904 react-dom@19.0.0-rc-f90a6bcc-20240827(react@19.0.0-rc-f90a6bcc-20240827): dependencies: react: 19.0.0-rc-f90a6bcc-20240827 - scheduler: 0.25.0-rc-7771d3a7-20240827 + scheduler: 0.25.0-rc-4c58fce7-20240904 - react-is@19.0.0-rc-7771d3a7-20240827: {} + react-is@19.0.0-rc-4c58fce7-20240904: {} react-is@19.0.0-rc-f90a6bcc-20240827: {} @@ -28988,48 +28988,48 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.0 - react-server-dom-turbopack@0.0.0-experimental-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827): + react-server-dom-turbopack@0.0.0-experimental-4c58fce7-20240904(react-dom@19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904))(react@19.0.0-rc-4c58fce7-20240904): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827) + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904) - react-server-dom-turbopack@19.0.0-rc-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827): + react-server-dom-turbopack@19.0.0-rc-4c58fce7-20240904(react-dom@19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904))(react@19.0.0-rc-4c58fce7-20240904): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827) + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904) - react-server-dom-webpack@0.0.0-experimental-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))): + react-server-dom-webpack@0.0.0-experimental-4c58fce7-20240904(react-dom@19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904))(react@19.0.0-rc-4c58fce7-20240904)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827) + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904) webpack: 5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-server-dom-webpack@19.0.0-rc-7771d3a7-20240827(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))): + react-server-dom-webpack@19.0.0-rc-4c58fce7-20240904(react-dom@19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904))(react@19.0.0-rc-4c58fce7-20240904)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827) + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904) webpack: 5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.13)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-shallow-renderer@16.15.0(react@19.0.0-rc-7771d3a7-20240827): + react-shallow-renderer@16.15.0(react@19.0.0-rc-4c58fce7-20240904): dependencies: object-assign: 4.1.1 - react: 19.0.0-rc-7771d3a7-20240827 - react-is: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-is: 19.0.0-rc-4c58fce7-20240904 - react-ssr-prepass@1.0.8(react-is@19.0.0-rc-f90a6bcc-20240827)(react@19.0.0-rc-7771d3a7-20240827): + react-ssr-prepass@1.0.8(react-is@19.0.0-rc-f90a6bcc-20240827)(react@19.0.0-rc-4c58fce7-20240904): dependencies: object-is: 1.0.2 - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 react-is: 19.0.0-rc-f90a6bcc-20240827 react-style-singleton@2.2.1(react@19.0.0-rc-f90a6bcc-20240827)(types-react@19.0.0-rc.0): @@ -29041,12 +29041,12 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.0 - react-test-renderer@18.2.0(react@19.0.0-rc-7771d3a7-20240827): + react-test-renderer@18.2.0(react@19.0.0-rc-4c58fce7-20240904): dependencies: - react: 19.0.0-rc-7771d3a7-20240827 - react-is: 19.0.0-rc-7771d3a7-20240827 - react-shallow-renderer: 16.15.0(react@19.0.0-rc-7771d3a7-20240827) - scheduler: 0.25.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 + react-is: 19.0.0-rc-4c58fce7-20240904 + react-shallow-renderer: 16.15.0(react@19.0.0-rc-4c58fce7-20240904) + scheduler: 0.25.0-rc-4c58fce7-20240904 react-textarea-autosize@8.5.3(react@19.0.0-rc-f90a6bcc-20240827)(types-react@19.0.0-rc.0): dependencies: @@ -29057,25 +29057,25 @@ snapshots: transitivePeerDependencies: - '@types/react' - react-virtualized@9.22.3(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827): + react-virtualized@9.22.3(react-dom@19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904))(react@19.0.0-rc-4c58fce7-20240904): dependencies: '@babel/runtime': 7.22.5 clsx: 1.1.1 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827) + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904) react-lifecycles-compat: 3.0.4 - react@0.0.0-experimental-7771d3a7-20240827: {} + react@0.0.0-experimental-4c58fce7-20240904: {} react@17.0.2: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react@19.0.0-rc-7771d3a7-20240827: {} + react@19.0.0-rc-4c58fce7-20240904: {} react@19.0.0-rc-f90a6bcc-20240827: {} @@ -29765,9 +29765,9 @@ snapshots: dependencies: xmlchars: 2.2.0 - scheduler@0.0.0-experimental-7771d3a7-20240827: {} + scheduler@0.0.0-experimental-4c58fce7-20240904: {} - scheduler@0.25.0-rc-7771d3a7-20240827: {} + scheduler@0.25.0-rc-4c58fce7-20240904: {} schema-utils@2.7.1: dependencies: @@ -30419,7 +30419,7 @@ snapshots: dependencies: inline-style-parser: 0.1.1 - styled-components@6.0.0-rc.3(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827): + styled-components@6.0.0-rc.3(react-dom@19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904))(react@19.0.0-rc-4c58fce7-20240904): dependencies: '@babel/cli': 7.21.5(@babel/core@7.22.5) '@babel/core': 7.22.5 @@ -30434,8 +30434,8 @@ snapshots: '@emotion/unitless': 0.8.1 css-to-react-native: 3.2.0 postcss: 8.4.31 - react: 19.0.0-rc-7771d3a7-20240827 - react-dom: 19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827) + react: 19.0.0-rc-4c58fce7-20240904 + react-dom: 19.0.0-rc-4c58fce7-20240904(react@19.0.0-rc-4c58fce7-20240904) shallowequal: 1.1.0 stylis: 4.2.0 tslib: 2.5.3 @@ -30447,10 +30447,10 @@ snapshots: postcss: 7.0.32 postcss-load-plugins: 2.3.0 - styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-7771d3a7-20240827): + styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-4c58fce7-20240904): dependencies: client-only: 0.0.1 - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 optionalDependencies: '@babel/core': 7.22.5 babel-plugin-macros: 3.1.0 @@ -30540,11 +30540,11 @@ snapshots: picocolors: 1.0.1 stable: 0.1.8 - swr@2.2.4(react@19.0.0-rc-7771d3a7-20240827): + swr@2.2.4(react@19.0.0-rc-4c58fce7-20240904): dependencies: client-only: 0.0.1 - react: 19.0.0-rc-7771d3a7-20240827 - use-sync-external-store: 1.2.0(react@19.0.0-rc-7771d3a7-20240827) + react: 19.0.0-rc-4c58fce7-20240904 + use-sync-external-store: 1.2.0(react@19.0.0-rc-4c58fce7-20240904) symbol-observable@1.0.1: {} @@ -31229,9 +31229,9 @@ snapshots: unist-util-is: 5.2.0 unist-util-visit-parents: 5.1.3 - unistore@3.4.1(react@19.0.0-rc-7771d3a7-20240827): + unistore@3.4.1(react@19.0.0-rc-4c58fce7-20240904): optionalDependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 universal-github-app-jwt@1.1.1: dependencies: @@ -31356,9 +31356,9 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.0 - use-sync-external-store@1.2.0(react@19.0.0-rc-7771d3a7-20240827): + use-sync-external-store@1.2.0(react@19.0.0-rc-4c58fce7-20240904): dependencies: - react: 19.0.0-rc-7771d3a7-20240827 + react: 19.0.0-rc-4c58fce7-20240904 use@3.1.1: {} diff --git a/run-tests.js b/run-tests.js index f1f00f88e64c11..1dc3ca43ba35fe 100644 --- a/run-tests.js +++ b/run-tests.js @@ -20,7 +20,7 @@ const { getTestFilter } = require('./test/get-test-filter') // Do not rename or format. sync-react script relies on this line. // prettier-ignore -const nextjsReactPeerVersion = "19.0.0-rc-7771d3a7-20240827"; +const nextjsReactPeerVersion = "19.0.0-rc-4c58fce7-20240904"; let argv = require('yargs/yargs')(process.argv.slice(2)) .string('type') diff --git a/test/.stats-app/package.json b/test/.stats-app/package.json index 58cf2ed6c29fde..3e9b291cc473f3 100644 --- a/test/.stats-app/package.json +++ b/test/.stats-app/package.json @@ -4,8 +4,8 @@ "license": "MIT", "dependencies": { "next": "latest", - "react": "19.0.0-rc-7771d3a7-20240827", - "react-dom": "19.0.0-rc-7771d3a7-20240827" + "react": "19.0.0-rc-4c58fce7-20240904", + "react-dom": "19.0.0-rc-4c58fce7-20240904" }, "engines": { "node": ">=18.18.0" diff --git a/test/e2e/next-test/first-time-setup-js/package.json b/test/e2e/next-test/first-time-setup-js/package.json index a135b40a27c11b..47266b3940a73b 100644 --- a/test/e2e/next-test/first-time-setup-js/package.json +++ b/test/e2e/next-test/first-time-setup-js/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-7771d3a7-20240827", - "react-dom": "19.0.0-rc-7771d3a7-20240827" + "react": "19.0.0-rc-4c58fce7-20240904", + "react-dom": "19.0.0-rc-4c58fce7-20240904" } } diff --git a/test/e2e/next-test/first-time-setup-ts/package.json b/test/e2e/next-test/first-time-setup-ts/package.json index 107dfe0c5b5f70..09675caf628ac1 100644 --- a/test/e2e/next-test/first-time-setup-ts/package.json +++ b/test/e2e/next-test/first-time-setup-ts/package.json @@ -8,8 +8,8 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-7771d3a7-20240827", - "react-dom": "19.0.0-rc-7771d3a7-20240827" + "react": "19.0.0-rc-4c58fce7-20240904", + "react-dom": "19.0.0-rc-4c58fce7-20240904" }, "devDependencies": { "@types/react": "^18", diff --git a/test/lib/next-modes/base.ts b/test/lib/next-modes/base.ts index 561e5229302fc4..3ac51ffd371e3e 100644 --- a/test/lib/next-modes/base.ts +++ b/test/lib/next-modes/base.ts @@ -51,7 +51,7 @@ type OmitFirstArgument = F extends ( // Do not rename or format. sync-react script relies on this line. // prettier-ignore -const nextjsReactPeerVersion = "19.0.0-rc-7771d3a7-20240827"; +const nextjsReactPeerVersion = "19.0.0-rc-4c58fce7-20240904"; export class NextInstance { protected files: FileRef | { [filename: string]: string | FileRef }