From db36607fa1d9632b55222d88999b63051cf974e2 Mon Sep 17 00:00:00 2001 From: kassens Date: Thu, 7 Nov 2024 06:12:29 -0800 Subject: [PATCH] [www] set disableLegacyMode to true (#31439) DiffTrain build for [682a103cde99a3091850d1c27de8846b5d14e803](https://github.com/facebook/react/commit/682a103cde99a3091850d1c27de8846b5d14e803) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/REVISION_TRANSFORMS | 2 +- compiled/facebook-www/React-dev.classic.js | 27 +- compiled/facebook-www/React-dev.modern.js | 2 +- compiled/facebook-www/React-prod.classic.js | 2 +- compiled/facebook-www/React-prod.modern.js | 2 +- .../facebook-www/React-profiling.classic.js | 2 +- .../facebook-www/React-profiling.modern.js | 2 +- compiled/facebook-www/ReactART-dev.classic.js | 1980 +++++------ compiled/facebook-www/ReactART-dev.modern.js | 6 +- .../facebook-www/ReactART-prod.classic.js | 1403 ++++---- compiled/facebook-www/ReactART-prod.modern.js | 6 +- compiled/facebook-www/ReactDOM-dev.classic.js | 2938 +++++++---------- compiled/facebook-www/ReactDOM-dev.modern.js | 10 +- .../facebook-www/ReactDOM-prod.classic.js | 2105 +++++------- compiled/facebook-www/ReactDOM-prod.modern.js | 10 +- .../ReactDOM-profiling.classic.js | 2185 +++++------- .../facebook-www/ReactDOM-profiling.modern.js | 10 +- .../ReactDOMServer-dev.classic.js | 2 +- .../facebook-www/ReactDOMServer-dev.modern.js | 2 +- .../ReactDOMServer-prod.classic.js | 2 +- .../ReactDOMServer-prod.modern.js | 2 +- .../ReactDOMTesting-dev.classic.js | 2938 +++++++---------- .../ReactDOMTesting-dev.modern.js | 10 +- .../ReactDOMTesting-prod.classic.js | 2105 +++++------- .../ReactDOMTesting-prod.modern.js | 10 +- .../ReactReconciler-dev.classic.js | 2119 +++++------- .../ReactReconciler-dev.modern.js | 2 +- .../ReactReconciler-prod.classic.js | 1611 ++++----- .../ReactReconciler-prod.modern.js | 2 +- .../ReactTestRenderer-dev.classic.js | 6 +- .../ReactTestRenderer-dev.modern.js | 6 +- compiled/facebook-www/VERSION_CLASSIC | 2 +- compiled/facebook-www/VERSION_MODERN | 2 +- 34 files changed, 7744 insertions(+), 11771 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index cc6f21298d181..7647bb496dba9 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -e1378902bbb322aa1fe1953780f4b2b5f80d26b1 +682a103cde99a3091850d1c27de8846b5d14e803 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index cc6f21298d181..7647bb496dba9 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -e1378902bbb322aa1fe1953780f4b2b5f80d26b1 +682a103cde99a3091850d1c27de8846b5d14e803 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index dfbab96e8d3b4..536b0fd40af35 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -1041,7 +1041,6 @@ __DEV__ && enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, renameElementSymbol = dynamicFeatureFlags.renameElementSymbol, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -1243,36 +1242,20 @@ __DEV__ && ReactSharedInternals; exports.__COMPILER_RUNTIME = ReactCompilerRuntime; exports.act = function (callback) { - var prevIsBatchingLegacy = disableLegacyMode - ? !1 - : ReactSharedInternals.isBatchingLegacy, - prevActQueue = ReactSharedInternals.actQueue, + var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth; actScopeDepth++; var queue = (ReactSharedInternals.actQueue = - null !== prevActQueue ? prevActQueue : []); - disableLegacyMode || (ReactSharedInternals.isBatchingLegacy = !0); - var didAwaitActCall = !1; + null !== prevActQueue ? prevActQueue : []), + didAwaitActCall = !1; try { - disableLegacyMode || - (ReactSharedInternals.didScheduleLegacyUpdate = !1); var result = callback(); - var didScheduleLegacyUpdate = disableLegacyMode - ? !1 - : ReactSharedInternals.didScheduleLegacyUpdate; - !prevIsBatchingLegacy && - didScheduleLegacyUpdate && - flushActQueue(queue); - disableLegacyMode || - (ReactSharedInternals.isBatchingLegacy = prevIsBatchingLegacy); } catch (error$3) { ReactSharedInternals.thrownErrors.push(error$3); } if (0 < ReactSharedInternals.thrownErrors.length) throw ( - (disableLegacyMode || - (ReactSharedInternals.isBatchingLegacy = prevIsBatchingLegacy), - popActScope(prevActQueue, prevActScopeDepth), + (popActScope(prevActQueue, prevActScopeDepth), (callback = aggregateErrors(ReactSharedInternals.thrownErrors)), (ReactSharedInternals.thrownErrors.length = 0), callback) @@ -1836,7 +1819,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-classic-e1378902-20241106"; + exports.version = "19.0.0-www-classic-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index a1f70726d3ead..38b1d1c86e37f 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1819,7 +1819,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-modern-e1378902-20241106"; + exports.version = "19.0.0-www-modern-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 8869625a5012d..3c581ef1296c6 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -619,4 +619,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-e1378902-20241106"; +exports.version = "19.0.0-www-classic-682a103c-20241107"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 6daa9636d87e7..7392f90479e7d 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -619,4 +619,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-e1378902-20241106"; +exports.version = "19.0.0-www-modern-682a103c-20241107"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 4d30b801fbe4e..2d171e2d85f2a 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -623,7 +623,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-e1378902-20241106"; +exports.version = "19.0.0-www-classic-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 3dcab7ceeac50..719563f28d13b 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -623,7 +623,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-e1378902-20241106"; +exports.version = "19.0.0-www-modern-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 309d26497052b..077a60690f752 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -297,9 +297,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -989,10 +986,10 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - !enableSiblingPrerendering || - 0 === suspendedRetryLanes || - 0 !== updatedLanes || - (disableLegacyMode && 0 === root.tag) || + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } @@ -2137,10 +2134,6 @@ __DEV__ && scheduleImmediateTask(processRootScheduleInMicrotask)); enableDeferRootSchedulingToMicrotask || scheduleTaskForRootDuringMicrotask(root, now$1()); - !disableLegacyMode && - ReactSharedInternals.isBatchingLegacy && - 0 === root.tag && - (ReactSharedInternals.didScheduleLegacyUpdate = !0); } function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { if (!isFlushingWork && mightHavePendingSyncWork) { @@ -2148,7 +2141,7 @@ __DEV__ && do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) + if (!onlyLegacy) if (0 !== syncTransitionLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) var nextLanes = 0; @@ -3823,15 +3816,7 @@ __DEV__ && thenableState$1 = null; return firstChildFiber; } catch (x) { - if ( - x === SuspenseException || - (!disableLegacyMode && - 0 === (returnFiber.mode & 1) && - "object" === typeof x && - null !== x && - "function" === typeof x.then) - ) - throw x; + if (x === SuspenseException) throw x; var fiber = createFiber(29, x, null, returnFiber.mode); fiber.lanes = lanes; fiber.return = returnFiber; @@ -4121,9 +4106,8 @@ __DEV__ && currentlyRenderingFiber$1 = null; hookTypesUpdateIndexDev = -1; - null === current || - (current.flags & 31457280) === (workInProgress.flags & 31457280) || - (!disableLegacyMode && 0 === (current.mode & 1)) || + null !== current && + (current.flags & 31457280) !== (workInProgress.flags & 31457280) && error$jscomp$0( "Internal React error: Expected static flag was missing. Please notify the React team." ); @@ -5594,124 +5578,6 @@ __DEV__ && ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0; } - function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = !1, - unmaskedContext = emptyContextObject; - var context = ctor.contextType; - if ( - "contextType" in ctor && - null !== context && - (void 0 === context || context.$$typeof !== REACT_CONTEXT_TYPE) && - !didWarnAboutInvalidateContextType.has(ctor) - ) { - didWarnAboutInvalidateContextType.add(ctor); - var addendum = - void 0 === context - ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." - : "object" !== typeof context - ? " However, it is set to a " + typeof context + "." - : context.$$typeof === REACT_CONSUMER_TYPE - ? " Did you accidentally pass the Context.Consumer instead?" - : " However, it is set to an object with keys {" + - Object.keys(context).join(", ") + - "}."; - error$jscomp$0( - "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", - getComponentNameFromType(ctor) || "Component", - addendum - ); - } - "object" === typeof context && null !== context - ? (context = readContext(context)) - : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), - (isLegacyContextConsumer = ctor.contextTypes), - (context = (isLegacyContextConsumer = - null !== isLegacyContextConsumer && - void 0 !== isLegacyContextConsumer) - ? getMaskedContext(workInProgress, unmaskedContext) - : emptyContextObject)); - addendum = new ctor(props, context); - if (workInProgress.mode & 8) { - setIsStrictModeForDevtools(!0); - try { - addendum = new ctor(props, context); - } finally { - setIsStrictModeForDevtools(!1); - } - } - props = workInProgress.memoizedState = - null !== addendum.state && void 0 !== addendum.state - ? addendum.state - : null; - addendum.updater = classComponentUpdater; - workInProgress.stateNode = addendum; - addendum._reactInternals = workInProgress; - addendum._reactInternalInstance = fakeInternalInstance; - "function" === typeof ctor.getDerivedStateFromProps && - null === props && - ((props = getComponentNameFromType(ctor) || "Component"), - didWarnAboutUninitializedState.has(props) || - (didWarnAboutUninitializedState.add(props), - error$jscomp$0( - "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", - props, - null === addendum.state ? "null" : "undefined", - props - ))); - if ( - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof addendum.getSnapshotBeforeUpdate - ) { - var foundWillReceivePropsName = (props = null), - foundWillUpdateName = null; - "function" === typeof addendum.componentWillMount && - !0 !== addendum.componentWillMount.__suppressDeprecationWarning - ? (props = "componentWillMount") - : "function" === typeof addendum.UNSAFE_componentWillMount && - (props = "UNSAFE_componentWillMount"); - "function" === typeof addendum.componentWillReceiveProps && - !0 !== addendum.componentWillReceiveProps.__suppressDeprecationWarning - ? (foundWillReceivePropsName = "componentWillReceiveProps") - : "function" === typeof addendum.UNSAFE_componentWillReceiveProps && - (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps"); - "function" === typeof addendum.componentWillUpdate && - !0 !== addendum.componentWillUpdate.__suppressDeprecationWarning - ? (foundWillUpdateName = "componentWillUpdate") - : "function" === typeof addendum.UNSAFE_componentWillUpdate && - (foundWillUpdateName = "UNSAFE_componentWillUpdate"); - if ( - null !== props || - null !== foundWillReceivePropsName || - null !== foundWillUpdateName - ) { - var _componentName = getComponentNameFromType(ctor) || "Component"; - ctor = - "function" === typeof ctor.getDerivedStateFromProps - ? "getDerivedStateFromProps()" - : "getSnapshotBeforeUpdate()"; - didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) || - (didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName), - error$jscomp$0( - "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", - _componentName, - ctor, - null !== props ? "\n " + props : "", - null !== foundWillReceivePropsName - ? "\n " + foundWillReceivePropsName - : "", - null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" - )); - } - } - isLegacyContextConsumer && - ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); - return addendum; - } function callComponentWillReceiveProps( workInProgress, instance, @@ -5738,201 +5604,6 @@ __DEV__ && null )); } - function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode, - name = getComponentNameFromType(ctor) || "Component"; - instance.render || - (ctor.prototype && "function" === typeof ctor.prototype.render - ? error$jscomp$0( - "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", - name - ) - : error$jscomp$0( - "No `render` method found on the %s instance: you may have forgotten to define `render`.", - name - )); - !instance.getInitialState || - instance.getInitialState.isReactClassApproved || - instance.state || - error$jscomp$0( - "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", - name - ); - instance.getDefaultProps && - !instance.getDefaultProps.isReactClassApproved && - error$jscomp$0( - "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", - name - ); - instance.contextType && - error$jscomp$0( - "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", - name - ); - instance.contextTypes && - error$jscomp$0( - "contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", - name - ); - ctor.contextType && - ctor.contextTypes && - !didWarnAboutContextTypeAndContextTypes.has(ctor) && - (didWarnAboutContextTypeAndContextTypes.add(ctor), - error$jscomp$0( - "%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", - name - )); - ctor.childContextTypes && - !didWarnAboutChildContextTypes.has(ctor) && - (didWarnAboutChildContextTypes.add(ctor), - error$jscomp$0( - "%s uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead. (https://react.dev/link/legacy-context)", - name - )); - ctor.contextTypes && - !didWarnAboutContextTypes$1.has(ctor) && - (didWarnAboutContextTypes$1.add(ctor), - error$jscomp$0( - "%s uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", - name - )); - "function" === typeof instance.componentShouldUpdate && - error$jscomp$0( - "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", - name - ); - ctor.prototype && - ctor.prototype.isPureReactComponent && - "undefined" !== typeof instance.shouldComponentUpdate && - error$jscomp$0( - "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", - getComponentNameFromType(ctor) || "A pure component" - ); - "function" === typeof instance.componentDidUnmount && - error$jscomp$0( - "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", - name - ); - "function" === typeof instance.componentDidReceiveProps && - error$jscomp$0( - "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", - name - ); - "function" === typeof instance.componentWillRecieveProps && - error$jscomp$0( - "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", - name - ); - "function" === typeof instance.UNSAFE_componentWillRecieveProps && - error$jscomp$0( - "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", - name - ); - var hasMutatedProps = instance.props !== newProps; - void 0 !== instance.props && - hasMutatedProps && - error$jscomp$0( - "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", - name - ); - instance.defaultProps && - error$jscomp$0( - "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", - name, - name - ); - "function" !== typeof instance.getSnapshotBeforeUpdate || - "function" === typeof instance.componentDidUpdate || - didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor) || - (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor), - error$jscomp$0( - "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", - getComponentNameFromType(ctor) - )); - "function" === typeof instance.getDerivedStateFromProps && - error$jscomp$0( - "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - name - ); - "function" === typeof instance.getDerivedStateFromError && - error$jscomp$0( - "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - name - ); - "function" === typeof ctor.getSnapshotBeforeUpdate && - error$jscomp$0( - "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", - name - ); - (hasMutatedProps = instance.state) && - ("object" !== typeof hasMutatedProps || isArrayImpl(hasMutatedProps)) && - error$jscomp$0("%s.state: must be set to an object or null", name); - "function" === typeof instance.getChildContext && - "object" !== typeof ctor.childContextTypes && - error$jscomp$0( - "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", - name - ); - instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = {}; - initializeUpdateQueue(workInProgress); - name = ctor.contextType; - "object" === typeof name && null !== name - ? (instance.context = readContext(name)) - : ((name = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), - (instance.context = getMaskedContext(workInProgress, name))); - instance.state === newProps && - ((name = getComponentNameFromType(ctor) || "Component"), - didWarnAboutDirectlyAssigningPropsToState.has(name) || - (didWarnAboutDirectlyAssigningPropsToState.add(name), - error$jscomp$0( - "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", - name - ))); - workInProgress.mode & 8 && - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - instance - ); - ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( - workInProgress, - instance - ); - instance.state = workInProgress.memoizedState; - name = ctor.getDerivedStateFromProps; - "function" === typeof name && - (applyDerivedStateFromProps(workInProgress, ctor, name, newProps), - (instance.state = workInProgress.memoizedState)); - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ((ctor = instance.state), - "function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount(), - ctor !== instance.state && - (error$jscomp$0( - "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", - getComponentNameFromFiber(workInProgress) || "Component" - ), - classComponentUpdater.enqueueReplaceState( - instance, - instance.state, - null - )), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (instance.state = workInProgress.memoizedState)); - "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308); - 0 !== (workInProgress.mode & 16) && (workInProgress.flags |= 67108864); - } function resolveClassComponentProps( Component, baseProps, @@ -6069,108 +5740,72 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + returnFiber = sourceFiber.alternate; + null !== returnFiber && propagateParentContextChanges( - currentSourceFiber, + returnFiber, sourceFiber, rootRenderLanes, !0 ); - currentSourceFiber = sourceFiber.tag; - disableLegacyMode || - 0 !== (sourceFiber.mode & 1) || - (0 !== currentSourceFiber && - 11 !== currentSourceFiber && - 15 !== currentSourceFiber) || - ((currentSourceFiber = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), - (sourceFiber.memoizedState = currentSourceFiber.memoizedState), - (sourceFiber.lanes = currentSourceFiber.lanes)) - : ((sourceFiber.updateQueue = null), - (sourceFiber.memoizedState = null))); enableDebugTracing && sourceFiber.mode & 4 && - ((currentSourceFiber = - getComponentNameFromFiber(sourceFiber) || "Unknown"), - logComponentSuspended(currentSourceFiber, value)); - currentSourceFiber = suspenseHandlerStackCursor.current; - if (null !== currentSourceFiber) { - switch (currentSourceFiber.tag) { + ((returnFiber = getComponentNameFromFiber(sourceFiber) || "Unknown"), + logComponentSuspended(returnFiber, value)); + returnFiber = suspenseHandlerStackCursor.current; + if (null !== returnFiber) { + switch (returnFiber.tag) { case 13: - if (disableLegacyMode || sourceFiber.mode & 1) + return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === currentSourceFiber.alternate && + : null === returnFiber.alternate && workInProgressRootExitStatus === RootInProgress && - (workInProgressRootExitStatus = RootSuspended); - currentSourceFiber.flags &= -257; - disableLegacyMode || 0 !== (currentSourceFiber.mode & 1) - ? ((currentSourceFiber.flags |= 65536), - (currentSourceFiber.lanes = rootRenderLanes)) - : currentSourceFiber === returnFiber - ? (currentSourceFiber.flags |= 65536) - : ((currentSourceFiber.flags |= 128), - (sourceFiber.flags |= 131072), - (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag - ? null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = ForceUpdate), - enqueueUpdate(sourceFiber, returnFiber, 2)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= 2)); - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((returnFiber = currentSourceFiber.updateQueue), - null === returnFiber - ? (currentSourceFiber.updateQueue = new Set([value])) - : returnFiber.add(value), - (disableLegacyMode || currentSourceFiber.mode & 1) && - attachPingListener(root, value, rootRenderLanes)); - return !1; + (workInProgressRootExitStatus = RootSuspended), + (returnFiber.flags &= -257), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), + value === noopSuspenseyCommitThenable + ? (returnFiber.flags |= 16384) + : ((sourceFiber = returnFiber.updateQueue), + null === sourceFiber + ? (returnFiber.updateQueue = new Set([value])) + : sourceFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); case 22: - if (disableLegacyMode || currentSourceFiber.mode & 1) - return ( - (currentSourceFiber.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((returnFiber = currentSourceFiber.updateQueue), - null === returnFiber - ? ((returnFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (currentSourceFiber.updateQueue = returnFiber)) - : ((sourceFiber = returnFiber.retryQueue), - null === sourceFiber - ? (returnFiber.retryQueue = new Set([value])) - : sourceFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); + return ( + (returnFiber.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (returnFiber.flags |= 16384) + : ((sourceFiber = returnFiber.updateQueue), + null === sourceFiber + ? ((sourceFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (returnFiber.updateQueue = sourceFiber)) + : ((returnFiber = sourceFiber.retryQueue), + null === returnFiber + ? (sourceFiber.retryQueue = new Set([value])) + : returnFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); } throw Error( "Unexpected Suspense handler tag (" + - currentSourceFiber.tag + + returnFiber.tag + "). This is a bug in React." ); } - if (disableLegacyMode || 1 === root.tag) - return ( - attachPingListener(root, value, rootRenderLanes), - renderDidSuspendDelayIfPossible(), - !1 - ); - value = Error( - "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition." - ); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - currentSourceFiber = createCapturedValueAtFiber( + var error = createCapturedValueAtFiber( Error( "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", { cause: value } @@ -6178,8 +5813,8 @@ __DEV__ && sourceFiber ); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [error]) + : workInProgressRootConcurrentErrors.push(error); workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored); if (null === returnFiber) return !0; @@ -6202,16 +5837,13 @@ __DEV__ && case 1: if ( ((sourceFiber = returnFiber.type), - (currentSourceFiber = returnFiber.stateNode), + (error = returnFiber.stateNode), 0 === (returnFiber.flags & 128) && ("function" === typeof sourceFiber.getDerivedStateFromError || - (null !== currentSourceFiber && - "function" === - typeof currentSourceFiber.componentDidCatch && + (null !== error && + "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - currentSourceFiber - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(error))))) ) return ( (returnFiber.flags |= 65536), @@ -6560,36 +6192,30 @@ __DEV__ && renderLanes ); } - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - if (0 !== (renderLanes & 536870912)) - (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ), - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress), - pushOffscreenSuspenseHandler(workInProgress); - else - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & 536870912)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && pushTransition(workInProgress, null, null), - reuseHiddenContextOnStack(workInProgress), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -6743,7 +6369,7 @@ __DEV__ && return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -6782,212 +6408,577 @@ __DEV__ && ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - constructClassInstance(workInProgress, Component, nextProps), - mountClassInstance(workInProgress, Component, nextProps, renderLanes), - (state = !0); - else if (null === current) { + if (null === workInProgress.stateNode) { + lane = !1; + state = emptyContextObject; + var context = Component.contextType; + if ( + "contextType" in Component && + null !== context && + (void 0 === context || context.$$typeof !== REACT_CONTEXT_TYPE) && + !didWarnAboutInvalidateContextType.has(Component) + ) { + didWarnAboutInvalidateContextType.add(Component); + var addendum = + void 0 === context + ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." + : "object" !== typeof context + ? " However, it is set to a " + typeof context + "." + : context.$$typeof === REACT_CONSUMER_TYPE + ? " Did you accidentally pass the Context.Consumer instead?" + : " However, it is set to an object with keys {" + + Object.keys(context).join(", ") + + "}."; + error$jscomp$0( + "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", + getComponentNameFromType(Component) || "Component", + addendum + ); + } + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((state = isContextProvider(Component) + ? previousContext + : contextStackCursor$1.current), + (lane = Component.contextTypes), + (context = (lane = null !== lane && void 0 !== lane) + ? getMaskedContext(workInProgress, state) + : emptyContextObject)); + addendum = new Component(nextProps, context); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + addendum = new Component(nextProps, context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + var state$jscomp$0 = (workInProgress.memoizedState = + null !== addendum.state && void 0 !== addendum.state + ? addendum.state + : null); + addendum.updater = classComponentUpdater; + workInProgress.stateNode = addendum; + addendum._reactInternals = workInProgress; + addendum._reactInternalInstance = fakeInternalInstance; + "function" === typeof Component.getDerivedStateFromProps && + null === state$jscomp$0 && + ((state$jscomp$0 = + getComponentNameFromType(Component) || "Component"), + didWarnAboutUninitializedState.has(state$jscomp$0) || + (didWarnAboutUninitializedState.add(state$jscomp$0), + error$jscomp$0( + "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", + state$jscomp$0, + null === addendum.state ? "null" : "undefined", + state$jscomp$0 + ))); + if ( + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof addendum.getSnapshotBeforeUpdate + ) { + var foundWillReceivePropsName = (state$jscomp$0 = null), + foundWillUpdateName = null; + "function" === typeof addendum.componentWillMount && + !0 !== addendum.componentWillMount.__suppressDeprecationWarning + ? (state$jscomp$0 = "componentWillMount") + : "function" === typeof addendum.UNSAFE_componentWillMount && + (state$jscomp$0 = "UNSAFE_componentWillMount"); + "function" === typeof addendum.componentWillReceiveProps && + !0 !== addendum.componentWillReceiveProps.__suppressDeprecationWarning + ? (foundWillReceivePropsName = "componentWillReceiveProps") + : "function" === typeof addendum.UNSAFE_componentWillReceiveProps && + (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps"); + "function" === typeof addendum.componentWillUpdate && + !0 !== addendum.componentWillUpdate.__suppressDeprecationWarning + ? (foundWillUpdateName = "componentWillUpdate") + : "function" === typeof addendum.UNSAFE_componentWillUpdate && + (foundWillUpdateName = "UNSAFE_componentWillUpdate"); + if ( + null !== state$jscomp$0 || + null !== foundWillReceivePropsName || + null !== foundWillUpdateName + ) { + addendum = getComponentNameFromType(Component) || "Component"; + var newApiName = + "function" === typeof Component.getDerivedStateFromProps + ? "getDerivedStateFromProps()" + : "getSnapshotBeforeUpdate()"; + didWarnAboutLegacyLifecyclesAndDerivedState.has(addendum) || + (didWarnAboutLegacyLifecyclesAndDerivedState.add(addendum), + error$jscomp$0( + "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", + addendum, + newApiName, + null !== state$jscomp$0 ? "\n " + state$jscomp$0 : "", + null !== foundWillReceivePropsName + ? "\n " + foundWillReceivePropsName + : "", + null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" + )); + } + } + lane && + ((lane = workInProgress.stateNode), + (lane.__reactInternalMemoizedUnmaskedChildContext = state), + (lane.__reactInternalMemoizedMaskedChildContext = context)); state = workInProgress.stateNode; - var unresolvedOldProps = workInProgress.memoizedProps; - lane = resolveClassComponentProps( - Component, - unresolvedOldProps, - workInProgress.type === workInProgress.elementType - ); - state.props = lane; - var oldContext = state.context, - contextType = Component.contextType; - "object" === typeof contextType && null !== contextType - ? (contextType = readContext(contextType)) - : ((contextType = isContextProvider(Component) + lane = getComponentNameFromType(Component) || "Component"; + state.render || + (Component.prototype && + "function" === typeof Component.prototype.render + ? error$jscomp$0( + "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", + lane + ) + : error$jscomp$0( + "No `render` method found on the %s instance: you may have forgotten to define `render`.", + lane + )); + !state.getInitialState || + state.getInitialState.isReactClassApproved || + state.state || + error$jscomp$0( + "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", + lane + ); + state.getDefaultProps && + !state.getDefaultProps.isReactClassApproved && + error$jscomp$0( + "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", + lane + ); + state.contextType && + error$jscomp$0( + "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", + lane + ); + state.contextTypes && + error$jscomp$0( + "contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", + lane + ); + Component.contextType && + Component.contextTypes && + !didWarnAboutContextTypeAndContextTypes.has(Component) && + (didWarnAboutContextTypeAndContextTypes.add(Component), + error$jscomp$0( + "%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", + lane + )); + Component.childContextTypes && + !didWarnAboutChildContextTypes.has(Component) && + (didWarnAboutChildContextTypes.add(Component), + error$jscomp$0( + "%s uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead. (https://react.dev/link/legacy-context)", + lane + )); + Component.contextTypes && + !didWarnAboutContextTypes$1.has(Component) && + (didWarnAboutContextTypes$1.add(Component), + error$jscomp$0( + "%s uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", + lane + )); + "function" === typeof state.componentShouldUpdate && + error$jscomp$0( + "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", + lane + ); + Component.prototype && + Component.prototype.isPureReactComponent && + "undefined" !== typeof state.shouldComponentUpdate && + error$jscomp$0( + "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", + getComponentNameFromType(Component) || "A pure component" + ); + "function" === typeof state.componentDidUnmount && + error$jscomp$0( + "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", + lane + ); + "function" === typeof state.componentDidReceiveProps && + error$jscomp$0( + "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", + lane + ); + "function" === typeof state.componentWillRecieveProps && + error$jscomp$0( + "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", + lane + ); + "function" === typeof state.UNSAFE_componentWillRecieveProps && + error$jscomp$0( + "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", + lane + ); + context = state.props !== nextProps; + void 0 !== state.props && + context && + error$jscomp$0( + "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", + lane + ); + state.defaultProps && + error$jscomp$0( + "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", + lane, + lane + ); + "function" !== typeof state.getSnapshotBeforeUpdate || + "function" === typeof state.componentDidUpdate || + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || + (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), + error$jscomp$0( + "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", + getComponentNameFromType(Component) + )); + "function" === typeof state.getDerivedStateFromProps && + error$jscomp$0( + "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + lane + ); + "function" === typeof state.getDerivedStateFromError && + error$jscomp$0( + "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + lane + ); + "function" === typeof Component.getSnapshotBeforeUpdate && + error$jscomp$0( + "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", + lane + ); + (context = state.state) && + ("object" !== typeof context || isArrayImpl(context)) && + error$jscomp$0("%s.state: must be set to an object or null", lane); + "function" === typeof state.getChildContext && + "object" !== typeof Component.childContextTypes && + error$jscomp$0( + "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", + lane + ); + state = workInProgress.stateNode; + state.props = nextProps; + state.state = workInProgress.memoizedState; + state.refs = {}; + initializeUpdateQueue(workInProgress); + lane = Component.contextType; + "object" === typeof lane && null !== lane + ? (state.context = readContext(lane)) + : ((lane = isContextProvider(Component) ? previousContext : contextStackCursor$1.current), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof state.getSnapshotBeforeUpdate; - unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - hasNewLifecycles || - ("function" !== typeof state.UNSAFE_componentWillReceiveProps && - "function" !== typeof state.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== contextType) && - callComponentWillReceiveProps( - workInProgress, + (state.context = getMaskedContext(workInProgress, lane))); + state.state === nextProps && + ((lane = getComponentNameFromType(Component) || "Component"), + didWarnAboutDirectlyAssigningPropsToState.has(lane) || + (didWarnAboutDirectlyAssigningPropsToState.add(lane), + error$jscomp$0( + "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", + lane + ))); + workInProgress.mode & 8 && + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + state + ); + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( + workInProgress, + state + ); + state.state = workInProgress.memoizedState; + lane = Component.getDerivedStateFromProps; + "function" === typeof lane && + (applyDerivedStateFromProps( + workInProgress, + Component, + lane, + nextProps + ), + (state.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof state.getSnapshotBeforeUpdate || + ("function" !== typeof state.UNSAFE_componentWillMount && + "function" !== typeof state.componentWillMount) || + ((lane = state.state), + "function" === typeof state.componentWillMount && + state.componentWillMount(), + "function" === typeof state.UNSAFE_componentWillMount && + state.UNSAFE_componentWillMount(), + lane !== state.state && + (error$jscomp$0( + "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", + getComponentNameFromFiber(workInProgress) || "Component" + ), + classComponentUpdater.enqueueReplaceState( state, - nextProps, - contextType - )); - hasForceUpdate = !1; - var oldState = workInProgress.memoizedState; - state.state = oldState; - processUpdateQueue(workInProgress, nextProps, state, renderLanes); - suspendIfUpdateReadFromEntangledAsyncAction(); - oldContext = workInProgress.memoizedState; - unresolvedOldProps || - oldState !== oldContext || - didPerformWorkStackCursor.current || - hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps && - (applyDerivedStateFromProps( - workInProgress, - Component, - getDerivedStateFromProps, - nextProps - ), - (oldContext = workInProgress.memoizedState)), - (lane = - hasForceUpdate || - checkShouldComponentUpdate( + state.state, + null + )), + processUpdateQueue(workInProgress, nextProps, state, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction(), + (state.state = workInProgress.memoizedState)); + "function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308); + 0 !== (workInProgress.mode & 16) && (workInProgress.flags |= 67108864); + state = !0; + } else if (null === current$jscomp$0) + (state = workInProgress.stateNode), + (foundWillUpdateName = workInProgress.memoizedProps), + (lane = resolveClassComponentProps( + Component, + foundWillUpdateName, + workInProgress.type === workInProgress.elementType + )), + (state.props = lane), + (state$jscomp$0 = state.context), + (context = Component.contextType), + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((context = isContextProvider(Component) + ? previousContext + : contextStackCursor$1.current), + (context = getMaskedContext(workInProgress, context))), + (foundWillReceivePropsName = Component.getDerivedStateFromProps), + (addendum = + "function" === typeof foundWillReceivePropsName || + "function" === typeof state.getSnapshotBeforeUpdate), + (foundWillUpdateName = + workInProgress.pendingProps !== foundWillUpdateName), + addendum || + ("function" !== typeof state.UNSAFE_componentWillReceiveProps && + "function" !== typeof state.componentWillReceiveProps) || + ((foundWillUpdateName || state$jscomp$0 !== context) && + callComponentWillReceiveProps( workInProgress, - Component, - lane, + state, nextProps, - oldState, - oldContext, - contextType - )) - ? (hasNewLifecycles || - ("function" !== typeof state.UNSAFE_componentWillMount && - "function" !== typeof state.componentWillMount) || - ("function" === typeof state.componentWillMount && - state.componentWillMount(), - "function" === typeof state.UNSAFE_componentWillMount && - state.UNSAFE_componentWillMount()), - "function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - 0 !== (workInProgress.mode & 16) && - (workInProgress.flags |= 67108864)) - : ("function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - 0 !== (workInProgress.mode & 16) && - (workInProgress.flags |= 67108864), - (workInProgress.memoizedProps = nextProps), - (workInProgress.memoizedState = oldContext)), - (state.props = nextProps), - (state.state = oldContext), - (state.context = contextType), - (state = lane)) - : ("function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - 0 !== (workInProgress.mode & 16) && - (workInProgress.flags |= 67108864), - (state = !1)); - } else { + context + )), + (hasForceUpdate = !1), + (newApiName = workInProgress.memoizedState), + (state.state = newApiName), + processUpdateQueue(workInProgress, nextProps, state, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction(), + (state$jscomp$0 = workInProgress.memoizedState), + foundWillUpdateName || + newApiName !== state$jscomp$0 || + didPerformWorkStackCursor.current || + hasForceUpdate + ? ("function" === typeof foundWillReceivePropsName && + (applyDerivedStateFromProps( + workInProgress, + Component, + foundWillReceivePropsName, + nextProps + ), + (state$jscomp$0 = workInProgress.memoizedState)), + (lane = + hasForceUpdate || + checkShouldComponentUpdate( + workInProgress, + Component, + lane, + nextProps, + newApiName, + state$jscomp$0, + context + )) + ? (addendum || + ("function" !== typeof state.UNSAFE_componentWillMount && + "function" !== typeof state.componentWillMount) || + ("function" === typeof state.componentWillMount && + state.componentWillMount(), + "function" === typeof state.UNSAFE_componentWillMount && + state.UNSAFE_componentWillMount()), + "function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + 0 !== (workInProgress.mode & 16) && + (workInProgress.flags |= 67108864)) + : ("function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + 0 !== (workInProgress.mode & 16) && + (workInProgress.flags |= 67108864), + (workInProgress.memoizedProps = nextProps), + (workInProgress.memoizedState = state$jscomp$0)), + (state.props = nextProps), + (state.state = state$jscomp$0), + (state.context = context), + (state = lane)) + : ("function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + 0 !== (workInProgress.mode & 16) && + (workInProgress.flags |= 67108864), + (state = !1)); + else { state = workInProgress.stateNode; - cloneUpdateQueue(current, workInProgress); + cloneUpdateQueue(current$jscomp$0, workInProgress); lane = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + context = resolveClassComponentProps( Component, lane, workInProgress.type === workInProgress.elementType ); - state.props = contextType; - hasNewLifecycles = workInProgress.pendingProps; - unresolvedOldProps = state.context; - oldContext = Component.contextType; - "object" === typeof oldContext && null !== oldContext - ? (oldContext = readContext(oldContext)) - : ((oldContext = isContextProvider(Component) + state.props = context; + addendum = workInProgress.pendingProps; + foundWillUpdateName = state.context; + state$jscomp$0 = Component.contextType; + "object" === typeof state$jscomp$0 && null !== state$jscomp$0 + ? (state$jscomp$0 = readContext(state$jscomp$0)) + : ((state$jscomp$0 = isContextProvider(Component) ? previousContext : contextStackCursor$1.current), - (oldContext = getMaskedContext(workInProgress, oldContext))); - oldState = Component.getDerivedStateFromProps; - (getDerivedStateFromProps = - "function" === typeof oldState || + (state$jscomp$0 = getMaskedContext( + workInProgress, + state$jscomp$0 + ))); + newApiName = Component.getDerivedStateFromProps; + (foundWillReceivePropsName = + "function" === typeof newApiName || "function" === typeof state.getSnapshotBeforeUpdate) || ("function" !== typeof state.UNSAFE_componentWillReceiveProps && "function" !== typeof state.componentWillReceiveProps) || - ((lane !== hasNewLifecycles || unresolvedOldProps !== oldContext) && + ((lane !== addendum || foundWillUpdateName !== state$jscomp$0) && callComponentWillReceiveProps( workInProgress, state, nextProps, - oldContext + state$jscomp$0 )); hasForceUpdate = !1; - unresolvedOldProps = workInProgress.memoizedState; - state.state = unresolvedOldProps; + foundWillUpdateName = workInProgress.memoizedState; + state.state = foundWillUpdateName; processUpdateQueue(workInProgress, nextProps, state, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; - lane !== hasNewLifecycles || - unresolvedOldProps !== newState || + lane !== addendum || + foundWillUpdateName !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) - ? ("function" === typeof oldState && + (null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies)) + ? ("function" === typeof newApiName && (applyDerivedStateFromProps( workInProgress, Component, - oldState, + newApiName, nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, - unresolvedOldProps, + foundWillUpdateName, newState, - oldContext + state$jscomp$0 ) || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) - ? (getDerivedStateFromProps || + (null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies))) + ? (foundWillReceivePropsName || ("function" !== typeof state.UNSAFE_componentWillUpdate && "function" !== typeof state.componentWillUpdate) || ("function" === typeof state.componentWillUpdate && - state.componentWillUpdate(nextProps, newState, oldContext), + state.componentWillUpdate( + nextProps, + newState, + state$jscomp$0 + ), "function" === typeof state.UNSAFE_componentWillUpdate && state.UNSAFE_componentWillUpdate( nextProps, newState, - oldContext + state$jscomp$0 )), "function" === typeof state.componentDidUpdate && (workInProgress.flags |= 4), "function" === typeof state.getSnapshotBeforeUpdate && (workInProgress.flags |= 1024)) : ("function" !== typeof state.componentDidUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof state.getSnapshotBeforeUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), (state.props = nextProps), (state.state = newState), - (state.context = oldContext), - (state = contextType)) + (state.context = state$jscomp$0), + (state = context)) : ("function" !== typeof state.componentDidUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof state.getSnapshotBeforeUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (state = !1)); } - current = finishClassComponent( - current, - workInProgress, - Component, - state, - _instance, - renderLanes - ); + context = state; + markRef(current$jscomp$0, workInProgress); + lane = 0 !== (workInProgress.flags & 128); + if (context || lane) { + context = workInProgress.stateNode; + ReactSharedInternals.getCurrentStack = + null === workInProgress ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = workInProgress; + if (lane && "function" !== typeof Component.getDerivedStateFromError) + (addendum = null), (profilerStartTime = -1); + else { + enableSchedulingProfiler && + markComponentRenderStarted(workInProgress); + addendum = callRenderInDEV(context); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + callRenderInDEV(context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + enableSchedulingProfiler && markComponentRenderStopped(); + } + workInProgress.flags |= 1; + null !== current$jscomp$0 && lane + ? ((lane = addendum), + (workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + lane, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + addendum, + renderLanes + ); + workInProgress.memoizedState = context.state; + _instance && invalidateContextProvider(workInProgress, Component, !0); + current$jscomp$0 = workInProgress.child; + } else + _instance && invalidateContextProvider(workInProgress, Component, !1), + (current$jscomp$0 = bailoutOnAlreadyFinishedWork( + current$jscomp$0, + workInProgress, + renderLanes + )); Component = workInProgress.stateNode; state && Component.props !== nextProps && @@ -6997,76 +6988,7 @@ __DEV__ && getComponentNameFromFiber(workInProgress) || "a component" ), (didWarnAboutReassigningProps = !0)); - return current; - } - function finishClassComponent( - current$jscomp$0, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes - ) { - markRef(current$jscomp$0, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && - invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork( - current$jscomp$0, - workInProgress, - renderLanes - ) - ); - shouldUpdate = workInProgress.stateNode; - ReactSharedInternals.getCurrentStack = - null === workInProgress ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = workInProgress; - if ( - didCaptureError && - "function" !== typeof Component.getDerivedStateFromError - ) { - var nextChildren = null; - profilerStartTime = -1; - } else { - enableSchedulingProfiler && markComponentRenderStarted(workInProgress); - nextChildren = callRenderInDEV(shouldUpdate); - if (workInProgress.mode & 8) { - setIsStrictModeForDevtools(!0); - try { - callRenderInDEV(shouldUpdate); - } finally { - setIsStrictModeForDevtools(!1); - } - } - enableSchedulingProfiler && markComponentRenderStopped(); - } - workInProgress.flags |= 1; - null !== current$jscomp$0 && didCaptureError - ? ((didCaptureError = nextChildren), - (workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - didCaptureError, - renderLanes - ))) - : reconcileChildren( - current$jscomp$0, - workInProgress, - nextChildren, - renderLanes - ); - workInProgress.memoizedState = shouldUpdate.state; - hasContext && invalidateContextProvider(workInProgress, Component, !0); - return workInProgress.child; + return current$jscomp$0; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; @@ -7167,18 +7089,18 @@ __DEV__ && ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = nextPrimaryChildren.updateQueue), - null === current + (renderLanes = nextPrimaryChildren.updateQueue), + null === renderLanes ? (nextPrimaryChildren.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), nextProps ); if ("number" === typeof nextProps.unstable_expectedLoadTime) @@ -7230,11 +7152,9 @@ __DEV__ && : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), (showFallback = workInProgress.mode), - (nextProps = createFiberFromOffscreen( + (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback, - 0, - null + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, @@ -7247,13 +7167,12 @@ __DEV__ && (nextPrimaryChildren.return = workInProgress), (nextProps.sibling = nextPrimaryChildren), (workInProgress.child = nextProps), - (disableLegacyMode || 0 !== (workInProgress.mode & 1)) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), (nextProps = workInProgress.child), (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), @@ -7386,22 +7305,12 @@ __DEV__ && nextPrimaryChildren = nextProps.fallback; showFallback = workInProgress.mode; didSuspend = current.child; - var currentFallbackChildFragment = didSuspend.sibling, - primaryChildProps = { mode: "hidden", children: nextProps.children }; - disableLegacyMode || - 0 !== (showFallback & 1) || - workInProgress.child === didSuspend - ? ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), - (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280)) - : ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - workInProgress.mode & 2 && - ((nextProps.actualDuration = -0), - (nextProps.actualStartTime = -1.1), - (nextProps.selfBaseDuration = didSuspend.selfBaseDuration), - (nextProps.treeBaseDuration = didSuspend.treeBaseDuration)), - (workInProgress.deletions = null)); + var currentFallbackChildFragment = didSuspend.sibling; + nextProps = createWorkInProgress(didSuspend, { + mode: "hidden", + children: nextProps.children + }); + nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280; null !== currentFallbackChildFragment ? (nextPrimaryChildren = createWorkInProgress( currentFallbackChildFragment, @@ -7439,34 +7348,36 @@ __DEV__ && cachePool: didSuspend })); nextPrimaryChildren.memoizedState = showFallback; - enableTransitionTracing && + if ( + enableTransitionTracing && ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== showFallback && - ((didSuspend = enableTransitionTracing - ? markerInstanceStack.current - : null), - (currentFallbackChildFragment = nextPrimaryChildren.updateQueue), - (primaryChildProps = current.updateQueue), - null === currentFallbackChildFragment + null !== showFallback) + ) { + didSuspend = enableTransitionTracing + ? markerInstanceStack.current + : null; + currentFallbackChildFragment = nextPrimaryChildren.updateQueue; + var currentOffscreenQueue = current.updateQueue; + null === currentFallbackChildFragment + ? (nextPrimaryChildren.updateQueue = { + transitions: showFallback, + markerInstances: didSuspend, + retryQueue: null + }) + : currentFallbackChildFragment === currentOffscreenQueue ? (nextPrimaryChildren.updateQueue = { transitions: showFallback, markerInstances: didSuspend, - retryQueue: null + retryQueue: + null !== currentOffscreenQueue + ? currentOffscreenQueue.retryQueue + : null }) - : currentFallbackChildFragment === primaryChildProps - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, - markerInstances: didSuspend, - retryQueue: - null !== primaryChildProps - ? primaryChildProps.retryQueue - : null - }) - : ((currentFallbackChildFragment.transitions = showFallback), - (currentFallbackChildFragment.markerInstances = - didSuspend)))); + : ((currentFallbackChildFragment.transitions = showFallback), + (currentFallbackChildFragment.markerInstances = didSuspend)); + } nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7476,33 +7387,28 @@ __DEV__ && return nextProps; } pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_temp = current.child; - current = JSCompiler_temp.sibling; - JSCompiler_temp = createWorkInProgress(JSCompiler_temp, { + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { mode: "visible", children: nextProps.children }); - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - (JSCompiler_temp.lanes = renderLanes); - JSCompiler_temp.return = workInProgress; - JSCompiler_temp.sibling = null; + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_temp = workInProgress.deletions), + null === JSCompiler_temp ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_temp; + : JSCompiler_temp.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_temp; + return renderLanes; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = createFiberFromOffscreen( + primaryChildren = mountWorkInProgressOffscreenFiber( { mode: "visible", children: primaryChildren }, - workInProgress.mode, - 0, - null + workInProgress.mode ); primaryChildren.return = workInProgress; return (workInProgress.child = primaryChildren); @@ -7513,37 +7419,26 @@ __DEV__ && fallbackChildren, renderLanes ) { - var mode = workInProgress.mode, - progressedPrimaryFragment = workInProgress.child; - primaryChildren = { mode: "hidden", children: primaryChildren }; - disableLegacyMode || - 0 !== (mode & 1) || - null === progressedPrimaryFragment - ? (progressedPrimaryFragment = createFiberFromOffscreen( - primaryChildren, - mode, - 0, - null - )) - : ((progressedPrimaryFragment.childLanes = 0), - (progressedPrimaryFragment.pendingProps = primaryChildren), - workInProgress.mode & 2 && - ((progressedPrimaryFragment.actualDuration = -0), - (progressedPrimaryFragment.actualStartTime = -1.1), - (progressedPrimaryFragment.selfBaseDuration = -0), - (progressedPrimaryFragment.treeBaseDuration = -0))); + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); fallbackChildren = createFiberFromFragment( fallbackChildren, mode, renderLanes, null ); - progressedPrimaryFragment.return = workInProgress; + primaryChildren.return = workInProgress; fallbackChildren.return = workInProgress; - progressedPrimaryFragment.sibling = fallbackChildren; - workInProgress.child = progressedPrimaryFragment; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; return fallbackChildren; } + function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + return createFiberFromOffscreen(offscreenProps, mode, 0, null); + } function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -7722,69 +7617,59 @@ __DEV__ && nextProps &= SubtreeSuspenseContextMask; } push(suspenseStackCursor, nextProps, workInProgress); - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), - (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), + (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), + (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); + break; + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - else workInProgress.memoizedState = null; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; + } + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); + break; + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); + break; + default: + workInProgress.memoizedState = null; + } return workInProgress.child; } - function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - null === current || - ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); - } function bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -8016,10 +7901,8 @@ __DEV__ && switch (workInProgress.tag) { case 16: a: if ( - ((prevSibling = workInProgress.elementType), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (returnFiber = workInProgress.pendingProps), - (current = callLazyInitInDEV(prevSibling)), + ((returnFiber = workInProgress.pendingProps), + (current = callLazyInitInDEV(workInProgress.elementType)), (workInProgress.type = current), "function" === typeof current) ) @@ -8389,52 +8272,6 @@ __DEV__ && workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - returnFiber = workInProgress.type; - prevSibling = resolveClassComponentProps( - returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - isContextProvider(returnFiber) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1); - prepareToReadContext(workInProgress); - constructClassInstance(workInProgress, returnFiber, prevSibling); - mountClassInstance( - workInProgress, - returnFiber, - prevSibling, - renderLanes - ); - return finishClassComponent( - null, - workInProgress, - returnFiber, - !0, - current, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - returnFiber = workInProgress.type; - prevSibling = resolveClassComponentProps( - returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ); case 19: return updateSuspenseListComponent( current, @@ -9075,8 +8912,6 @@ __DEV__ && function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -9332,11 +9167,6 @@ __DEV__ && bubbleProperties(workInProgress), null ); - case 17: - if (disableLegacyMode) break; - isContextProvider(workInProgress.type) && popContext(workInProgress); - bubbleProperties(workInProgress); - return null; case 19: pop(suspenseStackCursor, workInProgress); fallthroughToNormalSuspensePath = workInProgress.memoizedState; @@ -9464,14 +9294,14 @@ __DEV__ && ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || (!disableLegacyMode && 0 === (workInProgress.mode & 1)) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & 536870912) && + newProps + ? 0 !== (renderLanes & 536870912) && 0 === (workInProgress.flags & 128) && (bubbleProperties(workInProgress), 23 !== workInProgress.tag && workInProgress.subtreeFlags & 6 && - (workInProgress.flags |= 8192)), + (workInProgress.flags |= 8192)) + : bubbleProperties(workInProgress), (renderLanes = workInProgress.updateQueue), null !== renderLanes && scheduleRetryEffect(workInProgress, renderLanes.retryQueue), @@ -9507,8 +9337,6 @@ __DEV__ && bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error( "Unknown unit of work tag (" + @@ -9873,16 +9701,6 @@ __DEV__ && nearestMountedAncestor ); } - function commitClassDidMount(finishedWork) { - var instance = finishedWork.stateNode; - "function" === typeof instance.componentDidMount && - runWithFiberInDEV( - finishedWork, - callComponentDidMountInDEV, - finishedWork, - instance - ); - } function commitClassCallbacks(finishedWork) { var updateQueue = finishedWork.updateQueue; if (null !== updateQueue) { @@ -10489,31 +10307,26 @@ __DEV__ && recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevProps = - null !== finishedWork.memoizedState || - offscreenSubtreeIsHidden), - !prevProps) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + prevProps = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevProps) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevProps; + (offscreenSubtreeWasHidden = current) && + !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -10889,21 +10702,15 @@ __DEV__ && case 22: offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor); - disableLegacyMode || deletedFiber.mode & 1 - ? ((offscreenSubtreeWasHidden = - (_prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ), - (offscreenSubtreeWasHidden = _prevHostParent)) - : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + offscreenSubtreeWasHidden = + (_prevHostParent = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState; + recursivelyTraverseDeletionEffects( + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); + offscreenSubtreeWasHidden = _prevHostParent; break; default: recursivelyTraverseDeletionEffects( @@ -11205,17 +11012,15 @@ __DEV__ && safelyDetachRef(current, current.return)); suspenseCallback = null !== finishedWork.memoizedState; retryQueue = null !== current && null !== current.memoizedState; - if (disableLegacyMode || finishedWork.mode & 1) { - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = - prevOffscreenSubtreeIsHidden || suspenseCallback; - offscreenSubtreeWasHidden = - prevOffscreenSubtreeWasHidden || retryQueue; - recursivelyTraverseMutationEffects(root, finishedWork); - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - } else recursivelyTraverseMutationEffects(root, finishedWork); + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = + prevOffscreenSubtreeIsHidden || suspenseCallback; + offscreenSubtreeWasHidden = + prevOffscreenSubtreeWasHidden || retryQueue; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -11231,8 +11036,7 @@ __DEV__ && null === current || retryQueue || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -11429,7 +11233,14 @@ __DEV__ && finishedWork, includeWorkInProgressEffects ); - commitClassDidMount(finishedWork); + current = finishedWork.stateNode; + "function" === typeof current.componentDidMount && + runWithFiberInDEV( + finishedWork, + callComponentDidMountInDEV, + finishedWork, + current + ); current = finishedWork.updateQueue; if (null !== current) { finishedRoot = finishedWork.stateNode; @@ -11772,18 +11583,10 @@ __DEV__ && committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((prevEffectDuration._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11904,19 +11707,10 @@ __DEV__ && committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((_instance2._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) : ((_instance2._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, @@ -12263,46 +12057,6 @@ __DEV__ && } } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Layout | HasEffect, fiber); - break; - case 1: - commitClassDidMount(fiber); - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Passive | HasEffect, fiber); - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return); - break; - case 1: - var instance = fiber.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount(fiber, fiber.return, instance); - } - } - function invokePassiveEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Passive | HasEffect, fiber, fiber.return); - } - } function isConcurrentActEnvironment() { var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT @@ -12380,17 +12134,15 @@ __DEV__ && )); } function requestUpdateLane(fiber) { - var mode = fiber.mode; - if (!disableLegacyMode && 0 === (mode & 1)) return 2; if ( (executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes ) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; - mode = ReactSharedInternals.T; - return null !== mode - ? (mode._updatedFibers || (mode._updatedFibers = new Set()), - mode._updatedFibers.add(fiber), + var transition = ReactSharedInternals.T; + return null !== transition + ? (transition._updatedFibers || (transition._updatedFibers = new Set()), + transition._updatedFibers.add(fiber), (fiber = currentEntangledLane), 0 !== fiber ? fiber : requestTransitionLane()) : currentUpdatePriority || DefaultEventPriority; @@ -12436,10 +12188,10 @@ __DEV__ && "Unknown"; didWarnAboutUpdateInRenderForAnotherComponent.has(root) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root), - (fiber = getComponentNameFromFiber(fiber) || "Unknown"), + (lane = getComponentNameFromFiber(fiber) || "Unknown"), error$jscomp$0( "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render", - fiber, + lane, root, root )); @@ -12454,21 +12206,20 @@ __DEV__ && } else { isDevToolsPresent && addFiberToLanesMap(root, fiber, lane); warnIfUpdatesNotWrappedWithActDEV(fiber); - if (enableTransitionTracing) { - var transition = ReactSharedInternals.T; - if ( - null !== transition && - null != transition.name && - (-1 === transition.startTime && (transition.startTime = now$1()), - enableTransitionTracing) - ) { - var transitionLanesMap = root.transitionLanes, - index = 31 - clz32(lane), - transitions = transitionLanesMap[index]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now$1()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index = 31 - clz32(lane), + transitions = transitionLanesMap[index]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index] = transitions; } root === workInProgressRoot && ((executionContext & RenderContext) === NoContext && @@ -12481,13 +12232,6 @@ __DEV__ && workInProgressRootDidSkipSuspendedSiblings )); ensureRootIsScheduled(root); - 2 !== lane || - executionContext !== NoContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ReactSharedInternals.isBatchingLegacy || - ((workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); } } function performWorkOnRoot(root, lanes, forceSync) { @@ -12517,10 +12261,7 @@ __DEV__ && renderWasConcurrent = !1; continue; } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { + if (exitStatus === RootErrored) { var lanesThatJustErrored = lanes; root.errorRecoveryDisabledLanes & lanesThatJustErrored ? (renderWasConcurrent = 0) @@ -13586,7 +13327,7 @@ __DEV__ && (rootWithPassiveNestedUpdates = null)); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root, !1); + transitions || commitDoubleInvokeEffectsInDEV(root); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); ensureRootIsScheduled(root); @@ -13604,9 +13345,7 @@ __DEV__ && remainingLanes.value, transitions ); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -13701,7 +13440,7 @@ __DEV__ && "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped && injectedProfilingHooks.markPassiveEffectsStopped(); - commitDoubleInvokeEffectsInDEV(root, !0); + commitDoubleInvokeEffectsInDEV(root); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(0, !1); if (enableTransitionTracing) { @@ -13831,8 +13570,7 @@ __DEV__ && : executionContext & CommitContext && (didIncludeCommitPhaseUpdate = !0), throwIfInfiniteUpdateLoopDetected()); - (disableLegacyMode || 0 !== root.tag) && - isConcurrentActEnvironment() && + isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && error$jscomp$0( "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act" @@ -13852,12 +13590,7 @@ __DEV__ && ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || 0 !== (retryLane & 1) - ? claimNextRetryLane() - : 2)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -13971,52 +13704,17 @@ __DEV__ && setIsStrictModeForDevtools(!1); } } - function commitDoubleInvokeEffectsInDEV(root, hasPassiveEffects) { - disableLegacyMode || 0 !== root.tag - ? ((hasPassiveEffects = !0), - (!disableLegacyMode && 1 !== root.tag) || - root.current.mode & 24 || - (hasPassiveEffects = !1), - recursivelyTraverseAndDoubleInvokeEffectsInDEV( - root, - root.current, - hasPassiveEffects - )) - : runWithFiberInDEV( - root.current, - legacyCommitDoubleInvokeEffectsInDEV, - root.current, - hasPassiveEffects - ); - } - function legacyCommitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) { - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectUnmountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectUnmountInDEV); - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectMountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectMountInDEV); - } - function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) { - for (var subtreeRoot = null; null != firstChild; ) { - var primarySubtreeFlag = firstChild.subtreeFlags & fiberFlags; - firstChild !== subtreeRoot && - null != firstChild.child && - 0 !== primarySubtreeFlag - ? (firstChild = firstChild.child) - : (0 !== (firstChild.flags & fiberFlags) && - invokeEffectFn(firstChild), - (firstChild = - null !== firstChild.sibling - ? firstChild.sibling - : (subtreeRoot = firstChild.return))); - } + function commitDoubleInvokeEffectsInDEV(root) { + var doubleInvokeEffects = !0; + root.current.mode & 24 || (doubleInvokeEffects = !1); + recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root, + root.current, + doubleInvokeEffects + ); } function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) { - if ( - (executionContext & RenderContext) === NoContext && - (disableLegacyMode || fiber.mode & 1) - ) { + if ((executionContext & RenderContext) === NoContext) { var tag = fiber.tag; if ( 3 === tag || @@ -14052,18 +13750,14 @@ __DEV__ && : scheduleCallback$3(priorityLevel, callback); } function warnIfUpdatesNotWrappedWithActDEV(fiber) { - disableLegacyMode || fiber.mode & 1 - ? isConcurrentActEnvironment() && - null === ReactSharedInternals.actQueue && - runWithFiberInDEV(fiber, function () { - error$jscomp$0( - "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act", - getComponentNameFromFiber(fiber) - ); - }) - : "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT - ? IS_REACT_ACT_ENVIRONMENT - : void 0; + isConcurrentActEnvironment() && + null === ReactSharedInternals.actQueue && + runWithFiberInDEV(fiber, function () { + error$jscomp$0( + "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act", + getComponentNameFromFiber(fiber) + ); + }); } function resolveFunctionForHotReloading(type) { if (null === resolveFamily) return type; @@ -14387,12 +14081,10 @@ __DEV__ && ); case REACT_STRICT_MODE_TYPE: fiberTag = 8; - mode |= 8; - if (disableLegacyMode || 0 !== (mode & 1)) - (mode |= 16), - enableDO_NOT_USE_disableStrictPassiveEffect && - pendingProps.DO_NOT_USE_disableStrictPassiveEffect && - (mode |= 64); + mode |= 24; + enableDO_NOT_USE_disableStrictPassiveEffect && + pendingProps.DO_NOT_USE_disableStrictPassiveEffect && + (mode |= 64); break; case REACT_PROFILER_TYPE: return ( @@ -14618,7 +14310,7 @@ __DEV__ && onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -14659,26 +14351,16 @@ __DEV__ && for ( this.transitionCallbacks = null, containerInfo = this.transitionLanes = [], - identifierPrefix = 0; - 31 > identifierPrefix; - identifierPrefix++ + tag = 0; + 31 > tag; + tag++ ) containerInfo.push(null); this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; - for (identifierPrefix = 0; 31 > identifierPrefix; identifierPrefix++) - containerInfo.push(new Set()); - if (disableLegacyMode) - this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; - else - switch (tag) { - case 1: - this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; - break; - case 0: - this._debugRootType = hydrate ? "hydrate()" : "render()"; - } + for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); + this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; } function updateContainerSync( element, @@ -14831,7 +14513,6 @@ __DEV__ && transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -16929,10 +16610,9 @@ __DEV__ && +_this$props.height, this._tagRef ); - var tag = disableLegacyMode ? 1 : 0; _this$props = new FiberRootNode( this._surface, - tag, + 1, !1, "", void 0, @@ -16942,21 +16622,21 @@ __DEV__ && ); _this$props.hydrationCallbacks = null; enableTransitionTracing && (_this$props.transitionCallbacks = void 0); - tag = disableLegacyMode || 1 === tag ? 1 : 0; - isDevToolsPresent && (tag |= 2); - tag = createFiber(3, null, null, tag); - _this$props.current = tag; - tag.stateNode = _this$props; + var uninitializedFiber = 1; + isDevToolsPresent && (uninitializedFiber |= 2); + uninitializedFiber = createFiber(3, null, null, uninitializedFiber); + _this$props.current = uninitializedFiber; + uninitializedFiber.stateNode = _this$props; var initialCache = createCache(); retainCache(initialCache); _this$props.pooledCache = initialCache; retainCache(initialCache); - tag.memoizedState = { + uninitializedFiber.memoizedState = { element: null, isDehydrated: !1, cache: initialCache }; - initializeUpdateQueue(tag); + initializeUpdateQueue(uninitializedFiber); this._mountNode = _this$props; updateContainerSync(this.props.children, this._mountNode, this); flushSyncWork(); @@ -17022,11 +16702,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-e1378902-20241106", + version: "19.0.0-www-classic-682a103c-20241107", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -17060,7 +16740,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-classic-e1378902-20241106"; + exports.version = "19.0.0-www-classic-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index f6ee07a95b3aa..8396e11425b6c 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -16465,11 +16465,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-e1378902-20241106", + version: "19.0.0-www-modern-682a103c-20241107", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16503,7 +16503,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-modern-e1378902-20241106"; + exports.version = "19.0.0-www-modern-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index ab4d1053b0cce..0ca934d126d58 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -86,7 +86,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"), retryLaneExpirationMs = dynamicFeatureFlags.retryLaneExpirationMs, syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs, transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -227,9 +226,6 @@ function getComponentNameFromFiber(fiber) { return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -729,10 +725,10 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - !enableSiblingPrerendering || - 0 === suspendedRetryLanes || - 0 !== updatedLanes || - (disableLegacyMode && 0 === root.tag) || + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } @@ -1007,10 +1003,6 @@ function isContextProvider(type) { type = type.childContextTypes; return null !== type && void 0 !== type; } -function popContext() { - pop(didPerformWorkStackCursor); - pop(contextStackCursor$1); -} function pushTopLevelContextObject(fiber, context, didChange) { if (contextStackCursor$1.current !== emptyContextObject) throw Error(formatProdErrorMessage(168)); @@ -1215,7 +1207,7 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) + if (!onlyLegacy) if (0 !== syncTransitionLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; @@ -2458,15 +2450,7 @@ function createChildReconciler(shouldTrackSideEffects) { thenableState$1 = null; return firstChildFiber; } catch (x) { - if ( - x === SuspenseException || - (!disableLegacyMode && - 0 === (returnFiber.mode & 1) && - "object" === typeof x && - null !== x && - "function" === typeof x.then) - ) - throw x; + if (x === SuspenseException) throw x; var fiber = createFiber(29, x, null, returnFiber.mode); fiber.lanes = lanes; fiber.return = returnFiber; @@ -3444,7 +3428,7 @@ function startTransition( fiber, queue, { then: function () {}, status: "rejected", reason: error }, - requestUpdateLane(fiber) + requestUpdateLane() ); } finally { (currentUpdatePriority = previousPriority), @@ -3465,7 +3449,7 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider); + var lane = requestUpdateLane(); fiber = createUpdate(lane); var root = enqueueUpdate(provider, fiber, lane); null !== root && @@ -3483,7 +3467,7 @@ function refreshCache(fiber, seedKey, seedValue) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -3500,7 +3484,7 @@ function dispatchReducerAction(fiber, queue, action) { entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); dispatchSetStateInternal(fiber, queue, action, lane); } function dispatchSetStateInternal(fiber, queue, action, lane) { @@ -3918,7 +3902,7 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); @@ -3929,7 +3913,7 @@ var classComponentUpdater = { }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 1; update.payload = payload; @@ -3941,7 +3925,7 @@ var classComponentUpdater = { }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); @@ -3967,33 +3951,6 @@ function checkShouldComponentUpdate( ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0; } -function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = !1, - unmaskedContext = emptyContextObject; - var context = ctor.contextType; - "object" === typeof context && null !== context - ? (context = readContext(context)) - : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), - (isLegacyContextConsumer = ctor.contextTypes), - (context = (isLegacyContextConsumer = - null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer) - ? getMaskedContext(workInProgress, unmaskedContext) - : emptyContextObject)); - ctor = new ctor(props, context); - workInProgress.memoizedState = - null !== ctor.state && void 0 !== ctor.state ? ctor.state : null; - ctor.updater = classComponentUpdater; - workInProgress.stateNode = ctor; - ctor._reactInternals = workInProgress; - isLegacyContextConsumer && - ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); - return ctor; -} function callComponentWillReceiveProps( workInProgress, instance, @@ -4008,41 +3965,6 @@ function callComponentWillReceiveProps( instance.state !== workInProgress && classComponentUpdater.enqueueReplaceState(instance, instance.state, null); } -function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = {}; - initializeUpdateQueue(workInProgress); - var contextType = ctor.contextType; - "object" === typeof contextType && null !== contextType - ? (instance.context = readContext(contextType)) - : ((contextType = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), - (instance.context = getMaskedContext(workInProgress, contextType))); - instance.state = workInProgress.memoizedState; - contextType = ctor.getDerivedStateFromProps; - "function" === typeof contextType && - (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps), - (instance.state = workInProgress.memoizedState)); - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ((ctor = instance.state), - "function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount(), - ctor !== instance.state && - classComponentUpdater.enqueueReplaceState(instance, instance.state, null), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (instance.state = workInProgress.memoizedState)); - "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308); -} function resolveClassComponentProps( Component, baseProps, @@ -4181,104 +4103,68 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + returnFiber = sourceFiber.alternate; + null !== returnFiber && propagateParentContextChanges( - currentSourceFiber, + returnFiber, sourceFiber, rootRenderLanes, !0 ); - currentSourceFiber = sourceFiber.tag; - disableLegacyMode || - 0 !== (sourceFiber.mode & 1) || - (0 !== currentSourceFiber && - 11 !== currentSourceFiber && - 15 !== currentSourceFiber) || - ((currentSourceFiber = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), - (sourceFiber.memoizedState = currentSourceFiber.memoizedState), - (sourceFiber.lanes = currentSourceFiber.lanes)) - : ((sourceFiber.updateQueue = null), - (sourceFiber.memoizedState = null))); - currentSourceFiber = suspenseHandlerStackCursor.current; - if (null !== currentSourceFiber) { - switch (currentSourceFiber.tag) { + returnFiber = suspenseHandlerStackCursor.current; + if (null !== returnFiber) { + switch (returnFiber.tag) { case 13: - if (disableLegacyMode || sourceFiber.mode & 1) + return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === currentSourceFiber.alternate && + : null === returnFiber.alternate && 0 === workInProgressRootExitStatus && - (workInProgressRootExitStatus = 3); - currentSourceFiber.flags &= -257; - disableLegacyMode || 0 !== (currentSourceFiber.mode & 1) - ? ((currentSourceFiber.flags |= 65536), - (currentSourceFiber.lanes = rootRenderLanes)) - : currentSourceFiber === returnFiber - ? (currentSourceFiber.flags |= 65536) - : ((currentSourceFiber.flags |= 128), - (sourceFiber.flags |= 131072), - (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag - ? null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= 2)); - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((returnFiber = currentSourceFiber.updateQueue), - null === returnFiber - ? (currentSourceFiber.updateQueue = new Set([value])) - : returnFiber.add(value), - (disableLegacyMode || currentSourceFiber.mode & 1) && - attachPingListener(root, value, rootRenderLanes)); - return !1; + (workInProgressRootExitStatus = 3), + (returnFiber.flags &= -257), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), + value === noopSuspenseyCommitThenable + ? (returnFiber.flags |= 16384) + : ((sourceFiber = returnFiber.updateQueue), + null === sourceFiber + ? (returnFiber.updateQueue = new Set([value])) + : sourceFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); case 22: - if (disableLegacyMode || currentSourceFiber.mode & 1) - return ( - (currentSourceFiber.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((returnFiber = currentSourceFiber.updateQueue), - null === returnFiber - ? ((returnFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (currentSourceFiber.updateQueue = returnFiber)) - : ((sourceFiber = returnFiber.retryQueue), - null === sourceFiber - ? (returnFiber.retryQueue = new Set([value])) - : sourceFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); + return ( + (returnFiber.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (returnFiber.flags |= 16384) + : ((sourceFiber = returnFiber.updateQueue), + null === sourceFiber + ? ((sourceFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (returnFiber.updateQueue = sourceFiber)) + : ((returnFiber = sourceFiber.retryQueue), + null === returnFiber + ? (sourceFiber.retryQueue = new Set([value])) + : returnFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); } - throw Error(formatProdErrorMessage(435, currentSourceFiber.tag)); + throw Error(formatProdErrorMessage(435, returnFiber.tag)); } - if (disableLegacyMode || 1 === root.tag) - return ( - attachPingListener(root, value, rootRenderLanes), - renderDidSuspendDelayIfPossible(), - !1 - ); - value = Error(formatProdErrorMessage(426)); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - currentSourceFiber = Error(formatProdErrorMessage(520), { cause: value }); - currentSourceFiber = createCapturedValueAtFiber( - currentSourceFiber, - sourceFiber - ); + var wrapperError = Error(formatProdErrorMessage(520), { cause: value }); + wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [wrapperError]) + : workInProgressRootConcurrentErrors.push(wrapperError); 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); if (null === returnFiber) return !0; value = createCapturedValueAtFiber(value, sourceFiber); @@ -4296,15 +4182,13 @@ function throwException( case 1: if ( ((sourceFiber = returnFiber.type), - (currentSourceFiber = returnFiber.stateNode), + (wrapperError = returnFiber.stateNode), 0 === (returnFiber.flags & 128) && ("function" === typeof sourceFiber.getDerivedStateFromError || - (null !== currentSourceFiber && - "function" === typeof currentSourceFiber.componentDidCatch && + (null !== wrapperError && + "function" === typeof wrapperError.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - currentSourceFiber - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError))))) ) return ( (returnFiber.flags |= 65536), @@ -4621,36 +4505,28 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { renderLanes ); } - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - if (0 !== (renderLanes & 536870912)) - (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ), - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(), - pushOffscreenSuspenseHandler(workInProgress); - else - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & 536870912)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && pushTransition(workInProgress, null, null), - reuseHiddenContextOnStack(), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -4775,47 +4651,123 @@ function updateClassComponent( pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - constructClassInstance(workInProgress, Component, nextProps), - mountClassInstance(workInProgress, Component, nextProps, renderLanes), - (nextProps = !0); - else if (null === current) { - var instance = workInProgress.stateNode, - unresolvedOldProps = workInProgress.memoizedProps, - oldProps = resolveClassComponentProps( + if (null === workInProgress.stateNode) { + var isLegacyContextConsumer = !1, + unmaskedContext = emptyContextObject; + var context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((unmaskedContext = isContextProvider(Component) + ? previousContext + : contextStackCursor$1.current), + (isLegacyContextConsumer = Component.contextTypes), + (context = (isLegacyContextConsumer = + null !== isLegacyContextConsumer && + void 0 !== isLegacyContextConsumer) + ? getMaskedContext(workInProgress, unmaskedContext) + : emptyContextObject)); + var instance = new Component(nextProps, context); + workInProgress.memoizedState = + null !== instance.state && void 0 !== instance.state + ? instance.state + : null; + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; + instance._reactInternals = workInProgress; + isLegacyContextConsumer && + ((isLegacyContextConsumer = workInProgress.stateNode), + (isLegacyContextConsumer.__reactInternalMemoizedUnmaskedChildContext = + unmaskedContext), + (isLegacyContextConsumer.__reactInternalMemoizedMaskedChildContext = + context)); + unmaskedContext = workInProgress.stateNode; + unmaskedContext.props = nextProps; + unmaskedContext.state = workInProgress.memoizedState; + unmaskedContext.refs = {}; + initializeUpdateQueue(workInProgress); + isLegacyContextConsumer = Component.contextType; + "object" === typeof isLegacyContextConsumer && + null !== isLegacyContextConsumer + ? (unmaskedContext.context = readContext(isLegacyContextConsumer)) + : ((isLegacyContextConsumer = isContextProvider(Component) + ? previousContext + : contextStackCursor$1.current), + (unmaskedContext.context = getMaskedContext( + workInProgress, + isLegacyContextConsumer + ))); + unmaskedContext.state = workInProgress.memoizedState; + isLegacyContextConsumer = Component.getDerivedStateFromProps; + "function" === typeof isLegacyContextConsumer && + (applyDerivedStateFromProps( + workInProgress, Component, - unresolvedOldProps, - workInProgress.type === workInProgress.elementType - ); - instance.props = oldProps; - var oldContext = instance.context, - contextType = Component.contextType; - "object" === typeof contextType && null !== contextType - ? (contextType = readContext(contextType)) - : ((contextType = isContextProvider(Component) + isLegacyContextConsumer, + nextProps + ), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ((isLegacyContextConsumer = unmaskedContext.state), + "function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount(), + isLegacyContextConsumer !== unmaskedContext.state && + classComponentUpdater.enqueueReplaceState( + unmaskedContext, + unmaskedContext.state, + null + ), + processUpdateQueue( + workInProgress, + nextProps, + unmaskedContext, + renderLanes + ), + suspendIfUpdateReadFromEntangledAsyncAction(), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof unmaskedContext.componentDidMount && + (workInProgress.flags |= 4194308); + nextProps = !0; + } else if (null === current) { + unmaskedContext = workInProgress.stateNode; + var unresolvedOldProps = workInProgress.memoizedProps; + isLegacyContextConsumer = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); + unmaskedContext.props = isLegacyContextConsumer; + var oldContext = unmaskedContext.context; + context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((context = isContextProvider(Component) ? previousContext : contextStackCursor$1.current), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (context = getMaskedContext(workInProgress, context))); + var getDerivedStateFromProps = Component.getDerivedStateFromProps; + instance = + "function" === typeof getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate; unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== contextType) && + instance || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((unresolvedOldProps || oldContext !== context) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, - contextType + context )); hasForceUpdate = !1; var oldState = workInProgress.memoizedState; - instance.state = oldState; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = oldState; + processUpdateQueue(workInProgress, nextProps, unmaskedContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; unresolvedOldProps || @@ -4830,49 +4782,50 @@ function updateClassComponent( nextProps ), (oldContext = workInProgress.memoizedState)), - (oldProps = + (isLegacyContextConsumer = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - oldProps, + isLegacyContextConsumer, nextProps, oldState, oldContext, - contextType + context )) - ? (hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ("function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount()), - "function" === typeof instance.componentDidMount && + ? (instance || + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ("function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount()), + "function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308)) - : ("function" === typeof instance.componentDidMount && + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = oldContext)), - (instance.props = nextProps), - (instance.state = oldContext), - (instance.context = contextType), - (nextProps = oldProps)) - : ("function" === typeof instance.componentDidMount && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = oldContext), + (unmaskedContext.context = context), + (nextProps = isLegacyContextConsumer)) + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (nextProps = !1)); } else { - instance = workInProgress.stateNode; + unmaskedContext = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + isLegacyContextConsumer = workInProgress.memoizedProps; + context = resolveClassComponentProps( Component, - oldProps, + isLegacyContextConsumer, workInProgress.type === workInProgress.elementType ); - instance.props = contextType; - hasNewLifecycles = workInProgress.pendingProps; - unresolvedOldProps = instance.context; + unmaskedContext.props = context; + instance = workInProgress.pendingProps; + unresolvedOldProps = unmaskedContext.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -4883,23 +4836,24 @@ function updateClassComponent( oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = "function" === typeof oldState || - "function" === typeof instance.getSnapshotBeforeUpdate) || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate) || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((isLegacyContextConsumer !== instance || + unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, oldContext )); hasForceUpdate = !1; unresolvedOldProps = workInProgress.memoizedState; - instance.state = unresolvedOldProps; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = unresolvedOldProps; + processUpdateQueue(workInProgress, nextProps, unmaskedContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; - oldProps !== hasNewLifecycles || + isLegacyContextConsumer !== instance || unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || @@ -4914,12 +4868,12 @@ function updateClassComponent( nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, @@ -4929,91 +4883,89 @@ function updateClassComponent( null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || - ("function" !== typeof instance.UNSAFE_componentWillUpdate && - "function" !== typeof instance.componentWillUpdate) || - ("function" === typeof instance.componentWillUpdate && - instance.componentWillUpdate(nextProps, newState, oldContext), - "function" === typeof instance.UNSAFE_componentWillUpdate && - instance.UNSAFE_componentWillUpdate( + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillUpdate && + "function" !== typeof unmaskedContext.componentWillUpdate) || + ("function" === typeof unmaskedContext.componentWillUpdate && + unmaskedContext.componentWillUpdate( + nextProps, + newState, + oldContext + ), + "function" === + typeof unmaskedContext.UNSAFE_componentWillUpdate && + unmaskedContext.UNSAFE_componentWillUpdate( nextProps, newState, oldContext )), - "function" === typeof instance.componentDidUpdate && + "function" === typeof unmaskedContext.componentDidUpdate && (workInProgress.flags |= 4), - "function" === typeof instance.getSnapshotBeforeUpdate && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate && (workInProgress.flags |= 1024)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), - (instance.props = nextProps), - (instance.state = newState), - (instance.context = oldContext), - (nextProps = contextType)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); -} -function finishClassComponent( - current, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes -) { + unmaskedContext = nextProps; markRef(current, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) - ); - shouldUpdate = workInProgress.stateNode; - var nextChildren = - didCaptureError && "function" !== typeof Component.getDerivedStateFromError - ? null - : shouldUpdate.render(); - workInProgress.flags |= 1; - null !== current && didCaptureError - ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + (isLegacyContextConsumer = + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? null + : unmaskedContext.render()), + (workInProgress.flags |= 1), + null !== current && nextProps + ? ((workInProgress.child = reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + isLegacyContextConsumer, + renderLanes + ))) + : reconcileChildren( + current, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current = bailoutOnAlreadyFinishedWork( + current, workInProgress, - null, - nextChildren, renderLanes - ))) - : reconcileChildren(current, workInProgress, nextChildren, renderLanes); - workInProgress.memoizedState = shouldUpdate.state; - hasContext && invalidateContextProvider(workInProgress, Component, !0); - return workInProgress.child; + ))); + return current; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; @@ -5079,18 +5031,18 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = nextPrimaryChildren.updateQueue), - null === current + (renderLanes = nextPrimaryChildren.updateQueue), + null === renderLanes ? (nextPrimaryChildren.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), nextProps ); if ("number" === typeof nextProps.unstable_expectedLoadTime) @@ -5136,11 +5088,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), (showFallback = workInProgress.mode), - (nextProps = createFiberFromOffscreen( + (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback, - 0, - null + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, @@ -5153,13 +5103,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (nextPrimaryChildren.return = workInProgress), (nextProps.sibling = nextPrimaryChildren), (workInProgress.child = nextProps), - (disableLegacyMode || 0 !== (workInProgress.mode & 1)) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), (nextProps = workInProgress.child), (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), @@ -5269,17 +5218,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextPrimaryChildren = nextProps.fallback; showFallback = workInProgress.mode; didSuspend = current.child; - var currentFallbackChildFragment = didSuspend.sibling, - primaryChildProps = { mode: "hidden", children: nextProps.children }; - disableLegacyMode || - 0 !== (showFallback & 1) || - workInProgress.child === didSuspend - ? ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), - (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280)) - : ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - (workInProgress.deletions = null)); + var currentFallbackChildFragment = didSuspend.sibling; + nextProps = createWorkInProgress(didSuspend, { + mode: "hidden", + children: nextProps.children + }); + nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280; null !== currentFallbackChildFragment ? (nextPrimaryChildren = createWorkInProgress( currentFallbackChildFragment, @@ -5317,33 +5261,34 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { cachePool: didSuspend })); nextPrimaryChildren.memoizedState = showFallback; - enableTransitionTracing && + if ( + enableTransitionTracing && ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== showFallback && - ((didSuspend = enableTransitionTracing - ? markerInstanceStack.current - : null), - (currentFallbackChildFragment = nextPrimaryChildren.updateQueue), - (primaryChildProps = current.updateQueue), - null === currentFallbackChildFragment + null !== showFallback) + ) { + didSuspend = enableTransitionTracing ? markerInstanceStack.current : null; + currentFallbackChildFragment = nextPrimaryChildren.updateQueue; + var currentOffscreenQueue = current.updateQueue; + null === currentFallbackChildFragment + ? (nextPrimaryChildren.updateQueue = { + transitions: showFallback, + markerInstances: didSuspend, + retryQueue: null + }) + : currentFallbackChildFragment === currentOffscreenQueue ? (nextPrimaryChildren.updateQueue = { transitions: showFallback, markerInstances: didSuspend, - retryQueue: null + retryQueue: + null !== currentOffscreenQueue + ? currentOffscreenQueue.retryQueue + : null }) - : currentFallbackChildFragment === primaryChildProps - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, - markerInstances: didSuspend, - retryQueue: - null !== primaryChildProps - ? primaryChildProps.retryQueue - : null - }) - : ((currentFallbackChildFragment.transitions = showFallback), - (currentFallbackChildFragment.markerInstances = didSuspend)))); + : ((currentFallbackChildFragment.transitions = showFallback), + (currentFallbackChildFragment.markerInstances = didSuspend)); + } nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -5353,32 +5298,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return nextProps; } pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_temp = current.child; - current = JSCompiler_temp.sibling; - JSCompiler_temp = createWorkInProgress(JSCompiler_temp, { + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { mode: "visible", children: nextProps.children }); - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - (JSCompiler_temp.lanes = renderLanes); - JSCompiler_temp.return = workInProgress; - JSCompiler_temp.sibling = null; + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_temp = workInProgress.deletions), + null === JSCompiler_temp ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_temp; + : JSCompiler_temp.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_temp; + return renderLanes; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = createFiberFromOffscreen( + primaryChildren = mountWorkInProgressOffscreenFiber( { mode: "visible", children: primaryChildren }, - workInProgress.mode, - 0, - null + workInProgress.mode ); primaryChildren.return = workInProgress; return (workInProgress.child = primaryChildren); @@ -5389,30 +5329,26 @@ function mountSuspenseFallbackChildren( fallbackChildren, renderLanes ) { - var mode = workInProgress.mode, - progressedPrimaryFragment = workInProgress.child; - primaryChildren = { mode: "hidden", children: primaryChildren }; - disableLegacyMode || 0 !== (mode & 1) || null === progressedPrimaryFragment - ? (progressedPrimaryFragment = createFiberFromOffscreen( - primaryChildren, - mode, - 0, - null - )) - : ((progressedPrimaryFragment.childLanes = 0), - (progressedPrimaryFragment.pendingProps = primaryChildren)); + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); fallbackChildren = createFiberFromFragment( fallbackChildren, mode, renderLanes, null ); - progressedPrimaryFragment.return = workInProgress; + primaryChildren.return = workInProgress; fallbackChildren.return = workInProgress; - progressedPrimaryFragment.sibling = fallbackChildren; - workInProgress.child = progressedPrimaryFragment; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; return fallbackChildren; } +function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + return createFiberFromOffscreen(offscreenProps, mode, 0, null); +} function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -5490,68 +5426,57 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { nextProps &= 1; } push(suspenseStackCursor, nextProps); - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); + break; + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - else workInProgress.memoizedState = null; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; + } + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); + break; + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); + break; + default: + workInProgress.memoizedState = null; + } return workInProgress.child; } -function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - null === current || - ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); -} function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); workInProgressRootSkippedLanes |= workInProgress.lanes; @@ -5712,12 +5637,11 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - var elementType = workInProgress.elementType; a: { - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); var props = workInProgress.pendingProps; - current = elementType._init; - current = current(elementType._payload); + current = workInProgress.elementType; + var init = current._init; + current = init(current._payload); workInProgress.type = current; if ("function" === typeof current) shouldConstruct(current) @@ -5743,10 +5667,7 @@ function beginWork(current, workInProgress, renderLanes) { ))); else { if (void 0 !== current && null !== current) - if ( - ((elementType = current.$$typeof), - elementType === REACT_FORWARD_REF_TYPE) - ) { + if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { props = disableDefaultPropsExceptForClasses ? props : resolveDefaultPropsOnNonClassComponent(current, props); @@ -5759,7 +5680,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes ); break a; - } else if (elementType === REACT_MEMO_TYPE) { + } else if (init === REACT_MEMO_TYPE) { props = disableDefaultPropsExceptForClasses ? props : resolveDefaultPropsOnNonClassComponent(current, props); @@ -5783,42 +5704,36 @@ function beginWork(current, workInProgress, renderLanes) { case 0: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), updateFunctionComponent( current, workInProgress, props, - elementType, + init, renderLanes ) ); case 1: return ( (props = workInProgress.type), - (elementType = resolveClassComponentProps( + (init = resolveClassComponentProps( props, workInProgress.pendingProps, workInProgress.elementType === props )), - updateClassComponent( - current, - workInProgress, - props, - elementType, - renderLanes - ) + updateClassComponent(current, workInProgress, props, init, renderLanes) ); case 3: pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); var nextProps = workInProgress.pendingProps; - elementType = workInProgress.memoizedState; - props = elementType.element; + init = workInProgress.memoizedState; + props = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; @@ -5827,7 +5742,7 @@ function beginWork(current, workInProgress, renderLanes) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== elementType.cache && + nextCache !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -5835,14 +5750,14 @@ function beginWork(current, workInProgress, renderLanes) { !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - elementType = nextProps.element; - elementType === props + init = nextProps.element; + init === props ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, elementType, renderLanes), + : (reconcileChildren(current, workInProgress, init, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: @@ -5850,17 +5765,17 @@ function beginWork(current, workInProgress, renderLanes) { case 5: return ( pushHostContext(workInProgress), - (elementType = workInProgress.type), + (init = workInProgress.type), (nextProps = workInProgress.pendingProps), (nextCache = null !== current ? current.memoizedProps : null), (props = nextProps.children), - shouldSetTextContent(elementType, nextProps) + shouldSetTextContent(init, nextProps) ? (props = null) : null !== nextCache && - shouldSetTextContent(elementType, nextCache) && + shouldSetTextContent(init, nextCache) && (workInProgress.flags |= 32), null !== workInProgress.memoizedState && - ((elementType = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -5868,7 +5783,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = elementType)), + (HostTransitionContext._currentValue2 = init)), markRef(current, workInProgress), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child @@ -5897,19 +5812,13 @@ function beginWork(current, workInProgress, renderLanes) { case 11: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - updateForwardRef( - current, - workInProgress, - props, - elementType, - renderLanes - ) + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + updateForwardRef(current, workInProgress, props, init, renderLanes) ); case 7: return ( @@ -5956,13 +5865,13 @@ function beginWork(current, workInProgress, renderLanes) { ); case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress), - (elementType = readContext(elementType)), - (props = props(elementType)), + (init = readContext(init)), + (props = props(init)), (workInProgress.flags |= 1), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child @@ -5970,20 +5879,14 @@ function beginWork(current, workInProgress, renderLanes) { case 14: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props.type, elementType)), - updateMemoComponent( - current, - workInProgress, - props, - elementType, - renderLanes - ) + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) ); case 15: return updateSimpleMemoComponent( @@ -5993,47 +5896,6 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - isContextProvider(props) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1); - prepareToReadContext(workInProgress); - constructClassInstance(workInProgress, props, elementType); - mountClassInstance(workInProgress, props, elementType, renderLanes); - return finishClassComponent( - null, - workInProgress, - props, - !0, - current, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - props, - elementType, - renderLanes - ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: @@ -6052,38 +5914,34 @@ function beginWork(current, workInProgress, renderLanes) { prepareToReadContext(workInProgress), (props = readContext(CacheContext)), null === current - ? ((elementType = peekCacheFromPool()), - null === elementType && - ((elementType = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (elementType.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && - (elementType.pooledCacheLanes |= renderLanes), - (elementType = nextProps)), - (workInProgress.memoizedState = { - parent: props, - cache: elementType - }), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, elementType)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (elementType = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - elementType.parent !== props - ? ((elementType = { parent: props, cache: props }), - (workInProgress.memoizedState = elementType), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - elementType), + init), pushProvider(workInProgress, CacheContext, props)) : ((props = nextProps.cache), pushProvider(workInProgress, CacheContext, props), - props !== elementType.cache && + props !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -6547,14 +6405,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$96 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$96 = lastTailNode), + for (var lastTailNode$88 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$88 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$96 + null === lastTailNode$88 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$96.sibling = null); + : (lastTailNode$88.sibling = null); } } function bubbleProperties(completedWork) { @@ -6564,19 +6422,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$97 = completedWork.child; null !== child$97; ) - (newChildLanes |= child$97.lanes | child$97.childLanes), - (subtreeFlags |= child$97.subtreeFlags & 31457280), - (subtreeFlags |= child$97.flags & 31457280), - (child$97.return = completedWork), - (child$97 = child$97.sibling); + for (var child$89 = completedWork.child; null !== child$89; ) + (newChildLanes |= child$89.lanes | child$89.childLanes), + (subtreeFlags |= child$89.subtreeFlags & 31457280), + (subtreeFlags |= child$89.flags & 31457280), + (child$89.return = completedWork), + (child$89 = child$89.sibling); else - for (child$97 = completedWork.child; null !== child$97; ) - (newChildLanes |= child$97.lanes | child$97.childLanes), - (subtreeFlags |= child$97.subtreeFlags), - (subtreeFlags |= child$97.flags), - (child$97.return = completedWork), - (child$97 = child$97.sibling); + for (child$89 = completedWork.child; null !== child$89; ) + (newChildLanes |= child$89.lanes | child$89.childLanes), + (subtreeFlags |= child$89.subtreeFlags), + (subtreeFlags |= child$89.flags), + (child$89.return = completedWork), + (child$89 = child$89.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6584,8 +6442,6 @@ function bubbleProperties(completedWork) { function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -6598,7 +6454,8 @@ function completeWork(current, workInProgress, renderLanes) { return bubbleProperties(workInProgress), null; case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor$1)), bubbleProperties(workInProgress), null ); @@ -6755,11 +6612,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$101 = null; + var cache$93 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$101 = newProps.memoizedState.cachePool.pool); - cache$101 !== instance && (newProps.flags |= 2048); + (cache$93 = newProps.memoizedState.cachePool.pool); + cache$93 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6782,18 +6639,13 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress), null ); - case 17: - if (disableLegacyMode) break; - isContextProvider(workInProgress.type) && popContext(); - bubbleProperties(workInProgress); - return null; case 19: pop(suspenseStackCursor); instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$101 = instance.rendering; - if (null === cache$101) + cache$93 = instance.rendering; + if (null === cache$93) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6801,11 +6653,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$101 = findFirstSuspended(current); - if (null !== cache$101) { + cache$93 = findFirstSuspended(current); + if (null !== cache$93) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$101.updateQueue; + current = cache$93.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6830,7 +6682,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$101)), null !== current)) { + if (((current = findFirstSuspended(cache$93)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6840,7 +6692,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$101.alternate) + !cache$93.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6852,13 +6704,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$101.sibling = workInProgress.child), - (workInProgress.child = cache$101)) + ? ((cache$93.sibling = workInProgress.child), + (workInProgress.child = cache$93)) : ((current = instance.last), null !== current - ? (current.sibling = cache$101) - : (workInProgress.child = cache$101), - (instance.last = cache$101)); + ? (current.sibling = cache$93) + : (workInProgress.child = cache$93), + (instance.last = cache$93)); } if (null !== instance.tail) return ( @@ -6898,14 +6750,14 @@ function completeWork(current, workInProgress, renderLanes) { ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || (!disableLegacyMode && 0 === (workInProgress.mode & 1)) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & 536870912) && + newProps + ? 0 !== (renderLanes & 536870912) && 0 === (workInProgress.flags & 128) && (bubbleProperties(workInProgress), 23 !== workInProgress.tag && workInProgress.subtreeFlags & 6 && - (workInProgress.flags |= 8192)), + (workInProgress.flags |= 8192)) + : bubbleProperties(workInProgress), (renderLanes = workInProgress.updateQueue), null !== renderLanes && scheduleRetryEffect(workInProgress, renderLanes.retryQueue), @@ -6941,8 +6793,6 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -6950,7 +6800,8 @@ function unwindWork(current, workInProgress) { switch (workInProgress.tag) { case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor$1)), (current = workInProgress.flags), current & 65536 ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) @@ -7030,7 +6881,9 @@ function unwindInterruptedWork(current, interruptedWork) { switch (interruptedWork.tag) { case 1: current = interruptedWork.type.childContextTypes; - null !== current && void 0 !== current && popContext(); + null !== current && + void 0 !== current && + (pop(didPerformWorkStackCursor), pop(contextStackCursor$1)); break; case 3: popProvider(CacheContext); @@ -7206,8 +7059,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$120) { - captureCommitPhaseError(current, nearestMountedAncestor, error$120); + } catch (error$111) { + captureCommitPhaseError(current, nearestMountedAncestor, error$111); } else ref.current = null; } @@ -7432,11 +7285,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$119) { + } catch (error$110) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$119 + error$110 ); } } @@ -7476,30 +7329,25 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevProps = - null !== finishedWork.memoizedState || offscreenSubtreeIsHidden), - !prevProps) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + prevProps = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevProps) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevProps; + (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -7839,21 +7687,15 @@ function commitDeletionEffectsOnFiber( case 22: offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor); - disableLegacyMode || deletedFiber.mode & 1 - ? ((offscreenSubtreeWasHidden = - (child = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ), - (offscreenSubtreeWasHidden = child)) - : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + offscreenSubtreeWasHidden = + (child = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState; + recursivelyTraverseDeletionEffects( + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); + offscreenSubtreeWasHidden = child; break; default: recursivelyTraverseDeletionEffects( @@ -8064,16 +7906,14 @@ function commitMutationEffectsOnFiber(finishedWork, root) { safelyDetachRef(current, current.return)); instance = null !== finishedWork.memoizedState; suspenseCallback = null !== current && null !== current.memoizedState; - if (disableLegacyMode || finishedWork.mode & 1) { - retryQueue = offscreenSubtreeIsHidden; - var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = retryQueue || instance; - offscreenSubtreeWasHidden = - prevOffscreenSubtreeWasHidden || suspenseCallback; - recursivelyTraverseMutationEffects(root, finishedWork); - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = retryQueue; - } else recursivelyTraverseMutationEffects(root, finishedWork); + retryQueue = offscreenSubtreeIsHidden; + var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = retryQueue || instance; + offscreenSubtreeWasHidden = + prevOffscreenSubtreeWasHidden || suspenseCallback; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = retryQueue; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -8089,8 +7929,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null === current || suspenseCallback || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -8196,12 +8035,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$121 = JSCompiler_inline_result.stateNode.containerInfo, - before$122 = getHostSibling(finishedWork); + var parent$112 = JSCompiler_inline_result.stateNode.containerInfo, + before$113 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$122, - parent$121 + before$113, + parent$112 ); break; default: @@ -8571,18 +8410,7 @@ function commitPassiveMountOnFiber( committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((nextCache._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) + : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork) : nextCache._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -8680,9 +8508,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$131 = finishedWork.stateNode; + var instance$122 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$131._visibility & 4 + ? instance$122._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8690,20 +8518,11 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((instance$131._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$131._visibility |= 4), + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) + : ((instance$122._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8716,7 +8535,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$131 + instance$122 ); break; case 24: @@ -9123,16 +8942,14 @@ var legacyErrorBoundariesThatAlreadyFailed = null, pendingPassiveTransitions = null, nestedUpdateCount = 0, rootWithNestedUpdates = null; -function requestUpdateLane(fiber) { - fiber = fiber.mode; - return disableLegacyMode || 0 !== (fiber & 1) - ? 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes - ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes - : null !== ReactSharedInternals.T - ? ((fiber = currentEntangledLane), - 0 !== fiber ? fiber : requestTransitionLane()) - : currentUpdatePriority || 32 - : 2; +function requestUpdateLane() { + if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) + return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; + if (null !== ReactSharedInternals.T) { + var actionScopeLane = currentEntangledLane; + return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane(); + } + return currentUpdatePriority || 32; } function requestDeferredLane() { 0 === workInProgressDeferredLane && @@ -9158,21 +8975,20 @@ function scheduleUpdateOnFiber(root, fiber, lane) { ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { - if (enableTransitionTracing) { - var transition = ReactSharedInternals.T; - if ( - null !== transition && - null != transition.name && - (-1 === transition.startTime && (transition.startTime = now()), - enableTransitionTracing) - ) { - var transitionLanesMap = root.transitionLanes, - index$9 = 31 - clz32(lane), - transitions = transitionLanesMap[index$9]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index$9] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index$9 = 31 - clz32(lane), + transitions = transitionLanesMap[index$9]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index$9] = transitions; } root === workInProgressRoot && (0 === (executionContext & 2) && @@ -9185,12 +9001,6 @@ function scheduleUpdateOnFiber(root, fiber, lane) { workInProgressRootDidSkipSuspendedSiblings )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ((workInProgressRootRenderTargetTime = now() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { @@ -9221,10 +9031,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = !1; continue; } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { + if (2 === exitStatus) { renderWasConcurrent = lanes; if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) var JSCompiler_inline_result = 0; @@ -9648,8 +9455,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$139) { - handleThrow(root, thrownValue$139); + } catch (thrownValue$130) { + handleThrow(root, thrownValue$130); } while (1); lanes && root.shellSuspendCounter++; @@ -9764,8 +9571,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$141) { - handleThrow(root, thrownValue$141); + } catch (thrownValue$132) { + handleThrow(root, thrownValue$132); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -10036,9 +9843,7 @@ function commitRootImpl( renderPriorityLevel(remainingLanes.value, { componentStack: remainingLanes.stack }); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -10201,10 +10006,7 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || 0 !== (retryLane & 1) ? claimNextRetryLane() : 2)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -10400,12 +10202,10 @@ function createFiberFromTypeAndProps( return createFiberFromFragment(pendingProps.children, mode, lanes, key); case REACT_STRICT_MODE_TYPE: fiberTag = 8; - mode |= 8; - if (disableLegacyMode || 0 !== (mode & 1)) - (mode |= 16), - enableDO_NOT_USE_disableStrictPassiveEffect && - pendingProps.DO_NOT_USE_disableStrictPassiveEffect && - (mode |= 64); + mode |= 24; + enableDO_NOT_USE_disableStrictPassiveEffect && + pendingProps.DO_NOT_USE_disableStrictPassiveEffect && + (mode |= 64); break; case REACT_PROFILER_TYPE: return ( @@ -10578,7 +10378,7 @@ function FiberRootNode( onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -10723,10 +10523,9 @@ var slice = Array.prototype.slice, +_this$props.height, this._tagRef ); - var tag = disableLegacyMode ? 1 : 0; _this$props = new FiberRootNode( this._surface, - tag, + 1, !1, "", void 0, @@ -10736,19 +10535,19 @@ var slice = Array.prototype.slice, ); _this$props.hydrationCallbacks = null; enableTransitionTracing && (_this$props.transitionCallbacks = void 0); - tag = createFiber(3, null, null, disableLegacyMode || 1 === tag ? 1 : 0); - _this$props.current = tag; - tag.stateNode = _this$props; + var JSCompiler_inline_result = createFiber(3, null, null, 1); + _this$props.current = JSCompiler_inline_result; + JSCompiler_inline_result.stateNode = _this$props; var initialCache = createCache(); initialCache.refCount++; _this$props.pooledCache = initialCache; initialCache.refCount++; - tag.memoizedState = { + JSCompiler_inline_result.memoizedState = { element: null, isDehydrated: !1, cache: initialCache }; - initializeUpdateQueue(tag); + initializeUpdateQueue(JSCompiler_inline_result); this._mountNode = _this$props; updateContainerSync(this.props.children, this._mountNode, this); flushSyncWork(); @@ -10810,27 +10609,27 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1453 = { +var internals$jscomp$inline_1464 = { bundleType: 0, - version: "19.0.0-www-classic-e1378902-20241106", + version: "19.0.0-www-classic-682a103c-20241107", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1454 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1465 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1454.isDisabled && - hook$jscomp$inline_1454.supportsFiber + !hook$jscomp$inline_1465.isDisabled && + hook$jscomp$inline_1465.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1454.inject( - internals$jscomp$inline_1453 + (rendererID = hook$jscomp$inline_1465.inject( + internals$jscomp$inline_1464 )), - (injectedHook = hook$jscomp$inline_1454); + (injectedHook = hook$jscomp$inline_1465); } catch (err) {} } var Path = Mode$1.Path; @@ -10844,4 +10643,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-classic-e1378902-20241106"; +exports.version = "19.0.0-www-classic-682a103c-20241107"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index e24d22420bcf8..11b94da916d02 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -10327,13 +10327,13 @@ var slice = Array.prototype.slice, })(React.Component); var internals$jscomp$inline_1443 = { bundleType: 0, - version: "19.0.0-www-modern-e1378902-20241106", + version: "19.0.0-www-modern-682a103c-20241107", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1444 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -10359,4 +10359,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-modern-e1378902-20241106"; +exports.version = "19.0.0-www-modern-682a103c-20241107"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 00a38f7b0606c..87392ae853eba 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -281,9 +281,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -714,19 +711,6 @@ __DEV__ && } return null; } - function findCurrentHostFiberWithNoPortalsImpl(node) { - var tag = node.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node; - for (node = node.child; null !== node; ) { - if ( - 4 !== node.tag && - ((tag = findCurrentHostFiberWithNoPortalsImpl(node)), null !== tag) - ) - return tag; - node = node.sibling; - } - return null; - } function isFiberSuspenseAndTimedOut(fiber) { var memoizedState = fiber.memoizedState; return ( @@ -1086,10 +1070,10 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - !enableSiblingPrerendering || - 0 === suspendedRetryLanes || - 0 !== updatedLanes || - (disableLegacyMode && 0 === root.tag) || + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } @@ -3880,10 +3864,6 @@ __DEV__ && scheduleImmediateTask(processRootScheduleInMicrotask)); enableDeferRootSchedulingToMicrotask || scheduleTaskForRootDuringMicrotask(root, now$1()); - !disableLegacyMode && - ReactSharedInternals.isBatchingLegacy && - 0 === root.tag && - (ReactSharedInternals.didScheduleLegacyUpdate = !0); } function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { if (!isFlushingWork && mightHavePendingSyncWork) { @@ -3891,7 +3871,7 @@ __DEV__ && do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) + if (!onlyLegacy) if (0 !== syncTransitionLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) var nextLanes = 0; @@ -5585,15 +5565,7 @@ __DEV__ && thenableState$1 = null; return firstChildFiber; } catch (x) { - if ( - x === SuspenseException || - (!disableLegacyMode && - (returnFiber.mode & ConcurrentMode) === NoMode && - "object" === typeof x && - null !== x && - "function" === typeof x.then) - ) - throw x; + if (x === SuspenseException) throw x; var fiber = createFiber(29, x, null, returnFiber.mode); fiber.lanes = lanes; fiber.return = returnFiber; @@ -5884,9 +5856,8 @@ __DEV__ && currentlyRenderingFiber$1 = null; hookTypesUpdateIndexDev = -1; - null === current || - (current.flags & 31457280) === (workInProgress.flags & 31457280) || - (!disableLegacyMode && (current.mode & ConcurrentMode) === NoMode) || + null !== current && + (current.flags & 31457280) !== (workInProgress.flags & 31457280) && error$jscomp$0( "Internal React error: Expected static flag was missing. Please notify the React team." ); @@ -7435,7 +7406,7 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } - function warnOnInvalidCallback$1(callback) { + function warnOnInvalidCallback(callback) { if (null !== callback && "function" !== typeof callback) { var key = String(callback); didWarnOnInvalidCallback.has(key) || @@ -7517,124 +7488,6 @@ __DEV__ && ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0; } - function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = !1, - unmaskedContext = emptyContextObject; - var context = ctor.contextType; - if ( - "contextType" in ctor && - null !== context && - (void 0 === context || context.$$typeof !== REACT_CONTEXT_TYPE) && - !didWarnAboutInvalidateContextType.has(ctor) - ) { - didWarnAboutInvalidateContextType.add(ctor); - var addendum = - void 0 === context - ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." - : "object" !== typeof context - ? " However, it is set to a " + typeof context + "." - : context.$$typeof === REACT_CONSUMER_TYPE - ? " Did you accidentally pass the Context.Consumer instead?" - : " However, it is set to an object with keys {" + - Object.keys(context).join(", ") + - "}."; - error$jscomp$0( - "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", - getComponentNameFromType(ctor) || "Component", - addendum - ); - } - "object" === typeof context && null !== context - ? (context = readContext(context)) - : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (isLegacyContextConsumer = ctor.contextTypes), - (context = (isLegacyContextConsumer = - null !== isLegacyContextConsumer && - void 0 !== isLegacyContextConsumer) - ? getMaskedContext(workInProgress, unmaskedContext) - : emptyContextObject)); - addendum = new ctor(props, context); - if (workInProgress.mode & StrictLegacyMode) { - setIsStrictModeForDevtools(!0); - try { - addendum = new ctor(props, context); - } finally { - setIsStrictModeForDevtools(!1); - } - } - props = workInProgress.memoizedState = - null !== addendum.state && void 0 !== addendum.state - ? addendum.state - : null; - addendum.updater = classComponentUpdater; - workInProgress.stateNode = addendum; - addendum._reactInternals = workInProgress; - addendum._reactInternalInstance = fakeInternalInstance; - "function" === typeof ctor.getDerivedStateFromProps && - null === props && - ((props = getComponentNameFromType(ctor) || "Component"), - didWarnAboutUninitializedState.has(props) || - (didWarnAboutUninitializedState.add(props), - error$jscomp$0( - "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", - props, - null === addendum.state ? "null" : "undefined", - props - ))); - if ( - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof addendum.getSnapshotBeforeUpdate - ) { - var foundWillReceivePropsName = (props = null), - foundWillUpdateName = null; - "function" === typeof addendum.componentWillMount && - !0 !== addendum.componentWillMount.__suppressDeprecationWarning - ? (props = "componentWillMount") - : "function" === typeof addendum.UNSAFE_componentWillMount && - (props = "UNSAFE_componentWillMount"); - "function" === typeof addendum.componentWillReceiveProps && - !0 !== addendum.componentWillReceiveProps.__suppressDeprecationWarning - ? (foundWillReceivePropsName = "componentWillReceiveProps") - : "function" === typeof addendum.UNSAFE_componentWillReceiveProps && - (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps"); - "function" === typeof addendum.componentWillUpdate && - !0 !== addendum.componentWillUpdate.__suppressDeprecationWarning - ? (foundWillUpdateName = "componentWillUpdate") - : "function" === typeof addendum.UNSAFE_componentWillUpdate && - (foundWillUpdateName = "UNSAFE_componentWillUpdate"); - if ( - null !== props || - null !== foundWillReceivePropsName || - null !== foundWillUpdateName - ) { - var _componentName = getComponentNameFromType(ctor) || "Component"; - ctor = - "function" === typeof ctor.getDerivedStateFromProps - ? "getDerivedStateFromProps()" - : "getSnapshotBeforeUpdate()"; - didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) || - (didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName), - error$jscomp$0( - "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", - _componentName, - ctor, - null !== props ? "\n " + props : "", - null !== foundWillReceivePropsName - ? "\n " + foundWillReceivePropsName - : "", - null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" - )); - } - } - isLegacyContextConsumer && - ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); - return addendum; - } function callComponentWillReceiveProps( workInProgress, instance, @@ -7661,202 +7514,6 @@ __DEV__ && null )); } - function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode, - name = getComponentNameFromType(ctor) || "Component"; - instance.render || - (ctor.prototype && "function" === typeof ctor.prototype.render - ? error$jscomp$0( - "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", - name - ) - : error$jscomp$0( - "No `render` method found on the %s instance: you may have forgotten to define `render`.", - name - )); - !instance.getInitialState || - instance.getInitialState.isReactClassApproved || - instance.state || - error$jscomp$0( - "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", - name - ); - instance.getDefaultProps && - !instance.getDefaultProps.isReactClassApproved && - error$jscomp$0( - "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", - name - ); - instance.contextType && - error$jscomp$0( - "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", - name - ); - instance.contextTypes && - error$jscomp$0( - "contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", - name - ); - ctor.contextType && - ctor.contextTypes && - !didWarnAboutContextTypeAndContextTypes.has(ctor) && - (didWarnAboutContextTypeAndContextTypes.add(ctor), - error$jscomp$0( - "%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", - name - )); - ctor.childContextTypes && - !didWarnAboutChildContextTypes.has(ctor) && - (didWarnAboutChildContextTypes.add(ctor), - error$jscomp$0( - "%s uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead. (https://react.dev/link/legacy-context)", - name - )); - ctor.contextTypes && - !didWarnAboutContextTypes$1.has(ctor) && - (didWarnAboutContextTypes$1.add(ctor), - error$jscomp$0( - "%s uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", - name - )); - "function" === typeof instance.componentShouldUpdate && - error$jscomp$0( - "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", - name - ); - ctor.prototype && - ctor.prototype.isPureReactComponent && - "undefined" !== typeof instance.shouldComponentUpdate && - error$jscomp$0( - "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", - getComponentNameFromType(ctor) || "A pure component" - ); - "function" === typeof instance.componentDidUnmount && - error$jscomp$0( - "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", - name - ); - "function" === typeof instance.componentDidReceiveProps && - error$jscomp$0( - "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", - name - ); - "function" === typeof instance.componentWillRecieveProps && - error$jscomp$0( - "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", - name - ); - "function" === typeof instance.UNSAFE_componentWillRecieveProps && - error$jscomp$0( - "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", - name - ); - var hasMutatedProps = instance.props !== newProps; - void 0 !== instance.props && - hasMutatedProps && - error$jscomp$0( - "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", - name - ); - instance.defaultProps && - error$jscomp$0( - "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", - name, - name - ); - "function" !== typeof instance.getSnapshotBeforeUpdate || - "function" === typeof instance.componentDidUpdate || - didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor) || - (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor), - error$jscomp$0( - "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", - getComponentNameFromType(ctor) - )); - "function" === typeof instance.getDerivedStateFromProps && - error$jscomp$0( - "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - name - ); - "function" === typeof instance.getDerivedStateFromError && - error$jscomp$0( - "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - name - ); - "function" === typeof ctor.getSnapshotBeforeUpdate && - error$jscomp$0( - "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", - name - ); - (hasMutatedProps = instance.state) && - ("object" !== typeof hasMutatedProps || isArrayImpl(hasMutatedProps)) && - error$jscomp$0("%s.state: must be set to an object or null", name); - "function" === typeof instance.getChildContext && - "object" !== typeof ctor.childContextTypes && - error$jscomp$0( - "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", - name - ); - instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = {}; - initializeUpdateQueue(workInProgress); - name = ctor.contextType; - "object" === typeof name && null !== name - ? (instance.context = readContext(name)) - : ((name = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (instance.context = getMaskedContext(workInProgress, name))); - instance.state === newProps && - ((name = getComponentNameFromType(ctor) || "Component"), - didWarnAboutDirectlyAssigningPropsToState.has(name) || - (didWarnAboutDirectlyAssigningPropsToState.add(name), - error$jscomp$0( - "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", - name - ))); - workInProgress.mode & StrictLegacyMode && - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - instance - ); - ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( - workInProgress, - instance - ); - instance.state = workInProgress.memoizedState; - name = ctor.getDerivedStateFromProps; - "function" === typeof name && - (applyDerivedStateFromProps(workInProgress, ctor, name, newProps), - (instance.state = workInProgress.memoizedState)); - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ((ctor = instance.state), - "function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount(), - ctor !== instance.state && - (error$jscomp$0( - "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", - getComponentNameFromFiber(workInProgress) || "Component" - ), - classComponentUpdater.enqueueReplaceState( - instance, - instance.state, - null - )), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (instance.state = workInProgress.memoizedState)); - "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308); - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 67108864); - } function resolveClassComponentProps( Component, baseProps, @@ -8045,39 +7702,6 @@ __DEV__ && )); }); } - function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ) { - if ( - !disableLegacyMode && - (suspenseBoundary.mode & ConcurrentMode) === NoMode - ) - return ( - suspenseBoundary === returnFiber - ? (suspenseBoundary.flags |= 65536) - : ((suspenseBoundary.flags |= 128), - (sourceFiber.flags |= 131072), - (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag - ? null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = ForceUpdate), - enqueueUpdate(sourceFiber, returnFiber, 2)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= 2)), - suspenseBoundary - ); - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; - } function throwException( root, returnFiber, @@ -8092,117 +7716,80 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + returnFiber = sourceFiber.alternate; + null !== returnFiber && propagateParentContextChanges( - currentSourceFiber, + returnFiber, sourceFiber, rootRenderLanes, !0 ); - currentSourceFiber = sourceFiber.tag; - disableLegacyMode || - (sourceFiber.mode & ConcurrentMode) !== NoMode || - (0 !== currentSourceFiber && - 11 !== currentSourceFiber && - 15 !== currentSourceFiber) || - ((currentSourceFiber = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), - (sourceFiber.memoizedState = currentSourceFiber.memoizedState), - (sourceFiber.lanes = currentSourceFiber.lanes)) - : ((sourceFiber.updateQueue = null), - (sourceFiber.memoizedState = null))); - isHydrating && - (disableLegacyMode || sourceFiber.mode & ConcurrentMode) && - (didSuspendOrErrorDEV = !0); + isHydrating && (didSuspendOrErrorDEV = !0); enableDebugTracing && sourceFiber.mode & DebugTracingMode && - ((currentSourceFiber = - getComponentNameFromFiber(sourceFiber) || "Unknown"), - logComponentSuspended(currentSourceFiber, value)); - currentSourceFiber = suspenseHandlerStackCursor.current; - if (null !== currentSourceFiber) { - switch (currentSourceFiber.tag) { + ((sourceFiber = getComponentNameFromFiber(sourceFiber) || "Unknown"), + logComponentSuspended(sourceFiber, value)); + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 13: - if (disableLegacyMode || sourceFiber.mode & ConcurrentMode) + return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === currentSourceFiber.alternate && + : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && - (workInProgressRootExitStatus = RootSuspended); - currentSourceFiber.flags &= -257; - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes + (workInProgressRootExitStatus = RootSuspended), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 ); - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? (currentSourceFiber.updateQueue = new Set([value])) - : sourceFiber.add(value), - (disableLegacyMode || - currentSourceFiber.mode & ConcurrentMode) && - attachPingListener(root, value, rootRenderLanes)); - return !1; case 22: - if (disableLegacyMode || currentSourceFiber.mode & ConcurrentMode) - return ( - (currentSourceFiber.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? ((sourceFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (currentSourceFiber.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); + return ( + (sourceFiber.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); } throw Error( "Unexpected Suspense handler tag (" + - currentSourceFiber.tag + + sourceFiber.tag + "). This is a bug in React." ); } - if (disableLegacyMode || 1 === root.tag) - return ( - attachPingListener(root, value, rootRenderLanes), - renderDidSuspendDelayIfPossible(), - !1 - ); - value = Error( - "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition." - ); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - if ( - isHydrating && - (disableLegacyMode || sourceFiber.mode & ConcurrentMode) - ) + if (isHydrating) return ( (didSuspendOrErrorDEV = !0), - (currentSourceFiber = suspenseHandlerStackCursor.current), - null !== currentSourceFiber - ? (0 === (currentSourceFiber.flags & 65536) && - (currentSourceFiber.flags |= 256), - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && queueHydrationError( createCapturedValueAtFiber( @@ -8227,10 +7814,10 @@ __DEV__ && (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -8238,7 +7825,7 @@ __DEV__ && (workInProgressRootExitStatus = RootErrored)), !1 ); - currentSourceFiber = createCapturedValueAtFiber( + var error = createCapturedValueAtFiber( Error( "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", { cause: value } @@ -8246,58 +7833,56 @@ __DEV__ && sourceFiber ); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [error]) + : workInProgressRootConcurrentErrors.push(error); workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (returnFiber.tag) { + switch (sourceFiber.tag) { case 3: return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (returnFiber.lanes |= root), + (sourceFiber.lanes |= root), (root = createRootErrorUpdate( - returnFiber.stateNode, - sourceFiber, + sourceFiber.stateNode, + value, root )), - enqueueCapturedUpdate(returnFiber, root), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((value = returnFiber.type), - (currentSourceFiber = returnFiber.stateNode), - 0 === (returnFiber.flags & 128) && - ("function" === typeof value.getDerivedStateFromError || - (null !== currentSourceFiber && - "function" === - typeof currentSourceFiber.componentDidCatch && + ((returnFiber = sourceFiber.type), + (error = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== error && + "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - currentSourceFiber - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(error))))) ) return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (returnFiber.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - returnFiber, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(returnFiber, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - returnFiber = returnFiber.return; - } while (null !== returnFiber); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } function processTransitionCallbacks( @@ -8630,39 +8215,30 @@ __DEV__ && renderLanes ); } - if ( - disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode - ) - if (0 !== (renderLanes & 536870912)) - (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ), - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress), - pushOffscreenSuspenseHandler(workInProgress); - else - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & 536870912)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && pushTransition(workInProgress, null, null), - reuseHiddenContextOnStack(workInProgress), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -8820,7 +8396,7 @@ __DEV__ && return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -8859,212 +8435,578 @@ __DEV__ && ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - constructClassInstance(workInProgress, Component, nextProps), - mountClassInstance(workInProgress, Component, nextProps, renderLanes), - (state = !0); - else if (null === current) { - state = workInProgress.stateNode; - var unresolvedOldProps = workInProgress.memoizedProps; - lane = resolveClassComponentProps( - Component, - unresolvedOldProps, - workInProgress.type === workInProgress.elementType - ); - state.props = lane; - var oldContext = state.context, - contextType = Component.contextType; - "object" === typeof contextType && null !== contextType - ? (contextType = readContext(contextType)) - : ((contextType = isContextProvider(Component) + if (null === workInProgress.stateNode) { + lane = !1; + state = emptyContextObject; + var context = Component.contextType; + if ( + "contextType" in Component && + null !== context && + (void 0 === context || context.$$typeof !== REACT_CONTEXT_TYPE) && + !didWarnAboutInvalidateContextType.has(Component) + ) { + didWarnAboutInvalidateContextType.add(Component); + var addendum = + void 0 === context + ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." + : "object" !== typeof context + ? " However, it is set to a " + typeof context + "." + : context.$$typeof === REACT_CONSUMER_TYPE + ? " Did you accidentally pass the Context.Consumer instead?" + : " However, it is set to an object with keys {" + + Object.keys(context).join(", ") + + "}."; + error$jscomp$0( + "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", + getComponentNameFromType(Component) || "Component", + addendum + ); + } + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((state = isContextProvider(Component) ? previousContext : contextStackCursor.current), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof state.getSnapshotBeforeUpdate; - unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - hasNewLifecycles || - ("function" !== typeof state.UNSAFE_componentWillReceiveProps && - "function" !== typeof state.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== contextType) && - callComponentWillReceiveProps( - workInProgress, - state, - nextProps, - contextType - )); - hasForceUpdate = !1; - var oldState = workInProgress.memoizedState; - state.state = oldState; - processUpdateQueue(workInProgress, nextProps, state, renderLanes); - suspendIfUpdateReadFromEntangledAsyncAction(); - oldContext = workInProgress.memoizedState; - unresolvedOldProps || - oldState !== oldContext || - didPerformWorkStackCursor.current || - hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps && - (applyDerivedStateFromProps( - workInProgress, - Component, - getDerivedStateFromProps, - nextProps - ), - (oldContext = workInProgress.memoizedState)), - (lane = - hasForceUpdate || - checkShouldComponentUpdate( - workInProgress, - Component, - lane, - nextProps, - oldState, - oldContext, - contextType - )) - ? (hasNewLifecycles || - ("function" !== typeof state.UNSAFE_componentWillMount && - "function" !== typeof state.componentWillMount) || - ("function" === typeof state.componentWillMount && - state.componentWillMount(), - "function" === typeof state.UNSAFE_componentWillMount && - state.UNSAFE_componentWillMount()), - "function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 67108864)) - : ("function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 67108864), - (workInProgress.memoizedProps = nextProps), - (workInProgress.memoizedState = oldContext)), - (state.props = nextProps), - (state.state = oldContext), - (state.context = contextType), - (state = lane)) - : ("function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 67108864), - (state = !1)); - } else { + (lane = Component.contextTypes), + (context = (lane = null !== lane && void 0 !== lane) + ? getMaskedContext(workInProgress, state) + : emptyContextObject)); + addendum = new Component(nextProps, context); + if (workInProgress.mode & StrictLegacyMode) { + setIsStrictModeForDevtools(!0); + try { + addendum = new Component(nextProps, context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + var state$jscomp$0 = (workInProgress.memoizedState = + null !== addendum.state && void 0 !== addendum.state + ? addendum.state + : null); + addendum.updater = classComponentUpdater; + workInProgress.stateNode = addendum; + addendum._reactInternals = workInProgress; + addendum._reactInternalInstance = fakeInternalInstance; + "function" === typeof Component.getDerivedStateFromProps && + null === state$jscomp$0 && + ((state$jscomp$0 = + getComponentNameFromType(Component) || "Component"), + didWarnAboutUninitializedState.has(state$jscomp$0) || + (didWarnAboutUninitializedState.add(state$jscomp$0), + error$jscomp$0( + "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", + state$jscomp$0, + null === addendum.state ? "null" : "undefined", + state$jscomp$0 + ))); + if ( + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof addendum.getSnapshotBeforeUpdate + ) { + var foundWillReceivePropsName = (state$jscomp$0 = null), + foundWillUpdateName = null; + "function" === typeof addendum.componentWillMount && + !0 !== addendum.componentWillMount.__suppressDeprecationWarning + ? (state$jscomp$0 = "componentWillMount") + : "function" === typeof addendum.UNSAFE_componentWillMount && + (state$jscomp$0 = "UNSAFE_componentWillMount"); + "function" === typeof addendum.componentWillReceiveProps && + !0 !== addendum.componentWillReceiveProps.__suppressDeprecationWarning + ? (foundWillReceivePropsName = "componentWillReceiveProps") + : "function" === typeof addendum.UNSAFE_componentWillReceiveProps && + (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps"); + "function" === typeof addendum.componentWillUpdate && + !0 !== addendum.componentWillUpdate.__suppressDeprecationWarning + ? (foundWillUpdateName = "componentWillUpdate") + : "function" === typeof addendum.UNSAFE_componentWillUpdate && + (foundWillUpdateName = "UNSAFE_componentWillUpdate"); + if ( + null !== state$jscomp$0 || + null !== foundWillReceivePropsName || + null !== foundWillUpdateName + ) { + addendum = getComponentNameFromType(Component) || "Component"; + var newApiName = + "function" === typeof Component.getDerivedStateFromProps + ? "getDerivedStateFromProps()" + : "getSnapshotBeforeUpdate()"; + didWarnAboutLegacyLifecyclesAndDerivedState.has(addendum) || + (didWarnAboutLegacyLifecyclesAndDerivedState.add(addendum), + error$jscomp$0( + "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", + addendum, + newApiName, + null !== state$jscomp$0 ? "\n " + state$jscomp$0 : "", + null !== foundWillReceivePropsName + ? "\n " + foundWillReceivePropsName + : "", + null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" + )); + } + } + lane && + ((lane = workInProgress.stateNode), + (lane.__reactInternalMemoizedUnmaskedChildContext = state), + (lane.__reactInternalMemoizedMaskedChildContext = context)); state = workInProgress.stateNode; - cloneUpdateQueue(current, workInProgress); - lane = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( - Component, - lane, - workInProgress.type === workInProgress.elementType - ); - state.props = contextType; - hasNewLifecycles = workInProgress.pendingProps; - unresolvedOldProps = state.context; - oldContext = Component.contextType; - "object" === typeof oldContext && null !== oldContext - ? (oldContext = readContext(oldContext)) - : ((oldContext = isContextProvider(Component) - ? previousContext - : contextStackCursor.current), - (oldContext = getMaskedContext(workInProgress, oldContext))); - oldState = Component.getDerivedStateFromProps; - (getDerivedStateFromProps = - "function" === typeof oldState || - "function" === typeof state.getSnapshotBeforeUpdate) || - ("function" !== typeof state.UNSAFE_componentWillReceiveProps && - "function" !== typeof state.componentWillReceiveProps) || - ((lane !== hasNewLifecycles || unresolvedOldProps !== oldContext) && - callComponentWillReceiveProps( - workInProgress, - state, - nextProps, - oldContext - )); - hasForceUpdate = !1; - unresolvedOldProps = workInProgress.memoizedState; - state.state = unresolvedOldProps; - processUpdateQueue(workInProgress, nextProps, state, renderLanes); - suspendIfUpdateReadFromEntangledAsyncAction(); - var newState = workInProgress.memoizedState; - lane !== hasNewLifecycles || - unresolvedOldProps !== newState || - didPerformWorkStackCursor.current || - hasForceUpdate || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) - ? ("function" === typeof oldState && - (applyDerivedStateFromProps( - workInProgress, - Component, - oldState, - nextProps - ), - (newState = workInProgress.memoizedState)), - (contextType = + lane = getComponentNameFromType(Component) || "Component"; + state.render || + (Component.prototype && + "function" === typeof Component.prototype.render + ? error$jscomp$0( + "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", + lane + ) + : error$jscomp$0( + "No `render` method found on the %s instance: you may have forgotten to define `render`.", + lane + )); + !state.getInitialState || + state.getInitialState.isReactClassApproved || + state.state || + error$jscomp$0( + "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", + lane + ); + state.getDefaultProps && + !state.getDefaultProps.isReactClassApproved && + error$jscomp$0( + "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", + lane + ); + state.contextType && + error$jscomp$0( + "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", + lane + ); + state.contextTypes && + error$jscomp$0( + "contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", + lane + ); + Component.contextType && + Component.contextTypes && + !didWarnAboutContextTypeAndContextTypes.has(Component) && + (didWarnAboutContextTypeAndContextTypes.add(Component), + error$jscomp$0( + "%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", + lane + )); + Component.childContextTypes && + !didWarnAboutChildContextTypes.has(Component) && + (didWarnAboutChildContextTypes.add(Component), + error$jscomp$0( + "%s uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead. (https://react.dev/link/legacy-context)", + lane + )); + Component.contextTypes && + !didWarnAboutContextTypes$1.has(Component) && + (didWarnAboutContextTypes$1.add(Component), + error$jscomp$0( + "%s uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", + lane + )); + "function" === typeof state.componentShouldUpdate && + error$jscomp$0( + "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", + lane + ); + Component.prototype && + Component.prototype.isPureReactComponent && + "undefined" !== typeof state.shouldComponentUpdate && + error$jscomp$0( + "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", + getComponentNameFromType(Component) || "A pure component" + ); + "function" === typeof state.componentDidUnmount && + error$jscomp$0( + "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", + lane + ); + "function" === typeof state.componentDidReceiveProps && + error$jscomp$0( + "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", + lane + ); + "function" === typeof state.componentWillRecieveProps && + error$jscomp$0( + "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", + lane + ); + "function" === typeof state.UNSAFE_componentWillRecieveProps && + error$jscomp$0( + "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", + lane + ); + context = state.props !== nextProps; + void 0 !== state.props && + context && + error$jscomp$0( + "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", + lane + ); + state.defaultProps && + error$jscomp$0( + "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", + lane, + lane + ); + "function" !== typeof state.getSnapshotBeforeUpdate || + "function" === typeof state.componentDidUpdate || + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || + (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), + error$jscomp$0( + "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", + getComponentNameFromType(Component) + )); + "function" === typeof state.getDerivedStateFromProps && + error$jscomp$0( + "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + lane + ); + "function" === typeof state.getDerivedStateFromError && + error$jscomp$0( + "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + lane + ); + "function" === typeof Component.getSnapshotBeforeUpdate && + error$jscomp$0( + "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", + lane + ); + (context = state.state) && + ("object" !== typeof context || isArrayImpl(context)) && + error$jscomp$0("%s.state: must be set to an object or null", lane); + "function" === typeof state.getChildContext && + "object" !== typeof Component.childContextTypes && + error$jscomp$0( + "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", + lane + ); + state = workInProgress.stateNode; + state.props = nextProps; + state.state = workInProgress.memoizedState; + state.refs = {}; + initializeUpdateQueue(workInProgress); + lane = Component.contextType; + "object" === typeof lane && null !== lane + ? (state.context = readContext(lane)) + : ((lane = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (state.context = getMaskedContext(workInProgress, lane))); + state.state === nextProps && + ((lane = getComponentNameFromType(Component) || "Component"), + didWarnAboutDirectlyAssigningPropsToState.has(lane) || + (didWarnAboutDirectlyAssigningPropsToState.add(lane), + error$jscomp$0( + "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", + lane + ))); + workInProgress.mode & StrictLegacyMode && + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + state + ); + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( + workInProgress, + state + ); + state.state = workInProgress.memoizedState; + lane = Component.getDerivedStateFromProps; + "function" === typeof lane && + (applyDerivedStateFromProps( + workInProgress, + Component, + lane, + nextProps + ), + (state.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof state.getSnapshotBeforeUpdate || + ("function" !== typeof state.UNSAFE_componentWillMount && + "function" !== typeof state.componentWillMount) || + ((lane = state.state), + "function" === typeof state.componentWillMount && + state.componentWillMount(), + "function" === typeof state.UNSAFE_componentWillMount && + state.UNSAFE_componentWillMount(), + lane !== state.state && + (error$jscomp$0( + "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", + getComponentNameFromFiber(workInProgress) || "Component" + ), + classComponentUpdater.enqueueReplaceState( + state, + state.state, + null + )), + processUpdateQueue(workInProgress, nextProps, state, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction(), + (state.state = workInProgress.memoizedState)); + "function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308); + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 67108864); + state = !0; + } else if (null === current$jscomp$0) + (state = workInProgress.stateNode), + (foundWillUpdateName = workInProgress.memoizedProps), + (lane = resolveClassComponentProps( + Component, + foundWillUpdateName, + workInProgress.type === workInProgress.elementType + )), + (state.props = lane), + (state$jscomp$0 = state.context), + (context = Component.contextType), + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((context = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (context = getMaskedContext(workInProgress, context))), + (foundWillReceivePropsName = Component.getDerivedStateFromProps), + (addendum = + "function" === typeof foundWillReceivePropsName || + "function" === typeof state.getSnapshotBeforeUpdate), + (foundWillUpdateName = + workInProgress.pendingProps !== foundWillUpdateName), + addendum || + ("function" !== typeof state.UNSAFE_componentWillReceiveProps && + "function" !== typeof state.componentWillReceiveProps) || + ((foundWillUpdateName || state$jscomp$0 !== context) && + callComponentWillReceiveProps( + workInProgress, + state, + nextProps, + context + )), + (hasForceUpdate = !1), + (newApiName = workInProgress.memoizedState), + (state.state = newApiName), + processUpdateQueue(workInProgress, nextProps, state, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction(), + (state$jscomp$0 = workInProgress.memoizedState), + foundWillUpdateName || + newApiName !== state$jscomp$0 || + didPerformWorkStackCursor.current || + hasForceUpdate + ? ("function" === typeof foundWillReceivePropsName && + (applyDerivedStateFromProps( + workInProgress, + Component, + foundWillReceivePropsName, + nextProps + ), + (state$jscomp$0 = workInProgress.memoizedState)), + (lane = + hasForceUpdate || + checkShouldComponentUpdate( + workInProgress, + Component, + lane, + nextProps, + newApiName, + state$jscomp$0, + context + )) + ? (addendum || + ("function" !== typeof state.UNSAFE_componentWillMount && + "function" !== typeof state.componentWillMount) || + ("function" === typeof state.componentWillMount && + state.componentWillMount(), + "function" === typeof state.UNSAFE_componentWillMount && + state.UNSAFE_componentWillMount()), + "function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 67108864)) + : ("function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 67108864), + (workInProgress.memoizedProps = nextProps), + (workInProgress.memoizedState = state$jscomp$0)), + (state.props = nextProps), + (state.state = state$jscomp$0), + (state.context = context), + (state = lane)) + : ("function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 67108864), + (state = !1)); + else { + state = workInProgress.stateNode; + cloneUpdateQueue(current$jscomp$0, workInProgress); + lane = workInProgress.memoizedProps; + context = resolveClassComponentProps( + Component, + lane, + workInProgress.type === workInProgress.elementType + ); + state.props = context; + addendum = workInProgress.pendingProps; + foundWillUpdateName = state.context; + state$jscomp$0 = Component.contextType; + "object" === typeof state$jscomp$0 && null !== state$jscomp$0 + ? (state$jscomp$0 = readContext(state$jscomp$0)) + : ((state$jscomp$0 = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (state$jscomp$0 = getMaskedContext( + workInProgress, + state$jscomp$0 + ))); + newApiName = Component.getDerivedStateFromProps; + (foundWillReceivePropsName = + "function" === typeof newApiName || + "function" === typeof state.getSnapshotBeforeUpdate) || + ("function" !== typeof state.UNSAFE_componentWillReceiveProps && + "function" !== typeof state.componentWillReceiveProps) || + ((lane !== addendum || foundWillUpdateName !== state$jscomp$0) && + callComponentWillReceiveProps( + workInProgress, + state, + nextProps, + state$jscomp$0 + )); + hasForceUpdate = !1; + foundWillUpdateName = workInProgress.memoizedState; + state.state = foundWillUpdateName; + processUpdateQueue(workInProgress, nextProps, state, renderLanes); + suspendIfUpdateReadFromEntangledAsyncAction(); + var newState = workInProgress.memoizedState; + lane !== addendum || + foundWillUpdateName !== newState || + didPerformWorkStackCursor.current || + hasForceUpdate || + (null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies)) + ? ("function" === typeof newApiName && + (applyDerivedStateFromProps( + workInProgress, + Component, + newApiName, + nextProps + ), + (newState = workInProgress.memoizedState)), + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, - unresolvedOldProps, + foundWillUpdateName, newState, - oldContext + state$jscomp$0 ) || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) - ? (getDerivedStateFromProps || + (null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies))) + ? (foundWillReceivePropsName || ("function" !== typeof state.UNSAFE_componentWillUpdate && "function" !== typeof state.componentWillUpdate) || ("function" === typeof state.componentWillUpdate && - state.componentWillUpdate(nextProps, newState, oldContext), + state.componentWillUpdate( + nextProps, + newState, + state$jscomp$0 + ), "function" === typeof state.UNSAFE_componentWillUpdate && state.UNSAFE_componentWillUpdate( nextProps, newState, - oldContext + state$jscomp$0 )), "function" === typeof state.componentDidUpdate && (workInProgress.flags |= 4), "function" === typeof state.getSnapshotBeforeUpdate && (workInProgress.flags |= 1024)) : ("function" !== typeof state.componentDidUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof state.getSnapshotBeforeUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), (state.props = nextProps), (state.state = newState), - (state.context = oldContext), - (state = contextType)) + (state.context = state$jscomp$0), + (state = context)) : ("function" !== typeof state.componentDidUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof state.getSnapshotBeforeUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (state = !1)); } - current = finishClassComponent( - current, - workInProgress, - Component, - state, - _instance, - renderLanes - ); + context = state; + markRef(current$jscomp$0, workInProgress); + lane = 0 !== (workInProgress.flags & 128); + if (context || lane) { + context = workInProgress.stateNode; + ReactSharedInternals.getCurrentStack = + null === workInProgress ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = workInProgress; + if (lane && "function" !== typeof Component.getDerivedStateFromError) + (addendum = null), (profilerStartTime = -1); + else { + enableSchedulingProfiler && + markComponentRenderStarted(workInProgress); + addendum = callRenderInDEV(context); + if (workInProgress.mode & StrictLegacyMode) { + setIsStrictModeForDevtools(!0); + try { + callRenderInDEV(context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + enableSchedulingProfiler && markComponentRenderStopped(); + } + workInProgress.flags |= 1; + null !== current$jscomp$0 && lane + ? ((lane = addendum), + (workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + lane, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + addendum, + renderLanes + ); + workInProgress.memoizedState = context.state; + _instance && invalidateContextProvider(workInProgress, Component, !0); + current$jscomp$0 = workInProgress.child; + } else + _instance && invalidateContextProvider(workInProgress, Component, !1), + (current$jscomp$0 = bailoutOnAlreadyFinishedWork( + current$jscomp$0, + workInProgress, + renderLanes + )); Component = workInProgress.stateNode; state && Component.props !== nextProps && @@ -9074,76 +9016,7 @@ __DEV__ && getComponentNameFromFiber(workInProgress) || "a component" ), (didWarnAboutReassigningProps = !0)); - return current; - } - function finishClassComponent( - current$jscomp$0, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes - ) { - markRef(current$jscomp$0, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && - invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork( - current$jscomp$0, - workInProgress, - renderLanes - ) - ); - shouldUpdate = workInProgress.stateNode; - ReactSharedInternals.getCurrentStack = - null === workInProgress ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = workInProgress; - if ( - didCaptureError && - "function" !== typeof Component.getDerivedStateFromError - ) { - var nextChildren = null; - profilerStartTime = -1; - } else { - enableSchedulingProfiler && markComponentRenderStarted(workInProgress); - nextChildren = callRenderInDEV(shouldUpdate); - if (workInProgress.mode & StrictLegacyMode) { - setIsStrictModeForDevtools(!0); - try { - callRenderInDEV(shouldUpdate); - } finally { - setIsStrictModeForDevtools(!1); - } - } - enableSchedulingProfiler && markComponentRenderStopped(); - } - workInProgress.flags |= 1; - null !== current$jscomp$0 && didCaptureError - ? ((didCaptureError = nextChildren), - (workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - didCaptureError, - renderLanes - ))) - : reconcileChildren( - current$jscomp$0, - workInProgress, - nextChildren, - renderLanes - ); - workInProgress.memoizedState = shouldUpdate.state; - hasContext && invalidateContextProvider(workInProgress, Component, !0); - return workInProgress.child; + return current$jscomp$0; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; @@ -9216,32 +9089,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2429; - var JSCompiler_object_inline_stack_2430 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2458; + var JSCompiler_object_inline_stack_2459 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2431 = !1; + var JSCompiler_object_inline_componentStack_2460 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2429 = didSuspend) || - (JSCompiler_object_inline_digest_2429 = + (JSCompiler_object_inline_digest_2458 = didSuspend) || + (JSCompiler_object_inline_digest_2458 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2429 && - ((JSCompiler_object_inline_componentStack_2431 = !0), + JSCompiler_object_inline_digest_2458 && + ((JSCompiler_object_inline_componentStack_2460 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2429 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2458 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2431 + JSCompiler_object_inline_componentStack_2460 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2428 = nextHydratableInstance; + var JSCompiler_object_inline_message_2457 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2428)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2457)) { c: { - var instance = JSCompiler_object_inline_message_2428; + var instance = JSCompiler_object_inline_message_2457; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9282,19 +9155,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2428 + JSCompiler_object_inline_message_2457 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2428 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2457 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2428 && - ((JSCompiler_object_inline_message_2428 = - JSCompiler_object_inline_message_2428.dehydrated), - null !== JSCompiler_object_inline_message_2428) + null !== JSCompiler_object_inline_message_2457 && + ((JSCompiler_object_inline_message_2457 = + JSCompiler_object_inline_message_2457.dehydrated), + null !== JSCompiler_object_inline_message_2457) ) return ( - JSCompiler_object_inline_message_2428.data === + JSCompiler_object_inline_message_2457.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9302,27 +9175,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2428 = - JSCompiler_object_inline_stack_2430.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2430.fallback; - if (JSCompiler_object_inline_componentStack_2431) + JSCompiler_object_inline_message_2457 = + JSCompiler_object_inline_stack_2459.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2459.fallback; + if (JSCompiler_object_inline_componentStack_2460) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2430 = + (JSCompiler_object_inline_stack_2459 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2428, + JSCompiler_object_inline_message_2457, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2431 = + (JSCompiler_object_inline_componentStack_2460 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2431.memoizedState = + (JSCompiler_object_inline_componentStack_2460.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2431.childLanes = + (JSCompiler_object_inline_componentStack_2460.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2429, + JSCompiler_object_inline_digest_2458, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9331,60 +9204,60 @@ __DEV__ && ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = - JSCompiler_object_inline_componentStack_2431.updateQueue), - null === current - ? (JSCompiler_object_inline_componentStack_2431.updateQueue = + (renderLanes = + JSCompiler_object_inline_componentStack_2460.updateQueue), + null === renderLanes + ? (JSCompiler_object_inline_componentStack_2460.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2430 + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), + JSCompiler_object_inline_stack_2459 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2430.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2459.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2430 = + (JSCompiler_object_inline_stack_2459 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2428, + JSCompiler_object_inline_message_2457, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2431 = + (JSCompiler_object_inline_componentStack_2460 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2431.memoizedState = + (JSCompiler_object_inline_componentStack_2460.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2431.childLanes = + (JSCompiler_object_inline_componentStack_2460.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2429, + JSCompiler_object_inline_digest_2458, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2430 + JSCompiler_object_inline_stack_2459 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2428 + JSCompiler_object_inline_message_2457 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2428 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2428) + ((JSCompiler_object_inline_message_2457 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2457) ) { if (didSuspend) workInProgress.flags & 256 @@ -9401,98 +9274,95 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2431 = - JSCompiler_object_inline_stack_2430.fallback), - (JSCompiler_object_inline_message_2428 = workInProgress.mode), - (JSCompiler_object_inline_stack_2430 = createFiberFromOffscreen( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2430.children - }, - JSCompiler_object_inline_message_2428, - 0, - null - )), - (JSCompiler_object_inline_componentStack_2431 = + (JSCompiler_object_inline_componentStack_2460 = + JSCompiler_object_inline_stack_2459.fallback), + (JSCompiler_object_inline_message_2457 = workInProgress.mode), + (JSCompiler_object_inline_stack_2459 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2459.children + }, + JSCompiler_object_inline_message_2457 + )), + (JSCompiler_object_inline_componentStack_2460 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2431, - JSCompiler_object_inline_message_2428, + JSCompiler_object_inline_componentStack_2460, + JSCompiler_object_inline_message_2457, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2431.flags |= 2), - (JSCompiler_object_inline_stack_2430.return = workInProgress), - (JSCompiler_object_inline_componentStack_2431.return = + (JSCompiler_object_inline_componentStack_2460.flags |= 2), + (JSCompiler_object_inline_stack_2459.return = workInProgress), + (JSCompiler_object_inline_componentStack_2460.return = workInProgress), - (JSCompiler_object_inline_stack_2430.sibling = - JSCompiler_object_inline_componentStack_2431), - (workInProgress.child = JSCompiler_object_inline_stack_2430), - (disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2430 = workInProgress.child), - (JSCompiler_object_inline_stack_2430.memoizedState = + (JSCompiler_object_inline_stack_2459.sibling = + JSCompiler_object_inline_componentStack_2460), + (workInProgress.child = JSCompiler_object_inline_stack_2459), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (JSCompiler_object_inline_stack_2459 = workInProgress.child), + (JSCompiler_object_inline_stack_2459.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2430.childLanes = + (JSCompiler_object_inline_stack_2459.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2429, + JSCompiler_object_inline_digest_2458, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2431)); + JSCompiler_object_inline_componentStack_2460)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2428.data === + JSCompiler_object_inline_message_2457.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2429 = - JSCompiler_object_inline_message_2428.nextSibling && - JSCompiler_object_inline_message_2428.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2429) { - JSCompiler_temp = JSCompiler_object_inline_digest_2429.dgst; - var message = JSCompiler_object_inline_digest_2429.msg; - instance = JSCompiler_object_inline_digest_2429.stck; - var componentStack = JSCompiler_object_inline_digest_2429.cstck; + JSCompiler_object_inline_digest_2458 = + JSCompiler_object_inline_message_2457.nextSibling && + JSCompiler_object_inline_message_2457.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2458) { + JSCompiler_temp = JSCompiler_object_inline_digest_2458.dgst; + var message = JSCompiler_object_inline_digest_2458.msg; + instance = JSCompiler_object_inline_digest_2458.stck; + var componentStack = JSCompiler_object_inline_digest_2458.cstck; } - JSCompiler_object_inline_message_2428 = message; - JSCompiler_object_inline_digest_2429 = JSCompiler_temp; - JSCompiler_object_inline_stack_2430 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2431 = + JSCompiler_object_inline_message_2457 = message; + JSCompiler_object_inline_digest_2458 = JSCompiler_temp; + JSCompiler_object_inline_stack_2459 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2460 = componentStack; - JSCompiler_object_inline_componentStack_2431 = - JSCompiler_object_inline_message_2428 - ? Error(JSCompiler_object_inline_message_2428) + JSCompiler_object_inline_componentStack_2460 = + JSCompiler_object_inline_message_2457 + ? Error(JSCompiler_object_inline_message_2457) : 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_2431.stack = - JSCompiler_object_inline_stack_2430 || ""; - JSCompiler_object_inline_componentStack_2431.digest = - JSCompiler_object_inline_digest_2429; - JSCompiler_object_inline_digest_2429 = + JSCompiler_object_inline_componentStack_2460.stack = + JSCompiler_object_inline_stack_2459 || ""; + JSCompiler_object_inline_componentStack_2460.digest = + JSCompiler_object_inline_digest_2458; + JSCompiler_object_inline_digest_2458 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2430 = { - value: JSCompiler_object_inline_componentStack_2431, + JSCompiler_object_inline_stack_2459 = { + value: JSCompiler_object_inline_componentStack_2460, source: null, - stack: JSCompiler_object_inline_digest_2429 + stack: JSCompiler_object_inline_digest_2458 }; - "string" === typeof JSCompiler_object_inline_digest_2429 && + "string" === typeof JSCompiler_object_inline_digest_2458 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2431, - JSCompiler_object_inline_stack_2430 + JSCompiler_object_inline_componentStack_2460, + JSCompiler_object_inline_stack_2459 ); - queueHydrationError(JSCompiler_object_inline_stack_2430); + queueHydrationError(JSCompiler_object_inline_stack_2459); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9506,25 +9376,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2429 = + (JSCompiler_object_inline_digest_2458 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2429) + didReceiveUpdate || JSCompiler_object_inline_digest_2458) ) { - JSCompiler_object_inline_digest_2429 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2429) { - JSCompiler_object_inline_stack_2430 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2430 & 42)) - JSCompiler_object_inline_stack_2430 = 1; + JSCompiler_object_inline_digest_2458 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2458) { + JSCompiler_object_inline_stack_2459 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2459 & 42)) + JSCompiler_object_inline_stack_2459 = 1; else - switch (JSCompiler_object_inline_stack_2430) { + switch (JSCompiler_object_inline_stack_2459) { case 2: - JSCompiler_object_inline_stack_2430 = 1; + JSCompiler_object_inline_stack_2459 = 1; break; case 8: - JSCompiler_object_inline_stack_2430 = 4; + JSCompiler_object_inline_stack_2459 = 4; break; case 32: - JSCompiler_object_inline_stack_2430 = 16; + JSCompiler_object_inline_stack_2459 = 16; break; case 128: case 256: @@ -9545,40 +9415,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2430 = 64; + JSCompiler_object_inline_stack_2459 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2430 = 134217728; + JSCompiler_object_inline_stack_2459 = 134217728; break; default: - JSCompiler_object_inline_stack_2430 = 0; + JSCompiler_object_inline_stack_2459 = 0; } - JSCompiler_object_inline_stack_2430 = + JSCompiler_object_inline_stack_2459 = 0 !== - (JSCompiler_object_inline_stack_2430 & - (JSCompiler_object_inline_digest_2429.suspendedLanes | + (JSCompiler_object_inline_stack_2459 & + (JSCompiler_object_inline_digest_2458.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2430; + : JSCompiler_object_inline_stack_2459; if ( - 0 !== JSCompiler_object_inline_stack_2430 && - JSCompiler_object_inline_stack_2430 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2459 && + JSCompiler_object_inline_stack_2459 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2430), + ((prevState.retryLane = JSCompiler_object_inline_stack_2459), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2430 + JSCompiler_object_inline_stack_2459 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2429, + JSCompiler_object_inline_digest_2458, current, - JSCompiler_object_inline_stack_2430 + JSCompiler_object_inline_stack_2459 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2428.data === + JSCompiler_object_inline_message_2457.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9586,7 +9456,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2428.data === + JSCompiler_object_inline_message_2457.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9594,12 +9464,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2428._reactRetry = + (JSCompiler_object_inline_message_2457._reactRetry = workInProgress), (workInProgress = null)) - : ((renderLanes = prevState.treeContext), + : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2428.nextSibling + JSCompiler_object_inline_message_2457.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9607,83 +9477,67 @@ __DEV__ && (didSuspendOrErrorDEV = !1), (hydrationDiffRootDEV = null), (rootOrSingletonContext = !1), - null !== renderLanes && + null !== current && (warnIfNotHydrating(), (idStack[idStackIndex++] = treeContextId), (idStack[idStackIndex++] = treeContextOverflow), (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), + (treeContextId = current.id), + (treeContextOverflow = current.overflow), (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2430.children + JSCompiler_object_inline_stack_2459.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2431) + if (JSCompiler_object_inline_componentStack_2460) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2431 = - JSCompiler_object_inline_stack_2430.fallback), - (JSCompiler_object_inline_message_2428 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2460 = + JSCompiler_object_inline_stack_2459.fallback), + (JSCompiler_object_inline_message_2457 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (componentStack = { - mode: "hidden", - children: JSCompiler_object_inline_stack_2430.children - }), - disableLegacyMode || - (JSCompiler_object_inline_message_2428 & ConcurrentMode) !== NoMode || - workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2430 = createWorkInProgress( - JSCompiler_temp, - componentStack - )), - (JSCompiler_object_inline_stack_2430.subtreeFlags = - JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2430 = workInProgress.child), - (JSCompiler_object_inline_stack_2430.childLanes = 0), - (JSCompiler_object_inline_stack_2430.pendingProps = - componentStack), - workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2430.actualDuration = -0), - (JSCompiler_object_inline_stack_2430.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2430.selfBaseDuration = - JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2430.treeBaseDuration = - JSCompiler_temp.treeBaseDuration)), - (workInProgress.deletions = null)), + (JSCompiler_object_inline_stack_2459 = createWorkInProgress( + JSCompiler_temp, + { + mode: "hidden", + children: JSCompiler_object_inline_stack_2459.children + } + )), + (JSCompiler_object_inline_stack_2459.subtreeFlags = + JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2431 = + ? (JSCompiler_object_inline_componentStack_2460 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2431 + JSCompiler_object_inline_componentStack_2460 )) - : ((JSCompiler_object_inline_componentStack_2431 = + : ((JSCompiler_object_inline_componentStack_2460 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2431, - JSCompiler_object_inline_message_2428, + JSCompiler_object_inline_componentStack_2460, + JSCompiler_object_inline_message_2457, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2431.flags |= 2)), - (JSCompiler_object_inline_componentStack_2431.return = + (JSCompiler_object_inline_componentStack_2460.flags |= 2)), + (JSCompiler_object_inline_componentStack_2460.return = workInProgress), - (JSCompiler_object_inline_stack_2430.return = workInProgress), - (JSCompiler_object_inline_stack_2430.sibling = - JSCompiler_object_inline_componentStack_2431), - (workInProgress.child = JSCompiler_object_inline_stack_2430), - (JSCompiler_object_inline_stack_2430 = - JSCompiler_object_inline_componentStack_2431), - (JSCompiler_object_inline_componentStack_2431 = workInProgress.child), - (JSCompiler_object_inline_message_2428 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2428 - ? (JSCompiler_object_inline_message_2428 = + (JSCompiler_object_inline_stack_2459.return = workInProgress), + (JSCompiler_object_inline_stack_2459.sibling = + JSCompiler_object_inline_componentStack_2460), + (workInProgress.child = JSCompiler_object_inline_stack_2459), + (JSCompiler_object_inline_stack_2459 = + JSCompiler_object_inline_componentStack_2460), + (JSCompiler_object_inline_componentStack_2460 = workInProgress.child), + (JSCompiler_object_inline_message_2457 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2457 + ? (JSCompiler_object_inline_message_2457 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2428.cachePool), + JSCompiler_object_inline_message_2457.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9691,34 +9545,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2428 = { + (JSCompiler_object_inline_message_2457 = { baseLanes: - JSCompiler_object_inline_message_2428.baseLanes | renderLanes, + JSCompiler_object_inline_message_2457.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2431.memoizedState = - JSCompiler_object_inline_message_2428), + (JSCompiler_object_inline_componentStack_2460.memoizedState = + JSCompiler_object_inline_message_2457), enableTransitionTracing && - ((JSCompiler_object_inline_message_2428 = enableTransitionTracing + ((JSCompiler_object_inline_message_2457 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2428 && + null !== JSCompiler_object_inline_message_2457 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2431.updateQueue), + JSCompiler_object_inline_componentStack_2460.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2431.updateQueue = { - transitions: JSCompiler_object_inline_message_2428, + ? (JSCompiler_object_inline_componentStack_2460.updateQueue = { + transitions: JSCompiler_object_inline_message_2457, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2431.updateQueue = + ? (JSCompiler_object_inline_componentStack_2460.updateQueue = { - transitions: JSCompiler_object_inline_message_2428, + transitions: JSCompiler_object_inline_message_2457, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9726,48 +9580,40 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2428), + JSCompiler_object_inline_message_2457), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2431.childLanes = + (JSCompiler_object_inline_componentStack_2460.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2429, + JSCompiler_object_inline_digest_2458, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2430 + JSCompiler_object_inline_stack_2459 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2429 = current.child; - current = JSCompiler_object_inline_digest_2429.sibling; - JSCompiler_object_inline_digest_2429 = createWorkInProgress( - JSCompiler_object_inline_digest_2429, - { - mode: "visible", - children: JSCompiler_object_inline_stack_2430.children - } - ); - disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode || - (JSCompiler_object_inline_digest_2429.lanes = renderLanes); - JSCompiler_object_inline_digest_2429.return = workInProgress; - JSCompiler_object_inline_digest_2429.sibling = null; + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { + mode: "visible", + children: JSCompiler_object_inline_stack_2459.children + }); + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_object_inline_digest_2458 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2458 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2429; + : JSCompiler_object_inline_digest_2458.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2429; + return renderLanes; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = createFiberFromOffscreen( + primaryChildren = mountWorkInProgressOffscreenFiber( { mode: "visible", children: primaryChildren }, - workInProgress.mode, - 0, - null + workInProgress.mode ); primaryChildren.return = workInProgress; return (workInProgress.child = primaryChildren); @@ -9778,37 +9624,26 @@ __DEV__ && fallbackChildren, renderLanes ) { - var mode = workInProgress.mode, - progressedPrimaryFragment = workInProgress.child; - primaryChildren = { mode: "hidden", children: primaryChildren }; - disableLegacyMode || - (mode & ConcurrentMode) !== NoMode || - null === progressedPrimaryFragment - ? (progressedPrimaryFragment = createFiberFromOffscreen( - primaryChildren, - mode, - 0, - null - )) - : ((progressedPrimaryFragment.childLanes = 0), - (progressedPrimaryFragment.pendingProps = primaryChildren), - workInProgress.mode & ProfileMode && - ((progressedPrimaryFragment.actualDuration = -0), - (progressedPrimaryFragment.actualStartTime = -1.1), - (progressedPrimaryFragment.selfBaseDuration = -0), - (progressedPrimaryFragment.treeBaseDuration = -0))); + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); fallbackChildren = createFiberFromFragment( fallbackChildren, mode, renderLanes, null ); - progressedPrimaryFragment.return = workInProgress; + primaryChildren.return = workInProgress; fallbackChildren.return = workInProgress; - progressedPrimaryFragment.sibling = fallbackChildren; - workInProgress.child = progressedPrimaryFragment; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; return fallbackChildren; } + function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + return createFiberFromOffscreen(offscreenProps, mode, 0, null); + } function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9987,72 +9822,59 @@ __DEV__ && nextProps &= SubtreeSuspenseContextMask; } push(suspenseStackCursor, nextProps, workInProgress); - if ( - disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode - ) - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), - (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), + (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), + (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); + break; + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - else workInProgress.memoizedState = null; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; + } + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); + break; + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); + break; + default: + workInProgress.memoizedState = null; + } return workInProgress.child; } - function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { - disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode || - null === current || - ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); - } function bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -10294,10 +10116,8 @@ __DEV__ && switch (workInProgress.tag) { case 16: a: if ( - ((prevSibling = workInProgress.elementType), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (returnFiber = workInProgress.pendingProps), - (current = callLazyInitInDEV(prevSibling)), + ((returnFiber = workInProgress.pendingProps), + (current = callLazyInitInDEV(workInProgress.elementType)), (workInProgress.type = current), "function" === typeof current) ) @@ -10878,52 +10698,6 @@ __DEV__ && workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - returnFiber = workInProgress.type; - prevSibling = resolveClassComponentProps( - returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - isContextProvider(returnFiber) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1); - prepareToReadContext(workInProgress); - constructClassInstance(workInProgress, returnFiber, prevSibling); - mountClassInstance( - workInProgress, - returnFiber, - prevSibling, - renderLanes - ); - return finishClassComponent( - null, - workInProgress, - returnFiber, - !0, - current, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - returnFiber = workInProgress.type; - prevSibling = resolveClassComponentProps( - returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ); case 19: return updateSuspenseListComponent( current, @@ -11583,8 +11357,6 @@ __DEV__ && var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -12015,11 +11787,6 @@ __DEV__ && bubbleProperties(workInProgress), null ); - case 17: - if (disableLegacyMode) break; - isContextProvider(workInProgress.type) && popContext(workInProgress); - bubbleProperties(workInProgress); - return null; case 19: pop(suspenseStackCursor, workInProgress); _type = workInProgress.memoizedState; @@ -12142,16 +11909,14 @@ __DEV__ && ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || - (!disableLegacyMode && - (workInProgress.mode & ConcurrentMode) === NoMode) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & 536870912) && + newProps + ? 0 !== (renderLanes & 536870912) && 0 === (workInProgress.flags & 128) && (bubbleProperties(workInProgress), 23 !== workInProgress.tag && workInProgress.subtreeFlags & 6 && - (workInProgress.flags |= 8192)), + (workInProgress.flags |= 8192)) + : bubbleProperties(workInProgress), (newProps = workInProgress.updateQueue), null !== newProps && scheduleRetryEffect(workInProgress, newProps.retryQueue), @@ -12187,8 +11952,6 @@ __DEV__ && bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error( "Unknown unit of work tag (" + @@ -12554,16 +12317,6 @@ __DEV__ && nearestMountedAncestor ); } - function commitClassDidMount(finishedWork) { - var instance = finishedWork.stateNode; - "function" === typeof instance.componentDidMount && - runWithFiberInDEV( - finishedWork, - callComponentDidMountInDEV, - finishedWork, - instance - ); - } function commitClassCallbacks(finishedWork) { var updateQueue = finishedWork.updateQueue; if (null !== updateQueue) { @@ -13110,8 +12863,23 @@ __DEV__ && commitClassSnapshot(root, JSCompiler_temp); break; case 3: - 0 !== (anchorOffset & 1024) && - clearContainer(root.stateNode.containerInfo); + if (0 !== (anchorOffset & 1024)) + if ( + ((root = root.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + JSCompiler_temp === DOCUMENT_NODE) + ) + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { + case "HEAD": + case "HTML": + case "BODY": + clearContainerSparingly(root); + break; + default: + root.textContent = ""; + } break; case 5: case 26: @@ -13301,34 +13069,26 @@ __DEV__ && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if ( - disableLegacyMode || - (finishedWork.mode & ConcurrentMode) !== NoMode - ) { - if ( - ((prevProps = - null !== finishedWork.memoizedState || - offscreenSubtreeIsHidden), - !prevProps) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + prevProps = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevProps) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevProps; + (offscreenSubtreeWasHidden = current) && + !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -13750,21 +13510,15 @@ __DEV__ && case 22: offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor); - disableLegacyMode || deletedFiber.mode & ConcurrentMode - ? ((offscreenSubtreeWasHidden = - (prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ), - (offscreenSubtreeWasHidden = prevHostParent)) - : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + offscreenSubtreeWasHidden = + (prevHostParent = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState; + recursivelyTraverseDeletionEffects( + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); + offscreenSubtreeWasHidden = prevHostParent; break; default: recursivelyTraverseDeletionEffects( @@ -14314,15 +14068,13 @@ __DEV__ && safelyDetachRef(current, current.return)); i = null !== finishedWork.memoizedState; nextNode = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & ConcurrentMode - ? ((nodeName = offscreenSubtreeIsHidden), - (suspenseCallback = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = nodeName || i), - (offscreenSubtreeWasHidden = suspenseCallback || nextNode), - recursivelyTraverseMutationEffects(root, finishedWork), - (offscreenSubtreeWasHidden = suspenseCallback), - (offscreenSubtreeIsHidden = nodeName)) - : recursivelyTraverseMutationEffects(root, finishedWork); + nodeName = offscreenSubtreeIsHidden; + suspenseCallback = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = nodeName || i; + offscreenSubtreeWasHidden = suspenseCallback || nextNode; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = suspenseCallback; + offscreenSubtreeIsHidden = nodeName; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -14338,9 +14090,7 @@ __DEV__ && null === current || nextNode || root || - ((disableLegacyMode || - (finishedWork.mode & ConcurrentMode) !== NoMode) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -14551,7 +14301,14 @@ __DEV__ && finishedWork, includeWorkInProgressEffects ); - commitClassDidMount(finishedWork); + current = finishedWork.stateNode; + "function" === typeof current.componentDidMount && + runWithFiberInDEV( + finishedWork, + callComponentDidMountInDEV, + finishedWork, + current + ); current = finishedWork.updateQueue; if (null !== current) { finishedRoot = finishedWork.stateNode; @@ -14897,18 +14654,10 @@ __DEV__ && committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & ConcurrentMode - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((prevEffectDuration._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -15029,19 +14778,10 @@ __DEV__ && committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & ConcurrentMode - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((_instance2._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) : ((_instance2._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, @@ -15397,58 +15137,11 @@ __DEV__ && } } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Layout | HasEffect, fiber); - break; - case 1: - commitClassDidMount(fiber); - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Passive | HasEffect, fiber); - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return); - break; - case 1: - var instance = fiber.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount(fiber, fiber.return, instance); - } - } - function invokePassiveEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Passive | HasEffect, fiber, fiber.return); - } - } function onCommitRoot() { commitHooks.forEach(function (commitHook) { return commitHook(); }); } - function isLegacyActEnvironment() { - var isReactActEnvironmentGlobal = - "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT - ? IS_REACT_ACT_ENVIRONMENT - : void 0; - return "undefined" !== typeof jest && !1 !== isReactActEnvironmentGlobal; - } function isConcurrentActEnvironment() { var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT @@ -15536,17 +15229,15 @@ __DEV__ && )); } function requestUpdateLane(fiber) { - var mode = fiber.mode; - if (!disableLegacyMode && (mode & ConcurrentMode) === NoMode) return 2; if ( (executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes ) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; - mode = ReactSharedInternals.T; - return null !== mode - ? (mode._updatedFibers || (mode._updatedFibers = new Set()), - mode._updatedFibers.add(fiber), + var transition = ReactSharedInternals.T; + return null !== transition + ? (transition._updatedFibers || (transition._updatedFibers = new Set()), + transition._updatedFibers.add(fiber), (fiber = currentEntangledLane), 0 !== fiber ? fiber : requestTransitionLane()) : resolveUpdatePriority(); @@ -15592,10 +15283,10 @@ __DEV__ && "Unknown"; didWarnAboutUpdateInRenderForAnotherComponent.has(root) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root), - (fiber = getComponentNameFromFiber(fiber) || "Unknown"), + (lane = getComponentNameFromFiber(fiber) || "Unknown"), error$jscomp$0( "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render", - fiber, + lane, root, root )); @@ -15610,21 +15301,20 @@ __DEV__ && } else { isDevToolsPresent && addFiberToLanesMap(root, fiber, lane); warnIfUpdatesNotWrappedWithActDEV(fiber); - if (enableTransitionTracing) { - var transition = ReactSharedInternals.T; - if ( - null !== transition && - null != transition.name && - (-1 === transition.startTime && (transition.startTime = now$1()), - enableTransitionTracing) - ) { - var transitionLanesMap = root.transitionLanes, - index = 31 - clz32(lane), - transitions = transitionLanesMap[index]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now$1()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index = 31 - clz32(lane), + transitions = transitionLanesMap[index]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index] = transitions; } root === workInProgressRoot && ((executionContext & RenderContext) === NoContext && @@ -15637,13 +15327,6 @@ __DEV__ && workInProgressRootDidSkipSuspendedSiblings )); ensureRootIsScheduled(root); - 2 !== lane || - executionContext !== NoContext || - disableLegacyMode || - (fiber.mode & ConcurrentMode) !== NoMode || - ReactSharedInternals.isBatchingLegacy || - ((workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); } } function performWorkOnRoot(root, lanes, forceSync) { @@ -15673,10 +15356,7 @@ __DEV__ && renderWasConcurrent = !1; continue; } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { + if (exitStatus === RootErrored) { renderWasConcurrent = lanes; if (root.errorRecoveryDisabledLanes & renderWasConcurrent) var errorRetryLanes = 0; @@ -15971,20 +15651,6 @@ __DEV__ && 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } - function batchedUpdates$1(fn, a) { - if (disableLegacyMode) return fn(a); - var prevExecutionContext = executionContext; - executionContext |= BatchedContext; - try { - return fn(a); - } finally { - (executionContext = prevExecutionContext), - executionContext !== NoContext || - ReactSharedInternals.isBatchingLegacy || - ((workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); - } - } function flushSyncWork$1() { return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -16804,7 +16470,7 @@ __DEV__ && (rootWithPassiveNestedUpdates = null)); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root, !1); + transitions || commitDoubleInvokeEffectsInDEV(root); onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); @@ -16823,9 +16489,7 @@ __DEV__ && remainingLanes.value, transitions ); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -16938,7 +16602,7 @@ __DEV__ && "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped && injectedProfilingHooks.markPassiveEffectsStopped(); - commitDoubleInvokeEffectsInDEV(root, !0); + commitDoubleInvokeEffectsInDEV(root); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(0, !1); if (enableTransitionTracing) { @@ -17068,8 +16732,7 @@ __DEV__ && : executionContext & CommitContext && (didIncludeCommitPhaseUpdate = !0), throwIfInfiniteUpdateLoopDetected()); - (disableLegacyMode || 0 !== root.tag) && - isConcurrentActEnvironment() && + isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && error$jscomp$0( "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act" @@ -17089,12 +16752,7 @@ __DEV__ && ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || (retryLane & ConcurrentMode) !== NoMode - ? claimNextRetryLane() - : 2)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -17208,52 +16866,18 @@ __DEV__ && setIsStrictModeForDevtools(!1); } } - function commitDoubleInvokeEffectsInDEV(root, hasPassiveEffects) { - disableLegacyMode || 0 !== root.tag - ? ((hasPassiveEffects = !0), - (!disableLegacyMode && 1 !== root.tag) || - root.current.mode & (StrictLegacyMode | StrictEffectsMode) || - (hasPassiveEffects = !1), - recursivelyTraverseAndDoubleInvokeEffectsInDEV( - root, - root.current, - hasPassiveEffects - )) - : runWithFiberInDEV( - root.current, - legacyCommitDoubleInvokeEffectsInDEV, - root.current, - hasPassiveEffects - ); - } - function legacyCommitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) { - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectUnmountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectUnmountInDEV); - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectMountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectMountInDEV); - } - function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) { - for (var subtreeRoot = null; null != firstChild; ) { - var primarySubtreeFlag = firstChild.subtreeFlags & fiberFlags; - firstChild !== subtreeRoot && - null != firstChild.child && - 0 !== primarySubtreeFlag - ? (firstChild = firstChild.child) - : (0 !== (firstChild.flags & fiberFlags) && - invokeEffectFn(firstChild), - (firstChild = - null !== firstChild.sibling - ? firstChild.sibling - : (subtreeRoot = firstChild.return))); - } + function commitDoubleInvokeEffectsInDEV(root) { + var doubleInvokeEffects = !0; + root.current.mode & (StrictLegacyMode | StrictEffectsMode) || + (doubleInvokeEffects = !1); + recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root, + root.current, + doubleInvokeEffects + ); } function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) { - if ( - (executionContext & RenderContext) === NoContext && - (disableLegacyMode || fiber.mode & ConcurrentMode) - ) { + if ((executionContext & RenderContext) === NoContext) { var tag = fiber.tag; if ( 3 === tag || @@ -17289,15 +16913,8 @@ __DEV__ && : scheduleCallback$3(priorityLevel, callback); } function warnIfUpdatesNotWrappedWithActDEV(fiber) { - if (disableLegacyMode || fiber.mode & ConcurrentMode) { - if (!isConcurrentActEnvironment()) return; - } else if ( - !isLegacyActEnvironment() || - executionContext !== NoContext || - (0 !== fiber.tag && 11 !== fiber.tag && 15 !== fiber.tag) - ) - return; - null === ReactSharedInternals.actQueue && + isConcurrentActEnvironment() && + null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function () { error$jscomp$0( "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act", @@ -17634,11 +17251,10 @@ __DEV__ && case REACT_STRICT_MODE_TYPE: fiberTag = 8; mode |= StrictLegacyMode; - if (disableLegacyMode || (mode & ConcurrentMode) !== NoMode) - (mode |= StrictEffectsMode), - enableDO_NOT_USE_disableStrictPassiveEffect && - pendingProps.DO_NOT_USE_disableStrictPassiveEffect && - (mode |= NoStrictPassiveEffectsMode); + mode |= StrictEffectsMode; + enableDO_NOT_USE_disableStrictPassiveEffect && + pendingProps.DO_NOT_USE_disableStrictPassiveEffect && + (mode |= NoStrictPassiveEffectsMode); break; case REACT_PROFILER_TYPE: return ( @@ -17857,7 +17473,7 @@ __DEV__ && onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -17898,26 +17514,16 @@ __DEV__ && for ( this.transitionCallbacks = null, containerInfo = this.transitionLanes = [], - identifierPrefix = 0; - 31 > identifierPrefix; - identifierPrefix++ + tag = 0; + 31 > tag; + tag++ ) containerInfo.push(null); this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; - for (identifierPrefix = 0; 31 > identifierPrefix; identifierPrefix++) - containerInfo.push(new Set()); - if (disableLegacyMode) - this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; - else - switch (tag) { - case 1: - this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; - break; - case 0: - this._debugRootType = hydrate ? "hydrate()" : "render()"; - } + for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); + this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; } function createFiberRoot( containerInfo, @@ -17946,22 +17552,21 @@ __DEV__ && containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = ConcurrentMode), - !0 === isStrictMode && (tag |= StrictLegacyMode | StrictEffectsMode)) - : (tag = NoMode); - isDevToolsPresent && (tag |= ProfileMode); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = ConcurrentMode; + !0 === isStrictMode && + (hydrationCallbacks |= StrictLegacyMode | StrictEffectsMode); + isDevToolsPresent && (hydrationCallbacks |= ProfileMode); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; - tag = createCache(); - retainCache(tag); - containerInfo.pooledCache = tag; - retainCache(tag); + hydrationCallbacks = createCache(); + retainCache(hydrationCallbacks); + containerInfo.pooledCache = hydrationCallbacks; + retainCache(hydrationCallbacks); isStrictMode.memoizedState = { element: initialChildren, isDehydrated: hydrate, - cache: tag + cache: hydrationCallbacks }; initializeUpdateQueue(isStrictMode); return containerInfo; @@ -18055,60 +17660,6 @@ __DEV__ && } return component.stateNode; } - function createHydrationContainer( - initialChildren, - callback, - containerInfo, - tag, - hydrationCallbacks, - isStrictMode, - concurrentUpdatesByDefaultOverride, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState - ) { - initialChildren = createFiberRoot( - containerInfo, - tag, - !0, - initialChildren, - hydrationCallbacks, - isStrictMode, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState - ); - initialChildren.context = getContextForSubtree(null); - containerInfo = initialChildren.current; - tag = requestUpdateLane(containerInfo); - hydrationCallbacks = createUpdate(tag); - hydrationCallbacks.callback = - void 0 !== callback && null !== callback ? callback : null; - enqueueUpdate(containerInfo, hydrationCallbacks, tag); - initialChildren.current.lanes = tag; - markRootUpdated(initialChildren, tag); - ensureRootIsScheduled(initialChildren); - return initialChildren; - } - function updateContainer(element, container, parentComponent, callback) { - var current = container.current, - lane = requestUpdateLane(current); - updateContainerImpl( - current, - lane, - element, - container, - parentComponent, - callback - ); - return lane; - } function updateContainerSync( element, container, @@ -18180,17 +17731,6 @@ __DEV__ && (scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane)); } - function getPublicRootInstance(container) { - container = container.current; - if (!container.child) return null; - switch (container.child.tag) { - case 27: - case 5: - return container.child.stateNode; - default: - return container.child.stateNode; - } - } function markRetryLaneImpl(fiber, retryLane) { fiber = fiber.memoizedState; if (null !== fiber && null !== fiber.dehydrated) { @@ -18227,7 +17767,7 @@ __DEV__ && if (isInsideEventHandler) return fn(a, b); isInsideEventHandler = !0; try { - return batchedUpdates$1(fn, a, b); + return fn(a); } finally { if ( ((isInsideEventHandler = !1), @@ -22070,20 +21610,6 @@ __DEV__ && function unhideTextInstance(textInstance, text) { textInstance.nodeValue = text; } - function clearContainer(container) { - var nodeType = container.nodeType; - if (nodeType === DOCUMENT_NODE) clearContainerSparingly(container); - else if (1 === nodeType) - switch (container.nodeName) { - case "HEAD": - case "HTML": - case "BODY": - clearContainerSparingly(container); - break; - default: - container.textContent = ""; - } - } function clearContainerSparingly(container) { var nextNode = container.firstChild; nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling); @@ -22371,16 +21897,6 @@ __DEV__ && ? container.getRootNode() : container.ownerDocument; } - function flushSyncWork() { - if (disableLegacyMode) { - var previousWasRendering = previousDispatcher.f(), - wasRendering = flushSyncWork$1(); - return previousWasRendering || wasRendering; - } - throw Error( - "flushSyncWork should not be called from builds that support legacy mode. This is a bug in React." - ); - } function preconnectAs(rel, href, crossOrigin) { var ownerDocument = globalDocument; if (ownerDocument && "string" === typeof href && href) { @@ -23747,16 +23263,6 @@ __DEV__ && " react-mount-point-unstable " !== node.nodeValue)) ); } - function isValidContainerLegacy(node) { - return !( - !node || - (1 !== node.nodeType && - node.nodeType !== DOCUMENT_NODE && - node.nodeType !== DOCUMENT_FRAGMENT_NODE && - (node.nodeType !== COMMENT_NODE || - " react-mount-point-unstable " !== node.nodeValue)) - ); - } function registerReactDOMEvent( target, domEventName, @@ -23787,30 +23293,6 @@ __DEV__ && "ReactDOM.createEventHandle: setter called on an invalid target. Provide a valid EventTarget or an element managed by React." ); } - function flushSyncImpl(fn) { - var previousTransition = ReactSharedInternals.T, - previousUpdatePriority = Internals.p; - try { - if ( - ((ReactSharedInternals.T = null), - (Internals.p = DiscreteEventPriority), - fn) - ) - return fn(); - } finally { - (ReactSharedInternals.T = previousTransition), - (Internals.p = previousUpdatePriority), - Internals.d.f() && - error$jscomp$0( - "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task." - ); - } - } - function flushSyncErrorInBuildsThatSupportLegacyMode() { - throw Error( - "Expected this build of React to not support legacy mode but it does. This is a bug in React." - ); - } function getCrossOriginStringAs(as, input) { if ("font" === as) return ""; if ("string" === typeof input) @@ -23838,37 +23320,6 @@ __DEV__ && ? "`" + thing + "`" : 'something with type "' + typeof thing + '"'; } - function flushSyncFromReconciler(fn) { - (executionContext & (RenderContext | CommitContext)) !== NoContext && - error$jscomp$0( - "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task." - ); - a: { - null === rootWithPendingPassiveEffects || - disableLegacyMode || - 0 !== rootWithPendingPassiveEffects.tag || - (executionContext & (RenderContext | CommitContext)) !== NoContext || - flushPassiveEffects(); - var prevExecutionContext = executionContext; - executionContext |= BatchedContext; - var prevTransition = ReactSharedInternals.T, - previousPriority = Internals.p; - try { - Internals.p = DiscreteEventPriority; - ReactSharedInternals.T = null; - var JSCompiler_inline_result = fn ? fn() : void 0; - break a; - } finally { - (Internals.p = previousPriority), - (ReactSharedInternals.T = prevTransition), - (executionContext = prevExecutionContext), - (executionContext & (RenderContext | CommitContext)) === - NoContext && flushSyncWorkAcrossRoots_impl(0, !1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; - } function ReactDOMRoot(internalRoot) { this._internalRoot = internalRoot; } @@ -23903,121 +23354,6 @@ __DEV__ && null != errorInfo.componentStack ? errorInfo.componentStack : "" }) && defaultOnCaughtError(error, errorInfo); } - function getReactRootElementInContainer(container) { - return container - ? container.nodeType === DOCUMENT_NODE - ? container.documentElement - : container.firstChild - : null; - } - function noopOnRecoverableError() {} - function legacyCreateRootFromDOMContainer( - container, - initialChildren, - parentComponent, - callback, - isHydrationContainer - ) { - if (isHydrationContainer) { - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root); - originalCallback.call(instance); - }; - } - var root = createHydrationContainer( - initialChildren, - callback, - container, - 0, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root; - container[internalContainerInstanceKey] = root.current; - listenToAllSupportedEvents( - container.nodeType === COMMENT_NODE ? container.parentNode : container - ); - flushSyncWork$1(); - return root; - } - clearContainer(container); - if ("function" === typeof callback) { - var _originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(_root); - _originalCallback.call(instance); - }; - } - var _root = createFiberRoot( - container, - 0, - !1, - null, - null, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = _root; - container[internalContainerInstanceKey] = _root.current; - listenToAllSupportedEvents( - container.nodeType === COMMENT_NODE ? container.parentNode : container - ); - updateContainerSync(initialChildren, _root, parentComponent, callback); - flushSyncWork$1(); - return _root; - } - function warnOnInvalidCallback(callback) { - null !== callback && - "function" !== typeof callback && - error$jscomp$0( - "Expected the last optional `callback` argument to be a function. Instead received: %s.", - callback - ); - } - function legacyRenderSubtreeIntoContainer( - parentComponent, - children, - container, - forceHydrate, - callback - ) { - topLevelUpdateWarnings(container); - warnOnInvalidCallback(void 0 === callback ? null : callback); - var maybeRoot = container._reactRootContainer; - if (maybeRoot) { - var root = maybeRoot; - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root); - originalCallback.call(instance); - }; - } - updateContainer(children, root, parentComponent, callback); - } else - root = legacyCreateRootFromDOMContainer( - container, - children, - parentComponent, - callback, - forceHydrate - ); - return getPublicRootInstance(root); - } "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && @@ -24060,7 +23396,6 @@ __DEV__ && transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -26698,7 +26033,7 @@ __DEV__ && update.payload = payload; void 0 !== callback && null !== callback && - (warnOnInvalidCallback$1(callback), (update.callback = callback)); + (warnOnInvalidCallback(callback), (update.callback = callback)); callback = enqueueUpdate(inst, update, lane); null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), @@ -26717,7 +26052,7 @@ __DEV__ && update.payload = payload; void 0 !== callback && null !== callback && - (warnOnInvalidCallback$1(callback), (update.callback = callback)); + (warnOnInvalidCallback(callback), (update.callback = callback)); callback = enqueueUpdate(inst, update, lane); null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), @@ -26735,7 +26070,7 @@ __DEV__ && update.tag = ForceUpdate; void 0 !== callback && null !== callback && - (warnOnInvalidCallback$1(callback), (update.callback = callback)); + (warnOnInvalidCallback(callback), (update.callback = callback)); callback = enqueueUpdate(inst, update, lane); null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), @@ -26900,7 +26235,6 @@ __DEV__ && callbacks = [], PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, NoContext = 0, - BatchedContext = 1, RenderContext = 2, CommitContext = 4, RootInProgress = 0, @@ -27503,7 +26837,11 @@ __DEV__ && preconnectsSet = new Set(), previousDispatcher = Internals.d; Internals.d = { - f: disableLegacyMode ? flushSyncWork : previousDispatcher.f, + f: function () { + var previousWasRendering = previousDispatcher.f(), + wasRendering = flushSyncWork$1(); + return previousWasRendering || wasRendering; + }, r: function (form) { var formInst = getInstanceFromNode(form); null !== formInst && 5 === formInst.tag && "form" === formInst.type @@ -27774,17 +27112,14 @@ __DEV__ && ), lastScheduledReplayQueue = null, _enabled = !0, - return_targetInst = null, - flushSync$1 = disableLegacyMode - ? flushSyncImpl - : flushSyncErrorInBuildsThatSupportLegacyMode; + return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-e1378902-20241106" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-682a103c-20241107" !== 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-www-classic-e1378902-20241106\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-682a103c-20241107\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27797,7 +27132,6 @@ __DEV__ && error$jscomp$0( "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills" ); - var flushSync = disableLegacyMode ? flushSync$1 : flushSyncFromReconciler; Internals.findDOMNode = function (componentOrElement) { var fiber = componentOrElement._reactInternals; if (void 0 === fiber) { @@ -27828,11 +27162,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-e1378902-20241106", + version: "19.0.0-www-classic-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27884,7 +27218,16 @@ __DEV__ && error$jscomp$0( "You passed a second argument to root.render(...) but it only accepts one argument." ); - updateContainer(children, root, null, null); + JSCompiler_OptimizeArgumentsArray_p2 = root.current; + var lane = requestUpdateLane(JSCompiler_OptimizeArgumentsArray_p2); + updateContainerImpl( + JSCompiler_OptimizeArgumentsArray_p2, + lane, + children, + root, + null, + null + ); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function (JSCompiler_OptimizeArgumentsArray_p3) { @@ -27932,33 +27275,6 @@ __DEV__ && throw Error( "Expected ReactFiberErrorDialog.showErrorDialog to be a function." ); - var topLevelUpdateWarnings = function (container) { - if ( - container._reactRootContainer && - container.nodeType !== COMMENT_NODE - ) { - var hostInstance = findCurrentFiberUsingSlowPath( - container._reactRootContainer.current - ); - hostInstance = - null !== hostInstance - ? findCurrentHostFiberWithNoPortalsImpl(hostInstance) - : null; - hostInstance = null === hostInstance ? null : hostInstance.stateNode; - hostInstance && - hostInstance.parentNode !== container && - error$jscomp$0( - "It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container." - ); - } - hostInstance = !!container._reactRootContainer; - (container = getReactRootElementInContainer(container)) && - getInstanceFromNode(container) && - !hostInstance && - error$jscomp$0( - "Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render." - ); - }; assign(Internals, { ReactBrowserEventEmitter: { isEnabled: function () { @@ -28052,7 +27368,25 @@ __DEV__ && ? componentOrElement : findHostInstanceWithWarning(componentOrElement, "findDOMNode"); }; - exports.flushSync = flushSync; + exports.flushSync = function (fn) { + var previousTransition = ReactSharedInternals.T, + previousUpdatePriority = Internals.p; + try { + if ( + ((ReactSharedInternals.T = null), + (Internals.p = DiscreteEventPriority), + fn) + ) + return fn(); + } finally { + (ReactSharedInternals.T = previousTransition), + (Internals.p = previousUpdatePriority), + Internals.d.f() && + error$jscomp$0( + "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task." + ); + } + }; exports.hydrateRoot = function (container, initialChildren, options) { options = assign( { @@ -28089,14 +27423,13 @@ __DEV__ && void 0 !== options.unstable_transitionCallbacks && (transitionCallbacks = options.unstable_transitionCallbacks), void 0 !== options.formState && (formState = options.formState)); - initialChildren = createHydrationContainer( - initialChildren, - null, + initialChildren = createFiberRoot( container, 1, + !0, + initialChildren, null != options ? options : null, isStrictMode, - !1, identifierPrefix, onUncaughtError, onCaughtError, @@ -28104,6 +27437,15 @@ __DEV__ && transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(options); + identifierPrefix = createUpdate(isStrictMode); + identifierPrefix.callback = null; + enqueueUpdate(options, identifierPrefix, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -28369,80 +27711,24 @@ __DEV__ && })) : Internals.d.m(href)); }; - exports.render = function (element, container, callback) { - if (disableLegacyMode) - throw ( - (error$jscomp$0( - "ReactDOM.render was removed in React 19. Use createRoot instead." - ), - Error("ReactDOM: Unsupported Legacy Mode API.")) - ); + exports.render = function () { error$jscomp$0( - "ReactDOM.render has not been supported since React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://react.dev/link/switch-to-createroot" - ); - if (!isValidContainerLegacy(container)) - throw Error("Target container is not a DOM element."); - container[internalContainerInstanceKey] && - void 0 === container._reactRootContainer && - error$jscomp$0( - "You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?" - ); - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - !1, - callback + "ReactDOM.render was removed in React 19. Use createRoot instead." ); + throw Error("ReactDOM: Unsupported Legacy Mode API."); }; exports.requestFormReset = function (form) { Internals.d.r(form); }; - exports.unmountComponentAtNode = function (container) { - if (disableLegacyMode) - throw ( - (error$jscomp$0( - "unmountComponentAtNode was removed in React 19. Use root.unmount() instead." - ), - Error("ReactDOM: Unsupported Legacy Mode API.")) - ); - if (!isValidContainerLegacy(container)) - throw Error("Target container is not a DOM element."); - container[internalContainerInstanceKey] && - void 0 === container._reactRootContainer && - error$jscomp$0( - "You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?" - ); - if (container._reactRootContainer) { - var root = container._reactRootContainer, - rootEl = getReactRootElementInContainer(container); - rootEl && - !getInstanceFromNode(rootEl) && - error$jscomp$0( - "unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React." - ); - updateContainerSync(null, root, null, null); - flushSyncWork$1(); - container._reactRootContainer = null; - container[internalContainerInstanceKey] = null; - return !0; - } - root = getReactRootElementInContainer(container); - root = !(!root || !getInstanceFromNode(root)); - container = - 1 === container.nodeType && - isValidContainerLegacy(container.parentNode) && - !!container.parentNode._reactRootContainer; - root && - error$jscomp$0( - "unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s", - container - ? "You may have accidentally passed in a React root node instead of its container." - : "Instead, have the parent component update its state and rerender in order to remove this component." - ); - return !1; + exports.unmountComponentAtNode = function () { + error$jscomp$0( + "unmountComponentAtNode was removed in React 19. Use root.unmount() instead." + ); + throw Error("ReactDOM: Unsupported Legacy Mode API."); + }; + exports.unstable_batchedUpdates = function (fn, a) { + return fn(a); }; - exports.unstable_batchedUpdates = batchedUpdates$1; exports.unstable_createEventHandle = function (type, options) { function eventHandle(target, callback) { if ("function" !== typeof callback) @@ -28485,7 +27771,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-e1378902-20241106"; + exports.version = "19.0.0-www-classic-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 57924ee2c98b2..329662dbb2f41 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -26894,11 +26894,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-e1378902-20241106" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-682a103c-20241107" !== 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-www-modern-e1378902-20241106\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-682a103c-20241107\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -26941,11 +26941,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-e1378902-20241106", + version: "19.0.0-www-modern-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27550,7 +27550,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-e1378902-20241106"; + exports.version = "19.0.0-www-modern-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index bb312bafc3ba7..94ecd7a518c58 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -63,7 +63,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"), retryLaneExpirationMs = dynamicFeatureFlags.retryLaneExpirationMs, syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs, transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -204,9 +203,6 @@ function getComponentNameFromFiber(fiber) { return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -777,10 +773,10 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - !enableSiblingPrerendering || - 0 === suspendedRetryLanes || - 0 !== updatedLanes || - (disableLegacyMode && 0 === root.tag) || + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } @@ -1572,10 +1568,6 @@ function isContextProvider(type) { type = type.childContextTypes; return null !== type && void 0 !== type; } -function popContext() { - pop(didPerformWorkStackCursor); - pop(contextStackCursor); -} function pushTopLevelContextObject(fiber, context, didChange) { if (contextStackCursor.current !== emptyContextObject) throw Error(formatProdErrorMessage(168)); @@ -1964,7 +1956,7 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { do { var didPerformSomeWork = !1; for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root$26.tag)) + if (!onlyLegacy) if (0 !== syncTransitionLanes) { var pendingLanes = root$26.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; @@ -3227,15 +3219,7 @@ function createChildReconciler(shouldTrackSideEffects) { thenableState$1 = null; return firstChildFiber; } catch (x) { - if ( - x === SuspenseException || - (!disableLegacyMode && - 0 === (returnFiber.mode & 1) && - "object" === typeof x && - null !== x && - "function" === typeof x.then) - ) - throw x; + if (x === SuspenseException) throw x; var fiber = createFiber(29, x, null, returnFiber.mode); fiber.lanes = lanes; fiber.return = returnFiber; @@ -4282,7 +4266,7 @@ function startTransition( fiber, queue, { then: function () {}, status: "rejected", reason: error }, - requestUpdateLane(fiber) + requestUpdateLane() ); } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); @@ -4342,12 +4326,7 @@ function ensureFormComponentIsStateful(formFiber) { } function requestFormReset$1(formFiber) { var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; - dispatchSetStateInternal( - formFiber, - resetStateQueue, - {}, - requestUpdateLane(formFiber) - ); + dispatchSetStateInternal(formFiber, resetStateQueue, {}, requestUpdateLane()); } function useHostTransitionStatus() { return readContext(HostTransitionContext); @@ -4363,7 +4342,7 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider); + var lane = requestUpdateLane(); fiber = createUpdate(lane); var root$74 = enqueueUpdate(provider, fiber, lane); null !== root$74 && @@ -4381,7 +4360,7 @@ function refreshCache(fiber, seedKey, seedValue) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -4398,7 +4377,7 @@ function dispatchReducerAction(fiber, queue, action) { entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); dispatchSetStateInternal(fiber, queue, action, lane); } function dispatchSetStateInternal(fiber, queue, action, lane) { @@ -4846,7 +4825,7 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); @@ -4857,7 +4836,7 @@ var classComponentUpdater = { }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 1; update.payload = payload; @@ -4869,7 +4848,7 @@ var classComponentUpdater = { }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); @@ -4895,33 +4874,6 @@ function checkShouldComponentUpdate( ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0; } -function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = !1, - unmaskedContext = emptyContextObject; - var context = ctor.contextType; - "object" === typeof context && null !== context - ? (context = readContext(context)) - : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (isLegacyContextConsumer = ctor.contextTypes), - (context = (isLegacyContextConsumer = - null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer) - ? getMaskedContext(workInProgress, unmaskedContext) - : emptyContextObject)); - ctor = new ctor(props, context); - workInProgress.memoizedState = - null !== ctor.state && void 0 !== ctor.state ? ctor.state : null; - ctor.updater = classComponentUpdater; - workInProgress.stateNode = ctor; - ctor._reactInternals = workInProgress; - isLegacyContextConsumer && - ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); - return ctor; -} function callComponentWillReceiveProps( workInProgress, instance, @@ -4936,41 +4888,6 @@ function callComponentWillReceiveProps( instance.state !== workInProgress && classComponentUpdater.enqueueReplaceState(instance, instance.state, null); } -function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = {}; - initializeUpdateQueue(workInProgress); - var contextType = ctor.contextType; - "object" === typeof contextType && null !== contextType - ? (instance.context = readContext(contextType)) - : ((contextType = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (instance.context = getMaskedContext(workInProgress, contextType))); - instance.state = workInProgress.memoizedState; - contextType = ctor.getDerivedStateFromProps; - "function" === typeof contextType && - (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps), - (instance.state = workInProgress.memoizedState)); - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ((ctor = instance.state), - "function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount(), - ctor !== instance.state && - classComponentUpdater.enqueueReplaceState(instance, instance.state, null), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (instance.state = workInProgress.memoizedState)); - "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308); -} function resolveClassComponentProps( Component, baseProps, @@ -5106,36 +5023,6 @@ function initializeClassErrorUpdate(update, root, fiber, errorInfo) { }); }); } -function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes -) { - if (!disableLegacyMode && 0 === (suspenseBoundary.mode & 1)) - return ( - suspenseBoundary === returnFiber - ? (suspenseBoundary.flags |= 65536) - : ((suspenseBoundary.flags |= 128), - (sourceFiber.flags |= 131072), - (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag - ? null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= 2)), - suspenseBoundary - ); - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; -} function throwException( root, returnFiber, @@ -5149,98 +5036,70 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + returnFiber = sourceFiber.alternate; + null !== returnFiber && propagateParentContextChanges( - currentSourceFiber, + returnFiber, sourceFiber, rootRenderLanes, !0 ); - currentSourceFiber = sourceFiber.tag; - disableLegacyMode || - 0 !== (sourceFiber.mode & 1) || - (0 !== currentSourceFiber && - 11 !== currentSourceFiber && - 15 !== currentSourceFiber) || - ((currentSourceFiber = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), - (sourceFiber.memoizedState = currentSourceFiber.memoizedState), - (sourceFiber.lanes = currentSourceFiber.lanes)) - : ((sourceFiber.updateQueue = null), - (sourceFiber.memoizedState = null))); - currentSourceFiber = suspenseHandlerStackCursor.current; - if (null !== currentSourceFiber) { - switch (currentSourceFiber.tag) { + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 13: - if (disableLegacyMode || sourceFiber.mode & 1) + return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === currentSourceFiber.alternate && + : null === sourceFiber.alternate && 0 === workInProgressRootExitStatus && - (workInProgressRootExitStatus = 3); - currentSourceFiber.flags &= -257; - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes + (workInProgressRootExitStatus = 3), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 ); - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? (currentSourceFiber.updateQueue = new Set([value])) - : sourceFiber.add(value), - (disableLegacyMode || currentSourceFiber.mode & 1) && - attachPingListener(root, value, rootRenderLanes)); - return !1; case 22: - if (disableLegacyMode || currentSourceFiber.mode & 1) - return ( - (currentSourceFiber.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? ((sourceFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (currentSourceFiber.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); + return ( + (sourceFiber.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); } - throw Error(formatProdErrorMessage(435, currentSourceFiber.tag)); + throw Error(formatProdErrorMessage(435, sourceFiber.tag)); } - if (disableLegacyMode || 1 === root.tag) - return ( - attachPingListener(root, value, rootRenderLanes), - renderDidSuspendDelayIfPossible(), - !1 - ); - value = Error(formatProdErrorMessage(426)); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - if (isHydrating && (disableLegacyMode || sourceFiber.mode & 1)) + if (isHydrating) return ( - (currentSourceFiber = suspenseHandlerStackCursor.current), - null !== currentSourceFiber - ? (0 === (currentSourceFiber.flags & 65536) && - (currentSourceFiber.flags |= 256), - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && ((root = Error(formatProdErrorMessage(422), { cause: value })), queueHydrationError(createCapturedValueAtFiber(root, sourceFiber)))) @@ -5255,10 +5114,10 @@ function throwException( (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -5266,62 +5125,54 @@ function throwException( (workInProgressRootExitStatus = 2)), !1 ); - currentSourceFiber = Error(formatProdErrorMessage(520), { cause: value }); - currentSourceFiber = createCapturedValueAtFiber( - currentSourceFiber, - sourceFiber - ); + var wrapperError = Error(formatProdErrorMessage(520), { cause: value }); + wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [wrapperError]) + : workInProgressRootConcurrentErrors.push(wrapperError); 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (returnFiber.tag) { + switch (sourceFiber.tag) { case 3: return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (returnFiber.lanes |= root), - (root = createRootErrorUpdate( - returnFiber.stateNode, - sourceFiber, - root - )), - enqueueCapturedUpdate(returnFiber, root), + (sourceFiber.lanes |= root), + (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((value = returnFiber.type), - (currentSourceFiber = returnFiber.stateNode), - 0 === (returnFiber.flags & 128) && - ("function" === typeof value.getDerivedStateFromError || - (null !== currentSourceFiber && - "function" === typeof currentSourceFiber.componentDidCatch && + ((returnFiber = sourceFiber.type), + (wrapperError = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== wrapperError && + "function" === typeof wrapperError.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - currentSourceFiber - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError))))) ) return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (returnFiber.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - returnFiber, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(returnFiber, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - returnFiber = returnFiber.return; - } while (null !== returnFiber); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } function processTransitionCallbacks(pendingTransitions, endTime, callbacks) { @@ -5431,10 +5282,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$91 = workInProgress.stateNode; + root$90 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$91.incompleteTransitions.has(transition)) { + if (!root$90.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5442,11 +5293,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$91.incompleteTransitions.set(transition, markerInstance); + root$90.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$91.incompleteTransitions.forEach(function (markerInstance) { + root$90.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5622,36 +5473,28 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { renderLanes ); } - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - if (0 !== (renderLanes & 536870912)) - (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ), - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(), - pushOffscreenSuspenseHandler(workInProgress); - else - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & 536870912)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && pushTransition(workInProgress, null, null), - reuseHiddenContextOnStack(), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -5780,47 +5623,123 @@ function updateClassComponent( pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - constructClassInstance(workInProgress, Component, nextProps), - mountClassInstance(workInProgress, Component, nextProps, renderLanes), - (nextProps = !0); - else if (null === current) { - var instance = workInProgress.stateNode, - unresolvedOldProps = workInProgress.memoizedProps, - oldProps = resolveClassComponentProps( + if (null === workInProgress.stateNode) { + var isLegacyContextConsumer = !1, + unmaskedContext = emptyContextObject; + var context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((unmaskedContext = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (isLegacyContextConsumer = Component.contextTypes), + (context = (isLegacyContextConsumer = + null !== isLegacyContextConsumer && + void 0 !== isLegacyContextConsumer) + ? getMaskedContext(workInProgress, unmaskedContext) + : emptyContextObject)); + var instance = new Component(nextProps, context); + workInProgress.memoizedState = + null !== instance.state && void 0 !== instance.state + ? instance.state + : null; + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; + instance._reactInternals = workInProgress; + isLegacyContextConsumer && + ((isLegacyContextConsumer = workInProgress.stateNode), + (isLegacyContextConsumer.__reactInternalMemoizedUnmaskedChildContext = + unmaskedContext), + (isLegacyContextConsumer.__reactInternalMemoizedMaskedChildContext = + context)); + unmaskedContext = workInProgress.stateNode; + unmaskedContext.props = nextProps; + unmaskedContext.state = workInProgress.memoizedState; + unmaskedContext.refs = {}; + initializeUpdateQueue(workInProgress); + isLegacyContextConsumer = Component.contextType; + "object" === typeof isLegacyContextConsumer && + null !== isLegacyContextConsumer + ? (unmaskedContext.context = readContext(isLegacyContextConsumer)) + : ((isLegacyContextConsumer = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (unmaskedContext.context = getMaskedContext( + workInProgress, + isLegacyContextConsumer + ))); + unmaskedContext.state = workInProgress.memoizedState; + isLegacyContextConsumer = Component.getDerivedStateFromProps; + "function" === typeof isLegacyContextConsumer && + (applyDerivedStateFromProps( + workInProgress, Component, - unresolvedOldProps, - workInProgress.type === workInProgress.elementType - ); - instance.props = oldProps; - var oldContext = instance.context, - contextType = Component.contextType; - "object" === typeof contextType && null !== contextType - ? (contextType = readContext(contextType)) - : ((contextType = isContextProvider(Component) + isLegacyContextConsumer, + nextProps + ), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ((isLegacyContextConsumer = unmaskedContext.state), + "function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount(), + isLegacyContextConsumer !== unmaskedContext.state && + classComponentUpdater.enqueueReplaceState( + unmaskedContext, + unmaskedContext.state, + null + ), + processUpdateQueue( + workInProgress, + nextProps, + unmaskedContext, + renderLanes + ), + suspendIfUpdateReadFromEntangledAsyncAction(), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof unmaskedContext.componentDidMount && + (workInProgress.flags |= 4194308); + nextProps = !0; + } else if (null === current) { + unmaskedContext = workInProgress.stateNode; + var unresolvedOldProps = workInProgress.memoizedProps; + isLegacyContextConsumer = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); + unmaskedContext.props = isLegacyContextConsumer; + var oldContext = unmaskedContext.context; + context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((context = isContextProvider(Component) ? previousContext : contextStackCursor.current), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (context = getMaskedContext(workInProgress, context))); + var getDerivedStateFromProps = Component.getDerivedStateFromProps; + instance = + "function" === typeof getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate; unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== contextType) && + instance || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((unresolvedOldProps || oldContext !== context) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, - contextType + context )); hasForceUpdate = !1; var oldState = workInProgress.memoizedState; - instance.state = oldState; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = oldState; + processUpdateQueue(workInProgress, nextProps, unmaskedContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; unresolvedOldProps || @@ -5835,49 +5754,50 @@ function updateClassComponent( nextProps ), (oldContext = workInProgress.memoizedState)), - (oldProps = + (isLegacyContextConsumer = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - oldProps, + isLegacyContextConsumer, nextProps, oldState, oldContext, - contextType + context )) - ? (hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ("function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount()), - "function" === typeof instance.componentDidMount && + ? (instance || + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ("function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount()), + "function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308)) - : ("function" === typeof instance.componentDidMount && + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = oldContext)), - (instance.props = nextProps), - (instance.state = oldContext), - (instance.context = contextType), - (nextProps = oldProps)) - : ("function" === typeof instance.componentDidMount && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = oldContext), + (unmaskedContext.context = context), + (nextProps = isLegacyContextConsumer)) + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (nextProps = !1)); } else { - instance = workInProgress.stateNode; + unmaskedContext = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + isLegacyContextConsumer = workInProgress.memoizedProps; + context = resolveClassComponentProps( Component, - oldProps, + isLegacyContextConsumer, workInProgress.type === workInProgress.elementType ); - instance.props = contextType; - hasNewLifecycles = workInProgress.pendingProps; - unresolvedOldProps = instance.context; + unmaskedContext.props = context; + instance = workInProgress.pendingProps; + unresolvedOldProps = unmaskedContext.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -5888,23 +5808,24 @@ function updateClassComponent( oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = "function" === typeof oldState || - "function" === typeof instance.getSnapshotBeforeUpdate) || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate) || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((isLegacyContextConsumer !== instance || + unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, oldContext )); hasForceUpdate = !1; unresolvedOldProps = workInProgress.memoizedState; - instance.state = unresolvedOldProps; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = unresolvedOldProps; + processUpdateQueue(workInProgress, nextProps, unmaskedContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; - oldProps !== hasNewLifecycles || + isLegacyContextConsumer !== instance || unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || @@ -5919,12 +5840,12 @@ function updateClassComponent( nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, @@ -5934,91 +5855,89 @@ function updateClassComponent( null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || - ("function" !== typeof instance.UNSAFE_componentWillUpdate && - "function" !== typeof instance.componentWillUpdate) || - ("function" === typeof instance.componentWillUpdate && - instance.componentWillUpdate(nextProps, newState, oldContext), - "function" === typeof instance.UNSAFE_componentWillUpdate && - instance.UNSAFE_componentWillUpdate( + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillUpdate && + "function" !== typeof unmaskedContext.componentWillUpdate) || + ("function" === typeof unmaskedContext.componentWillUpdate && + unmaskedContext.componentWillUpdate( + nextProps, + newState, + oldContext + ), + "function" === + typeof unmaskedContext.UNSAFE_componentWillUpdate && + unmaskedContext.UNSAFE_componentWillUpdate( nextProps, newState, oldContext )), - "function" === typeof instance.componentDidUpdate && + "function" === typeof unmaskedContext.componentDidUpdate && (workInProgress.flags |= 4), - "function" === typeof instance.getSnapshotBeforeUpdate && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate && (workInProgress.flags |= 1024)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), - (instance.props = nextProps), - (instance.state = newState), - (instance.context = oldContext), - (nextProps = contextType)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); -} -function finishClassComponent( - current, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes -) { + unmaskedContext = nextProps; markRef(current, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) - ); - shouldUpdate = workInProgress.stateNode; - var nextChildren = - didCaptureError && "function" !== typeof Component.getDerivedStateFromError - ? null - : shouldUpdate.render(); - workInProgress.flags |= 1; - null !== current && didCaptureError - ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + (isLegacyContextConsumer = + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? null + : unmaskedContext.render()), + (workInProgress.flags |= 1), + null !== current && nextProps + ? ((workInProgress.child = reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + isLegacyContextConsumer, + renderLanes + ))) + : reconcileChildren( + current, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current = bailoutOnAlreadyFinishedWork( + current, workInProgress, - null, - nextChildren, renderLanes - ))) - : reconcileChildren(current, workInProgress, nextChildren, renderLanes); - workInProgress.memoizedState = shouldUpdate.state; - hasContext && invalidateContextProvider(workInProgress, Component, !0); - return workInProgress.child; + ))); + return current; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; @@ -6156,18 +6075,18 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = showFallback.updateQueue), - null === current + (renderLanes = showFallback.updateQueue), + null === renderLanes ? (showFallback.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), nextProps ); if ("number" === typeof nextProps.unstable_expectedLoadTime) @@ -6216,11 +6135,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : (reuseSuspenseHandlerOnStack(workInProgress), (showFallback = nextProps.fallback), (nextInstance = workInProgress.mode), - (nextProps = createFiberFromOffscreen( + (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextInstance, - 0, - null + nextInstance )), (showFallback = createFiberFromFragment( showFallback, @@ -6233,13 +6150,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (showFallback.return = workInProgress), (nextProps.sibling = showFallback), (workInProgress.child = nextProps), - (disableLegacyMode || 0 !== (workInProgress.mode & 1)) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), (nextProps = workInProgress.child), (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), @@ -6343,7 +6259,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )), (nextInstance._reactRetry = workInProgress), (workInProgress = null)) - : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + : ((current = JSCompiler_temp$jscomp$0.treeContext), (nextHydratableInstance = getNextHydratable( nextInstance.nextSibling )), @@ -6351,12 +6267,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (isHydrating = !0), (hydrationErrors = null), (rootOrSingletonContext = !1), - null !== renderLanes && + null !== current && ((idStack[idStackIndex++] = treeContextId), (idStack[idStackIndex++] = treeContextOverflow), (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), + (treeContextId = current.id), + (treeContextOverflow = current.overflow), (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, @@ -6372,20 +6288,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (nextInstance = workInProgress.mode), (JSCompiler_temp$jscomp$0 = current.child), (digest = JSCompiler_temp$jscomp$0.sibling), - (didSuspend = { mode: "hidden", children: nextProps.children }), - disableLegacyMode || - 0 !== (nextInstance & 1) || - workInProgress.child === JSCompiler_temp$jscomp$0 - ? ((nextProps = createWorkInProgress( - JSCompiler_temp$jscomp$0, - didSuspend - )), - (nextProps.subtreeFlags = - JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)) - : ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = didSuspend), - (workInProgress.deletions = null)), + (nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, { + mode: "hidden", + children: nextProps.children + })), + (nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280), null !== digest ? (showFallback = createWorkInProgress(digest, showFallback)) : ((showFallback = createFiberFromFragment( @@ -6450,32 +6358,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_temp = current.child; - current = JSCompiler_temp.sibling; - JSCompiler_temp = createWorkInProgress(JSCompiler_temp, { + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { mode: "visible", children: nextProps.children }); - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - (JSCompiler_temp.lanes = renderLanes); - JSCompiler_temp.return = workInProgress; - JSCompiler_temp.sibling = null; + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_temp = workInProgress.deletions), + null === JSCompiler_temp ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_temp; + : JSCompiler_temp.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_temp; + return renderLanes; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = createFiberFromOffscreen( + primaryChildren = mountWorkInProgressOffscreenFiber( { mode: "visible", children: primaryChildren }, - workInProgress.mode, - 0, - null + workInProgress.mode ); primaryChildren.return = workInProgress; return (workInProgress.child = primaryChildren); @@ -6486,30 +6389,26 @@ function mountSuspenseFallbackChildren( fallbackChildren, renderLanes ) { - var mode = workInProgress.mode, - progressedPrimaryFragment = workInProgress.child; - primaryChildren = { mode: "hidden", children: primaryChildren }; - disableLegacyMode || 0 !== (mode & 1) || null === progressedPrimaryFragment - ? (progressedPrimaryFragment = createFiberFromOffscreen( - primaryChildren, - mode, - 0, - null - )) - : ((progressedPrimaryFragment.childLanes = 0), - (progressedPrimaryFragment.pendingProps = primaryChildren)); + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); fallbackChildren = createFiberFromFragment( fallbackChildren, mode, renderLanes, null ); - progressedPrimaryFragment.return = workInProgress; + primaryChildren.return = workInProgress; fallbackChildren.return = workInProgress; - progressedPrimaryFragment.sibling = fallbackChildren; - workInProgress.child = progressedPrimaryFragment; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; return fallbackChildren; } +function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + return createFiberFromOffscreen(offscreenProps, mode, 0, null); +} function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -6587,68 +6486,57 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { nextProps &= 1; } push(suspenseStackCursor, nextProps); - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); + break; + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - else workInProgress.memoizedState = null; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; + } + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); + break; + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); + break; + default: + workInProgress.memoizedState = null; + } return workInProgress.child; } -function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - null === current || - ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); -} function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); workInProgressRootSkippedLanes |= workInProgress.lanes; @@ -6814,12 +6702,11 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - var elementType = workInProgress.elementType; a: { - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); var props = workInProgress.pendingProps; - current = elementType._init; - current = current(elementType._payload); + current = workInProgress.elementType; + var init = current._init; + current = init(current._payload); workInProgress.type = current; if ("function" === typeof current) shouldConstruct(current) @@ -6845,10 +6732,7 @@ function beginWork(current, workInProgress, renderLanes) { ))); else { if (void 0 !== current && null !== current) - if ( - ((elementType = current.$$typeof), - elementType === REACT_FORWARD_REF_TYPE) - ) { + if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { props = disableDefaultPropsExceptForClasses ? props : resolveDefaultPropsOnNonClassComponent(current, props); @@ -6861,7 +6745,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes ); break a; - } else if (elementType === REACT_MEMO_TYPE) { + } else if (init === REACT_MEMO_TYPE) { props = disableDefaultPropsExceptForClasses ? props : resolveDefaultPropsOnNonClassComponent(current, props); @@ -6885,43 +6769,37 @@ function beginWork(current, workInProgress, renderLanes) { case 0: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), updateFunctionComponent( current, workInProgress, props, - elementType, + init, renderLanes ) ); case 1: return ( (props = workInProgress.type), - (elementType = resolveClassComponentProps( + (init = resolveClassComponentProps( props, workInProgress.pendingProps, workInProgress.elementType === props )), - updateClassComponent( - current, - workInProgress, - props, - elementType, - renderLanes - ) + updateClassComponent(current, workInProgress, props, init, renderLanes) ); case 3: a: { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); var nextProps = workInProgress.pendingProps; - elementType = workInProgress.memoizedState; - props = elementType.element; + init = workInProgress.memoizedState; + props = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; @@ -6930,7 +6808,7 @@ function beginWork(current, workInProgress, renderLanes) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); - nextProps !== elementType.cache && + nextProps !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -6939,15 +6817,15 @@ function beginWork(current, workInProgress, renderLanes) { ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; - if (elementType.isDehydrated) + if (init.isDehydrated) if ( - ((elementType = { + ((init = { element: nextProps, isDehydrated: !1, cache: nextState.cache }), - (workInProgress.updateQueue.baseState = elementType), - (workInProgress.memoizedState = elementType), + (workInProgress.updateQueue.baseState = init), + (workInProgress.memoizedState = init), workInProgress.flags & 256) ) { workInProgress = mountHostRootWithoutHydrating( @@ -7064,7 +6942,7 @@ function beginWork(current, workInProgress, renderLanes) { ); case 5: if (null === current && isHydrating) { - if ((elementType = props = nextHydratableInstance)) + if ((init = props = nextHydratableInstance)) (props = canHydrateInstance( props, workInProgress.type, @@ -7076,22 +6954,22 @@ function beginWork(current, workInProgress, renderLanes) { (hydrationParentFiber = workInProgress), (nextHydratableInstance = getNextHydratable(props.firstChild)), (rootOrSingletonContext = !1), - (elementType = !0)) - : (elementType = !1); - elementType || throwOnHydrationMismatch(workInProgress); + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - elementType = workInProgress.type; + init = workInProgress.type; nextProps = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; props = nextProps.children; - shouldSetTextContent(elementType, nextProps) + shouldSetTextContent(init, nextProps) ? (props = null) : null !== nextState && - shouldSetTextContent(elementType, nextState) && + shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); null !== workInProgress.memoizedState && - ((elementType = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -7099,7 +6977,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = elementType)); + (HostTransitionContext._currentValue = init)); markRef(current, workInProgress); reconcileChildren(current, workInProgress, props, renderLanes); return workInProgress.child; @@ -7142,19 +7020,13 @@ function beginWork(current, workInProgress, renderLanes) { case 11: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - updateForwardRef( - current, - workInProgress, - props, - elementType, - renderLanes - ) + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + updateForwardRef(current, workInProgress, props, init, renderLanes) ); case 7: return ( @@ -7201,13 +7073,13 @@ function beginWork(current, workInProgress, renderLanes) { ); case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress), - (elementType = readContext(elementType)), - (props = props(elementType)), + (init = readContext(init)), + (props = props(init)), (workInProgress.flags |= 1), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child @@ -7215,20 +7087,14 @@ function beginWork(current, workInProgress, renderLanes) { case 14: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props.type, elementType)), - updateMemoComponent( - current, - workInProgress, - props, - elementType, - renderLanes - ) + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) ); case 15: return updateSimpleMemoComponent( @@ -7238,47 +7104,6 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - isContextProvider(props) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1); - prepareToReadContext(workInProgress); - constructClassInstance(workInProgress, props, elementType); - mountClassInstance(workInProgress, props, elementType, renderLanes); - return finishClassComponent( - null, - workInProgress, - props, - !0, - current, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - props, - elementType, - renderLanes - ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: @@ -7297,38 +7122,34 @@ function beginWork(current, workInProgress, renderLanes) { prepareToReadContext(workInProgress), (props = readContext(CacheContext)), null === current - ? ((elementType = peekCacheFromPool()), - null === elementType && - ((elementType = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (elementType.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && - (elementType.pooledCacheLanes |= renderLanes), - (elementType = nextProps)), - (workInProgress.memoizedState = { - parent: props, - cache: elementType - }), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, elementType)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (elementType = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - elementType.parent !== props - ? ((elementType = { parent: props, cache: props }), - (workInProgress.memoizedState = elementType), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - elementType), + init), pushProvider(workInProgress, CacheContext, props)) : ((props = nextProps.cache), pushProvider(workInProgress, CacheContext, props), - props !== elementType.cache && + props !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -7807,14 +7628,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$133 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$133 = lastTailNode), + for (var lastTailNode$125 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$125 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$133 + null === lastTailNode$125 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$133.sibling = null); + : (lastTailNode$125.sibling = null); } } function bubbleProperties(completedWork) { @@ -7824,19 +7645,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$134 = completedWork.child; null !== child$134; ) - (newChildLanes |= child$134.lanes | child$134.childLanes), - (subtreeFlags |= child$134.subtreeFlags & 31457280), - (subtreeFlags |= child$134.flags & 31457280), - (child$134.return = completedWork), - (child$134 = child$134.sibling); + for (var child$126 = completedWork.child; null !== child$126; ) + (newChildLanes |= child$126.lanes | child$126.childLanes), + (subtreeFlags |= child$126.subtreeFlags & 31457280), + (subtreeFlags |= child$126.flags & 31457280), + (child$126.return = completedWork), + (child$126 = child$126.sibling); else - for (child$134 = completedWork.child; null !== child$134; ) - (newChildLanes |= child$134.lanes | child$134.childLanes), - (subtreeFlags |= child$134.subtreeFlags), - (subtreeFlags |= child$134.flags), - (child$134.return = completedWork), - (child$134 = child$134.sibling); + for (child$126 = completedWork.child; null !== child$126; ) + (newChildLanes |= child$126.lanes | child$126.childLanes), + (subtreeFlags |= child$126.subtreeFlags), + (subtreeFlags |= child$126.flags), + (child$126.return = completedWork), + (child$126 = child$126.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7845,8 +7666,6 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -7859,7 +7678,8 @@ function completeWork(current, workInProgress, renderLanes) { return bubbleProperties(workInProgress), null; case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor)), bubbleProperties(workInProgress), null ); @@ -8133,11 +7953,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$146 = null; + var cache$138 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$146 = newProps.memoizedState.cachePool.pool); - cache$146 !== type && (newProps.flags |= 2048); + (cache$138 = newProps.memoizedState.cachePool.pool); + cache$138 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8166,18 +7986,13 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress), null ); - case 17: - if (disableLegacyMode) break; - isContextProvider(workInProgress.type) && popContext(); - bubbleProperties(workInProgress); - return null; case 19: pop(suspenseStackCursor); type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$146 = type.rendering; - if (null === cache$146) + cache$138 = type.rendering; + if (null === cache$138) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8185,11 +8000,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$146 = findFirstSuspended(current); - if (null !== cache$146) { + cache$138 = findFirstSuspended(current); + if (null !== cache$138) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$146.updateQueue; + current = cache$138.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8214,7 +8029,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$146)), null !== current)) { + if (((current = findFirstSuspended(cache$138)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8224,7 +8039,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$146.alternate && + !cache$138.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8237,13 +8052,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$146.sibling = workInProgress.child), - (workInProgress.child = cache$146)) + ? ((cache$138.sibling = workInProgress.child), + (workInProgress.child = cache$138)) : ((current = type.last), null !== current - ? (current.sibling = cache$146) - : (workInProgress.child = cache$146), - (type.last = cache$146)); + ? (current.sibling = cache$138) + : (workInProgress.child = cache$138), + (type.last = cache$138)); } if (null !== type.tail) return ( @@ -8284,14 +8099,14 @@ function completeWork(current, workInProgress, renderLanes) { ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || (!disableLegacyMode && 0 === (workInProgress.mode & 1)) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & 536870912) && + newProps + ? 0 !== (renderLanes & 536870912) && 0 === (workInProgress.flags & 128) && (bubbleProperties(workInProgress), 23 !== workInProgress.tag && workInProgress.subtreeFlags & 6 && - (workInProgress.flags |= 8192)), + (workInProgress.flags |= 8192)) + : bubbleProperties(workInProgress), (renderLanes = workInProgress.updateQueue), null !== renderLanes && scheduleRetryEffect(workInProgress, renderLanes.retryQueue), @@ -8327,8 +8142,6 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -8337,7 +8150,8 @@ function unwindWork(current, workInProgress) { switch (workInProgress.tag) { case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor)), (current = workInProgress.flags), current & 65536 ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) @@ -8417,7 +8231,9 @@ function unwindInterruptedWork(current, interruptedWork) { switch (interruptedWork.tag) { case 1: current = interruptedWork.type.childContextTypes; - null !== current && void 0 !== current && popContext(); + null !== current && + void 0 !== current && + (pop(didPerformWorkStackCursor), pop(contextStackCursor)); break; case 3: popProvider(CacheContext); @@ -8593,8 +8409,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$165) { - captureCommitPhaseError(current, nearestMountedAncestor, error$165); + } catch (error$156) { + captureCommitPhaseError(current, nearestMountedAncestor, error$156); } else ref.current = null; } @@ -8750,7 +8566,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$204) { + } catch (e$195) { JSCompiler_temp = null; break a; } @@ -8894,8 +8710,23 @@ function commitBeforeMutationEffects(root, firstChild) { } break; case 3: - 0 !== (JSCompiler_temp & 1024) && - clearContainer(firstChild.stateNode.containerInfo); + if (0 !== (JSCompiler_temp & 1024)) + if ( + ((root = firstChild.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + 9 === JSCompiler_temp) + ) + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { + case "HEAD": + case "HTML": + case "BODY": + clearContainerSparingly(root); + break; + default: + root.textContent = ""; + } break; case 5: case 26: @@ -8953,11 +8784,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$164) { + } catch (error$155) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$164 + error$155 ); } } @@ -9002,30 +8833,25 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevProps = - null !== finishedWork.memoizedState || offscreenSubtreeIsHidden), - !prevProps) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + prevProps = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevProps) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevProps; + (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -9300,7 +9126,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$173 = hostParentIsContainer; + var prevHostParentIsContainer$164 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9308,7 +9134,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$173; + hostParentIsContainer = prevHostParentIsContainer$164; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9414,21 +9240,15 @@ function commitDeletionEffectsOnFiber( case 22: offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor); - disableLegacyMode || deletedFiber.mode & 1 - ? ((offscreenSubtreeWasHidden = - (prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ), - (offscreenSubtreeWasHidden = prevHostParent)) - : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + offscreenSubtreeWasHidden = + (prevHostParent = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState; + recursivelyTraverseDeletionEffects( + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); + offscreenSubtreeWasHidden = prevHostParent; break; default: recursivelyTraverseDeletionEffects( @@ -9871,15 +9691,13 @@ function commitMutationEffectsOnFiber(finishedWork, root) { safelyDetachRef(current, current.return)); node = null !== finishedWork.memoizedState; nextNode = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & 1 - ? ((nodeName = offscreenSubtreeIsHidden), - (type = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = nodeName || node), - (offscreenSubtreeWasHidden = type || nextNode), - recursivelyTraverseMutationEffects(root, finishedWork), - (offscreenSubtreeWasHidden = type), - (offscreenSubtreeIsHidden = nodeName)) - : recursivelyTraverseMutationEffects(root, finishedWork); + nodeName = offscreenSubtreeIsHidden; + type = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = nodeName || node; + offscreenSubtreeWasHidden = type || nextNode; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = type; + offscreenSubtreeIsHidden = nodeName; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -9895,8 +9713,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null === current || nextNode || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -10016,21 +9833,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$166 = JSCompiler_inline_result.stateNode; + var parent$157 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$166, ""), + (setTextContent(parent$157, ""), (JSCompiler_inline_result.flags &= -33)); - var before$167 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$167, parent$166); + var before$158 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$158, parent$157); break; case 3: case 4: - var parent$168 = JSCompiler_inline_result.stateNode.containerInfo, - before$169 = getHostSibling(finishedWork); + var parent$159 = JSCompiler_inline_result.stateNode.containerInfo, + before$160 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$169, - parent$168 + before$160, + parent$159 ); break; default: @@ -10418,18 +10235,7 @@ function commitPassiveMountOnFiber( committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((nextCache._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) + : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork) : nextCache._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10527,9 +10333,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$184 = finishedWork.stateNode; + var instance$175 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$184._visibility & 4 + ? instance$175._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10537,20 +10343,11 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((instance$184._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$184._visibility |= 4), + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) + : ((instance$175._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10563,7 +10360,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$184 + instance$175 ); break; case 24: @@ -10990,16 +10787,14 @@ var legacyErrorBoundariesThatAlreadyFailed = null, pendingPassiveTransitions = null, nestedUpdateCount = 0, rootWithNestedUpdates = null; -function requestUpdateLane(fiber) { - fiber = fiber.mode; - return disableLegacyMode || 0 !== (fiber & 1) - ? 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes - ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes - : null !== ReactSharedInternals.T - ? ((fiber = currentEntangledLane), - 0 !== fiber ? fiber : requestTransitionLane()) - : resolveUpdatePriority() - : 2; +function requestUpdateLane() { + if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) + return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; + if (null !== ReactSharedInternals.T) { + var actionScopeLane = currentEntangledLane; + return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane(); + } + return resolveUpdatePriority(); } function requestDeferredLane() { 0 === workInProgressDeferredLane && @@ -11025,21 +10820,20 @@ function scheduleUpdateOnFiber(root, fiber, lane) { ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { - if (enableTransitionTracing) { - var transition = ReactSharedInternals.T; - if ( - null !== transition && - null != transition.name && - (-1 === transition.startTime && (transition.startTime = now()), - enableTransitionTracing) - ) { - var transitionLanesMap = root.transitionLanes, - index$11 = 31 - clz32(lane), - transitions = transitionLanesMap[index$11]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index$11] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index$11 = 31 - clz32(lane), + transitions = transitionLanesMap[index$11]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index$11] = transitions; } root === workInProgressRoot && (0 === (executionContext & 2) && @@ -11052,12 +10846,6 @@ function scheduleUpdateOnFiber(root, fiber, lane) { workInProgressRootDidSkipSuspendedSiblings )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ((workInProgressRootRenderTargetTime = now() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { @@ -11088,10 +10876,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = !1; continue; } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { + if (2 === exitStatus) { renderWasConcurrent = lanes; if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) var JSCompiler_inline_result = 0; @@ -11362,19 +11147,6 @@ function markRootSuspended( 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } -function batchedUpdates$1(fn, a) { - if (disableLegacyMode) return fn(a); - var prevExecutionContext = executionContext; - executionContext |= 1; - try { - return fn(a); - } finally { - (executionContext = prevExecutionContext), - 0 === executionContext && - ((workInProgressRootRenderTargetTime = now() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); - } -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -11548,8 +11320,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$192) { - handleThrow(root, thrownValue$192); + } catch (thrownValue$183) { + handleThrow(root, thrownValue$183); } while (1); lanes && root.shellSuspendCounter++; @@ -11664,8 +11436,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$194) { - handleThrow(root, thrownValue$194); + } catch (thrownValue$185) { + handleThrow(root, thrownValue$185); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -11978,9 +11750,7 @@ function commitRootImpl( renderPriorityLevel(remainingLanes.value, { componentStack: remainingLanes.stack }); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -12017,7 +11787,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$199 = rootWithPendingPassiveEffects, + var root$190 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12032,7 +11802,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$199, remainingLanes); + releaseRootPooledCache(root$190, remainingLanes); } } return !1; @@ -12160,10 +11930,7 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || 0 !== (retryLane & 1) ? claimNextRetryLane() : 2)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -12368,12 +12135,10 @@ function createFiberFromTypeAndProps( return createFiberFromFragment(pendingProps.children, mode, lanes, key); case REACT_STRICT_MODE_TYPE: fiberTag = 8; - mode |= 8; - if (disableLegacyMode || 0 !== (mode & 1)) - (mode |= 16), - enableDO_NOT_USE_disableStrictPassiveEffect && - pendingProps.DO_NOT_USE_disableStrictPassiveEffect && - (mode |= 64); + mode |= 24; + enableDO_NOT_USE_disableStrictPassiveEffect && + pendingProps.DO_NOT_USE_disableStrictPassiveEffect && + (mode |= 64); break; case REACT_PROFILER_TYPE: return ( @@ -12546,7 +12311,7 @@ function FiberRootNode( onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -12620,20 +12385,19 @@ function createFiberRoot( containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), !0 === isStrictMode && (tag |= 24)) - : (tag = 0); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; - tag = createCache(); - tag.refCount++; - containerInfo.pooledCache = tag; - tag.refCount++; + hydrationCallbacks = createCache(); + hydrationCallbacks.refCount++; + containerInfo.pooledCache = hydrationCallbacks; + hydrationCallbacks.refCount++; isStrictMode.memoizedState = { element: initialChildren, isDehydrated: hydrate, - cache: tag + cache: hydrationCallbacks }; initializeUpdateQueue(isStrictMode); return containerInfo; @@ -12699,72 +12463,6 @@ function findHostInstance(component) { component = null !== component ? findCurrentHostFiberImpl(component) : null; return null === component ? null : component.stateNode; } -function createHydrationContainer( - initialChildren, - callback, - containerInfo, - tag, - hydrationCallbacks, - isStrictMode, - concurrentUpdatesByDefaultOverride, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState -) { - initialChildren = createFiberRoot( - containerInfo, - tag, - !0, - initialChildren, - hydrationCallbacks, - isStrictMode, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState - ); - initialChildren.context = getContextForSubtree(null); - containerInfo = initialChildren.current; - tag = requestUpdateLane(containerInfo); - hydrationCallbacks = createUpdate(tag); - hydrationCallbacks.callback = - void 0 !== callback && null !== callback ? callback : null; - enqueueUpdate(containerInfo, hydrationCallbacks, tag); - initialChildren.current.lanes = tag; - markRootUpdated(initialChildren, tag); - ensureRootIsScheduled(initialChildren); - return initialChildren; -} -function updateContainer(element, container, parentComponent, callback) { - var current = container.current, - lane = requestUpdateLane(current); - updateContainerImpl( - current, - lane, - element, - container, - parentComponent, - callback - ); - return lane; -} -function updateContainerSync(element, container, parentComponent, callback) { - 0 === container.tag && flushPassiveEffects(); - updateContainerImpl( - container.current, - 2, - element, - container, - parentComponent, - callback - ); - return 2; -} function updateContainerImpl( rootFiber, lane, @@ -12786,17 +12484,6 @@ function updateContainerImpl( (scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane)); } -function getPublicRootInstance(container) { - container = container.current; - if (!container.child) return null; - switch (container.child.tag) { - case 27: - case 5: - return container.child.stateNode; - default: - return container.child.stateNode; - } -} function markRetryLaneImpl(fiber, retryLane) { fiber = fiber.memoizedState; if (null !== fiber && null !== fiber.dehydrated) { @@ -12820,7 +12507,7 @@ function batchedUpdates(fn, a, b) { if (isInsideEventHandler) return fn(a, b); isInsideEventHandler = !0; try { - return batchedUpdates$1(fn, a, b); + return fn(a); } finally { if ( ((isInsideEventHandler = !1), @@ -13351,19 +13038,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$364; + var JSCompiler_inline_result$jscomp$348; if (canUseDOM) { - var isSupported$jscomp$inline_1539 = "oninput" in document; - if (!isSupported$jscomp$inline_1539) { - var element$jscomp$inline_1540 = document.createElement("div"); - element$jscomp$inline_1540.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1539 = - "function" === typeof element$jscomp$inline_1540.oninput; + var isSupported$jscomp$inline_1520 = "oninput" in document; + if (!isSupported$jscomp$inline_1520) { + var element$jscomp$inline_1521 = document.createElement("div"); + element$jscomp$inline_1521.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1520 = + "function" === typeof element$jscomp$inline_1521.oninput; } - JSCompiler_inline_result$jscomp$364 = isSupported$jscomp$inline_1539; - } else JSCompiler_inline_result$jscomp$364 = !1; + JSCompiler_inline_result$jscomp$348 = isSupported$jscomp$inline_1520; + } else JSCompiler_inline_result$jscomp$348 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$364 && + JSCompiler_inline_result$jscomp$348 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13774,20 +13461,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1580 = 0; - i$jscomp$inline_1580 < simpleEventPluginEvents.length; - i$jscomp$inline_1580++ + var i$jscomp$inline_1561 = 0; + i$jscomp$inline_1561 < simpleEventPluginEvents.length; + i$jscomp$inline_1561++ ) { - var eventName$jscomp$inline_1581 = - simpleEventPluginEvents[i$jscomp$inline_1580], - domEventName$jscomp$inline_1582 = - eventName$jscomp$inline_1581.toLowerCase(), - capitalizedEvent$jscomp$inline_1583 = - eventName$jscomp$inline_1581[0].toUpperCase() + - eventName$jscomp$inline_1581.slice(1); + var eventName$jscomp$inline_1562 = + simpleEventPluginEvents[i$jscomp$inline_1561], + domEventName$jscomp$inline_1563 = + eventName$jscomp$inline_1562.toLowerCase(), + capitalizedEvent$jscomp$inline_1564 = + eventName$jscomp$inline_1562[0].toUpperCase() + + eventName$jscomp$inline_1562.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1582, - "on" + capitalizedEvent$jscomp$inline_1583 + domEventName$jscomp$inline_1563, + "on" + capitalizedEvent$jscomp$inline_1564 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15080,34 +14767,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$218 = props[hasSrc]; - if (null != propValue$218) + var propValue$209 = props[hasSrc]; + if (null != propValue$209) switch (hasSrc) { case "name": - hasSrcSet = propValue$218; + hasSrcSet = propValue$209; break; case "type": - propValue = propValue$218; + propValue = propValue$209; break; case "checked": - checked = propValue$218; + checked = propValue$209; break; case "defaultChecked": - defaultChecked = propValue$218; + defaultChecked = propValue$209; break; case "value": - propKey = propValue$218; + propKey = propValue$209; break; case "defaultValue": - defaultValue = propValue$218; + defaultValue = propValue$209; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$218) + if (null != propValue$209) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$218, props, null); + setProp(domElement, tag, hasSrc, propValue$209, props, null); } } initInput( @@ -15244,14 +14931,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$218 in props) - props.hasOwnProperty(propValue$218) && - ((hasSrc = props[propValue$218]), + for (propValue$209 in props) + props.hasOwnProperty(propValue$209) && + ((hasSrc = props[propValue$209]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$218, + propValue$209, hasSrc, props, void 0 @@ -15299,14 +14986,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$235 in nextProps) { - var propKey = nextProps[propKey$235]; - lastProp = lastProps[propKey$235]; + for (var propKey$226 in nextProps) { + var propKey = nextProps[propKey$226]; + lastProp = lastProps[propKey$226]; if ( - nextProps.hasOwnProperty(propKey$235) && + nextProps.hasOwnProperty(propKey$226) && (null != propKey || null != lastProp) ) - switch (propKey$235) { + switch (propKey$226) { case "type": type = propKey; break; @@ -15335,7 +15022,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$235, + propKey$226, propKey, nextProps, lastProp @@ -15354,7 +15041,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$235 = null; + propKey = value = defaultValue = propKey$226 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15385,7 +15072,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$235 = type; + propKey$226 = type; break; case "defaultValue": defaultValue = type; @@ -15406,15 +15093,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$235 - ? updateOptions(domElement, !!lastProps, propKey$235, !1) + null != propKey$226 + ? updateOptions(domElement, !!lastProps, propKey$226, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$235 = null; + propKey = propKey$226 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15438,7 +15125,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$235 = name; + propKey$226 = name; break; case "defaultValue": propKey = name; @@ -15452,17 +15139,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$235, propKey); + updateTextarea(domElement, propKey$226, propKey); return; case "option": - for (var propKey$251 in lastProps) + for (var propKey$242 in lastProps) if ( - ((propKey$235 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - null != propKey$235 && - !nextProps.hasOwnProperty(propKey$251)) + ((propKey$226 = lastProps[propKey$242]), + lastProps.hasOwnProperty(propKey$242) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$242)) ) - switch (propKey$251) { + switch (propKey$242) { case "selected": domElement.selected = !1; break; @@ -15470,33 +15157,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$251, + propKey$242, null, nextProps, - propKey$235 + propKey$226 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$235 = nextProps[lastDefaultValue]), + ((propKey$226 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$235 !== propKey && - (null != propKey$235 || null != propKey)) + propKey$226 !== propKey && + (null != propKey$226 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$235 && - "function" !== typeof propKey$235 && - "symbol" !== typeof propKey$235; + propKey$226 && + "function" !== typeof propKey$226 && + "symbol" !== typeof propKey$226; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$235, + propKey$226, nextProps, propKey ); @@ -15517,24 +15204,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$256 in lastProps) - (propKey$235 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - null != propKey$235 && - !nextProps.hasOwnProperty(propKey$256) && - setProp(domElement, tag, propKey$256, null, nextProps, propKey$235); + for (var propKey$247 in lastProps) + (propKey$226 = lastProps[propKey$247]), + lastProps.hasOwnProperty(propKey$247) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$247) && + setProp(domElement, tag, propKey$247, null, nextProps, propKey$226); for (checked in nextProps) if ( - ((propKey$235 = nextProps[checked]), + ((propKey$226 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$235 !== propKey && - (null != propKey$235 || null != propKey)) + propKey$226 !== propKey && + (null != propKey$226 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$235) + if (null != propKey$226) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15542,7 +15229,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$235, + propKey$226, nextProps, propKey ); @@ -15550,49 +15237,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$261 in lastProps) - (propKey$235 = lastProps[propKey$261]), - lastProps.hasOwnProperty(propKey$261) && - void 0 !== propKey$235 && - !nextProps.hasOwnProperty(propKey$261) && + for (var propKey$252 in lastProps) + (propKey$226 = lastProps[propKey$252]), + lastProps.hasOwnProperty(propKey$252) && + void 0 !== propKey$226 && + !nextProps.hasOwnProperty(propKey$252) && setPropOnCustomElement( domElement, tag, - propKey$261, + propKey$252, void 0, nextProps, - propKey$235 + propKey$226 ); for (defaultChecked in nextProps) - (propKey$235 = nextProps[defaultChecked]), + (propKey$226 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$235 === propKey || - (void 0 === propKey$235 && void 0 === propKey) || + propKey$226 === propKey || + (void 0 === propKey$226 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$235, + propKey$226, nextProps, propKey ); return; } } - for (var propKey$266 in lastProps) - (propKey$235 = lastProps[propKey$266]), - lastProps.hasOwnProperty(propKey$266) && - null != propKey$235 && - !nextProps.hasOwnProperty(propKey$266) && - setProp(domElement, tag, propKey$266, null, nextProps, propKey$235); + for (var propKey$257 in lastProps) + (propKey$226 = lastProps[propKey$257]), + lastProps.hasOwnProperty(propKey$257) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$257) && + setProp(domElement, tag, propKey$257, null, nextProps, propKey$226); for (lastProp in nextProps) - (propKey$235 = nextProps[lastProp]), + (propKey$226 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$235 === propKey || - (null == propKey$235 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$235, nextProps, propKey); + propKey$226 === propKey || + (null == propKey$226 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$226, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15712,20 +15399,6 @@ function clearSuspenseBoundary(parentInstance, suspenseInstance) { } while (node); retryIfBlockedOn(suspenseInstance); } -function clearContainer(container) { - var nodeType = container.nodeType; - if (9 === nodeType) clearContainerSparingly(container); - else if (1 === nodeType) - switch (container.nodeName) { - case "HEAD": - case "HTML": - case "BODY": - clearContainerSparingly(container); - break; - default: - container.textContent = ""; - } -} function clearContainerSparingly(container) { var nextNode = container.firstChild; nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling); @@ -15894,7 +15567,7 @@ function getHoistableRoot(container) { } var previousDispatcher = Internals.d; Internals.d = { - f: disableLegacyMode ? flushSyncWork : previousDispatcher.f, + f: flushSyncWork, r: requestFormReset, D: prefetchDNS$1, C: preconnect$1, @@ -15905,12 +15578,9 @@ Internals.d = { M: preinitModuleScript }; function flushSyncWork() { - if (disableLegacyMode) { - var previousWasRendering = previousDispatcher.f(), - wasRendering = flushSyncWork$1(); - return previousWasRendering || wasRendering; - } - throw Error(formatProdErrorMessage(521)); + var previousWasRendering = previousDispatcher.f(), + wasRendering = flushSyncWork$1(); + return previousWasRendering || wasRendering; } function requestFormReset(form) { var formInst = getInstanceFromNode(form); @@ -16187,26 +15857,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$274 = getResourcesFromRoot( + var styles$265 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$275 = styles$274.get(type); - resource$275 || + resource$266 = styles$265.get(type); + resource$266 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$275 = { + (resource$266 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$274.set(type, resource$275), - (styles$274 = JSCompiler_inline_result.querySelector( + styles$265.set(type, resource$266), + (styles$265 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$274._p && - ((resource$275.instance = styles$274), - (resource$275.state.loading = 5)), + !styles$265._p && + ((resource$266.instance = styles$265), + (resource$266.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16219,16 +15889,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$274 || + styles$265 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$275.state + resource$266.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$275; + return resource$266; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16325,37 +15995,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$280 = hoistableRoot.querySelector( + var instance$271 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$280) + if (instance$271) return ( (resource.state.loading |= 4), - (resource.instance = instance$280), - markNodeAsHoistable(instance$280), - instance$280 + (resource.instance = instance$271), + markNodeAsHoistable(instance$271), + instance$271 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$280 = ( + instance$271 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$280); - var linkInstance = instance$280; + markNodeAsHoistable(instance$271); + var linkInstance = instance$271; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$280, "link", instance); + setInitialProperties(instance$271, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$280, props.precedence, hoistableRoot); - return (resource.instance = instance$280); + insertStylesheet(instance$271, props.precedence, hoistableRoot); + return (resource.instance = instance$271); case "script": - instance$280 = getScriptKey(props.src); + instance$271 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$280) + getScriptSelectorFromKey(instance$271) )) ) return ( @@ -16364,7 +16034,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$280))) + if ((styleProps = preloadPropsMap.get(instance$271))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16908,7 +16578,7 @@ function attemptExplicitHydrationTarget(queuedTarget) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted), + var lane = requestUpdateLane(), root = enqueueConcurrentRenderForLane(nearestMounted, lane); null !== root && scheduleUpdateOnFiber(root, nearestMounted, lane); @@ -17341,16 +17011,6 @@ function isValidContainer(node) { " react-mount-point-unstable " !== node.nodeValue)) ); } -function isValidContainerLegacy(node) { - return !( - !node || - (1 !== node.nodeType && - 9 !== node.nodeType && - 11 !== node.nodeType && - (8 !== node.nodeType || - " react-mount-point-unstable " !== node.nodeValue)) - ); -} function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { if ( 1 !== target.nodeType && @@ -17372,69 +17032,23 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { listenerSet.add(listenerSetKey)); } else throw Error(formatProdErrorMessage(369)); } -function flushSyncImpl(fn) { - var previousTransition = ReactSharedInternals.T, - previousUpdatePriority = Internals.p; - try { - if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn(); - } finally { - (ReactSharedInternals.T = previousTransition), - (Internals.p = previousUpdatePriority), - Internals.d.f(); - } -} -function flushSyncErrorInBuildsThatSupportLegacyMode() { - throw Error( - "Expected this build of React to not support legacy mode but it does. This is a bug in React." - ); -} -var flushSync$1 = disableLegacyMode - ? flushSyncImpl - : flushSyncErrorInBuildsThatSupportLegacyMode; function getCrossOriginStringAs(as, input) { if ("font" === as) return ""; if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1753 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1734 = React.version; if ( - "19.0.0-www-classic-e1378902-20241106" !== - isomorphicReactPackageVersion$jscomp$inline_1753 + "19.0.0-www-classic-682a103c-20241107" !== + isomorphicReactPackageVersion$jscomp$inline_1734 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1753, - "19.0.0-www-classic-e1378902-20241106" + isomorphicReactPackageVersion$jscomp$inline_1734, + "19.0.0-www-classic-682a103c-20241107" ) ); -function flushSyncFromReconciler(fn) { - a: { - null === rootWithPendingPassiveEffects || - disableLegacyMode || - 0 !== rootWithPendingPassiveEffects.tag || - 0 !== (executionContext & 6) || - flushPassiveEffects(); - var prevExecutionContext = executionContext; - executionContext |= 1; - var prevTransition = ReactSharedInternals.T, - previousPriority = Internals.p; - try { - Internals.p = 2; - ReactSharedInternals.T = null; - var JSCompiler_inline_result = fn ? fn() : void 0; - break a; - } finally { - (Internals.p = previousPriority), - (ReactSharedInternals.T = prevTransition), - (executionContext = prevExecutionContext), - 0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(0, !1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; -} -var flushSync = disableLegacyMode ? flushSync$1 : flushSyncFromReconciler; Internals.findDOMNode = function (componentOrElement) { return findHostInstance(componentOrElement); }; @@ -17448,25 +17062,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2271 = { +var internals$jscomp$inline_2278 = { bundleType: 0, - version: "19.0.0-www-classic-e1378902-20241106", + version: "19.0.0-www-classic-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2272 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2279 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2272.isDisabled && - hook$jscomp$inline_2272.supportsFiber + !hook$jscomp$inline_2279.isDisabled && + hook$jscomp$inline_2279.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2272.inject( - internals$jscomp$inline_2271 + (rendererID = hook$jscomp$inline_2279.inject( + internals$jscomp$inline_2278 )), - (injectedHook = hook$jscomp$inline_2272); + (injectedHook = hook$jscomp$inline_2279); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17476,7 +17090,9 @@ ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) { var root = this._internalRoot; if (null === root) throw Error(formatProdErrorMessage(409)); - updateContainer(children, root, null, null); + var current = root.current, + lane = requestUpdateLane(); + updateContainerImpl(current, lane, children, root, null, null); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function () { @@ -17484,7 +17100,8 @@ ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = if (null !== root) { this._internalRoot = null; var container = root.containerInfo; - updateContainerSync(null, root, null, null); + 0 === root.tag && flushPassiveEffects(); + updateContainerImpl(root.current, 2, null, root, null, null); flushSyncWork$1(); container[internalContainerInstanceKey] = null; } @@ -17528,104 +17145,6 @@ function wwwOnCaughtError(error, errorInfo) { null != errorInfo.componentStack ? errorInfo.componentStack : "" }) && defaultOnCaughtError(error); } -function noopOnRecoverableError() {} -function legacyCreateRootFromDOMContainer( - container, - initialChildren, - parentComponent, - callback, - isHydrationContainer -) { - if (isHydrationContainer) { - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root$301); - originalCallback.call(instance); - }; - } - var root$301 = createHydrationContainer( - initialChildren, - callback, - container, - 0, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$301; - container[internalContainerInstanceKey] = root$301.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - flushSyncWork$1(); - return root$301; - } - clearContainer(container); - if ("function" === typeof callback) { - var originalCallback$302 = callback; - callback = function () { - var instance = getPublicRootInstance(root$303); - originalCallback$302.call(instance); - }; - } - var root$303 = createFiberRoot( - container, - 0, - !1, - null, - null, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$303; - container[internalContainerInstanceKey] = root$303.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - updateContainerSync(initialChildren, root$303, parentComponent, callback); - flushSyncWork$1(); - return root$303; -} -function legacyRenderSubtreeIntoContainer( - parentComponent, - children, - container, - forceHydrate, - callback -) { - var maybeRoot = container._reactRootContainer; - if (maybeRoot) { - var root = maybeRoot; - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root); - originalCallback.call(instance); - }; - } - updateContainer(children, root, parentComponent, callback); - } else - root = legacyCreateRootFromDOMContainer( - container, - children, - parentComponent, - callback, - forceHydrate - ); - return getPublicRootInstance(root); -} assign(Internals, { ReactBrowserEventEmitter: { isEnabled: function () { @@ -17692,7 +17211,17 @@ exports.findDOMNode = function (componentOrElement) { ? componentOrElement : findHostInstance(componentOrElement); }; -exports.flushSync = flushSync; +exports.flushSync = function (fn) { + var previousTransition = ReactSharedInternals.T, + previousUpdatePriority = Internals.p; + try { + if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn(); + } finally { + (ReactSharedInternals.T = previousTransition), + (Internals.p = previousUpdatePriority), + Internals.d.f(); + } +}; exports.hydrateRoot = function (container, initialChildren, options) { options = assign( { onUncaughtError: wwwOnUncaughtError, onCaughtError: wwwOnCaughtError }, @@ -17719,14 +17248,13 @@ exports.hydrateRoot = function (container, initialChildren, options) { void 0 !== options.unstable_transitionCallbacks && (transitionCallbacks = options.unstable_transitionCallbacks), void 0 !== options.formState && (formState = options.formState)); - initialChildren = createHydrationContainer( - initialChildren, - null, + initialChildren = createFiberRoot( container, 1, + !0, + initialChildren, null != options ? options : null, isStrictMode, - !1, identifierPrefix, onUncaughtError, onCaughtError, @@ -17734,6 +17262,15 @@ exports.hydrateRoot = function (container, initialChildren, options) { transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(); + identifierPrefix = createUpdate(isStrictMode); + identifierPrefix.callback = null; + enqueueUpdate(options, identifierPrefix, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -17846,34 +17383,18 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.render = function (element, container, callback) { - if (disableLegacyMode) throw Error(formatProdErrorMessage(509)); - if (!isValidContainerLegacy(container)) - throw Error(formatProdErrorMessage(299)); - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - !1, - callback - ); +exports.render = function () { + throw Error(formatProdErrorMessage(509)); }; exports.requestFormReset = function (form) { Internals.d.r(form); }; -exports.unmountComponentAtNode = function (container) { - if (disableLegacyMode) throw Error(formatProdErrorMessage(509)); - if (!isValidContainerLegacy(container)) - throw Error(formatProdErrorMessage(299)); - return container._reactRootContainer - ? (updateContainerSync(null, container._reactRootContainer, null, null), - flushSyncWork$1(), - (container._reactRootContainer = null), - (container[internalContainerInstanceKey] = null), - !0) - : !1; +exports.unmountComponentAtNode = function () { + throw Error(formatProdErrorMessage(509)); +}; +exports.unstable_batchedUpdates = function (fn, a) { + return fn(a); }; -exports.unstable_batchedUpdates = batchedUpdates$1; exports.unstable_createEventHandle = function (type, options) { function eventHandle(target, callback) { if ("function" !== typeof callback) @@ -17910,4 +17431,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-e1378902-20241106"; +exports.version = "19.0.0-www-classic-682a103c-20241107"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 0386296e43ddd..51e86067c217a 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -16770,14 +16770,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1724 = React.version; if ( - "19.0.0-www-modern-e1378902-20241106" !== + "19.0.0-www-modern-682a103c-20241107" !== isomorphicReactPackageVersion$jscomp$inline_1724 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1724, - "19.0.0-www-modern-e1378902-20241106" + "19.0.0-www-modern-682a103c-20241107" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16795,11 +16795,11 @@ Internals.Events = [ ]; var internals$jscomp$inline_2260 = { bundleType: 0, - version: "19.0.0-www-modern-e1378902-20241106", + version: "19.0.0-www-modern-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2261 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17162,4 +17162,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-e1378902-20241106"; +exports.version = "19.0.0-www-modern-682a103c-20241107"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index c073768cb8a9e..591370cc8d16c 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -68,7 +68,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"), syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs, transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -209,9 +208,6 @@ function getComponentNameFromFiber(fiber) { return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -858,10 +854,10 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - !enableSiblingPrerendering || - 0 === suspendedRetryLanes || - 0 !== updatedLanes || - (disableLegacyMode && 0 === root.tag) || + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } @@ -1683,10 +1679,6 @@ function isContextProvider(type) { type = type.childContextTypes; return null !== type && void 0 !== type; } -function popContext() { - pop(didPerformWorkStackCursor); - pop(contextStackCursor); -} function pushTopLevelContextObject(fiber, context, didChange) { if (contextStackCursor.current !== emptyContextObject) throw Error(formatProdErrorMessage(168)); @@ -2129,7 +2121,7 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { do { var didPerformSomeWork = !1; for (var root$28 = firstScheduledRoot; null !== root$28; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root$28.tag)) + if (!onlyLegacy) if (0 !== syncTransitionLanes) { var pendingLanes = root$28.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; @@ -3395,15 +3387,7 @@ function createChildReconciler(shouldTrackSideEffects) { thenableState$1 = null; return firstChildFiber; } catch (x) { - if ( - x === SuspenseException || - (!disableLegacyMode && - 0 === (returnFiber.mode & 1) && - "object" === typeof x && - null !== x && - "function" === typeof x.then) - ) - throw x; + if (x === SuspenseException) throw x; var fiber = createFiber(29, x, null, returnFiber.mode); fiber.lanes = lanes; fiber.return = returnFiber; @@ -4450,7 +4434,7 @@ function startTransition( fiber, queue, { then: function () {}, status: "rejected", reason: error }, - requestUpdateLane(fiber) + requestUpdateLane() ); } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); @@ -4510,12 +4494,7 @@ function ensureFormComponentIsStateful(formFiber) { } function requestFormReset$1(formFiber) { var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; - dispatchSetStateInternal( - formFiber, - resetStateQueue, - {}, - requestUpdateLane(formFiber) - ); + dispatchSetStateInternal(formFiber, resetStateQueue, {}, requestUpdateLane()); } function useHostTransitionStatus() { return readContext(HostTransitionContext); @@ -4531,7 +4510,7 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider); + var lane = requestUpdateLane(); fiber = createUpdate(lane); var root$76 = enqueueUpdate(provider, fiber, lane); null !== root$76 && @@ -4549,7 +4528,7 @@ function refreshCache(fiber, seedKey, seedValue) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -4567,7 +4546,7 @@ function dispatchReducerAction(fiber, queue, action) { enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); dispatchSetStateInternal(fiber, queue, action, lane); enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } @@ -5017,7 +4996,7 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); @@ -5029,7 +5008,7 @@ var classComponentUpdater = { }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 1; update.payload = payload; @@ -5042,7 +5021,7 @@ var classComponentUpdater = { }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); @@ -5073,33 +5052,6 @@ function checkShouldComponentUpdate( ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0; } -function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = !1, - unmaskedContext = emptyContextObject; - var context = ctor.contextType; - "object" === typeof context && null !== context - ? (context = readContext(context)) - : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (isLegacyContextConsumer = ctor.contextTypes), - (context = (isLegacyContextConsumer = - null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer) - ? getMaskedContext(workInProgress, unmaskedContext) - : emptyContextObject)); - ctor = new ctor(props, context); - workInProgress.memoizedState = - null !== ctor.state && void 0 !== ctor.state ? ctor.state : null; - ctor.updater = classComponentUpdater; - workInProgress.stateNode = ctor; - ctor._reactInternals = workInProgress; - isLegacyContextConsumer && - ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); - return ctor; -} function callComponentWillReceiveProps( workInProgress, instance, @@ -5114,41 +5066,6 @@ function callComponentWillReceiveProps( instance.state !== workInProgress && classComponentUpdater.enqueueReplaceState(instance, instance.state, null); } -function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = {}; - initializeUpdateQueue(workInProgress); - var contextType = ctor.contextType; - "object" === typeof contextType && null !== contextType - ? (instance.context = readContext(contextType)) - : ((contextType = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (instance.context = getMaskedContext(workInProgress, contextType))); - instance.state = workInProgress.memoizedState; - contextType = ctor.getDerivedStateFromProps; - "function" === typeof contextType && - (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps), - (instance.state = workInProgress.memoizedState)); - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ((ctor = instance.state), - "function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount(), - ctor !== instance.state && - classComponentUpdater.enqueueReplaceState(instance, instance.state, null), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (instance.state = workInProgress.memoizedState)); - "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308); -} function resolveClassComponentProps( Component, baseProps, @@ -5284,36 +5201,6 @@ function initializeClassErrorUpdate(update, root, fiber, errorInfo) { }); }); } -function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes -) { - if (!disableLegacyMode && 0 === (suspenseBoundary.mode & 1)) - return ( - suspenseBoundary === returnFiber - ? (suspenseBoundary.flags |= 65536) - : ((suspenseBoundary.flags |= 128), - (sourceFiber.flags |= 131072), - (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag - ? null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= 2)), - suspenseBoundary - ); - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; -} function throwException( root, returnFiber, @@ -5328,98 +5215,70 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + returnFiber = sourceFiber.alternate; + null !== returnFiber && propagateParentContextChanges( - currentSourceFiber, + returnFiber, sourceFiber, rootRenderLanes, !0 ); - currentSourceFiber = sourceFiber.tag; - disableLegacyMode || - 0 !== (sourceFiber.mode & 1) || - (0 !== currentSourceFiber && - 11 !== currentSourceFiber && - 15 !== currentSourceFiber) || - ((currentSourceFiber = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), - (sourceFiber.memoizedState = currentSourceFiber.memoizedState), - (sourceFiber.lanes = currentSourceFiber.lanes)) - : ((sourceFiber.updateQueue = null), - (sourceFiber.memoizedState = null))); - currentSourceFiber = suspenseHandlerStackCursor.current; - if (null !== currentSourceFiber) { - switch (currentSourceFiber.tag) { + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 13: - if (disableLegacyMode || sourceFiber.mode & 1) + return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === currentSourceFiber.alternate && + : null === sourceFiber.alternate && 0 === workInProgressRootExitStatus && - (workInProgressRootExitStatus = 3); - currentSourceFiber.flags &= -257; - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes + (workInProgressRootExitStatus = 3), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 ); - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? (currentSourceFiber.updateQueue = new Set([value])) - : sourceFiber.add(value), - (disableLegacyMode || currentSourceFiber.mode & 1) && - attachPingListener(root, value, rootRenderLanes)); - return !1; case 22: - if (disableLegacyMode || currentSourceFiber.mode & 1) - return ( - (currentSourceFiber.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? ((sourceFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (currentSourceFiber.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); + return ( + (sourceFiber.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); } - throw Error(formatProdErrorMessage(435, currentSourceFiber.tag)); + throw Error(formatProdErrorMessage(435, sourceFiber.tag)); } - if (disableLegacyMode || 1 === root.tag) - return ( - attachPingListener(root, value, rootRenderLanes), - renderDidSuspendDelayIfPossible(), - !1 - ); - value = Error(formatProdErrorMessage(426)); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - if (isHydrating && (disableLegacyMode || sourceFiber.mode & 1)) + if (isHydrating) return ( - (currentSourceFiber = suspenseHandlerStackCursor.current), - null !== currentSourceFiber - ? (0 === (currentSourceFiber.flags & 65536) && - (currentSourceFiber.flags |= 256), - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && ((root = Error(formatProdErrorMessage(422), { cause: value })), queueHydrationError(createCapturedValueAtFiber(root, sourceFiber)))) @@ -5434,10 +5293,10 @@ function throwException( (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -5445,62 +5304,54 @@ function throwException( (workInProgressRootExitStatus = 2)), !1 ); - currentSourceFiber = Error(formatProdErrorMessage(520), { cause: value }); - currentSourceFiber = createCapturedValueAtFiber( - currentSourceFiber, - sourceFiber - ); + var wrapperError = Error(formatProdErrorMessage(520), { cause: value }); + wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [wrapperError]) + : workInProgressRootConcurrentErrors.push(wrapperError); 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (returnFiber.tag) { + switch (sourceFiber.tag) { case 3: return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (returnFiber.lanes |= root), - (root = createRootErrorUpdate( - returnFiber.stateNode, - sourceFiber, - root - )), - enqueueCapturedUpdate(returnFiber, root), + (sourceFiber.lanes |= root), + (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((value = returnFiber.type), - (currentSourceFiber = returnFiber.stateNode), - 0 === (returnFiber.flags & 128) && - ("function" === typeof value.getDerivedStateFromError || - (null !== currentSourceFiber && - "function" === typeof currentSourceFiber.componentDidCatch && + ((returnFiber = sourceFiber.type), + (wrapperError = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== wrapperError && + "function" === typeof wrapperError.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - currentSourceFiber - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError))))) ) return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (returnFiber.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - returnFiber, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(returnFiber, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - returnFiber = returnFiber.return; - } while (null !== returnFiber); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } function processTransitionCallbacks(pendingTransitions, endTime, callbacks) { @@ -5610,10 +5461,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$93 = workInProgress.stateNode; + root$92 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$93.incompleteTransitions.has(transition)) { + if (!root$92.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5621,11 +5472,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$93.incompleteTransitions.set(transition, markerInstance); + root$92.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$93.incompleteTransitions.forEach(function (markerInstance) { + root$92.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5803,36 +5654,28 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { renderLanes ); } - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - if (0 !== (renderLanes & 536870912)) - (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ), - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(), - pushOffscreenSuspenseHandler(workInProgress); - else - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & 536870912)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && pushTransition(workInProgress, null, null), - reuseHiddenContextOnStack(), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -5965,47 +5808,123 @@ function updateClassComponent( pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - constructClassInstance(workInProgress, Component, nextProps), - mountClassInstance(workInProgress, Component, nextProps, renderLanes), - (nextProps = !0); - else if (null === current) { - var instance = workInProgress.stateNode, - unresolvedOldProps = workInProgress.memoizedProps, - oldProps = resolveClassComponentProps( + if (null === workInProgress.stateNode) { + var isLegacyContextConsumer = !1, + unmaskedContext = emptyContextObject; + var context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((unmaskedContext = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (isLegacyContextConsumer = Component.contextTypes), + (context = (isLegacyContextConsumer = + null !== isLegacyContextConsumer && + void 0 !== isLegacyContextConsumer) + ? getMaskedContext(workInProgress, unmaskedContext) + : emptyContextObject)); + var instance = new Component(nextProps, context); + workInProgress.memoizedState = + null !== instance.state && void 0 !== instance.state + ? instance.state + : null; + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; + instance._reactInternals = workInProgress; + isLegacyContextConsumer && + ((isLegacyContextConsumer = workInProgress.stateNode), + (isLegacyContextConsumer.__reactInternalMemoizedUnmaskedChildContext = + unmaskedContext), + (isLegacyContextConsumer.__reactInternalMemoizedMaskedChildContext = + context)); + unmaskedContext = workInProgress.stateNode; + unmaskedContext.props = nextProps; + unmaskedContext.state = workInProgress.memoizedState; + unmaskedContext.refs = {}; + initializeUpdateQueue(workInProgress); + isLegacyContextConsumer = Component.contextType; + "object" === typeof isLegacyContextConsumer && + null !== isLegacyContextConsumer + ? (unmaskedContext.context = readContext(isLegacyContextConsumer)) + : ((isLegacyContextConsumer = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (unmaskedContext.context = getMaskedContext( + workInProgress, + isLegacyContextConsumer + ))); + unmaskedContext.state = workInProgress.memoizedState; + isLegacyContextConsumer = Component.getDerivedStateFromProps; + "function" === typeof isLegacyContextConsumer && + (applyDerivedStateFromProps( + workInProgress, Component, - unresolvedOldProps, - workInProgress.type === workInProgress.elementType - ); - instance.props = oldProps; - var oldContext = instance.context, - contextType = Component.contextType; - "object" === typeof contextType && null !== contextType - ? (contextType = readContext(contextType)) - : ((contextType = isContextProvider(Component) + isLegacyContextConsumer, + nextProps + ), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ((isLegacyContextConsumer = unmaskedContext.state), + "function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount(), + isLegacyContextConsumer !== unmaskedContext.state && + classComponentUpdater.enqueueReplaceState( + unmaskedContext, + unmaskedContext.state, + null + ), + processUpdateQueue( + workInProgress, + nextProps, + unmaskedContext, + renderLanes + ), + suspendIfUpdateReadFromEntangledAsyncAction(), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof unmaskedContext.componentDidMount && + (workInProgress.flags |= 4194308); + nextProps = !0; + } else if (null === current) { + unmaskedContext = workInProgress.stateNode; + var unresolvedOldProps = workInProgress.memoizedProps; + isLegacyContextConsumer = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); + unmaskedContext.props = isLegacyContextConsumer; + var oldContext = unmaskedContext.context; + context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((context = isContextProvider(Component) ? previousContext : contextStackCursor.current), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (context = getMaskedContext(workInProgress, context))); + var getDerivedStateFromProps = Component.getDerivedStateFromProps; + instance = + "function" === typeof getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate; unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== contextType) && + instance || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((unresolvedOldProps || oldContext !== context) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, - contextType + context )); hasForceUpdate = !1; var oldState = workInProgress.memoizedState; - instance.state = oldState; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = oldState; + processUpdateQueue(workInProgress, nextProps, unmaskedContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; unresolvedOldProps || @@ -6020,49 +5939,50 @@ function updateClassComponent( nextProps ), (oldContext = workInProgress.memoizedState)), - (oldProps = + (isLegacyContextConsumer = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - oldProps, + isLegacyContextConsumer, nextProps, oldState, oldContext, - contextType + context )) - ? (hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ("function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount()), - "function" === typeof instance.componentDidMount && + ? (instance || + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ("function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount()), + "function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308)) - : ("function" === typeof instance.componentDidMount && + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = oldContext)), - (instance.props = nextProps), - (instance.state = oldContext), - (instance.context = contextType), - (nextProps = oldProps)) - : ("function" === typeof instance.componentDidMount && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = oldContext), + (unmaskedContext.context = context), + (nextProps = isLegacyContextConsumer)) + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (nextProps = !1)); } else { - instance = workInProgress.stateNode; + unmaskedContext = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + isLegacyContextConsumer = workInProgress.memoizedProps; + context = resolveClassComponentProps( Component, - oldProps, + isLegacyContextConsumer, workInProgress.type === workInProgress.elementType ); - instance.props = contextType; - hasNewLifecycles = workInProgress.pendingProps; - unresolvedOldProps = instance.context; + unmaskedContext.props = context; + instance = workInProgress.pendingProps; + unresolvedOldProps = unmaskedContext.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -6073,23 +5993,24 @@ function updateClassComponent( oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = "function" === typeof oldState || - "function" === typeof instance.getSnapshotBeforeUpdate) || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate) || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((isLegacyContextConsumer !== instance || + unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, oldContext )); hasForceUpdate = !1; unresolvedOldProps = workInProgress.memoizedState; - instance.state = unresolvedOldProps; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = unresolvedOldProps; + processUpdateQueue(workInProgress, nextProps, unmaskedContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; - oldProps !== hasNewLifecycles || + isLegacyContextConsumer !== instance || unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || @@ -6104,12 +6025,12 @@ function updateClassComponent( nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, @@ -6119,98 +6040,92 @@ function updateClassComponent( null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || - ("function" !== typeof instance.UNSAFE_componentWillUpdate && - "function" !== typeof instance.componentWillUpdate) || - ("function" === typeof instance.componentWillUpdate && - instance.componentWillUpdate(nextProps, newState, oldContext), - "function" === typeof instance.UNSAFE_componentWillUpdate && - instance.UNSAFE_componentWillUpdate( + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillUpdate && + "function" !== typeof unmaskedContext.componentWillUpdate) || + ("function" === typeof unmaskedContext.componentWillUpdate && + unmaskedContext.componentWillUpdate( + nextProps, + newState, + oldContext + ), + "function" === + typeof unmaskedContext.UNSAFE_componentWillUpdate && + unmaskedContext.UNSAFE_componentWillUpdate( nextProps, newState, oldContext )), - "function" === typeof instance.componentDidUpdate && + "function" === typeof unmaskedContext.componentDidUpdate && (workInProgress.flags |= 4), - "function" === typeof instance.getSnapshotBeforeUpdate && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate && (workInProgress.flags |= 1024)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), - (instance.props = nextProps), - (instance.state = newState), - (instance.context = oldContext), - (nextProps = contextType)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); -} -function finishClassComponent( - current, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes -) { + unmaskedContext = nextProps; markRef(current, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) - ); - shouldUpdate = workInProgress.stateNode; - if ( - didCaptureError && - "function" !== typeof Component.getDerivedStateFromError - ) { - var nextChildren = null; - profilerStartTime = -1; - } else - enableSchedulingProfiler && markComponentRenderStarted(workInProgress), - (nextChildren = shouldUpdate.render()), - enableSchedulingProfiler && markComponentRenderStopped(); - workInProgress.flags |= 1; - null !== current && didCaptureError - ? ((didCaptureError = nextChildren), - (workInProgress.child = reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? ((isLegacyContextConsumer = null), (profilerStartTime = -1)) + : (enableSchedulingProfiler && + markComponentRenderStarted(workInProgress), + (isLegacyContextConsumer = unmaskedContext.render()), + enableSchedulingProfiler && markComponentRenderStopped()), + (workInProgress.flags |= 1), + null !== current && nextProps + ? ((nextProps = isLegacyContextConsumer), + (workInProgress.child = reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextProps, + renderLanes + ))) + : reconcileChildren( + current, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current = bailoutOnAlreadyFinishedWork( + current, workInProgress, - null, - didCaptureError, renderLanes - ))) - : reconcileChildren(current, workInProgress, nextChildren, renderLanes); - workInProgress.memoizedState = shouldUpdate.state; - hasContext && invalidateContextProvider(workInProgress, Component, !0); - return workInProgress.child; + ))); + return current; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; @@ -6348,18 +6263,18 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = showFallback.updateQueue), - null === current + (renderLanes = showFallback.updateQueue), + null === renderLanes ? (showFallback.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), nextProps ); if ("number" === typeof nextProps.unstable_expectedLoadTime) @@ -6408,11 +6323,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : (reuseSuspenseHandlerOnStack(workInProgress), (showFallback = nextProps.fallback), (nextInstance = workInProgress.mode), - (nextProps = createFiberFromOffscreen( + (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextInstance, - 0, - null + nextInstance )), (showFallback = createFiberFromFragment( showFallback, @@ -6425,13 +6338,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (showFallback.return = workInProgress), (nextProps.sibling = showFallback), (workInProgress.child = nextProps), - (disableLegacyMode || 0 !== (workInProgress.mode & 1)) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), (nextProps = workInProgress.child), (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), @@ -6535,7 +6447,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )), (nextInstance._reactRetry = workInProgress), (workInProgress = null)) - : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + : ((current = JSCompiler_temp$jscomp$0.treeContext), (nextHydratableInstance = getNextHydratable( nextInstance.nextSibling )), @@ -6543,12 +6455,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (isHydrating = !0), (hydrationErrors = null), (rootOrSingletonContext = !1), - null !== renderLanes && + null !== current && ((idStack[idStackIndex++] = treeContextId), (idStack[idStackIndex++] = treeContextOverflow), (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), + (treeContextId = current.id), + (treeContextOverflow = current.overflow), (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, @@ -6564,27 +6476,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (nextInstance = workInProgress.mode), (JSCompiler_temp$jscomp$0 = current.child), (digest = JSCompiler_temp$jscomp$0.sibling), - (didSuspend = { mode: "hidden", children: nextProps.children }), - disableLegacyMode || - 0 !== (nextInstance & 1) || - workInProgress.child === JSCompiler_temp$jscomp$0 - ? ((nextProps = createWorkInProgress( - JSCompiler_temp$jscomp$0, - didSuspend - )), - (nextProps.subtreeFlags = - JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)) - : ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = didSuspend), - workInProgress.mode & 2 && - ((nextProps.actualDuration = -0), - (nextProps.actualStartTime = -1.1), - (nextProps.selfBaseDuration = - JSCompiler_temp$jscomp$0.selfBaseDuration), - (nextProps.treeBaseDuration = - JSCompiler_temp$jscomp$0.treeBaseDuration)), - (workInProgress.deletions = null)), + (nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, { + mode: "hidden", + children: nextProps.children + })), + (nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280), null !== digest ? (showFallback = createWorkInProgress(digest, showFallback)) : ((showFallback = createFiberFromFragment( @@ -6649,32 +6546,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_temp = current.child; - current = JSCompiler_temp.sibling; - JSCompiler_temp = createWorkInProgress(JSCompiler_temp, { + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { mode: "visible", children: nextProps.children }); - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - (JSCompiler_temp.lanes = renderLanes); - JSCompiler_temp.return = workInProgress; - JSCompiler_temp.sibling = null; + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_temp = workInProgress.deletions), + null === JSCompiler_temp ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_temp; + : JSCompiler_temp.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_temp; + return renderLanes; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = createFiberFromOffscreen( + primaryChildren = mountWorkInProgressOffscreenFiber( { mode: "visible", children: primaryChildren }, - workInProgress.mode, - 0, - null + workInProgress.mode ); primaryChildren.return = workInProgress; return (workInProgress.child = primaryChildren); @@ -6685,35 +6577,26 @@ function mountSuspenseFallbackChildren( fallbackChildren, renderLanes ) { - var mode = workInProgress.mode, - progressedPrimaryFragment = workInProgress.child; - primaryChildren = { mode: "hidden", children: primaryChildren }; - disableLegacyMode || 0 !== (mode & 1) || null === progressedPrimaryFragment - ? (progressedPrimaryFragment = createFiberFromOffscreen( - primaryChildren, - mode, - 0, - null - )) - : ((progressedPrimaryFragment.childLanes = 0), - (progressedPrimaryFragment.pendingProps = primaryChildren), - workInProgress.mode & 2 && - ((progressedPrimaryFragment.actualDuration = -0), - (progressedPrimaryFragment.actualStartTime = -1.1), - (progressedPrimaryFragment.selfBaseDuration = -0), - (progressedPrimaryFragment.treeBaseDuration = -0))); + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); fallbackChildren = createFiberFromFragment( fallbackChildren, mode, renderLanes, null ); - progressedPrimaryFragment.return = workInProgress; + primaryChildren.return = workInProgress; fallbackChildren.return = workInProgress; - progressedPrimaryFragment.sibling = fallbackChildren; - workInProgress.child = progressedPrimaryFragment; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; return fallbackChildren; } +function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + return createFiberFromOffscreen(offscreenProps, mode, 0, null); +} function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -6791,68 +6674,57 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { nextProps &= 1; } push(suspenseStackCursor, nextProps); - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); + break; + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - else workInProgress.memoizedState = null; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; + } + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); + break; + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); + break; + default: + workInProgress.memoizedState = null; + } return workInProgress.child; } -function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - null === current || - ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); -} function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); profilerStartTime = -1; @@ -7027,12 +6899,11 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - var elementType = workInProgress.elementType; a: { - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); var props = workInProgress.pendingProps; - current = elementType._init; - current = current(elementType._payload); + current = workInProgress.elementType; + var init = current._init; + current = init(current._payload); workInProgress.type = current; if ("function" === typeof current) shouldConstruct(current) @@ -7058,10 +6929,7 @@ function beginWork(current, workInProgress, renderLanes) { ))); else { if (void 0 !== current && null !== current) - if ( - ((elementType = current.$$typeof), - elementType === REACT_FORWARD_REF_TYPE) - ) { + if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { props = disableDefaultPropsExceptForClasses ? props : resolveDefaultPropsOnNonClassComponent(current, props); @@ -7074,7 +6942,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes ); break a; - } else if (elementType === REACT_MEMO_TYPE) { + } else if (init === REACT_MEMO_TYPE) { props = disableDefaultPropsExceptForClasses ? props : resolveDefaultPropsOnNonClassComponent(current, props); @@ -7098,43 +6966,37 @@ function beginWork(current, workInProgress, renderLanes) { case 0: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), updateFunctionComponent( current, workInProgress, props, - elementType, + init, renderLanes ) ); case 1: return ( (props = workInProgress.type), - (elementType = resolveClassComponentProps( + (init = resolveClassComponentProps( props, workInProgress.pendingProps, workInProgress.elementType === props )), - updateClassComponent( - current, - workInProgress, - props, - elementType, - renderLanes - ) + updateClassComponent(current, workInProgress, props, init, renderLanes) ); case 3: a: { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); var nextProps = workInProgress.pendingProps; - elementType = workInProgress.memoizedState; - props = elementType.element; + init = workInProgress.memoizedState; + props = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; @@ -7143,7 +7005,7 @@ function beginWork(current, workInProgress, renderLanes) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); - nextProps !== elementType.cache && + nextProps !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -7152,15 +7014,15 @@ function beginWork(current, workInProgress, renderLanes) { ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; - if (elementType.isDehydrated) + if (init.isDehydrated) if ( - ((elementType = { + ((init = { element: nextProps, isDehydrated: !1, cache: nextState.cache }), - (workInProgress.updateQueue.baseState = elementType), - (workInProgress.memoizedState = elementType), + (workInProgress.updateQueue.baseState = init), + (workInProgress.memoizedState = init), workInProgress.flags & 256) ) { workInProgress = mountHostRootWithoutHydrating( @@ -7277,7 +7139,7 @@ function beginWork(current, workInProgress, renderLanes) { ); case 5: if (null === current && isHydrating) { - if ((elementType = props = nextHydratableInstance)) + if ((init = props = nextHydratableInstance)) (props = canHydrateInstance( props, workInProgress.type, @@ -7289,22 +7151,22 @@ function beginWork(current, workInProgress, renderLanes) { (hydrationParentFiber = workInProgress), (nextHydratableInstance = getNextHydratable(props.firstChild)), (rootOrSingletonContext = !1), - (elementType = !0)) - : (elementType = !1); - elementType || throwOnHydrationMismatch(workInProgress); + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - elementType = workInProgress.type; + init = workInProgress.type; nextProps = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; props = nextProps.children; - shouldSetTextContent(elementType, nextProps) + shouldSetTextContent(init, nextProps) ? (props = null) : null !== nextState && - shouldSetTextContent(elementType, nextState) && + shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); null !== workInProgress.memoizedState && - ((elementType = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -7312,7 +7174,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = elementType)); + (HostTransitionContext._currentValue = init)); markRef(current, workInProgress); reconcileChildren(current, workInProgress, props, renderLanes); return workInProgress.child; @@ -7355,19 +7217,13 @@ function beginWork(current, workInProgress, renderLanes) { case 11: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - updateForwardRef( - current, - workInProgress, - props, - elementType, - renderLanes - ) + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + updateForwardRef(current, workInProgress, props, init, renderLanes) ); case 7: return ( @@ -7419,14 +7275,14 @@ function beginWork(current, workInProgress, renderLanes) { ); case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress), - (elementType = readContext(elementType)), + (init = readContext(init)), enableSchedulingProfiler && markComponentRenderStarted(workInProgress), - (props = props(elementType)), + (props = props(init)), enableSchedulingProfiler && markComponentRenderStopped(), (workInProgress.flags |= 1), reconcileChildren(current, workInProgress, props, renderLanes), @@ -7435,20 +7291,14 @@ function beginWork(current, workInProgress, renderLanes) { case 14: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props.type, elementType)), - updateMemoComponent( - current, - workInProgress, - props, - elementType, - renderLanes - ) + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) ); case 15: return updateSimpleMemoComponent( @@ -7458,47 +7308,6 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - isContextProvider(props) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1); - prepareToReadContext(workInProgress); - constructClassInstance(workInProgress, props, elementType); - mountClassInstance(workInProgress, props, elementType, renderLanes); - return finishClassComponent( - null, - workInProgress, - props, - !0, - current, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - props, - elementType, - renderLanes - ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: @@ -7517,38 +7326,34 @@ function beginWork(current, workInProgress, renderLanes) { prepareToReadContext(workInProgress), (props = readContext(CacheContext)), null === current - ? ((elementType = peekCacheFromPool()), - null === elementType && - ((elementType = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (elementType.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && - (elementType.pooledCacheLanes |= renderLanes), - (elementType = nextProps)), - (workInProgress.memoizedState = { - parent: props, - cache: elementType - }), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, elementType)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (elementType = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - elementType.parent !== props - ? ((elementType = { parent: props, cache: props }), - (workInProgress.memoizedState = elementType), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - elementType), + init), pushProvider(workInProgress, CacheContext, props)) : ((props = nextProps.cache), pushProvider(workInProgress, CacheContext, props), - props !== elementType.cache && + props !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -8027,14 +7832,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$136 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$136 = lastTailNode), + for (var lastTailNode$128 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$128 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$136 + null === lastTailNode$128 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$136.sibling = null); + : (lastTailNode$128.sibling = null); } } function bubbleProperties(completedWork) { @@ -8046,53 +7851,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$138 = completedWork.selfBaseDuration, - child$139 = completedWork.child; - null !== child$139; + var treeBaseDuration$130 = completedWork.selfBaseDuration, + child$131 = completedWork.child; + null !== child$131; ) - (newChildLanes |= child$139.lanes | child$139.childLanes), - (subtreeFlags |= child$139.subtreeFlags & 31457280), - (subtreeFlags |= child$139.flags & 31457280), - (treeBaseDuration$138 += child$139.treeBaseDuration), - (child$139 = child$139.sibling); - completedWork.treeBaseDuration = treeBaseDuration$138; + (newChildLanes |= child$131.lanes | child$131.childLanes), + (subtreeFlags |= child$131.subtreeFlags & 31457280), + (subtreeFlags |= child$131.flags & 31457280), + (treeBaseDuration$130 += child$131.treeBaseDuration), + (child$131 = child$131.sibling); + completedWork.treeBaseDuration = treeBaseDuration$130; } else for ( - treeBaseDuration$138 = completedWork.child; - null !== treeBaseDuration$138; + treeBaseDuration$130 = completedWork.child; + null !== treeBaseDuration$130; ) (newChildLanes |= - treeBaseDuration$138.lanes | treeBaseDuration$138.childLanes), - (subtreeFlags |= treeBaseDuration$138.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$138.flags & 31457280), - (treeBaseDuration$138.return = completedWork), - (treeBaseDuration$138 = treeBaseDuration$138.sibling); + treeBaseDuration$130.lanes | treeBaseDuration$130.childLanes), + (subtreeFlags |= treeBaseDuration$130.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$130.flags & 31457280), + (treeBaseDuration$130.return = completedWork), + (treeBaseDuration$130 = treeBaseDuration$130.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$138 = completedWork.actualDuration; - child$139 = completedWork.selfBaseDuration; + treeBaseDuration$130 = completedWork.actualDuration; + child$131 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$138 += child.actualDuration), - (child$139 += child.treeBaseDuration), + (treeBaseDuration$130 += child.actualDuration), + (child$131 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$138; - completedWork.treeBaseDuration = child$139; + completedWork.actualDuration = treeBaseDuration$130; + completedWork.treeBaseDuration = child$131; } else for ( - treeBaseDuration$138 = completedWork.child; - null !== treeBaseDuration$138; + treeBaseDuration$130 = completedWork.child; + null !== treeBaseDuration$130; ) (newChildLanes |= - treeBaseDuration$138.lanes | treeBaseDuration$138.childLanes), - (subtreeFlags |= treeBaseDuration$138.subtreeFlags), - (subtreeFlags |= treeBaseDuration$138.flags), - (treeBaseDuration$138.return = completedWork), - (treeBaseDuration$138 = treeBaseDuration$138.sibling); + treeBaseDuration$130.lanes | treeBaseDuration$130.childLanes), + (subtreeFlags |= treeBaseDuration$130.subtreeFlags), + (subtreeFlags |= treeBaseDuration$130.flags), + (treeBaseDuration$130.return = completedWork), + (treeBaseDuration$130 = treeBaseDuration$130.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8101,8 +7906,6 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -8115,7 +7918,8 @@ function completeWork(current, workInProgress, renderLanes) { return bubbleProperties(workInProgress), null; case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor)), bubbleProperties(workInProgress), null ); @@ -8405,11 +8209,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$154 = null; + var cache$146 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$154 = newProps.memoizedState.cachePool.pool); - cache$154 !== type && (newProps.flags |= 2048); + (cache$146 = newProps.memoizedState.cachePool.pool); + cache$146 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8443,18 +8247,13 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress), null ); - case 17: - if (disableLegacyMode) break; - isContextProvider(workInProgress.type) && popContext(); - bubbleProperties(workInProgress); - return null; case 19: pop(suspenseStackCursor); type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$154 = type.rendering; - if (null === cache$154) + cache$146 = type.rendering; + if (null === cache$146) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8462,11 +8261,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$154 = findFirstSuspended(current); - if (null !== cache$154) { + cache$146 = findFirstSuspended(current); + if (null !== cache$146) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$154.updateQueue; + current = cache$146.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8491,7 +8290,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$154)), null !== current)) { + if (((current = findFirstSuspended(cache$146)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8501,7 +8300,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$154.alternate && + !cache$146.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8514,13 +8313,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$154.sibling = workInProgress.child), - (workInProgress.child = cache$154)) + ? ((cache$146.sibling = workInProgress.child), + (workInProgress.child = cache$146)) : ((current = type.last), null !== current - ? (current.sibling = cache$154) - : (workInProgress.child = cache$154), - (type.last = cache$154)); + ? (current.sibling = cache$146) + : (workInProgress.child = cache$146), + (type.last = cache$146)); } if (null !== type.tail) return ( @@ -8561,14 +8360,14 @@ function completeWork(current, workInProgress, renderLanes) { ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || (!disableLegacyMode && 0 === (workInProgress.mode & 1)) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & 536870912) && + newProps + ? 0 !== (renderLanes & 536870912) && 0 === (workInProgress.flags & 128) && (bubbleProperties(workInProgress), 23 !== workInProgress.tag && workInProgress.subtreeFlags & 6 && - (workInProgress.flags |= 8192)), + (workInProgress.flags |= 8192)) + : bubbleProperties(workInProgress), (renderLanes = workInProgress.updateQueue), null !== renderLanes && scheduleRetryEffect(workInProgress, renderLanes.retryQueue), @@ -8604,8 +8403,6 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -8614,7 +8411,8 @@ function unwindWork(current, workInProgress) { switch (workInProgress.tag) { case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor)), (current = workInProgress.flags), current & 65536 ? ((workInProgress.flags = (current & -65537) | 128), @@ -8703,7 +8501,9 @@ function unwindInterruptedWork(current, interruptedWork) { switch (interruptedWork.tag) { case 1: current = interruptedWork.type.childContextTypes; - null !== current && void 0 !== current && popContext(); + null !== current && + void 0 !== current && + (pop(didPerformWorkStackCursor), pop(contextStackCursor)); break; case 3: popProvider(CacheContext); @@ -8959,8 +8759,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$175) { - captureCommitPhaseError(current, nearestMountedAncestor, error$175); + } catch (error$166) { + captureCommitPhaseError(current, nearestMountedAncestor, error$166); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -9021,8 +8821,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$176) { - captureCommitPhaseError(current, nearestMountedAncestor, error$176); + } catch (error$167) { + captureCommitPhaseError(current, nearestMountedAncestor, error$167); } else ref.current = null; } @@ -9210,7 +9010,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$221) { + } catch (e$212) { JSCompiler_temp = null; break a; } @@ -9354,8 +9154,23 @@ function commitBeforeMutationEffects(root, firstChild) { } break; case 3: - 0 !== (JSCompiler_temp & 1024) && - clearContainer(firstChild.stateNode.containerInfo); + if (0 !== (JSCompiler_temp & 1024)) + if ( + ((root = firstChild.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + 9 === JSCompiler_temp) + ) + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { + case "HEAD": + case "HTML": + case "BODY": + clearContainerSparingly(root); + break; + default: + root.textContent = ""; + } break; case 5: case 26: @@ -9406,11 +9221,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$172) { + } catch (error$163) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$172 + error$163 ); } else { @@ -9428,11 +9243,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$173) { + } catch (error$164) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$173 + error$164 ); } recordEffectDuration(); @@ -9443,11 +9258,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$174) { + } catch (error$165) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$174 + error$165 ); } } @@ -9505,30 +9320,25 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevProps = - null !== finishedWork.memoizedState || offscreenSubtreeIsHidden), - !prevProps) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + prevProps = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevProps) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevProps; + (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -9803,7 +9613,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$185 = hostParentIsContainer; + var prevHostParentIsContainer$176 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9811,7 +9621,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$185; + hostParentIsContainer = prevHostParentIsContainer$176; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9917,21 +9727,15 @@ function commitDeletionEffectsOnFiber( case 22: offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor); - disableLegacyMode || deletedFiber.mode & 1 - ? ((offscreenSubtreeWasHidden = - (prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ), - (offscreenSubtreeWasHidden = prevHostParent)) - : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + offscreenSubtreeWasHidden = + (prevHostParent = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState; + recursivelyTraverseDeletionEffects( + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); + offscreenSubtreeWasHidden = prevHostParent; break; default: recursivelyTraverseDeletionEffects( @@ -10389,15 +10193,13 @@ function commitMutationEffectsOnFiber(finishedWork, root) { safelyDetachRef(current, current.return)); node = null !== finishedWork.memoizedState; nextNode = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & 1 - ? ((nodeName = offscreenSubtreeIsHidden), - (type = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = nodeName || node), - (offscreenSubtreeWasHidden = type || nextNode), - recursivelyTraverseMutationEffects(root, finishedWork), - (offscreenSubtreeWasHidden = type), - (offscreenSubtreeIsHidden = nodeName)) - : recursivelyTraverseMutationEffects(root, finishedWork); + nodeName = offscreenSubtreeIsHidden; + type = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = nodeName || node; + offscreenSubtreeWasHidden = type || nextNode; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = type; + offscreenSubtreeIsHidden = nodeName; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -10413,8 +10215,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null === current || nextNode || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -10532,21 +10333,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$177 = JSCompiler_inline_result.stateNode; + var parent$168 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$177, ""), + (setTextContent(parent$168, ""), (JSCompiler_inline_result.flags &= -33)); - var before$178 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$178, parent$177); + var before$169 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$169, parent$168); break; case 3: case 4: - var parent$179 = JSCompiler_inline_result.stateNode.containerInfo, - before$180 = getHostSibling(finishedWork); + var parent$170 = JSCompiler_inline_result.stateNode.containerInfo, + before$171 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$180, - parent$179 + before$171, + parent$170 ); break; default: @@ -10962,18 +10763,7 @@ function commitPassiveMountOnFiber( committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((prevEffectDuration._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) + : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork) : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11071,9 +10861,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$198 = finishedWork.stateNode; + var instance$189 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$198._visibility & 4 + ? instance$189._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11081,20 +10871,11 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((instance$198._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$198._visibility |= 4), + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) + : ((instance$189._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11107,7 +10888,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$198 + instance$189 ); break; case 24: @@ -11540,16 +11321,14 @@ var legacyErrorBoundariesThatAlreadyFailed = null, pendingPassiveTransitions = null, nestedUpdateCount = 0, rootWithNestedUpdates = null; -function requestUpdateLane(fiber) { - fiber = fiber.mode; - return disableLegacyMode || 0 !== (fiber & 1) - ? 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes - ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes - : null !== ReactSharedInternals.T - ? ((fiber = currentEntangledLane), - 0 !== fiber ? fiber : requestTransitionLane()) - : resolveUpdatePriority() - : 2; +function requestUpdateLane() { + if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) + return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; + if (null !== ReactSharedInternals.T) { + var actionScopeLane = currentEntangledLane; + return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane(); + } + return resolveUpdatePriority(); } function requestDeferredLane() { 0 === workInProgressDeferredLane && @@ -11576,21 +11355,20 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { isDevToolsPresent && addFiberToLanesMap(root, fiber, lane); - if (enableTransitionTracing) { - var transition = ReactSharedInternals.T; - if ( - null !== transition && - null != transition.name && - (-1 === transition.startTime && (transition.startTime = now$1()), - enableTransitionTracing) - ) { - var transitionLanesMap = root.transitionLanes, - index$13 = 31 - clz32(lane), - transitions = transitionLanesMap[index$13]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index$13] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now$1()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index$13 = 31 - clz32(lane), + transitions = transitionLanesMap[index$13]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index$13] = transitions; } root === workInProgressRoot && (0 === (executionContext & 2) && @@ -11603,12 +11381,6 @@ function scheduleUpdateOnFiber(root, fiber, lane) { workInProgressRootDidSkipSuspendedSiblings )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ((workInProgressRootRenderTargetTime = now$1() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { @@ -11639,10 +11411,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = !1; continue; } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { + if (2 === exitStatus) { renderWasConcurrent = lanes; if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) var JSCompiler_inline_result = 0; @@ -11913,19 +11682,6 @@ function markRootSuspended( 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } -function batchedUpdates$1(fn, a) { - if (disableLegacyMode) return fn(a); - var prevExecutionContext = executionContext; - executionContext |= 1; - try { - return fn(a); - } finally { - (executionContext = prevExecutionContext), - 0 === executionContext && - ((workInProgressRootRenderTargetTime = now$1() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); - } -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -12138,8 +11894,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$207) { - handleThrow(root, thrownValue$207); + } catch (thrownValue$198) { + handleThrow(root, thrownValue$198); } while (1); lanes && root.shellSuspendCounter++; @@ -12265,8 +12021,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$209) { - handleThrow(root, thrownValue$209); + } catch (thrownValue$200) { + handleThrow(root, thrownValue$200); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -12624,9 +12380,7 @@ function commitRootImpl( renderPriorityLevel(remainingLanes.value, { componentStack: remainingLanes.stack }); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -12665,7 +12419,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$214 = rootWithPendingPassiveEffects, + var root$205 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12680,7 +12434,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$214, remainingLanes); + releaseRootPooledCache(root$205, remainingLanes); } } return !1; @@ -12822,10 +12576,7 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || 0 !== (retryLane & 1) ? claimNextRetryLane() : 2)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -13051,12 +12802,10 @@ function createFiberFromTypeAndProps( return createFiberFromFragment(pendingProps.children, mode, lanes, key); case REACT_STRICT_MODE_TYPE: fiberTag = 8; - mode |= 8; - if (disableLegacyMode || 0 !== (mode & 1)) - (mode |= 16), - enableDO_NOT_USE_disableStrictPassiveEffect && - pendingProps.DO_NOT_USE_disableStrictPassiveEffect && - (mode |= 64); + mode |= 24; + enableDO_NOT_USE_disableStrictPassiveEffect && + pendingProps.DO_NOT_USE_disableStrictPassiveEffect && + (mode |= 64); break; case REACT_PROFILER_TYPE: return ( @@ -13230,7 +12979,7 @@ function FiberRootNode( onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -13308,21 +13057,20 @@ function createFiberRoot( containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), !0 === isStrictMode && (tag |= 24)) - : (tag = 0); - isDevToolsPresent && (tag |= 2); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + isDevToolsPresent && (hydrationCallbacks |= 2); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; - tag = createCache(); - tag.refCount++; - containerInfo.pooledCache = tag; - tag.refCount++; + hydrationCallbacks = createCache(); + hydrationCallbacks.refCount++; + containerInfo.pooledCache = hydrationCallbacks; + hydrationCallbacks.refCount++; isStrictMode.memoizedState = { element: initialChildren, isDehydrated: hydrate, - cache: tag + cache: hydrationCallbacks }; initializeUpdateQueue(isStrictMode); return containerInfo; @@ -13388,72 +13136,6 @@ function findHostInstance(component) { component = null !== component ? findCurrentHostFiberImpl(component) : null; return null === component ? null : component.stateNode; } -function createHydrationContainer( - initialChildren, - callback, - containerInfo, - tag, - hydrationCallbacks, - isStrictMode, - concurrentUpdatesByDefaultOverride, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState -) { - initialChildren = createFiberRoot( - containerInfo, - tag, - !0, - initialChildren, - hydrationCallbacks, - isStrictMode, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState - ); - initialChildren.context = getContextForSubtree(null); - containerInfo = initialChildren.current; - tag = requestUpdateLane(containerInfo); - hydrationCallbacks = createUpdate(tag); - hydrationCallbacks.callback = - void 0 !== callback && null !== callback ? callback : null; - enqueueUpdate(containerInfo, hydrationCallbacks, tag); - initialChildren.current.lanes = tag; - markRootUpdated(initialChildren, tag); - ensureRootIsScheduled(initialChildren); - return initialChildren; -} -function updateContainer(element, container, parentComponent, callback) { - var current = container.current, - lane = requestUpdateLane(current); - updateContainerImpl( - current, - lane, - element, - container, - parentComponent, - callback - ); - return lane; -} -function updateContainerSync(element, container, parentComponent, callback) { - 0 === container.tag && flushPassiveEffects(); - updateContainerImpl( - container.current, - 2, - element, - container, - parentComponent, - callback - ); - return 2; -} function updateContainerImpl( rootFiber, lane, @@ -13480,17 +13162,6 @@ function updateContainerImpl( (scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane)); } -function getPublicRootInstance(container) { - container = container.current; - if (!container.child) return null; - switch (container.child.tag) { - case 27: - case 5: - return container.child.stateNode; - default: - return container.child.stateNode; - } -} function markRetryLaneImpl(fiber, retryLane) { fiber = fiber.memoizedState; if (null !== fiber && null !== fiber.dehydrated) { @@ -13512,9 +13183,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$219 = 0; - 31 > index$219; - index$219++ + var map = new Map(), lane = 1, index$210 = 0; + 31 > index$210; + index$210++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13529,7 +13200,7 @@ function batchedUpdates(fn, a, b) { if (isInsideEventHandler) return fn(a, b); isInsideEventHandler = !0; try { - return batchedUpdates$1(fn, a, b); + return fn(a); } finally { if ( ((isInsideEventHandler = !1), @@ -14060,19 +13731,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$381; + var JSCompiler_inline_result$jscomp$365; if (canUseDOM) { - var isSupported$jscomp$inline_1632 = "oninput" in document; - if (!isSupported$jscomp$inline_1632) { - var element$jscomp$inline_1633 = document.createElement("div"); - element$jscomp$inline_1633.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1632 = - "function" === typeof element$jscomp$inline_1633.oninput; + var isSupported$jscomp$inline_1613 = "oninput" in document; + if (!isSupported$jscomp$inline_1613) { + var element$jscomp$inline_1614 = document.createElement("div"); + element$jscomp$inline_1614.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1613 = + "function" === typeof element$jscomp$inline_1614.oninput; } - JSCompiler_inline_result$jscomp$381 = isSupported$jscomp$inline_1632; - } else JSCompiler_inline_result$jscomp$381 = !1; + JSCompiler_inline_result$jscomp$365 = isSupported$jscomp$inline_1613; + } else JSCompiler_inline_result$jscomp$365 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$381 && + JSCompiler_inline_result$jscomp$365 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14483,20 +14154,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1673 = 0; - i$jscomp$inline_1673 < simpleEventPluginEvents.length; - i$jscomp$inline_1673++ + var i$jscomp$inline_1654 = 0; + i$jscomp$inline_1654 < simpleEventPluginEvents.length; + i$jscomp$inline_1654++ ) { - var eventName$jscomp$inline_1674 = - simpleEventPluginEvents[i$jscomp$inline_1673], - domEventName$jscomp$inline_1675 = - eventName$jscomp$inline_1674.toLowerCase(), - capitalizedEvent$jscomp$inline_1676 = - eventName$jscomp$inline_1674[0].toUpperCase() + - eventName$jscomp$inline_1674.slice(1); + var eventName$jscomp$inline_1655 = + simpleEventPluginEvents[i$jscomp$inline_1654], + domEventName$jscomp$inline_1656 = + eventName$jscomp$inline_1655.toLowerCase(), + capitalizedEvent$jscomp$inline_1657 = + eventName$jscomp$inline_1655[0].toUpperCase() + + eventName$jscomp$inline_1655.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1675, - "on" + capitalizedEvent$jscomp$inline_1676 + domEventName$jscomp$inline_1656, + "on" + capitalizedEvent$jscomp$inline_1657 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15789,34 +15460,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$235 = props[hasSrc]; - if (null != propValue$235) + var propValue$226 = props[hasSrc]; + if (null != propValue$226) switch (hasSrc) { case "name": - hasSrcSet = propValue$235; + hasSrcSet = propValue$226; break; case "type": - propValue = propValue$235; + propValue = propValue$226; break; case "checked": - checked = propValue$235; + checked = propValue$226; break; case "defaultChecked": - defaultChecked = propValue$235; + defaultChecked = propValue$226; break; case "value": - propKey = propValue$235; + propKey = propValue$226; break; case "defaultValue": - defaultValue = propValue$235; + defaultValue = propValue$226; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$235) + if (null != propValue$226) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$235, props, null); + setProp(domElement, tag, hasSrc, propValue$226, props, null); } } initInput( @@ -15953,14 +15624,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$235 in props) - props.hasOwnProperty(propValue$235) && - ((hasSrc = props[propValue$235]), + for (propValue$226 in props) + props.hasOwnProperty(propValue$226) && + ((hasSrc = props[propValue$226]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$235, + propValue$226, hasSrc, props, void 0 @@ -16008,14 +15679,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$252 in nextProps) { - var propKey = nextProps[propKey$252]; - lastProp = lastProps[propKey$252]; + for (var propKey$243 in nextProps) { + var propKey = nextProps[propKey$243]; + lastProp = lastProps[propKey$243]; if ( - nextProps.hasOwnProperty(propKey$252) && + nextProps.hasOwnProperty(propKey$243) && (null != propKey || null != lastProp) ) - switch (propKey$252) { + switch (propKey$243) { case "type": type = propKey; break; @@ -16044,7 +15715,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$252, + propKey$243, propKey, nextProps, lastProp @@ -16063,7 +15734,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$252 = null; + propKey = value = defaultValue = propKey$243 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16094,7 +15765,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$252 = type; + propKey$243 = type; break; case "defaultValue": defaultValue = type; @@ -16115,15 +15786,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$252 - ? updateOptions(domElement, !!lastProps, propKey$252, !1) + null != propKey$243 + ? updateOptions(domElement, !!lastProps, propKey$243, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$252 = null; + propKey = propKey$243 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16147,7 +15818,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$252 = name; + propKey$243 = name; break; case "defaultValue": propKey = name; @@ -16161,17 +15832,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$252, propKey); + updateTextarea(domElement, propKey$243, propKey); return; case "option": - for (var propKey$268 in lastProps) + for (var propKey$259 in lastProps) if ( - ((propKey$252 = lastProps[propKey$268]), - lastProps.hasOwnProperty(propKey$268) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$268)) + ((propKey$243 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + null != propKey$243 && + !nextProps.hasOwnProperty(propKey$259)) ) - switch (propKey$268) { + switch (propKey$259) { case "selected": domElement.selected = !1; break; @@ -16179,33 +15850,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$268, + propKey$259, null, nextProps, - propKey$252 + propKey$243 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$252 = nextProps[lastDefaultValue]), + ((propKey$243 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$252 !== propKey && - (null != propKey$252 || null != propKey)) + propKey$243 !== propKey && + (null != propKey$243 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$252 && - "function" !== typeof propKey$252 && - "symbol" !== typeof propKey$252; + propKey$243 && + "function" !== typeof propKey$243 && + "symbol" !== typeof propKey$243; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$252, + propKey$243, nextProps, propKey ); @@ -16226,24 +15897,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$273 in lastProps) - (propKey$252 = lastProps[propKey$273]), - lastProps.hasOwnProperty(propKey$273) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$273) && - setProp(domElement, tag, propKey$273, null, nextProps, propKey$252); + for (var propKey$264 in lastProps) + (propKey$243 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$243 && + !nextProps.hasOwnProperty(propKey$264) && + setProp(domElement, tag, propKey$264, null, nextProps, propKey$243); for (checked in nextProps) if ( - ((propKey$252 = nextProps[checked]), + ((propKey$243 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$252 !== propKey && - (null != propKey$252 || null != propKey)) + propKey$243 !== propKey && + (null != propKey$243 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$252) + if (null != propKey$243) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16251,7 +15922,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$252, + propKey$243, nextProps, propKey ); @@ -16259,49 +15930,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$278 in lastProps) - (propKey$252 = lastProps[propKey$278]), - lastProps.hasOwnProperty(propKey$278) && - void 0 !== propKey$252 && - !nextProps.hasOwnProperty(propKey$278) && + for (var propKey$269 in lastProps) + (propKey$243 = lastProps[propKey$269]), + lastProps.hasOwnProperty(propKey$269) && + void 0 !== propKey$243 && + !nextProps.hasOwnProperty(propKey$269) && setPropOnCustomElement( domElement, tag, - propKey$278, + propKey$269, void 0, nextProps, - propKey$252 + propKey$243 ); for (defaultChecked in nextProps) - (propKey$252 = nextProps[defaultChecked]), + (propKey$243 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$252 === propKey || - (void 0 === propKey$252 && void 0 === propKey) || + propKey$243 === propKey || + (void 0 === propKey$243 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$252, + propKey$243, nextProps, propKey ); return; } } - for (var propKey$283 in lastProps) - (propKey$252 = lastProps[propKey$283]), - lastProps.hasOwnProperty(propKey$283) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$283) && - setProp(domElement, tag, propKey$283, null, nextProps, propKey$252); + for (var propKey$274 in lastProps) + (propKey$243 = lastProps[propKey$274]), + lastProps.hasOwnProperty(propKey$274) && + null != propKey$243 && + !nextProps.hasOwnProperty(propKey$274) && + setProp(domElement, tag, propKey$274, null, nextProps, propKey$243); for (lastProp in nextProps) - (propKey$252 = nextProps[lastProp]), + (propKey$243 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$252 === propKey || - (null == propKey$252 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$252, nextProps, propKey); + propKey$243 === propKey || + (null == propKey$243 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$243, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16421,20 +16092,6 @@ function clearSuspenseBoundary(parentInstance, suspenseInstance) { } while (node); retryIfBlockedOn(suspenseInstance); } -function clearContainer(container) { - var nodeType = container.nodeType; - if (9 === nodeType) clearContainerSparingly(container); - else if (1 === nodeType) - switch (container.nodeName) { - case "HEAD": - case "HTML": - case "BODY": - clearContainerSparingly(container); - break; - default: - container.textContent = ""; - } -} function clearContainerSparingly(container) { var nextNode = container.firstChild; nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling); @@ -16603,7 +16260,7 @@ function getHoistableRoot(container) { } var previousDispatcher = Internals.d; Internals.d = { - f: disableLegacyMode ? flushSyncWork : previousDispatcher.f, + f: flushSyncWork, r: requestFormReset, D: prefetchDNS$1, C: preconnect$1, @@ -16614,12 +16271,9 @@ Internals.d = { M: preinitModuleScript }; function flushSyncWork() { - if (disableLegacyMode) { - var previousWasRendering = previousDispatcher.f(), - wasRendering = flushSyncWork$1(); - return previousWasRendering || wasRendering; - } - throw Error(formatProdErrorMessage(521)); + var previousWasRendering = previousDispatcher.f(), + wasRendering = flushSyncWork$1(); + return previousWasRendering || wasRendering; } function requestFormReset(form) { var formInst = getInstanceFromNode(form); @@ -16896,26 +16550,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$291 = getResourcesFromRoot( + var styles$282 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$292 = styles$291.get(type); - resource$292 || + resource$283 = styles$282.get(type); + resource$283 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$292 = { + (resource$283 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$291.set(type, resource$292), - (styles$291 = JSCompiler_inline_result.querySelector( + styles$282.set(type, resource$283), + (styles$282 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$291._p && - ((resource$292.instance = styles$291), - (resource$292.state.loading = 5)), + !styles$282._p && + ((resource$283.instance = styles$282), + (resource$283.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16928,16 +16582,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$291 || + styles$282 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$292.state + resource$283.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$292; + return resource$283; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -17034,37 +16688,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$297 = hoistableRoot.querySelector( + var instance$288 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$297) + if (instance$288) return ( (resource.state.loading |= 4), - (resource.instance = instance$297), - markNodeAsHoistable(instance$297), - instance$297 + (resource.instance = instance$288), + markNodeAsHoistable(instance$288), + instance$288 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$297 = ( + instance$288 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$297); - var linkInstance = instance$297; + markNodeAsHoistable(instance$288); + var linkInstance = instance$288; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$297, "link", instance); + setInitialProperties(instance$288, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$297, props.precedence, hoistableRoot); - return (resource.instance = instance$297); + insertStylesheet(instance$288, props.precedence, hoistableRoot); + return (resource.instance = instance$288); case "script": - instance$297 = getScriptKey(props.src); + instance$288 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$297) + getScriptSelectorFromKey(instance$288) )) ) return ( @@ -17073,7 +16727,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$297))) + if ((styleProps = preloadPropsMap.get(instance$288))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17617,7 +17271,7 @@ function attemptExplicitHydrationTarget(queuedTarget) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted), + var lane = requestUpdateLane(), root = enqueueConcurrentRenderForLane(nearestMounted, lane); null !== root && scheduleUpdateOnFiber(root, nearestMounted, lane); @@ -18050,16 +17704,6 @@ function isValidContainer(node) { " react-mount-point-unstable " !== node.nodeValue)) ); } -function isValidContainerLegacy(node) { - return !( - !node || - (1 !== node.nodeType && - 9 !== node.nodeType && - 11 !== node.nodeType && - (8 !== node.nodeType || - " react-mount-point-unstable " !== node.nodeValue)) - ); -} function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { if ( 1 !== target.nodeType && @@ -18081,69 +17725,23 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { listenerSet.add(listenerSetKey)); } else throw Error(formatProdErrorMessage(369)); } -function flushSyncImpl(fn) { - var previousTransition = ReactSharedInternals.T, - previousUpdatePriority = Internals.p; - try { - if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn(); - } finally { - (ReactSharedInternals.T = previousTransition), - (Internals.p = previousUpdatePriority), - Internals.d.f(); - } -} -function flushSyncErrorInBuildsThatSupportLegacyMode() { - throw Error( - "Expected this build of React to not support legacy mode but it does. This is a bug in React." - ); -} -var flushSync$1 = disableLegacyMode - ? flushSyncImpl - : flushSyncErrorInBuildsThatSupportLegacyMode; function getCrossOriginStringAs(as, input) { if ("font" === as) return ""; if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1846 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1827 = React.version; if ( - "19.0.0-www-classic-e1378902-20241106" !== - isomorphicReactPackageVersion$jscomp$inline_1846 + "19.0.0-www-classic-682a103c-20241107" !== + isomorphicReactPackageVersion$jscomp$inline_1827 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1846, - "19.0.0-www-classic-e1378902-20241106" + isomorphicReactPackageVersion$jscomp$inline_1827, + "19.0.0-www-classic-682a103c-20241107" ) ); -function flushSyncFromReconciler(fn) { - a: { - null === rootWithPendingPassiveEffects || - disableLegacyMode || - 0 !== rootWithPendingPassiveEffects.tag || - 0 !== (executionContext & 6) || - flushPassiveEffects(); - var prevExecutionContext = executionContext; - executionContext |= 1; - var prevTransition = ReactSharedInternals.T, - previousPriority = Internals.p; - try { - Internals.p = 2; - ReactSharedInternals.T = null; - var JSCompiler_inline_result = fn ? fn() : void 0; - break a; - } finally { - (Internals.p = previousPriority), - (ReactSharedInternals.T = prevTransition), - (executionContext = prevExecutionContext), - 0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(0, !1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; -} -var flushSync = disableLegacyMode ? flushSync$1 : flushSyncFromReconciler; Internals.findDOMNode = function (componentOrElement) { return findHostInstance(componentOrElement); }; @@ -18157,28 +17755,28 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1853 = { +var internals$jscomp$inline_1829 = { bundleType: 0, - version: "19.0.0-www-classic-e1378902-20241106", + version: "19.0.0-www-classic-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1853.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1853.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1829.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1829.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2322 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2330 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2322.isDisabled && - hook$jscomp$inline_2322.supportsFiber + !hook$jscomp$inline_2330.isDisabled && + hook$jscomp$inline_2330.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2322.inject( - internals$jscomp$inline_1853 + (rendererID = hook$jscomp$inline_2330.inject( + internals$jscomp$inline_1829 )), - (injectedHook = hook$jscomp$inline_2322); + (injectedHook = hook$jscomp$inline_2330); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18188,7 +17786,9 @@ ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) { var root = this._internalRoot; if (null === root) throw Error(formatProdErrorMessage(409)); - updateContainer(children, root, null, null); + var current = root.current, + lane = requestUpdateLane(); + updateContainerImpl(current, lane, children, root, null, null); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function () { @@ -18196,7 +17796,8 @@ ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = if (null !== root) { this._internalRoot = null; var container = root.containerInfo; - updateContainerSync(null, root, null, null); + 0 === root.tag && flushPassiveEffects(); + updateContainerImpl(root.current, 2, null, root, null, null); flushSyncWork$1(); container[internalContainerInstanceKey] = null; } @@ -18240,104 +17841,6 @@ function wwwOnCaughtError(error, errorInfo) { null != errorInfo.componentStack ? errorInfo.componentStack : "" }) && defaultOnCaughtError(error); } -function noopOnRecoverableError() {} -function legacyCreateRootFromDOMContainer( - container, - initialChildren, - parentComponent, - callback, - isHydrationContainer -) { - if (isHydrationContainer) { - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root$318); - originalCallback.call(instance); - }; - } - var root$318 = createHydrationContainer( - initialChildren, - callback, - container, - 0, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$318; - container[internalContainerInstanceKey] = root$318.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - flushSyncWork$1(); - return root$318; - } - clearContainer(container); - if ("function" === typeof callback) { - var originalCallback$319 = callback; - callback = function () { - var instance = getPublicRootInstance(root$320); - originalCallback$319.call(instance); - }; - } - var root$320 = createFiberRoot( - container, - 0, - !1, - null, - null, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$320; - container[internalContainerInstanceKey] = root$320.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - updateContainerSync(initialChildren, root$320, parentComponent, callback); - flushSyncWork$1(); - return root$320; -} -function legacyRenderSubtreeIntoContainer( - parentComponent, - children, - container, - forceHydrate, - callback -) { - var maybeRoot = container._reactRootContainer; - if (maybeRoot) { - var root = maybeRoot; - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root); - originalCallback.call(instance); - }; - } - updateContainer(children, root, parentComponent, callback); - } else - root = legacyCreateRootFromDOMContainer( - container, - children, - parentComponent, - callback, - forceHydrate - ); - return getPublicRootInstance(root); -} assign(Internals, { ReactBrowserEventEmitter: { isEnabled: function () { @@ -18404,7 +17907,17 @@ exports.findDOMNode = function (componentOrElement) { ? componentOrElement : findHostInstance(componentOrElement); }; -exports.flushSync = flushSync; +exports.flushSync = function (fn) { + var previousTransition = ReactSharedInternals.T, + previousUpdatePriority = Internals.p; + try { + if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn(); + } finally { + (ReactSharedInternals.T = previousTransition), + (Internals.p = previousUpdatePriority), + Internals.d.f(); + } +}; exports.hydrateRoot = function (container, initialChildren, options) { options = assign( { onUncaughtError: wwwOnUncaughtError, onCaughtError: wwwOnCaughtError }, @@ -18431,14 +17944,13 @@ exports.hydrateRoot = function (container, initialChildren, options) { void 0 !== options.unstable_transitionCallbacks && (transitionCallbacks = options.unstable_transitionCallbacks), void 0 !== options.formState && (formState = options.formState)); - initialChildren = createHydrationContainer( - initialChildren, - null, + initialChildren = createFiberRoot( container, 1, + !0, + initialChildren, null != options ? options : null, isStrictMode, - !1, identifierPrefix, onUncaughtError, onCaughtError, @@ -18446,6 +17958,15 @@ exports.hydrateRoot = function (container, initialChildren, options) { transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(); + identifierPrefix = createUpdate(isStrictMode); + identifierPrefix.callback = null; + enqueueUpdate(options, identifierPrefix, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -18558,34 +18079,18 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.render = function (element, container, callback) { - if (disableLegacyMode) throw Error(formatProdErrorMessage(509)); - if (!isValidContainerLegacy(container)) - throw Error(formatProdErrorMessage(299)); - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - !1, - callback - ); +exports.render = function () { + throw Error(formatProdErrorMessage(509)); }; exports.requestFormReset = function (form) { Internals.d.r(form); }; -exports.unmountComponentAtNode = function (container) { - if (disableLegacyMode) throw Error(formatProdErrorMessage(509)); - if (!isValidContainerLegacy(container)) - throw Error(formatProdErrorMessage(299)); - return container._reactRootContainer - ? (updateContainerSync(null, container._reactRootContainer, null, null), - flushSyncWork$1(), - (container._reactRootContainer = null), - (container[internalContainerInstanceKey] = null), - !0) - : !1; +exports.unmountComponentAtNode = function () { + throw Error(formatProdErrorMessage(509)); +}; +exports.unstable_batchedUpdates = function (fn, a) { + return fn(a); }; -exports.unstable_batchedUpdates = batchedUpdates$1; exports.unstable_createEventHandle = function (type, options) { function eventHandle(target, callback) { if ("function" !== typeof callback) @@ -18622,7 +18127,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-e1378902-20241106"; +exports.version = "19.0.0-www-classic-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 1638a2f84f889..ba8d754d9267a 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -17462,14 +17462,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1817 = React.version; if ( - "19.0.0-www-modern-e1378902-20241106" !== + "19.0.0-www-modern-682a103c-20241107" !== isomorphicReactPackageVersion$jscomp$inline_1817 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1817, - "19.0.0-www-modern-e1378902-20241106" + "19.0.0-www-modern-682a103c-20241107" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17487,11 +17487,11 @@ Internals.Events = [ ]; var internals$jscomp$inline_1819 = { bundleType: 0, - version: "19.0.0-www-modern-e1378902-20241106", + version: "19.0.0-www-modern-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; enableSchedulingProfiler && ((internals$jscomp$inline_1819.getLaneLabelMap = getLaneLabelMap), @@ -17857,7 +17857,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-e1378902-20241106"; +exports.version = "19.0.0-www-modern-682a103c-20241107"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 1e452a7d5c1ab..56286680e83bb 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -8991,5 +8991,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-www-classic-e1378902-20241106"; + exports.version = "19.0.0-www-classic-682a103c-20241107"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 3a29ab0a48459..8e92935410b2b 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8809,5 +8809,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-www-modern-e1378902-20241106"; + exports.version = "19.0.0-www-modern-682a103c-20241107"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 8aa39f143f5a9..348b58cfaedb5 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5910,4 +5910,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-classic-e1378902-20241106"; +exports.version = "19.0.0-www-classic-682a103c-20241107"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 8a179fc417aee..4f2124ff04413 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5822,4 +5822,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-modern-e1378902-20241106"; +exports.version = "19.0.0-www-modern-682a103c-20241107"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index a9b45a45d26f3..240a689e474dd 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -281,9 +281,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -714,19 +711,6 @@ __DEV__ && } return null; } - function findCurrentHostFiberWithNoPortalsImpl(node) { - var tag = node.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node; - for (node = node.child; null !== node; ) { - if ( - 4 !== node.tag && - ((tag = findCurrentHostFiberWithNoPortalsImpl(node)), null !== tag) - ) - return tag; - node = node.sibling; - } - return null; - } function isFiberSuspenseAndTimedOut(fiber) { var memoizedState = fiber.memoizedState; return ( @@ -1086,10 +1070,10 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - !enableSiblingPrerendering || - 0 === suspendedRetryLanes || - 0 !== updatedLanes || - (disableLegacyMode && 0 === root.tag) || + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } @@ -3921,10 +3905,6 @@ __DEV__ && scheduleImmediateTask(processRootScheduleInMicrotask)); enableDeferRootSchedulingToMicrotask || scheduleTaskForRootDuringMicrotask(root, now$1()); - !disableLegacyMode && - ReactSharedInternals.isBatchingLegacy && - 0 === root.tag && - (ReactSharedInternals.didScheduleLegacyUpdate = !0); } function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { if (!isFlushingWork && mightHavePendingSyncWork) { @@ -3932,7 +3912,7 @@ __DEV__ && do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) + if (!onlyLegacy) if (0 !== syncTransitionLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) var nextLanes = 0; @@ -5626,15 +5606,7 @@ __DEV__ && thenableState$1 = null; return firstChildFiber; } catch (x) { - if ( - x === SuspenseException || - (!disableLegacyMode && - (returnFiber.mode & ConcurrentMode) === NoMode && - "object" === typeof x && - null !== x && - "function" === typeof x.then) - ) - throw x; + if (x === SuspenseException) throw x; var fiber = createFiber(29, x, null, returnFiber.mode); fiber.lanes = lanes; fiber.return = returnFiber; @@ -5925,9 +5897,8 @@ __DEV__ && currentlyRenderingFiber$1 = null; hookTypesUpdateIndexDev = -1; - null === current || - (current.flags & 31457280) === (workInProgress.flags & 31457280) || - (!disableLegacyMode && (current.mode & ConcurrentMode) === NoMode) || + null !== current && + (current.flags & 31457280) !== (workInProgress.flags & 31457280) && error$jscomp$0( "Internal React error: Expected static flag was missing. Please notify the React team." ); @@ -7476,7 +7447,7 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } - function warnOnInvalidCallback$1(callback) { + function warnOnInvalidCallback(callback) { if (null !== callback && "function" !== typeof callback) { var key = String(callback); didWarnOnInvalidCallback.has(key) || @@ -7558,124 +7529,6 @@ __DEV__ && ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0; } - function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = !1, - unmaskedContext = emptyContextObject; - var context = ctor.contextType; - if ( - "contextType" in ctor && - null !== context && - (void 0 === context || context.$$typeof !== REACT_CONTEXT_TYPE) && - !didWarnAboutInvalidateContextType.has(ctor) - ) { - didWarnAboutInvalidateContextType.add(ctor); - var addendum = - void 0 === context - ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." - : "object" !== typeof context - ? " However, it is set to a " + typeof context + "." - : context.$$typeof === REACT_CONSUMER_TYPE - ? " Did you accidentally pass the Context.Consumer instead?" - : " However, it is set to an object with keys {" + - Object.keys(context).join(", ") + - "}."; - error$jscomp$0( - "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", - getComponentNameFromType(ctor) || "Component", - addendum - ); - } - "object" === typeof context && null !== context - ? (context = readContext(context)) - : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (isLegacyContextConsumer = ctor.contextTypes), - (context = (isLegacyContextConsumer = - null !== isLegacyContextConsumer && - void 0 !== isLegacyContextConsumer) - ? getMaskedContext(workInProgress, unmaskedContext) - : emptyContextObject)); - addendum = new ctor(props, context); - if (workInProgress.mode & StrictLegacyMode) { - setIsStrictModeForDevtools(!0); - try { - addendum = new ctor(props, context); - } finally { - setIsStrictModeForDevtools(!1); - } - } - props = workInProgress.memoizedState = - null !== addendum.state && void 0 !== addendum.state - ? addendum.state - : null; - addendum.updater = classComponentUpdater; - workInProgress.stateNode = addendum; - addendum._reactInternals = workInProgress; - addendum._reactInternalInstance = fakeInternalInstance; - "function" === typeof ctor.getDerivedStateFromProps && - null === props && - ((props = getComponentNameFromType(ctor) || "Component"), - didWarnAboutUninitializedState.has(props) || - (didWarnAboutUninitializedState.add(props), - error$jscomp$0( - "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", - props, - null === addendum.state ? "null" : "undefined", - props - ))); - if ( - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof addendum.getSnapshotBeforeUpdate - ) { - var foundWillReceivePropsName = (props = null), - foundWillUpdateName = null; - "function" === typeof addendum.componentWillMount && - !0 !== addendum.componentWillMount.__suppressDeprecationWarning - ? (props = "componentWillMount") - : "function" === typeof addendum.UNSAFE_componentWillMount && - (props = "UNSAFE_componentWillMount"); - "function" === typeof addendum.componentWillReceiveProps && - !0 !== addendum.componentWillReceiveProps.__suppressDeprecationWarning - ? (foundWillReceivePropsName = "componentWillReceiveProps") - : "function" === typeof addendum.UNSAFE_componentWillReceiveProps && - (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps"); - "function" === typeof addendum.componentWillUpdate && - !0 !== addendum.componentWillUpdate.__suppressDeprecationWarning - ? (foundWillUpdateName = "componentWillUpdate") - : "function" === typeof addendum.UNSAFE_componentWillUpdate && - (foundWillUpdateName = "UNSAFE_componentWillUpdate"); - if ( - null !== props || - null !== foundWillReceivePropsName || - null !== foundWillUpdateName - ) { - var _componentName = getComponentNameFromType(ctor) || "Component"; - ctor = - "function" === typeof ctor.getDerivedStateFromProps - ? "getDerivedStateFromProps()" - : "getSnapshotBeforeUpdate()"; - didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) || - (didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName), - error$jscomp$0( - "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", - _componentName, - ctor, - null !== props ? "\n " + props : "", - null !== foundWillReceivePropsName - ? "\n " + foundWillReceivePropsName - : "", - null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" - )); - } - } - isLegacyContextConsumer && - ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); - return addendum; - } function callComponentWillReceiveProps( workInProgress, instance, @@ -7702,202 +7555,6 @@ __DEV__ && null )); } - function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode, - name = getComponentNameFromType(ctor) || "Component"; - instance.render || - (ctor.prototype && "function" === typeof ctor.prototype.render - ? error$jscomp$0( - "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", - name - ) - : error$jscomp$0( - "No `render` method found on the %s instance: you may have forgotten to define `render`.", - name - )); - !instance.getInitialState || - instance.getInitialState.isReactClassApproved || - instance.state || - error$jscomp$0( - "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", - name - ); - instance.getDefaultProps && - !instance.getDefaultProps.isReactClassApproved && - error$jscomp$0( - "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", - name - ); - instance.contextType && - error$jscomp$0( - "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", - name - ); - instance.contextTypes && - error$jscomp$0( - "contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", - name - ); - ctor.contextType && - ctor.contextTypes && - !didWarnAboutContextTypeAndContextTypes.has(ctor) && - (didWarnAboutContextTypeAndContextTypes.add(ctor), - error$jscomp$0( - "%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", - name - )); - ctor.childContextTypes && - !didWarnAboutChildContextTypes.has(ctor) && - (didWarnAboutChildContextTypes.add(ctor), - error$jscomp$0( - "%s uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead. (https://react.dev/link/legacy-context)", - name - )); - ctor.contextTypes && - !didWarnAboutContextTypes$1.has(ctor) && - (didWarnAboutContextTypes$1.add(ctor), - error$jscomp$0( - "%s uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", - name - )); - "function" === typeof instance.componentShouldUpdate && - error$jscomp$0( - "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", - name - ); - ctor.prototype && - ctor.prototype.isPureReactComponent && - "undefined" !== typeof instance.shouldComponentUpdate && - error$jscomp$0( - "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", - getComponentNameFromType(ctor) || "A pure component" - ); - "function" === typeof instance.componentDidUnmount && - error$jscomp$0( - "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", - name - ); - "function" === typeof instance.componentDidReceiveProps && - error$jscomp$0( - "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", - name - ); - "function" === typeof instance.componentWillRecieveProps && - error$jscomp$0( - "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", - name - ); - "function" === typeof instance.UNSAFE_componentWillRecieveProps && - error$jscomp$0( - "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", - name - ); - var hasMutatedProps = instance.props !== newProps; - void 0 !== instance.props && - hasMutatedProps && - error$jscomp$0( - "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", - name - ); - instance.defaultProps && - error$jscomp$0( - "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", - name, - name - ); - "function" !== typeof instance.getSnapshotBeforeUpdate || - "function" === typeof instance.componentDidUpdate || - didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor) || - (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor), - error$jscomp$0( - "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", - getComponentNameFromType(ctor) - )); - "function" === typeof instance.getDerivedStateFromProps && - error$jscomp$0( - "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - name - ); - "function" === typeof instance.getDerivedStateFromError && - error$jscomp$0( - "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - name - ); - "function" === typeof ctor.getSnapshotBeforeUpdate && - error$jscomp$0( - "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", - name - ); - (hasMutatedProps = instance.state) && - ("object" !== typeof hasMutatedProps || isArrayImpl(hasMutatedProps)) && - error$jscomp$0("%s.state: must be set to an object or null", name); - "function" === typeof instance.getChildContext && - "object" !== typeof ctor.childContextTypes && - error$jscomp$0( - "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", - name - ); - instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = {}; - initializeUpdateQueue(workInProgress); - name = ctor.contextType; - "object" === typeof name && null !== name - ? (instance.context = readContext(name)) - : ((name = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (instance.context = getMaskedContext(workInProgress, name))); - instance.state === newProps && - ((name = getComponentNameFromType(ctor) || "Component"), - didWarnAboutDirectlyAssigningPropsToState.has(name) || - (didWarnAboutDirectlyAssigningPropsToState.add(name), - error$jscomp$0( - "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", - name - ))); - workInProgress.mode & StrictLegacyMode && - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - instance - ); - ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( - workInProgress, - instance - ); - instance.state = workInProgress.memoizedState; - name = ctor.getDerivedStateFromProps; - "function" === typeof name && - (applyDerivedStateFromProps(workInProgress, ctor, name, newProps), - (instance.state = workInProgress.memoizedState)); - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ((ctor = instance.state), - "function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount(), - ctor !== instance.state && - (error$jscomp$0( - "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", - getComponentNameFromFiber(workInProgress) || "Component" - ), - classComponentUpdater.enqueueReplaceState( - instance, - instance.state, - null - )), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (instance.state = workInProgress.memoizedState)); - "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308); - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 67108864); - } function resolveClassComponentProps( Component, baseProps, @@ -8086,39 +7743,6 @@ __DEV__ && )); }); } - function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ) { - if ( - !disableLegacyMode && - (suspenseBoundary.mode & ConcurrentMode) === NoMode - ) - return ( - suspenseBoundary === returnFiber - ? (suspenseBoundary.flags |= 65536) - : ((suspenseBoundary.flags |= 128), - (sourceFiber.flags |= 131072), - (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag - ? null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = ForceUpdate), - enqueueUpdate(sourceFiber, returnFiber, 2)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= 2)), - suspenseBoundary - ); - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; - } function throwException( root, returnFiber, @@ -8133,117 +7757,80 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + returnFiber = sourceFiber.alternate; + null !== returnFiber && propagateParentContextChanges( - currentSourceFiber, + returnFiber, sourceFiber, rootRenderLanes, !0 ); - currentSourceFiber = sourceFiber.tag; - disableLegacyMode || - (sourceFiber.mode & ConcurrentMode) !== NoMode || - (0 !== currentSourceFiber && - 11 !== currentSourceFiber && - 15 !== currentSourceFiber) || - ((currentSourceFiber = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), - (sourceFiber.memoizedState = currentSourceFiber.memoizedState), - (sourceFiber.lanes = currentSourceFiber.lanes)) - : ((sourceFiber.updateQueue = null), - (sourceFiber.memoizedState = null))); - isHydrating && - (disableLegacyMode || sourceFiber.mode & ConcurrentMode) && - (didSuspendOrErrorDEV = !0); + isHydrating && (didSuspendOrErrorDEV = !0); enableDebugTracing && sourceFiber.mode & DebugTracingMode && - ((currentSourceFiber = - getComponentNameFromFiber(sourceFiber) || "Unknown"), - logComponentSuspended(currentSourceFiber, value)); - currentSourceFiber = suspenseHandlerStackCursor.current; - if (null !== currentSourceFiber) { - switch (currentSourceFiber.tag) { + ((sourceFiber = getComponentNameFromFiber(sourceFiber) || "Unknown"), + logComponentSuspended(sourceFiber, value)); + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 13: - if (disableLegacyMode || sourceFiber.mode & ConcurrentMode) + return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === currentSourceFiber.alternate && + : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && - (workInProgressRootExitStatus = RootSuspended); - currentSourceFiber.flags &= -257; - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes + (workInProgressRootExitStatus = RootSuspended), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 ); - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? (currentSourceFiber.updateQueue = new Set([value])) - : sourceFiber.add(value), - (disableLegacyMode || - currentSourceFiber.mode & ConcurrentMode) && - attachPingListener(root, value, rootRenderLanes)); - return !1; case 22: - if (disableLegacyMode || currentSourceFiber.mode & ConcurrentMode) - return ( - (currentSourceFiber.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? ((sourceFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (currentSourceFiber.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); + return ( + (sourceFiber.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); } throw Error( "Unexpected Suspense handler tag (" + - currentSourceFiber.tag + + sourceFiber.tag + "). This is a bug in React." ); } - if (disableLegacyMode || 1 === root.tag) - return ( - attachPingListener(root, value, rootRenderLanes), - renderDidSuspendDelayIfPossible(), - !1 - ); - value = Error( - "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition." - ); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - if ( - isHydrating && - (disableLegacyMode || sourceFiber.mode & ConcurrentMode) - ) + if (isHydrating) return ( (didSuspendOrErrorDEV = !0), - (currentSourceFiber = suspenseHandlerStackCursor.current), - null !== currentSourceFiber - ? (0 === (currentSourceFiber.flags & 65536) && - (currentSourceFiber.flags |= 256), - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && queueHydrationError( createCapturedValueAtFiber( @@ -8268,10 +7855,10 @@ __DEV__ && (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -8279,7 +7866,7 @@ __DEV__ && (workInProgressRootExitStatus = RootErrored)), !1 ); - currentSourceFiber = createCapturedValueAtFiber( + var error = createCapturedValueAtFiber( Error( "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", { cause: value } @@ -8287,58 +7874,56 @@ __DEV__ && sourceFiber ); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [error]) + : workInProgressRootConcurrentErrors.push(error); workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (returnFiber.tag) { + switch (sourceFiber.tag) { case 3: return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (returnFiber.lanes |= root), + (sourceFiber.lanes |= root), (root = createRootErrorUpdate( - returnFiber.stateNode, - sourceFiber, + sourceFiber.stateNode, + value, root )), - enqueueCapturedUpdate(returnFiber, root), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((value = returnFiber.type), - (currentSourceFiber = returnFiber.stateNode), - 0 === (returnFiber.flags & 128) && - ("function" === typeof value.getDerivedStateFromError || - (null !== currentSourceFiber && - "function" === - typeof currentSourceFiber.componentDidCatch && + ((returnFiber = sourceFiber.type), + (error = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== error && + "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - currentSourceFiber - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(error))))) ) return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (returnFiber.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - returnFiber, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(returnFiber, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - returnFiber = returnFiber.return; - } while (null !== returnFiber); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } function processTransitionCallbacks( @@ -8671,39 +8256,30 @@ __DEV__ && renderLanes ); } - if ( - disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode - ) - if (0 !== (renderLanes & 536870912)) - (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ), - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress), - pushOffscreenSuspenseHandler(workInProgress); - else - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & 536870912)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && pushTransition(workInProgress, null, null), - reuseHiddenContextOnStack(workInProgress), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -8861,7 +8437,7 @@ __DEV__ && return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -8900,212 +8476,578 @@ __DEV__ && ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - constructClassInstance(workInProgress, Component, nextProps), - mountClassInstance(workInProgress, Component, nextProps, renderLanes), - (state = !0); - else if (null === current) { - state = workInProgress.stateNode; - var unresolvedOldProps = workInProgress.memoizedProps; - lane = resolveClassComponentProps( - Component, - unresolvedOldProps, - workInProgress.type === workInProgress.elementType - ); - state.props = lane; - var oldContext = state.context, - contextType = Component.contextType; - "object" === typeof contextType && null !== contextType - ? (contextType = readContext(contextType)) - : ((contextType = isContextProvider(Component) + if (null === workInProgress.stateNode) { + lane = !1; + state = emptyContextObject; + var context = Component.contextType; + if ( + "contextType" in Component && + null !== context && + (void 0 === context || context.$$typeof !== REACT_CONTEXT_TYPE) && + !didWarnAboutInvalidateContextType.has(Component) + ) { + didWarnAboutInvalidateContextType.add(Component); + var addendum = + void 0 === context + ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." + : "object" !== typeof context + ? " However, it is set to a " + typeof context + "." + : context.$$typeof === REACT_CONSUMER_TYPE + ? " Did you accidentally pass the Context.Consumer instead?" + : " However, it is set to an object with keys {" + + Object.keys(context).join(", ") + + "}."; + error$jscomp$0( + "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", + getComponentNameFromType(Component) || "Component", + addendum + ); + } + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((state = isContextProvider(Component) ? previousContext : contextStackCursor.current), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof state.getSnapshotBeforeUpdate; - unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - hasNewLifecycles || - ("function" !== typeof state.UNSAFE_componentWillReceiveProps && - "function" !== typeof state.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== contextType) && - callComponentWillReceiveProps( - workInProgress, - state, - nextProps, - contextType - )); - hasForceUpdate = !1; - var oldState = workInProgress.memoizedState; - state.state = oldState; - processUpdateQueue(workInProgress, nextProps, state, renderLanes); - suspendIfUpdateReadFromEntangledAsyncAction(); - oldContext = workInProgress.memoizedState; - unresolvedOldProps || - oldState !== oldContext || - didPerformWorkStackCursor.current || - hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps && - (applyDerivedStateFromProps( - workInProgress, - Component, - getDerivedStateFromProps, - nextProps - ), - (oldContext = workInProgress.memoizedState)), - (lane = - hasForceUpdate || - checkShouldComponentUpdate( - workInProgress, - Component, - lane, - nextProps, - oldState, - oldContext, - contextType - )) - ? (hasNewLifecycles || - ("function" !== typeof state.UNSAFE_componentWillMount && - "function" !== typeof state.componentWillMount) || - ("function" === typeof state.componentWillMount && - state.componentWillMount(), - "function" === typeof state.UNSAFE_componentWillMount && - state.UNSAFE_componentWillMount()), - "function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 67108864)) - : ("function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 67108864), - (workInProgress.memoizedProps = nextProps), - (workInProgress.memoizedState = oldContext)), - (state.props = nextProps), - (state.state = oldContext), - (state.context = contextType), - (state = lane)) - : ("function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 67108864), - (state = !1)); - } else { + (lane = Component.contextTypes), + (context = (lane = null !== lane && void 0 !== lane) + ? getMaskedContext(workInProgress, state) + : emptyContextObject)); + addendum = new Component(nextProps, context); + if (workInProgress.mode & StrictLegacyMode) { + setIsStrictModeForDevtools(!0); + try { + addendum = new Component(nextProps, context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + var state$jscomp$0 = (workInProgress.memoizedState = + null !== addendum.state && void 0 !== addendum.state + ? addendum.state + : null); + addendum.updater = classComponentUpdater; + workInProgress.stateNode = addendum; + addendum._reactInternals = workInProgress; + addendum._reactInternalInstance = fakeInternalInstance; + "function" === typeof Component.getDerivedStateFromProps && + null === state$jscomp$0 && + ((state$jscomp$0 = + getComponentNameFromType(Component) || "Component"), + didWarnAboutUninitializedState.has(state$jscomp$0) || + (didWarnAboutUninitializedState.add(state$jscomp$0), + error$jscomp$0( + "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", + state$jscomp$0, + null === addendum.state ? "null" : "undefined", + state$jscomp$0 + ))); + if ( + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof addendum.getSnapshotBeforeUpdate + ) { + var foundWillReceivePropsName = (state$jscomp$0 = null), + foundWillUpdateName = null; + "function" === typeof addendum.componentWillMount && + !0 !== addendum.componentWillMount.__suppressDeprecationWarning + ? (state$jscomp$0 = "componentWillMount") + : "function" === typeof addendum.UNSAFE_componentWillMount && + (state$jscomp$0 = "UNSAFE_componentWillMount"); + "function" === typeof addendum.componentWillReceiveProps && + !0 !== addendum.componentWillReceiveProps.__suppressDeprecationWarning + ? (foundWillReceivePropsName = "componentWillReceiveProps") + : "function" === typeof addendum.UNSAFE_componentWillReceiveProps && + (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps"); + "function" === typeof addendum.componentWillUpdate && + !0 !== addendum.componentWillUpdate.__suppressDeprecationWarning + ? (foundWillUpdateName = "componentWillUpdate") + : "function" === typeof addendum.UNSAFE_componentWillUpdate && + (foundWillUpdateName = "UNSAFE_componentWillUpdate"); + if ( + null !== state$jscomp$0 || + null !== foundWillReceivePropsName || + null !== foundWillUpdateName + ) { + addendum = getComponentNameFromType(Component) || "Component"; + var newApiName = + "function" === typeof Component.getDerivedStateFromProps + ? "getDerivedStateFromProps()" + : "getSnapshotBeforeUpdate()"; + didWarnAboutLegacyLifecyclesAndDerivedState.has(addendum) || + (didWarnAboutLegacyLifecyclesAndDerivedState.add(addendum), + error$jscomp$0( + "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", + addendum, + newApiName, + null !== state$jscomp$0 ? "\n " + state$jscomp$0 : "", + null !== foundWillReceivePropsName + ? "\n " + foundWillReceivePropsName + : "", + null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" + )); + } + } + lane && + ((lane = workInProgress.stateNode), + (lane.__reactInternalMemoizedUnmaskedChildContext = state), + (lane.__reactInternalMemoizedMaskedChildContext = context)); state = workInProgress.stateNode; - cloneUpdateQueue(current, workInProgress); - lane = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( - Component, - lane, - workInProgress.type === workInProgress.elementType - ); - state.props = contextType; - hasNewLifecycles = workInProgress.pendingProps; - unresolvedOldProps = state.context; - oldContext = Component.contextType; - "object" === typeof oldContext && null !== oldContext - ? (oldContext = readContext(oldContext)) - : ((oldContext = isContextProvider(Component) - ? previousContext - : contextStackCursor.current), - (oldContext = getMaskedContext(workInProgress, oldContext))); - oldState = Component.getDerivedStateFromProps; - (getDerivedStateFromProps = - "function" === typeof oldState || - "function" === typeof state.getSnapshotBeforeUpdate) || - ("function" !== typeof state.UNSAFE_componentWillReceiveProps && - "function" !== typeof state.componentWillReceiveProps) || - ((lane !== hasNewLifecycles || unresolvedOldProps !== oldContext) && - callComponentWillReceiveProps( - workInProgress, - state, - nextProps, - oldContext - )); - hasForceUpdate = !1; - unresolvedOldProps = workInProgress.memoizedState; - state.state = unresolvedOldProps; - processUpdateQueue(workInProgress, nextProps, state, renderLanes); - suspendIfUpdateReadFromEntangledAsyncAction(); - var newState = workInProgress.memoizedState; - lane !== hasNewLifecycles || - unresolvedOldProps !== newState || - didPerformWorkStackCursor.current || - hasForceUpdate || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) - ? ("function" === typeof oldState && - (applyDerivedStateFromProps( - workInProgress, - Component, - oldState, - nextProps - ), - (newState = workInProgress.memoizedState)), - (contextType = + lane = getComponentNameFromType(Component) || "Component"; + state.render || + (Component.prototype && + "function" === typeof Component.prototype.render + ? error$jscomp$0( + "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", + lane + ) + : error$jscomp$0( + "No `render` method found on the %s instance: you may have forgotten to define `render`.", + lane + )); + !state.getInitialState || + state.getInitialState.isReactClassApproved || + state.state || + error$jscomp$0( + "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", + lane + ); + state.getDefaultProps && + !state.getDefaultProps.isReactClassApproved && + error$jscomp$0( + "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", + lane + ); + state.contextType && + error$jscomp$0( + "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", + lane + ); + state.contextTypes && + error$jscomp$0( + "contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", + lane + ); + Component.contextType && + Component.contextTypes && + !didWarnAboutContextTypeAndContextTypes.has(Component) && + (didWarnAboutContextTypeAndContextTypes.add(Component), + error$jscomp$0( + "%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", + lane + )); + Component.childContextTypes && + !didWarnAboutChildContextTypes.has(Component) && + (didWarnAboutChildContextTypes.add(Component), + error$jscomp$0( + "%s uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead. (https://react.dev/link/legacy-context)", + lane + )); + Component.contextTypes && + !didWarnAboutContextTypes$1.has(Component) && + (didWarnAboutContextTypes$1.add(Component), + error$jscomp$0( + "%s uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", + lane + )); + "function" === typeof state.componentShouldUpdate && + error$jscomp$0( + "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", + lane + ); + Component.prototype && + Component.prototype.isPureReactComponent && + "undefined" !== typeof state.shouldComponentUpdate && + error$jscomp$0( + "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", + getComponentNameFromType(Component) || "A pure component" + ); + "function" === typeof state.componentDidUnmount && + error$jscomp$0( + "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", + lane + ); + "function" === typeof state.componentDidReceiveProps && + error$jscomp$0( + "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", + lane + ); + "function" === typeof state.componentWillRecieveProps && + error$jscomp$0( + "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", + lane + ); + "function" === typeof state.UNSAFE_componentWillRecieveProps && + error$jscomp$0( + "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", + lane + ); + context = state.props !== nextProps; + void 0 !== state.props && + context && + error$jscomp$0( + "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", + lane + ); + state.defaultProps && + error$jscomp$0( + "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", + lane, + lane + ); + "function" !== typeof state.getSnapshotBeforeUpdate || + "function" === typeof state.componentDidUpdate || + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || + (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), + error$jscomp$0( + "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", + getComponentNameFromType(Component) + )); + "function" === typeof state.getDerivedStateFromProps && + error$jscomp$0( + "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + lane + ); + "function" === typeof state.getDerivedStateFromError && + error$jscomp$0( + "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + lane + ); + "function" === typeof Component.getSnapshotBeforeUpdate && + error$jscomp$0( + "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", + lane + ); + (context = state.state) && + ("object" !== typeof context || isArrayImpl(context)) && + error$jscomp$0("%s.state: must be set to an object or null", lane); + "function" === typeof state.getChildContext && + "object" !== typeof Component.childContextTypes && + error$jscomp$0( + "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", + lane + ); + state = workInProgress.stateNode; + state.props = nextProps; + state.state = workInProgress.memoizedState; + state.refs = {}; + initializeUpdateQueue(workInProgress); + lane = Component.contextType; + "object" === typeof lane && null !== lane + ? (state.context = readContext(lane)) + : ((lane = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (state.context = getMaskedContext(workInProgress, lane))); + state.state === nextProps && + ((lane = getComponentNameFromType(Component) || "Component"), + didWarnAboutDirectlyAssigningPropsToState.has(lane) || + (didWarnAboutDirectlyAssigningPropsToState.add(lane), + error$jscomp$0( + "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", + lane + ))); + workInProgress.mode & StrictLegacyMode && + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + state + ); + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( + workInProgress, + state + ); + state.state = workInProgress.memoizedState; + lane = Component.getDerivedStateFromProps; + "function" === typeof lane && + (applyDerivedStateFromProps( + workInProgress, + Component, + lane, + nextProps + ), + (state.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof state.getSnapshotBeforeUpdate || + ("function" !== typeof state.UNSAFE_componentWillMount && + "function" !== typeof state.componentWillMount) || + ((lane = state.state), + "function" === typeof state.componentWillMount && + state.componentWillMount(), + "function" === typeof state.UNSAFE_componentWillMount && + state.UNSAFE_componentWillMount(), + lane !== state.state && + (error$jscomp$0( + "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", + getComponentNameFromFiber(workInProgress) || "Component" + ), + classComponentUpdater.enqueueReplaceState( + state, + state.state, + null + )), + processUpdateQueue(workInProgress, nextProps, state, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction(), + (state.state = workInProgress.memoizedState)); + "function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308); + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 67108864); + state = !0; + } else if (null === current$jscomp$0) + (state = workInProgress.stateNode), + (foundWillUpdateName = workInProgress.memoizedProps), + (lane = resolveClassComponentProps( + Component, + foundWillUpdateName, + workInProgress.type === workInProgress.elementType + )), + (state.props = lane), + (state$jscomp$0 = state.context), + (context = Component.contextType), + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((context = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (context = getMaskedContext(workInProgress, context))), + (foundWillReceivePropsName = Component.getDerivedStateFromProps), + (addendum = + "function" === typeof foundWillReceivePropsName || + "function" === typeof state.getSnapshotBeforeUpdate), + (foundWillUpdateName = + workInProgress.pendingProps !== foundWillUpdateName), + addendum || + ("function" !== typeof state.UNSAFE_componentWillReceiveProps && + "function" !== typeof state.componentWillReceiveProps) || + ((foundWillUpdateName || state$jscomp$0 !== context) && + callComponentWillReceiveProps( + workInProgress, + state, + nextProps, + context + )), + (hasForceUpdate = !1), + (newApiName = workInProgress.memoizedState), + (state.state = newApiName), + processUpdateQueue(workInProgress, nextProps, state, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction(), + (state$jscomp$0 = workInProgress.memoizedState), + foundWillUpdateName || + newApiName !== state$jscomp$0 || + didPerformWorkStackCursor.current || + hasForceUpdate + ? ("function" === typeof foundWillReceivePropsName && + (applyDerivedStateFromProps( + workInProgress, + Component, + foundWillReceivePropsName, + nextProps + ), + (state$jscomp$0 = workInProgress.memoizedState)), + (lane = + hasForceUpdate || + checkShouldComponentUpdate( + workInProgress, + Component, + lane, + nextProps, + newApiName, + state$jscomp$0, + context + )) + ? (addendum || + ("function" !== typeof state.UNSAFE_componentWillMount && + "function" !== typeof state.componentWillMount) || + ("function" === typeof state.componentWillMount && + state.componentWillMount(), + "function" === typeof state.UNSAFE_componentWillMount && + state.UNSAFE_componentWillMount()), + "function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 67108864)) + : ("function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 67108864), + (workInProgress.memoizedProps = nextProps), + (workInProgress.memoizedState = state$jscomp$0)), + (state.props = nextProps), + (state.state = state$jscomp$0), + (state.context = context), + (state = lane)) + : ("function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 67108864), + (state = !1)); + else { + state = workInProgress.stateNode; + cloneUpdateQueue(current$jscomp$0, workInProgress); + lane = workInProgress.memoizedProps; + context = resolveClassComponentProps( + Component, + lane, + workInProgress.type === workInProgress.elementType + ); + state.props = context; + addendum = workInProgress.pendingProps; + foundWillUpdateName = state.context; + state$jscomp$0 = Component.contextType; + "object" === typeof state$jscomp$0 && null !== state$jscomp$0 + ? (state$jscomp$0 = readContext(state$jscomp$0)) + : ((state$jscomp$0 = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (state$jscomp$0 = getMaskedContext( + workInProgress, + state$jscomp$0 + ))); + newApiName = Component.getDerivedStateFromProps; + (foundWillReceivePropsName = + "function" === typeof newApiName || + "function" === typeof state.getSnapshotBeforeUpdate) || + ("function" !== typeof state.UNSAFE_componentWillReceiveProps && + "function" !== typeof state.componentWillReceiveProps) || + ((lane !== addendum || foundWillUpdateName !== state$jscomp$0) && + callComponentWillReceiveProps( + workInProgress, + state, + nextProps, + state$jscomp$0 + )); + hasForceUpdate = !1; + foundWillUpdateName = workInProgress.memoizedState; + state.state = foundWillUpdateName; + processUpdateQueue(workInProgress, nextProps, state, renderLanes); + suspendIfUpdateReadFromEntangledAsyncAction(); + var newState = workInProgress.memoizedState; + lane !== addendum || + foundWillUpdateName !== newState || + didPerformWorkStackCursor.current || + hasForceUpdate || + (null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies)) + ? ("function" === typeof newApiName && + (applyDerivedStateFromProps( + workInProgress, + Component, + newApiName, + nextProps + ), + (newState = workInProgress.memoizedState)), + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, - unresolvedOldProps, + foundWillUpdateName, newState, - oldContext + state$jscomp$0 ) || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) - ? (getDerivedStateFromProps || + (null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies))) + ? (foundWillReceivePropsName || ("function" !== typeof state.UNSAFE_componentWillUpdate && "function" !== typeof state.componentWillUpdate) || ("function" === typeof state.componentWillUpdate && - state.componentWillUpdate(nextProps, newState, oldContext), + state.componentWillUpdate( + nextProps, + newState, + state$jscomp$0 + ), "function" === typeof state.UNSAFE_componentWillUpdate && state.UNSAFE_componentWillUpdate( nextProps, newState, - oldContext + state$jscomp$0 )), "function" === typeof state.componentDidUpdate && (workInProgress.flags |= 4), "function" === typeof state.getSnapshotBeforeUpdate && (workInProgress.flags |= 1024)) : ("function" !== typeof state.componentDidUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof state.getSnapshotBeforeUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), (state.props = nextProps), (state.state = newState), - (state.context = oldContext), - (state = contextType)) + (state.context = state$jscomp$0), + (state = context)) : ("function" !== typeof state.componentDidUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof state.getSnapshotBeforeUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (state = !1)); } - current = finishClassComponent( - current, - workInProgress, - Component, - state, - _instance, - renderLanes - ); + context = state; + markRef(current$jscomp$0, workInProgress); + lane = 0 !== (workInProgress.flags & 128); + if (context || lane) { + context = workInProgress.stateNode; + ReactSharedInternals.getCurrentStack = + null === workInProgress ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = workInProgress; + if (lane && "function" !== typeof Component.getDerivedStateFromError) + (addendum = null), (profilerStartTime = -1); + else { + enableSchedulingProfiler && + markComponentRenderStarted(workInProgress); + addendum = callRenderInDEV(context); + if (workInProgress.mode & StrictLegacyMode) { + setIsStrictModeForDevtools(!0); + try { + callRenderInDEV(context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + enableSchedulingProfiler && markComponentRenderStopped(); + } + workInProgress.flags |= 1; + null !== current$jscomp$0 && lane + ? ((lane = addendum), + (workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + lane, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + addendum, + renderLanes + ); + workInProgress.memoizedState = context.state; + _instance && invalidateContextProvider(workInProgress, Component, !0); + current$jscomp$0 = workInProgress.child; + } else + _instance && invalidateContextProvider(workInProgress, Component, !1), + (current$jscomp$0 = bailoutOnAlreadyFinishedWork( + current$jscomp$0, + workInProgress, + renderLanes + )); Component = workInProgress.stateNode; state && Component.props !== nextProps && @@ -9115,76 +9057,7 @@ __DEV__ && getComponentNameFromFiber(workInProgress) || "a component" ), (didWarnAboutReassigningProps = !0)); - return current; - } - function finishClassComponent( - current$jscomp$0, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes - ) { - markRef(current$jscomp$0, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && - invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork( - current$jscomp$0, - workInProgress, - renderLanes - ) - ); - shouldUpdate = workInProgress.stateNode; - ReactSharedInternals.getCurrentStack = - null === workInProgress ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = workInProgress; - if ( - didCaptureError && - "function" !== typeof Component.getDerivedStateFromError - ) { - var nextChildren = null; - profilerStartTime = -1; - } else { - enableSchedulingProfiler && markComponentRenderStarted(workInProgress); - nextChildren = callRenderInDEV(shouldUpdate); - if (workInProgress.mode & StrictLegacyMode) { - setIsStrictModeForDevtools(!0); - try { - callRenderInDEV(shouldUpdate); - } finally { - setIsStrictModeForDevtools(!1); - } - } - enableSchedulingProfiler && markComponentRenderStopped(); - } - workInProgress.flags |= 1; - null !== current$jscomp$0 && didCaptureError - ? ((didCaptureError = nextChildren), - (workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - didCaptureError, - renderLanes - ))) - : reconcileChildren( - current$jscomp$0, - workInProgress, - nextChildren, - renderLanes - ); - workInProgress.memoizedState = shouldUpdate.state; - hasContext && invalidateContextProvider(workInProgress, Component, !0); - return workInProgress.child; + return current$jscomp$0; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; @@ -9257,32 +9130,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2463; - var JSCompiler_object_inline_stack_2464 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2492; + var JSCompiler_object_inline_stack_2493 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2465 = !1; + var JSCompiler_object_inline_componentStack_2494 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2463 = didSuspend) || - (JSCompiler_object_inline_digest_2463 = + (JSCompiler_object_inline_digest_2492 = didSuspend) || + (JSCompiler_object_inline_digest_2492 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2463 && - ((JSCompiler_object_inline_componentStack_2465 = !0), + JSCompiler_object_inline_digest_2492 && + ((JSCompiler_object_inline_componentStack_2494 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2463 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2492 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2465 + JSCompiler_object_inline_componentStack_2494 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2462 = nextHydratableInstance; + var JSCompiler_object_inline_message_2491 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2462)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2491)) { c: { - var instance = JSCompiler_object_inline_message_2462; + var instance = JSCompiler_object_inline_message_2491; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9323,19 +9196,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2462 + JSCompiler_object_inline_message_2491 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2462 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2491 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2462 && - ((JSCompiler_object_inline_message_2462 = - JSCompiler_object_inline_message_2462.dehydrated), - null !== JSCompiler_object_inline_message_2462) + null !== JSCompiler_object_inline_message_2491 && + ((JSCompiler_object_inline_message_2491 = + JSCompiler_object_inline_message_2491.dehydrated), + null !== JSCompiler_object_inline_message_2491) ) return ( - JSCompiler_object_inline_message_2462.data === + JSCompiler_object_inline_message_2491.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9343,27 +9216,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2462 = - JSCompiler_object_inline_stack_2464.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2464.fallback; - if (JSCompiler_object_inline_componentStack_2465) + JSCompiler_object_inline_message_2491 = + JSCompiler_object_inline_stack_2493.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2493.fallback; + if (JSCompiler_object_inline_componentStack_2494) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2464 = + (JSCompiler_object_inline_stack_2493 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2462, + JSCompiler_object_inline_message_2491, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2465 = + (JSCompiler_object_inline_componentStack_2494 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2465.memoizedState = + (JSCompiler_object_inline_componentStack_2494.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2465.childLanes = + (JSCompiler_object_inline_componentStack_2494.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2463, + JSCompiler_object_inline_digest_2492, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9372,60 +9245,60 @@ __DEV__ && ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = - JSCompiler_object_inline_componentStack_2465.updateQueue), - null === current - ? (JSCompiler_object_inline_componentStack_2465.updateQueue = + (renderLanes = + JSCompiler_object_inline_componentStack_2494.updateQueue), + null === renderLanes + ? (JSCompiler_object_inline_componentStack_2494.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2464 + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), + JSCompiler_object_inline_stack_2493 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2464.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2493.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2464 = + (JSCompiler_object_inline_stack_2493 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2462, + JSCompiler_object_inline_message_2491, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2465 = + (JSCompiler_object_inline_componentStack_2494 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2465.memoizedState = + (JSCompiler_object_inline_componentStack_2494.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2465.childLanes = + (JSCompiler_object_inline_componentStack_2494.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2463, + JSCompiler_object_inline_digest_2492, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2464 + JSCompiler_object_inline_stack_2493 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2462 + JSCompiler_object_inline_message_2491 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2462 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2462) + ((JSCompiler_object_inline_message_2491 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2491) ) { if (didSuspend) workInProgress.flags & 256 @@ -9442,98 +9315,95 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2465 = - JSCompiler_object_inline_stack_2464.fallback), - (JSCompiler_object_inline_message_2462 = workInProgress.mode), - (JSCompiler_object_inline_stack_2464 = createFiberFromOffscreen( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2464.children - }, - JSCompiler_object_inline_message_2462, - 0, - null - )), - (JSCompiler_object_inline_componentStack_2465 = + (JSCompiler_object_inline_componentStack_2494 = + JSCompiler_object_inline_stack_2493.fallback), + (JSCompiler_object_inline_message_2491 = workInProgress.mode), + (JSCompiler_object_inline_stack_2493 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2493.children + }, + JSCompiler_object_inline_message_2491 + )), + (JSCompiler_object_inline_componentStack_2494 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2465, - JSCompiler_object_inline_message_2462, + JSCompiler_object_inline_componentStack_2494, + JSCompiler_object_inline_message_2491, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2465.flags |= 2), - (JSCompiler_object_inline_stack_2464.return = workInProgress), - (JSCompiler_object_inline_componentStack_2465.return = + (JSCompiler_object_inline_componentStack_2494.flags |= 2), + (JSCompiler_object_inline_stack_2493.return = workInProgress), + (JSCompiler_object_inline_componentStack_2494.return = workInProgress), - (JSCompiler_object_inline_stack_2464.sibling = - JSCompiler_object_inline_componentStack_2465), - (workInProgress.child = JSCompiler_object_inline_stack_2464), - (disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2464 = workInProgress.child), - (JSCompiler_object_inline_stack_2464.memoizedState = + (JSCompiler_object_inline_stack_2493.sibling = + JSCompiler_object_inline_componentStack_2494), + (workInProgress.child = JSCompiler_object_inline_stack_2493), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (JSCompiler_object_inline_stack_2493 = workInProgress.child), + (JSCompiler_object_inline_stack_2493.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2464.childLanes = + (JSCompiler_object_inline_stack_2493.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2463, + JSCompiler_object_inline_digest_2492, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2465)); + JSCompiler_object_inline_componentStack_2494)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2462.data === + JSCompiler_object_inline_message_2491.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2463 = - JSCompiler_object_inline_message_2462.nextSibling && - JSCompiler_object_inline_message_2462.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2463) { - JSCompiler_temp = JSCompiler_object_inline_digest_2463.dgst; - var message = JSCompiler_object_inline_digest_2463.msg; - instance = JSCompiler_object_inline_digest_2463.stck; - var componentStack = JSCompiler_object_inline_digest_2463.cstck; + JSCompiler_object_inline_digest_2492 = + JSCompiler_object_inline_message_2491.nextSibling && + JSCompiler_object_inline_message_2491.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2492) { + JSCompiler_temp = JSCompiler_object_inline_digest_2492.dgst; + var message = JSCompiler_object_inline_digest_2492.msg; + instance = JSCompiler_object_inline_digest_2492.stck; + var componentStack = JSCompiler_object_inline_digest_2492.cstck; } - JSCompiler_object_inline_message_2462 = message; - JSCompiler_object_inline_digest_2463 = JSCompiler_temp; - JSCompiler_object_inline_stack_2464 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2465 = + JSCompiler_object_inline_message_2491 = message; + JSCompiler_object_inline_digest_2492 = JSCompiler_temp; + JSCompiler_object_inline_stack_2493 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2494 = componentStack; - JSCompiler_object_inline_componentStack_2465 = - JSCompiler_object_inline_message_2462 - ? Error(JSCompiler_object_inline_message_2462) + JSCompiler_object_inline_componentStack_2494 = + JSCompiler_object_inline_message_2491 + ? Error(JSCompiler_object_inline_message_2491) : 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_2465.stack = - JSCompiler_object_inline_stack_2464 || ""; - JSCompiler_object_inline_componentStack_2465.digest = - JSCompiler_object_inline_digest_2463; - JSCompiler_object_inline_digest_2463 = + JSCompiler_object_inline_componentStack_2494.stack = + JSCompiler_object_inline_stack_2493 || ""; + JSCompiler_object_inline_componentStack_2494.digest = + JSCompiler_object_inline_digest_2492; + JSCompiler_object_inline_digest_2492 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2464 = { - value: JSCompiler_object_inline_componentStack_2465, + JSCompiler_object_inline_stack_2493 = { + value: JSCompiler_object_inline_componentStack_2494, source: null, - stack: JSCompiler_object_inline_digest_2463 + stack: JSCompiler_object_inline_digest_2492 }; - "string" === typeof JSCompiler_object_inline_digest_2463 && + "string" === typeof JSCompiler_object_inline_digest_2492 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2465, - JSCompiler_object_inline_stack_2464 + JSCompiler_object_inline_componentStack_2494, + JSCompiler_object_inline_stack_2493 ); - queueHydrationError(JSCompiler_object_inline_stack_2464); + queueHydrationError(JSCompiler_object_inline_stack_2493); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9547,25 +9417,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2463 = + (JSCompiler_object_inline_digest_2492 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2463) + didReceiveUpdate || JSCompiler_object_inline_digest_2492) ) { - JSCompiler_object_inline_digest_2463 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2463) { - JSCompiler_object_inline_stack_2464 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2464 & 42)) - JSCompiler_object_inline_stack_2464 = 1; + JSCompiler_object_inline_digest_2492 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2492) { + JSCompiler_object_inline_stack_2493 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2493 & 42)) + JSCompiler_object_inline_stack_2493 = 1; else - switch (JSCompiler_object_inline_stack_2464) { + switch (JSCompiler_object_inline_stack_2493) { case 2: - JSCompiler_object_inline_stack_2464 = 1; + JSCompiler_object_inline_stack_2493 = 1; break; case 8: - JSCompiler_object_inline_stack_2464 = 4; + JSCompiler_object_inline_stack_2493 = 4; break; case 32: - JSCompiler_object_inline_stack_2464 = 16; + JSCompiler_object_inline_stack_2493 = 16; break; case 128: case 256: @@ -9586,40 +9456,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2464 = 64; + JSCompiler_object_inline_stack_2493 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2464 = 134217728; + JSCompiler_object_inline_stack_2493 = 134217728; break; default: - JSCompiler_object_inline_stack_2464 = 0; + JSCompiler_object_inline_stack_2493 = 0; } - JSCompiler_object_inline_stack_2464 = + JSCompiler_object_inline_stack_2493 = 0 !== - (JSCompiler_object_inline_stack_2464 & - (JSCompiler_object_inline_digest_2463.suspendedLanes | + (JSCompiler_object_inline_stack_2493 & + (JSCompiler_object_inline_digest_2492.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2464; + : JSCompiler_object_inline_stack_2493; if ( - 0 !== JSCompiler_object_inline_stack_2464 && - JSCompiler_object_inline_stack_2464 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2493 && + JSCompiler_object_inline_stack_2493 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2464), + ((prevState.retryLane = JSCompiler_object_inline_stack_2493), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2464 + JSCompiler_object_inline_stack_2493 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2463, + JSCompiler_object_inline_digest_2492, current, - JSCompiler_object_inline_stack_2464 + JSCompiler_object_inline_stack_2493 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2462.data === + JSCompiler_object_inline_message_2491.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9627,7 +9497,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2462.data === + JSCompiler_object_inline_message_2491.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9635,12 +9505,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2462._reactRetry = + (JSCompiler_object_inline_message_2491._reactRetry = workInProgress), (workInProgress = null)) - : ((renderLanes = prevState.treeContext), + : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2462.nextSibling + JSCompiler_object_inline_message_2491.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9648,83 +9518,67 @@ __DEV__ && (didSuspendOrErrorDEV = !1), (hydrationDiffRootDEV = null), (rootOrSingletonContext = !1), - null !== renderLanes && + null !== current && (warnIfNotHydrating(), (idStack[idStackIndex++] = treeContextId), (idStack[idStackIndex++] = treeContextOverflow), (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), + (treeContextId = current.id), + (treeContextOverflow = current.overflow), (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2464.children + JSCompiler_object_inline_stack_2493.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2465) + if (JSCompiler_object_inline_componentStack_2494) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2465 = - JSCompiler_object_inline_stack_2464.fallback), - (JSCompiler_object_inline_message_2462 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2494 = + JSCompiler_object_inline_stack_2493.fallback), + (JSCompiler_object_inline_message_2491 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (componentStack = { - mode: "hidden", - children: JSCompiler_object_inline_stack_2464.children - }), - disableLegacyMode || - (JSCompiler_object_inline_message_2462 & ConcurrentMode) !== NoMode || - workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2464 = createWorkInProgress( - JSCompiler_temp, - componentStack - )), - (JSCompiler_object_inline_stack_2464.subtreeFlags = - JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2464 = workInProgress.child), - (JSCompiler_object_inline_stack_2464.childLanes = 0), - (JSCompiler_object_inline_stack_2464.pendingProps = - componentStack), - workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2464.actualDuration = -0), - (JSCompiler_object_inline_stack_2464.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2464.selfBaseDuration = - JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2464.treeBaseDuration = - JSCompiler_temp.treeBaseDuration)), - (workInProgress.deletions = null)), + (JSCompiler_object_inline_stack_2493 = createWorkInProgress( + JSCompiler_temp, + { + mode: "hidden", + children: JSCompiler_object_inline_stack_2493.children + } + )), + (JSCompiler_object_inline_stack_2493.subtreeFlags = + JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2465 = + ? (JSCompiler_object_inline_componentStack_2494 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2465 + JSCompiler_object_inline_componentStack_2494 )) - : ((JSCompiler_object_inline_componentStack_2465 = + : ((JSCompiler_object_inline_componentStack_2494 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2465, - JSCompiler_object_inline_message_2462, + JSCompiler_object_inline_componentStack_2494, + JSCompiler_object_inline_message_2491, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2465.flags |= 2)), - (JSCompiler_object_inline_componentStack_2465.return = + (JSCompiler_object_inline_componentStack_2494.flags |= 2)), + (JSCompiler_object_inline_componentStack_2494.return = workInProgress), - (JSCompiler_object_inline_stack_2464.return = workInProgress), - (JSCompiler_object_inline_stack_2464.sibling = - JSCompiler_object_inline_componentStack_2465), - (workInProgress.child = JSCompiler_object_inline_stack_2464), - (JSCompiler_object_inline_stack_2464 = - JSCompiler_object_inline_componentStack_2465), - (JSCompiler_object_inline_componentStack_2465 = workInProgress.child), - (JSCompiler_object_inline_message_2462 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2462 - ? (JSCompiler_object_inline_message_2462 = + (JSCompiler_object_inline_stack_2493.return = workInProgress), + (JSCompiler_object_inline_stack_2493.sibling = + JSCompiler_object_inline_componentStack_2494), + (workInProgress.child = JSCompiler_object_inline_stack_2493), + (JSCompiler_object_inline_stack_2493 = + JSCompiler_object_inline_componentStack_2494), + (JSCompiler_object_inline_componentStack_2494 = workInProgress.child), + (JSCompiler_object_inline_message_2491 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2491 + ? (JSCompiler_object_inline_message_2491 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2462.cachePool), + JSCompiler_object_inline_message_2491.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9732,34 +9586,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2462 = { + (JSCompiler_object_inline_message_2491 = { baseLanes: - JSCompiler_object_inline_message_2462.baseLanes | renderLanes, + JSCompiler_object_inline_message_2491.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2465.memoizedState = - JSCompiler_object_inline_message_2462), + (JSCompiler_object_inline_componentStack_2494.memoizedState = + JSCompiler_object_inline_message_2491), enableTransitionTracing && - ((JSCompiler_object_inline_message_2462 = enableTransitionTracing + ((JSCompiler_object_inline_message_2491 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2462 && + null !== JSCompiler_object_inline_message_2491 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2465.updateQueue), + JSCompiler_object_inline_componentStack_2494.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2465.updateQueue = { - transitions: JSCompiler_object_inline_message_2462, + ? (JSCompiler_object_inline_componentStack_2494.updateQueue = { + transitions: JSCompiler_object_inline_message_2491, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2465.updateQueue = + ? (JSCompiler_object_inline_componentStack_2494.updateQueue = { - transitions: JSCompiler_object_inline_message_2462, + transitions: JSCompiler_object_inline_message_2491, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9767,48 +9621,40 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2462), + JSCompiler_object_inline_message_2491), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2465.childLanes = + (JSCompiler_object_inline_componentStack_2494.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2463, + JSCompiler_object_inline_digest_2492, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2464 + JSCompiler_object_inline_stack_2493 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2463 = current.child; - current = JSCompiler_object_inline_digest_2463.sibling; - JSCompiler_object_inline_digest_2463 = createWorkInProgress( - JSCompiler_object_inline_digest_2463, - { - mode: "visible", - children: JSCompiler_object_inline_stack_2464.children - } - ); - disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode || - (JSCompiler_object_inline_digest_2463.lanes = renderLanes); - JSCompiler_object_inline_digest_2463.return = workInProgress; - JSCompiler_object_inline_digest_2463.sibling = null; + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { + mode: "visible", + children: JSCompiler_object_inline_stack_2493.children + }); + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_object_inline_digest_2492 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2492 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2463; + : JSCompiler_object_inline_digest_2492.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2463; + return renderLanes; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = createFiberFromOffscreen( + primaryChildren = mountWorkInProgressOffscreenFiber( { mode: "visible", children: primaryChildren }, - workInProgress.mode, - 0, - null + workInProgress.mode ); primaryChildren.return = workInProgress; return (workInProgress.child = primaryChildren); @@ -9819,37 +9665,26 @@ __DEV__ && fallbackChildren, renderLanes ) { - var mode = workInProgress.mode, - progressedPrimaryFragment = workInProgress.child; - primaryChildren = { mode: "hidden", children: primaryChildren }; - disableLegacyMode || - (mode & ConcurrentMode) !== NoMode || - null === progressedPrimaryFragment - ? (progressedPrimaryFragment = createFiberFromOffscreen( - primaryChildren, - mode, - 0, - null - )) - : ((progressedPrimaryFragment.childLanes = 0), - (progressedPrimaryFragment.pendingProps = primaryChildren), - workInProgress.mode & ProfileMode && - ((progressedPrimaryFragment.actualDuration = -0), - (progressedPrimaryFragment.actualStartTime = -1.1), - (progressedPrimaryFragment.selfBaseDuration = -0), - (progressedPrimaryFragment.treeBaseDuration = -0))); + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); fallbackChildren = createFiberFromFragment( fallbackChildren, mode, renderLanes, null ); - progressedPrimaryFragment.return = workInProgress; + primaryChildren.return = workInProgress; fallbackChildren.return = workInProgress; - progressedPrimaryFragment.sibling = fallbackChildren; - workInProgress.child = progressedPrimaryFragment; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; return fallbackChildren; } + function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + return createFiberFromOffscreen(offscreenProps, mode, 0, null); + } function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -10028,72 +9863,59 @@ __DEV__ && nextProps &= SubtreeSuspenseContextMask; } push(suspenseStackCursor, nextProps, workInProgress); - if ( - disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode - ) - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), - (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), + (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), + (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); + break; + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - else workInProgress.memoizedState = null; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; + } + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); + break; + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); + break; + default: + workInProgress.memoizedState = null; + } return workInProgress.child; } - function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { - disableLegacyMode || - (workInProgress.mode & ConcurrentMode) !== NoMode || - null === current || - ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); - } function bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -10335,10 +10157,8 @@ __DEV__ && switch (workInProgress.tag) { case 16: a: if ( - ((prevSibling = workInProgress.elementType), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (returnFiber = workInProgress.pendingProps), - (current = callLazyInitInDEV(prevSibling)), + ((returnFiber = workInProgress.pendingProps), + (current = callLazyInitInDEV(workInProgress.elementType)), (workInProgress.type = current), "function" === typeof current) ) @@ -10919,52 +10739,6 @@ __DEV__ && workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - returnFiber = workInProgress.type; - prevSibling = resolveClassComponentProps( - returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - isContextProvider(returnFiber) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1); - prepareToReadContext(workInProgress); - constructClassInstance(workInProgress, returnFiber, prevSibling); - mountClassInstance( - workInProgress, - returnFiber, - prevSibling, - renderLanes - ); - return finishClassComponent( - null, - workInProgress, - returnFiber, - !0, - current, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - returnFiber = workInProgress.type; - prevSibling = resolveClassComponentProps( - returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ); case 19: return updateSuspenseListComponent( current, @@ -11624,8 +11398,6 @@ __DEV__ && var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -12056,11 +11828,6 @@ __DEV__ && bubbleProperties(workInProgress), null ); - case 17: - if (disableLegacyMode) break; - isContextProvider(workInProgress.type) && popContext(workInProgress); - bubbleProperties(workInProgress); - return null; case 19: pop(suspenseStackCursor, workInProgress); _type = workInProgress.memoizedState; @@ -12183,16 +11950,14 @@ __DEV__ && ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || - (!disableLegacyMode && - (workInProgress.mode & ConcurrentMode) === NoMode) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & 536870912) && + newProps + ? 0 !== (renderLanes & 536870912) && 0 === (workInProgress.flags & 128) && (bubbleProperties(workInProgress), 23 !== workInProgress.tag && workInProgress.subtreeFlags & 6 && - (workInProgress.flags |= 8192)), + (workInProgress.flags |= 8192)) + : bubbleProperties(workInProgress), (newProps = workInProgress.updateQueue), null !== newProps && scheduleRetryEffect(workInProgress, newProps.retryQueue), @@ -12228,8 +11993,6 @@ __DEV__ && bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error( "Unknown unit of work tag (" + @@ -12595,16 +12358,6 @@ __DEV__ && nearestMountedAncestor ); } - function commitClassDidMount(finishedWork) { - var instance = finishedWork.stateNode; - "function" === typeof instance.componentDidMount && - runWithFiberInDEV( - finishedWork, - callComponentDidMountInDEV, - finishedWork, - instance - ); - } function commitClassCallbacks(finishedWork) { var updateQueue = finishedWork.updateQueue; if (null !== updateQueue) { @@ -13151,8 +12904,23 @@ __DEV__ && commitClassSnapshot(root, JSCompiler_temp); break; case 3: - 0 !== (anchorOffset & 1024) && - clearContainer(root.stateNode.containerInfo); + if (0 !== (anchorOffset & 1024)) + if ( + ((root = root.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + JSCompiler_temp === DOCUMENT_NODE) + ) + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { + case "HEAD": + case "HTML": + case "BODY": + clearContainerSparingly(root); + break; + default: + root.textContent = ""; + } break; case 5: case 26: @@ -13342,34 +13110,26 @@ __DEV__ && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if ( - disableLegacyMode || - (finishedWork.mode & ConcurrentMode) !== NoMode - ) { - if ( - ((prevProps = - null !== finishedWork.memoizedState || - offscreenSubtreeIsHidden), - !prevProps) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + prevProps = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevProps) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevProps; + (offscreenSubtreeWasHidden = current) && + !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -13791,21 +13551,15 @@ __DEV__ && case 22: offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor); - disableLegacyMode || deletedFiber.mode & ConcurrentMode - ? ((offscreenSubtreeWasHidden = - (prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ), - (offscreenSubtreeWasHidden = prevHostParent)) - : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + offscreenSubtreeWasHidden = + (prevHostParent = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState; + recursivelyTraverseDeletionEffects( + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); + offscreenSubtreeWasHidden = prevHostParent; break; default: recursivelyTraverseDeletionEffects( @@ -14355,15 +14109,13 @@ __DEV__ && safelyDetachRef(current, current.return)); i = null !== finishedWork.memoizedState; nextNode = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & ConcurrentMode - ? ((nodeName = offscreenSubtreeIsHidden), - (suspenseCallback = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = nodeName || i), - (offscreenSubtreeWasHidden = suspenseCallback || nextNode), - recursivelyTraverseMutationEffects(root, finishedWork), - (offscreenSubtreeWasHidden = suspenseCallback), - (offscreenSubtreeIsHidden = nodeName)) - : recursivelyTraverseMutationEffects(root, finishedWork); + nodeName = offscreenSubtreeIsHidden; + suspenseCallback = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = nodeName || i; + offscreenSubtreeWasHidden = suspenseCallback || nextNode; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = suspenseCallback; + offscreenSubtreeIsHidden = nodeName; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -14379,9 +14131,7 @@ __DEV__ && null === current || nextNode || root || - ((disableLegacyMode || - (finishedWork.mode & ConcurrentMode) !== NoMode) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -14592,7 +14342,14 @@ __DEV__ && finishedWork, includeWorkInProgressEffects ); - commitClassDidMount(finishedWork); + current = finishedWork.stateNode; + "function" === typeof current.componentDidMount && + runWithFiberInDEV( + finishedWork, + callComponentDidMountInDEV, + finishedWork, + current + ); current = finishedWork.updateQueue; if (null !== current) { finishedRoot = finishedWork.stateNode; @@ -14938,18 +14695,10 @@ __DEV__ && committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & ConcurrentMode - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((prevEffectDuration._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -15070,19 +14819,10 @@ __DEV__ && committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & ConcurrentMode - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((_instance2._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) : ((_instance2._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, @@ -15438,46 +15178,6 @@ __DEV__ && } } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Layout | HasEffect, fiber); - break; - case 1: - commitClassDidMount(fiber); - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Passive | HasEffect, fiber); - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return); - break; - case 1: - var instance = fiber.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount(fiber, fiber.return, instance); - } - } - function invokePassiveEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Passive | HasEffect, fiber, fiber.return); - } - } function findFiberRootForHostRoot(hostRoot) { var maybeFiber = getClosestInstanceFromNode(hostRoot); if (null != maybeFiber) { @@ -15665,13 +15365,6 @@ __DEV__ && return commitHook(); }); } - function isLegacyActEnvironment() { - var isReactActEnvironmentGlobal = - "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT - ? IS_REACT_ACT_ENVIRONMENT - : void 0; - return "undefined" !== typeof jest && !1 !== isReactActEnvironmentGlobal; - } function isConcurrentActEnvironment() { var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT @@ -15759,17 +15452,15 @@ __DEV__ && )); } function requestUpdateLane(fiber) { - var mode = fiber.mode; - if (!disableLegacyMode && (mode & ConcurrentMode) === NoMode) return 2; if ( (executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes ) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; - mode = ReactSharedInternals.T; - return null !== mode - ? (mode._updatedFibers || (mode._updatedFibers = new Set()), - mode._updatedFibers.add(fiber), + var transition = ReactSharedInternals.T; + return null !== transition + ? (transition._updatedFibers || (transition._updatedFibers = new Set()), + transition._updatedFibers.add(fiber), (fiber = currentEntangledLane), 0 !== fiber ? fiber : requestTransitionLane()) : resolveUpdatePriority(); @@ -15815,10 +15506,10 @@ __DEV__ && "Unknown"; didWarnAboutUpdateInRenderForAnotherComponent.has(root) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root), - (fiber = getComponentNameFromFiber(fiber) || "Unknown"), + (lane = getComponentNameFromFiber(fiber) || "Unknown"), error$jscomp$0( "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render", - fiber, + lane, root, root )); @@ -15833,21 +15524,20 @@ __DEV__ && } else { isDevToolsPresent && addFiberToLanesMap(root, fiber, lane); warnIfUpdatesNotWrappedWithActDEV(fiber); - if (enableTransitionTracing) { - var transition = ReactSharedInternals.T; - if ( - null !== transition && - null != transition.name && - (-1 === transition.startTime && (transition.startTime = now$1()), - enableTransitionTracing) - ) { - var transitionLanesMap = root.transitionLanes, - index = 31 - clz32(lane), - transitions = transitionLanesMap[index]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now$1()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index = 31 - clz32(lane), + transitions = transitionLanesMap[index]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index] = transitions; } root === workInProgressRoot && ((executionContext & RenderContext) === NoContext && @@ -15860,13 +15550,6 @@ __DEV__ && workInProgressRootDidSkipSuspendedSiblings )); ensureRootIsScheduled(root); - 2 !== lane || - executionContext !== NoContext || - disableLegacyMode || - (fiber.mode & ConcurrentMode) !== NoMode || - ReactSharedInternals.isBatchingLegacy || - ((workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); } } function performWorkOnRoot(root, lanes, forceSync) { @@ -15896,10 +15579,7 @@ __DEV__ && renderWasConcurrent = !1; continue; } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { + if (exitStatus === RootErrored) { renderWasConcurrent = lanes; if (root.errorRecoveryDisabledLanes & renderWasConcurrent) var errorRetryLanes = 0; @@ -16194,20 +15874,6 @@ __DEV__ && 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } - function batchedUpdates$1(fn, a) { - if (disableLegacyMode) return fn(a); - var prevExecutionContext = executionContext; - executionContext |= BatchedContext; - try { - return fn(a); - } finally { - (executionContext = prevExecutionContext), - executionContext !== NoContext || - ReactSharedInternals.isBatchingLegacy || - ((workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); - } - } function flushSyncWork$1() { return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -17027,7 +16693,7 @@ __DEV__ && (rootWithPassiveNestedUpdates = null)); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root, !1); + transitions || commitDoubleInvokeEffectsInDEV(root); onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); @@ -17046,9 +16712,7 @@ __DEV__ && remainingLanes.value, transitions ); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -17161,7 +16825,7 @@ __DEV__ && "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped && injectedProfilingHooks.markPassiveEffectsStopped(); - commitDoubleInvokeEffectsInDEV(root, !0); + commitDoubleInvokeEffectsInDEV(root); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(0, !1); if (enableTransitionTracing) { @@ -17291,8 +16955,7 @@ __DEV__ && : executionContext & CommitContext && (didIncludeCommitPhaseUpdate = !0), throwIfInfiniteUpdateLoopDetected()); - (disableLegacyMode || 0 !== root.tag) && - isConcurrentActEnvironment() && + isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && error$jscomp$0( "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act" @@ -17312,12 +16975,7 @@ __DEV__ && ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || (retryLane & ConcurrentMode) !== NoMode - ? claimNextRetryLane() - : 2)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -17431,52 +17089,18 @@ __DEV__ && setIsStrictModeForDevtools(!1); } } - function commitDoubleInvokeEffectsInDEV(root, hasPassiveEffects) { - disableLegacyMode || 0 !== root.tag - ? ((hasPassiveEffects = !0), - (!disableLegacyMode && 1 !== root.tag) || - root.current.mode & (StrictLegacyMode | StrictEffectsMode) || - (hasPassiveEffects = !1), - recursivelyTraverseAndDoubleInvokeEffectsInDEV( - root, - root.current, - hasPassiveEffects - )) - : runWithFiberInDEV( - root.current, - legacyCommitDoubleInvokeEffectsInDEV, - root.current, - hasPassiveEffects - ); - } - function legacyCommitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) { - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectUnmountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectUnmountInDEV); - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectMountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectMountInDEV); - } - function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) { - for (var subtreeRoot = null; null != firstChild; ) { - var primarySubtreeFlag = firstChild.subtreeFlags & fiberFlags; - firstChild !== subtreeRoot && - null != firstChild.child && - 0 !== primarySubtreeFlag - ? (firstChild = firstChild.child) - : (0 !== (firstChild.flags & fiberFlags) && - invokeEffectFn(firstChild), - (firstChild = - null !== firstChild.sibling - ? firstChild.sibling - : (subtreeRoot = firstChild.return))); - } + function commitDoubleInvokeEffectsInDEV(root) { + var doubleInvokeEffects = !0; + root.current.mode & (StrictLegacyMode | StrictEffectsMode) || + (doubleInvokeEffects = !1); + recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root, + root.current, + doubleInvokeEffects + ); } function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) { - if ( - (executionContext & RenderContext) === NoContext && - (disableLegacyMode || fiber.mode & ConcurrentMode) - ) { + if ((executionContext & RenderContext) === NoContext) { var tag = fiber.tag; if ( 3 === tag || @@ -17512,15 +17136,8 @@ __DEV__ && : scheduleCallback$3(priorityLevel, callback); } function warnIfUpdatesNotWrappedWithActDEV(fiber) { - if (disableLegacyMode || fiber.mode & ConcurrentMode) { - if (!isConcurrentActEnvironment()) return; - } else if ( - !isLegacyActEnvironment() || - executionContext !== NoContext || - (0 !== fiber.tag && 11 !== fiber.tag && 15 !== fiber.tag) - ) - return; - null === ReactSharedInternals.actQueue && + isConcurrentActEnvironment() && + null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function () { error$jscomp$0( "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act", @@ -17857,11 +17474,10 @@ __DEV__ && case REACT_STRICT_MODE_TYPE: fiberTag = 8; mode |= StrictLegacyMode; - if (disableLegacyMode || (mode & ConcurrentMode) !== NoMode) - (mode |= StrictEffectsMode), - enableDO_NOT_USE_disableStrictPassiveEffect && - pendingProps.DO_NOT_USE_disableStrictPassiveEffect && - (mode |= NoStrictPassiveEffectsMode); + mode |= StrictEffectsMode; + enableDO_NOT_USE_disableStrictPassiveEffect && + pendingProps.DO_NOT_USE_disableStrictPassiveEffect && + (mode |= NoStrictPassiveEffectsMode); break; case REACT_PROFILER_TYPE: return ( @@ -18080,7 +17696,7 @@ __DEV__ && onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -18121,26 +17737,16 @@ __DEV__ && for ( this.transitionCallbacks = null, containerInfo = this.transitionLanes = [], - identifierPrefix = 0; - 31 > identifierPrefix; - identifierPrefix++ + tag = 0; + 31 > tag; + tag++ ) containerInfo.push(null); this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; - for (identifierPrefix = 0; 31 > identifierPrefix; identifierPrefix++) - containerInfo.push(new Set()); - if (disableLegacyMode) - this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; - else - switch (tag) { - case 1: - this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; - break; - case 0: - this._debugRootType = hydrate ? "hydrate()" : "render()"; - } + for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); + this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; } function createFiberRoot( containerInfo, @@ -18169,22 +17775,21 @@ __DEV__ && containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = ConcurrentMode), - !0 === isStrictMode && (tag |= StrictLegacyMode | StrictEffectsMode)) - : (tag = NoMode); - isDevToolsPresent && (tag |= ProfileMode); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = ConcurrentMode; + !0 === isStrictMode && + (hydrationCallbacks |= StrictLegacyMode | StrictEffectsMode); + isDevToolsPresent && (hydrationCallbacks |= ProfileMode); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; - tag = createCache(); - retainCache(tag); - containerInfo.pooledCache = tag; - retainCache(tag); + hydrationCallbacks = createCache(); + retainCache(hydrationCallbacks); + containerInfo.pooledCache = hydrationCallbacks; + retainCache(hydrationCallbacks); isStrictMode.memoizedState = { element: initialChildren, isDehydrated: hydrate, - cache: tag + cache: hydrationCallbacks }; initializeUpdateQueue(isStrictMode); return containerInfo; @@ -18278,60 +17883,6 @@ __DEV__ && } return component.stateNode; } - function createHydrationContainer( - initialChildren, - callback, - containerInfo, - tag, - hydrationCallbacks, - isStrictMode, - concurrentUpdatesByDefaultOverride, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState - ) { - initialChildren = createFiberRoot( - containerInfo, - tag, - !0, - initialChildren, - hydrationCallbacks, - isStrictMode, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState - ); - initialChildren.context = getContextForSubtree(null); - containerInfo = initialChildren.current; - tag = requestUpdateLane(containerInfo); - hydrationCallbacks = createUpdate(tag); - hydrationCallbacks.callback = - void 0 !== callback && null !== callback ? callback : null; - enqueueUpdate(containerInfo, hydrationCallbacks, tag); - initialChildren.current.lanes = tag; - markRootUpdated(initialChildren, tag); - ensureRootIsScheduled(initialChildren); - return initialChildren; - } - function updateContainer(element, container, parentComponent, callback) { - var current = container.current, - lane = requestUpdateLane(current); - updateContainerImpl( - current, - lane, - element, - container, - parentComponent, - callback - ); - return lane; - } function updateContainerSync( element, container, @@ -18403,17 +17954,6 @@ __DEV__ && (scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane)); } - function getPublicRootInstance(container) { - container = container.current; - if (!container.child) return null; - switch (container.child.tag) { - case 27: - case 5: - return container.child.stateNode; - default: - return container.child.stateNode; - } - } function markRetryLaneImpl(fiber, retryLane) { fiber = fiber.memoizedState; if (null !== fiber && null !== fiber.dehydrated) { @@ -18450,7 +17990,7 @@ __DEV__ && if (isInsideEventHandler) return fn(a, b); isInsideEventHandler = !0; try { - return batchedUpdates$1(fn, a, b); + return fn(a); } finally { if ( ((isInsideEventHandler = !1), @@ -22293,20 +21833,6 @@ __DEV__ && function unhideTextInstance(textInstance, text) { textInstance.nodeValue = text; } - function clearContainer(container) { - var nodeType = container.nodeType; - if (nodeType === DOCUMENT_NODE) clearContainerSparingly(container); - else if (1 === nodeType) - switch (container.nodeName) { - case "HEAD": - case "HTML": - case "BODY": - clearContainerSparingly(container); - break; - default: - container.textContent = ""; - } - } function clearContainerSparingly(container) { var nextNode = container.firstChild; nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling); @@ -22659,16 +22185,6 @@ __DEV__ && ? container.getRootNode() : container.ownerDocument; } - function flushSyncWork() { - if (disableLegacyMode) { - var previousWasRendering = previousDispatcher.f(), - wasRendering = flushSyncWork$1(); - return previousWasRendering || wasRendering; - } - throw Error( - "flushSyncWork should not be called from builds that support legacy mode. This is a bug in React." - ); - } function preconnectAs(rel, href, crossOrigin) { var ownerDocument = globalDocument; if (ownerDocument && "string" === typeof href && href) { @@ -24035,16 +23551,6 @@ __DEV__ && " react-mount-point-unstable " !== node.nodeValue)) ); } - function isValidContainerLegacy(node) { - return !( - !node || - (1 !== node.nodeType && - node.nodeType !== DOCUMENT_NODE && - node.nodeType !== DOCUMENT_FRAGMENT_NODE && - (node.nodeType !== COMMENT_NODE || - " react-mount-point-unstable " !== node.nodeValue)) - ); - } function registerReactDOMEvent( target, domEventName, @@ -24075,30 +23581,6 @@ __DEV__ && "ReactDOM.createEventHandle: setter called on an invalid target. Provide a valid EventTarget or an element managed by React." ); } - function flushSyncImpl(fn) { - var previousTransition = ReactSharedInternals.T, - previousUpdatePriority = Internals.p; - try { - if ( - ((ReactSharedInternals.T = null), - (Internals.p = DiscreteEventPriority), - fn) - ) - return fn(); - } finally { - (ReactSharedInternals.T = previousTransition), - (Internals.p = previousUpdatePriority), - Internals.d.f() && - error$jscomp$0( - "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task." - ); - } - } - function flushSyncErrorInBuildsThatSupportLegacyMode() { - throw Error( - "Expected this build of React to not support legacy mode but it does. This is a bug in React." - ); - } function getCrossOriginStringAs(as, input) { if ("font" === as) return ""; if ("string" === typeof input) @@ -24126,37 +23608,6 @@ __DEV__ && ? "`" + thing + "`" : 'something with type "' + typeof thing + '"'; } - function flushSyncFromReconciler(fn) { - (executionContext & (RenderContext | CommitContext)) !== NoContext && - error$jscomp$0( - "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task." - ); - a: { - null === rootWithPendingPassiveEffects || - disableLegacyMode || - 0 !== rootWithPendingPassiveEffects.tag || - (executionContext & (RenderContext | CommitContext)) !== NoContext || - flushPassiveEffects(); - var prevExecutionContext = executionContext; - executionContext |= BatchedContext; - var prevTransition = ReactSharedInternals.T, - previousPriority = Internals.p; - try { - Internals.p = DiscreteEventPriority; - ReactSharedInternals.T = null; - var JSCompiler_inline_result = fn ? fn() : void 0; - break a; - } finally { - (Internals.p = previousPriority), - (ReactSharedInternals.T = prevTransition), - (executionContext = prevExecutionContext), - (executionContext & (RenderContext | CommitContext)) === - NoContext && flushSyncWorkAcrossRoots_impl(0, !1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; - } function ReactDOMRoot(internalRoot) { this._internalRoot = internalRoot; } @@ -24191,121 +23642,6 @@ __DEV__ && null != errorInfo.componentStack ? errorInfo.componentStack : "" }) && defaultOnCaughtError(error, errorInfo); } - function getReactRootElementInContainer(container) { - return container - ? container.nodeType === DOCUMENT_NODE - ? container.documentElement - : container.firstChild - : null; - } - function noopOnRecoverableError() {} - function legacyCreateRootFromDOMContainer( - container, - initialChildren, - parentComponent, - callback, - isHydrationContainer - ) { - if (isHydrationContainer) { - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root); - originalCallback.call(instance); - }; - } - var root = createHydrationContainer( - initialChildren, - callback, - container, - 0, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root; - container[internalContainerInstanceKey] = root.current; - listenToAllSupportedEvents( - container.nodeType === COMMENT_NODE ? container.parentNode : container - ); - flushSyncWork$1(); - return root; - } - clearContainer(container); - if ("function" === typeof callback) { - var _originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(_root); - _originalCallback.call(instance); - }; - } - var _root = createFiberRoot( - container, - 0, - !1, - null, - null, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = _root; - container[internalContainerInstanceKey] = _root.current; - listenToAllSupportedEvents( - container.nodeType === COMMENT_NODE ? container.parentNode : container - ); - updateContainerSync(initialChildren, _root, parentComponent, callback); - flushSyncWork$1(); - return _root; - } - function warnOnInvalidCallback(callback) { - null !== callback && - "function" !== typeof callback && - error$jscomp$0( - "Expected the last optional `callback` argument to be a function. Instead received: %s.", - callback - ); - } - function legacyRenderSubtreeIntoContainer( - parentComponent, - children, - container, - forceHydrate, - callback - ) { - topLevelUpdateWarnings(container); - warnOnInvalidCallback(void 0 === callback ? null : callback); - var maybeRoot = container._reactRootContainer; - if (maybeRoot) { - var root = maybeRoot; - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root); - originalCallback.call(instance); - }; - } - updateContainer(children, root, parentComponent, callback); - } else - root = legacyCreateRootFromDOMContainer( - container, - children, - parentComponent, - callback, - forceHydrate - ); - return getPublicRootInstance(root); - } var Scheduler = require("scheduler"), React = require("react"), assign = Object.assign, @@ -24344,7 +23680,6 @@ __DEV__ && transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -27027,7 +26362,7 @@ __DEV__ && update.payload = payload; void 0 !== callback && null !== callback && - (warnOnInvalidCallback$1(callback), (update.callback = callback)); + (warnOnInvalidCallback(callback), (update.callback = callback)); callback = enqueueUpdate(inst, update, lane); null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), @@ -27046,7 +26381,7 @@ __DEV__ && update.payload = payload; void 0 !== callback && null !== callback && - (warnOnInvalidCallback$1(callback), (update.callback = callback)); + (warnOnInvalidCallback(callback), (update.callback = callback)); callback = enqueueUpdate(inst, update, lane); null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), @@ -27064,7 +26399,7 @@ __DEV__ && update.tag = ForceUpdate; void 0 !== callback && null !== callback && - (warnOnInvalidCallback$1(callback), (update.callback = callback)); + (warnOnInvalidCallback(callback), (update.callback = callback)); callback = enqueueUpdate(inst, update, lane); null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), @@ -27234,7 +26569,6 @@ __DEV__ && callbacks = [], PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, NoContext = 0, - BatchedContext = 1, RenderContext = 2, CommitContext = 4, RootInProgress = 0, @@ -27837,7 +27171,11 @@ __DEV__ && preconnectsSet = new Set(), previousDispatcher = Internals.d; Internals.d = { - f: disableLegacyMode ? flushSyncWork : previousDispatcher.f, + f: function () { + var previousWasRendering = previousDispatcher.f(), + wasRendering = flushSyncWork$1(); + return previousWasRendering || wasRendering; + }, r: function (form) { var formInst = getInstanceFromNode(form); null !== formInst && 5 === formInst.tag && "form" === formInst.type @@ -28108,17 +27446,14 @@ __DEV__ && ), lastScheduledReplayQueue = null, _enabled = !0, - return_targetInst = null, - flushSync$1 = disableLegacyMode - ? flushSyncImpl - : flushSyncErrorInBuildsThatSupportLegacyMode; + return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-e1378902-20241106" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-682a103c-20241107" !== 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-www-classic-e1378902-20241106\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-682a103c-20241107\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -28131,7 +27466,6 @@ __DEV__ && error$jscomp$0( "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills" ); - var flushSync = disableLegacyMode ? flushSync$1 : flushSyncFromReconciler; Internals.findDOMNode = function (componentOrElement) { var fiber = componentOrElement._reactInternals; if (void 0 === fiber) { @@ -28162,11 +27496,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-e1378902-20241106", + version: "19.0.0-www-classic-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28218,7 +27552,16 @@ __DEV__ && error$jscomp$0( "You passed a second argument to root.render(...) but it only accepts one argument." ); - updateContainer(children, root, null, null); + JSCompiler_OptimizeArgumentsArray_p2 = root.current; + var lane = requestUpdateLane(JSCompiler_OptimizeArgumentsArray_p2); + updateContainerImpl( + JSCompiler_OptimizeArgumentsArray_p2, + lane, + children, + root, + null, + null + ); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function (JSCompiler_OptimizeArgumentsArray_p3) { @@ -28266,33 +27609,6 @@ __DEV__ && throw Error( "Expected ReactFiberErrorDialog.showErrorDialog to be a function." ); - var topLevelUpdateWarnings = function (container) { - if ( - container._reactRootContainer && - container.nodeType !== COMMENT_NODE - ) { - var hostInstance = findCurrentFiberUsingSlowPath( - container._reactRootContainer.current - ); - hostInstance = - null !== hostInstance - ? findCurrentHostFiberWithNoPortalsImpl(hostInstance) - : null; - hostInstance = null === hostInstance ? null : hostInstance.stateNode; - hostInstance && - hostInstance.parentNode !== container && - error$jscomp$0( - "It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container." - ); - } - hostInstance = !!container._reactRootContainer; - (container = getReactRootElementInContainer(container)) && - getInstanceFromNode(container) && - !hostInstance && - error$jscomp$0( - "Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render." - ); - }; assign(Internals, { ReactBrowserEventEmitter: { isEnabled: function () { @@ -28467,7 +27783,25 @@ __DEV__ && ? componentOrElement : findHostInstanceWithWarning(componentOrElement, "findDOMNode"); }; - exports.flushSync = flushSync; + exports.flushSync = function (fn) { + var previousTransition = ReactSharedInternals.T, + previousUpdatePriority = Internals.p; + try { + if ( + ((ReactSharedInternals.T = null), + (Internals.p = DiscreteEventPriority), + fn) + ) + return fn(); + } finally { + (ReactSharedInternals.T = previousTransition), + (Internals.p = previousUpdatePriority), + Internals.d.f() && + error$jscomp$0( + "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task." + ); + } + }; exports.focusWithin = function (hostRoot, selectors) { hostRoot = findFiberRootForHostRoot(hostRoot); selectors = findPaths(hostRoot, selectors); @@ -28560,14 +27894,13 @@ __DEV__ && void 0 !== options.unstable_transitionCallbacks && (transitionCallbacks = options.unstable_transitionCallbacks), void 0 !== options.formState && (formState = options.formState)); - initialChildren = createHydrationContainer( - initialChildren, - null, + initialChildren = createFiberRoot( container, 1, + !0, + initialChildren, null != options ? options : null, isStrictMode, - !1, identifierPrefix, onUncaughtError, onCaughtError, @@ -28575,6 +27908,15 @@ __DEV__ && transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(options); + identifierPrefix = createUpdate(isStrictMode); + identifierPrefix.callback = null; + enqueueUpdate(options, identifierPrefix, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -28869,80 +28211,24 @@ __DEV__ && })) : Internals.d.m(href)); }; - exports.render = function (element, container, callback) { - if (disableLegacyMode) - throw ( - (error$jscomp$0( - "ReactDOM.render was removed in React 19. Use createRoot instead." - ), - Error("ReactDOM: Unsupported Legacy Mode API.")) - ); + exports.render = function () { error$jscomp$0( - "ReactDOM.render has not been supported since React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://react.dev/link/switch-to-createroot" - ); - if (!isValidContainerLegacy(container)) - throw Error("Target container is not a DOM element."); - container[internalContainerInstanceKey] && - void 0 === container._reactRootContainer && - error$jscomp$0( - "You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?" - ); - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - !1, - callback + "ReactDOM.render was removed in React 19. Use createRoot instead." ); + throw Error("ReactDOM: Unsupported Legacy Mode API."); }; exports.requestFormReset = function (form) { Internals.d.r(form); }; - exports.unmountComponentAtNode = function (container) { - if (disableLegacyMode) - throw ( - (error$jscomp$0( - "unmountComponentAtNode was removed in React 19. Use root.unmount() instead." - ), - Error("ReactDOM: Unsupported Legacy Mode API.")) - ); - if (!isValidContainerLegacy(container)) - throw Error("Target container is not a DOM element."); - container[internalContainerInstanceKey] && - void 0 === container._reactRootContainer && - error$jscomp$0( - "You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?" - ); - if (container._reactRootContainer) { - var root = container._reactRootContainer, - rootEl = getReactRootElementInContainer(container); - rootEl && - !getInstanceFromNode(rootEl) && - error$jscomp$0( - "unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React." - ); - updateContainerSync(null, root, null, null); - flushSyncWork$1(); - container._reactRootContainer = null; - container[internalContainerInstanceKey] = null; - return !0; - } - root = getReactRootElementInContainer(container); - root = !(!root || !getInstanceFromNode(root)); - container = - 1 === container.nodeType && - isValidContainerLegacy(container.parentNode) && - !!container.parentNode._reactRootContainer; - root && - error$jscomp$0( - "unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s", - container - ? "You may have accidentally passed in a React root node instead of its container." - : "Instead, have the parent component update its state and rerender in order to remove this component." - ); - return !1; + exports.unmountComponentAtNode = function () { + error$jscomp$0( + "unmountComponentAtNode was removed in React 19. Use root.unmount() instead." + ); + throw Error("ReactDOM: Unsupported Legacy Mode API."); + }; + exports.unstable_batchedUpdates = function (fn, a) { + return fn(a); }; - exports.unstable_batchedUpdates = batchedUpdates$1; exports.unstable_createEventHandle = function (type, options) { function eventHandle(target, callback) { if ("function" !== typeof callback) @@ -28985,5 +28271,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-e1378902-20241106"; + exports.version = "19.0.0-www-classic-682a103c-20241107"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 758eaa88c053a..1fa859119321f 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -27228,11 +27228,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-e1378902-20241106" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-682a103c-20241107" !== 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-www-modern-e1378902-20241106\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-682a103c-20241107\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27275,11 +27275,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-e1378902-20241106", + version: "19.0.0-www-modern-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28050,5 +28050,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-e1378902-20241106"; + exports.version = "19.0.0-www-modern-682a103c-20241107"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 8c38fdd09f7f3..a4e989e5e8486 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -63,7 +63,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"), retryLaneExpirationMs = dynamicFeatureFlags.retryLaneExpirationMs, syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs, transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -204,9 +203,6 @@ function getComponentNameFromFiber(fiber) { return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -777,10 +773,10 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - !enableSiblingPrerendering || - 0 === suspendedRetryLanes || - 0 !== updatedLanes || - (disableLegacyMode && 0 === root.tag) || + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } @@ -1658,10 +1654,6 @@ function isContextProvider(type) { type = type.childContextTypes; return null !== type && void 0 !== type; } -function popContext() { - pop(didPerformWorkStackCursor); - pop(contextStackCursor); -} function pushTopLevelContextObject(fiber, context, didChange) { if (contextStackCursor.current !== emptyContextObject) throw Error(formatProdErrorMessage(168)); @@ -2050,7 +2042,7 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { do { var didPerformSomeWork = !1; for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root$26.tag)) + if (!onlyLegacy) if (0 !== syncTransitionLanes) { var pendingLanes = root$26.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; @@ -3313,15 +3305,7 @@ function createChildReconciler(shouldTrackSideEffects) { thenableState$1 = null; return firstChildFiber; } catch (x) { - if ( - x === SuspenseException || - (!disableLegacyMode && - 0 === (returnFiber.mode & 1) && - "object" === typeof x && - null !== x && - "function" === typeof x.then) - ) - throw x; + if (x === SuspenseException) throw x; var fiber = createFiber(29, x, null, returnFiber.mode); fiber.lanes = lanes; fiber.return = returnFiber; @@ -4368,7 +4352,7 @@ function startTransition( fiber, queue, { then: function () {}, status: "rejected", reason: error }, - requestUpdateLane(fiber) + requestUpdateLane() ); } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); @@ -4428,12 +4412,7 @@ function ensureFormComponentIsStateful(formFiber) { } function requestFormReset$1(formFiber) { var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; - dispatchSetStateInternal( - formFiber, - resetStateQueue, - {}, - requestUpdateLane(formFiber) - ); + dispatchSetStateInternal(formFiber, resetStateQueue, {}, requestUpdateLane()); } function useHostTransitionStatus() { return readContext(HostTransitionContext); @@ -4449,7 +4428,7 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider); + var lane = requestUpdateLane(); fiber = createUpdate(lane); var root$74 = enqueueUpdate(provider, fiber, lane); null !== root$74 && @@ -4467,7 +4446,7 @@ function refreshCache(fiber, seedKey, seedValue) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -4484,7 +4463,7 @@ function dispatchReducerAction(fiber, queue, action) { entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); dispatchSetStateInternal(fiber, queue, action, lane); } function dispatchSetStateInternal(fiber, queue, action, lane) { @@ -4932,7 +4911,7 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); @@ -4943,7 +4922,7 @@ var classComponentUpdater = { }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 1; update.payload = payload; @@ -4955,7 +4934,7 @@ var classComponentUpdater = { }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); @@ -4981,33 +4960,6 @@ function checkShouldComponentUpdate( ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0; } -function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = !1, - unmaskedContext = emptyContextObject; - var context = ctor.contextType; - "object" === typeof context && null !== context - ? (context = readContext(context)) - : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (isLegacyContextConsumer = ctor.contextTypes), - (context = (isLegacyContextConsumer = - null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer) - ? getMaskedContext(workInProgress, unmaskedContext) - : emptyContextObject)); - ctor = new ctor(props, context); - workInProgress.memoizedState = - null !== ctor.state && void 0 !== ctor.state ? ctor.state : null; - ctor.updater = classComponentUpdater; - workInProgress.stateNode = ctor; - ctor._reactInternals = workInProgress; - isLegacyContextConsumer && - ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); - return ctor; -} function callComponentWillReceiveProps( workInProgress, instance, @@ -5022,41 +4974,6 @@ function callComponentWillReceiveProps( instance.state !== workInProgress && classComponentUpdater.enqueueReplaceState(instance, instance.state, null); } -function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = {}; - initializeUpdateQueue(workInProgress); - var contextType = ctor.contextType; - "object" === typeof contextType && null !== contextType - ? (instance.context = readContext(contextType)) - : ((contextType = isContextProvider(ctor) - ? previousContext - : contextStackCursor.current), - (instance.context = getMaskedContext(workInProgress, contextType))); - instance.state = workInProgress.memoizedState; - contextType = ctor.getDerivedStateFromProps; - "function" === typeof contextType && - (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps), - (instance.state = workInProgress.memoizedState)); - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ((ctor = instance.state), - "function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount(), - ctor !== instance.state && - classComponentUpdater.enqueueReplaceState(instance, instance.state, null), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (instance.state = workInProgress.memoizedState)); - "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308); -} function resolveClassComponentProps( Component, baseProps, @@ -5192,36 +5109,6 @@ function initializeClassErrorUpdate(update, root, fiber, errorInfo) { }); }); } -function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes -) { - if (!disableLegacyMode && 0 === (suspenseBoundary.mode & 1)) - return ( - suspenseBoundary === returnFiber - ? (suspenseBoundary.flags |= 65536) - : ((suspenseBoundary.flags |= 128), - (sourceFiber.flags |= 131072), - (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag - ? null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= 2)), - suspenseBoundary - ); - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; -} function throwException( root, returnFiber, @@ -5235,98 +5122,70 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + returnFiber = sourceFiber.alternate; + null !== returnFiber && propagateParentContextChanges( - currentSourceFiber, + returnFiber, sourceFiber, rootRenderLanes, !0 ); - currentSourceFiber = sourceFiber.tag; - disableLegacyMode || - 0 !== (sourceFiber.mode & 1) || - (0 !== currentSourceFiber && - 11 !== currentSourceFiber && - 15 !== currentSourceFiber) || - ((currentSourceFiber = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), - (sourceFiber.memoizedState = currentSourceFiber.memoizedState), - (sourceFiber.lanes = currentSourceFiber.lanes)) - : ((sourceFiber.updateQueue = null), - (sourceFiber.memoizedState = null))); - currentSourceFiber = suspenseHandlerStackCursor.current; - if (null !== currentSourceFiber) { - switch (currentSourceFiber.tag) { + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 13: - if (disableLegacyMode || sourceFiber.mode & 1) + return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === currentSourceFiber.alternate && + : null === sourceFiber.alternate && 0 === workInProgressRootExitStatus && - (workInProgressRootExitStatus = 3); - currentSourceFiber.flags &= -257; - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes + (workInProgressRootExitStatus = 3), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 ); - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? (currentSourceFiber.updateQueue = new Set([value])) - : sourceFiber.add(value), - (disableLegacyMode || currentSourceFiber.mode & 1) && - attachPingListener(root, value, rootRenderLanes)); - return !1; case 22: - if (disableLegacyMode || currentSourceFiber.mode & 1) - return ( - (currentSourceFiber.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? ((sourceFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (currentSourceFiber.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); + return ( + (sourceFiber.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); } - throw Error(formatProdErrorMessage(435, currentSourceFiber.tag)); + throw Error(formatProdErrorMessage(435, sourceFiber.tag)); } - if (disableLegacyMode || 1 === root.tag) - return ( - attachPingListener(root, value, rootRenderLanes), - renderDidSuspendDelayIfPossible(), - !1 - ); - value = Error(formatProdErrorMessage(426)); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - if (isHydrating && (disableLegacyMode || sourceFiber.mode & 1)) + if (isHydrating) return ( - (currentSourceFiber = suspenseHandlerStackCursor.current), - null !== currentSourceFiber - ? (0 === (currentSourceFiber.flags & 65536) && - (currentSourceFiber.flags |= 256), - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && ((root = Error(formatProdErrorMessage(422), { cause: value })), queueHydrationError(createCapturedValueAtFiber(root, sourceFiber)))) @@ -5341,10 +5200,10 @@ function throwException( (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -5352,62 +5211,54 @@ function throwException( (workInProgressRootExitStatus = 2)), !1 ); - currentSourceFiber = Error(formatProdErrorMessage(520), { cause: value }); - currentSourceFiber = createCapturedValueAtFiber( - currentSourceFiber, - sourceFiber - ); + var wrapperError = Error(formatProdErrorMessage(520), { cause: value }); + wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [wrapperError]) + : workInProgressRootConcurrentErrors.push(wrapperError); 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (returnFiber.tag) { + switch (sourceFiber.tag) { case 3: return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (returnFiber.lanes |= root), - (root = createRootErrorUpdate( - returnFiber.stateNode, - sourceFiber, - root - )), - enqueueCapturedUpdate(returnFiber, root), + (sourceFiber.lanes |= root), + (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((value = returnFiber.type), - (currentSourceFiber = returnFiber.stateNode), - 0 === (returnFiber.flags & 128) && - ("function" === typeof value.getDerivedStateFromError || - (null !== currentSourceFiber && - "function" === typeof currentSourceFiber.componentDidCatch && + ((returnFiber = sourceFiber.type), + (wrapperError = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== wrapperError && + "function" === typeof wrapperError.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - currentSourceFiber - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError))))) ) return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (returnFiber.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - returnFiber, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(returnFiber, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - returnFiber = returnFiber.return; - } while (null !== returnFiber); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } function processTransitionCallbacks(pendingTransitions, endTime, callbacks) { @@ -5517,10 +5368,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$91 = workInProgress.stateNode; + root$90 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$91.incompleteTransitions.has(transition)) { + if (!root$90.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5528,11 +5379,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$91.incompleteTransitions.set(transition, markerInstance); + root$90.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$91.incompleteTransitions.forEach(function (markerInstance) { + root$90.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5708,36 +5559,28 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { renderLanes ); } - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - if (0 !== (renderLanes & 536870912)) - (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ), - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(), - pushOffscreenSuspenseHandler(workInProgress); - else - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & 536870912)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && pushTransition(workInProgress, null, null), - reuseHiddenContextOnStack(), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -5866,47 +5709,123 @@ function updateClassComponent( pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - constructClassInstance(workInProgress, Component, nextProps), - mountClassInstance(workInProgress, Component, nextProps, renderLanes), - (nextProps = !0); - else if (null === current) { - var instance = workInProgress.stateNode, - unresolvedOldProps = workInProgress.memoizedProps, - oldProps = resolveClassComponentProps( + if (null === workInProgress.stateNode) { + var isLegacyContextConsumer = !1, + unmaskedContext = emptyContextObject; + var context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((unmaskedContext = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (isLegacyContextConsumer = Component.contextTypes), + (context = (isLegacyContextConsumer = + null !== isLegacyContextConsumer && + void 0 !== isLegacyContextConsumer) + ? getMaskedContext(workInProgress, unmaskedContext) + : emptyContextObject)); + var instance = new Component(nextProps, context); + workInProgress.memoizedState = + null !== instance.state && void 0 !== instance.state + ? instance.state + : null; + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; + instance._reactInternals = workInProgress; + isLegacyContextConsumer && + ((isLegacyContextConsumer = workInProgress.stateNode), + (isLegacyContextConsumer.__reactInternalMemoizedUnmaskedChildContext = + unmaskedContext), + (isLegacyContextConsumer.__reactInternalMemoizedMaskedChildContext = + context)); + unmaskedContext = workInProgress.stateNode; + unmaskedContext.props = nextProps; + unmaskedContext.state = workInProgress.memoizedState; + unmaskedContext.refs = {}; + initializeUpdateQueue(workInProgress); + isLegacyContextConsumer = Component.contextType; + "object" === typeof isLegacyContextConsumer && + null !== isLegacyContextConsumer + ? (unmaskedContext.context = readContext(isLegacyContextConsumer)) + : ((isLegacyContextConsumer = isContextProvider(Component) + ? previousContext + : contextStackCursor.current), + (unmaskedContext.context = getMaskedContext( + workInProgress, + isLegacyContextConsumer + ))); + unmaskedContext.state = workInProgress.memoizedState; + isLegacyContextConsumer = Component.getDerivedStateFromProps; + "function" === typeof isLegacyContextConsumer && + (applyDerivedStateFromProps( + workInProgress, Component, - unresolvedOldProps, - workInProgress.type === workInProgress.elementType - ); - instance.props = oldProps; - var oldContext = instance.context, - contextType = Component.contextType; - "object" === typeof contextType && null !== contextType - ? (contextType = readContext(contextType)) - : ((contextType = isContextProvider(Component) + isLegacyContextConsumer, + nextProps + ), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ((isLegacyContextConsumer = unmaskedContext.state), + "function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount(), + isLegacyContextConsumer !== unmaskedContext.state && + classComponentUpdater.enqueueReplaceState( + unmaskedContext, + unmaskedContext.state, + null + ), + processUpdateQueue( + workInProgress, + nextProps, + unmaskedContext, + renderLanes + ), + suspendIfUpdateReadFromEntangledAsyncAction(), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof unmaskedContext.componentDidMount && + (workInProgress.flags |= 4194308); + nextProps = !0; + } else if (null === current) { + unmaskedContext = workInProgress.stateNode; + var unresolvedOldProps = workInProgress.memoizedProps; + isLegacyContextConsumer = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); + unmaskedContext.props = isLegacyContextConsumer; + var oldContext = unmaskedContext.context; + context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((context = isContextProvider(Component) ? previousContext : contextStackCursor.current), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (context = getMaskedContext(workInProgress, context))); + var getDerivedStateFromProps = Component.getDerivedStateFromProps; + instance = + "function" === typeof getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate; unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== contextType) && + instance || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((unresolvedOldProps || oldContext !== context) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, - contextType + context )); hasForceUpdate = !1; var oldState = workInProgress.memoizedState; - instance.state = oldState; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = oldState; + processUpdateQueue(workInProgress, nextProps, unmaskedContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; unresolvedOldProps || @@ -5921,49 +5840,50 @@ function updateClassComponent( nextProps ), (oldContext = workInProgress.memoizedState)), - (oldProps = + (isLegacyContextConsumer = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - oldProps, + isLegacyContextConsumer, nextProps, oldState, oldContext, - contextType + context )) - ? (hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ("function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount()), - "function" === typeof instance.componentDidMount && + ? (instance || + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ("function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount()), + "function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308)) - : ("function" === typeof instance.componentDidMount && + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = oldContext)), - (instance.props = nextProps), - (instance.state = oldContext), - (instance.context = contextType), - (nextProps = oldProps)) - : ("function" === typeof instance.componentDidMount && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = oldContext), + (unmaskedContext.context = context), + (nextProps = isLegacyContextConsumer)) + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (nextProps = !1)); } else { - instance = workInProgress.stateNode; + unmaskedContext = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + isLegacyContextConsumer = workInProgress.memoizedProps; + context = resolveClassComponentProps( Component, - oldProps, + isLegacyContextConsumer, workInProgress.type === workInProgress.elementType ); - instance.props = contextType; - hasNewLifecycles = workInProgress.pendingProps; - unresolvedOldProps = instance.context; + unmaskedContext.props = context; + instance = workInProgress.pendingProps; + unresolvedOldProps = unmaskedContext.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -5974,23 +5894,24 @@ function updateClassComponent( oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = "function" === typeof oldState || - "function" === typeof instance.getSnapshotBeforeUpdate) || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate) || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((isLegacyContextConsumer !== instance || + unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, oldContext )); hasForceUpdate = !1; unresolvedOldProps = workInProgress.memoizedState; - instance.state = unresolvedOldProps; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = unresolvedOldProps; + processUpdateQueue(workInProgress, nextProps, unmaskedContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; - oldProps !== hasNewLifecycles || + isLegacyContextConsumer !== instance || unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || @@ -6005,12 +5926,12 @@ function updateClassComponent( nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, @@ -6020,91 +5941,89 @@ function updateClassComponent( null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || - ("function" !== typeof instance.UNSAFE_componentWillUpdate && - "function" !== typeof instance.componentWillUpdate) || - ("function" === typeof instance.componentWillUpdate && - instance.componentWillUpdate(nextProps, newState, oldContext), - "function" === typeof instance.UNSAFE_componentWillUpdate && - instance.UNSAFE_componentWillUpdate( + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillUpdate && + "function" !== typeof unmaskedContext.componentWillUpdate) || + ("function" === typeof unmaskedContext.componentWillUpdate && + unmaskedContext.componentWillUpdate( + nextProps, + newState, + oldContext + ), + "function" === + typeof unmaskedContext.UNSAFE_componentWillUpdate && + unmaskedContext.UNSAFE_componentWillUpdate( nextProps, newState, oldContext )), - "function" === typeof instance.componentDidUpdate && + "function" === typeof unmaskedContext.componentDidUpdate && (workInProgress.flags |= 4), - "function" === typeof instance.getSnapshotBeforeUpdate && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate && (workInProgress.flags |= 1024)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), - (instance.props = nextProps), - (instance.state = newState), - (instance.context = oldContext), - (nextProps = contextType)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); -} -function finishClassComponent( - current, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes -) { + unmaskedContext = nextProps; markRef(current, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) - ); - shouldUpdate = workInProgress.stateNode; - var nextChildren = - didCaptureError && "function" !== typeof Component.getDerivedStateFromError - ? null - : shouldUpdate.render(); - workInProgress.flags |= 1; - null !== current && didCaptureError - ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + (isLegacyContextConsumer = + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? null + : unmaskedContext.render()), + (workInProgress.flags |= 1), + null !== current && nextProps + ? ((workInProgress.child = reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + isLegacyContextConsumer, + renderLanes + ))) + : reconcileChildren( + current, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current = bailoutOnAlreadyFinishedWork( + current, workInProgress, - null, - nextChildren, renderLanes - ))) - : reconcileChildren(current, workInProgress, nextChildren, renderLanes); - workInProgress.memoizedState = shouldUpdate.state; - hasContext && invalidateContextProvider(workInProgress, Component, !0); - return workInProgress.child; + ))); + return current; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; @@ -6242,18 +6161,18 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = showFallback.updateQueue), - null === current + (renderLanes = showFallback.updateQueue), + null === renderLanes ? (showFallback.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), nextProps ); if ("number" === typeof nextProps.unstable_expectedLoadTime) @@ -6302,11 +6221,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : (reuseSuspenseHandlerOnStack(workInProgress), (showFallback = nextProps.fallback), (nextInstance = workInProgress.mode), - (nextProps = createFiberFromOffscreen( + (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextInstance, - 0, - null + nextInstance )), (showFallback = createFiberFromFragment( showFallback, @@ -6319,13 +6236,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (showFallback.return = workInProgress), (nextProps.sibling = showFallback), (workInProgress.child = nextProps), - (disableLegacyMode || 0 !== (workInProgress.mode & 1)) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), (nextProps = workInProgress.child), (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), @@ -6429,7 +6345,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )), (nextInstance._reactRetry = workInProgress), (workInProgress = null)) - : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + : ((current = JSCompiler_temp$jscomp$0.treeContext), (nextHydratableInstance = getNextHydratable( nextInstance.nextSibling )), @@ -6437,12 +6353,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (isHydrating = !0), (hydrationErrors = null), (rootOrSingletonContext = !1), - null !== renderLanes && + null !== current && ((idStack[idStackIndex++] = treeContextId), (idStack[idStackIndex++] = treeContextOverflow), (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), + (treeContextId = current.id), + (treeContextOverflow = current.overflow), (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, @@ -6458,20 +6374,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (nextInstance = workInProgress.mode), (JSCompiler_temp$jscomp$0 = current.child), (digest = JSCompiler_temp$jscomp$0.sibling), - (didSuspend = { mode: "hidden", children: nextProps.children }), - disableLegacyMode || - 0 !== (nextInstance & 1) || - workInProgress.child === JSCompiler_temp$jscomp$0 - ? ((nextProps = createWorkInProgress( - JSCompiler_temp$jscomp$0, - didSuspend - )), - (nextProps.subtreeFlags = - JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)) - : ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = didSuspend), - (workInProgress.deletions = null)), + (nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, { + mode: "hidden", + children: nextProps.children + })), + (nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280), null !== digest ? (showFallback = createWorkInProgress(digest, showFallback)) : ((showFallback = createFiberFromFragment( @@ -6536,32 +6444,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { nextProps ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_temp = current.child; - current = JSCompiler_temp.sibling; - JSCompiler_temp = createWorkInProgress(JSCompiler_temp, { + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { mode: "visible", children: nextProps.children }); - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - (JSCompiler_temp.lanes = renderLanes); - JSCompiler_temp.return = workInProgress; - JSCompiler_temp.sibling = null; + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_temp = workInProgress.deletions), + null === JSCompiler_temp ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_temp; + : JSCompiler_temp.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_temp; + return renderLanes; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = createFiberFromOffscreen( + primaryChildren = mountWorkInProgressOffscreenFiber( { mode: "visible", children: primaryChildren }, - workInProgress.mode, - 0, - null + workInProgress.mode ); primaryChildren.return = workInProgress; return (workInProgress.child = primaryChildren); @@ -6572,30 +6475,26 @@ function mountSuspenseFallbackChildren( fallbackChildren, renderLanes ) { - var mode = workInProgress.mode, - progressedPrimaryFragment = workInProgress.child; - primaryChildren = { mode: "hidden", children: primaryChildren }; - disableLegacyMode || 0 !== (mode & 1) || null === progressedPrimaryFragment - ? (progressedPrimaryFragment = createFiberFromOffscreen( - primaryChildren, - mode, - 0, - null - )) - : ((progressedPrimaryFragment.childLanes = 0), - (progressedPrimaryFragment.pendingProps = primaryChildren)); + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); fallbackChildren = createFiberFromFragment( fallbackChildren, mode, renderLanes, null ); - progressedPrimaryFragment.return = workInProgress; + primaryChildren.return = workInProgress; fallbackChildren.return = workInProgress; - progressedPrimaryFragment.sibling = fallbackChildren; - workInProgress.child = progressedPrimaryFragment; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; return fallbackChildren; } +function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + return createFiberFromOffscreen(offscreenProps, mode, 0, null); +} function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -6673,68 +6572,57 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { nextProps &= 1; } push(suspenseStackCursor, nextProps); - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); + break; + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - else workInProgress.memoizedState = null; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; + } + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); + break; + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); + break; + default: + workInProgress.memoizedState = null; + } return workInProgress.child; } -function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - null === current || - ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); -} function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); workInProgressRootSkippedLanes |= workInProgress.lanes; @@ -6900,12 +6788,11 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - var elementType = workInProgress.elementType; a: { - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); var props = workInProgress.pendingProps; - current = elementType._init; - current = current(elementType._payload); + current = workInProgress.elementType; + var init = current._init; + current = init(current._payload); workInProgress.type = current; if ("function" === typeof current) shouldConstruct(current) @@ -6931,10 +6818,7 @@ function beginWork(current, workInProgress, renderLanes) { ))); else { if (void 0 !== current && null !== current) - if ( - ((elementType = current.$$typeof), - elementType === REACT_FORWARD_REF_TYPE) - ) { + if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { props = disableDefaultPropsExceptForClasses ? props : resolveDefaultPropsOnNonClassComponent(current, props); @@ -6947,7 +6831,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes ); break a; - } else if (elementType === REACT_MEMO_TYPE) { + } else if (init === REACT_MEMO_TYPE) { props = disableDefaultPropsExceptForClasses ? props : resolveDefaultPropsOnNonClassComponent(current, props); @@ -6971,43 +6855,37 @@ function beginWork(current, workInProgress, renderLanes) { case 0: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), updateFunctionComponent( current, workInProgress, props, - elementType, + init, renderLanes ) ); case 1: return ( (props = workInProgress.type), - (elementType = resolveClassComponentProps( + (init = resolveClassComponentProps( props, workInProgress.pendingProps, workInProgress.elementType === props )), - updateClassComponent( - current, - workInProgress, - props, - elementType, - renderLanes - ) + updateClassComponent(current, workInProgress, props, init, renderLanes) ); case 3: a: { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); var nextProps = workInProgress.pendingProps; - elementType = workInProgress.memoizedState; - props = elementType.element; + init = workInProgress.memoizedState; + props = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; @@ -7016,7 +6894,7 @@ function beginWork(current, workInProgress, renderLanes) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); - nextProps !== elementType.cache && + nextProps !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -7025,15 +6903,15 @@ function beginWork(current, workInProgress, renderLanes) { ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; - if (elementType.isDehydrated) + if (init.isDehydrated) if ( - ((elementType = { + ((init = { element: nextProps, isDehydrated: !1, cache: nextState.cache }), - (workInProgress.updateQueue.baseState = elementType), - (workInProgress.memoizedState = elementType), + (workInProgress.updateQueue.baseState = init), + (workInProgress.memoizedState = init), workInProgress.flags & 256) ) { workInProgress = mountHostRootWithoutHydrating( @@ -7150,7 +7028,7 @@ function beginWork(current, workInProgress, renderLanes) { ); case 5: if (null === current && isHydrating) { - if ((elementType = props = nextHydratableInstance)) + if ((init = props = nextHydratableInstance)) (props = canHydrateInstance( props, workInProgress.type, @@ -7162,22 +7040,22 @@ function beginWork(current, workInProgress, renderLanes) { (hydrationParentFiber = workInProgress), (nextHydratableInstance = getNextHydratable(props.firstChild)), (rootOrSingletonContext = !1), - (elementType = !0)) - : (elementType = !1); - elementType || throwOnHydrationMismatch(workInProgress); + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - elementType = workInProgress.type; + init = workInProgress.type; nextProps = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; props = nextProps.children; - shouldSetTextContent(elementType, nextProps) + shouldSetTextContent(init, nextProps) ? (props = null) : null !== nextState && - shouldSetTextContent(elementType, nextState) && + shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); null !== workInProgress.memoizedState && - ((elementType = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -7185,7 +7063,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = elementType)); + (HostTransitionContext._currentValue = init)); markRef(current, workInProgress); reconcileChildren(current, workInProgress, props, renderLanes); return workInProgress.child; @@ -7228,19 +7106,13 @@ function beginWork(current, workInProgress, renderLanes) { case 11: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - updateForwardRef( - current, - workInProgress, - props, - elementType, - renderLanes - ) + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + updateForwardRef(current, workInProgress, props, init, renderLanes) ); case 7: return ( @@ -7287,13 +7159,13 @@ function beginWork(current, workInProgress, renderLanes) { ); case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress), - (elementType = readContext(elementType)), - (props = props(elementType)), + (init = readContext(init)), + (props = props(init)), (workInProgress.flags |= 1), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child @@ -7301,20 +7173,14 @@ function beginWork(current, workInProgress, renderLanes) { case 14: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props.type, elementType)), - updateMemoComponent( - current, - workInProgress, - props, - elementType, - renderLanes - ) + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) ); case 15: return updateSimpleMemoComponent( @@ -7324,47 +7190,6 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - isContextProvider(props) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1); - prepareToReadContext(workInProgress); - constructClassInstance(workInProgress, props, elementType); - mountClassInstance(workInProgress, props, elementType, renderLanes); - return finishClassComponent( - null, - workInProgress, - props, - !0, - current, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - props, - elementType, - renderLanes - ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: @@ -7383,38 +7208,34 @@ function beginWork(current, workInProgress, renderLanes) { prepareToReadContext(workInProgress), (props = readContext(CacheContext)), null === current - ? ((elementType = peekCacheFromPool()), - null === elementType && - ((elementType = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (elementType.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && - (elementType.pooledCacheLanes |= renderLanes), - (elementType = nextProps)), - (workInProgress.memoizedState = { - parent: props, - cache: elementType - }), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, elementType)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (elementType = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - elementType.parent !== props - ? ((elementType = { parent: props, cache: props }), - (workInProgress.memoizedState = elementType), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - elementType), + init), pushProvider(workInProgress, CacheContext, props)) : ((props = nextProps.cache), pushProvider(workInProgress, CacheContext, props), - props !== elementType.cache && + props !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -7893,14 +7714,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$133 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$133 = lastTailNode), + for (var lastTailNode$125 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$125 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$133 + null === lastTailNode$125 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$133.sibling = null); + : (lastTailNode$125.sibling = null); } } function bubbleProperties(completedWork) { @@ -7910,19 +7731,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$134 = completedWork.child; null !== child$134; ) - (newChildLanes |= child$134.lanes | child$134.childLanes), - (subtreeFlags |= child$134.subtreeFlags & 31457280), - (subtreeFlags |= child$134.flags & 31457280), - (child$134.return = completedWork), - (child$134 = child$134.sibling); + for (var child$126 = completedWork.child; null !== child$126; ) + (newChildLanes |= child$126.lanes | child$126.childLanes), + (subtreeFlags |= child$126.subtreeFlags & 31457280), + (subtreeFlags |= child$126.flags & 31457280), + (child$126.return = completedWork), + (child$126 = child$126.sibling); else - for (child$134 = completedWork.child; null !== child$134; ) - (newChildLanes |= child$134.lanes | child$134.childLanes), - (subtreeFlags |= child$134.subtreeFlags), - (subtreeFlags |= child$134.flags), - (child$134.return = completedWork), - (child$134 = child$134.sibling); + for (child$126 = completedWork.child; null !== child$126; ) + (newChildLanes |= child$126.lanes | child$126.childLanes), + (subtreeFlags |= child$126.subtreeFlags), + (subtreeFlags |= child$126.flags), + (child$126.return = completedWork), + (child$126 = child$126.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7931,8 +7752,6 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -7945,7 +7764,8 @@ function completeWork(current, workInProgress, renderLanes) { return bubbleProperties(workInProgress), null; case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor)), bubbleProperties(workInProgress), null ); @@ -8219,11 +8039,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$146 = null; + var cache$138 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$146 = newProps.memoizedState.cachePool.pool); - cache$146 !== type && (newProps.flags |= 2048); + (cache$138 = newProps.memoizedState.cachePool.pool); + cache$138 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8252,18 +8072,13 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress), null ); - case 17: - if (disableLegacyMode) break; - isContextProvider(workInProgress.type) && popContext(); - bubbleProperties(workInProgress); - return null; case 19: pop(suspenseStackCursor); type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$146 = type.rendering; - if (null === cache$146) + cache$138 = type.rendering; + if (null === cache$138) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8271,11 +8086,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$146 = findFirstSuspended(current); - if (null !== cache$146) { + cache$138 = findFirstSuspended(current); + if (null !== cache$138) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$146.updateQueue; + current = cache$138.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8300,7 +8115,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$146)), null !== current)) { + if (((current = findFirstSuspended(cache$138)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8310,7 +8125,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$146.alternate && + !cache$138.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8323,13 +8138,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$146.sibling = workInProgress.child), - (workInProgress.child = cache$146)) + ? ((cache$138.sibling = workInProgress.child), + (workInProgress.child = cache$138)) : ((current = type.last), null !== current - ? (current.sibling = cache$146) - : (workInProgress.child = cache$146), - (type.last = cache$146)); + ? (current.sibling = cache$138) + : (workInProgress.child = cache$138), + (type.last = cache$138)); } if (null !== type.tail) return ( @@ -8370,14 +8185,14 @@ function completeWork(current, workInProgress, renderLanes) { ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || (!disableLegacyMode && 0 === (workInProgress.mode & 1)) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & 536870912) && + newProps + ? 0 !== (renderLanes & 536870912) && 0 === (workInProgress.flags & 128) && (bubbleProperties(workInProgress), 23 !== workInProgress.tag && workInProgress.subtreeFlags & 6 && - (workInProgress.flags |= 8192)), + (workInProgress.flags |= 8192)) + : bubbleProperties(workInProgress), (renderLanes = workInProgress.updateQueue), null !== renderLanes && scheduleRetryEffect(workInProgress, renderLanes.retryQueue), @@ -8413,8 +8228,6 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -8423,7 +8236,8 @@ function unwindWork(current, workInProgress) { switch (workInProgress.tag) { case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor)), (current = workInProgress.flags), current & 65536 ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) @@ -8503,7 +8317,9 @@ function unwindInterruptedWork(current, interruptedWork) { switch (interruptedWork.tag) { case 1: current = interruptedWork.type.childContextTypes; - null !== current && void 0 !== current && popContext(); + null !== current && + void 0 !== current && + (pop(didPerformWorkStackCursor), pop(contextStackCursor)); break; case 3: popProvider(CacheContext); @@ -8679,8 +8495,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$165) { - captureCommitPhaseError(current, nearestMountedAncestor, error$165); + } catch (error$156) { + captureCommitPhaseError(current, nearestMountedAncestor, error$156); } else ref.current = null; } @@ -8836,7 +8652,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$205) { + } catch (e$196) { JSCompiler_temp = null; break a; } @@ -8980,8 +8796,23 @@ function commitBeforeMutationEffects(root, firstChild) { } break; case 3: - 0 !== (JSCompiler_temp & 1024) && - clearContainer(firstChild.stateNode.containerInfo); + if (0 !== (JSCompiler_temp & 1024)) + if ( + ((root = firstChild.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + 9 === JSCompiler_temp) + ) + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { + case "HEAD": + case "HTML": + case "BODY": + clearContainerSparingly(root); + break; + default: + root.textContent = ""; + } break; case 5: case 26: @@ -9039,11 +8870,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$164) { + } catch (error$155) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$164 + error$155 ); } } @@ -9088,30 +8919,25 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevProps = - null !== finishedWork.memoizedState || offscreenSubtreeIsHidden), - !prevProps) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + prevProps = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevProps) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevProps; + (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -9386,7 +9212,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$173 = hostParentIsContainer; + var prevHostParentIsContainer$164 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9394,7 +9220,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$173; + hostParentIsContainer = prevHostParentIsContainer$164; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9500,21 +9326,15 @@ function commitDeletionEffectsOnFiber( case 22: offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor); - disableLegacyMode || deletedFiber.mode & 1 - ? ((offscreenSubtreeWasHidden = - (prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ), - (offscreenSubtreeWasHidden = prevHostParent)) - : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + offscreenSubtreeWasHidden = + (prevHostParent = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState; + recursivelyTraverseDeletionEffects( + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); + offscreenSubtreeWasHidden = prevHostParent; break; default: recursivelyTraverseDeletionEffects( @@ -9957,15 +9777,13 @@ function commitMutationEffectsOnFiber(finishedWork, root) { safelyDetachRef(current, current.return)); node = null !== finishedWork.memoizedState; nextNode = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & 1 - ? ((nodeName = offscreenSubtreeIsHidden), - (type = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = nodeName || node), - (offscreenSubtreeWasHidden = type || nextNode), - recursivelyTraverseMutationEffects(root, finishedWork), - (offscreenSubtreeWasHidden = type), - (offscreenSubtreeIsHidden = nodeName)) - : recursivelyTraverseMutationEffects(root, finishedWork); + nodeName = offscreenSubtreeIsHidden; + type = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = nodeName || node; + offscreenSubtreeWasHidden = type || nextNode; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = type; + offscreenSubtreeIsHidden = nodeName; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -9981,8 +9799,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null === current || nextNode || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -10102,21 +9919,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$166 = JSCompiler_inline_result.stateNode; + var parent$157 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$166, ""), + (setTextContent(parent$157, ""), (JSCompiler_inline_result.flags &= -33)); - var before$167 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$167, parent$166); + var before$158 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$158, parent$157); break; case 3: case 4: - var parent$168 = JSCompiler_inline_result.stateNode.containerInfo, - before$169 = getHostSibling(finishedWork); + var parent$159 = JSCompiler_inline_result.stateNode.containerInfo, + before$160 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$169, - parent$168 + before$160, + parent$159 ); break; default: @@ -10504,18 +10321,7 @@ function commitPassiveMountOnFiber( committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((nextCache._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) + : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork) : nextCache._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10613,9 +10419,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$184 = finishedWork.stateNode; + var instance$175 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$184._visibility & 4 + ? instance$175._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10623,20 +10429,11 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((instance$184._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$184._visibility |= 4), + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) + : ((instance$175._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10649,7 +10446,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$184 + instance$175 ); break; case 24: @@ -11262,16 +11059,14 @@ var legacyErrorBoundariesThatAlreadyFailed = null, pendingPassiveTransitions = null, nestedUpdateCount = 0, rootWithNestedUpdates = null; -function requestUpdateLane(fiber) { - fiber = fiber.mode; - return disableLegacyMode || 0 !== (fiber & 1) - ? 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes - ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes - : null !== ReactSharedInternals.T - ? ((fiber = currentEntangledLane), - 0 !== fiber ? fiber : requestTransitionLane()) - : resolveUpdatePriority() - : 2; +function requestUpdateLane() { + if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) + return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; + if (null !== ReactSharedInternals.T) { + var actionScopeLane = currentEntangledLane; + return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane(); + } + return resolveUpdatePriority(); } function requestDeferredLane() { 0 === workInProgressDeferredLane && @@ -11297,21 +11092,20 @@ function scheduleUpdateOnFiber(root, fiber, lane) { ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { - if (enableTransitionTracing) { - var transition = ReactSharedInternals.T; - if ( - null !== transition && - null != transition.name && - (-1 === transition.startTime && (transition.startTime = now()), - enableTransitionTracing) - ) { - var transitionLanesMap = root.transitionLanes, - index$11 = 31 - clz32(lane), - transitions = transitionLanesMap[index$11]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index$11] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index$11 = 31 - clz32(lane), + transitions = transitionLanesMap[index$11]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index$11] = transitions; } root === workInProgressRoot && (0 === (executionContext & 2) && @@ -11324,12 +11118,6 @@ function scheduleUpdateOnFiber(root, fiber, lane) { workInProgressRootDidSkipSuspendedSiblings )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ((workInProgressRootRenderTargetTime = now() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { @@ -11360,10 +11148,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = !1; continue; } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { + if (2 === exitStatus) { renderWasConcurrent = lanes; if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) var JSCompiler_inline_result = 0; @@ -11634,19 +11419,6 @@ function markRootSuspended( 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes); } -function batchedUpdates$1(fn, a) { - if (disableLegacyMode) return fn(a); - var prevExecutionContext = executionContext; - executionContext |= 1; - try { - return fn(a); - } finally { - (executionContext = prevExecutionContext), - 0 === executionContext && - ((workInProgressRootRenderTargetTime = now() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); - } -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(0, !1), !1) @@ -11820,8 +11592,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$193) { - handleThrow(root, thrownValue$193); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); lanes && root.shellSuspendCounter++; @@ -11936,8 +11708,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$195) { - handleThrow(root, thrownValue$195); + } catch (thrownValue$186) { + handleThrow(root, thrownValue$186); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -12250,9 +12022,7 @@ function commitRootImpl( renderPriorityLevel(remainingLanes.value, { componentStack: remainingLanes.stack }); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -12289,7 +12059,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$200 = rootWithPendingPassiveEffects, + var root$191 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12304,7 +12074,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$200, remainingLanes); + releaseRootPooledCache(root$191, remainingLanes); } } return !1; @@ -12432,10 +12202,7 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || 0 !== (retryLane & 1) ? claimNextRetryLane() : 2)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -12640,12 +12407,10 @@ function createFiberFromTypeAndProps( return createFiberFromFragment(pendingProps.children, mode, lanes, key); case REACT_STRICT_MODE_TYPE: fiberTag = 8; - mode |= 8; - if (disableLegacyMode || 0 !== (mode & 1)) - (mode |= 16), - enableDO_NOT_USE_disableStrictPassiveEffect && - pendingProps.DO_NOT_USE_disableStrictPassiveEffect && - (mode |= 64); + mode |= 24; + enableDO_NOT_USE_disableStrictPassiveEffect && + pendingProps.DO_NOT_USE_disableStrictPassiveEffect && + (mode |= 64); break; case REACT_PROFILER_TYPE: return ( @@ -12818,7 +12583,7 @@ function FiberRootNode( onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -12892,20 +12657,19 @@ function createFiberRoot( containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), !0 === isStrictMode && (tag |= 24)) - : (tag = 0); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; - tag = createCache(); - tag.refCount++; - containerInfo.pooledCache = tag; - tag.refCount++; + hydrationCallbacks = createCache(); + hydrationCallbacks.refCount++; + containerInfo.pooledCache = hydrationCallbacks; + hydrationCallbacks.refCount++; isStrictMode.memoizedState = { element: initialChildren, isDehydrated: hydrate, - cache: tag + cache: hydrationCallbacks }; initializeUpdateQueue(isStrictMode); return containerInfo; @@ -12971,72 +12735,6 @@ function findHostInstance(component) { component = null !== component ? findCurrentHostFiberImpl(component) : null; return null === component ? null : component.stateNode; } -function createHydrationContainer( - initialChildren, - callback, - containerInfo, - tag, - hydrationCallbacks, - isStrictMode, - concurrentUpdatesByDefaultOverride, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState -) { - initialChildren = createFiberRoot( - containerInfo, - tag, - !0, - initialChildren, - hydrationCallbacks, - isStrictMode, - identifierPrefix, - onUncaughtError, - onCaughtError, - onRecoverableError, - transitionCallbacks, - formState - ); - initialChildren.context = getContextForSubtree(null); - containerInfo = initialChildren.current; - tag = requestUpdateLane(containerInfo); - hydrationCallbacks = createUpdate(tag); - hydrationCallbacks.callback = - void 0 !== callback && null !== callback ? callback : null; - enqueueUpdate(containerInfo, hydrationCallbacks, tag); - initialChildren.current.lanes = tag; - markRootUpdated(initialChildren, tag); - ensureRootIsScheduled(initialChildren); - return initialChildren; -} -function updateContainer(element, container, parentComponent, callback) { - var current = container.current, - lane = requestUpdateLane(current); - updateContainerImpl( - current, - lane, - element, - container, - parentComponent, - callback - ); - return lane; -} -function updateContainerSync(element, container, parentComponent, callback) { - 0 === container.tag && flushPassiveEffects(); - updateContainerImpl( - container.current, - 2, - element, - container, - parentComponent, - callback - ); - return 2; -} function updateContainerImpl( rootFiber, lane, @@ -13058,17 +12756,6 @@ function updateContainerImpl( (scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane)); } -function getPublicRootInstance(container) { - container = container.current; - if (!container.child) return null; - switch (container.child.tag) { - case 27: - case 5: - return container.child.stateNode; - default: - return container.child.stateNode; - } -} function markRetryLaneImpl(fiber, retryLane) { fiber = fiber.memoizedState; if (null !== fiber && null !== fiber.dehydrated) { @@ -13092,7 +12779,7 @@ function batchedUpdates(fn, a, b) { if (isInsideEventHandler) return fn(a, b); isInsideEventHandler = !0; try { - return batchedUpdates$1(fn, a, b); + return fn(a); } finally { if ( ((isInsideEventHandler = !1), @@ -13623,19 +13310,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$366; + var JSCompiler_inline_result$jscomp$350; if (canUseDOM) { - var isSupported$jscomp$inline_1568 = "oninput" in document; - if (!isSupported$jscomp$inline_1568) { - var element$jscomp$inline_1569 = document.createElement("div"); - element$jscomp$inline_1569.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1568 = - "function" === typeof element$jscomp$inline_1569.oninput; + var isSupported$jscomp$inline_1549 = "oninput" in document; + if (!isSupported$jscomp$inline_1549) { + var element$jscomp$inline_1550 = document.createElement("div"); + element$jscomp$inline_1550.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1549 = + "function" === typeof element$jscomp$inline_1550.oninput; } - JSCompiler_inline_result$jscomp$366 = isSupported$jscomp$inline_1568; - } else JSCompiler_inline_result$jscomp$366 = !1; + JSCompiler_inline_result$jscomp$350 = isSupported$jscomp$inline_1549; + } else JSCompiler_inline_result$jscomp$350 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$366 && + JSCompiler_inline_result$jscomp$350 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14046,20 +13733,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1609 = 0; - i$jscomp$inline_1609 < simpleEventPluginEvents.length; - i$jscomp$inline_1609++ + var i$jscomp$inline_1590 = 0; + i$jscomp$inline_1590 < simpleEventPluginEvents.length; + i$jscomp$inline_1590++ ) { - var eventName$jscomp$inline_1610 = - simpleEventPluginEvents[i$jscomp$inline_1609], - domEventName$jscomp$inline_1611 = - eventName$jscomp$inline_1610.toLowerCase(), - capitalizedEvent$jscomp$inline_1612 = - eventName$jscomp$inline_1610[0].toUpperCase() + - eventName$jscomp$inline_1610.slice(1); + var eventName$jscomp$inline_1591 = + simpleEventPluginEvents[i$jscomp$inline_1590], + domEventName$jscomp$inline_1592 = + eventName$jscomp$inline_1591.toLowerCase(), + capitalizedEvent$jscomp$inline_1593 = + eventName$jscomp$inline_1591[0].toUpperCase() + + eventName$jscomp$inline_1591.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1611, - "on" + capitalizedEvent$jscomp$inline_1612 + domEventName$jscomp$inline_1592, + "on" + capitalizedEvent$jscomp$inline_1593 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15352,34 +15039,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$219 = props[hasSrc]; - if (null != propValue$219) + var propValue$210 = props[hasSrc]; + if (null != propValue$210) switch (hasSrc) { case "name": - hasSrcSet = propValue$219; + hasSrcSet = propValue$210; break; case "type": - propValue = propValue$219; + propValue = propValue$210; break; case "checked": - checked = propValue$219; + checked = propValue$210; break; case "defaultChecked": - defaultChecked = propValue$219; + defaultChecked = propValue$210; break; case "value": - propKey = propValue$219; + propKey = propValue$210; break; case "defaultValue": - defaultValue = propValue$219; + defaultValue = propValue$210; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$219) + if (null != propValue$210) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$219, props, null); + setProp(domElement, tag, hasSrc, propValue$210, props, null); } } initInput( @@ -15516,14 +15203,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$219 in props) - props.hasOwnProperty(propValue$219) && - ((hasSrc = props[propValue$219]), + for (propValue$210 in props) + props.hasOwnProperty(propValue$210) && + ((hasSrc = props[propValue$210]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$219, + propValue$210, hasSrc, props, void 0 @@ -15571,14 +15258,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$236 in nextProps) { - var propKey = nextProps[propKey$236]; - lastProp = lastProps[propKey$236]; + for (var propKey$227 in nextProps) { + var propKey = nextProps[propKey$227]; + lastProp = lastProps[propKey$227]; if ( - nextProps.hasOwnProperty(propKey$236) && + nextProps.hasOwnProperty(propKey$227) && (null != propKey || null != lastProp) ) - switch (propKey$236) { + switch (propKey$227) { case "type": type = propKey; break; @@ -15607,7 +15294,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$236, + propKey$227, propKey, nextProps, lastProp @@ -15626,7 +15313,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$236 = null; + propKey = value = defaultValue = propKey$227 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15657,7 +15344,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$236 = type; + propKey$227 = type; break; case "defaultValue": defaultValue = type; @@ -15678,15 +15365,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$236 - ? updateOptions(domElement, !!lastProps, propKey$236, !1) + null != propKey$227 + ? updateOptions(domElement, !!lastProps, propKey$227, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$236 = null; + propKey = propKey$227 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15710,7 +15397,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$236 = name; + propKey$227 = name; break; case "defaultValue": propKey = name; @@ -15724,17 +15411,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$236, propKey); + updateTextarea(domElement, propKey$227, propKey); return; case "option": - for (var propKey$252 in lastProps) + for (var propKey$243 in lastProps) if ( - ((propKey$236 = lastProps[propKey$252]), - lastProps.hasOwnProperty(propKey$252) && - null != propKey$236 && - !nextProps.hasOwnProperty(propKey$252)) + ((propKey$227 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$243)) ) - switch (propKey$252) { + switch (propKey$243) { case "selected": domElement.selected = !1; break; @@ -15742,33 +15429,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$252, + propKey$243, null, nextProps, - propKey$236 + propKey$227 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$236 = nextProps[lastDefaultValue]), + ((propKey$227 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$236 !== propKey && - (null != propKey$236 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$236 && - "function" !== typeof propKey$236 && - "symbol" !== typeof propKey$236; + propKey$227 && + "function" !== typeof propKey$227 && + "symbol" !== typeof propKey$227; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$236, + propKey$227, nextProps, propKey ); @@ -15789,24 +15476,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$257 in lastProps) - (propKey$236 = lastProps[propKey$257]), - lastProps.hasOwnProperty(propKey$257) && - null != propKey$236 && - !nextProps.hasOwnProperty(propKey$257) && - setProp(domElement, tag, propKey$257, null, nextProps, propKey$236); + for (var propKey$248 in lastProps) + (propKey$227 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$248) && + setProp(domElement, tag, propKey$248, null, nextProps, propKey$227); for (checked in nextProps) if ( - ((propKey$236 = nextProps[checked]), + ((propKey$227 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$236 !== propKey && - (null != propKey$236 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$236) + if (null != propKey$227) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15814,7 +15501,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$236, + propKey$227, nextProps, propKey ); @@ -15822,49 +15509,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$262 in lastProps) - (propKey$236 = lastProps[propKey$262]), - lastProps.hasOwnProperty(propKey$262) && - void 0 !== propKey$236 && - !nextProps.hasOwnProperty(propKey$262) && + for (var propKey$253 in lastProps) + (propKey$227 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + void 0 !== propKey$227 && + !nextProps.hasOwnProperty(propKey$253) && setPropOnCustomElement( domElement, tag, - propKey$262, + propKey$253, void 0, nextProps, - propKey$236 + propKey$227 ); for (defaultChecked in nextProps) - (propKey$236 = nextProps[defaultChecked]), + (propKey$227 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$236 === propKey || - (void 0 === propKey$236 && void 0 === propKey) || + propKey$227 === propKey || + (void 0 === propKey$227 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$236, + propKey$227, nextProps, propKey ); return; } } - for (var propKey$267 in lastProps) - (propKey$236 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - null != propKey$236 && - !nextProps.hasOwnProperty(propKey$267) && - setProp(domElement, tag, propKey$267, null, nextProps, propKey$236); + for (var propKey$258 in lastProps) + (propKey$227 = lastProps[propKey$258]), + lastProps.hasOwnProperty(propKey$258) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$258) && + setProp(domElement, tag, propKey$258, null, nextProps, propKey$227); for (lastProp in nextProps) - (propKey$236 = nextProps[lastProp]), + (propKey$227 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$236 === propKey || - (null == propKey$236 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$236, nextProps, propKey); + propKey$227 === propKey || + (null == propKey$227 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$227, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15984,20 +15671,6 @@ function clearSuspenseBoundary(parentInstance, suspenseInstance) { } while (node); retryIfBlockedOn(suspenseInstance); } -function clearContainer(container) { - var nodeType = container.nodeType; - if (9 === nodeType) clearContainerSparingly(container); - else if (1 === nodeType) - switch (container.nodeName) { - case "HEAD": - case "HTML": - case "BODY": - clearContainerSparingly(container); - break; - default: - container.textContent = ""; - } -} function clearContainerSparingly(container) { var nextNode = container.firstChild; nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling); @@ -16223,7 +15896,7 @@ function getHoistableRoot(container) { } var previousDispatcher = Internals.d; Internals.d = { - f: disableLegacyMode ? flushSyncWork : previousDispatcher.f, + f: flushSyncWork, r: requestFormReset, D: prefetchDNS$1, C: preconnect$1, @@ -16234,12 +15907,9 @@ Internals.d = { M: preinitModuleScript }; function flushSyncWork() { - if (disableLegacyMode) { - var previousWasRendering = previousDispatcher.f(), - wasRendering = flushSyncWork$1(); - return previousWasRendering || wasRendering; - } - throw Error(formatProdErrorMessage(521)); + var previousWasRendering = previousDispatcher.f(), + wasRendering = flushSyncWork$1(); + return previousWasRendering || wasRendering; } function requestFormReset(form) { var formInst = getInstanceFromNode(form); @@ -16516,26 +16186,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$275 = getResourcesFromRoot( + var styles$266 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$276 = styles$275.get(type); - resource$276 || + resource$267 = styles$266.get(type); + resource$267 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$276 = { + (resource$267 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$275.set(type, resource$276), - (styles$275 = JSCompiler_inline_result.querySelector( + styles$266.set(type, resource$267), + (styles$266 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$275._p && - ((resource$276.instance = styles$275), - (resource$276.state.loading = 5)), + !styles$266._p && + ((resource$267.instance = styles$266), + (resource$267.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16548,16 +16218,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$275 || + styles$266 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$276.state + resource$267.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$276; + return resource$267; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16654,37 +16324,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$281 = hoistableRoot.querySelector( + var instance$272 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$281) + if (instance$272) return ( (resource.state.loading |= 4), - (resource.instance = instance$281), - markNodeAsHoistable(instance$281), - instance$281 + (resource.instance = instance$272), + markNodeAsHoistable(instance$272), + instance$272 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$281 = ( + instance$272 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$281); - var linkInstance = instance$281; + markNodeAsHoistable(instance$272); + var linkInstance = instance$272; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$281, "link", instance); + setInitialProperties(instance$272, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$281, props.precedence, hoistableRoot); - return (resource.instance = instance$281); + insertStylesheet(instance$272, props.precedence, hoistableRoot); + return (resource.instance = instance$272); case "script": - instance$281 = getScriptKey(props.src); + instance$272 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$281) + getScriptSelectorFromKey(instance$272) )) ) return ( @@ -16693,7 +16363,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$281))) + if ((styleProps = preloadPropsMap.get(instance$272))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17237,7 +16907,7 @@ function attemptExplicitHydrationTarget(queuedTarget) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted), + var lane = requestUpdateLane(), root = enqueueConcurrentRenderForLane(nearestMounted, lane); null !== root && scheduleUpdateOnFiber(root, nearestMounted, lane); @@ -17670,16 +17340,6 @@ function isValidContainer(node) { " react-mount-point-unstable " !== node.nodeValue)) ); } -function isValidContainerLegacy(node) { - return !( - !node || - (1 !== node.nodeType && - 9 !== node.nodeType && - 11 !== node.nodeType && - (8 !== node.nodeType || - " react-mount-point-unstable " !== node.nodeValue)) - ); -} function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { if ( 1 !== target.nodeType && @@ -17701,69 +17361,23 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { listenerSet.add(listenerSetKey)); } else throw Error(formatProdErrorMessage(369)); } -function flushSyncImpl(fn) { - var previousTransition = ReactSharedInternals.T, - previousUpdatePriority = Internals.p; - try { - if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn(); - } finally { - (ReactSharedInternals.T = previousTransition), - (Internals.p = previousUpdatePriority), - Internals.d.f(); - } -} -function flushSyncErrorInBuildsThatSupportLegacyMode() { - throw Error( - "Expected this build of React to not support legacy mode but it does. This is a bug in React." - ); -} -var flushSync$1 = disableLegacyMode - ? flushSyncImpl - : flushSyncErrorInBuildsThatSupportLegacyMode; function getCrossOriginStringAs(as, input) { if ("font" === as) return ""; if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1782 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1763 = React.version; if ( - "19.0.0-www-classic-e1378902-20241106" !== - isomorphicReactPackageVersion$jscomp$inline_1782 + "19.0.0-www-classic-682a103c-20241107" !== + isomorphicReactPackageVersion$jscomp$inline_1763 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1782, - "19.0.0-www-classic-e1378902-20241106" + isomorphicReactPackageVersion$jscomp$inline_1763, + "19.0.0-www-classic-682a103c-20241107" ) ); -function flushSyncFromReconciler(fn) { - a: { - null === rootWithPendingPassiveEffects || - disableLegacyMode || - 0 !== rootWithPendingPassiveEffects.tag || - 0 !== (executionContext & 6) || - flushPassiveEffects(); - var prevExecutionContext = executionContext; - executionContext |= 1; - var prevTransition = ReactSharedInternals.T, - previousPriority = Internals.p; - try { - Internals.p = 2; - ReactSharedInternals.T = null; - var JSCompiler_inline_result = fn ? fn() : void 0; - break a; - } finally { - (Internals.p = previousPriority), - (ReactSharedInternals.T = prevTransition), - (executionContext = prevExecutionContext), - 0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(0, !1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; -} -var flushSync = disableLegacyMode ? flushSync$1 : flushSyncFromReconciler; Internals.findDOMNode = function (componentOrElement) { return findHostInstance(componentOrElement); }; @@ -17777,25 +17391,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2305 = { +var internals$jscomp$inline_2312 = { bundleType: 0, - version: "19.0.0-www-classic-e1378902-20241106", + version: "19.0.0-www-classic-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2306 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2313 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2306.isDisabled && - hook$jscomp$inline_2306.supportsFiber + !hook$jscomp$inline_2313.isDisabled && + hook$jscomp$inline_2313.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2306.inject( - internals$jscomp$inline_2305 + (rendererID = hook$jscomp$inline_2313.inject( + internals$jscomp$inline_2312 )), - (injectedHook = hook$jscomp$inline_2306); + (injectedHook = hook$jscomp$inline_2313); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17805,7 +17419,9 @@ ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) { var root = this._internalRoot; if (null === root) throw Error(formatProdErrorMessage(409)); - updateContainer(children, root, null, null); + var current = root.current, + lane = requestUpdateLane(); + updateContainerImpl(current, lane, children, root, null, null); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function () { @@ -17813,7 +17429,8 @@ ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = if (null !== root) { this._internalRoot = null; var container = root.containerInfo; - updateContainerSync(null, root, null, null); + 0 === root.tag && flushPassiveEffects(); + updateContainerImpl(root.current, 2, null, root, null, null); flushSyncWork$1(); container[internalContainerInstanceKey] = null; } @@ -17857,104 +17474,6 @@ function wwwOnCaughtError(error, errorInfo) { null != errorInfo.componentStack ? errorInfo.componentStack : "" }) && defaultOnCaughtError(error); } -function noopOnRecoverableError() {} -function legacyCreateRootFromDOMContainer( - container, - initialChildren, - parentComponent, - callback, - isHydrationContainer -) { - if (isHydrationContainer) { - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root$302); - originalCallback.call(instance); - }; - } - var root$302 = createHydrationContainer( - initialChildren, - callback, - container, - 0, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$302; - container[internalContainerInstanceKey] = root$302.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - flushSyncWork$1(); - return root$302; - } - clearContainer(container); - if ("function" === typeof callback) { - var originalCallback$303 = callback; - callback = function () { - var instance = getPublicRootInstance(root$304); - originalCallback$303.call(instance); - }; - } - var root$304 = createFiberRoot( - container, - 0, - !1, - null, - null, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$304; - container[internalContainerInstanceKey] = root$304.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - updateContainerSync(initialChildren, root$304, parentComponent, callback); - flushSyncWork$1(); - return root$304; -} -function legacyRenderSubtreeIntoContainer( - parentComponent, - children, - container, - forceHydrate, - callback -) { - var maybeRoot = container._reactRootContainer; - if (maybeRoot) { - var root = maybeRoot; - if ("function" === typeof callback) { - var originalCallback = callback; - callback = function () { - var instance = getPublicRootInstance(root); - originalCallback.call(instance); - }; - } - updateContainer(children, root, parentComponent, callback); - } else - root = legacyCreateRootFromDOMContainer( - container, - children, - parentComponent, - callback, - forceHydrate - ); - return getPublicRootInstance(root); -} assign(Internals, { ReactBrowserEventEmitter: { isEnabled: function () { @@ -18102,7 +17621,17 @@ exports.findDOMNode = function (componentOrElement) { ? componentOrElement : findHostInstance(componentOrElement); }; -exports.flushSync = flushSync; +exports.flushSync = function (fn) { + var previousTransition = ReactSharedInternals.T, + previousUpdatePriority = Internals.p; + try { + if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn(); + } finally { + (ReactSharedInternals.T = previousTransition), + (Internals.p = previousUpdatePriority), + Internals.d.f(); + } +}; exports.focusWithin = function (hostRoot, selectors) { hostRoot = findFiberRootForHostRoot(hostRoot); selectors = findPaths(hostRoot, selectors); @@ -18181,14 +17710,13 @@ exports.hydrateRoot = function (container, initialChildren, options) { void 0 !== options.unstable_transitionCallbacks && (transitionCallbacks = options.unstable_transitionCallbacks), void 0 !== options.formState && (formState = options.formState)); - initialChildren = createHydrationContainer( - initialChildren, - null, + initialChildren = createFiberRoot( container, 1, + !0, + initialChildren, null != options ? options : null, isStrictMode, - !1, identifierPrefix, onUncaughtError, onCaughtError, @@ -18196,6 +17724,15 @@ exports.hydrateRoot = function (container, initialChildren, options) { transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(); + identifierPrefix = createUpdate(isStrictMode); + identifierPrefix.callback = null; + enqueueUpdate(options, identifierPrefix, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -18326,34 +17863,18 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.render = function (element, container, callback) { - if (disableLegacyMode) throw Error(formatProdErrorMessage(509)); - if (!isValidContainerLegacy(container)) - throw Error(formatProdErrorMessage(299)); - return legacyRenderSubtreeIntoContainer( - null, - element, - container, - !1, - callback - ); +exports.render = function () { + throw Error(formatProdErrorMessage(509)); }; exports.requestFormReset = function (form) { Internals.d.r(form); }; -exports.unmountComponentAtNode = function (container) { - if (disableLegacyMode) throw Error(formatProdErrorMessage(509)); - if (!isValidContainerLegacy(container)) - throw Error(formatProdErrorMessage(299)); - return container._reactRootContainer - ? (updateContainerSync(null, container._reactRootContainer, null, null), - flushSyncWork$1(), - (container._reactRootContainer = null), - (container[internalContainerInstanceKey] = null), - !0) - : !1; +exports.unmountComponentAtNode = function () { + throw Error(formatProdErrorMessage(509)); +}; +exports.unstable_batchedUpdates = function (fn, a) { + return fn(a); }; -exports.unstable_batchedUpdates = batchedUpdates$1; exports.unstable_createEventHandle = function (type, options) { function eventHandle(target, callback) { if ("function" !== typeof callback) @@ -18390,4 +17911,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-e1378902-20241106"; +exports.version = "19.0.0-www-classic-682a103c-20241107"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 3d4b6503abc41..fac068ad7887a 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -17099,14 +17099,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1753 = React.version; if ( - "19.0.0-www-modern-e1378902-20241106" !== + "19.0.0-www-modern-682a103c-20241107" !== isomorphicReactPackageVersion$jscomp$inline_1753 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1753, - "19.0.0-www-modern-e1378902-20241106" + "19.0.0-www-modern-682a103c-20241107" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17124,11 +17124,11 @@ Internals.Events = [ ]; var internals$jscomp$inline_2294 = { bundleType: 0, - version: "19.0.0-www-modern-e1378902-20241106", + version: "19.0.0-www-modern-682a103c-20241107", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2295 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17642,4 +17642,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-e1378902-20241106"; +exports.version = "19.0.0-www-modern-682a103c-20241107"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 364fdc0da32f1..9bbd3dc0c047d 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -271,9 +271,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -1064,10 +1061,10 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - !enableSiblingPrerendering || - 0 === suspendedRetryLanes || - 0 !== updatedLanes || - (disableLegacyMode && 0 === root.tag) || + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } @@ -2250,10 +2247,6 @@ __DEV__ && scheduleImmediateTask(processRootScheduleInMicrotask)); enableDeferRootSchedulingToMicrotask || scheduleTaskForRootDuringMicrotask(root, now$1()); - !disableLegacyMode && - ReactSharedInternals.isBatchingLegacy && - 0 === root.tag && - (ReactSharedInternals.didScheduleLegacyUpdate = !0); } function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { if (!isFlushingWork && mightHavePendingSyncWork) { @@ -2261,7 +2254,7 @@ __DEV__ && do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) + if (!onlyLegacy) if (0 !== syncTransitionLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) var nextLanes = 0; @@ -3957,15 +3950,7 @@ __DEV__ && thenableState$1 = null; return firstChildFiber; } catch (x) { - if ( - x === SuspenseException || - (!disableLegacyMode && - (returnFiber.mode & 1) === NoMode && - "object" === typeof x && - null !== x && - "function" === typeof x.then) - ) - throw x; + if (x === SuspenseException) throw x; var fiber = createFiber(29, x, null, returnFiber.mode); fiber.lanes = lanes; fiber.return = returnFiber; @@ -4256,9 +4241,8 @@ __DEV__ && currentlyRenderingFiber$1 = null; hookTypesUpdateIndexDev = -1; - null === current || - (current.flags & 31457280) === (workInProgress.flags & 31457280) || - (!disableLegacyMode && (current.mode & 1) === NoMode) || + null !== current && + (current.flags & 31457280) !== (workInProgress.flags & 31457280) && error$jscomp$0( "Internal React error: Expected static flag was missing. Please notify the React team." ); @@ -5835,124 +5819,6 @@ __DEV__ && ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0; } - function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = !1, - unmaskedContext = emptyContextObject; - var context = ctor.contextType; - if ( - "contextType" in ctor && - null !== context && - (void 0 === context || context.$$typeof !== REACT_CONTEXT_TYPE) && - !didWarnAboutInvalidateContextType.has(ctor) - ) { - didWarnAboutInvalidateContextType.add(ctor); - var addendum = - void 0 === context - ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." - : "object" !== typeof context - ? " However, it is set to a " + typeof context + "." - : context.$$typeof === REACT_CONSUMER_TYPE - ? " Did you accidentally pass the Context.Consumer instead?" - : " However, it is set to an object with keys {" + - Object.keys(context).join(", ") + - "}."; - error$jscomp$0( - "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", - getComponentNameFromType(ctor) || "Component", - addendum - ); - } - "object" === typeof context && null !== context - ? (context = readContext(context)) - : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), - (isLegacyContextConsumer = ctor.contextTypes), - (context = (isLegacyContextConsumer = - null !== isLegacyContextConsumer && - void 0 !== isLegacyContextConsumer) - ? getMaskedContext(workInProgress, unmaskedContext) - : emptyContextObject)); - addendum = new ctor(props, context); - if (workInProgress.mode & 8) { - setIsStrictModeForDevtools(!0); - try { - addendum = new ctor(props, context); - } finally { - setIsStrictModeForDevtools(!1); - } - } - props = workInProgress.memoizedState = - null !== addendum.state && void 0 !== addendum.state - ? addendum.state - : null; - addendum.updater = classComponentUpdater; - workInProgress.stateNode = addendum; - addendum._reactInternals = workInProgress; - addendum._reactInternalInstance = fakeInternalInstance; - "function" === typeof ctor.getDerivedStateFromProps && - null === props && - ((props = getComponentNameFromType(ctor) || "Component"), - didWarnAboutUninitializedState.has(props) || - (didWarnAboutUninitializedState.add(props), - error$jscomp$0( - "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", - props, - null === addendum.state ? "null" : "undefined", - props - ))); - if ( - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof addendum.getSnapshotBeforeUpdate - ) { - var foundWillReceivePropsName = (props = null), - foundWillUpdateName = null; - "function" === typeof addendum.componentWillMount && - !0 !== addendum.componentWillMount.__suppressDeprecationWarning - ? (props = "componentWillMount") - : "function" === typeof addendum.UNSAFE_componentWillMount && - (props = "UNSAFE_componentWillMount"); - "function" === typeof addendum.componentWillReceiveProps && - !0 !== addendum.componentWillReceiveProps.__suppressDeprecationWarning - ? (foundWillReceivePropsName = "componentWillReceiveProps") - : "function" === typeof addendum.UNSAFE_componentWillReceiveProps && - (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps"); - "function" === typeof addendum.componentWillUpdate && - !0 !== addendum.componentWillUpdate.__suppressDeprecationWarning - ? (foundWillUpdateName = "componentWillUpdate") - : "function" === typeof addendum.UNSAFE_componentWillUpdate && - (foundWillUpdateName = "UNSAFE_componentWillUpdate"); - if ( - null !== props || - null !== foundWillReceivePropsName || - null !== foundWillUpdateName - ) { - var _componentName = getComponentNameFromType(ctor) || "Component"; - ctor = - "function" === typeof ctor.getDerivedStateFromProps - ? "getDerivedStateFromProps()" - : "getSnapshotBeforeUpdate()"; - didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) || - (didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName), - error$jscomp$0( - "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", - _componentName, - ctor, - null !== props ? "\n " + props : "", - null !== foundWillReceivePropsName - ? "\n " + foundWillReceivePropsName - : "", - null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" - )); - } - } - isLegacyContextConsumer && - ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); - return addendum; - } function callComponentWillReceiveProps( workInProgress, instance, @@ -5979,202 +5845,6 @@ __DEV__ && null )); } - function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode, - name = getComponentNameFromType(ctor) || "Component"; - instance.render || - (ctor.prototype && "function" === typeof ctor.prototype.render - ? error$jscomp$0( - "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", - name - ) - : error$jscomp$0( - "No `render` method found on the %s instance: you may have forgotten to define `render`.", - name - )); - !instance.getInitialState || - instance.getInitialState.isReactClassApproved || - instance.state || - error$jscomp$0( - "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", - name - ); - instance.getDefaultProps && - !instance.getDefaultProps.isReactClassApproved && - error$jscomp$0( - "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", - name - ); - instance.contextType && - error$jscomp$0( - "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", - name - ); - instance.contextTypes && - error$jscomp$0( - "contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", - name - ); - ctor.contextType && - ctor.contextTypes && - !didWarnAboutContextTypeAndContextTypes.has(ctor) && - (didWarnAboutContextTypeAndContextTypes.add(ctor), - error$jscomp$0( - "%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", - name - )); - ctor.childContextTypes && - !didWarnAboutChildContextTypes.has(ctor) && - (didWarnAboutChildContextTypes.add(ctor), - error$jscomp$0( - "%s uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead. (https://react.dev/link/legacy-context)", - name - )); - ctor.contextTypes && - !didWarnAboutContextTypes$1.has(ctor) && - (didWarnAboutContextTypes$1.add(ctor), - error$jscomp$0( - "%s uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", - name - )); - "function" === typeof instance.componentShouldUpdate && - error$jscomp$0( - "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", - name - ); - ctor.prototype && - ctor.prototype.isPureReactComponent && - "undefined" !== typeof instance.shouldComponentUpdate && - error$jscomp$0( - "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", - getComponentNameFromType(ctor) || "A pure component" - ); - "function" === typeof instance.componentDidUnmount && - error$jscomp$0( - "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", - name - ); - "function" === typeof instance.componentDidReceiveProps && - error$jscomp$0( - "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", - name - ); - "function" === typeof instance.componentWillRecieveProps && - error$jscomp$0( - "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", - name - ); - "function" === typeof instance.UNSAFE_componentWillRecieveProps && - error$jscomp$0( - "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", - name - ); - var hasMutatedProps = instance.props !== newProps; - void 0 !== instance.props && - hasMutatedProps && - error$jscomp$0( - "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", - name - ); - instance.defaultProps && - error$jscomp$0( - "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", - name, - name - ); - "function" !== typeof instance.getSnapshotBeforeUpdate || - "function" === typeof instance.componentDidUpdate || - didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor) || - (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor), - error$jscomp$0( - "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", - getComponentNameFromType(ctor) - )); - "function" === typeof instance.getDerivedStateFromProps && - error$jscomp$0( - "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - name - ); - "function" === typeof instance.getDerivedStateFromError && - error$jscomp$0( - "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - name - ); - "function" === typeof ctor.getSnapshotBeforeUpdate && - error$jscomp$0( - "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", - name - ); - (hasMutatedProps = instance.state) && - ("object" !== typeof hasMutatedProps || isArrayImpl(hasMutatedProps)) && - error$jscomp$0("%s.state: must be set to an object or null", name); - "function" === typeof instance.getChildContext && - "object" !== typeof ctor.childContextTypes && - error$jscomp$0( - "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", - name - ); - instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = {}; - initializeUpdateQueue(workInProgress); - name = ctor.contextType; - "object" === typeof name && null !== name - ? (instance.context = readContext(name)) - : ((name = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), - (instance.context = getMaskedContext(workInProgress, name))); - instance.state === newProps && - ((name = getComponentNameFromType(ctor) || "Component"), - didWarnAboutDirectlyAssigningPropsToState.has(name) || - (didWarnAboutDirectlyAssigningPropsToState.add(name), - error$jscomp$0( - "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", - name - ))); - workInProgress.mode & 8 && - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - instance - ); - ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( - workInProgress, - instance - ); - instance.state = workInProgress.memoizedState; - name = ctor.getDerivedStateFromProps; - "function" === typeof name && - (applyDerivedStateFromProps(workInProgress, ctor, name, newProps), - (instance.state = workInProgress.memoizedState)); - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ((ctor = instance.state), - "function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount(), - ctor !== instance.state && - (error$jscomp$0( - "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", - getComponentNameFromFiber(workInProgress) || "Component" - ), - classComponentUpdater.enqueueReplaceState( - instance, - instance.state, - null - )), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (instance.state = workInProgress.memoizedState)); - "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308); - (workInProgress.mode & 16) !== NoMode && - (workInProgress.flags |= 67108864); - } function resolveClassComponentProps( Component, baseProps, @@ -6302,36 +5972,6 @@ __DEV__ && )); }); } - function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ) { - if (!disableLegacyMode && (suspenseBoundary.mode & 1) === NoMode) - return ( - suspenseBoundary === returnFiber - ? (suspenseBoundary.flags |= 65536) - : ((suspenseBoundary.flags |= 128), - (sourceFiber.flags |= 131072), - (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag - ? null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = ForceUpdate), - enqueueUpdate(sourceFiber, returnFiber, 2)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= 2)), - suspenseBoundary - ); - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; - } function throwException( root, returnFiber, @@ -6346,113 +5986,80 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + returnFiber = sourceFiber.alternate; + null !== returnFiber && propagateParentContextChanges( - currentSourceFiber, + returnFiber, sourceFiber, rootRenderLanes, !0 ); - currentSourceFiber = sourceFiber.tag; - disableLegacyMode || - (sourceFiber.mode & 1) !== NoMode || - (0 !== currentSourceFiber && - 11 !== currentSourceFiber && - 15 !== currentSourceFiber) || - ((currentSourceFiber = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), - (sourceFiber.memoizedState = currentSourceFiber.memoizedState), - (sourceFiber.lanes = currentSourceFiber.lanes)) - : ((sourceFiber.updateQueue = null), - (sourceFiber.memoizedState = null))); - isHydrating && - (disableLegacyMode || sourceFiber.mode & 1) && - (didSuspendOrErrorDEV = !0); + isHydrating && (didSuspendOrErrorDEV = !0); enableDebugTracing && sourceFiber.mode & 4 && - ((currentSourceFiber = - getComponentNameFromFiber(sourceFiber) || "Unknown"), - logComponentSuspended(currentSourceFiber, value)); - currentSourceFiber = suspenseHandlerStackCursor.current; - if (null !== currentSourceFiber) { - switch (currentSourceFiber.tag) { + ((sourceFiber = getComponentNameFromFiber(sourceFiber) || "Unknown"), + logComponentSuspended(sourceFiber, value)); + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 13: - if (disableLegacyMode || sourceFiber.mode & 1) + return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === currentSourceFiber.alternate && + : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && - (workInProgressRootExitStatus = RootSuspended); - currentSourceFiber.flags &= -257; - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes + (workInProgressRootExitStatus = RootSuspended), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 ); - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? (currentSourceFiber.updateQueue = new Set([value])) - : sourceFiber.add(value), - (disableLegacyMode || currentSourceFiber.mode & 1) && - attachPingListener(root, value, rootRenderLanes)); - return !1; case 22: - if (disableLegacyMode || currentSourceFiber.mode & 1) - return ( - (currentSourceFiber.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? ((sourceFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (currentSourceFiber.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); + return ( + (sourceFiber.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); } throw Error( "Unexpected Suspense handler tag (" + - currentSourceFiber.tag + + sourceFiber.tag + "). This is a bug in React." ); } - if (disableLegacyMode || 1 === root.tag) - return ( - attachPingListener(root, value, rootRenderLanes), - renderDidSuspendDelayIfPossible(), - !1 - ); - value = Error( - "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition." - ); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - if (isHydrating && (disableLegacyMode || sourceFiber.mode & 1)) + if (isHydrating) return ( (didSuspendOrErrorDEV = !0), - (currentSourceFiber = suspenseHandlerStackCursor.current), - null !== currentSourceFiber - ? (0 === (currentSourceFiber.flags & 65536) && - (currentSourceFiber.flags |= 256), - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && queueHydrationError( createCapturedValueAtFiber( @@ -6477,10 +6084,10 @@ __DEV__ && (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -6488,7 +6095,7 @@ __DEV__ && (workInProgressRootExitStatus = RootErrored)), !1 ); - currentSourceFiber = createCapturedValueAtFiber( + var error = createCapturedValueAtFiber( Error( "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", { cause: value } @@ -6496,58 +6103,56 @@ __DEV__ && sourceFiber ); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [error]) + : workInProgressRootConcurrentErrors.push(error); workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (returnFiber.tag) { + switch (sourceFiber.tag) { case 3: return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (returnFiber.lanes |= root), + (sourceFiber.lanes |= root), (root = createRootErrorUpdate( - returnFiber.stateNode, - sourceFiber, + sourceFiber.stateNode, + value, root )), - enqueueCapturedUpdate(returnFiber, root), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((value = returnFiber.type), - (currentSourceFiber = returnFiber.stateNode), - 0 === (returnFiber.flags & 128) && - ("function" === typeof value.getDerivedStateFromError || - (null !== currentSourceFiber && - "function" === - typeof currentSourceFiber.componentDidCatch && + ((returnFiber = sourceFiber.type), + (error = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== error && + "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - currentSourceFiber - ))))) + !legacyErrorBoundariesThatAlreadyFailed.has(error))))) ) return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (returnFiber.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - returnFiber, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(returnFiber, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - returnFiber = returnFiber.return; - } while (null !== returnFiber); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } function processTransitionCallbacks( @@ -6880,36 +6485,30 @@ __DEV__ && renderLanes ); } - if (disableLegacyMode || (workInProgress.mode & 1) !== NoMode) - if (0 !== (renderLanes & 536870912)) - (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ), - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress), - pushOffscreenSuspenseHandler(workInProgress); - else - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & 536870912)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && pushTransition(workInProgress, null, null), - reuseHiddenContextOnStack(workInProgress), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -7069,7 +6668,7 @@ __DEV__ && return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -7108,291 +6707,588 @@ __DEV__ && ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - constructClassInstance(workInProgress, Component, nextProps), - mountClassInstance(workInProgress, Component, nextProps, renderLanes), - (state = !0); - else if (null === current) { + if (null === workInProgress.stateNode) { + lane = !1; + state = emptyContextObject; + var context = Component.contextType; + if ( + "contextType" in Component && + null !== context && + (void 0 === context || context.$$typeof !== REACT_CONTEXT_TYPE) && + !didWarnAboutInvalidateContextType.has(Component) + ) { + didWarnAboutInvalidateContextType.add(Component); + var addendum = + void 0 === context + ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." + : "object" !== typeof context + ? " However, it is set to a " + typeof context + "." + : context.$$typeof === REACT_CONSUMER_TYPE + ? " Did you accidentally pass the Context.Consumer instead?" + : " However, it is set to an object with keys {" + + Object.keys(context).join(", ") + + "}."; + error$jscomp$0( + "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", + getComponentNameFromType(Component) || "Component", + addendum + ); + } + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((state = isContextProvider(Component) + ? previousContext + : contextStackCursor$1.current), + (lane = Component.contextTypes), + (context = (lane = null !== lane && void 0 !== lane) + ? getMaskedContext(workInProgress, state) + : emptyContextObject)); + addendum = new Component(nextProps, context); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + addendum = new Component(nextProps, context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + var state$jscomp$0 = (workInProgress.memoizedState = + null !== addendum.state && void 0 !== addendum.state + ? addendum.state + : null); + addendum.updater = classComponentUpdater; + workInProgress.stateNode = addendum; + addendum._reactInternals = workInProgress; + addendum._reactInternalInstance = fakeInternalInstance; + "function" === typeof Component.getDerivedStateFromProps && + null === state$jscomp$0 && + ((state$jscomp$0 = + getComponentNameFromType(Component) || "Component"), + didWarnAboutUninitializedState.has(state$jscomp$0) || + (didWarnAboutUninitializedState.add(state$jscomp$0), + error$jscomp$0( + "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", + state$jscomp$0, + null === addendum.state ? "null" : "undefined", + state$jscomp$0 + ))); + if ( + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof addendum.getSnapshotBeforeUpdate + ) { + var foundWillReceivePropsName = (state$jscomp$0 = null), + foundWillUpdateName = null; + "function" === typeof addendum.componentWillMount && + !0 !== addendum.componentWillMount.__suppressDeprecationWarning + ? (state$jscomp$0 = "componentWillMount") + : "function" === typeof addendum.UNSAFE_componentWillMount && + (state$jscomp$0 = "UNSAFE_componentWillMount"); + "function" === typeof addendum.componentWillReceiveProps && + !0 !== addendum.componentWillReceiveProps.__suppressDeprecationWarning + ? (foundWillReceivePropsName = "componentWillReceiveProps") + : "function" === typeof addendum.UNSAFE_componentWillReceiveProps && + (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps"); + "function" === typeof addendum.componentWillUpdate && + !0 !== addendum.componentWillUpdate.__suppressDeprecationWarning + ? (foundWillUpdateName = "componentWillUpdate") + : "function" === typeof addendum.UNSAFE_componentWillUpdate && + (foundWillUpdateName = "UNSAFE_componentWillUpdate"); + if ( + null !== state$jscomp$0 || + null !== foundWillReceivePropsName || + null !== foundWillUpdateName + ) { + addendum = getComponentNameFromType(Component) || "Component"; + var newApiName = + "function" === typeof Component.getDerivedStateFromProps + ? "getDerivedStateFromProps()" + : "getSnapshotBeforeUpdate()"; + didWarnAboutLegacyLifecyclesAndDerivedState.has(addendum) || + (didWarnAboutLegacyLifecyclesAndDerivedState.add(addendum), + error$jscomp$0( + "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", + addendum, + newApiName, + null !== state$jscomp$0 ? "\n " + state$jscomp$0 : "", + null !== foundWillReceivePropsName + ? "\n " + foundWillReceivePropsName + : "", + null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" + )); + } + } + lane && + ((lane = workInProgress.stateNode), + (lane.__reactInternalMemoizedUnmaskedChildContext = state), + (lane.__reactInternalMemoizedMaskedChildContext = context)); state = workInProgress.stateNode; - var unresolvedOldProps = workInProgress.memoizedProps; - lane = resolveClassComponentProps( - Component, - unresolvedOldProps, - workInProgress.type === workInProgress.elementType - ); - state.props = lane; - var oldContext = state.context, - contextType = Component.contextType; - "object" === typeof contextType && null !== contextType - ? (contextType = readContext(contextType)) - : ((contextType = isContextProvider(Component) + lane = getComponentNameFromType(Component) || "Component"; + state.render || + (Component.prototype && + "function" === typeof Component.prototype.render + ? error$jscomp$0( + "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", + lane + ) + : error$jscomp$0( + "No `render` method found on the %s instance: you may have forgotten to define `render`.", + lane + )); + !state.getInitialState || + state.getInitialState.isReactClassApproved || + state.state || + error$jscomp$0( + "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", + lane + ); + state.getDefaultProps && + !state.getDefaultProps.isReactClassApproved && + error$jscomp$0( + "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", + lane + ); + state.contextType && + error$jscomp$0( + "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", + lane + ); + state.contextTypes && + error$jscomp$0( + "contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", + lane + ); + Component.contextType && + Component.contextTypes && + !didWarnAboutContextTypeAndContextTypes.has(Component) && + (didWarnAboutContextTypeAndContextTypes.add(Component), + error$jscomp$0( + "%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", + lane + )); + Component.childContextTypes && + !didWarnAboutChildContextTypes.has(Component) && + (didWarnAboutChildContextTypes.add(Component), + error$jscomp$0( + "%s uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead. (https://react.dev/link/legacy-context)", + lane + )); + Component.contextTypes && + !didWarnAboutContextTypes$1.has(Component) && + (didWarnAboutContextTypes$1.add(Component), + error$jscomp$0( + "%s uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", + lane + )); + "function" === typeof state.componentShouldUpdate && + error$jscomp$0( + "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", + lane + ); + Component.prototype && + Component.prototype.isPureReactComponent && + "undefined" !== typeof state.shouldComponentUpdate && + error$jscomp$0( + "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", + getComponentNameFromType(Component) || "A pure component" + ); + "function" === typeof state.componentDidUnmount && + error$jscomp$0( + "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", + lane + ); + "function" === typeof state.componentDidReceiveProps && + error$jscomp$0( + "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", + lane + ); + "function" === typeof state.componentWillRecieveProps && + error$jscomp$0( + "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", + lane + ); + "function" === typeof state.UNSAFE_componentWillRecieveProps && + error$jscomp$0( + "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", + lane + ); + context = state.props !== nextProps; + void 0 !== state.props && + context && + error$jscomp$0( + "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", + lane + ); + state.defaultProps && + error$jscomp$0( + "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", + lane, + lane + ); + "function" !== typeof state.getSnapshotBeforeUpdate || + "function" === typeof state.componentDidUpdate || + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || + (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), + error$jscomp$0( + "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", + getComponentNameFromType(Component) + )); + "function" === typeof state.getDerivedStateFromProps && + error$jscomp$0( + "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + lane + ); + "function" === typeof state.getDerivedStateFromError && + error$jscomp$0( + "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + lane + ); + "function" === typeof Component.getSnapshotBeforeUpdate && + error$jscomp$0( + "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", + lane + ); + (context = state.state) && + ("object" !== typeof context || isArrayImpl(context)) && + error$jscomp$0("%s.state: must be set to an object or null", lane); + "function" === typeof state.getChildContext && + "object" !== typeof Component.childContextTypes && + error$jscomp$0( + "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", + lane + ); + state = workInProgress.stateNode; + state.props = nextProps; + state.state = workInProgress.memoizedState; + state.refs = {}; + initializeUpdateQueue(workInProgress); + lane = Component.contextType; + "object" === typeof lane && null !== lane + ? (state.context = readContext(lane)) + : ((lane = isContextProvider(Component) ? previousContext : contextStackCursor$1.current), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof state.getSnapshotBeforeUpdate; - unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - hasNewLifecycles || - ("function" !== typeof state.UNSAFE_componentWillReceiveProps && - "function" !== typeof state.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== contextType) && - callComponentWillReceiveProps( - workInProgress, + (state.context = getMaskedContext(workInProgress, lane))); + state.state === nextProps && + ((lane = getComponentNameFromType(Component) || "Component"), + didWarnAboutDirectlyAssigningPropsToState.has(lane) || + (didWarnAboutDirectlyAssigningPropsToState.add(lane), + error$jscomp$0( + "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", + lane + ))); + workInProgress.mode & 8 && + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + state + ); + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( + workInProgress, + state + ); + state.state = workInProgress.memoizedState; + lane = Component.getDerivedStateFromProps; + "function" === typeof lane && + (applyDerivedStateFromProps( + workInProgress, + Component, + lane, + nextProps + ), + (state.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof state.getSnapshotBeforeUpdate || + ("function" !== typeof state.UNSAFE_componentWillMount && + "function" !== typeof state.componentWillMount) || + ((lane = state.state), + "function" === typeof state.componentWillMount && + state.componentWillMount(), + "function" === typeof state.UNSAFE_componentWillMount && + state.UNSAFE_componentWillMount(), + lane !== state.state && + (error$jscomp$0( + "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", + getComponentNameFromFiber(workInProgress) || "Component" + ), + classComponentUpdater.enqueueReplaceState( state, - nextProps, - contextType - )); - hasForceUpdate = !1; - var oldState = workInProgress.memoizedState; - state.state = oldState; - processUpdateQueue(workInProgress, nextProps, state, renderLanes); - suspendIfUpdateReadFromEntangledAsyncAction(); - oldContext = workInProgress.memoizedState; - unresolvedOldProps || - oldState !== oldContext || - didPerformWorkStackCursor.current || - hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps && - (applyDerivedStateFromProps( - workInProgress, - Component, - getDerivedStateFromProps, - nextProps - ), - (oldContext = workInProgress.memoizedState)), - (lane = - hasForceUpdate || - checkShouldComponentUpdate( + state.state, + null + )), + processUpdateQueue(workInProgress, nextProps, state, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction(), + (state.state = workInProgress.memoizedState)); + "function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308); + (workInProgress.mode & 16) !== NoMode && + (workInProgress.flags |= 67108864); + state = !0; + } else if (null === current$jscomp$0) + (state = workInProgress.stateNode), + (foundWillUpdateName = workInProgress.memoizedProps), + (lane = resolveClassComponentProps( + Component, + foundWillUpdateName, + workInProgress.type === workInProgress.elementType + )), + (state.props = lane), + (state$jscomp$0 = state.context), + (context = Component.contextType), + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((context = isContextProvider(Component) + ? previousContext + : contextStackCursor$1.current), + (context = getMaskedContext(workInProgress, context))), + (foundWillReceivePropsName = Component.getDerivedStateFromProps), + (addendum = + "function" === typeof foundWillReceivePropsName || + "function" === typeof state.getSnapshotBeforeUpdate), + (foundWillUpdateName = + workInProgress.pendingProps !== foundWillUpdateName), + addendum || + ("function" !== typeof state.UNSAFE_componentWillReceiveProps && + "function" !== typeof state.componentWillReceiveProps) || + ((foundWillUpdateName || state$jscomp$0 !== context) && + callComponentWillReceiveProps( workInProgress, - Component, - lane, + state, nextProps, - oldState, - oldContext, - contextType - )) - ? (hasNewLifecycles || - ("function" !== typeof state.UNSAFE_componentWillMount && - "function" !== typeof state.componentWillMount) || - ("function" === typeof state.componentWillMount && - state.componentWillMount(), - "function" === typeof state.UNSAFE_componentWillMount && - state.UNSAFE_componentWillMount()), - "function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & 16) !== NoMode && - (workInProgress.flags |= 67108864)) - : ("function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & 16) !== NoMode && - (workInProgress.flags |= 67108864), - (workInProgress.memoizedProps = nextProps), - (workInProgress.memoizedState = oldContext)), - (state.props = nextProps), - (state.state = oldContext), - (state.context = contextType), - (state = lane)) - : ("function" === typeof state.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & 16) !== NoMode && - (workInProgress.flags |= 67108864), - (state = !1)); - } else { + context + )), + (hasForceUpdate = !1), + (newApiName = workInProgress.memoizedState), + (state.state = newApiName), + processUpdateQueue(workInProgress, nextProps, state, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction(), + (state$jscomp$0 = workInProgress.memoizedState), + foundWillUpdateName || + newApiName !== state$jscomp$0 || + didPerformWorkStackCursor.current || + hasForceUpdate + ? ("function" === typeof foundWillReceivePropsName && + (applyDerivedStateFromProps( + workInProgress, + Component, + foundWillReceivePropsName, + nextProps + ), + (state$jscomp$0 = workInProgress.memoizedState)), + (lane = + hasForceUpdate || + checkShouldComponentUpdate( + workInProgress, + Component, + lane, + nextProps, + newApiName, + state$jscomp$0, + context + )) + ? (addendum || + ("function" !== typeof state.UNSAFE_componentWillMount && + "function" !== typeof state.componentWillMount) || + ("function" === typeof state.componentWillMount && + state.componentWillMount(), + "function" === typeof state.UNSAFE_componentWillMount && + state.UNSAFE_componentWillMount()), + "function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & 16) !== NoMode && + (workInProgress.flags |= 67108864)) + : ("function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & 16) !== NoMode && + (workInProgress.flags |= 67108864), + (workInProgress.memoizedProps = nextProps), + (workInProgress.memoizedState = state$jscomp$0)), + (state.props = nextProps), + (state.state = state$jscomp$0), + (state.context = context), + (state = lane)) + : ("function" === typeof state.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & 16) !== NoMode && + (workInProgress.flags |= 67108864), + (state = !1)); + else { state = workInProgress.stateNode; - cloneUpdateQueue(current, workInProgress); + cloneUpdateQueue(current$jscomp$0, workInProgress); lane = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + context = resolveClassComponentProps( Component, lane, workInProgress.type === workInProgress.elementType ); - state.props = contextType; - hasNewLifecycles = workInProgress.pendingProps; - unresolvedOldProps = state.context; - oldContext = Component.contextType; - "object" === typeof oldContext && null !== oldContext - ? (oldContext = readContext(oldContext)) - : ((oldContext = isContextProvider(Component) + state.props = context; + addendum = workInProgress.pendingProps; + foundWillUpdateName = state.context; + state$jscomp$0 = Component.contextType; + "object" === typeof state$jscomp$0 && null !== state$jscomp$0 + ? (state$jscomp$0 = readContext(state$jscomp$0)) + : ((state$jscomp$0 = isContextProvider(Component) ? previousContext : contextStackCursor$1.current), - (oldContext = getMaskedContext(workInProgress, oldContext))); - oldState = Component.getDerivedStateFromProps; - (getDerivedStateFromProps = - "function" === typeof oldState || + (state$jscomp$0 = getMaskedContext( + workInProgress, + state$jscomp$0 + ))); + newApiName = Component.getDerivedStateFromProps; + (foundWillReceivePropsName = + "function" === typeof newApiName || "function" === typeof state.getSnapshotBeforeUpdate) || ("function" !== typeof state.UNSAFE_componentWillReceiveProps && "function" !== typeof state.componentWillReceiveProps) || - ((lane !== hasNewLifecycles || unresolvedOldProps !== oldContext) && + ((lane !== addendum || foundWillUpdateName !== state$jscomp$0) && callComponentWillReceiveProps( workInProgress, state, nextProps, - oldContext + state$jscomp$0 )); hasForceUpdate = !1; - unresolvedOldProps = workInProgress.memoizedState; - state.state = unresolvedOldProps; + foundWillUpdateName = workInProgress.memoizedState; + state.state = foundWillUpdateName; processUpdateQueue(workInProgress, nextProps, state, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; - lane !== hasNewLifecycles || - unresolvedOldProps !== newState || + lane !== addendum || + foundWillUpdateName !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) - ? ("function" === typeof oldState && + (null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies)) + ? ("function" === typeof newApiName && (applyDerivedStateFromProps( workInProgress, Component, - oldState, + newApiName, nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, - unresolvedOldProps, + foundWillUpdateName, newState, - oldContext + state$jscomp$0 ) || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) - ? (getDerivedStateFromProps || + (null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies))) + ? (foundWillReceivePropsName || ("function" !== typeof state.UNSAFE_componentWillUpdate && "function" !== typeof state.componentWillUpdate) || ("function" === typeof state.componentWillUpdate && - state.componentWillUpdate(nextProps, newState, oldContext), + state.componentWillUpdate( + nextProps, + newState, + state$jscomp$0 + ), "function" === typeof state.UNSAFE_componentWillUpdate && state.UNSAFE_componentWillUpdate( nextProps, newState, - oldContext + state$jscomp$0 )), "function" === typeof state.componentDidUpdate && (workInProgress.flags |= 4), "function" === typeof state.getSnapshotBeforeUpdate && (workInProgress.flags |= 1024)) : ("function" !== typeof state.componentDidUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof state.getSnapshotBeforeUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), (state.props = nextProps), (state.state = newState), - (state.context = oldContext), - (state = contextType)) + (state.context = state$jscomp$0), + (state = context)) : ("function" !== typeof state.componentDidUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof state.getSnapshotBeforeUpdate || - (lane === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + (lane === current$jscomp$0.memoizedProps && + foundWillUpdateName === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (state = !1)); } - current = finishClassComponent( - current, - workInProgress, - Component, - state, - _instance, - renderLanes - ); - Component = workInProgress.stateNode; - state && - Component.props !== nextProps && - (didWarnAboutReassigningProps || - error$jscomp$0( - "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", - getComponentNameFromFiber(workInProgress) || "a component" - ), - (didWarnAboutReassigningProps = !0)); - return current; - } - function finishClassComponent( - current$jscomp$0, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes - ) { - markRef(current$jscomp$0, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && - invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork( - current$jscomp$0, - workInProgress, - renderLanes - ) - ); - shouldUpdate = workInProgress.stateNode; - ReactSharedInternals.getCurrentStack = - null === workInProgress ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = workInProgress; - if ( - didCaptureError && - "function" !== typeof Component.getDerivedStateFromError - ) { - var nextChildren = null; - profilerStartTime = -1; - } else { - enableSchedulingProfiler && markComponentRenderStarted(workInProgress); - nextChildren = callRenderInDEV(shouldUpdate); - if (workInProgress.mode & 8) { - setIsStrictModeForDevtools(!0); - try { - callRenderInDEV(shouldUpdate); - } finally { - setIsStrictModeForDevtools(!1); - } - } - enableSchedulingProfiler && markComponentRenderStopped(); - } - workInProgress.flags |= 1; - null !== current$jscomp$0 && didCaptureError - ? ((didCaptureError = nextChildren), - (workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - didCaptureError, - renderLanes - ))) - : reconcileChildren( + context = state; + markRef(current$jscomp$0, workInProgress); + lane = 0 !== (workInProgress.flags & 128); + if (context || lane) { + context = workInProgress.stateNode; + ReactSharedInternals.getCurrentStack = + null === workInProgress ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = workInProgress; + if (lane && "function" !== typeof Component.getDerivedStateFromError) + (addendum = null), (profilerStartTime = -1); + else { + enableSchedulingProfiler && + markComponentRenderStarted(workInProgress); + addendum = callRenderInDEV(context); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + callRenderInDEV(context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + enableSchedulingProfiler && markComponentRenderStopped(); + } + workInProgress.flags |= 1; + null !== current$jscomp$0 && lane + ? ((lane = addendum), + (workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + lane, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + addendum, + renderLanes + ); + workInProgress.memoizedState = context.state; + _instance && invalidateContextProvider(workInProgress, Component, !0); + current$jscomp$0 = workInProgress.child; + } else + _instance && invalidateContextProvider(workInProgress, Component, !1), + (current$jscomp$0 = bailoutOnAlreadyFinishedWork( current$jscomp$0, workInProgress, - nextChildren, renderLanes - ); - workInProgress.memoizedState = shouldUpdate.state; - hasContext && invalidateContextProvider(workInProgress, Component, !0); - return workInProgress.child; + )); + Component = workInProgress.stateNode; + state && + Component.props !== nextProps && + (didWarnAboutReassigningProps || + error$jscomp$0( + "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", + getComponentNameFromFiber(workInProgress) || "a component" + ), + (didWarnAboutReassigningProps = !0)); + return current$jscomp$0; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; @@ -7552,18 +7448,18 @@ __DEV__ && ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = showFallback.updateQueue), - null === current + (renderLanes = showFallback.updateQueue), + null === renderLanes ? (showFallback.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), nextProps ); if ("number" === typeof nextProps.unstable_expectedLoadTime) @@ -7613,11 +7509,9 @@ __DEV__ && : (reuseSuspenseHandlerOnStack(workInProgress), (showFallback = nextProps.fallback), (nextInstance = workInProgress.mode), - (nextProps = createFiberFromOffscreen( + (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextInstance, - 0, - null + nextInstance )), (showFallback = createFiberFromFragment( showFallback, @@ -7630,13 +7524,12 @@ __DEV__ && (showFallback.return = workInProgress), (nextProps.sibling = showFallback), (workInProgress.child = nextProps), - (disableLegacyMode || (workInProgress.mode & 1) !== NoMode) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), (nextProps = workInProgress.child), (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), @@ -7767,7 +7660,7 @@ __DEV__ && )), registerSuspenseInstanceRetry(nextInstance, workInProgress), (workInProgress = null)) - : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + : ((current = JSCompiler_temp$jscomp$0.treeContext), supportsHydration && ((nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(nextInstance)), @@ -7777,13 +7670,13 @@ __DEV__ && (didSuspendOrErrorDEV = !1), (hydrationDiffRootDEV = null), (rootOrSingletonContext = !1), - null !== renderLanes && + null !== current && (warnIfNotHydrating(), (idStack[idStackIndex++] = treeContextId), (idStack[idStackIndex++] = treeContextOverflow), (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), + (treeContextId = current.id), + (treeContextOverflow = current.overflow), (treeContextProvider = workInProgress))), (workInProgress = mountSuspensePrimaryChildren( workInProgress, @@ -7798,30 +7691,12 @@ __DEV__ && nextInstance = workInProgress.mode; JSCompiler_temp$jscomp$0 = current.child; didSuspend = JSCompiler_temp$jscomp$0.sibling; - var primaryChildProps = { + nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, { mode: "hidden", children: nextProps.children - }; - disableLegacyMode || - (nextInstance & 1) !== NoMode || - workInProgress.child === JSCompiler_temp$jscomp$0 - ? ((nextProps = createWorkInProgress( - JSCompiler_temp$jscomp$0, - primaryChildProps - )), - (nextProps.subtreeFlags = - JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)) - : ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - workInProgress.mode & 2 && - ((nextProps.actualDuration = -0), - (nextProps.actualStartTime = -1.1), - (nextProps.selfBaseDuration = - JSCompiler_temp$jscomp$0.selfBaseDuration), - (nextProps.treeBaseDuration = - JSCompiler_temp$jscomp$0.treeBaseDuration)), - (workInProgress.deletions = null)); + }); + nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280; null !== didSuspend ? (showFallback = createWorkInProgress(didSuspend, showFallback)) : ((showFallback = createFiberFromFragment( @@ -7855,33 +7730,36 @@ __DEV__ && cachePool: JSCompiler_temp$jscomp$0 })); showFallback.memoizedState = nextInstance; - enableTransitionTracing && + if ( + enableTransitionTracing && ((nextInstance = enableTransitionTracing ? transitionStack.current : null), - null !== nextInstance && - ((JSCompiler_temp$jscomp$0 = enableTransitionTracing - ? markerInstanceStack.current - : null), - (didSuspend = showFallback.updateQueue), - (primaryChildProps = current.updateQueue), - null === didSuspend + null !== nextInstance) + ) { + JSCompiler_temp$jscomp$0 = enableTransitionTracing + ? markerInstanceStack.current + : null; + didSuspend = showFallback.updateQueue; + var currentOffscreenQueue = current.updateQueue; + null === didSuspend + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null + }) + : didSuspend === currentOffscreenQueue ? (showFallback.updateQueue = { transitions: nextInstance, markerInstances: JSCompiler_temp$jscomp$0, - retryQueue: null + retryQueue: + null !== currentOffscreenQueue + ? currentOffscreenQueue.retryQueue + : null }) - : didSuspend === primaryChildProps - ? (showFallback.updateQueue = { - transitions: nextInstance, - markerInstances: JSCompiler_temp$jscomp$0, - retryQueue: - null !== primaryChildProps - ? primaryChildProps.retryQueue - : null - }) - : ((didSuspend.transitions = nextInstance), - (didSuspend.markerInstances = JSCompiler_temp$jscomp$0)))); + : ((didSuspend.transitions = nextInstance), + (didSuspend.markerInstances = JSCompiler_temp$jscomp$0)); + } showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7891,33 +7769,28 @@ __DEV__ && return nextProps; } pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_temp = current.child; - current = JSCompiler_temp.sibling; - JSCompiler_temp = createWorkInProgress(JSCompiler_temp, { + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { mode: "visible", children: nextProps.children }); - disableLegacyMode || - (workInProgress.mode & 1) !== NoMode || - (JSCompiler_temp.lanes = renderLanes); - JSCompiler_temp.return = workInProgress; - JSCompiler_temp.sibling = null; + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_temp = workInProgress.deletions), + null === JSCompiler_temp ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_temp; + : JSCompiler_temp.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_temp; + return renderLanes; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = createFiberFromOffscreen( + primaryChildren = mountWorkInProgressOffscreenFiber( { mode: "visible", children: primaryChildren }, - workInProgress.mode, - 0, - null + workInProgress.mode ); primaryChildren.return = workInProgress; return (workInProgress.child = primaryChildren); @@ -7928,37 +7801,26 @@ __DEV__ && fallbackChildren, renderLanes ) { - var mode = workInProgress.mode, - progressedPrimaryFragment = workInProgress.child; - primaryChildren = { mode: "hidden", children: primaryChildren }; - disableLegacyMode || - (mode & 1) !== NoMode || - null === progressedPrimaryFragment - ? (progressedPrimaryFragment = createFiberFromOffscreen( - primaryChildren, - mode, - 0, - null - )) - : ((progressedPrimaryFragment.childLanes = 0), - (progressedPrimaryFragment.pendingProps = primaryChildren), - workInProgress.mode & 2 && - ((progressedPrimaryFragment.actualDuration = -0), - (progressedPrimaryFragment.actualStartTime = -1.1), - (progressedPrimaryFragment.selfBaseDuration = -0), - (progressedPrimaryFragment.treeBaseDuration = -0))); + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); fallbackChildren = createFiberFromFragment( fallbackChildren, mode, renderLanes, null ); - progressedPrimaryFragment.return = workInProgress; + primaryChildren.return = workInProgress; fallbackChildren.return = workInProgress; - progressedPrimaryFragment.sibling = fallbackChildren; - workInProgress.child = progressedPrimaryFragment; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; return fallbackChildren; } + function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + return createFiberFromOffscreen(offscreenProps, mode, 0, null); + } function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -8137,69 +7999,59 @@ __DEV__ && nextProps &= SubtreeSuspenseContextMask; } push(suspenseStackCursor, nextProps, workInProgress); - if (disableLegacyMode || (workInProgress.mode & 1) !== NoMode) - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), - (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), + (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), + (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); + break; + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - else workInProgress.memoizedState = null; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; + } + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); + break; + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); + break; + default: + workInProgress.memoizedState = null; + } return workInProgress.child; } - function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { - disableLegacyMode || - (workInProgress.mode & 1) !== NoMode || - null === current || - ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); - } function bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -8441,10 +8293,8 @@ __DEV__ && switch (workInProgress.tag) { case 16: a: if ( - ((prevSibling = workInProgress.elementType), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (returnFiber = workInProgress.pendingProps), - (current = callLazyInitInDEV(prevSibling)), + ((returnFiber = workInProgress.pendingProps), + (current = callLazyInitInDEV(workInProgress.elementType)), (workInProgress.type = current), "function" === typeof current) ) @@ -9025,52 +8875,6 @@ __DEV__ && workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - returnFiber = workInProgress.type; - prevSibling = resolveClassComponentProps( - returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - isContextProvider(returnFiber) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1); - prepareToReadContext(workInProgress); - constructClassInstance(workInProgress, returnFiber, prevSibling); - mountClassInstance( - workInProgress, - returnFiber, - prevSibling, - renderLanes - ); - return finishClassComponent( - null, - workInProgress, - returnFiber, - !0, - current, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - returnFiber = workInProgress.type; - prevSibling = resolveClassComponentProps( - returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ); case 19: return updateSuspenseListComponent( current, @@ -9962,8 +9766,6 @@ __DEV__ && var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -10344,11 +10146,6 @@ __DEV__ && bubbleProperties(workInProgress), null ); - case 17: - if (disableLegacyMode) break; - isContextProvider(workInProgress.type) && popContext(workInProgress); - bubbleProperties(workInProgress); - return null; case 19: pop(suspenseStackCursor, workInProgress); nextResource = workInProgress.memoizedState; @@ -10476,15 +10273,14 @@ __DEV__ && ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || - (!disableLegacyMode && (workInProgress.mode & 1) === NoMode) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & 536870912) && + newProps + ? 0 !== (renderLanes & 536870912) && 0 === (workInProgress.flags & 128) && (bubbleProperties(workInProgress), 23 !== workInProgress.tag && workInProgress.subtreeFlags & 6 && - (workInProgress.flags |= 8192)), + (workInProgress.flags |= 8192)) + : bubbleProperties(workInProgress), (renderLanes = workInProgress.updateQueue), null !== renderLanes && scheduleRetryEffect(workInProgress, renderLanes.retryQueue), @@ -10520,8 +10316,6 @@ __DEV__ && bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error( "Unknown unit of work tag (" + @@ -10887,16 +10681,6 @@ __DEV__ && nearestMountedAncestor ); } - function commitClassDidMount(finishedWork) { - var instance = finishedWork.stateNode; - "function" === typeof instance.componentDidMount && - runWithFiberInDEV( - finishedWork, - callComponentDidMountInDEV, - finishedWork, - instance - ); - } function commitClassCallbacks(finishedWork) { var updateQueue = finishedWork.updateQueue; if (null !== updateQueue) { @@ -11578,31 +11362,26 @@ __DEV__ && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || (finishedWork.mode & 1) !== NoMode) { - if ( - ((prevProps = - null !== finishedWork.memoizedState || - offscreenSubtreeIsHidden), - !prevProps) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + prevProps = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevProps) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevProps; + (offscreenSubtreeWasHidden = current) && + !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -12036,21 +11815,15 @@ __DEV__ && case 22: offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor); - disableLegacyMode || deletedFiber.mode & 1 - ? ((offscreenSubtreeWasHidden = - (prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ), - (offscreenSubtreeWasHidden = prevHostParent)) - : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + offscreenSubtreeWasHidden = + (prevHostParent = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState; + recursivelyTraverseDeletionEffects( + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); + offscreenSubtreeWasHidden = prevHostParent; break; default: recursivelyTraverseDeletionEffects( @@ -12522,17 +12295,15 @@ __DEV__ && safelyDetachRef(current, current.return)); suspenseCallback = null !== finishedWork.memoizedState; retryQueue = null !== current && null !== current.memoizedState; - if (disableLegacyMode || finishedWork.mode & 1) { - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = - prevOffscreenSubtreeIsHidden || suspenseCallback; - offscreenSubtreeWasHidden = - prevOffscreenSubtreeWasHidden || retryQueue; - recursivelyTraverseMutationEffects(root, finishedWork); - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - } else recursivelyTraverseMutationEffects(root, finishedWork); + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = + prevOffscreenSubtreeIsHidden || suspenseCallback; + offscreenSubtreeWasHidden = + prevOffscreenSubtreeWasHidden || retryQueue; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -12548,8 +12319,7 @@ __DEV__ && null === current || retryQueue || root || - ((disableLegacyMode || (finishedWork.mode & 1) !== NoMode) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), supportsMutation && (null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode)) @@ -12767,7 +12537,14 @@ __DEV__ && finishedWork, includeWorkInProgressEffects ); - commitClassDidMount(finishedWork); + current = finishedWork.stateNode; + "function" === typeof current.componentDidMount && + runWithFiberInDEV( + finishedWork, + callComponentDidMountInDEV, + finishedWork, + current + ); current = finishedWork.updateQueue; if (null !== current) { finishedRoot = finishedWork.stateNode; @@ -13113,18 +12890,10 @@ __DEV__ && committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((prevEffectDuration._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -13245,19 +13014,10 @@ __DEV__ && committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((_instance2._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) : ((_instance2._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, @@ -13618,46 +13378,6 @@ __DEV__ && } } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Layout | HasEffect, fiber); - break; - case 1: - commitClassDidMount(fiber); - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Passive | HasEffect, fiber); - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return); - break; - case 1: - var instance = fiber.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount(fiber, fiber.return, instance); - } - } - function invokePassiveEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Passive | HasEffect, fiber, fiber.return); - } - } function findFiberRootForHostRoot(hostRoot) { var maybeFiber = getInstanceFromNode(hostRoot); if (null != maybeFiber) { @@ -13809,16 +13529,6 @@ __DEV__ && return commitHook(); }); } - function isLegacyActEnvironment() { - var isReactActEnvironmentGlobal = - "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT - ? IS_REACT_ACT_ENVIRONMENT - : void 0, - jestIsDefined = "undefined" !== typeof jest; - return ( - warnsIfNotActing && jestIsDefined && !1 !== isReactActEnvironmentGlobal - ); - } function isConcurrentActEnvironment() { var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT @@ -13905,21 +13615,16 @@ __DEV__ && boundaries )); } - function resetRenderTimer() { - workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; - } function requestUpdateLane(fiber) { - var mode = fiber.mode; - if (!disableLegacyMode && (mode & 1) === NoMode) return 2; if ( (executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes ) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; - mode = ReactSharedInternals.T; - return null !== mode - ? (mode._updatedFibers || (mode._updatedFibers = new Set()), - mode._updatedFibers.add(fiber), + var transition = ReactSharedInternals.T; + return null !== transition + ? (transition._updatedFibers || (transition._updatedFibers = new Set()), + transition._updatedFibers.add(fiber), (fiber = currentEntangledLane), 0 !== fiber ? fiber : requestTransitionLane()) : resolveUpdatePriority(); @@ -13965,10 +13670,10 @@ __DEV__ && "Unknown"; didWarnAboutUpdateInRenderForAnotherComponent.has(root) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root), - (fiber = getComponentNameFromFiber(fiber) || "Unknown"), + (lane = getComponentNameFromFiber(fiber) || "Unknown"), error$jscomp$0( "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render", - fiber, + lane, root, root )); @@ -13983,21 +13688,20 @@ __DEV__ && } else { isDevToolsPresent && addFiberToLanesMap(root, fiber, lane); warnIfUpdatesNotWrappedWithActDEV(fiber); - if (enableTransitionTracing) { - var transition = ReactSharedInternals.T; - if ( - null !== transition && - null != transition.name && - (-1 === transition.startTime && (transition.startTime = now$1()), - enableTransitionTracing) - ) { - var transitionLanesMap = root.transitionLanes, - index = 31 - clz32(lane), - transitions = transitionLanesMap[index]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now$1()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index = 31 - clz32(lane), + transitions = transitionLanesMap[index]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index] = transitions; } root === workInProgressRoot && ((executionContext & RenderContext) === NoContext && @@ -14010,13 +13714,6 @@ __DEV__ && workInProgressRootDidSkipSuspendedSiblings )); ensureRootIsScheduled(root); - 2 !== lane || - executionContext !== NoContext || - disableLegacyMode || - (fiber.mode & 1) !== NoMode || - ReactSharedInternals.isBatchingLegacy || - (resetRenderTimer(), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); } } function performWorkOnRoot(root, lanes, forceSync) { @@ -14046,10 +13743,7 @@ __DEV__ && renderWasConcurrent = !1; continue; } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { + if (exitStatus === RootErrored) { renderWasConcurrent = lanes; if (root.errorRecoveryDisabledLanes & renderWasConcurrent) var errorRetryLanes = 0; @@ -14617,7 +14311,7 @@ __DEV__ && movePendingFibersToMemoized(root, lanes); } workInProgressTransitions = getTransitionsForLanes(root, lanes); - resetRenderTimer(); + workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else workInProgressRootIsPrerendering && @@ -15165,7 +14859,7 @@ __DEV__ && (rootWithPassiveNestedUpdates = null)); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root, !1); + transitions || commitDoubleInvokeEffectsInDEV(root); onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); @@ -15184,9 +14878,7 @@ __DEV__ && remainingLanes.value, transitions ); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -15296,7 +14988,7 @@ __DEV__ && "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped && injectedProfilingHooks.markPassiveEffectsStopped(); - commitDoubleInvokeEffectsInDEV(root, !0); + commitDoubleInvokeEffectsInDEV(root); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(0, !1); if (enableTransitionTracing) { @@ -15426,8 +15118,7 @@ __DEV__ && : executionContext & CommitContext && (didIncludeCommitPhaseUpdate = !0), throwIfInfiniteUpdateLoopDetected()); - (disableLegacyMode || 0 !== root.tag) && - isConcurrentActEnvironment() && + isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && error$jscomp$0( "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act" @@ -15447,12 +15138,7 @@ __DEV__ && ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || (retryLane & 1) !== NoMode - ? claimNextRetryLane() - : 2)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -15566,52 +15252,17 @@ __DEV__ && setIsStrictModeForDevtools(!1); } } - function commitDoubleInvokeEffectsInDEV(root, hasPassiveEffects) { - disableLegacyMode || 0 !== root.tag - ? ((hasPassiveEffects = !0), - (!disableLegacyMode && 1 !== root.tag) || - root.current.mode & 24 || - (hasPassiveEffects = !1), - recursivelyTraverseAndDoubleInvokeEffectsInDEV( - root, - root.current, - hasPassiveEffects - )) - : runWithFiberInDEV( - root.current, - legacyCommitDoubleInvokeEffectsInDEV, - root.current, - hasPassiveEffects - ); - } - function legacyCommitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) { - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectUnmountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectUnmountInDEV); - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectMountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectMountInDEV); - } - function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) { - for (var subtreeRoot = null; null != firstChild; ) { - var primarySubtreeFlag = firstChild.subtreeFlags & fiberFlags; - firstChild !== subtreeRoot && - null != firstChild.child && - 0 !== primarySubtreeFlag - ? (firstChild = firstChild.child) - : (0 !== (firstChild.flags & fiberFlags) && - invokeEffectFn(firstChild), - (firstChild = - null !== firstChild.sibling - ? firstChild.sibling - : (subtreeRoot = firstChild.return))); - } + function commitDoubleInvokeEffectsInDEV(root) { + var doubleInvokeEffects = !0; + root.current.mode & 24 || (doubleInvokeEffects = !1); + recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root, + root.current, + doubleInvokeEffects + ); } function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) { - if ( - (executionContext & RenderContext) === NoContext && - (disableLegacyMode || fiber.mode & 1) - ) { + if ((executionContext & RenderContext) === NoContext) { var tag = fiber.tag; if ( 3 === tag || @@ -15647,15 +15298,8 @@ __DEV__ && : scheduleCallback$3(priorityLevel, callback); } function warnIfUpdatesNotWrappedWithActDEV(fiber) { - if (disableLegacyMode || fiber.mode & 1) { - if (!isConcurrentActEnvironment()) return; - } else if ( - !isLegacyActEnvironment() || - executionContext !== NoContext || - (0 !== fiber.tag && 11 !== fiber.tag && 15 !== fiber.tag) - ) - return; - null === ReactSharedInternals.actQueue && + isConcurrentActEnvironment() && + null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function () { error$jscomp$0( "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act", @@ -16002,12 +15646,10 @@ __DEV__ && ); case REACT_STRICT_MODE_TYPE: fiberTag = 8; - mode |= 8; - if (disableLegacyMode || (mode & 1) !== NoMode) - (mode |= 16), - enableDO_NOT_USE_disableStrictPassiveEffect && - pendingProps.DO_NOT_USE_disableStrictPassiveEffect && - (mode |= 64); + mode |= 24; + enableDO_NOT_USE_disableStrictPassiveEffect && + pendingProps.DO_NOT_USE_disableStrictPassiveEffect && + (mode |= 64); break; case REACT_PROFILER_TYPE: return ( @@ -16233,7 +15875,7 @@ __DEV__ && onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -16274,26 +15916,16 @@ __DEV__ && for ( this.transitionCallbacks = null, containerInfo = this.transitionLanes = [], - identifierPrefix = 0; - 31 > identifierPrefix; - identifierPrefix++ + tag = 0; + 31 > tag; + tag++ ) containerInfo.push(null); this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; - for (identifierPrefix = 0; 31 > identifierPrefix; identifierPrefix++) - containerInfo.push(new Set()); - if (disableLegacyMode) - this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; - else - switch (tag) { - case 1: - this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; - break; - case 0: - this._debugRootType = hydrate ? "hydrate()" : "render()"; - } + for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); + this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; } function createFiberRoot( containerInfo, @@ -16322,21 +15954,20 @@ __DEV__ && containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), !0 === isStrictMode && (tag |= 24)) - : (tag = NoMode); - isDevToolsPresent && (tag |= 2); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + isDevToolsPresent && (hydrationCallbacks |= 2); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; - tag = createCache(); - retainCache(tag); - containerInfo.pooledCache = tag; - retainCache(tag); + hydrationCallbacks = createCache(); + retainCache(hydrationCallbacks); + containerInfo.pooledCache = hydrationCallbacks; + retainCache(hydrationCallbacks); isStrictMode.memoizedState = { element: initialChildren, isDehydrated: hydrate, - cache: tag + cache: hydrationCallbacks }; initializeUpdateQueue(isStrictMode); return containerInfo; @@ -16516,7 +16147,6 @@ __DEV__ && transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -16577,9 +16207,9 @@ __DEV__ && scheduleTimeout = $$$config.scheduleTimeout, cancelTimeout = $$$config.cancelTimeout, noTimeout = $$$config.noTimeout, - isPrimaryRenderer = $$$config.isPrimaryRenderer, - warnsIfNotActing = $$$config.warnsIfNotActing, - supportsMutation = $$$config.supportsMutation, + isPrimaryRenderer = $$$config.isPrimaryRenderer; + $$$config.warnsIfNotActing; + var supportsMutation = $$$config.supportsMutation, supportsPersistence = $$$config.supportsPersistence, supportsHydration = $$$config.supportsHydration, getInstanceFromNode = $$$config.getInstanceFromNode, @@ -18783,7 +18413,9 @@ __DEV__ && ensureRootIsScheduled(fiber); (executionContext & (RenderContext | CommitContext)) === NoContext && - (resetRenderTimer(), flushSyncWorkAcrossRoots_impl(0, !1)); + ((workInProgressRootRenderTargetTime = + now$1() + RENDER_TIMEOUT_MS), + flushSyncWorkAcrossRoots_impl(0, !1)); } } break; @@ -18795,18 +18427,7 @@ __DEV__ && } }; exports.batchedUpdates = function (fn, a) { - if (disableLegacyMode) return fn(a); - var prevExecutionContext = executionContext; - executionContext |= 1; - try { - return fn(a); - } finally { - (executionContext = prevExecutionContext), - executionContext !== NoContext || - ReactSharedInternals.isBatchingLegacy || - (resetRenderTimer(), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); - } + return fn(a); }; exports.createComponentSelector = function (component) { return { $$typeof: COMPONENT_TYPE, value: component }; @@ -19003,7 +18624,8 @@ __DEV__ && } finally { setCurrentUpdatePriority(previousPriority), (ReactSharedInternals.T = prevTransition), - executionContext === NoContext && resetRenderTimer(); + executionContext === NoContext && + (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS); } }; exports.findAllNodes = findAllNodes; @@ -19129,11 +18751,6 @@ __DEV__ && }; exports.flushPassiveEffects = flushPassiveEffects; exports.flushSyncFromReconciler = function (fn) { - null === rootWithPendingPassiveEffects || - disableLegacyMode || - 0 !== rootWithPendingPassiveEffects.tag || - (executionContext & (RenderContext | CommitContext)) !== NoContext || - flushPassiveEffects(); var prevExecutionContext = executionContext; executionContext |= 1; var prevTransition = ReactSharedInternals.T, @@ -19228,7 +18845,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 94640fe61e3ef..f60f589e6f461 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -18619,7 +18619,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index c5c444315d213..9af9d9ba25a52 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -145,9 +145,6 @@ module.exports = function ($$$config) { return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -515,10 +512,6 @@ module.exports = function ($$$config) { type = type.childContextTypes; return null !== type && void 0 !== type; } - function popContext() { - pop(didPerformWorkStackCursor); - pop(contextStackCursor$1); - } function pushTopLevelContextObject(fiber, context, didChange) { if (contextStackCursor$1.current !== emptyContextObject) throw Error(formatProdErrorMessage(168)); @@ -768,10 +761,10 @@ module.exports = function ($$$config) { remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - !enableSiblingPrerendering || - 0 === suspendedRetryLanes || - 0 !== updatedLanes || - (disableLegacyMode && 0 === root.tag) || + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } @@ -1119,7 +1112,7 @@ module.exports = function ($$$config) { do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) + if (!onlyLegacy) if (0 !== syncTransitionLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; @@ -2392,15 +2385,7 @@ module.exports = function ($$$config) { thenableState$1 = null; return firstChildFiber; } catch (x) { - if ( - x === SuspenseException || - (!disableLegacyMode && - 0 === (returnFiber.mode & 1) && - "object" === typeof x && - null !== x && - "function" === typeof x.then) - ) - throw x; + if (x === SuspenseException) throw x; var fiber = createFiber(29, x, null, returnFiber.mode); fiber.lanes = lanes; fiber.return = returnFiber; @@ -3417,7 +3402,7 @@ module.exports = function ($$$config) { fiber, queue, { then: function () {}, status: "rejected", reason: error }, - requestUpdateLane(fiber) + requestUpdateLane() ); } finally { setCurrentUpdatePriority(previousPriority), @@ -3473,7 +3458,7 @@ module.exports = function ($$$config) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider); + var lane = requestUpdateLane(); fiber = createUpdate(lane); var root = enqueueUpdate(provider, fiber, lane); null !== root && @@ -3491,7 +3476,7 @@ module.exports = function ($$$config) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -3508,7 +3493,7 @@ module.exports = function ($$$config) { entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); dispatchSetStateInternal(fiber, queue, action, lane); } function dispatchSetStateInternal(fiber, queue, action, lane) { @@ -3635,34 +3620,6 @@ module.exports = function ($$$config) { ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0; } - function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = !1, - unmaskedContext = emptyContextObject; - var context = ctor.contextType; - "object" === typeof context && null !== context - ? (context = readContext(context)) - : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), - (isLegacyContextConsumer = ctor.contextTypes), - (context = (isLegacyContextConsumer = - null !== isLegacyContextConsumer && - void 0 !== isLegacyContextConsumer) - ? getMaskedContext(workInProgress, unmaskedContext) - : emptyContextObject)); - ctor = new ctor(props, context); - workInProgress.memoizedState = - null !== ctor.state && void 0 !== ctor.state ? ctor.state : null; - ctor.updater = classComponentUpdater; - workInProgress.stateNode = ctor; - ctor._reactInternals = workInProgress; - isLegacyContextConsumer && - ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); - return ctor; - } function callComponentWillReceiveProps( workInProgress, instance, @@ -3677,45 +3634,6 @@ module.exports = function ($$$config) { instance.state !== workInProgress && classComponentUpdater.enqueueReplaceState(instance, instance.state, null); } - function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = {}; - initializeUpdateQueue(workInProgress); - var contextType = ctor.contextType; - "object" === typeof contextType && null !== contextType - ? (instance.context = readContext(contextType)) - : ((contextType = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), - (instance.context = getMaskedContext(workInProgress, contextType))); - instance.state = workInProgress.memoizedState; - contextType = ctor.getDerivedStateFromProps; - "function" === typeof contextType && - (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps), - (instance.state = workInProgress.memoizedState)); - "function" === typeof ctor.getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ((ctor = instance.state), - "function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount(), - ctor !== instance.state && - classComponentUpdater.enqueueReplaceState( - instance, - instance.state, - null - ), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (instance.state = workInProgress.memoizedState)); - "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308); - } function resolveClassComponentProps( Component, baseProps, @@ -3813,36 +3731,6 @@ module.exports = function ($$$config) { }); }); } - function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ) { - if (!disableLegacyMode && 0 === (suspenseBoundary.mode & 1)) - return ( - suspenseBoundary === returnFiber - ? (suspenseBoundary.flags |= 65536) - : ((suspenseBoundary.flags |= 128), - (sourceFiber.flags |= 131072), - (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag - ? null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= 2)), - suspenseBoundary - ); - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; - } function throwException( root, returnFiber, @@ -3856,98 +3744,70 @@ module.exports = function ($$$config) { "object" === typeof value && "function" === typeof value.then ) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + returnFiber = sourceFiber.alternate; + null !== returnFiber && propagateParentContextChanges( - currentSourceFiber, + returnFiber, sourceFiber, rootRenderLanes, !0 ); - currentSourceFiber = sourceFiber.tag; - disableLegacyMode || - 0 !== (sourceFiber.mode & 1) || - (0 !== currentSourceFiber && - 11 !== currentSourceFiber && - 15 !== currentSourceFiber) || - ((currentSourceFiber = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), - (sourceFiber.memoizedState = currentSourceFiber.memoizedState), - (sourceFiber.lanes = currentSourceFiber.lanes)) - : ((sourceFiber.updateQueue = null), - (sourceFiber.memoizedState = null))); - currentSourceFiber = suspenseHandlerStackCursor.current; - if (null !== currentSourceFiber) { - switch (currentSourceFiber.tag) { + sourceFiber = suspenseHandlerStackCursor.current; + if (null !== sourceFiber) { + switch (sourceFiber.tag) { case 13: - if (disableLegacyMode || sourceFiber.mode & 1) + return ( null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === currentSourceFiber.alternate && + : null === sourceFiber.alternate && 0 === workInProgressRootExitStatus && - (workInProgressRootExitStatus = 3); - currentSourceFiber.flags &= -257; - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes + (workInProgressRootExitStatus = 3), + (sourceFiber.flags &= -257), + (sourceFiber.flags |= 65536), + (sourceFiber.lanes = rootRenderLanes), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? (sourceFiber.updateQueue = new Set([value])) + : returnFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 ); - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? (currentSourceFiber.updateQueue = new Set([value])) - : sourceFiber.add(value), - (disableLegacyMode || currentSourceFiber.mode & 1) && - attachPingListener(root, value, rootRenderLanes)); - return !1; case 22: - if (disableLegacyMode || currentSourceFiber.mode & 1) - return ( - (currentSourceFiber.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (currentSourceFiber.flags |= 16384) - : ((sourceFiber = currentSourceFiber.updateQueue), - null === sourceFiber - ? ((sourceFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (currentSourceFiber.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); + return ( + (sourceFiber.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (sourceFiber.flags |= 16384) + : ((returnFiber = sourceFiber.updateQueue), + null === returnFiber + ? ((returnFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (sourceFiber.updateQueue = returnFiber)) + : ((sourceFiber = returnFiber.retryQueue), + null === sourceFiber + ? (returnFiber.retryQueue = new Set([value])) + : sourceFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); } - throw Error(formatProdErrorMessage(435, currentSourceFiber.tag)); + throw Error(formatProdErrorMessage(435, sourceFiber.tag)); } - if (disableLegacyMode || 1 === root.tag) - return ( - attachPingListener(root, value, rootRenderLanes), - renderDidSuspendDelayIfPossible(), - !1 - ); - value = Error(formatProdErrorMessage(426)); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - if (isHydrating && (disableLegacyMode || sourceFiber.mode & 1)) + if (isHydrating) return ( - (currentSourceFiber = suspenseHandlerStackCursor.current), - null !== currentSourceFiber - ? (0 === (currentSourceFiber.flags & 65536) && - (currentSourceFiber.flags |= 256), - markSuspenseBoundaryShouldCapture( - currentSourceFiber, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), + (returnFiber = suspenseHandlerStackCursor.current), + null !== returnFiber + ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), + (returnFiber.flags |= 65536), + (returnFiber.lanes = rootRenderLanes), value !== HydrationMismatchException && ((root = Error(formatProdErrorMessage(422), { cause: value })), queueHydrationError( @@ -3964,10 +3824,10 @@ module.exports = function ($$$config) { (root.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (value = createCapturedValueAtFiber(value, sourceFiber)), (rootRenderLanes = createRootErrorUpdate( root.stateNode, - sourceFiber, + value, rootRenderLanes )), enqueueCapturedUpdate(root, rootRenderLanes), @@ -3975,62 +3835,56 @@ module.exports = function ($$$config) { (workInProgressRootExitStatus = 2)), !1 ); - currentSourceFiber = Error(formatProdErrorMessage(520), { cause: value }); - currentSourceFiber = createCapturedValueAtFiber( - currentSourceFiber, - sourceFiber - ); + var wrapperError = Error(formatProdErrorMessage(520), { cause: value }); + wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [wrapperError]) + : workInProgressRootConcurrentErrors.push(wrapperError); 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = createCapturedValueAtFiber(value, sourceFiber); + sourceFiber = returnFiber; do { - switch (returnFiber.tag) { + switch (sourceFiber.tag) { case 3: return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (root = rootRenderLanes & -rootRenderLanes), - (returnFiber.lanes |= root), - (root = createRootErrorUpdate( - returnFiber.stateNode, - sourceFiber, - root - )), - enqueueCapturedUpdate(returnFiber, root), + (sourceFiber.lanes |= root), + (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)), + enqueueCapturedUpdate(sourceFiber, root), !1 ); case 1: if ( - ((value = returnFiber.type), - (currentSourceFiber = returnFiber.stateNode), - 0 === (returnFiber.flags & 128) && - ("function" === typeof value.getDerivedStateFromError || - (null !== currentSourceFiber && - "function" === typeof currentSourceFiber.componentDidCatch && + ((returnFiber = sourceFiber.type), + (wrapperError = sourceFiber.stateNode), + 0 === (sourceFiber.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== wrapperError && + "function" === typeof wrapperError.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has( - currentSourceFiber + wrapperError ))))) ) return ( - (returnFiber.flags |= 65536), + (sourceFiber.flags |= 65536), (rootRenderLanes &= -rootRenderLanes), - (returnFiber.lanes |= rootRenderLanes), + (sourceFiber.lanes |= rootRenderLanes), (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), initializeClassErrorUpdate( rootRenderLanes, root, - returnFiber, - sourceFiber + sourceFiber, + value ), - enqueueCapturedUpdate(returnFiber, rootRenderLanes), + enqueueCapturedUpdate(sourceFiber, rootRenderLanes), !1 ); } - returnFiber = returnFiber.return; - } while (null !== returnFiber); + sourceFiber = sourceFiber.return; + } while (null !== sourceFiber); return !1; } function processTransitionCallbacks(pendingTransitions, endTime, callbacks) { @@ -4338,36 +4192,30 @@ module.exports = function ($$$config) { renderLanes ); } - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - if (0 !== (renderLanes & 536870912)) - (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ), - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(), - pushOffscreenSuspenseHandler(workInProgress); - else - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & 536870912)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), - null !== current && pushTransition(workInProgress, null, null), - reuseHiddenContextOnStack(), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -4501,47 +4349,129 @@ module.exports = function ($$$config) { pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - constructClassInstance(workInProgress, Component, nextProps), - mountClassInstance(workInProgress, Component, nextProps, renderLanes), - (nextProps = !0); - else if (null === current) { - var instance = workInProgress.stateNode, - unresolvedOldProps = workInProgress.memoizedProps, - oldProps = resolveClassComponentProps( + if (null === workInProgress.stateNode) { + var isLegacyContextConsumer = !1, + unmaskedContext = emptyContextObject; + var context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((unmaskedContext = isContextProvider(Component) + ? previousContext + : contextStackCursor$1.current), + (isLegacyContextConsumer = Component.contextTypes), + (context = (isLegacyContextConsumer = + null !== isLegacyContextConsumer && + void 0 !== isLegacyContextConsumer) + ? getMaskedContext(workInProgress, unmaskedContext) + : emptyContextObject)); + var instance = new Component(nextProps, context); + workInProgress.memoizedState = + null !== instance.state && void 0 !== instance.state + ? instance.state + : null; + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; + instance._reactInternals = workInProgress; + isLegacyContextConsumer && + ((isLegacyContextConsumer = workInProgress.stateNode), + (isLegacyContextConsumer.__reactInternalMemoizedUnmaskedChildContext = + unmaskedContext), + (isLegacyContextConsumer.__reactInternalMemoizedMaskedChildContext = + context)); + unmaskedContext = workInProgress.stateNode; + unmaskedContext.props = nextProps; + unmaskedContext.state = workInProgress.memoizedState; + unmaskedContext.refs = {}; + initializeUpdateQueue(workInProgress); + isLegacyContextConsumer = Component.contextType; + "object" === typeof isLegacyContextConsumer && + null !== isLegacyContextConsumer + ? (unmaskedContext.context = readContext(isLegacyContextConsumer)) + : ((isLegacyContextConsumer = isContextProvider(Component) + ? previousContext + : contextStackCursor$1.current), + (unmaskedContext.context = getMaskedContext( + workInProgress, + isLegacyContextConsumer + ))); + unmaskedContext.state = workInProgress.memoizedState; + isLegacyContextConsumer = Component.getDerivedStateFromProps; + "function" === typeof isLegacyContextConsumer && + (applyDerivedStateFromProps( + workInProgress, Component, - unresolvedOldProps, - workInProgress.type === workInProgress.elementType - ); - instance.props = oldProps; - var oldContext = instance.context, - contextType = Component.contextType; - "object" === typeof contextType && null !== contextType - ? (contextType = readContext(contextType)) - : ((contextType = isContextProvider(Component) + isLegacyContextConsumer, + nextProps + ), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate || + ("function" !== typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ((isLegacyContextConsumer = unmaskedContext.state), + "function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount(), + isLegacyContextConsumer !== unmaskedContext.state && + classComponentUpdater.enqueueReplaceState( + unmaskedContext, + unmaskedContext.state, + null + ), + processUpdateQueue( + workInProgress, + nextProps, + unmaskedContext, + renderLanes + ), + suspendIfUpdateReadFromEntangledAsyncAction(), + (unmaskedContext.state = workInProgress.memoizedState)); + "function" === typeof unmaskedContext.componentDidMount && + (workInProgress.flags |= 4194308); + nextProps = !0; + } else if (null === current) { + unmaskedContext = workInProgress.stateNode; + var unresolvedOldProps = workInProgress.memoizedProps; + isLegacyContextConsumer = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); + unmaskedContext.props = isLegacyContextConsumer; + var oldContext = unmaskedContext.context; + context = Component.contextType; + "object" === typeof context && null !== context + ? (context = readContext(context)) + : ((context = isContextProvider(Component) ? previousContext : contextStackCursor$1.current), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (context = getMaskedContext(workInProgress, context))); + var getDerivedStateFromProps = Component.getDerivedStateFromProps; + instance = + "function" === typeof getDerivedStateFromProps || + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate; unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== contextType) && + instance || + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((unresolvedOldProps || oldContext !== context) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, - contextType + context )); hasForceUpdate = !1; var oldState = workInProgress.memoizedState; - instance.state = oldState; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = oldState; + processUpdateQueue( + workInProgress, + nextProps, + unmaskedContext, + renderLanes + ); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; unresolvedOldProps || @@ -4556,49 +4486,51 @@ module.exports = function ($$$config) { nextProps ), (oldContext = workInProgress.memoizedState)), - (oldProps = + (isLegacyContextConsumer = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - oldProps, + isLegacyContextConsumer, nextProps, oldState, oldContext, - contextType + context )) - ? (hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ("function" === typeof instance.componentWillMount && - instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount()), - "function" === typeof instance.componentDidMount && + ? (instance || + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillMount && + "function" !== typeof unmaskedContext.componentWillMount) || + ("function" === typeof unmaskedContext.componentWillMount && + unmaskedContext.componentWillMount(), + "function" === + typeof unmaskedContext.UNSAFE_componentWillMount && + unmaskedContext.UNSAFE_componentWillMount()), + "function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308)) - : ("function" === typeof instance.componentDidMount && + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = oldContext)), - (instance.props = nextProps), - (instance.state = oldContext), - (instance.context = contextType), - (nextProps = oldProps)) - : ("function" === typeof instance.componentDidMount && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = oldContext), + (unmaskedContext.context = context), + (nextProps = isLegacyContextConsumer)) + : ("function" === typeof unmaskedContext.componentDidMount && (workInProgress.flags |= 4194308), (nextProps = !1)); } else { - instance = workInProgress.stateNode; + unmaskedContext = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + isLegacyContextConsumer = workInProgress.memoizedProps; + context = resolveClassComponentProps( Component, - oldProps, + isLegacyContextConsumer, workInProgress.type === workInProgress.elementType ); - instance.props = contextType; - hasNewLifecycles = workInProgress.pendingProps; - unresolvedOldProps = instance.context; + unmaskedContext.props = context; + instance = workInProgress.pendingProps; + unresolvedOldProps = unmaskedContext.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -4609,23 +4541,30 @@ module.exports = function ($$$config) { oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = "function" === typeof oldState || - "function" === typeof instance.getSnapshotBeforeUpdate) || - ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate) || + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillReceiveProps && + "function" !== typeof unmaskedContext.componentWillReceiveProps) || + ((isLegacyContextConsumer !== instance || + unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, - instance, + unmaskedContext, nextProps, oldContext )); hasForceUpdate = !1; unresolvedOldProps = workInProgress.memoizedState; - instance.state = unresolvedOldProps; - processUpdateQueue(workInProgress, nextProps, instance, renderLanes); + unmaskedContext.state = unresolvedOldProps; + processUpdateQueue( + workInProgress, + nextProps, + unmaskedContext, + renderLanes + ); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; - oldProps !== hasNewLifecycles || + isLegacyContextConsumer !== instance || unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || @@ -4640,12 +4579,12 @@ module.exports = function ($$$config) { nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, @@ -4655,92 +4594,89 @@ module.exports = function ($$$config) { null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || - ("function" !== typeof instance.UNSAFE_componentWillUpdate && - "function" !== typeof instance.componentWillUpdate) || - ("function" === typeof instance.componentWillUpdate && - instance.componentWillUpdate(nextProps, newState, oldContext), - "function" === typeof instance.UNSAFE_componentWillUpdate && - instance.UNSAFE_componentWillUpdate( + ("function" !== + typeof unmaskedContext.UNSAFE_componentWillUpdate && + "function" !== typeof unmaskedContext.componentWillUpdate) || + ("function" === typeof unmaskedContext.componentWillUpdate && + unmaskedContext.componentWillUpdate( + nextProps, + newState, + oldContext + ), + "function" === + typeof unmaskedContext.UNSAFE_componentWillUpdate && + unmaskedContext.UNSAFE_componentWillUpdate( nextProps, newState, oldContext )), - "function" === typeof instance.componentDidUpdate && + "function" === typeof unmaskedContext.componentDidUpdate && (workInProgress.flags |= 4), - "function" === typeof instance.getSnapshotBeforeUpdate && + "function" === typeof unmaskedContext.getSnapshotBeforeUpdate && (workInProgress.flags |= 1024)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), - (instance.props = nextProps), - (instance.state = newState), - (instance.context = oldContext), - (nextProps = contextType)) - : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current.memoizedProps && unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); - } - function finishClassComponent( - current, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes - ) { + unmaskedContext = nextProps; markRef(current, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) - ); - shouldUpdate = workInProgress.stateNode; - var nextChildren = - didCaptureError && - "function" !== typeof Component.getDerivedStateFromError - ? null - : shouldUpdate.render(); - workInProgress.flags |= 1; - null !== current && didCaptureError - ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + (isLegacyContextConsumer = + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? null + : unmaskedContext.render()), + (workInProgress.flags |= 1), + null !== current && nextProps + ? ((workInProgress.child = reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + isLegacyContextConsumer, + renderLanes + ))) + : reconcileChildren( + current, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current = bailoutOnAlreadyFinishedWork( + current, workInProgress, - null, - nextChildren, renderLanes - ))) - : reconcileChildren(current, workInProgress, nextChildren, renderLanes); - workInProgress.memoizedState = shouldUpdate.state; - hasContext && invalidateContextProvider(workInProgress, Component, !0); - return workInProgress.child; + ))); + return current; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; @@ -4860,18 +4796,18 @@ module.exports = function ($$$config) { ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = showFallback.updateQueue), - null === current + (renderLanes = showFallback.updateQueue), + null === renderLanes ? (showFallback.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), nextProps ); if ("number" === typeof nextProps.unstable_expectedLoadTime) @@ -4921,11 +4857,9 @@ module.exports = function ($$$config) { : (reuseSuspenseHandlerOnStack(workInProgress), (showFallback = nextProps.fallback), (nextInstance = workInProgress.mode), - (nextProps = createFiberFromOffscreen( + (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextInstance, - 0, - null + nextInstance )), (showFallback = createFiberFromFragment( showFallback, @@ -4938,13 +4872,12 @@ module.exports = function ($$$config) { (showFallback.return = workInProgress), (nextProps.sibling = showFallback), (workInProgress.child = nextProps), - (disableLegacyMode || 0 !== (workInProgress.mode & 1)) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), (nextProps = workInProgress.child), (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)), @@ -5055,7 +4988,7 @@ module.exports = function ($$$config) { )), registerSuspenseInstanceRetry(nextInstance, workInProgress), (workInProgress = null)) - : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + : ((current = JSCompiler_temp$jscomp$0.treeContext), supportsHydration && ((nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(nextInstance)), @@ -5063,12 +4996,12 @@ module.exports = function ($$$config) { (isHydrating = !0), (hydrationErrors = null), (rootOrSingletonContext = !1), - null !== renderLanes && + null !== current && ((idStack[idStackIndex++] = treeContextId), (idStack[idStackIndex++] = treeContextOverflow), (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), + (treeContextId = current.id), + (treeContextOverflow = current.overflow), (treeContextProvider = workInProgress))), (workInProgress = mountSuspensePrimaryChildren( workInProgress, @@ -5083,20 +5016,11 @@ module.exports = function ($$$config) { nextInstance = workInProgress.mode; JSCompiler_temp$jscomp$0 = current.child; didSuspend = JSCompiler_temp$jscomp$0.sibling; - var primaryChildProps = { mode: "hidden", children: nextProps.children }; - disableLegacyMode || - 0 !== (nextInstance & 1) || - workInProgress.child === JSCompiler_temp$jscomp$0 - ? ((nextProps = createWorkInProgress( - JSCompiler_temp$jscomp$0, - primaryChildProps - )), - (nextProps.subtreeFlags = - JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)) - : ((nextProps = workInProgress.child), - (nextProps.childLanes = 0), - (nextProps.pendingProps = primaryChildProps), - (workInProgress.deletions = null)); + nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, { + mode: "hidden", + children: nextProps.children + }); + nextProps.subtreeFlags = JSCompiler_temp$jscomp$0.subtreeFlags & 31457280; null !== didSuspend ? (showFallback = createWorkInProgress(didSuspend, showFallback)) : ((showFallback = createFiberFromFragment( @@ -5130,33 +5054,36 @@ module.exports = function ($$$config) { cachePool: JSCompiler_temp$jscomp$0 })); showFallback.memoizedState = nextInstance; - enableTransitionTracing && + if ( + enableTransitionTracing && ((nextInstance = enableTransitionTracing ? transitionStack.current : null), - null !== nextInstance && - ((JSCompiler_temp$jscomp$0 = enableTransitionTracing - ? markerInstanceStack.current - : null), - (didSuspend = showFallback.updateQueue), - (primaryChildProps = current.updateQueue), - null === didSuspend + null !== nextInstance) + ) { + JSCompiler_temp$jscomp$0 = enableTransitionTracing + ? markerInstanceStack.current + : null; + didSuspend = showFallback.updateQueue; + var currentOffscreenQueue = current.updateQueue; + null === didSuspend + ? (showFallback.updateQueue = { + transitions: nextInstance, + markerInstances: JSCompiler_temp$jscomp$0, + retryQueue: null + }) + : didSuspend === currentOffscreenQueue ? (showFallback.updateQueue = { transitions: nextInstance, markerInstances: JSCompiler_temp$jscomp$0, - retryQueue: null + retryQueue: + null !== currentOffscreenQueue + ? currentOffscreenQueue.retryQueue + : null }) - : didSuspend === primaryChildProps - ? (showFallback.updateQueue = { - transitions: nextInstance, - markerInstances: JSCompiler_temp$jscomp$0, - retryQueue: - null !== primaryChildProps - ? primaryChildProps.retryQueue - : null - }) - : ((didSuspend.transitions = nextInstance), - (didSuspend.markerInstances = JSCompiler_temp$jscomp$0)))); + : ((didSuspend.transitions = nextInstance), + (didSuspend.markerInstances = JSCompiler_temp$jscomp$0)); + } showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -5166,32 +5093,27 @@ module.exports = function ($$$config) { return nextProps; } pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_temp = current.child; - current = JSCompiler_temp.sibling; - JSCompiler_temp = createWorkInProgress(JSCompiler_temp, { + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { mode: "visible", children: nextProps.children }); - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - (JSCompiler_temp.lanes = renderLanes); - JSCompiler_temp.return = workInProgress; - JSCompiler_temp.sibling = null; + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_temp = workInProgress.deletions), + null === JSCompiler_temp ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_temp; + : JSCompiler_temp.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_temp; + return renderLanes; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = createFiberFromOffscreen( + primaryChildren = mountWorkInProgressOffscreenFiber( { mode: "visible", children: primaryChildren }, - workInProgress.mode, - 0, - null + workInProgress.mode ); primaryChildren.return = workInProgress; return (workInProgress.child = primaryChildren); @@ -5202,30 +5124,26 @@ module.exports = function ($$$config) { fallbackChildren, renderLanes ) { - var mode = workInProgress.mode, - progressedPrimaryFragment = workInProgress.child; - primaryChildren = { mode: "hidden", children: primaryChildren }; - disableLegacyMode || 0 !== (mode & 1) || null === progressedPrimaryFragment - ? (progressedPrimaryFragment = createFiberFromOffscreen( - primaryChildren, - mode, - 0, - null - )) - : ((progressedPrimaryFragment.childLanes = 0), - (progressedPrimaryFragment.pendingProps = primaryChildren)); + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); fallbackChildren = createFiberFromFragment( fallbackChildren, mode, renderLanes, null ); - progressedPrimaryFragment.return = workInProgress; + primaryChildren.return = workInProgress; fallbackChildren.return = workInProgress; - progressedPrimaryFragment.sibling = fallbackChildren; - workInProgress.child = progressedPrimaryFragment; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; return fallbackChildren; } + function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + return createFiberFromOffscreen(offscreenProps, mode, 0, null); + } function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -5303,69 +5221,58 @@ module.exports = function ($$$config) { nextProps &= 1; } push(suspenseStackCursor, nextProps); - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), - (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), + (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); + break; + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - else workInProgress.memoizedState = null; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; + } + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); + break; + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); + break; + default: + workInProgress.memoizedState = null; + } return workInProgress.child; } - function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - null === current || - ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); - } function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); workInProgressRootSkippedLanes |= workInProgress.lanes; @@ -5538,12 +5445,11 @@ module.exports = function ($$$config) { workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - var elementType = workInProgress.elementType; a: { - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); var props = workInProgress.pendingProps; - current = elementType._init; - current = current(elementType._payload); + current = workInProgress.elementType; + var init = current._init; + current = init(current._payload); workInProgress.type = current; if ("function" === typeof current) shouldConstruct(current) @@ -5570,8 +5476,7 @@ module.exports = function ($$$config) { else { if (void 0 !== current && null !== current) if ( - ((elementType = current.$$typeof), - elementType === REACT_FORWARD_REF_TYPE) + ((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE) ) { props = disableDefaultPropsExceptForClasses ? props @@ -5585,7 +5490,7 @@ module.exports = function ($$$config) { renderLanes ); break a; - } else if (elementType === REACT_MEMO_TYPE) { + } else if (init === REACT_MEMO_TYPE) { props = disableDefaultPropsExceptForClasses ? props : resolveDefaultPropsOnNonClassComponent(current, props); @@ -5612,24 +5517,24 @@ module.exports = function ($$$config) { case 0: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), updateFunctionComponent( current, workInProgress, props, - elementType, + init, renderLanes ) ); case 1: return ( (props = workInProgress.type), - (elementType = resolveClassComponentProps( + (init = resolveClassComponentProps( props, workInProgress.pendingProps, workInProgress.elementType === props @@ -5638,7 +5543,7 @@ module.exports = function ($$$config) { current, workInProgress, props, - elementType, + init, renderLanes ) ); @@ -5647,8 +5552,8 @@ module.exports = function ($$$config) { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); var nextProps = workInProgress.pendingProps; - elementType = workInProgress.memoizedState; - props = elementType.element; + init = workInProgress.memoizedState; + props = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; @@ -5657,7 +5562,7 @@ module.exports = function ($$$config) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); - nextProps !== elementType.cache && + nextProps !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -5666,15 +5571,15 @@ module.exports = function ($$$config) { ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; - if (supportsHydration && elementType.isDehydrated) + if (supportsHydration && init.isDehydrated) if ( - ((elementType = { + ((init = { element: nextProps, isDehydrated: !1, cache: nextState.cache }), - (workInProgress.updateQueue.baseState = elementType), - (workInProgress.memoizedState = elementType), + (workInProgress.updateQueue.baseState = init), + (workInProgress.memoizedState = init), workInProgress.flags & 256) ) { workInProgress = mountHostRootWithoutHydrating( @@ -5799,7 +5704,7 @@ module.exports = function ($$$config) { workInProgress.pendingProps, contextStackCursor.current ); - if ((elementType = props = nextHydratableInstance)) + if ((init = props = nextHydratableInstance)) (props = canHydrateInstance( props, workInProgress.type, @@ -5811,22 +5716,22 @@ module.exports = function ($$$config) { (hydrationParentFiber = workInProgress), (nextHydratableInstance = getFirstHydratableChild(props)), (rootOrSingletonContext = !1), - (elementType = !0)) - : (elementType = !1); - elementType || throwOnHydrationMismatch(workInProgress); + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - elementType = workInProgress.type; + init = workInProgress.type; nextProps = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; props = nextProps.children; - shouldSetTextContent(elementType, nextProps) + shouldSetTextContent(init, nextProps) ? (props = null) : null !== nextState && - shouldSetTextContent(elementType, nextState) && + shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); null !== workInProgress.memoizedState && - ((elementType = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -5835,8 +5740,8 @@ module.exports = function ($$$config) { renderLanes )), isPrimaryRenderer - ? (HostTransitionContext._currentValue = elementType) - : (HostTransitionContext._currentValue2 = elementType)); + ? (HostTransitionContext._currentValue = init) + : (HostTransitionContext._currentValue2 = init)); markRef(current, workInProgress); reconcileChildren(current, workInProgress, props, renderLanes); return workInProgress.child; @@ -5883,19 +5788,13 @@ module.exports = function ($$$config) { case 11: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - updateForwardRef( - current, - workInProgress, - props, - elementType, - renderLanes - ) + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + updateForwardRef(current, workInProgress, props, init, renderLanes) ); case 7: return ( @@ -5947,13 +5846,13 @@ module.exports = function ($$$config) { ); case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress), - (elementType = readContext(elementType)), - (props = props(elementType)), + (init = readContext(init)), + (props = props(init)), (workInProgress.flags |= 1), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child @@ -5961,20 +5860,14 @@ module.exports = function ($$$config) { case 14: return ( (props = workInProgress.type), - (elementType = workInProgress.pendingProps), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props, elementType)), - (elementType = disableDefaultPropsExceptForClasses - ? elementType - : resolveDefaultPropsOnNonClassComponent(props.type, elementType)), - updateMemoComponent( - current, - workInProgress, - props, - elementType, - renderLanes - ) + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) ); case 15: return updateSimpleMemoComponent( @@ -5984,47 +5877,6 @@ module.exports = function ($$$config) { workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - isContextProvider(props) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1); - prepareToReadContext(workInProgress); - constructClassInstance(workInProgress, props, elementType); - mountClassInstance(workInProgress, props, elementType, renderLanes); - return finishClassComponent( - null, - workInProgress, - props, - !0, - current, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - props = workInProgress.type; - elementType = resolveClassComponentProps( - props, - workInProgress.pendingProps, - workInProgress.elementType === props - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - props, - elementType, - renderLanes - ); case 19: return updateSuspenseListComponent( current, @@ -6051,38 +5903,34 @@ module.exports = function ($$$config) { prepareToReadContext(workInProgress), (props = readContext(CacheContext)), null === current - ? ((elementType = peekCacheFromPool()), - null === elementType && - ((elementType = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (elementType.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && - (elementType.pooledCacheLanes |= renderLanes), - (elementType = nextProps)), - (workInProgress.memoizedState = { - parent: props, - cache: elementType - }), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, elementType)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (elementType = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - elementType.parent !== props - ? ((elementType = { parent: props, cache: props }), - (workInProgress.memoizedState = elementType), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - elementType), + init), pushProvider(workInProgress, CacheContext, props)) : ((props = nextProps.cache), pushProvider(workInProgress, CacheContext, props), - props !== elementType.cache && + props !== init.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -6559,44 +6407,44 @@ module.exports = function ($$$config) { needsVisibilityToggle = needsVisibilityToggle.sibling; } else if (supportsPersistence) - for (var node$111 = workInProgress.child; null !== node$111; ) { - if (5 === node$111.tag) { - var instance = node$111.stateNode; + for (var node$103 = workInProgress.child; null !== node$103; ) { + if (5 === node$103.tag) { + var instance = node$103.stateNode; needsVisibilityToggle && isHidden && (instance = cloneHiddenInstance( instance, - node$111.type, - node$111.memoizedProps + node$103.type, + node$103.memoizedProps )); appendInitialChild(parent, instance); - } else if (6 === node$111.tag) - (instance = node$111.stateNode), + } else if (6 === node$103.tag) + (instance = node$103.stateNode), needsVisibilityToggle && isHidden && (instance = cloneHiddenTextInstance( instance, - node$111.memoizedProps + node$103.memoizedProps )), appendInitialChild(parent, instance); - else if (4 !== node$111.tag) - if (22 === node$111.tag && null !== node$111.memoizedState) - (instance = node$111.child), - null !== instance && (instance.return = node$111), - appendAllChildren(parent, node$111, !0, !0); - else if (null !== node$111.child) { - node$111.child.return = node$111; - node$111 = node$111.child; + else if (4 !== node$103.tag) + if (22 === node$103.tag && null !== node$103.memoizedState) + (instance = node$103.child), + null !== instance && (instance.return = node$103), + appendAllChildren(parent, node$103, !0, !0); + else if (null !== node$103.child) { + node$103.child.return = node$103; + node$103 = node$103.child; continue; } - if (node$111 === workInProgress) break; - for (; null === node$111.sibling; ) { - if (null === node$111.return || node$111.return === workInProgress) + if (node$103 === workInProgress) break; + for (; null === node$103.sibling; ) { + if (null === node$103.return || node$103.return === workInProgress) return; - node$111 = node$111.return; + node$103 = node$103.return; } - node$111.sibling.return = node$111.return; - node$111 = node$111.sibling; + node$103.sibling.return = node$103.return; + node$103 = node$103.sibling; } } function appendAllChildrenToContainer( @@ -6669,31 +6517,31 @@ module.exports = function ($$$config) { current.memoizedProps !== newProps && markUpdate(workInProgress); else if (supportsPersistence) { var currentInstance = current.stateNode, - oldProps$114 = current.memoizedProps; + oldProps$106 = current.memoizedProps; if ( (current = doesRequireClone(current, workInProgress)) || - oldProps$114 !== newProps + oldProps$106 !== newProps ) { var currentHostContext = contextStackCursor.current; - oldProps$114 = cloneInstance( + oldProps$106 = cloneInstance( currentInstance, type, - oldProps$114, + oldProps$106, newProps, !current, null ); - oldProps$114 === currentInstance + oldProps$106 === currentInstance ? (workInProgress.stateNode = currentInstance) : (finalizeInitialChildren( - oldProps$114, + oldProps$106, type, newProps, currentHostContext ) && markUpdate(workInProgress), - (workInProgress.stateNode = oldProps$114), + (workInProgress.stateNode = oldProps$106), current - ? appendAllChildren(oldProps$114, workInProgress, !1, !1) + ? appendAllChildren(oldProps$106, workInProgress, !1, !1) : markUpdate(workInProgress)); } else workInProgress.stateNode = currentInstance; } @@ -6744,15 +6592,15 @@ module.exports = function ($$$config) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$116 = null; null !== lastTailNode; ) + for (var lastTailNode$108 = null; null !== lastTailNode; ) null !== lastTailNode.alternate && - (lastTailNode$116 = lastTailNode), + (lastTailNode$108 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$116 + null === lastTailNode$108 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$116.sibling = null); + : (lastTailNode$108.sibling = null); } } function bubbleProperties(completedWork) { @@ -6762,19 +6610,19 @@ module.exports = function ($$$config) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$117 = completedWork.child; null !== child$117; ) - (newChildLanes |= child$117.lanes | child$117.childLanes), - (subtreeFlags |= child$117.subtreeFlags & 31457280), - (subtreeFlags |= child$117.flags & 31457280), - (child$117.return = completedWork), - (child$117 = child$117.sibling); + for (var child$109 = completedWork.child; null !== child$109; ) + (newChildLanes |= child$109.lanes | child$109.childLanes), + (subtreeFlags |= child$109.subtreeFlags & 31457280), + (subtreeFlags |= child$109.flags & 31457280), + (child$109.return = completedWork), + (child$109 = child$109.sibling); else - for (child$117 = completedWork.child; null !== child$117; ) - (newChildLanes |= child$117.lanes | child$117.childLanes), - (subtreeFlags |= child$117.subtreeFlags), - (subtreeFlags |= child$117.flags), - (child$117.return = completedWork), - (child$117 = child$117.sibling); + for (child$109 = completedWork.child; null !== child$109; ) + (newChildLanes |= child$109.lanes | child$109.childLanes), + (subtreeFlags |= child$109.subtreeFlags), + (subtreeFlags |= child$109.flags), + (child$109.return = completedWork), + (child$109 = child$109.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6783,8 +6631,6 @@ module.exports = function ($$$config) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -6797,7 +6643,8 @@ module.exports = function ($$$config) { return bubbleProperties(workInProgress), null; case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor$1)), bubbleProperties(workInProgress), null ); @@ -7055,11 +6902,11 @@ module.exports = function ($$$config) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (nextResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$130 = null; + var cache$122 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$130 = newProps.memoizedState.cachePool.pool); - cache$130 !== nextResource && (newProps.flags |= 2048); + (cache$122 = newProps.memoizedState.cachePool.pool); + cache$122 !== nextResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7089,19 +6936,14 @@ module.exports = function ($$$config) { bubbleProperties(workInProgress), null ); - case 17: - if (disableLegacyMode) break; - isContextProvider(workInProgress.type) && popContext(); - bubbleProperties(workInProgress); - return null; case 19: pop(suspenseStackCursor); nextResource = workInProgress.memoizedState; if (null === nextResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$130 = nextResource.rendering; - if (null === cache$130) + cache$122 = nextResource.rendering; + if (null === cache$122) if (newProps) cutOffTailIfNeeded(nextResource, !1); else { if ( @@ -7109,11 +6951,11 @@ module.exports = function ($$$config) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$130 = findFirstSuspended(current); - if (null !== cache$130) { + cache$122 = findFirstSuspended(current); + if (null !== cache$122) { workInProgress.flags |= 128; cutOffTailIfNeeded(nextResource, !1); - current = cache$130.updateQueue; + current = cache$122.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7142,7 +6984,7 @@ module.exports = function ($$$config) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$130)), null !== current)) { + if (((current = findFirstSuspended(cache$122)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7152,7 +6994,7 @@ module.exports = function ($$$config) { cutOffTailIfNeeded(nextResource, !0), null === nextResource.tail && "hidden" === nextResource.tailMode && - !cache$130.alternate && + !cache$122.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7165,13 +7007,13 @@ module.exports = function ($$$config) { cutOffTailIfNeeded(nextResource, !1), (workInProgress.lanes = 4194304)); nextResource.isBackwards - ? ((cache$130.sibling = workInProgress.child), - (workInProgress.child = cache$130)) + ? ((cache$122.sibling = workInProgress.child), + (workInProgress.child = cache$122)) : ((current = nextResource.last), null !== current - ? (current.sibling = cache$130) - : (workInProgress.child = cache$130), - (nextResource.last = cache$130)); + ? (current.sibling = cache$122) + : (workInProgress.child = cache$122), + (nextResource.last = cache$122)); } if (null !== nextResource.tail) return ( @@ -7215,14 +7057,14 @@ module.exports = function ($$$config) { ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || (!disableLegacyMode && 0 === (workInProgress.mode & 1)) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & 536870912) && + newProps + ? 0 !== (renderLanes & 536870912) && 0 === (workInProgress.flags & 128) && (bubbleProperties(workInProgress), 23 !== workInProgress.tag && workInProgress.subtreeFlags & 6 && - (workInProgress.flags |= 8192)), + (workInProgress.flags |= 8192)) + : bubbleProperties(workInProgress), (renderLanes = workInProgress.updateQueue), null !== renderLanes && scheduleRetryEffect(workInProgress, renderLanes.retryQueue), @@ -7258,8 +7100,6 @@ module.exports = function ($$$config) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -7268,7 +7108,8 @@ module.exports = function ($$$config) { switch (workInProgress.tag) { case 1: return ( - isContextProvider(workInProgress.type) && popContext(), + isContextProvider(workInProgress.type) && + (pop(didPerformWorkStackCursor), pop(contextStackCursor$1)), (current = workInProgress.flags), current & 65536 ? ((workInProgress.flags = (current & -65537) | 128), @@ -7351,7 +7192,9 @@ module.exports = function ($$$config) { switch (interruptedWork.tag) { case 1: current = interruptedWork.type.childContextTypes; - null !== current && void 0 !== current && popContext(); + null !== current && + void 0 !== current && + (pop(didPerformWorkStackCursor), pop(contextStackCursor$1)); break; case 3: popProvider(CacheContext); @@ -7527,8 +7370,8 @@ module.exports = function ($$$config) { else if ("function" === typeof ref) try { ref(null); - } catch (error$149) { - captureCommitPhaseError(current, nearestMountedAncestor, error$149); + } catch (error$140) { + captureCommitPhaseError(current, nearestMountedAncestor, error$140); } else ref.current = null; } @@ -7798,11 +7641,11 @@ module.exports = function ($$$config) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$148) { + } catch (error$139) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$148 + error$139 ); } } @@ -7853,30 +7696,26 @@ module.exports = function ($$$config) { commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevProps = - null !== finishedWork.memoizedState || offscreenSubtreeIsHidden), - !prevProps) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + prevProps = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevProps) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevProps; + (offscreenSubtreeWasHidden = current) && + !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -8279,21 +8118,15 @@ module.exports = function ($$$config) { case 22: offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor); - disableLegacyMode || deletedFiber.mode & 1 - ? ((offscreenSubtreeWasHidden = - (prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ), - (offscreenSubtreeWasHidden = prevHostParent)) - : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + offscreenSubtreeWasHidden = + (prevHostParent = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState; + recursivelyTraverseDeletionEffects( + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); + offscreenSubtreeWasHidden = prevHostParent; break; default: recursivelyTraverseDeletionEffects( @@ -8660,17 +8493,14 @@ module.exports = function ($$$config) { safelyDetachRef(current, current.return)); suspenseCallback = null !== finishedWork.memoizedState; retryQueue = null !== current && null !== current.memoizedState; - if (disableLegacyMode || finishedWork.mode & 1) { - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = - prevOffscreenSubtreeIsHidden || suspenseCallback; - offscreenSubtreeWasHidden = - prevOffscreenSubtreeWasHidden || retryQueue; - recursivelyTraverseMutationEffects(root, finishedWork); - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - } else recursivelyTraverseMutationEffects(root, finishedWork); + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = + prevOffscreenSubtreeIsHidden || suspenseCallback; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || retryQueue; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -8686,8 +8516,7 @@ module.exports = function ($$$config) { null === current || retryQueue || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), supportsMutation && (null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode)) @@ -8818,21 +8647,21 @@ module.exports = function ($$$config) { break; } case 5: - var parent$150 = JSCompiler_inline_result.stateNode; + var parent$141 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (resetTextContent(parent$150), + (resetTextContent(parent$141), (JSCompiler_inline_result.flags &= -33)); - var before$151 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$151, parent$150); + var before$142 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$142, parent$141); break; case 3: case 4: - var parent$152 = JSCompiler_inline_result.stateNode.containerInfo, - before$153 = getHostSibling(finishedWork); + var parent$143 = JSCompiler_inline_result.stateNode.containerInfo, + before$144 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$153, - parent$152 + before$144, + parent$143 ); break; default: @@ -9226,18 +9055,10 @@ module.exports = function ($$$config) { committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((nextCache._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) : nextCache._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -9335,9 +9156,9 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$165 = finishedWork.stateNode; + var instance$156 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$165._visibility & 4 + ? instance$156._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9345,20 +9166,11 @@ module.exports = function ($$$config) { committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((instance$165._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$165._visibility |= 4), + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) + : ((instance$156._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9371,7 +9183,7 @@ module.exports = function ($$$config) { commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$165 + instance$156 ); break; case 24: @@ -9903,19 +9715,14 @@ module.exports = function ($$$config) { boundaries )); } - function resetRenderTimer() { - workInProgressRootRenderTargetTime = now() + 500; - } - function requestUpdateLane(fiber) { - fiber = fiber.mode; - return disableLegacyMode || 0 !== (fiber & 1) - ? 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes - ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes - : null !== ReactSharedInternals.T - ? ((fiber = currentEntangledLane), - 0 !== fiber ? fiber : requestTransitionLane()) - : resolveUpdatePriority() - : 2; + function requestUpdateLane() { + if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) + return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; + if (null !== ReactSharedInternals.T) { + var actionScopeLane = currentEntangledLane; + return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane(); + } + return resolveUpdatePriority(); } function requestDeferredLane() { 0 === workInProgressDeferredLane && @@ -9941,21 +9748,20 @@ module.exports = function ($$$config) { ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { - if (enableTransitionTracing) { - var transition = ReactSharedInternals.T; - if ( - null !== transition && - null != transition.name && - (-1 === transition.startTime && (transition.startTime = now()), - enableTransitionTracing) - ) { - var transitionLanesMap = root.transitionLanes, - index$11 = 31 - clz32(lane), - transitions = transitionLanesMap[index$11]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index$11] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index$11 = 31 - clz32(lane), + transitions = transitionLanesMap[index$11]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index$11] = transitions; } root === workInProgressRoot && (0 === (executionContext & 2) && @@ -9968,12 +9774,6 @@ module.exports = function ($$$config) { workInProgressRootDidSkipSuspendedSiblings )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - (resetRenderTimer(), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { @@ -10004,10 +9804,7 @@ module.exports = function ($$$config) { renderWasConcurrent = !1; continue; } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { + if (2 === exitStatus) { renderWasConcurrent = lanes; if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) var JSCompiler_inline_result = 0; @@ -10452,8 +10249,8 @@ module.exports = function ($$$config) { } workLoopSync(); break; - } catch (thrownValue$176) { - handleThrow(root, thrownValue$176); + } catch (thrownValue$167) { + handleThrow(root, thrownValue$167); } while (1); lanes && root.shellSuspendCounter++; @@ -10477,7 +10274,7 @@ module.exports = function ($$$config) { prevAsyncDispatcher = pushAsyncDispatcher(); workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), - resetRenderTimer(), + (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) : workInProgressRootIsPrerendering && (workInProgressRootIsPrerendering = @@ -10574,8 +10371,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$178) { - handleThrow(root, thrownValue$178); + } catch (thrownValue$169) { + handleThrow(root, thrownValue$169); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -10895,9 +10692,7 @@ module.exports = function ($$$config) { renderPriorityLevel(remainingLanes.value, { componentStack: remainingLanes.stack }); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -11082,10 +10877,7 @@ module.exports = function ($$$config) { ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || 0 !== (retryLane & 1) ? claimNextRetryLane() : 2)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -11306,12 +11098,10 @@ module.exports = function ($$$config) { ); case REACT_STRICT_MODE_TYPE: fiberTag = 8; - mode |= 8; - if (disableLegacyMode || 0 !== (mode & 1)) - (mode |= 16), - enableDO_NOT_USE_disableStrictPassiveEffect && - pendingProps.DO_NOT_USE_disableStrictPassiveEffect && - (mode |= 64); + mode |= 24; + enableDO_NOT_USE_disableStrictPassiveEffect && + pendingProps.DO_NOT_USE_disableStrictPassiveEffect && + (mode |= 64); break; case REACT_PROFILER_TYPE: return ( @@ -11488,7 +11278,7 @@ module.exports = function ($$$config) { onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -11562,20 +11352,19 @@ module.exports = function ($$$config) { containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), !0 === isStrictMode && (tag |= 24)) - : (tag = 0); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; - tag = createCache(); - tag.refCount++; - containerInfo.pooledCache = tag; - tag.refCount++; + hydrationCallbacks = createCache(); + hydrationCallbacks.refCount++; + containerInfo.pooledCache = hydrationCallbacks; + hydrationCallbacks.refCount++; isStrictMode.memoizedState = { element: initialChildren, isDehydrated: hydrate, - cache: tag + cache: hydrationCallbacks }; initializeUpdateQueue(isStrictMode); return containerInfo; @@ -11697,7 +11486,6 @@ module.exports = function ($$$config) { retryLaneExpirationMs = dynamicFeatureFlags.retryLaneExpirationMs, syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs, transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = renameElementSymbol ? Symbol.for("react.transitional.element") @@ -12293,7 +12081,7 @@ module.exports = function ($$$config) { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.payload = payload; void 0 !== callback && @@ -12306,7 +12094,7 @@ module.exports = function ($$$config) { }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 1; update.payload = payload; @@ -12320,7 +12108,7 @@ module.exports = function ($$$config) { }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var lane = requestUpdateLane(inst), + var lane = requestUpdateLane(), update = createUpdate(lane); update.tag = 2; void 0 !== callback && @@ -12491,7 +12279,7 @@ module.exports = function ($$$config) { }; exports.attemptHydrationAtCurrentPriority = function (fiber) { if (13 === fiber.tag) { - var lane = requestUpdateLane(fiber), + var lane = requestUpdateLane(), root = enqueueConcurrentRenderForLane(fiber, lane); null !== root && scheduleUpdateOnFiber(root, fiber, lane); markRetryLaneIfNotHydrated(fiber, lane); @@ -12512,7 +12300,8 @@ module.exports = function ($$$config) { } ensureRootIsScheduled(fiber); 0 === (executionContext & 6) && - (resetRenderTimer(), flushSyncWorkAcrossRoots_impl(0, !1)); + ((workInProgressRootRenderTargetTime = now() + 500), + flushSyncWorkAcrossRoots_impl(0, !1)); } } break; @@ -12524,17 +12313,7 @@ module.exports = function ($$$config) { } }; exports.batchedUpdates = function (fn, a) { - if (disableLegacyMode) return fn(a); - var prevExecutionContext = executionContext; - executionContext |= 1; - try { - return fn(a); - } finally { - (executionContext = prevExecutionContext), - 0 === executionContext && - (resetRenderTimer(), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(0, !0)); - } + return fn(a); }; exports.createComponentSelector = function (component) { return { $$typeof: COMPONENT_TYPE, value: component }; @@ -12600,7 +12379,7 @@ module.exports = function ($$$config) { ); initialChildren.context = getContextForSubtree(null); containerInfo = initialChildren.current; - tag = requestUpdateLane(containerInfo); + tag = requestUpdateLane(); hydrationCallbacks = createUpdate(tag); hydrationCallbacks.callback = void 0 !== callback && null !== callback ? callback : null; @@ -12663,7 +12442,8 @@ module.exports = function ($$$config) { } finally { setCurrentUpdatePriority(previousPriority), (ReactSharedInternals.T = prevTransition), - 0 === executionContext && resetRenderTimer(); + 0 === executionContext && + (workInProgressRootRenderTargetTime = now() + 500); } }; exports.findAllNodes = findAllNodes; @@ -12745,11 +12525,6 @@ module.exports = function ($$$config) { }; exports.flushPassiveEffects = flushPassiveEffects; exports.flushSyncFromReconciler = function (fn) { - null === rootWithPendingPassiveEffects || - disableLegacyMode || - 0 !== rootWithPendingPassiveEffects.tag || - 0 !== (executionContext & 6) || - flushPassiveEffects(); var prevExecutionContext = executionContext; executionContext |= 1; var prevTransition = ReactSharedInternals.T, @@ -12841,7 +12616,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); @@ -12908,7 +12683,7 @@ module.exports = function ($$$config) { formFiber, resetStateQueue, {}, - requestUpdateLane(formFiber) + requestUpdateLane() ); return action(formData); } @@ -12921,7 +12696,7 @@ module.exports = function ($$$config) { callback ) { var current = container.current, - lane = requestUpdateLane(current); + lane = requestUpdateLane(); updateContainerImpl( current, lane, diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index 062c2440b46c8..459a56a8f5006 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -12335,7 +12335,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index fc0e5bd72fd79..fed1310e112c6 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -14921,11 +14921,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-e1378902-20241106", + version: "19.0.0-www-classic-682a103c-20241107", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-e1378902-20241106" + reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15060,5 +15060,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-classic-e1378902-20241106"; + exports.version = "19.0.0-www-classic-682a103c-20241107"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index a30b4853cfc18..ea059607e1549 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -14921,11 +14921,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-e1378902-20241106", + version: "19.0.0-www-modern-682a103c-20241107", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-e1378902-20241106" + reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15060,5 +15060,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-modern-e1378902-20241106"; + exports.version = "19.0.0-www-modern-682a103c-20241107"; })(); diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index 96e0d5ff0f197..b7669378fd96d 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.0.0-www-classic-e1378902-20241106 \ No newline at end of file +19.0.0-www-classic-682a103c-20241107 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 0602aae65b1b3..9b7a3421479ff 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.0.0-www-modern-e1378902-20241106 \ No newline at end of file +19.0.0-www-modern-682a103c-20241107 \ No newline at end of file