From ed791aed3debba6773910dc44ec0545548cf8293 Mon Sep 17 00:00:00 2001 From: "pull[bot]" Date: Wed, 11 Dec 2024 11:06:47 -0800 Subject: [PATCH] Make enableOwnerStacks dynamic (#31661) following up on https://github.com/facebook/react/pull/31287, fixing tests --------- Co-authored-by: Rick Hanlon DiffTrain build for [a4964987dc140526702e996223fe7ee293def8ac](https://github.com/facebook/react/commit/a4964987dc140526702e996223fe7ee293def8ac) --- compiled-rn/VERSION_NATIVE_FB | 2 +- .../react/react-dom/cjs/ReactDOM-dev.js | 4 +- .../react/react-dom/cjs/ReactDOM-prod.js | 4 +- .../react/react-dom/cjs/ReactDOM-profiling.js | 4 +- .../react/react-dom/cjs/ReactDOMClient-dev.js | 592 +++++++++++------- .../react-dom/cjs/ReactDOMClient-prod.js | 12 +- .../react-dom/cjs/ReactDOMClient-profiling.js | 12 +- .../react-dom/cjs/ReactDOMProfiling-dev.js | 592 +++++++++++------- .../react-dom/cjs/ReactDOMProfiling-prod.js | 12 +- .../cjs/ReactDOMProfiling-profiling.js | 12 +- .../cjs/ReactTestRenderer-dev.js | 8 +- .../cjs/ReactTestRenderer-prod.js | 8 +- .../cjs/ReactTestRenderer-profiling.js | 8 +- .../react/react/cjs/JSXDEVRuntime-dev.js | 81 ++- .../vendor/react/react/cjs/JSXRuntime-dev.js | 92 ++- .../vendor/react/react/cjs/React-dev.js | 211 +++++-- .../vendor/react/react/cjs/React-prod.js | 5 +- .../vendor/react/react/cjs/React-profiling.js | 5 +- .../Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 184 +++++- .../implementations/ReactFabric-prod.fb.js | 6 +- .../ReactFabric-profiling.fb.js | 6 +- .../ReactNativeRenderer-dev.fb.js | 188 +++++- .../ReactNativeRenderer-prod.fb.js | 10 +- .../ReactNativeRenderer-profiling.fb.js | 10 +- .../Renderer/shims/ReactNativeTypes.js | 11 +- 26 files changed, 1449 insertions(+), 632 deletions(-) diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB index 42da84b01a255..6e083d0c3ad92 100644 --- a/compiled-rn/VERSION_NATIVE_FB +++ b/compiled-rn/VERSION_NATIVE_FB @@ -1 +1 @@ -19.0.0-native-fb-4a8fc0f9-20241210 \ No newline at end of file +19.0.0-native-fb-a4964987-20241211 \ No newline at end of file diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js index fdadf23e740c8..55aefecccce6a 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -420,5 +420,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; + exports.version = "19.0.0-native-fb-a4964987-20241211"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js index f57b3d7aaf223..b4b66b931de55 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<84f92a68501c80e402eaeb6c42e04120>> + * @generated SignedSource<<9a6ddd03ad59bffae1400d7817440da9>> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js index f57b3d7aaf223..b4b66b931de55 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<84f92a68501c80e402eaeb6c42e04120>> + * @generated SignedSource<<9a6ddd03ad59bffae1400d7817440da9>> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js index e840cc0e31c1e..bf4c256866047 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9d91ebef4e187c24916a13538ba8743f>> + * @generated SignedSource<<9daf013310978cac03378fd9f0c4e4d2>> */ /* @@ -510,6 +510,27 @@ __DEV__ && "function" === typeof fn && componentFrameCache.set(fn, sampleLines); return sampleLines; } + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; + } function describeFiber(fiber) { switch (fiber.tag) { case 26: @@ -560,13 +581,76 @@ __DEV__ && return "\nError generating stack: " + x.message + "\n" + x.stack; } } + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; + } + function getOwnerStackByFiberInDev(workInProgress) { + if (!enableOwnerStacks) return ""; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); + } + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + workInProgress && + debugStack && + ("string" !== typeof debugStack && + (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), + "" !== debugStack && (info += "\n" + debugStack)); + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } function getCurrentFiberOwnerNameInDevOrNull() { if (null === current) return null; var owner = current._debugOwner; return null != owner ? getComponentNameFromOwner(owner) : null; } function getCurrentFiberStackInDev() { - return null === current ? "" : getStackByFiberInDevAndProd(current); + return null === current + ? "" + : enableOwnerStacks + ? getOwnerStackByFiberInDev(current) + : getStackByFiberInDevAndProd(current); } function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { var previousFiber = current; @@ -575,7 +659,11 @@ __DEV__ && isRendering = !1; current = fiber; try { - return callback(arg0, arg1, arg2, arg3, arg4); + return enableOwnerStacks && null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); } finally { current = previousFiber; } @@ -2504,37 +2592,51 @@ __DEV__ && : findInvalidAncestorForTag(childTag, ancestorInfo); ancestorInfo = parentInfo || ancestorInfo; if (!ancestorInfo) return !0; - ancestorInfo = ancestorInfo.tag; - var warnKey = String(!!parentInfo) + "|" + childTag + "|" + ancestorInfo; - if (didWarn[warnKey]) return !1; - didWarn[warnKey] = !0; - var ancestor = (warnKey = current) - ? findAncestor(warnKey.return, ancestorInfo) - : null; - warnKey = - null !== warnKey && null !== ancestor - ? describeAncestors(ancestor, warnKey, null) - : ""; - ancestor = "<" + childTag + ">"; + var ancestorTag = ancestorInfo.tag; + ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag; + if (didWarn[ancestorInfo]) return !1; + didWarn[ancestorInfo] = !0; + var ancestor = (ancestorInfo = current) + ? findAncestor(ancestorInfo.return, ancestorTag) + : null, + ancestorDescription = + null !== ancestorInfo && null !== ancestor + ? describeAncestors(ancestor, ancestorInfo, null) + : "", + tagDisplayName = "<" + childTag + ">"; parentInfo ? ((parentInfo = ""), - "table" === ancestorInfo && + "table" === ancestorTag && "tr" === childTag && (parentInfo += " Add a , or to your code to match the DOM tree generated by the browser."), error$jscomp$0( "In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s", - ancestor, - ancestorInfo, + tagDisplayName, + ancestorTag, parentInfo, - warnKey + ancestorDescription )) : error$jscomp$0( "In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s", - ancestor, - ancestorInfo, - warnKey + tagDisplayName, + ancestorTag, + ancestorDescription ); + enableOwnerStacks && + ancestorInfo && + ((childTag = ancestorInfo.return), + null === ancestor || + null === childTag || + (ancestor === childTag && + childTag._debugOwner === ancestorInfo._debugOwner) || + runWithFiberInDEV(ancestor, function () { + error$jscomp$0( + "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.", + ancestorTag, + tagDisplayName + ); + })); return !1; } function validateTextNesting(childText, parentTag) { @@ -6602,6 +6704,7 @@ __DEV__ && )), (current.return = returnFiber), (current._debugOwner = returnFiber), + enableOwnerStacks && (current._debugTask = returnFiber._debugTask), (current._debugInfo = currentDebugInfo), current ); @@ -6676,6 +6779,7 @@ __DEV__ && )), (current.return = returnFiber), (current._debugOwner = returnFiber), + enableOwnerStacks && (current._debugTask = returnFiber._debugTask), (current._debugInfo = currentDebugInfo), current ); @@ -6698,6 +6802,7 @@ __DEV__ && )), (newChild.return = returnFiber), (newChild._debugOwner = returnFiber), + enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask), (newChild._debugInfo = currentDebugInfo), newChild ); @@ -6745,6 +6850,7 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask), (returnFiber = pushDebugInfo(newChild._debugInfo)), (lanes._debugInfo = currentDebugInfo), (currentDebugInfo = returnFiber), @@ -7282,6 +7388,8 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && + (lanes._debugTask = returnFiber._debugTask), (lanes._debugInfo = currentDebugInfo), validateFragmentProps(newChild, lanes, returnFiber), (returnFiber = lanes)) @@ -7448,6 +7556,8 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && + (lanes._debugTask = returnFiber._debugTask), (lanes._debugInfo = currentDebugInfo), (returnFiber = lanes)), placeSingleChild(returnFiber) @@ -7485,10 +7595,13 @@ __DEV__ && fiber.return = returnFiber; var debugInfo = (fiber._debugInfo = currentDebugInfo); fiber._debugOwner = returnFiber._debugOwner; + enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask); if (null != debugInfo) for (var i = debugInfo.length - 1; 0 <= i; i--) if ("string" === typeof debugInfo[i].stack) { fiber._debugOwner = debugInfo[i]; + enableOwnerStacks && + (fiber._debugTask = debugInfo[i].debugTask); break; } return fiber; @@ -8011,12 +8124,14 @@ __DEV__ && error = componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components."; - var prevGetCurrentStack = ReactSharedInternals.getCurrentStack, - componentStack = + var prevGetCurrentStack = ReactSharedInternals.getCurrentStack; + if (!enableOwnerStacks) { + var componentStack = null != errorInfo.componentStack ? errorInfo.componentStack : ""; - ReactSharedInternals.getCurrentStack = function () { - return componentStack; - }; + ReactSharedInternals.getCurrentStack = function () { + return componentStack; + }; + } try { warn( "%s\n\n%s\n", @@ -8024,7 +8139,8 @@ __DEV__ && "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries." ); } finally { - ReactSharedInternals.getCurrentStack = prevGetCurrentStack; + enableOwnerStacks || + (ReactSharedInternals.getCurrentStack = prevGetCurrentStack); } } function defaultOnCaughtError(error$1, errorInfo) { @@ -8034,12 +8150,14 @@ __DEV__ && recreateMessage = "React will try to recreate this component tree from scratch using the error boundary you provided, " + ((errorBoundaryName || "Anonymous") + "."), - prevGetCurrentStack = ReactSharedInternals.getCurrentStack, - componentStack = + prevGetCurrentStack = ReactSharedInternals.getCurrentStack; + if (!enableOwnerStacks) { + var componentStack = null != errorInfo.componentStack ? errorInfo.componentStack : ""; - ReactSharedInternals.getCurrentStack = function () { - return componentStack; - }; + ReactSharedInternals.getCurrentStack = function () { + return componentStack; + }; + } try { "object" === typeof error$1 && null !== error$1 && @@ -8061,7 +8179,8 @@ __DEV__ && recreateMessage ); } finally { - ReactSharedInternals.getCurrentStack = prevGetCurrentStack; + enableOwnerStacks || + (ReactSharedInternals.getCurrentStack = prevGetCurrentStack); } } function defaultOnRecoverableError(error) { @@ -9134,32 +9253,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2379; - var JSCompiler_object_inline_stack_2380 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2369; + var JSCompiler_object_inline_stack_2370 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2381 = !1; + var JSCompiler_object_inline_componentStack_2371 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2379 = didSuspend) || - (JSCompiler_object_inline_digest_2379 = + (JSCompiler_object_inline_digest_2369 = didSuspend) || + (JSCompiler_object_inline_digest_2369 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2379 && - ((JSCompiler_object_inline_componentStack_2381 = !0), + JSCompiler_object_inline_digest_2369 && + ((JSCompiler_object_inline_componentStack_2371 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2379 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2369 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2381 + JSCompiler_object_inline_componentStack_2371 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2378 = nextHydratableInstance; + var JSCompiler_object_inline_message_2368 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2378)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2368)) { c: { - var instance = JSCompiler_object_inline_message_2378; + var instance = JSCompiler_object_inline_message_2368; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -9200,89 +9319,89 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2378 + JSCompiler_object_inline_message_2368 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2378 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2368 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2378 && - ((JSCompiler_object_inline_message_2378 = - JSCompiler_object_inline_message_2378.dehydrated), - null !== JSCompiler_object_inline_message_2378) + null !== JSCompiler_object_inline_message_2368 && + ((JSCompiler_object_inline_message_2368 = + JSCompiler_object_inline_message_2368.dehydrated), + null !== JSCompiler_object_inline_message_2368) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2378) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2368) ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2378 = - JSCompiler_object_inline_stack_2380.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2380.fallback; - if (JSCompiler_object_inline_componentStack_2381) + JSCompiler_object_inline_message_2368 = + JSCompiler_object_inline_stack_2370.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2370.fallback; + if (JSCompiler_object_inline_componentStack_2371) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2380 = + (JSCompiler_object_inline_stack_2370 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2378, + JSCompiler_object_inline_message_2368, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2381 = + (JSCompiler_object_inline_componentStack_2371 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2381.memoizedState = + (JSCompiler_object_inline_componentStack_2371.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2381.childLanes = + (JSCompiler_object_inline_componentStack_2371.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2379, + JSCompiler_object_inline_digest_2369, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2380 + JSCompiler_object_inline_stack_2370 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2380.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2370.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2380 = + (JSCompiler_object_inline_stack_2370 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2378, + JSCompiler_object_inline_message_2368, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2381 = + (JSCompiler_object_inline_componentStack_2371 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2381.memoizedState = + (JSCompiler_object_inline_componentStack_2371.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2381.childLanes = + (JSCompiler_object_inline_componentStack_2371.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2379, + JSCompiler_object_inline_digest_2369, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2380 + JSCompiler_object_inline_stack_2370 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2378 + JSCompiler_object_inline_message_2368 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2378 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2378) + ((JSCompiler_object_inline_message_2368 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2368) ) { if (didSuspend) workInProgress.flags & 256 @@ -9299,32 +9418,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2381 = - JSCompiler_object_inline_stack_2380.fallback), - (JSCompiler_object_inline_message_2378 = workInProgress.mode), - (JSCompiler_object_inline_stack_2380 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2371 = + JSCompiler_object_inline_stack_2370.fallback), + (JSCompiler_object_inline_message_2368 = workInProgress.mode), + (JSCompiler_object_inline_stack_2370 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2380.children + children: JSCompiler_object_inline_stack_2370.children }, - JSCompiler_object_inline_message_2378, + JSCompiler_object_inline_message_2368, 0, null )), - (JSCompiler_object_inline_componentStack_2381 = + (JSCompiler_object_inline_componentStack_2371 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2381, - JSCompiler_object_inline_message_2378, + JSCompiler_object_inline_componentStack_2371, + JSCompiler_object_inline_message_2368, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2381.flags |= 2), - (JSCompiler_object_inline_stack_2380.return = workInProgress), - (JSCompiler_object_inline_componentStack_2381.return = + (JSCompiler_object_inline_componentStack_2371.flags |= 2), + (JSCompiler_object_inline_stack_2370.return = workInProgress), + (JSCompiler_object_inline_componentStack_2371.return = workInProgress), - (JSCompiler_object_inline_stack_2380.sibling = - JSCompiler_object_inline_componentStack_2381), - (workInProgress.child = JSCompiler_object_inline_stack_2380), + (JSCompiler_object_inline_stack_2370.sibling = + JSCompiler_object_inline_componentStack_2371), + (workInProgress.child = JSCompiler_object_inline_stack_2370), (workInProgress.mode & ConcurrentMode) !== NoMode && reconcileChildFibers( workInProgress, @@ -9332,63 +9451,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2380 = workInProgress.child), - (JSCompiler_object_inline_stack_2380.memoizedState = + (JSCompiler_object_inline_stack_2370 = workInProgress.child), + (JSCompiler_object_inline_stack_2370.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2380.childLanes = + (JSCompiler_object_inline_stack_2370.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2379, + JSCompiler_object_inline_digest_2369, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2381)); + JSCompiler_object_inline_componentStack_2371)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2378)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2368)) ) { - JSCompiler_object_inline_digest_2379 = - JSCompiler_object_inline_message_2378.nextSibling && - JSCompiler_object_inline_message_2378.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2379) { - JSCompiler_temp = JSCompiler_object_inline_digest_2379.dgst; - var message = JSCompiler_object_inline_digest_2379.msg; - instance = JSCompiler_object_inline_digest_2379.stck; - var componentStack = JSCompiler_object_inline_digest_2379.cstck; + JSCompiler_object_inline_digest_2369 = + JSCompiler_object_inline_message_2368.nextSibling && + JSCompiler_object_inline_message_2368.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2369) { + JSCompiler_temp = JSCompiler_object_inline_digest_2369.dgst; + var message = JSCompiler_object_inline_digest_2369.msg; + instance = JSCompiler_object_inline_digest_2369.stck; + var componentStack = JSCompiler_object_inline_digest_2369.cstck; } - JSCompiler_object_inline_message_2378 = message; - JSCompiler_object_inline_digest_2379 = JSCompiler_temp; - JSCompiler_object_inline_stack_2380 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2381 = + JSCompiler_object_inline_message_2368 = message; + JSCompiler_object_inline_digest_2369 = JSCompiler_temp; + JSCompiler_object_inline_stack_2370 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2371 = componentStack; - JSCompiler_object_inline_componentStack_2381 = - JSCompiler_object_inline_message_2378 - ? Error(JSCompiler_object_inline_message_2378) + JSCompiler_object_inline_componentStack_2371 = + JSCompiler_object_inline_message_2368 + ? Error(JSCompiler_object_inline_message_2368) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2381.stack = - JSCompiler_object_inline_stack_2380 || ""; - JSCompiler_object_inline_componentStack_2381.digest = - JSCompiler_object_inline_digest_2379; - JSCompiler_object_inline_digest_2379 = + JSCompiler_object_inline_componentStack_2371.stack = + JSCompiler_object_inline_stack_2370 || ""; + JSCompiler_object_inline_componentStack_2371.digest = + JSCompiler_object_inline_digest_2369; + JSCompiler_object_inline_digest_2369 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2380 = { - value: JSCompiler_object_inline_componentStack_2381, + JSCompiler_object_inline_stack_2370 = { + value: JSCompiler_object_inline_componentStack_2371, source: null, - stack: JSCompiler_object_inline_digest_2379 + stack: JSCompiler_object_inline_digest_2369 }; - "string" === typeof JSCompiler_object_inline_digest_2379 && + "string" === typeof JSCompiler_object_inline_digest_2369 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2381, - JSCompiler_object_inline_stack_2380 + JSCompiler_object_inline_componentStack_2371, + JSCompiler_object_inline_stack_2370 ); - queueHydrationError(JSCompiler_object_inline_stack_2380); + queueHydrationError(JSCompiler_object_inline_stack_2370); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9402,25 +9521,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2379 = + (JSCompiler_object_inline_digest_2369 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2379) + didReceiveUpdate || JSCompiler_object_inline_digest_2369) ) { - JSCompiler_object_inline_digest_2379 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2379) { - JSCompiler_object_inline_stack_2380 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2380 & 42)) - JSCompiler_object_inline_stack_2380 = 1; + JSCompiler_object_inline_digest_2369 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2369) { + JSCompiler_object_inline_stack_2370 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2370 & 42)) + JSCompiler_object_inline_stack_2370 = 1; else - switch (JSCompiler_object_inline_stack_2380) { + switch (JSCompiler_object_inline_stack_2370) { case 2: - JSCompiler_object_inline_stack_2380 = 1; + JSCompiler_object_inline_stack_2370 = 1; break; case 8: - JSCompiler_object_inline_stack_2380 = 4; + JSCompiler_object_inline_stack_2370 = 4; break; case 32: - JSCompiler_object_inline_stack_2380 = 16; + JSCompiler_object_inline_stack_2370 = 16; break; case 128: case 256: @@ -9441,40 +9560,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2380 = 64; + JSCompiler_object_inline_stack_2370 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2380 = 134217728; + JSCompiler_object_inline_stack_2370 = 134217728; break; default: - JSCompiler_object_inline_stack_2380 = 0; + JSCompiler_object_inline_stack_2370 = 0; } - JSCompiler_object_inline_stack_2380 = + JSCompiler_object_inline_stack_2370 = 0 !== - (JSCompiler_object_inline_stack_2380 & - (JSCompiler_object_inline_digest_2379.suspendedLanes | + (JSCompiler_object_inline_stack_2370 & + (JSCompiler_object_inline_digest_2369.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2380; + : JSCompiler_object_inline_stack_2370; if ( - 0 !== JSCompiler_object_inline_stack_2380 && - JSCompiler_object_inline_stack_2380 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2370 && + JSCompiler_object_inline_stack_2370 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2380), + ((prevState.retryLane = JSCompiler_object_inline_stack_2370), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2380 + JSCompiler_object_inline_stack_2370 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2379, + JSCompiler_object_inline_digest_2369, current, - JSCompiler_object_inline_stack_2380 + JSCompiler_object_inline_stack_2370 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2378.data === + JSCompiler_object_inline_message_2368.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9482,14 +9601,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2378.data === + JSCompiler_object_inline_message_2368.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2378.nextSibling + JSCompiler_object_inline_message_2368.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9507,72 +9626,72 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2380.children + JSCompiler_object_inline_stack_2370.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2381) + if (JSCompiler_object_inline_componentStack_2371) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2381 = - JSCompiler_object_inline_stack_2380.fallback), - (JSCompiler_object_inline_message_2378 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2371 = + JSCompiler_object_inline_stack_2370.fallback), + (JSCompiler_object_inline_message_2368 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2380.children + children: JSCompiler_object_inline_stack_2370.children }), - (JSCompiler_object_inline_message_2378 & ConcurrentMode) === NoMode && + (JSCompiler_object_inline_message_2368 & ConcurrentMode) === NoMode && workInProgress.child !== JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2380 = workInProgress.child), - (JSCompiler_object_inline_stack_2380.childLanes = 0), - (JSCompiler_object_inline_stack_2380.pendingProps = + ? ((JSCompiler_object_inline_stack_2370 = workInProgress.child), + (JSCompiler_object_inline_stack_2370.childLanes = 0), + (JSCompiler_object_inline_stack_2370.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2380.actualDuration = -0), - (JSCompiler_object_inline_stack_2380.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2380.selfBaseDuration = + ((JSCompiler_object_inline_stack_2370.actualDuration = -0), + (JSCompiler_object_inline_stack_2370.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2370.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2380.treeBaseDuration = + (JSCompiler_object_inline_stack_2370.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)) - : ((JSCompiler_object_inline_stack_2380 = createWorkInProgress( + : ((JSCompiler_object_inline_stack_2370 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2380.subtreeFlags = + (JSCompiler_object_inline_stack_2370.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)), null !== instance - ? (JSCompiler_object_inline_componentStack_2381 = + ? (JSCompiler_object_inline_componentStack_2371 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2381 + JSCompiler_object_inline_componentStack_2371 )) - : ((JSCompiler_object_inline_componentStack_2381 = + : ((JSCompiler_object_inline_componentStack_2371 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2381, - JSCompiler_object_inline_message_2378, + JSCompiler_object_inline_componentStack_2371, + JSCompiler_object_inline_message_2368, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2381.flags |= 2)), - (JSCompiler_object_inline_componentStack_2381.return = + (JSCompiler_object_inline_componentStack_2371.flags |= 2)), + (JSCompiler_object_inline_componentStack_2371.return = workInProgress), - (JSCompiler_object_inline_stack_2380.return = workInProgress), - (JSCompiler_object_inline_stack_2380.sibling = - JSCompiler_object_inline_componentStack_2381), - (workInProgress.child = JSCompiler_object_inline_stack_2380), - (JSCompiler_object_inline_stack_2380 = - JSCompiler_object_inline_componentStack_2381), - (JSCompiler_object_inline_componentStack_2381 = workInProgress.child), - (JSCompiler_object_inline_message_2378 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2378 - ? (JSCompiler_object_inline_message_2378 = + (JSCompiler_object_inline_stack_2370.return = workInProgress), + (JSCompiler_object_inline_stack_2370.sibling = + JSCompiler_object_inline_componentStack_2371), + (workInProgress.child = JSCompiler_object_inline_stack_2370), + (JSCompiler_object_inline_stack_2370 = + JSCompiler_object_inline_componentStack_2371), + (JSCompiler_object_inline_componentStack_2371 = workInProgress.child), + (JSCompiler_object_inline_message_2368 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2368 + ? (JSCompiler_object_inline_message_2368 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2378.cachePool), + JSCompiler_object_inline_message_2368.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9580,45 +9699,45 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2378 = { + (JSCompiler_object_inline_message_2368 = { baseLanes: - JSCompiler_object_inline_message_2378.baseLanes | renderLanes, + JSCompiler_object_inline_message_2368.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2381.memoizedState = - JSCompiler_object_inline_message_2378), - (JSCompiler_object_inline_componentStack_2381.childLanes = + (JSCompiler_object_inline_componentStack_2371.memoizedState = + JSCompiler_object_inline_message_2368), + (JSCompiler_object_inline_componentStack_2371.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2379, + JSCompiler_object_inline_digest_2369, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2380 + JSCompiler_object_inline_stack_2370 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2379 = current.child; - current = JSCompiler_object_inline_digest_2379.sibling; - JSCompiler_object_inline_digest_2379 = createWorkInProgress( - JSCompiler_object_inline_digest_2379, + JSCompiler_object_inline_digest_2369 = current.child; + current = JSCompiler_object_inline_digest_2369.sibling; + JSCompiler_object_inline_digest_2369 = createWorkInProgress( + JSCompiler_object_inline_digest_2369, { mode: "visible", - children: JSCompiler_object_inline_stack_2380.children + children: JSCompiler_object_inline_stack_2370.children } ); (workInProgress.mode & ConcurrentMode) === NoMode && - (JSCompiler_object_inline_digest_2379.lanes = renderLanes); - JSCompiler_object_inline_digest_2379.return = workInProgress; - JSCompiler_object_inline_digest_2379.sibling = null; + (JSCompiler_object_inline_digest_2369.lanes = renderLanes); + JSCompiler_object_inline_digest_2369.return = workInProgress; + JSCompiler_object_inline_digest_2369.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2379; + workInProgress.child = JSCompiler_object_inline_digest_2369; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2379; + return JSCompiler_object_inline_digest_2369; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -10073,6 +10192,9 @@ __DEV__ && workInProgress.mode, workInProgress.lanes ); + enableOwnerStacks && + ((renderLanes._debugStack = workInProgress._debugStack), + (renderLanes._debugTask = workInProgress._debugTask)); var returnFiber = workInProgress.return; if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; @@ -13974,6 +14096,7 @@ __DEV__ && this.actualStartTime = -1.1; this.treeBaseDuration = this.selfBaseDuration = -0; this._debugOwner = this._debugInfo = null; + enableOwnerStacks && (this._debugTask = this._debugStack = null); this._debugNeedsRemount = !1; this._debugHookTypes = null; hasBadMapPolyfill || @@ -14013,10 +14136,11 @@ __DEV__ && selfBaseDuration: -0, treeBaseDuration: -0, _debugInfo: null, - _debugOwner: null, - _debugNeedsRemount: !1, - _debugHookTypes: null + _debugOwner: null }; + enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null)); + tag._debugNeedsRemount = !1; + tag._debugHookTypes = null; hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(tag); @@ -14039,6 +14163,9 @@ __DEV__ && (workInProgress.type = current.type), (workInProgress.stateNode = current.stateNode), (workInProgress._debugOwner = current._debugOwner), + enableOwnerStacks && + ((workInProgress._debugStack = current._debugStack), + (workInProgress._debugTask = current._debugTask)), (workInProgress._debugHookTypes = current._debugHookTypes), (workInProgress.alternate = current), (current.alternate = workInProgress)) @@ -14258,6 +14385,9 @@ __DEV__ && lanes ); mode._debugOwner = element._owner; + enableOwnerStacks && + ((mode._debugStack = element._debugStack), + (mode._debugTask = element._debugTask)); return mode; } function createFiberFromFragment(elements, mode, lanes, key) { @@ -17090,6 +17220,15 @@ __DEV__ && }); } } + function executeDispatch(event, listener, currentTarget) { + event.currentTarget = currentTarget; + try { + listener(event); + } catch (error$45) { + reportGlobalError(error$45); + } + event.currentTarget = null; + } function processDispatchQueue(dispatchQueue, eventSystemFlags) { eventSystemFlags = 0 !== (eventSystemFlags & 4); for (var i = 0; i < dispatchQueue.length; i++) { @@ -17110,14 +17249,15 @@ __DEV__ && _dispatchListeners$i = _dispatchListeners$i.listener; if (instance !== previousInstance && event.isPropagationStopped()) break a; - previousInstance = event; - previousInstance.currentTarget = currentTarget; - try { - _dispatchListeners$i(previousInstance); - } catch (error$45) { - reportGlobalError(error$45); - } - previousInstance.currentTarget = null; + enableOwnerStacks && null !== instance + ? runWithFiberInDEV( + instance, + executeDispatch, + event, + _dispatchListeners$i, + currentTarget + ) + : executeDispatch(event, _dispatchListeners$i, currentTarget); previousInstance = instance; } else @@ -17132,14 +17272,15 @@ __DEV__ && _dispatchListeners$i = _dispatchListeners$i.listener; if (instance !== previousInstance && event.isPropagationStopped()) break a; - previousInstance = event; - previousInstance.currentTarget = currentTarget; - try { - _dispatchListeners$i(previousInstance); - } catch (error$45) { - reportGlobalError(error$45); - } - previousInstance.currentTarget = null; + enableOwnerStacks && null !== instance + ? runWithFiberInDEV( + instance, + executeDispatch, + event, + _dispatchListeners$i, + currentTarget + ) + : executeDispatch(event, _dispatchListeners$i, currentTarget); previousInstance = instance; } } @@ -21987,6 +22128,7 @@ __DEV__ && enableUseResourceEffectHook = dynamicFlagsUntyped.enableUseResourceEffectHook, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, + enableOwnerStacks = dynamicFlagsUntyped.enableOwnerStacks, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -25794,11 +25936,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-4a8fc0f9-20241210" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-a4964987-20241211" !== 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-native-fb-4a8fc0f9-20241210\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-native-fb-a4964987-20241211\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -25835,10 +25977,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25982,5 +26124,5 @@ __DEV__ && listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; + exports.version = "19.0.0-native-fb-a4964987-20241211"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js index 9839c315ac6c3..aa1bbcbb3fcc1 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8226504c8b39ce2c6645a71e7e4df1ca>> + * @generated SignedSource<> */ /* @@ -15864,14 +15864,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1731 = React.version; if ( - "19.0.0-native-fb-4a8fc0f9-20241210" !== + "19.0.0-native-fb-a4964987-20241211" !== isomorphicReactPackageVersion$jscomp$inline_1731 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1731, - "19.0.0-native-fb-4a8fc0f9-20241210" + "19.0.0-native-fb-a4964987-20241211" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15893,10 +15893,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2186 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2187 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -16000,4 +16000,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js index b60fde41fc417..e47d9f1699e84 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<9d16c7391bc42f886751730016714eb2>> */ /* @@ -16517,14 +16517,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1821 = React.version; if ( - "19.0.0-native-fb-4a8fc0f9-20241210" !== + "19.0.0-native-fb-a4964987-20241211" !== isomorphicReactPackageVersion$jscomp$inline_1821 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1821, - "19.0.0-native-fb-4a8fc0f9-20241210" + "19.0.0-native-fb-a4964987-20241211" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16546,10 +16546,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_1828 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210", + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$292 = 0; @@ -16668,4 +16668,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js index d5695c0171911..b940d623df0d8 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ /* @@ -510,6 +510,27 @@ __DEV__ && "function" === typeof fn && componentFrameCache.set(fn, sampleLines); return sampleLines; } + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; + } function describeFiber(fiber) { switch (fiber.tag) { case 26: @@ -560,13 +581,76 @@ __DEV__ && return "\nError generating stack: " + x.message + "\n" + x.stack; } } + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; + } + function getOwnerStackByFiberInDev(workInProgress) { + if (!enableOwnerStacks) return ""; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); + } + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + workInProgress && + debugStack && + ("string" !== typeof debugStack && + (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), + "" !== debugStack && (info += "\n" + debugStack)); + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } function getCurrentFiberOwnerNameInDevOrNull() { if (null === current) return null; var owner = current._debugOwner; return null != owner ? getComponentNameFromOwner(owner) : null; } function getCurrentFiberStackInDev() { - return null === current ? "" : getStackByFiberInDevAndProd(current); + return null === current + ? "" + : enableOwnerStacks + ? getOwnerStackByFiberInDev(current) + : getStackByFiberInDevAndProd(current); } function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { var previousFiber = current; @@ -575,7 +659,11 @@ __DEV__ && isRendering = !1; current = fiber; try { - return callback(arg0, arg1, arg2, arg3, arg4); + return enableOwnerStacks && null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); } finally { current = previousFiber; } @@ -2512,37 +2600,51 @@ __DEV__ && : findInvalidAncestorForTag(childTag, ancestorInfo); ancestorInfo = parentInfo || ancestorInfo; if (!ancestorInfo) return !0; - ancestorInfo = ancestorInfo.tag; - var warnKey = String(!!parentInfo) + "|" + childTag + "|" + ancestorInfo; - if (didWarn[warnKey]) return !1; - didWarn[warnKey] = !0; - var ancestor = (warnKey = current) - ? findAncestor(warnKey.return, ancestorInfo) - : null; - warnKey = - null !== warnKey && null !== ancestor - ? describeAncestors(ancestor, warnKey, null) - : ""; - ancestor = "<" + childTag + ">"; + var ancestorTag = ancestorInfo.tag; + ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag; + if (didWarn[ancestorInfo]) return !1; + didWarn[ancestorInfo] = !0; + var ancestor = (ancestorInfo = current) + ? findAncestor(ancestorInfo.return, ancestorTag) + : null, + ancestorDescription = + null !== ancestorInfo && null !== ancestor + ? describeAncestors(ancestor, ancestorInfo, null) + : "", + tagDisplayName = "<" + childTag + ">"; parentInfo ? ((parentInfo = ""), - "table" === ancestorInfo && + "table" === ancestorTag && "tr" === childTag && (parentInfo += " Add a , or to your code to match the DOM tree generated by the browser."), error$jscomp$0( "In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s", - ancestor, - ancestorInfo, + tagDisplayName, + ancestorTag, parentInfo, - warnKey + ancestorDescription )) : error$jscomp$0( "In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s", - ancestor, - ancestorInfo, - warnKey + tagDisplayName, + ancestorTag, + ancestorDescription ); + enableOwnerStacks && + ancestorInfo && + ((childTag = ancestorInfo.return), + null === ancestor || + null === childTag || + (ancestor === childTag && + childTag._debugOwner === ancestorInfo._debugOwner) || + runWithFiberInDEV(ancestor, function () { + error$jscomp$0( + "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.", + ancestorTag, + tagDisplayName + ); + })); return !1; } function validateTextNesting(childText, parentTag) { @@ -6610,6 +6712,7 @@ __DEV__ && )), (current.return = returnFiber), (current._debugOwner = returnFiber), + enableOwnerStacks && (current._debugTask = returnFiber._debugTask), (current._debugInfo = currentDebugInfo), current ); @@ -6684,6 +6787,7 @@ __DEV__ && )), (current.return = returnFiber), (current._debugOwner = returnFiber), + enableOwnerStacks && (current._debugTask = returnFiber._debugTask), (current._debugInfo = currentDebugInfo), current ); @@ -6706,6 +6810,7 @@ __DEV__ && )), (newChild.return = returnFiber), (newChild._debugOwner = returnFiber), + enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask), (newChild._debugInfo = currentDebugInfo), newChild ); @@ -6753,6 +6858,7 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask), (returnFiber = pushDebugInfo(newChild._debugInfo)), (lanes._debugInfo = currentDebugInfo), (currentDebugInfo = returnFiber), @@ -7290,6 +7396,8 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && + (lanes._debugTask = returnFiber._debugTask), (lanes._debugInfo = currentDebugInfo), validateFragmentProps(newChild, lanes, returnFiber), (returnFiber = lanes)) @@ -7456,6 +7564,8 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && + (lanes._debugTask = returnFiber._debugTask), (lanes._debugInfo = currentDebugInfo), (returnFiber = lanes)), placeSingleChild(returnFiber) @@ -7493,10 +7603,13 @@ __DEV__ && fiber.return = returnFiber; var debugInfo = (fiber._debugInfo = currentDebugInfo); fiber._debugOwner = returnFiber._debugOwner; + enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask); if (null != debugInfo) for (var i = debugInfo.length - 1; 0 <= i; i--) if ("string" === typeof debugInfo[i].stack) { fiber._debugOwner = debugInfo[i]; + enableOwnerStacks && + (fiber._debugTask = debugInfo[i].debugTask); break; } return fiber; @@ -8019,12 +8132,14 @@ __DEV__ && error = componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components."; - var prevGetCurrentStack = ReactSharedInternals.getCurrentStack, - componentStack = + var prevGetCurrentStack = ReactSharedInternals.getCurrentStack; + if (!enableOwnerStacks) { + var componentStack = null != errorInfo.componentStack ? errorInfo.componentStack : ""; - ReactSharedInternals.getCurrentStack = function () { - return componentStack; - }; + ReactSharedInternals.getCurrentStack = function () { + return componentStack; + }; + } try { warn( "%s\n\n%s\n", @@ -8032,7 +8147,8 @@ __DEV__ && "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries." ); } finally { - ReactSharedInternals.getCurrentStack = prevGetCurrentStack; + enableOwnerStacks || + (ReactSharedInternals.getCurrentStack = prevGetCurrentStack); } } function defaultOnCaughtError(error$1, errorInfo) { @@ -8042,12 +8158,14 @@ __DEV__ && recreateMessage = "React will try to recreate this component tree from scratch using the error boundary you provided, " + ((errorBoundaryName || "Anonymous") + "."), - prevGetCurrentStack = ReactSharedInternals.getCurrentStack, - componentStack = + prevGetCurrentStack = ReactSharedInternals.getCurrentStack; + if (!enableOwnerStacks) { + var componentStack = null != errorInfo.componentStack ? errorInfo.componentStack : ""; - ReactSharedInternals.getCurrentStack = function () { - return componentStack; - }; + ReactSharedInternals.getCurrentStack = function () { + return componentStack; + }; + } try { "object" === typeof error$1 && null !== error$1 && @@ -8069,7 +8187,8 @@ __DEV__ && recreateMessage ); } finally { - ReactSharedInternals.getCurrentStack = prevGetCurrentStack; + enableOwnerStacks || + (ReactSharedInternals.getCurrentStack = prevGetCurrentStack); } } function defaultOnRecoverableError(error) { @@ -9142,32 +9261,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2384; - var JSCompiler_object_inline_stack_2385 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2374; + var JSCompiler_object_inline_stack_2375 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2386 = !1; + var JSCompiler_object_inline_componentStack_2376 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2384 = didSuspend) || - (JSCompiler_object_inline_digest_2384 = + (JSCompiler_object_inline_digest_2374 = didSuspend) || + (JSCompiler_object_inline_digest_2374 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2384 && - ((JSCompiler_object_inline_componentStack_2386 = !0), + JSCompiler_object_inline_digest_2374 && + ((JSCompiler_object_inline_componentStack_2376 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2384 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2374 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2386 + JSCompiler_object_inline_componentStack_2376 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2383 = nextHydratableInstance; + var JSCompiler_object_inline_message_2373 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2383)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2373)) { c: { - var instance = JSCompiler_object_inline_message_2383; + var instance = JSCompiler_object_inline_message_2373; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -9208,89 +9327,89 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2383 + JSCompiler_object_inline_message_2373 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2383 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2373 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2383 && - ((JSCompiler_object_inline_message_2383 = - JSCompiler_object_inline_message_2383.dehydrated), - null !== JSCompiler_object_inline_message_2383) + null !== JSCompiler_object_inline_message_2373 && + ((JSCompiler_object_inline_message_2373 = + JSCompiler_object_inline_message_2373.dehydrated), + null !== JSCompiler_object_inline_message_2373) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2383) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2373) ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2383 = - JSCompiler_object_inline_stack_2385.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2385.fallback; - if (JSCompiler_object_inline_componentStack_2386) + JSCompiler_object_inline_message_2373 = + JSCompiler_object_inline_stack_2375.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2375.fallback; + if (JSCompiler_object_inline_componentStack_2376) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2385 = + (JSCompiler_object_inline_stack_2375 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2383, + JSCompiler_object_inline_message_2373, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2386 = + (JSCompiler_object_inline_componentStack_2376 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2386.memoizedState = + (JSCompiler_object_inline_componentStack_2376.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2386.childLanes = + (JSCompiler_object_inline_componentStack_2376.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2384, + JSCompiler_object_inline_digest_2374, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2385 + JSCompiler_object_inline_stack_2375 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2385.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2375.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2385 = + (JSCompiler_object_inline_stack_2375 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2383, + JSCompiler_object_inline_message_2373, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2386 = + (JSCompiler_object_inline_componentStack_2376 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2386.memoizedState = + (JSCompiler_object_inline_componentStack_2376.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2386.childLanes = + (JSCompiler_object_inline_componentStack_2376.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2384, + JSCompiler_object_inline_digest_2374, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2385 + JSCompiler_object_inline_stack_2375 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2383 + JSCompiler_object_inline_message_2373 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2383 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2383) + ((JSCompiler_object_inline_message_2373 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2373) ) { if (didSuspend) workInProgress.flags & 256 @@ -9307,32 +9426,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2386 = - JSCompiler_object_inline_stack_2385.fallback), - (JSCompiler_object_inline_message_2383 = workInProgress.mode), - (JSCompiler_object_inline_stack_2385 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2376 = + JSCompiler_object_inline_stack_2375.fallback), + (JSCompiler_object_inline_message_2373 = workInProgress.mode), + (JSCompiler_object_inline_stack_2375 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2385.children + children: JSCompiler_object_inline_stack_2375.children }, - JSCompiler_object_inline_message_2383, + JSCompiler_object_inline_message_2373, 0, null )), - (JSCompiler_object_inline_componentStack_2386 = + (JSCompiler_object_inline_componentStack_2376 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2386, - JSCompiler_object_inline_message_2383, + JSCompiler_object_inline_componentStack_2376, + JSCompiler_object_inline_message_2373, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2386.flags |= 2), - (JSCompiler_object_inline_stack_2385.return = workInProgress), - (JSCompiler_object_inline_componentStack_2386.return = + (JSCompiler_object_inline_componentStack_2376.flags |= 2), + (JSCompiler_object_inline_stack_2375.return = workInProgress), + (JSCompiler_object_inline_componentStack_2376.return = workInProgress), - (JSCompiler_object_inline_stack_2385.sibling = - JSCompiler_object_inline_componentStack_2386), - (workInProgress.child = JSCompiler_object_inline_stack_2385), + (JSCompiler_object_inline_stack_2375.sibling = + JSCompiler_object_inline_componentStack_2376), + (workInProgress.child = JSCompiler_object_inline_stack_2375), (workInProgress.mode & ConcurrentMode) !== NoMode && reconcileChildFibers( workInProgress, @@ -9340,63 +9459,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2385 = workInProgress.child), - (JSCompiler_object_inline_stack_2385.memoizedState = + (JSCompiler_object_inline_stack_2375 = workInProgress.child), + (JSCompiler_object_inline_stack_2375.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2385.childLanes = + (JSCompiler_object_inline_stack_2375.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2384, + JSCompiler_object_inline_digest_2374, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2386)); + JSCompiler_object_inline_componentStack_2376)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2383)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2373)) ) { - JSCompiler_object_inline_digest_2384 = - JSCompiler_object_inline_message_2383.nextSibling && - JSCompiler_object_inline_message_2383.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2384) { - JSCompiler_temp = JSCompiler_object_inline_digest_2384.dgst; - var message = JSCompiler_object_inline_digest_2384.msg; - instance = JSCompiler_object_inline_digest_2384.stck; - var componentStack = JSCompiler_object_inline_digest_2384.cstck; + JSCompiler_object_inline_digest_2374 = + JSCompiler_object_inline_message_2373.nextSibling && + JSCompiler_object_inline_message_2373.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2374) { + JSCompiler_temp = JSCompiler_object_inline_digest_2374.dgst; + var message = JSCompiler_object_inline_digest_2374.msg; + instance = JSCompiler_object_inline_digest_2374.stck; + var componentStack = JSCompiler_object_inline_digest_2374.cstck; } - JSCompiler_object_inline_message_2383 = message; - JSCompiler_object_inline_digest_2384 = JSCompiler_temp; - JSCompiler_object_inline_stack_2385 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2386 = + JSCompiler_object_inline_message_2373 = message; + JSCompiler_object_inline_digest_2374 = JSCompiler_temp; + JSCompiler_object_inline_stack_2375 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2376 = componentStack; - JSCompiler_object_inline_componentStack_2386 = - JSCompiler_object_inline_message_2383 - ? Error(JSCompiler_object_inline_message_2383) + JSCompiler_object_inline_componentStack_2376 = + JSCompiler_object_inline_message_2373 + ? Error(JSCompiler_object_inline_message_2373) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2386.stack = - JSCompiler_object_inline_stack_2385 || ""; - JSCompiler_object_inline_componentStack_2386.digest = - JSCompiler_object_inline_digest_2384; - JSCompiler_object_inline_digest_2384 = + JSCompiler_object_inline_componentStack_2376.stack = + JSCompiler_object_inline_stack_2375 || ""; + JSCompiler_object_inline_componentStack_2376.digest = + JSCompiler_object_inline_digest_2374; + JSCompiler_object_inline_digest_2374 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2385 = { - value: JSCompiler_object_inline_componentStack_2386, + JSCompiler_object_inline_stack_2375 = { + value: JSCompiler_object_inline_componentStack_2376, source: null, - stack: JSCompiler_object_inline_digest_2384 + stack: JSCompiler_object_inline_digest_2374 }; - "string" === typeof JSCompiler_object_inline_digest_2384 && + "string" === typeof JSCompiler_object_inline_digest_2374 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2386, - JSCompiler_object_inline_stack_2385 + JSCompiler_object_inline_componentStack_2376, + JSCompiler_object_inline_stack_2375 ); - queueHydrationError(JSCompiler_object_inline_stack_2385); + queueHydrationError(JSCompiler_object_inline_stack_2375); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9410,25 +9529,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2384 = + (JSCompiler_object_inline_digest_2374 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2384) + didReceiveUpdate || JSCompiler_object_inline_digest_2374) ) { - JSCompiler_object_inline_digest_2384 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2384) { - JSCompiler_object_inline_stack_2385 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2385 & 42)) - JSCompiler_object_inline_stack_2385 = 1; + JSCompiler_object_inline_digest_2374 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2374) { + JSCompiler_object_inline_stack_2375 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2375 & 42)) + JSCompiler_object_inline_stack_2375 = 1; else - switch (JSCompiler_object_inline_stack_2385) { + switch (JSCompiler_object_inline_stack_2375) { case 2: - JSCompiler_object_inline_stack_2385 = 1; + JSCompiler_object_inline_stack_2375 = 1; break; case 8: - JSCompiler_object_inline_stack_2385 = 4; + JSCompiler_object_inline_stack_2375 = 4; break; case 32: - JSCompiler_object_inline_stack_2385 = 16; + JSCompiler_object_inline_stack_2375 = 16; break; case 128: case 256: @@ -9449,40 +9568,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2385 = 64; + JSCompiler_object_inline_stack_2375 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2385 = 134217728; + JSCompiler_object_inline_stack_2375 = 134217728; break; default: - JSCompiler_object_inline_stack_2385 = 0; + JSCompiler_object_inline_stack_2375 = 0; } - JSCompiler_object_inline_stack_2385 = + JSCompiler_object_inline_stack_2375 = 0 !== - (JSCompiler_object_inline_stack_2385 & - (JSCompiler_object_inline_digest_2384.suspendedLanes | + (JSCompiler_object_inline_stack_2375 & + (JSCompiler_object_inline_digest_2374.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2385; + : JSCompiler_object_inline_stack_2375; if ( - 0 !== JSCompiler_object_inline_stack_2385 && - JSCompiler_object_inline_stack_2385 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2375 && + JSCompiler_object_inline_stack_2375 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2385), + ((prevState.retryLane = JSCompiler_object_inline_stack_2375), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2385 + JSCompiler_object_inline_stack_2375 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2384, + JSCompiler_object_inline_digest_2374, current, - JSCompiler_object_inline_stack_2385 + JSCompiler_object_inline_stack_2375 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2383.data === + JSCompiler_object_inline_message_2373.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9490,14 +9609,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2383.data === + JSCompiler_object_inline_message_2373.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2383.nextSibling + JSCompiler_object_inline_message_2373.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9515,72 +9634,72 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2385.children + JSCompiler_object_inline_stack_2375.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2386) + if (JSCompiler_object_inline_componentStack_2376) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2386 = - JSCompiler_object_inline_stack_2385.fallback), - (JSCompiler_object_inline_message_2383 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2376 = + JSCompiler_object_inline_stack_2375.fallback), + (JSCompiler_object_inline_message_2373 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2385.children + children: JSCompiler_object_inline_stack_2375.children }), - (JSCompiler_object_inline_message_2383 & ConcurrentMode) === NoMode && + (JSCompiler_object_inline_message_2373 & ConcurrentMode) === NoMode && workInProgress.child !== JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2385 = workInProgress.child), - (JSCompiler_object_inline_stack_2385.childLanes = 0), - (JSCompiler_object_inline_stack_2385.pendingProps = + ? ((JSCompiler_object_inline_stack_2375 = workInProgress.child), + (JSCompiler_object_inline_stack_2375.childLanes = 0), + (JSCompiler_object_inline_stack_2375.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2385.actualDuration = -0), - (JSCompiler_object_inline_stack_2385.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2385.selfBaseDuration = + ((JSCompiler_object_inline_stack_2375.actualDuration = -0), + (JSCompiler_object_inline_stack_2375.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2375.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2385.treeBaseDuration = + (JSCompiler_object_inline_stack_2375.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)) - : ((JSCompiler_object_inline_stack_2385 = createWorkInProgress( + : ((JSCompiler_object_inline_stack_2375 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2385.subtreeFlags = + (JSCompiler_object_inline_stack_2375.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)), null !== instance - ? (JSCompiler_object_inline_componentStack_2386 = + ? (JSCompiler_object_inline_componentStack_2376 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2386 + JSCompiler_object_inline_componentStack_2376 )) - : ((JSCompiler_object_inline_componentStack_2386 = + : ((JSCompiler_object_inline_componentStack_2376 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2386, - JSCompiler_object_inline_message_2383, + JSCompiler_object_inline_componentStack_2376, + JSCompiler_object_inline_message_2373, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2386.flags |= 2)), - (JSCompiler_object_inline_componentStack_2386.return = + (JSCompiler_object_inline_componentStack_2376.flags |= 2)), + (JSCompiler_object_inline_componentStack_2376.return = workInProgress), - (JSCompiler_object_inline_stack_2385.return = workInProgress), - (JSCompiler_object_inline_stack_2385.sibling = - JSCompiler_object_inline_componentStack_2386), - (workInProgress.child = JSCompiler_object_inline_stack_2385), - (JSCompiler_object_inline_stack_2385 = - JSCompiler_object_inline_componentStack_2386), - (JSCompiler_object_inline_componentStack_2386 = workInProgress.child), - (JSCompiler_object_inline_message_2383 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2383 - ? (JSCompiler_object_inline_message_2383 = + (JSCompiler_object_inline_stack_2375.return = workInProgress), + (JSCompiler_object_inline_stack_2375.sibling = + JSCompiler_object_inline_componentStack_2376), + (workInProgress.child = JSCompiler_object_inline_stack_2375), + (JSCompiler_object_inline_stack_2375 = + JSCompiler_object_inline_componentStack_2376), + (JSCompiler_object_inline_componentStack_2376 = workInProgress.child), + (JSCompiler_object_inline_message_2373 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2373 + ? (JSCompiler_object_inline_message_2373 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2383.cachePool), + JSCompiler_object_inline_message_2373.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9588,45 +9707,45 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2383 = { + (JSCompiler_object_inline_message_2373 = { baseLanes: - JSCompiler_object_inline_message_2383.baseLanes | renderLanes, + JSCompiler_object_inline_message_2373.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2386.memoizedState = - JSCompiler_object_inline_message_2383), - (JSCompiler_object_inline_componentStack_2386.childLanes = + (JSCompiler_object_inline_componentStack_2376.memoizedState = + JSCompiler_object_inline_message_2373), + (JSCompiler_object_inline_componentStack_2376.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2384, + JSCompiler_object_inline_digest_2374, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2385 + JSCompiler_object_inline_stack_2375 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2384 = current.child; - current = JSCompiler_object_inline_digest_2384.sibling; - JSCompiler_object_inline_digest_2384 = createWorkInProgress( - JSCompiler_object_inline_digest_2384, + JSCompiler_object_inline_digest_2374 = current.child; + current = JSCompiler_object_inline_digest_2374.sibling; + JSCompiler_object_inline_digest_2374 = createWorkInProgress( + JSCompiler_object_inline_digest_2374, { mode: "visible", - children: JSCompiler_object_inline_stack_2385.children + children: JSCompiler_object_inline_stack_2375.children } ); (workInProgress.mode & ConcurrentMode) === NoMode && - (JSCompiler_object_inline_digest_2384.lanes = renderLanes); - JSCompiler_object_inline_digest_2384.return = workInProgress; - JSCompiler_object_inline_digest_2384.sibling = null; + (JSCompiler_object_inline_digest_2374.lanes = renderLanes); + JSCompiler_object_inline_digest_2374.return = workInProgress; + JSCompiler_object_inline_digest_2374.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2384; + workInProgress.child = JSCompiler_object_inline_digest_2374; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2384; + return JSCompiler_object_inline_digest_2374; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -10081,6 +10200,9 @@ __DEV__ && workInProgress.mode, workInProgress.lanes ); + enableOwnerStacks && + ((renderLanes._debugStack = workInProgress._debugStack), + (renderLanes._debugTask = workInProgress._debugTask)); var returnFiber = workInProgress.return; if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; @@ -13982,6 +14104,7 @@ __DEV__ && this.actualStartTime = -1.1; this.treeBaseDuration = this.selfBaseDuration = -0; this._debugOwner = this._debugInfo = null; + enableOwnerStacks && (this._debugTask = this._debugStack = null); this._debugNeedsRemount = !1; this._debugHookTypes = null; hasBadMapPolyfill || @@ -14021,10 +14144,11 @@ __DEV__ && selfBaseDuration: -0, treeBaseDuration: -0, _debugInfo: null, - _debugOwner: null, - _debugNeedsRemount: !1, - _debugHookTypes: null + _debugOwner: null }; + enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null)); + tag._debugNeedsRemount = !1; + tag._debugHookTypes = null; hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(tag); @@ -14047,6 +14171,9 @@ __DEV__ && (workInProgress.type = current.type), (workInProgress.stateNode = current.stateNode), (workInProgress._debugOwner = current._debugOwner), + enableOwnerStacks && + ((workInProgress._debugStack = current._debugStack), + (workInProgress._debugTask = current._debugTask)), (workInProgress._debugHookTypes = current._debugHookTypes), (workInProgress.alternate = current), (current.alternate = workInProgress)) @@ -14266,6 +14393,9 @@ __DEV__ && lanes ); mode._debugOwner = element._owner; + enableOwnerStacks && + ((mode._debugStack = element._debugStack), + (mode._debugTask = element._debugTask)); return mode; } function createFiberFromFragment(elements, mode, lanes, key) { @@ -17102,6 +17232,15 @@ __DEV__ && }); } } + function executeDispatch(event, listener, currentTarget) { + event.currentTarget = currentTarget; + try { + listener(event); + } catch (error$45) { + reportGlobalError(error$45); + } + event.currentTarget = null; + } function processDispatchQueue(dispatchQueue, eventSystemFlags) { eventSystemFlags = 0 !== (eventSystemFlags & 4); for (var i = 0; i < dispatchQueue.length; i++) { @@ -17122,14 +17261,15 @@ __DEV__ && _dispatchListeners$i = _dispatchListeners$i.listener; if (instance !== previousInstance && event.isPropagationStopped()) break a; - previousInstance = event; - previousInstance.currentTarget = currentTarget; - try { - _dispatchListeners$i(previousInstance); - } catch (error$45) { - reportGlobalError(error$45); - } - previousInstance.currentTarget = null; + enableOwnerStacks && null !== instance + ? runWithFiberInDEV( + instance, + executeDispatch, + event, + _dispatchListeners$i, + currentTarget + ) + : executeDispatch(event, _dispatchListeners$i, currentTarget); previousInstance = instance; } else @@ -17144,14 +17284,15 @@ __DEV__ && _dispatchListeners$i = _dispatchListeners$i.listener; if (instance !== previousInstance && event.isPropagationStopped()) break a; - previousInstance = event; - previousInstance.currentTarget = currentTarget; - try { - _dispatchListeners$i(previousInstance); - } catch (error$45) { - reportGlobalError(error$45); - } - previousInstance.currentTarget = null; + enableOwnerStacks && null !== instance + ? runWithFiberInDEV( + instance, + executeDispatch, + event, + _dispatchListeners$i, + currentTarget + ) + : executeDispatch(event, _dispatchListeners$i, currentTarget); previousInstance = instance; } } @@ -22048,6 +22189,7 @@ __DEV__ && enableUseResourceEffectHook = dynamicFlagsUntyped.enableUseResourceEffectHook, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, + enableOwnerStacks = dynamicFlagsUntyped.enableOwnerStacks, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -25855,11 +25997,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-4a8fc0f9-20241210" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-a4964987-20241211" !== 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-native-fb-4a8fc0f9-20241210\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-native-fb-a4964987-20241211\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -25896,10 +26038,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -26359,7 +26501,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; + exports.version = "19.0.0-native-fb-a4964987-20241211"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js index 01a7dc652cd57..1330aa6e1469f 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<50843be80492526f107d37d07948cc75>> + * @generated SignedSource<<799cd17a766ba4dc72d2a89103713d5b>> */ /* @@ -15875,14 +15875,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1732 = React.version; if ( - "19.0.0-native-fb-4a8fc0f9-20241210" !== + "19.0.0-native-fb-a4964987-20241211" !== isomorphicReactPackageVersion$jscomp$inline_1732 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1732, - "19.0.0-native-fb-4a8fc0f9-20241210" + "19.0.0-native-fb-a4964987-20241211" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15904,10 +15904,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2189 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2190 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -16165,4 +16165,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js index 99e86ac9ef630..5bc241a806239 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<58ef98c12ee11305732c4d771d986c86>> + * @generated SignedSource<<9fae79163be59c369c6e474b151f10fc>> */ /* @@ -16532,14 +16532,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1822 = React.version; if ( - "19.0.0-native-fb-4a8fc0f9-20241210" !== + "19.0.0-native-fb-a4964987-20241211" !== isomorphicReactPackageVersion$jscomp$inline_1822 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1822, - "19.0.0-native-fb-4a8fc0f9-20241210" + "19.0.0-native-fb-a4964987-20241211" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16561,10 +16561,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_1829 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210", + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$292 = 0; @@ -16837,7 +16837,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js index 312f2f212e5c3..3438bceb2c333 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7829c2e106954a9f419bad044c2b6711>> + * @generated SignedSource<<52c078def669a7c6310c7cfa547a409c>> */ "use strict"; @@ -15552,10 +15552,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15700,5 +15700,5 @@ __DEV__ && flushSyncWorkAcrossRoots_impl(0, !0)); } }; - exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; + exports.version = "19.0.0-native-fb-a4964987-20241211"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js index 27ef360819e4d..c30b88c528bc5 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -9718,10 +9718,10 @@ function wrapFiber(fiber) { } var internals$jscomp$inline_1390 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1391 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -9857,4 +9857,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 985e5b27b2c4f..8f64d3d812e5d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<11b06c50d3e6d12238450b3cf2c0af54>> + * @generated SignedSource<<4eaef37f212c41f0d85556a74102134a>> */ "use strict"; @@ -10287,10 +10287,10 @@ function wrapFiber(fiber) { } var internals$jscomp$inline_1203 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210", + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$146 = 0; @@ -10441,4 +10441,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/JSXDEVRuntime-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/JSXDEVRuntime-dev.js index 090631b3c0f3a..51a5104d9ad7f 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/JSXDEVRuntime-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/JSXDEVRuntime-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<4eebeb25e9593b7ff9c90aaff1b06eb0>> + * @generated SignedSource<<72b895ad61fca7b76f9143c7f09a0d56>> */ "use strict"; @@ -360,6 +360,21 @@ __DEV__ && } return ""; } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ( + "object" === typeof type && + null !== type && + type.$$typeof === REACT_LAZY_TYPE + ) + return "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } function getOwner() { var dispatcher = ReactSharedInternals.A; return null === dispatcher ? null : dispatcher.getOwner(); @@ -396,7 +411,16 @@ __DEV__ && componentName = this.props.ref; return void 0 !== componentName ? componentName : null; } - function ReactElement(type, key, self, source, owner, props) { + function ReactElement( + type, + key, + self, + source, + owner, + props, + debugStack, + debugTask + ) { self = props.ref; type = { $$typeof: REACT_ELEMENT_TYPE, @@ -424,6 +448,19 @@ __DEV__ && writable: !0, value: null }); + enableOwnerStacks && + (Object.defineProperty(type, "_debugStack", { + configurable: !1, + enumerable: !1, + writable: !0, + value: debugStack + }), + Object.defineProperty(type, "_debugTask", { + configurable: !1, + enumerable: !1, + writable: !0, + value: debugTask + })); Object.freeze && (Object.freeze(type.props), Object.freeze(type)); return type; } @@ -433,9 +470,12 @@ __DEV__ && maybeKey, isStaticChildren, source, - self + self, + debugStack, + debugTask ) { if ( + enableOwnerStacks || "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || @@ -536,10 +576,21 @@ __DEV__ && ? type.displayName || type.name || "Unknown" : type ); - return ReactElement(type, children, self, source, getOwner(), maybeKey); + return ReactElement( + type, + children, + self, + source, + getOwner(), + maybeKey, + debugStack, + debugTask + ); } function validateChildKeys(node, parentType) { - if ( + if (enableOwnerStacks) + isValidElement(node) && node._store && (node._store.validated = 1); + else if ( "object" === typeof node && node && node.$$typeof !== REACT_CLIENT_REFERENCE @@ -575,6 +626,7 @@ __DEV__ && } function validateExplicitKey(element, parentType) { if ( + !enableOwnerStacks && element._store && !element._store.validated && null == element.key && @@ -620,6 +672,8 @@ __DEV__ && return info; } var React = require("react"), + enableOwnerStacks = + require("ReactNativeInternalFeatureFlags").enableOwnerStacks, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -658,6 +712,12 @@ __DEV__ && "function" === typeof WeakMap ? WeakMap : Map )(); var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), + createTask = + enableOwnerStacks && console.createTask + ? console.createTask + : function () { + return null; + }, specialPropKeyWarningShown; var didWarnAboutElementRef = {}; var didWarnAboutKeySpread = {}, @@ -671,6 +731,15 @@ __DEV__ && source, self ) { - return jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self); + return jsxDEVImpl( + type, + config, + maybeKey, + isStaticChildren, + source, + self, + enableOwnerStacks ? Error("react-stack-top-frame") : void 0, + enableOwnerStacks ? createTask(getTaskName(type)) : void 0 + ); }; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/JSXRuntime-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/JSXRuntime-dev.js index 79bf891586618..57e91384cd284 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/JSXRuntime-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/JSXRuntime-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<1e222e3d7bcc540b6e36536a0d3e4ba1>> + * @generated SignedSource<> */ "use strict"; @@ -360,6 +360,21 @@ __DEV__ && } return ""; } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ( + "object" === typeof type && + null !== type && + type.$$typeof === REACT_LAZY_TYPE + ) + return "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } function getOwner() { var dispatcher = ReactSharedInternals.A; return null === dispatcher ? null : dispatcher.getOwner(); @@ -396,7 +411,16 @@ __DEV__ && componentName = this.props.ref; return void 0 !== componentName ? componentName : null; } - function ReactElement(type, key, self, source, owner, props) { + function ReactElement( + type, + key, + self, + source, + owner, + props, + debugStack, + debugTask + ) { self = props.ref; type = { $$typeof: REACT_ELEMENT_TYPE, @@ -424,6 +448,19 @@ __DEV__ && writable: !0, value: null }); + enableOwnerStacks && + (Object.defineProperty(type, "_debugStack", { + configurable: !1, + enumerable: !1, + writable: !0, + value: debugStack + }), + Object.defineProperty(type, "_debugTask", { + configurable: !1, + enumerable: !1, + writable: !0, + value: debugTask + })); Object.freeze && (Object.freeze(type.props), Object.freeze(type)); return type; } @@ -433,9 +470,12 @@ __DEV__ && maybeKey, isStaticChildren, source, - self + self, + debugStack, + debugTask ) { if ( + enableOwnerStacks || "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || @@ -536,10 +576,21 @@ __DEV__ && ? type.displayName || type.name || "Unknown" : type ); - return ReactElement(type, children, self, source, getOwner(), maybeKey); + return ReactElement( + type, + children, + self, + source, + getOwner(), + maybeKey, + debugStack, + debugTask + ); } function validateChildKeys(node, parentType) { - if ( + if (enableOwnerStacks) + isValidElement(node) && node._store && (node._store.validated = 1); + else if ( "object" === typeof node && node && node.$$typeof !== REACT_CLIENT_REFERENCE @@ -575,6 +626,7 @@ __DEV__ && } function validateExplicitKey(element, parentType) { if ( + !enableOwnerStacks && element._store && !element._store.validated && null == element.key && @@ -620,6 +672,8 @@ __DEV__ && return info; } var React = require("react"), + enableOwnerStacks = + require("ReactNativeInternalFeatureFlags").enableOwnerStacks, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -658,15 +712,39 @@ __DEV__ && "function" === typeof WeakMap ? WeakMap : Map )(); var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), + createTask = + enableOwnerStacks && console.createTask + ? console.createTask + : function () { + return null; + }, specialPropKeyWarningShown; var didWarnAboutElementRef = {}; var didWarnAboutKeySpread = {}, ownerHasKeyUseWarning = {}; exports.Fragment = REACT_FRAGMENT_TYPE; exports.jsx = function (type, config, maybeKey, source, self) { - return jsxDEVImpl(type, config, maybeKey, !1, source, self); + return jsxDEVImpl( + type, + config, + maybeKey, + !1, + source, + self, + enableOwnerStacks ? Error("react-stack-top-frame") : void 0, + enableOwnerStacks ? createTask(getTaskName(type)) : void 0 + ); }; exports.jsxs = function (type, config, maybeKey, source, self) { - return jsxDEVImpl(type, config, maybeKey, !0, source, self); + return jsxDEVImpl( + type, + config, + maybeKey, + !0, + source, + self, + enableOwnerStacks ? Error("react-stack-top-frame") : void 0, + enableOwnerStacks ? createTask(getTaskName(type)) : void 0 + ); }; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js index 69f5407a55eb3..80eadd8785adb 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<2fab6f739245df51df6050aa2b038652>> + * @generated SignedSource<<60df82b3966669aab6337cf936b38760>> */ "use strict"; @@ -441,6 +441,21 @@ __DEV__ && } return ""; } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ( + "object" === typeof type && + null !== type && + type.$$typeof === REACT_LAZY_TYPE + ) + return "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } function getOwner() { var dispatcher = ReactSharedInternals.A; return null === dispatcher ? null : dispatcher.getOwner(); @@ -477,7 +492,16 @@ __DEV__ && componentName = this.props.ref; return void 0 !== componentName ? componentName : null; } - function ReactElement(type, key, self, source, owner, props) { + function ReactElement( + type, + key, + self, + source, + owner, + props, + debugStack, + debugTask + ) { self = props.ref; type = { $$typeof: REACT_ELEMENT_TYPE, @@ -505,6 +529,19 @@ __DEV__ && writable: !0, value: null }); + enableOwnerStacks && + (Object.defineProperty(type, "_debugStack", { + configurable: !1, + enumerable: !1, + writable: !0, + value: debugStack + }), + Object.defineProperty(type, "_debugTask", { + configurable: !1, + enumerable: !1, + writable: !0, + value: debugTask + })); Object.freeze && (Object.freeze(type.props), Object.freeze(type)); return type; } @@ -514,9 +551,11 @@ __DEV__ && maybeKey, isStaticChildren, source, - self + self, + debugStack, + debugTask ) { - if (isValidElementType(type)) { + if (enableOwnerStacks || isValidElementType(type)) { var children = config.children; if (void 0 !== children) if (isStaticChildren) @@ -599,7 +638,16 @@ __DEV__ && ? type.displayName || type.name || "Unknown" : type ); - return ReactElement(type, children, self, source, getOwner(), maybeKey); + return ReactElement( + type, + children, + self, + source, + getOwner(), + maybeKey, + debugStack, + debugTask + ); } function cloneAndReplaceKey(oldElement, newKey) { newKey = ReactElement( @@ -608,13 +656,17 @@ __DEV__ && void 0, void 0, oldElement._owner, - oldElement.props + oldElement.props, + enableOwnerStacks ? oldElement._debugStack : void 0, + enableOwnerStacks ? oldElement._debugTask : void 0 ); newKey._store.validated = oldElement._store.validated; return newKey; } function validateChildKeys(node, parentType) { - if ( + if (enableOwnerStacks) + isValidElement(node) && node._store && (node._store.validated = 1); + else if ( "object" === typeof node && node && node.$$typeof !== REACT_CLIENT_REFERENCE @@ -645,6 +697,7 @@ __DEV__ && } function validateExplicitKey(element, parentType) { if ( + !enableOwnerStacks && element._store && !element._store.validated && null == element.key && @@ -1021,12 +1074,18 @@ __DEV__ && } } } + function captureOwnerStack() { + if (!enableOwnerStacks) return null; + var getCurrentStack = ReactSharedInternals.getCurrentStack; + return null === getCurrentStack ? null : getCurrentStack(); + } "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); - var enableUseResourceEffectHook = - require("ReactNativeInternalFeatureFlags").enableUseResourceEffectHook, + var dynamicFlags = require("ReactNativeInternalFeatureFlags"), + enableUseResourceEffectHook = dynamicFlags.enableUseResourceEffectHook, + enableOwnerStacks = dynamicFlags.enableOwnerStacks, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -1131,6 +1190,12 @@ __DEV__ && "function" === typeof WeakMap ? WeakMap : Map )(); var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), + createTask = + enableOwnerStacks && console.createTask + ? console.createTask + : function () { + return null; + }, specialPropKeyWarningShown, didWarnAboutOldJSXRuntime; var didWarnAboutElementRef = {}; @@ -1181,42 +1246,45 @@ __DEV__ && } : enqueueTask, ReactCompilerRuntime = { c: useMemoCache }, + Children = { + map: mapChildren, + forEach: function (children, forEachFunc, forEachContext) { + mapChildren( + children, + function () { + forEachFunc.apply(this, arguments); + }, + forEachContext + ); + }, + count: function (children) { + var n = 0; + mapChildren(children, function () { + n++; + }); + return n; + }, + toArray: function (children) { + return ( + mapChildren(children, function (child) { + return child; + }) || [] + ); + }, + only: function (children) { + if (!isValidElement(children)) + throw Error( + "React.Children.only expected to receive a single React element child." + ); + return children; + } + }, experimental_useResourceEffect = enableUseResourceEffectHook ? useResourceEffect : void 0; - exports.Children = { - map: mapChildren, - forEach: function (children, forEachFunc, forEachContext) { - mapChildren( - children, - function () { - forEachFunc.apply(this, arguments); - }, - forEachContext - ); - }, - count: function (children) { - var n = 0; - mapChildren(children, function () { - n++; - }); - return n; - }, - toArray: function (children) { - return ( - mapChildren(children, function (child) { - return child; - }) || [] - ); - }, - only: function (children) { - if (!isValidElement(children)) - throw Error( - "React.Children.only expected to receive a single React element child." - ); - return children; - } - }; + exports.captureOwnerStack = void 0; + enableOwnerStacks && (exports.captureOwnerStack = captureOwnerStack); + exports.Children = Children; exports.Component = Component; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; @@ -1398,7 +1466,16 @@ __DEV__ && JSCompiler_inline_result[i] = arguments[i + 2]; props.children = JSCompiler_inline_result; } - props = ReactElement(element.type, key, void 0, void 0, owner, props); + props = ReactElement( + element.type, + key, + void 0, + void 0, + owner, + props, + enableOwnerStacks ? element._debugStack : void 0, + enableOwnerStacks ? element._debugTask : void 0 + ); for (key = 2; key < arguments.length; key++) validateChildKeys(arguments[key], props.type); return props; @@ -1422,7 +1499,7 @@ __DEV__ && return defaultValue; }; exports.createElement = function (type, config, children) { - if (isValidElementType(type)) + if (enableOwnerStacks || isValidElementType(type)) for (var i = 2; i < arguments.length; i++) validateChildKeys(arguments[i], type); else { @@ -1494,7 +1571,16 @@ __DEV__ && ? type.displayName || type.name || "Unknown" : type ); - return ReactElement(type, typeString, void 0, void 0, getOwner(), i); + return ReactElement( + type, + typeString, + void 0, + void 0, + getOwner(), + i, + enableOwnerStacks ? Error("react-stack-top-frame") : void 0, + enableOwnerStacks ? createTask(getTaskName(type)) : void 0 + ); }; exports.createRef = function () { var refObject = { current: null }; @@ -1548,7 +1634,16 @@ __DEV__ && }; exports.isValidElement = isValidElement; exports.jsx = function (type, config, maybeKey, source, self) { - return jsxDEVImpl(type, config, maybeKey, !1, source, self); + return jsxDEVImpl( + type, + config, + maybeKey, + !1, + source, + self, + enableOwnerStacks ? Error("react-stack-top-frame") : void 0, + enableOwnerStacks ? createTask(getTaskName(type)) : void 0 + ); }; exports.jsxDEV = function ( type, @@ -1558,10 +1653,28 @@ __DEV__ && source, self ) { - return jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self); + return jsxDEVImpl( + type, + config, + maybeKey, + isStaticChildren, + source, + self, + enableOwnerStacks ? Error("react-stack-top-frame") : void 0, + enableOwnerStacks ? createTask(getTaskName(type)) : void 0 + ); }; exports.jsxs = function (type, config, maybeKey, source, self) { - return jsxDEVImpl(type, config, maybeKey, !0, source, self); + return jsxDEVImpl( + type, + config, + maybeKey, + !0, + source, + self, + enableOwnerStacks ? Error("react-stack-top-frame") : void 0, + enableOwnerStacks ? createTask(getTaskName(type)) : void 0 + ); }; exports.lazy = function (ctor) { return { @@ -1716,7 +1829,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; + exports.version = "19.0.0-native-fb-a4964987-20241211"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js index 3ecfc329592d9..a4b85c8335650 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7419ab82daa4515fa30268074ac42ab9>> + * @generated SignedSource<<3c7f29f6780bfb93af85a89083a4e534>> */ "use strict"; @@ -405,6 +405,7 @@ exports.cache = function (fn) { return fn.apply(null, arguments); }; }; +exports.captureOwnerStack = void 0; exports.cloneElement = function (element, config, children) { if (null === element || void 0 === element) throw Error( @@ -596,4 +597,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js index ac060dd2173d7..84c6146ea8f40 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -409,6 +409,7 @@ exports.cache = function (fn) { return fn.apply(null, arguments); }; }; +exports.captureOwnerStack = void 0; exports.cloneElement = function (element, config, children) { if (null === element || void 0 === element) throw Error( @@ -600,7 +601,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-4a8fc0f9-20241210"; +exports.version = "19.0.0-native-fb-a4964987-20241211"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index 115784112b4a6..c827e8097c2f5 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -4a8fc0f92e0f75257962522b51a938bf4dfda77a +a4964987dc140526702e996223fe7ee293def8ac diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 2b7605d99fe56..0ed2688a943f5 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<4c06b816ea6cab18df01b17b4b4d41b8>> + * @generated SignedSource<> */ "use strict"; @@ -381,6 +381,27 @@ __DEV__ && "function" === typeof fn && componentFrameCache.set(fn, sampleLines); return sampleLines; } + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; + } function describeFiber(fiber) { switch (fiber.tag) { case 26: @@ -431,6 +452,65 @@ __DEV__ && return "\nError generating stack: " + x.message + "\n" + x.stack; } } + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; + } + function getOwnerStackByFiberInDev(workInProgress) { + if (!enableOwnerStacks) return ""; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); + } + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + workInProgress && + debugStack && + ("string" !== typeof debugStack && + (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), + "" !== debugStack && (info += "\n" + debugStack)); + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } function getComponentNameFromType(type) { if (null == type) return null; if ("function" === typeof type) @@ -554,7 +634,11 @@ __DEV__ && return null; } function getCurrentFiberStackInDev() { - return null === current ? "" : getStackByFiberInDevAndProd(current); + return null === current + ? "" + : enableOwnerStacks + ? getOwnerStackByFiberInDev(current) + : getStackByFiberInDevAndProd(current); } function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { var previousFiber = current; @@ -563,7 +647,11 @@ __DEV__ && isRendering = !1; current = fiber; try { - return callback(arg0, arg1, arg2, arg3, arg4); + return enableOwnerStacks && null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); } finally { current = previousFiber; } @@ -1351,11 +1439,30 @@ __DEV__ && var i = 0; i < dispatchListeners.length && !e.isPropagationStopped(); i++ - ) - executeDispatch(e, dispatchListeners[i], dispatchInstances[i]); + ) { + var listener = dispatchListeners[i], + instance = dispatchInstances[i]; + enableOwnerStacks && null !== instance + ? runWithFiberInDEV( + instance, + executeDispatch, + e, + listener, + instance + ) + : executeDispatch(e, listener, instance); + } else dispatchListeners && - executeDispatch(e, dispatchListeners, dispatchInstances); + (enableOwnerStacks && null !== dispatchInstances + ? runWithFiberInDEV( + dispatchInstances, + executeDispatch, + e, + dispatchListeners, + dispatchInstances + ) + : executeDispatch(e, dispatchListeners, dispatchInstances)); e._dispatchListeners = null; e._dispatchInstances = null; e.isPersistent() || e.constructor.release(e); @@ -5220,6 +5327,7 @@ __DEV__ && )), (current.return = returnFiber), (current._debugOwner = returnFiber), + enableOwnerStacks && (current._debugTask = returnFiber._debugTask), (current._debugInfo = currentDebugInfo), current ); @@ -5294,6 +5402,7 @@ __DEV__ && )), (current.return = returnFiber), (current._debugOwner = returnFiber), + enableOwnerStacks && (current._debugTask = returnFiber._debugTask), (current._debugInfo = currentDebugInfo), current ); @@ -5316,6 +5425,7 @@ __DEV__ && )), (newChild.return = returnFiber), (newChild._debugOwner = returnFiber), + enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask), (newChild._debugInfo = currentDebugInfo), newChild ); @@ -5363,6 +5473,7 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask), (returnFiber = pushDebugInfo(newChild._debugInfo)), (lanes._debugInfo = currentDebugInfo), (currentDebugInfo = returnFiber), @@ -5892,6 +6003,8 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && + (lanes._debugTask = returnFiber._debugTask), (lanes._debugInfo = currentDebugInfo), validateFragmentProps(newChild, lanes, returnFiber), (returnFiber = lanes)) @@ -6058,6 +6171,8 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && + (lanes._debugTask = returnFiber._debugTask), (lanes._debugInfo = currentDebugInfo), (returnFiber = lanes)), placeSingleChild(returnFiber) @@ -6095,10 +6210,13 @@ __DEV__ && fiber.return = returnFiber; var debugInfo = (fiber._debugInfo = currentDebugInfo); fiber._debugOwner = returnFiber._debugOwner; + enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask); if (null != debugInfo) for (var i = debugInfo.length - 1; 0 <= i; i--) if ("string" === typeof debugInfo[i].stack) { fiber._debugOwner = debugInfo[i]; + enableOwnerStacks && + (fiber._debugTask = debugInfo[i].debugTask); break; } return fiber; @@ -6619,12 +6737,14 @@ __DEV__ && error = componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components."; - var prevGetCurrentStack = ReactSharedInternals.getCurrentStack, - componentStack = + var prevGetCurrentStack = ReactSharedInternals.getCurrentStack; + if (!enableOwnerStacks) { + var componentStack = null != errorInfo.componentStack ? errorInfo.componentStack : ""; - ReactSharedInternals.getCurrentStack = function () { - return componentStack; - }; + ReactSharedInternals.getCurrentStack = function () { + return componentStack; + }; + } try { warn( "%s\n\n%s\n", @@ -6632,7 +6752,8 @@ __DEV__ && "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries." ); } finally { - ReactSharedInternals.getCurrentStack = prevGetCurrentStack; + enableOwnerStacks || + (ReactSharedInternals.getCurrentStack = prevGetCurrentStack); } } function defaultOnCaughtError(error$1, errorInfo) { @@ -6642,12 +6763,14 @@ __DEV__ && recreateMessage = "React will try to recreate this component tree from scratch using the error boundary you provided, " + ((errorBoundaryName || "Anonymous") + "."), - prevGetCurrentStack = ReactSharedInternals.getCurrentStack, - componentStack = + prevGetCurrentStack = ReactSharedInternals.getCurrentStack; + if (!enableOwnerStacks) { + var componentStack = null != errorInfo.componentStack ? errorInfo.componentStack : ""; - ReactSharedInternals.getCurrentStack = function () { - return componentStack; - }; + ReactSharedInternals.getCurrentStack = function () { + return componentStack; + }; + } try { "object" === typeof error$1 && null !== error$1 && @@ -6669,7 +6792,8 @@ __DEV__ && recreateMessage ); } finally { - ReactSharedInternals.getCurrentStack = prevGetCurrentStack; + enableOwnerStacks || + (ReactSharedInternals.getCurrentStack = prevGetCurrentStack); } } function defaultOnRecoverableError(error) { @@ -8422,6 +8546,9 @@ __DEV__ && workInProgress.mode, workInProgress.lanes ); + enableOwnerStacks && + ((renderLanes._debugStack = workInProgress._debugStack), + (renderLanes._debugTask = workInProgress._debugTask)); var returnFiber = workInProgress.return; if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; @@ -13613,6 +13740,7 @@ __DEV__ && this.actualStartTime = -1.1; this.treeBaseDuration = this.selfBaseDuration = -0; this._debugOwner = this._debugInfo = null; + enableOwnerStacks && (this._debugTask = this._debugStack = null); this._debugNeedsRemount = !1; this._debugHookTypes = null; hasBadMapPolyfill || @@ -13652,10 +13780,11 @@ __DEV__ && selfBaseDuration: -0, treeBaseDuration: -0, _debugInfo: null, - _debugOwner: null, - _debugNeedsRemount: !1, - _debugHookTypes: null + _debugOwner: null }; + enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null)); + tag._debugNeedsRemount = !1; + tag._debugHookTypes = null; hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(tag); @@ -13678,6 +13807,9 @@ __DEV__ && (workInProgress.type = current.type), (workInProgress.stateNode = current.stateNode), (workInProgress._debugOwner = current._debugOwner), + enableOwnerStacks && + ((workInProgress._debugStack = current._debugStack), + (workInProgress._debugTask = current._debugTask)), (workInProgress._debugHookTypes = current._debugHookTypes), (workInProgress.alternate = current), (current.alternate = workInProgress)) @@ -13898,6 +14030,9 @@ __DEV__ && lanes ); mode._debugOwner = element._owner; + enableOwnerStacks && + ((mode._debugStack = element._debugStack), + (mode._debugTask = element._debugTask)); return mode; } function createFiberFromFragment(elements, mode, lanes, key) { @@ -14444,8 +14579,8 @@ __DEV__ && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore"); var React = require("react"), - ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"), dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), + ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"), Scheduler = require("scheduler"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, @@ -14465,6 +14600,7 @@ __DEV__ && passChildrenWhenCloningPersistedNodes = dynamicFlagsUntyped.passChildrenWhenCloningPersistedNodes, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, + enableOwnerStacks = dynamicFlagsUntyped.enableOwnerStacks, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -17379,10 +17515,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 042f370d0717a..12c779ef26159 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<2199e4fe10d8ec0ad8d7fe974eba84f6>> + * @generated SignedSource<<209c24b522a056c50751a103a7ccd7a6>> */ "use strict"; @@ -11101,10 +11101,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1219 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1219.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index b3f748403f1b5..c6ecac0e8a732 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<9dc23a104f2cd8f3ca1198fddc9d18d5>> */ "use strict"; @@ -11758,10 +11758,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1307 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1307.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 63a166850ab8b..83162f19548bc 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<1a0f6e85f63c5a4b188b01b5808c9b98>> */ "use strict"; @@ -376,6 +376,27 @@ __DEV__ && "function" === typeof fn && componentFrameCache.set(fn, sampleLines); return sampleLines; } + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; + } function describeFiber(fiber) { switch (fiber.tag) { case 26: @@ -426,6 +447,65 @@ __DEV__ && return "\nError generating stack: " + x.message + "\n" + x.stack; } } + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; + } + function getOwnerStackByFiberInDev(workInProgress) { + if (!enableOwnerStacks) return ""; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); + } + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + workInProgress && + debugStack && + ("string" !== typeof debugStack && + (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), + "" !== debugStack && (info += "\n" + debugStack)); + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } function getComponentNameFromType(type) { if (null == type) return null; if ("function" === typeof type) @@ -549,7 +629,11 @@ __DEV__ && return null; } function getCurrentFiberStackInDev() { - return null === current ? "" : getStackByFiberInDevAndProd(current); + return null === current + ? "" + : enableOwnerStacks + ? getOwnerStackByFiberInDev(current) + : getStackByFiberInDevAndProd(current); } function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { var previousFiber = current; @@ -558,7 +642,11 @@ __DEV__ && isRendering = !1; current = fiber; try { - return callback(arg0, arg1, arg2, arg3, arg4); + return enableOwnerStacks && null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); } finally { current = previousFiber; } @@ -1086,11 +1174,30 @@ __DEV__ && var i = 0; i < dispatchListeners.length && !e.isPropagationStopped(); i++ - ) - executeDispatch(e, dispatchListeners[i], dispatchInstances[i]); + ) { + var listener = dispatchListeners[i], + instance = dispatchInstances[i]; + enableOwnerStacks && null !== instance + ? runWithFiberInDEV( + instance, + executeDispatch, + e, + listener, + instance + ) + : executeDispatch(e, listener, instance); + } else dispatchListeners && - executeDispatch(e, dispatchListeners, dispatchInstances); + (enableOwnerStacks && null !== dispatchInstances + ? runWithFiberInDEV( + dispatchInstances, + executeDispatch, + e, + dispatchListeners, + dispatchInstances + ) + : executeDispatch(e, dispatchListeners, dispatchInstances)); e._dispatchListeners = null; e._dispatchInstances = null; e.isPersistent() || e.constructor.release(e); @@ -5449,6 +5556,7 @@ __DEV__ && )), (current.return = returnFiber), (current._debugOwner = returnFiber), + enableOwnerStacks && (current._debugTask = returnFiber._debugTask), (current._debugInfo = currentDebugInfo), current ); @@ -5523,6 +5631,7 @@ __DEV__ && )), (current.return = returnFiber), (current._debugOwner = returnFiber), + enableOwnerStacks && (current._debugTask = returnFiber._debugTask), (current._debugInfo = currentDebugInfo), current ); @@ -5545,6 +5654,7 @@ __DEV__ && )), (newChild.return = returnFiber), (newChild._debugOwner = returnFiber), + enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask), (newChild._debugInfo = currentDebugInfo), newChild ); @@ -5592,6 +5702,7 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask), (returnFiber = pushDebugInfo(newChild._debugInfo)), (lanes._debugInfo = currentDebugInfo), (currentDebugInfo = returnFiber), @@ -6121,6 +6232,8 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && + (lanes._debugTask = returnFiber._debugTask), (lanes._debugInfo = currentDebugInfo), validateFragmentProps(newChild, lanes, returnFiber), (returnFiber = lanes)) @@ -6287,6 +6400,8 @@ __DEV__ && )), (lanes.return = returnFiber), (lanes._debugOwner = returnFiber), + enableOwnerStacks && + (lanes._debugTask = returnFiber._debugTask), (lanes._debugInfo = currentDebugInfo), (returnFiber = lanes)), placeSingleChild(returnFiber) @@ -6324,10 +6439,13 @@ __DEV__ && fiber.return = returnFiber; var debugInfo = (fiber._debugInfo = currentDebugInfo); fiber._debugOwner = returnFiber._debugOwner; + enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask); if (null != debugInfo) for (var i = debugInfo.length - 1; 0 <= i; i--) if ("string" === typeof debugInfo[i].stack) { fiber._debugOwner = debugInfo[i]; + enableOwnerStacks && + (fiber._debugTask = debugInfo[i].debugTask); break; } return fiber; @@ -6848,12 +6966,14 @@ __DEV__ && error = componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components."; - var prevGetCurrentStack = ReactSharedInternals.getCurrentStack, - componentStack = + var prevGetCurrentStack = ReactSharedInternals.getCurrentStack; + if (!enableOwnerStacks) { + var componentStack = null != errorInfo.componentStack ? errorInfo.componentStack : ""; - ReactSharedInternals.getCurrentStack = function () { - return componentStack; - }; + ReactSharedInternals.getCurrentStack = function () { + return componentStack; + }; + } try { warn( "%s\n\n%s\n", @@ -6861,7 +6981,8 @@ __DEV__ && "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries." ); } finally { - ReactSharedInternals.getCurrentStack = prevGetCurrentStack; + enableOwnerStacks || + (ReactSharedInternals.getCurrentStack = prevGetCurrentStack); } } function defaultOnCaughtError(error$1, errorInfo) { @@ -6871,12 +6992,14 @@ __DEV__ && recreateMessage = "React will try to recreate this component tree from scratch using the error boundary you provided, " + ((errorBoundaryName || "Anonymous") + "."), - prevGetCurrentStack = ReactSharedInternals.getCurrentStack, - componentStack = + prevGetCurrentStack = ReactSharedInternals.getCurrentStack; + if (!enableOwnerStacks) { + var componentStack = null != errorInfo.componentStack ? errorInfo.componentStack : ""; - ReactSharedInternals.getCurrentStack = function () { - return componentStack; - }; + ReactSharedInternals.getCurrentStack = function () { + return componentStack; + }; + } try { "object" === typeof error$1 && null !== error$1 && @@ -6898,7 +7021,8 @@ __DEV__ && recreateMessage ); } finally { - ReactSharedInternals.getCurrentStack = prevGetCurrentStack; + enableOwnerStacks || + (ReactSharedInternals.getCurrentStack = prevGetCurrentStack); } } function defaultOnRecoverableError(error) { @@ -8651,6 +8775,9 @@ __DEV__ && workInProgress.mode, workInProgress.lanes ); + enableOwnerStacks && + ((renderLanes._debugStack = workInProgress._debugStack), + (renderLanes._debugTask = workInProgress._debugTask)); var returnFiber = workInProgress.return; if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; @@ -13972,6 +14099,7 @@ __DEV__ && this.actualStartTime = -1.1; this.treeBaseDuration = this.selfBaseDuration = -0; this._debugOwner = this._debugInfo = null; + enableOwnerStacks && (this._debugTask = this._debugStack = null); this._debugNeedsRemount = !1; this._debugHookTypes = null; hasBadMapPolyfill || @@ -14011,10 +14139,11 @@ __DEV__ && selfBaseDuration: -0, treeBaseDuration: -0, _debugInfo: null, - _debugOwner: null, - _debugNeedsRemount: !1, - _debugHookTypes: null + _debugOwner: null }; + enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null)); + tag._debugNeedsRemount = !1; + tag._debugHookTypes = null; hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(tag); @@ -14037,6 +14166,9 @@ __DEV__ && (workInProgress.type = current.type), (workInProgress.stateNode = current.stateNode), (workInProgress._debugOwner = current._debugOwner), + enableOwnerStacks && + ((workInProgress._debugStack = current._debugStack), + (workInProgress._debugTask = current._debugTask)), (workInProgress._debugHookTypes = current._debugHookTypes), (workInProgress.alternate = current), (current.alternate = workInProgress)) @@ -14257,6 +14389,9 @@ __DEV__ && lanes ); mode._debugOwner = element._owner; + enableOwnerStacks && + ((mode._debugStack = element._debugStack), + (mode._debugTask = element._debugTask)); return mode; } function createFiberFromFragment(elements, mode, lanes, key) { @@ -14600,8 +14735,8 @@ __DEV__ && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore"); var React = require("react"), - ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"), dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), + ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"), Scheduler = require("scheduler"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, @@ -14616,6 +14751,7 @@ __DEV__ && enableUseResourceEffectHook = dynamicFlagsUntyped.enableUseResourceEffectHook, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, + enableOwnerStacks = dynamicFlagsUntyped.enableOwnerStacks, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -17602,11 +17738,11 @@ __DEV__ && shouldSuspendImpl = newShouldSuspendImpl; }; var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-4a8fc0f9-20241210" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-a4964987-20241211" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-4a8fc0f9-20241210\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-a4964987-20241211\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -17632,10 +17768,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index c9fc8928711ba..7540f15019260 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<5a5ffa8618903ab045d6cd39d7a04512>> */ "use strict"; @@ -11233,11 +11233,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-native-fb-4a8fc0f9-20241210" !== isomorphicReactPackageVersion) +if ("19.0.0-native-fb-a4964987-20241211" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-4a8fc0f9-20241210\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-a4964987-20241211\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11286,10 +11286,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1285 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1285.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 14b14f5823686..2abc9dccbb64e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<32013ae7aee7fd1a37afed15c77558bb>> */ "use strict"; @@ -11889,11 +11889,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-native-fb-4a8fc0f9-20241210" !== isomorphicReactPackageVersion) +if ("19.0.0-native-fb-a4964987-20241211" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-4a8fc0f9-20241210\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-a4964987-20241211\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11942,10 +11942,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1373 = { bundleType: 0, - version: "19.0.0-native-fb-4a8fc0f9-20241210", + version: "19.0.0-native-fb-a4964987-20241211", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.0.0-native-fb-4a8fc0f9-20241210" + reconcilerVersion: "19.0.0-native-fb-a4964987-20241211" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1373.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/shims/ReactNativeTypes.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/shims/ReactNativeTypes.js index 26ab3007d020b..85d273893178b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/shims/ReactNativeTypes.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/shims/ReactNativeTypes.js @@ -7,7 +7,7 @@ * @noformat * @nolint * @flow strict - * @generated SignedSource<<9cf3e28d6ca0299bc0bb5caa75b19556>> + * @generated SignedSource<> */ import type {ElementRef, ElementType, MixedElement} from 'react'; @@ -133,9 +133,10 @@ declare const ensureNativeMethodsAreSynced: NativeMethods; (ensureNativeMethodsAreSynced: INativeMethods); export type HostInstance = NativeMethods; -/*:: -export type HostComponent = component(ref: React$RefSetter, ...Config); -*/ +export type HostComponent = component( + ref: React$RefSetter, + ...Config +); type InspectorDataProps = $ReadOnly<{ [propName: string]: string, @@ -206,9 +207,7 @@ export type ReactNativeType = { componentOrHandle: ?(ElementRef | number), ): ?number, isChildPublicInstance( - // eslint-disable-next-line no-undef parent: PublicInstance | HostComponent, - // eslint-disable-next-line no-undef child: PublicInstance | HostComponent, ): boolean, dispatchCommand(