diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js index 3dbf7d00e9..0e1df93ff8 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js @@ -418,9 +418,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -809,10 +806,9 @@ __DEV__ && enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, disableDefaultPropsExceptForClasses = - dynamicFeatureFlags.disableDefaultPropsExceptForClasses, - enableFastJSX = dynamicFeatureFlags.enableFastJSX, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, - REACT_ELEMENT_TYPE = Symbol.for("react.element"), + dynamicFeatureFlags.disableDefaultPropsExceptForClasses; + dynamicFeatureFlags = dynamicFeatureFlags.enableFastJSX; + var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -857,7 +853,7 @@ __DEV__ && specialPropKeyWarningShown; var didWarnAboutStringRefs = {}; var didWarnAboutElementRef = {}; - var enableFastJSXWithStringRefs = enableFastJSX && !0, + var enableFastJSXWithStringRefs = dynamicFeatureFlags && !0, enableFastJSXWithoutStringRefs = enableFastJSXWithStringRefs && !1, didWarnAboutKeySpread = {}, ownerHasKeyUseWarning = {}; diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 470ae8a768..bbeb715bdd 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -50e89ec9f2d44ab140e771e585226f7771da9652 +fb9a90fa480efce40ac2a845478817467f965ddc diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 470ae8a768..bbeb715bdd 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -50e89ec9f2d44ab140e771e585226f7771da9652 +fb9a90fa480efce40ac2a845478817467f965ddc diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index fd50556914..d134e2011e 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -504,9 +504,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -1199,7 +1196,6 @@ __DEV__ && disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableFastJSX = dynamicFeatureFlags.enableFastJSX, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -1398,36 +1394,20 @@ __DEV__ && exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; 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) @@ -1987,7 +1967,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-classic-50e89ec9f2-20240612"; + exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; "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 4d19bd5188..6d5ce566fb 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1967,7 +1967,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-modern-50e89ec9f2-20240612"; + exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; "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 579444788e..ed7dc05579 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 701bb4c06e..c86ca91d58 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 94244eeba5..d1501d70ce 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; "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 d015026022..eed445b0fa 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; "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 2d810a0e2c..72de793238 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -311,9 +311,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -2199,10 +2196,6 @@ __DEV__ && scheduleImmediateTask(processRootScheduleInMicrotask)); enableDeferRootSchedulingToMicrotask || scheduleTaskForRootDuringMicrotask(root, now$1()); - !disableLegacyMode && - ReactSharedInternals.isBatchingLegacy && - 0 === root.tag && - (ReactSharedInternals.didScheduleLegacyUpdate = !0); } function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (!isFlushingWork && mightHavePendingSyncWork) { @@ -2210,7 +2203,7 @@ __DEV__ && do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) { + if (!onlyLegacy) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( @@ -3842,15 +3835,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; @@ -4132,9 +4117,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." ); @@ -5603,124 +5587,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, @@ -5747,192 +5613,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.propTypes && - error$jscomp$0( - "propTypes was defined as an instance property on %s. Use a static property to define propTypes 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 - )); - "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, @@ -6072,110 +5752,73 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + enableLazyContextPropagation && + ((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(SyncLane)), - (returnFiber.tag = ForceUpdate), - enqueueUpdate(sourceFiber, returnFiber, SyncLane)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= SyncLane)); - 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 } @@ -6183,8 +5826,8 @@ __DEV__ && sourceFiber ); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) - : workInProgressRootConcurrentErrors.push(currentSourceFiber); + ? (workInProgressRootConcurrentErrors = [error]) + : workInProgressRootConcurrentErrors.push(error); workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored); if (null === returnFiber) return !0; @@ -6207,16 +5850,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), @@ -6565,37 +6205,30 @@ __DEV__ && renderLanes ); } - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - if (0 !== (renderLanes & OffscreenLane)) - (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 = - OffscreenLane), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & OffscreenLane)) (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 = OffscreenLane), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -6753,7 +6386,7 @@ __DEV__ && return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -6792,214 +6425,570 @@ __DEV__ && ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); prepareToReadContext(workInProgress, renderLanes); - 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$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, - 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), - 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 { + (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; - cloneUpdateQueue(current, workInProgress); + 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.propTypes && + error$jscomp$0( + "propTypes was defined as an instance property on %s. Use a static property to define propTypes 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 + )); + "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), + (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, + 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, + 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), + 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$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 || (enableLazyContextPropagation && - 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 ) || (enableLazyContextPropagation && - 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 && @@ -7009,76 +6998,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; @@ -7179,18 +7099,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) @@ -7242,11 +7162,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, @@ -7259,13 +7177,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)), @@ -7400,22 +7317,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), - (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, @@ -7453,33 +7360,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 - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, - markerInstances: didSuspend, - retryQueue: null - }) - : currentFallbackChildFragment === primaryChildProps - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, - markerInstances: didSuspend, - retryQueue: - null !== primaryChildProps - ? primaryChildProps.retryQueue - : null - }) - : ((currentFallbackChildFragment.transitions = showFallback), - (currentFallbackChildFragment.markerInstances = didSuspend)))); + 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 !== currentOffscreenQueue + ? currentOffscreenQueue.retryQueue + : null + }) + : ((currentFallbackChildFragment.transitions = showFallback), + (currentFallbackChildFragment.markerInstances = didSuspend)); + } nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7489,33 +7399,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); @@ -7526,37 +7431,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), - (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, @@ -7735,69 +7629,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, @@ -8032,10 +7916,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) ) @@ -8428,52 +8310,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, renderLanes); - 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, @@ -9173,8 +9009,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: @@ -9430,11 +9264,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; @@ -9562,14 +9391,14 @@ __DEV__ && ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || (!disableLegacyMode && 0 === (workInProgress.mode & 1)) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & OffscreenLane) && + newProps + ? 0 !== (renderLanes & OffscreenLane) && 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), @@ -9605,8 +9434,6 @@ __DEV__ && bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error( "Unknown unit of work tag (" + @@ -9766,30 +9593,20 @@ __DEV__ && (executionContext & CommitContext) !== NoContext ); } - function safelyCallComponentWillUnmount( - current, - nearestMountedAncestor, - instance - ) { - try { - if ( - ((instance.props = resolveClassComponentProps( - current.type, - current.memoizedProps, - current.elementType === current.type - )), - (instance.state = current.memoizedState), - shouldProfile(current)) - ) - try { - startLayoutEffectTimer(), instance.componentWillUnmount(); - } finally { - recordLayoutEffectDuration(current); - } - else instance.componentWillUnmount(); - } catch (error$7) { - captureCommitPhaseError(current, nearestMountedAncestor, error$7); - } + function callComponentWillUnmountWithTimer(current, instance) { + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); + instance.state = current.memoizedState; + if (shouldProfile(current)) + try { + startLayoutEffectTimer(), instance.componentWillUnmount(); + } finally { + recordLayoutEffectDuration(current); + } + else instance.componentWillUnmount(); } function safelyAttachRef(current, nearestMountedAncestor) { try { @@ -10399,40 +10216,30 @@ __DEV__ && ); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevState = - null !== finishedWork.memoizedState || - offscreenSubtreeIsHidden), - !prevState) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevState; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects( - finishedRoot, - finishedWork, - committedLanes - ); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else - recursivelyTraverseLayoutEffects( - finishedRoot, - finishedWork, - committedLanes - ); + prevState = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevState) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevState; + (offscreenSubtreeWasHidden = current) && + !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects( + finishedRoot, + finishedWork, + committedLanes + ); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -10838,15 +10645,21 @@ __DEV__ && ); break; case 1: - offscreenSubtreeWasHidden || + if ( + !offscreenSubtreeWasHidden && (safelyDetachRef(deletedFiber, nearestMountedAncestor), (_prevHostParent = deletedFiber.stateNode), - "function" === typeof _prevHostParent.componentWillUnmount && - safelyCallComponentWillUnmount( + "function" === typeof _prevHostParent.componentWillUnmount) + ) + try { + callComponentWillUnmountWithTimer(deletedFiber, _prevHostParent); + } catch (error$7) { + captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - _prevHostParent - )); + error$7 + ); + } recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -10863,21 +10676,15 @@ __DEV__ && break; case 22: 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( @@ -11186,17 +10993,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, lanes); - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - } else recursivelyTraverseMutationEffects(root, finishedWork, lanes); + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = + prevOffscreenSubtreeIsHidden || suspenseCallback; + offscreenSubtreeWasHidden = + prevOffscreenSubtreeWasHidden || retryQueue; + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -11212,8 +11017,7 @@ __DEV__ && null === current || retryQueue || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -11389,12 +11193,18 @@ __DEV__ && case 1: safelyDetachRef(finishedWork, finishedWork.return); var instance = finishedWork.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount( - finishedWork, - finishedWork.return, - instance - ); + if ("function" === typeof instance.componentWillUnmount) { + var nearestMountedAncestor = finishedWork.return; + try { + callComponentWillUnmountWithTimer(finishedWork, instance); + } catch (error$7) { + captureCommitPhaseError( + finishedWork, + nearestMountedAncestor, + error$7 + ); + } + } recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 26: @@ -11766,20 +11576,12 @@ __DEV__ && committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) : nextCache._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11902,21 +11704,12 @@ __DEV__ && committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((_instance4._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) : ((_instance4._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, @@ -12307,76 +12100,6 @@ __DEV__ && ))); } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListMount(Layout | HasEffect, fiber); - } catch (error$37) { - captureCommitPhaseError(fiber, fiber.return, error$37); - } - break; - case 1: - var instance = fiber.stateNode; - if ("function" === typeof instance.componentDidMount) - try { - instance.componentDidMount(); - } catch (error$38) { - captureCommitPhaseError(fiber, fiber.return, error$38); - } - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListMount(Passive | HasEffect, fiber); - } catch (error$39) { - captureCommitPhaseError(fiber, fiber.return, error$39); - } - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListUnmount( - Layout | HasEffect, - fiber, - fiber.return - ); - } catch (error$40) { - captureCommitPhaseError(fiber, fiber.return, error$40); - } - 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: - try { - commitHookEffectListUnmount( - Passive | HasEffect, - fiber, - fiber.return - ); - } catch (error$41) { - captureCommitPhaseError(fiber, fiber.return, error$41); - } - } - } function isConcurrentActEnvironment() { var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT @@ -12454,17 +12177,15 @@ __DEV__ && )); } function requestUpdateLane(fiber) { - var mode = fiber.mode; - if (!disableLegacyMode && 0 === (mode & 1)) return SyncLane; 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; @@ -12509,10 +12230,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 )); @@ -12527,21 +12248,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 && @@ -12553,13 +12273,6 @@ __DEV__ && workInProgressDeferredLane )); ensureRootIsScheduled(root); - lane !== SyncLane || - executionContext !== NoContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ReactSharedInternals.isBatchingLegacy || - ((workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(!0)); } } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -12772,7 +12485,7 @@ __DEV__ && check = check.value; try { if (!objectIs(getSnapshot(), check)) return !1; - } catch (error$42) { + } catch (error$37) { return !1; } } @@ -12828,7 +12541,7 @@ __DEV__ && currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync(root, lanes); - if ((disableLegacyMode || 0 !== root.tag) && exitStatus === RootErrored) { + if (exitStatus === RootErrored) { var originallyAttemptedLanes = lanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( root, @@ -13075,8 +12788,8 @@ __DEV__ && } workLoopSync(); break; - } catch (thrownValue$43) { - handleThrow(root, thrownValue$43); + } catch (thrownValue$38) { + handleThrow(root, thrownValue$38); } while (1); lanes && root.shellSuspendCounter++; @@ -13218,8 +12931,8 @@ __DEV__ && ? workLoopSync() : workLoopConcurrent(); break; - } catch (thrownValue$44) { - handleThrow(root, thrownValue$44); + } catch (thrownValue$39) { + handleThrow(root, thrownValue$39); } while (1); resetContextDependencies(); @@ -13363,9 +13076,9 @@ __DEV__ && workInProgress = null; return; } - } catch (error$45) { + } catch (error$40) { if (null !== returnFiber) - throw ((workInProgress = returnFiber), error$45); + throw ((workInProgress = returnFiber), error$40); workInProgressRootExitStatus = RootFatalErrored; logUncaughtError( root, @@ -13583,7 +13296,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); @@ -13601,8 +13314,7 @@ __DEV__ && remainingLanes.value, transitions ); - 0 === (pendingPassiveEffectsLanes & (SyncLane | SyncHydrationLane)) || - (!disableLegacyMode && 0 === root.tag) || + 0 !== (pendingPassiveEffectsLanes & (SyncLane | SyncHydrationLane)) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && @@ -13711,7 +13423,7 @@ __DEV__ && "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped && injectedProfilingHooks.markPassiveEffectsStopped(); - commitDoubleInvokeEffectsInDEV(root, !0); + commitDoubleInvokeEffectsInDEV(root); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(!1); if (enableTransitionTracing) { @@ -13849,8 +13561,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" @@ -13868,12 +13579,7 @@ __DEV__ && ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || 0 !== (retryLane & 1) - ? claimNextRetryLane() - : SyncLane)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -13984,52 +13690,17 @@ __DEV__ && reconnectPassiveEffects(root, fiber, 0, null, !1); 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 || @@ -14065,18 +13736,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; @@ -14437,12 +14104,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 ( @@ -14667,7 +14332,7 @@ __DEV__ && onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -14707,30 +14372,16 @@ __DEV__ && for ( this.transitionCallbacks = null, containerInfo = this.transitionLanes = [], - identifierPrefix = 0; - identifierPrefix < TotalLanes; - identifierPrefix++ + tag = 0; + tag < TotalLanes; + tag++ ) containerInfo.push(null); this.passiveEffectDuration = this.effectDuration = 0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; - for ( - identifierPrefix = 0; - identifierPrefix < TotalLanes; - 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; tag < TotalLanes; tag++) containerInfo.push(new Set()); + this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; } function updateContainerSync( element, @@ -14880,7 +14531,6 @@ __DEV__ && dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableNoCloningMemoCache = dynamicFeatureFlags.enableNoCloningMemoCache, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -16819,10 +16469,9 @@ __DEV__ && +_this$props.height, this._tagRef ); - var tag = disableLegacyMode ? 1 : 0; _this$props = new FiberRootNode( this._surface, - tag, + 1, !1, "", void 0, @@ -16832,21 +16481,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(); @@ -16934,14 +16583,14 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }); })({ findFiberByHostInstance: function () { return null; }, bundleType: 1, - version: "19.0.0-www-classic-50e89ec9f2-20240612", + version: "19.0.0-www-classic-fb9a90fa48-20240614", rendererPackageName: "react-art" }); var ClippingRectangle = TYPES.CLIPPING_RECTANGLE, diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 40cd87a673..cc32526a5c 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -16364,14 +16364,14 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }); })({ findFiberByHostInstance: function () { return null; }, bundleType: 1, - version: "19.0.0-www-modern-50e89ec9f2-20240612", + version: "19.0.0-www-modern-fb9a90fa48-20240614", rendererPackageName: "react-art" }); var ClippingRectangle = TYPES.CLIPPING_RECTANGLE, diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 53bfb061f4..1a0e7980a3 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -84,7 +84,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"), disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableNoCloningMemoCache = dynamicFeatureFlags.enableNoCloningMemoCache, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -222,9 +221,6 @@ function getComponentNameFromFiber(fiber) { return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -1050,10 +1046,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)); @@ -1257,7 +1249,7 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) { + if (!onlyLegacy) { var workInProgressRootRenderLanes$13 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$13 = getNextLanes( root, @@ -2466,15 +2458,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; @@ -3432,7 +3416,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 && @@ -3450,7 +3434,7 @@ function refreshCache(fiber, seedKey, seedValue) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -3467,7 +3451,7 @@ function dispatchReducerAction(fiber, queue, action) { entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber), + var lane = requestUpdateLane(), update = { lane: lane, revertLane: 0, @@ -3863,7 +3847,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); @@ -3874,7 +3858,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; @@ -3886,7 +3870,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); @@ -3912,33 +3896,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, @@ -3953,41 +3910,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, @@ -4126,106 +4048,69 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + enableLazyContextPropagation && + ((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); @@ -4243,15 +4128,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), @@ -4568,36 +4451,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; @@ -4723,7 +4598,7 @@ function replayFunctionComponent( return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -4734,47 +4609,123 @@ function updateClassComponent( pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress, renderLanes); - 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( - 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) + 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), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (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, + 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$jscomp$0) { + 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), + (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 || @@ -4789,49 +4740,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; - cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + unmaskedContext = workInProgress.stateNode; + cloneUpdateQueue(current$jscomp$0, workInProgress); + 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)) @@ -4842,30 +4794,31 @@ 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 || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies)) ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, @@ -4874,117 +4827,106 @@ function updateClassComponent( nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, oldContext ) || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); -} -function finishClassComponent( - current$jscomp$0, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes -) { + unmaskedContext = nextProps; markRef(current$jscomp$0, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + (current = workInProgress), + (isLegacyContextConsumer = + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? null + : unmaskedContext.render()), + (workInProgress.flags |= 1), + null !== current$jscomp$0 && nextProps + ? ((workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + isLegacyContextConsumer, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current$jscomp$0 = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current$jscomp$0 = bailoutOnAlreadyFinishedWork( current$jscomp$0, workInProgress, renderLanes - ) - ); - shouldUpdate = workInProgress.stateNode; - current = workInProgress; - var nextChildren = - didCaptureError && "function" !== typeof Component.getDerivedStateFromError - ? null - : shouldUpdate.render(); - workInProgress.flags |= 1; - null !== current$jscomp$0 && didCaptureError - ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - nextChildren, - 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; @@ -5050,18 +4992,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) @@ -5107,11 +5049,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, @@ -5124,13 +5064,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)), (nextProps.childLanes = getRemainingWorkInPrimaryTree( @@ -5241,17 +5180,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, @@ -5289,31 +5223,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 - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, - markerInstances: didSuspend, - retryQueue: null - }) - : currentFallbackChildFragment === primaryChildProps - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, - markerInstances: didSuspend, - retryQueue: - null !== primaryChildProps ? primaryChildProps.retryQueue : null - }) - : ((currentFallbackChildFragment.transitions = showFallback), - (currentFallbackChildFragment.markerInstances = didSuspend)))); + 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 !== currentOffscreenQueue + ? currentOffscreenQueue.retryQueue + : null + }) + : ((currentFallbackChildFragment.transitions = showFallback), + (currentFallbackChildFragment.markerInstances = didSuspend)); + } nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -5323,32 +5260,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); @@ -5359,30 +5291,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, @@ -5460,68 +5388,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; @@ -5686,12 +5603,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) @@ -5717,10 +5633,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); @@ -5733,7 +5646,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); @@ -5756,42 +5669,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; @@ -5800,17 +5707,17 @@ function beginWork(current, workInProgress, renderLanes) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== elementType.cache && + nextCache !== init.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); 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: @@ -5818,17 +5725,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, @@ -5836,11 +5743,11 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = elementType), + (HostTransitionContext._currentValue2 = init), enableLazyContextPropagation || (didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== elementType && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, @@ -5874,19 +5781,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 ( @@ -5923,14 +5824,14 @@ function beginWork(current, workInProgress, renderLanes) { props = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - elementType = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = elementType.value; + nextCache = init.value; pushProvider(workInProgress, props, nextCache); if (!enableLazyContextPropagation && null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === elementType.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -5941,24 +5842,19 @@ function beginWork(current, workInProgress, renderLanes) { break a; } } else propagateContextChange(workInProgress, props, renderLanes); - reconcileChildren( - current, - workInProgress, - elementType.children, - renderLanes - ); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(elementType)), - (props = props(elementType)), + (init = readContext(init)), + (props = props(init)), (workInProgress.flags |= 1), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child @@ -5966,20 +5862,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( @@ -5989,47 +5879,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, renderLanes); - 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: @@ -6048,38 +5897,34 @@ function beginWork(current, workInProgress, renderLanes) { prepareToReadContext(workInProgress, renderLanes), (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 && propagateContextChange( workInProgress, CacheContext, @@ -6595,14 +6440,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$100 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$100 = lastTailNode), + for (var lastTailNode$92 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$92 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$100 + null === lastTailNode$92 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$100.sibling = null); + : (lastTailNode$92.sibling = null); } } function bubbleProperties(completedWork) { @@ -6612,19 +6457,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$101 = completedWork.child; null !== child$101; ) - (newChildLanes |= child$101.lanes | child$101.childLanes), - (subtreeFlags |= child$101.subtreeFlags & 31457280), - (subtreeFlags |= child$101.flags & 31457280), - (child$101.return = completedWork), - (child$101 = child$101.sibling); + for (var child$93 = completedWork.child; null !== child$93; ) + (newChildLanes |= child$93.lanes | child$93.childLanes), + (subtreeFlags |= child$93.subtreeFlags & 31457280), + (subtreeFlags |= child$93.flags & 31457280), + (child$93.return = completedWork), + (child$93 = child$93.sibling); else - for (child$101 = completedWork.child; null !== child$101; ) - (newChildLanes |= child$101.lanes | child$101.childLanes), - (subtreeFlags |= child$101.subtreeFlags), - (subtreeFlags |= child$101.flags), - (child$101.return = completedWork), - (child$101 = child$101.sibling); + for (child$93 = completedWork.child; null !== child$93; ) + (newChildLanes |= child$93.lanes | child$93.childLanes), + (subtreeFlags |= child$93.subtreeFlags), + (subtreeFlags |= child$93.flags), + (child$93.return = completedWork), + (child$93 = child$93.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6632,8 +6477,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: @@ -6646,7 +6489,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 ); @@ -6803,11 +6647,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$105 = null; + var cache$97 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$105 = newProps.memoizedState.cachePool.pool); - cache$105 !== instance && (newProps.flags |= 2048); + (cache$97 = newProps.memoizedState.cachePool.pool); + cache$97 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6830,18 +6674,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$105 = instance.rendering; - if (null === cache$105) + cache$97 = instance.rendering; + if (null === cache$97) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6849,11 +6688,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$105 = findFirstSuspended(current); - if (null !== cache$105) { + cache$97 = findFirstSuspended(current); + if (null !== cache$97) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$105.updateQueue; + current = cache$97.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6878,7 +6717,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$105)), null !== current)) { + if (((current = findFirstSuspended(cache$97)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6888,7 +6727,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$105.alternate) + !cache$97.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6900,13 +6739,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$105.sibling = workInProgress.child), - (workInProgress.child = cache$105)) + ? ((cache$97.sibling = workInProgress.child), + (workInProgress.child = cache$97)) : ((current = instance.last), null !== current - ? (current.sibling = cache$105) - : (workInProgress.child = cache$105), - (instance.last = cache$105)); + ? (current.sibling = cache$97) + : (workInProgress.child = cache$97), + (instance.last = cache$97)); } if (null !== instance.tail) return ( @@ -6946,14 +6785,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), @@ -6989,8 +6828,6 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -6998,7 +6835,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) @@ -7078,7 +6916,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); @@ -7180,8 +7020,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$123) { - captureCommitPhaseError(current, nearestMountedAncestor, error$123); + } catch (error$114) { + captureCommitPhaseError(current, nearestMountedAncestor, error$114); } else ref.current = null; } @@ -7385,11 +7225,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$124) { + } catch (error$115) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$124 + error$115 ); } } @@ -7429,30 +7269,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) @@ -7846,21 +7681,15 @@ function commitDeletionEffectsOnFiber( break; case 22: 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( @@ -7980,8 +7809,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$132) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$132); + } catch (error$123) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$123); } } break; @@ -8014,8 +7843,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = null !== current ? current.memoizedProps : newProps; try { flags._applyProps(flags, newProps, current); - } catch (error$135) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$135); + } catch (error$126) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$126); } } break; @@ -8051,8 +7880,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$137) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$137); + } catch (error$128) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$128); } flags = finishedWork.updateQueue; null !== flags && @@ -8066,16 +7895,14 @@ function commitMutationEffectsOnFiber(finishedWork, root) { 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; @@ -8091,8 +7918,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null === current || retryQueue || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -8192,12 +8018,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$127 = JSCompiler_inline_result.stateNode.containerInfo, - before$128 = getHostSibling(finishedWork); + var parent$118 = JSCompiler_inline_result.stateNode.containerInfo, + before$119 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$128, - parent$127 + before$119, + parent$118 ); break; default: @@ -8549,15 +8375,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, @@ -8655,9 +8473,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$147 = finishedWork.stateNode; + var instance$138 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$147._visibility & 4 + ? instance$138._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8665,20 +8483,11 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork ) - : ((instance$147._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$147._visibility |= 4), + : ((instance$138._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8691,7 +8500,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$147 + instance$138 ); break; case 24: @@ -8785,12 +8594,12 @@ function accumulateSuspenseyCommitOnFiber(fiber) { break; case 22: if (null === fiber.memoizedState) { - var current$152 = fiber.alternate; - null !== current$152 && null !== current$152.memoizedState - ? ((current$152 = suspenseyCommitFlag), + var current$143 = fiber.alternate; + null !== current$143 && null !== current$143.memoizedState + ? ((current$143 = suspenseyCommitFlag), (suspenseyCommitFlag = 16777216), recursivelyAccumulateSuspenseyCommit(fiber), - (suspenseyCommitFlag = current$152)) + (suspenseyCommitFlag = current$143)) : recursivelyAccumulateSuspenseyCommit(fiber); } break; @@ -9092,16 +8901,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 && @@ -9126,21 +8933,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) && @@ -9152,12 +8958,6 @@ function scheduleUpdateOnFiber(root, fiber, lane) { workInProgressDeferredLane )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ((workInProgressRootRenderTargetTime = now() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(!0)); } } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -9404,7 +9204,7 @@ function performSyncWorkOnRoot(root, lanes) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; var exitStatus = renderRootSync(root, lanes); - if ((disableLegacyMode || 0 !== root.tag) && 2 === exitStatus) { + if (2 === exitStatus) { var originallyAttemptedLanes = lanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( root, @@ -9600,8 +9400,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$158) { - handleThrow(root, thrownValue$158); + } catch (thrownValue$149) { + handleThrow(root, thrownValue$149); } while (1); lanes && root.shellSuspendCounter++; @@ -9710,8 +9510,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$160) { - handleThrow(root, thrownValue$160); + } catch (thrownValue$151) { + handleThrow(root, thrownValue$151); } while (1); resetContextDependencies(); @@ -9964,9 +9764,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)) || @@ -10126,10 +9924,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), @@ -10295,12 +10090,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 ( @@ -10470,7 +10263,7 @@ function FiberRootNode( onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -10617,10 +10410,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, @@ -10630,19 +10422,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(); @@ -10704,19 +10496,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1174 = { + devToolsConfig$jscomp$inline_1157 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "19.0.0-www-classic-50e89ec9f2-20240612", + version: "19.0.0-www-classic-fb9a90fa48-20240614", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1386 = { - bundleType: devToolsConfig$jscomp$inline_1174.bundleType, - version: devToolsConfig$jscomp$inline_1174.version, - rendererPackageName: devToolsConfig$jscomp$inline_1174.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1174.rendererConfig, +var internals$jscomp$inline_1399 = { + bundleType: devToolsConfig$jscomp$inline_1157.bundleType, + version: devToolsConfig$jscomp$inline_1157.version, + rendererPackageName: devToolsConfig$jscomp$inline_1157.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1157.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10733,26 +10525,26 @@ var internals$jscomp$inline_1386 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1174.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1157.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1387 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1400 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1387.isDisabled && - hook$jscomp$inline_1387.supportsFiber + !hook$jscomp$inline_1400.isDisabled && + hook$jscomp$inline_1400.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1387.inject( - internals$jscomp$inline_1386 + (rendererID = hook$jscomp$inline_1400.inject( + internals$jscomp$inline_1399 )), - (injectedHook = hook$jscomp$inline_1387); + (injectedHook = hook$jscomp$inline_1400); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 2ecd535a33..5efbb516f2 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -10162,7 +10162,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "19.0.0-www-modern-50e89ec9f2-20240612", + version: "19.0.0-www-modern-fb9a90fa48-20240614", rendererPackageName: "react-art" }; var internals$jscomp$inline_1372 = { @@ -10193,7 +10193,7 @@ var internals$jscomp$inline_1372 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1373 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 7d4e0f9fc6..c2472a3131 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -295,9 +295,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -748,19 +745,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 ( @@ -3803,10 +3787,6 @@ __DEV__ && scheduleImmediateTask(processRootScheduleInMicrotask)); enableDeferRootSchedulingToMicrotask || scheduleTaskForRootDuringMicrotask(root, now$1()); - !disableLegacyMode && - ReactSharedInternals.isBatchingLegacy && - 0 === root.tag && - (ReactSharedInternals.didScheduleLegacyUpdate = !0); } function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (!isFlushingWork && mightHavePendingSyncWork) { @@ -3814,7 +3794,7 @@ __DEV__ && do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) { + if (!onlyLegacy) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( @@ -5469,15 +5449,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; @@ -5760,9 +5732,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." ); @@ -7304,7 +7275,7 @@ __DEV__ && for (var child = fiber.child; child; ) (fiber.actualDuration += child.actualDuration), (child = child.sibling); } - function warnOnInvalidCallback$1(callback) { + function warnOnInvalidCallback(callback) { if (null !== callback && "function" !== typeof callback) { var key = String(callback); didWarnOnInvalidCallback.has(key) || @@ -7386,124 +7357,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 & 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, @@ -7530,192 +7383,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.propTypes && - error$jscomp$0( - "propTypes was defined as an instance property on %s. Use a static property to define propTypes 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 - )); - "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 & 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, @@ -7872,36 +7539,6 @@ __DEV__ && )); }); } - 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(SyncLane)), - (returnFiber.tag = ForceUpdate), - enqueueUpdate(sourceFiber, returnFiber, SyncLane)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= SyncLane)), - suspenseBoundary - ); - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; - } function throwException( root, returnFiber, @@ -7916,115 +7553,81 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + enableLazyContextPropagation && + ((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))); - 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( @@ -8049,10 +7652,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), @@ -8060,7 +7663,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 } @@ -8068,58 +7671,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( @@ -8452,37 +8053,30 @@ __DEV__ && renderLanes ); } - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - if (0 !== (renderLanes & OffscreenLane)) - (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 = - OffscreenLane), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & OffscreenLane)) (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 = OffscreenLane), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -8644,7 +8238,7 @@ __DEV__ && return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -8683,214 +8277,570 @@ __DEV__ && ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); prepareToReadContext(workInProgress, renderLanes); - 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), - 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 { + (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; - cloneUpdateQueue(current, workInProgress); + 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.propTypes && + error$jscomp$0( + "propTypes was defined as an instance property on %s. Use a static property to define propTypes 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 + )); + "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 & 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, + 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.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), + 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$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.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 || (enableLazyContextPropagation && - 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 ) || (enableLazyContextPropagation && - 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 && @@ -8900,76 +8850,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; @@ -9042,32 +8923,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2432; - var JSCompiler_object_inline_stack_2433 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2459; + var JSCompiler_object_inline_stack_2460 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2434 = !1; + var JSCompiler_object_inline_componentStack_2461 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2432 = didSuspend) || - (JSCompiler_object_inline_digest_2432 = + (JSCompiler_object_inline_digest_2459 = didSuspend) || + (JSCompiler_object_inline_digest_2459 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2432 && - ((JSCompiler_object_inline_componentStack_2434 = !0), + JSCompiler_object_inline_digest_2459 && + ((JSCompiler_object_inline_componentStack_2461 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2432 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2459 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2434 + JSCompiler_object_inline_componentStack_2461 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2431 = nextHydratableInstance; + var JSCompiler_object_inline_message_2458 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2431)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2458)) { c: { - var instance = JSCompiler_object_inline_message_2431; + var instance = JSCompiler_object_inline_message_2458; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9108,19 +8989,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2431 + JSCompiler_object_inline_message_2458 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2431 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2458 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2431 && - ((JSCompiler_object_inline_message_2431 = - JSCompiler_object_inline_message_2431.dehydrated), - null !== JSCompiler_object_inline_message_2431) + null !== JSCompiler_object_inline_message_2458 && + ((JSCompiler_object_inline_message_2458 = + JSCompiler_object_inline_message_2458.dehydrated), + null !== JSCompiler_object_inline_message_2458) ) return ( - JSCompiler_object_inline_message_2431.data === + JSCompiler_object_inline_message_2458.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = DefaultHydrationLane) : (workInProgress.lanes = OffscreenLane), @@ -9128,27 +9009,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2431 = - JSCompiler_object_inline_stack_2433.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2433.fallback; - if (JSCompiler_object_inline_componentStack_2434) + JSCompiler_object_inline_message_2458 = + JSCompiler_object_inline_stack_2460.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2460.fallback; + if (JSCompiler_object_inline_componentStack_2461) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2433 = + (JSCompiler_object_inline_stack_2460 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2431, + JSCompiler_object_inline_message_2458, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2434 = + (JSCompiler_object_inline_componentStack_2461 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2434.memoizedState = + (JSCompiler_object_inline_componentStack_2461.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2434.childLanes = + (JSCompiler_object_inline_componentStack_2461.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2432, + JSCompiler_object_inline_digest_2459, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9157,60 +9038,60 @@ __DEV__ && ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = - JSCompiler_object_inline_componentStack_2434.updateQueue), - null === current - ? (JSCompiler_object_inline_componentStack_2434.updateQueue = + (renderLanes = + JSCompiler_object_inline_componentStack_2461.updateQueue), + null === renderLanes + ? (JSCompiler_object_inline_componentStack_2461.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2433 + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), + JSCompiler_object_inline_stack_2460 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2433.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2460.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2433 = + (JSCompiler_object_inline_stack_2460 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2431, + JSCompiler_object_inline_message_2458, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2434 = + (JSCompiler_object_inline_componentStack_2461 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2434.memoizedState = + (JSCompiler_object_inline_componentStack_2461.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2434.childLanes = + (JSCompiler_object_inline_componentStack_2461.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2432, + JSCompiler_object_inline_digest_2459, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2433 + JSCompiler_object_inline_stack_2460 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2431 + JSCompiler_object_inline_message_2458 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2431 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2431) + ((JSCompiler_object_inline_message_2458 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2458) ) { if (didSuspend) workInProgress.flags & 256 @@ -9227,95 +9108,93 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2434 = - JSCompiler_object_inline_stack_2433.fallback), - (JSCompiler_object_inline_message_2431 = workInProgress.mode), - (JSCompiler_object_inline_stack_2433 = createFiberFromOffscreen( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2433.children - }, - JSCompiler_object_inline_message_2431, - 0, - null - )), - (JSCompiler_object_inline_componentStack_2434 = + (JSCompiler_object_inline_componentStack_2461 = + JSCompiler_object_inline_stack_2460.fallback), + (JSCompiler_object_inline_message_2458 = workInProgress.mode), + (JSCompiler_object_inline_stack_2460 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2460.children + }, + JSCompiler_object_inline_message_2458 + )), + (JSCompiler_object_inline_componentStack_2461 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2434, - JSCompiler_object_inline_message_2431, + JSCompiler_object_inline_componentStack_2461, + JSCompiler_object_inline_message_2458, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2434.flags |= 2), - (JSCompiler_object_inline_stack_2433.return = workInProgress), - (JSCompiler_object_inline_componentStack_2434.return = + (JSCompiler_object_inline_componentStack_2461.flags |= 2), + (JSCompiler_object_inline_stack_2460.return = workInProgress), + (JSCompiler_object_inline_componentStack_2461.return = workInProgress), - (JSCompiler_object_inline_stack_2433.sibling = - JSCompiler_object_inline_componentStack_2434), - (workInProgress.child = JSCompiler_object_inline_stack_2433), - (disableLegacyMode || 0 !== (workInProgress.mode & 1)) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2433 = workInProgress.child), - (JSCompiler_object_inline_stack_2433.memoizedState = + (JSCompiler_object_inline_stack_2460.sibling = + JSCompiler_object_inline_componentStack_2461), + (workInProgress.child = JSCompiler_object_inline_stack_2460), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (JSCompiler_object_inline_stack_2460 = workInProgress.child), + (JSCompiler_object_inline_stack_2460.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2433.childLanes = + (JSCompiler_object_inline_stack_2460.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2432, + JSCompiler_object_inline_digest_2459, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_componentStack_2434)); + (workInProgress = JSCompiler_object_inline_componentStack_2461)); 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_2431.data === + JSCompiler_object_inline_message_2458.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2432 = - JSCompiler_object_inline_message_2431.nextSibling && - JSCompiler_object_inline_message_2431.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2432) { - JSCompiler_temp = JSCompiler_object_inline_digest_2432.dgst; - var message = JSCompiler_object_inline_digest_2432.msg; - instance = JSCompiler_object_inline_digest_2432.stck; - var componentStack = JSCompiler_object_inline_digest_2432.cstck; + JSCompiler_object_inline_digest_2459 = + JSCompiler_object_inline_message_2458.nextSibling && + JSCompiler_object_inline_message_2458.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2459) { + JSCompiler_temp = JSCompiler_object_inline_digest_2459.dgst; + var message = JSCompiler_object_inline_digest_2459.msg; + instance = JSCompiler_object_inline_digest_2459.stck; + var componentStack = JSCompiler_object_inline_digest_2459.cstck; } - JSCompiler_object_inline_message_2431 = message; - JSCompiler_object_inline_digest_2432 = JSCompiler_temp; - JSCompiler_object_inline_stack_2433 = instance; - JSCompiler_object_inline_componentStack_2434 = componentStack; - JSCompiler_object_inline_message_2431 = - JSCompiler_object_inline_message_2431 - ? Error(JSCompiler_object_inline_message_2431) + JSCompiler_object_inline_message_2458 = message; + JSCompiler_object_inline_digest_2459 = JSCompiler_temp; + JSCompiler_object_inline_stack_2460 = instance; + JSCompiler_object_inline_componentStack_2461 = componentStack; + JSCompiler_object_inline_message_2458 = + JSCompiler_object_inline_message_2458 + ? Error(JSCompiler_object_inline_message_2458) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2431.stack = - JSCompiler_object_inline_stack_2433 || ""; - JSCompiler_object_inline_message_2431.digest = - JSCompiler_object_inline_digest_2432; - JSCompiler_object_inline_digest_2432 = - void 0 === JSCompiler_object_inline_componentStack_2434 + JSCompiler_object_inline_message_2458.stack = + JSCompiler_object_inline_stack_2460 || ""; + JSCompiler_object_inline_message_2458.digest = + JSCompiler_object_inline_digest_2459; + JSCompiler_object_inline_digest_2459 = + void 0 === JSCompiler_object_inline_componentStack_2461 ? null - : JSCompiler_object_inline_componentStack_2434; - "string" === typeof JSCompiler_object_inline_digest_2432 && + : JSCompiler_object_inline_componentStack_2461; + "string" === typeof JSCompiler_object_inline_digest_2459 && CapturedStacks.set( - JSCompiler_object_inline_message_2431, - JSCompiler_object_inline_digest_2432 + JSCompiler_object_inline_message_2458, + JSCompiler_object_inline_digest_2459 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2431, + value: JSCompiler_object_inline_message_2458, source: null, - stack: JSCompiler_object_inline_digest_2432 + stack: JSCompiler_object_inline_digest_2459 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9331,29 +9210,29 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2432 = + (JSCompiler_object_inline_digest_2459 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2432) + didReceiveUpdate || JSCompiler_object_inline_digest_2459) ) { - JSCompiler_object_inline_digest_2432 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2432) { - JSCompiler_object_inline_stack_2433 = renderLanes & -renderLanes; + JSCompiler_object_inline_digest_2459 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2459) { + JSCompiler_object_inline_stack_2460 = renderLanes & -renderLanes; if ( enableUnifiedSyncLane && - 0 !== (JSCompiler_object_inline_stack_2433 & SyncUpdateLanes) + 0 !== (JSCompiler_object_inline_stack_2460 & SyncUpdateLanes) ) - JSCompiler_object_inline_stack_2433 = SyncHydrationLane; + JSCompiler_object_inline_stack_2460 = SyncHydrationLane; else - switch (JSCompiler_object_inline_stack_2433) { + switch (JSCompiler_object_inline_stack_2460) { case SyncLane: - JSCompiler_object_inline_stack_2433 = SyncHydrationLane; + JSCompiler_object_inline_stack_2460 = SyncHydrationLane; break; case InputContinuousLane: - JSCompiler_object_inline_stack_2433 = + JSCompiler_object_inline_stack_2460 = InputContinuousHydrationLane; break; case DefaultLane: - JSCompiler_object_inline_stack_2433 = DefaultHydrationLane; + JSCompiler_object_inline_stack_2460 = DefaultHydrationLane; break; case 128: case 256: @@ -9374,40 +9253,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2433 = TransitionHydrationLane; + JSCompiler_object_inline_stack_2460 = TransitionHydrationLane; break; case IdleLane: - JSCompiler_object_inline_stack_2433 = IdleHydrationLane; + JSCompiler_object_inline_stack_2460 = IdleHydrationLane; break; default: - JSCompiler_object_inline_stack_2433 = 0; + JSCompiler_object_inline_stack_2460 = 0; } - JSCompiler_object_inline_stack_2433 = + JSCompiler_object_inline_stack_2460 = 0 !== - (JSCompiler_object_inline_stack_2433 & - (JSCompiler_object_inline_digest_2432.suspendedLanes | + (JSCompiler_object_inline_stack_2460 & + (JSCompiler_object_inline_digest_2459.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2433; + : JSCompiler_object_inline_stack_2460; if ( - 0 !== JSCompiler_object_inline_stack_2433 && - JSCompiler_object_inline_stack_2433 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2460 && + JSCompiler_object_inline_stack_2460 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2433), + ((prevState.retryLane = JSCompiler_object_inline_stack_2460), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2433 + JSCompiler_object_inline_stack_2460 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2432, + JSCompiler_object_inline_digest_2459, current, - JSCompiler_object_inline_stack_2433 + JSCompiler_object_inline_stack_2460 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2431.data === + JSCompiler_object_inline_message_2458.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9415,7 +9294,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2431.data === + JSCompiler_object_inline_message_2458.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9423,12 +9302,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2431._reactRetry = + (JSCompiler_object_inline_message_2458._reactRetry = workInProgress), (workInProgress = null)) - : ((renderLanes = prevState.treeContext), + : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2431.nextSibling + JSCompiler_object_inline_message_2458.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9436,83 +9315,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_2433.children + JSCompiler_object_inline_stack_2460.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2434) + if (JSCompiler_object_inline_componentStack_2461) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2434 = - JSCompiler_object_inline_stack_2433.fallback), - (JSCompiler_object_inline_message_2431 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2461 = + JSCompiler_object_inline_stack_2460.fallback), + (JSCompiler_object_inline_message_2458 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (componentStack = { - mode: "hidden", - children: JSCompiler_object_inline_stack_2433.children - }), - disableLegacyMode || - 0 !== (JSCompiler_object_inline_message_2431 & 1) || - workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2433 = createWorkInProgress( - JSCompiler_temp, - componentStack - )), - (JSCompiler_object_inline_stack_2433.subtreeFlags = - JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2433 = workInProgress.child), - (JSCompiler_object_inline_stack_2433.childLanes = 0), - (JSCompiler_object_inline_stack_2433.pendingProps = - componentStack), - workInProgress.mode & 2 && - ((JSCompiler_object_inline_stack_2433.actualDuration = 0), - (JSCompiler_object_inline_stack_2433.actualStartTime = -1), - (JSCompiler_object_inline_stack_2433.selfBaseDuration = - JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2433.treeBaseDuration = - JSCompiler_temp.treeBaseDuration)), - (workInProgress.deletions = null)), + (JSCompiler_object_inline_stack_2460 = createWorkInProgress( + JSCompiler_temp, + { + mode: "hidden", + children: JSCompiler_object_inline_stack_2460.children + } + )), + (JSCompiler_object_inline_stack_2460.subtreeFlags = + JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2434 = + ? (JSCompiler_object_inline_componentStack_2461 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2434 + JSCompiler_object_inline_componentStack_2461 )) - : ((JSCompiler_object_inline_componentStack_2434 = + : ((JSCompiler_object_inline_componentStack_2461 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2434, - JSCompiler_object_inline_message_2431, + JSCompiler_object_inline_componentStack_2461, + JSCompiler_object_inline_message_2458, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2434.flags |= 2)), - (JSCompiler_object_inline_componentStack_2434.return = + (JSCompiler_object_inline_componentStack_2461.flags |= 2)), + (JSCompiler_object_inline_componentStack_2461.return = workInProgress), - (JSCompiler_object_inline_stack_2433.return = workInProgress), - (JSCompiler_object_inline_stack_2433.sibling = - JSCompiler_object_inline_componentStack_2434), - (workInProgress.child = JSCompiler_object_inline_stack_2433), - (JSCompiler_object_inline_stack_2433 = - JSCompiler_object_inline_componentStack_2434), - (JSCompiler_object_inline_componentStack_2434 = workInProgress.child), - (JSCompiler_object_inline_message_2431 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2431 - ? (JSCompiler_object_inline_message_2431 = + (JSCompiler_object_inline_stack_2460.return = workInProgress), + (JSCompiler_object_inline_stack_2460.sibling = + JSCompiler_object_inline_componentStack_2461), + (workInProgress.child = JSCompiler_object_inline_stack_2460), + (JSCompiler_object_inline_stack_2460 = + JSCompiler_object_inline_componentStack_2461), + (JSCompiler_object_inline_componentStack_2461 = workInProgress.child), + (JSCompiler_object_inline_message_2458 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2458 + ? (JSCompiler_object_inline_message_2458 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2431.cachePool), + JSCompiler_object_inline_message_2458.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9520,80 +9383,72 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2431 = { + (JSCompiler_object_inline_message_2458 = { baseLanes: - JSCompiler_object_inline_message_2431.baseLanes | renderLanes, + JSCompiler_object_inline_message_2458.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2434.memoizedState = - JSCompiler_object_inline_message_2431), + (JSCompiler_object_inline_componentStack_2461.memoizedState = + JSCompiler_object_inline_message_2458), enableTransitionTracing && - ((JSCompiler_object_inline_message_2431 = enableTransitionTracing + ((JSCompiler_object_inline_message_2458 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2431 && + null !== JSCompiler_object_inline_message_2458 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2434.updateQueue), + JSCompiler_object_inline_componentStack_2461.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2434.updateQueue = { - transitions: JSCompiler_object_inline_message_2431, + ? (JSCompiler_object_inline_componentStack_2461.updateQueue = { + transitions: JSCompiler_object_inline_message_2458, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2434.updateQueue = { - transitions: JSCompiler_object_inline_message_2431, + ? (JSCompiler_object_inline_componentStack_2461.updateQueue = { + transitions: JSCompiler_object_inline_message_2458, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack ? componentStack.retryQueue : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2431), + JSCompiler_object_inline_message_2458), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2434.childLanes = + (JSCompiler_object_inline_componentStack_2461.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2432, + JSCompiler_object_inline_digest_2459, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2433 + JSCompiler_object_inline_stack_2460 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2432 = current.child; - current = JSCompiler_object_inline_digest_2432.sibling; - JSCompiler_object_inline_digest_2432 = createWorkInProgress( - JSCompiler_object_inline_digest_2432, - { - mode: "visible", - children: JSCompiler_object_inline_stack_2433.children - } - ); - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - (JSCompiler_object_inline_digest_2432.lanes = renderLanes); - JSCompiler_object_inline_digest_2432.return = workInProgress; - JSCompiler_object_inline_digest_2432.sibling = null; + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { + mode: "visible", + children: JSCompiler_object_inline_stack_2460.children + }); + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_object_inline_digest_2459 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2459 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2432; + : JSCompiler_object_inline_digest_2459.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2432; + 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); @@ -9604,37 +9459,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), - (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, @@ -9813,69 +9657,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, @@ -10049,7 +9883,7 @@ __DEV__ && } function beginWork(current, workInProgress, renderLanes) { if (workInProgress._debugNeedsRemount && null !== current) { - var copiedFiber = createFiberFromTypeAndProps( + renderLanes = createFiberFromTypeAndProps( workInProgress.type, workInProgress.key, workInProgress.pendingProps, @@ -10061,13 +9895,13 @@ __DEV__ && if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; workInProgress.alternate = null; - copiedFiber.index = workInProgress.index; - copiedFiber.sibling = workInProgress.sibling; - copiedFiber.return = workInProgress.return; - copiedFiber.ref = workInProgress.ref; - copiedFiber._debugInfo = workInProgress._debugInfo; + renderLanes.index = workInProgress.index; + renderLanes.sibling = workInProgress.sibling; + renderLanes.return = workInProgress.return; + renderLanes.ref = workInProgress.ref; + renderLanes._debugInfo = workInProgress._debugInfo; if (workInProgress === returnFiber.child) - returnFiber.child = copiedFiber; + returnFiber.child = renderLanes; else { var prevSibling = returnFiber.child; if (null === prevSibling) @@ -10075,14 +9909,14 @@ __DEV__ && for (; prevSibling.sibling !== workInProgress; ) if (((prevSibling = prevSibling.sibling), null === prevSibling)) throw Error("Expected to find the previous sibling."); - prevSibling.sibling = copiedFiber; + prevSibling.sibling = renderLanes; } - var deletions = returnFiber.deletions; - null === deletions + workInProgress = returnFiber.deletions; + null === workInProgress ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16)) - : deletions.push(current); - copiedFiber.flags |= 2; - return copiedFiber; + : workInProgress.push(current); + renderLanes.flags |= 2; + return renderLanes; } if (null !== current) if ( @@ -10108,142 +9942,150 @@ __DEV__ && } else { didReceiveUpdate = !1; - var JSCompiler_temp; - if ((JSCompiler_temp = isHydrating)) + if ((returnFiber = isHydrating)) warnIfNotHydrating(), - (JSCompiler_temp = 0 !== (workInProgress.flags & 1048576)); - if (JSCompiler_temp) { - var slotIndex = workInProgress.index; - warnIfNotHydrating(); - pushTreeId(workInProgress, treeForkCount, slotIndex); - } + (returnFiber = 0 !== (workInProgress.flags & 1048576)); + returnFiber && + ((returnFiber = workInProgress.index), + warnIfNotHydrating(), + pushTreeId(workInProgress, treeForkCount, returnFiber)); } workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - a: { - var elementType = workInProgress.elementType; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - var props = workInProgress.pendingProps; - var Component = callLazyInitInDEV(elementType); - workInProgress.type = Component; - if ("function" === typeof Component) - if (shouldConstruct(Component)) { - var resolvedProps = resolveClassComponentProps( - Component, - props, + a: if ( + ((returnFiber = workInProgress.pendingProps), + (current = callLazyInitInDEV(workInProgress.elementType)), + (workInProgress.type = current), + "function" === typeof current) + ) + shouldConstruct(current) + ? ((returnFiber = resolveClassComponentProps( + current, + returnFiber, !1 - ); - workInProgress.tag = 1; - workInProgress.type = Component = - resolveFunctionForHotReloading(Component); - var JSCompiler_inline_result = updateClassComponent( + )), + (workInProgress.tag = 1), + (workInProgress.type = current = + resolveFunctionForHotReloading(current)), + (workInProgress = updateClassComponent( null, workInProgress, - Component, - resolvedProps, + current, + returnFiber, renderLanes - ); - } else { - var _resolvedProps = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(Component, props); - workInProgress.tag = 0; - validateFunctionComponentInDev(workInProgress, Component); - workInProgress.type = Component = - resolveFunctionForHotReloading(Component); - JSCompiler_inline_result = updateFunctionComponent( + ))) + : ((returnFiber = disableDefaultPropsExceptForClasses + ? returnFiber + : resolveDefaultPropsOnNonClassComponent( + current, + returnFiber + )), + (workInProgress.tag = 0), + validateFunctionComponentInDev(workInProgress, current), + (workInProgress.type = current = + resolveFunctionForHotReloading(current)), + (workInProgress = updateFunctionComponent( null, workInProgress, - Component, - _resolvedProps, + current, + returnFiber, + renderLanes + ))); + else { + if (void 0 !== current && null !== current) + if ( + ((prevSibling = current.$$typeof), + prevSibling === REACT_FORWARD_REF_TYPE) + ) { + returnFiber = disableDefaultPropsExceptForClasses + ? returnFiber + : resolveDefaultPropsOnNonClassComponent( + current, + returnFiber + ); + workInProgress.tag = 11; + workInProgress.type = current = + resolveForwardRefForHotReloading(current); + workInProgress = updateForwardRef( + null, + workInProgress, + current, + returnFiber, renderLanes ); + break a; + } else if (prevSibling === REACT_MEMO_TYPE) { + returnFiber = disableDefaultPropsExceptForClasses + ? returnFiber + : resolveDefaultPropsOnNonClassComponent( + current, + returnFiber + ); + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + current, + disableDefaultPropsExceptForClasses + ? returnFiber + : resolveDefaultPropsOnNonClassComponent( + current.type, + returnFiber + ), + renderLanes + ); + break a; } - else { - if (void 0 !== Component && null !== Component) { - var $$typeof = Component.$$typeof; - if ($$typeof === REACT_FORWARD_REF_TYPE) { - var _resolvedProps2 = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(Component, props); - workInProgress.tag = 11; - workInProgress.type = Component = - resolveForwardRefForHotReloading(Component); - JSCompiler_inline_result = updateForwardRef( - null, - workInProgress, - Component, - _resolvedProps2, - renderLanes - ); - break a; - } else if ($$typeof === REACT_MEMO_TYPE) { - var _resolvedProps3 = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(Component, props); - workInProgress.tag = 14; - JSCompiler_inline_result = updateMemoComponent( - null, - workInProgress, - Component, - disableDefaultPropsExceptForClasses - ? _resolvedProps3 - : resolveDefaultPropsOnNonClassComponent( - Component.type, - _resolvedProps3 - ), - renderLanes - ); - break a; - } - } - var hint = ""; - null !== Component && - "object" === typeof Component && - Component.$$typeof === REACT_LAZY_TYPE && - (hint = - " Did you wrap a component in React.lazy() more than once?"); - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." + - hint - ); - } + workInProgress = ""; + null !== current && + "object" === typeof current && + current.$$typeof === REACT_LAZY_TYPE && + (workInProgress = + " Did you wrap a component in React.lazy() more than once?"); + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + current + + ". Lazy element type must resolve to a class or function." + + workInProgress + ); } - return JSCompiler_inline_result; + return workInProgress; case 0: - var Component$jscomp$0 = workInProgress.type, - unresolvedProps = workInProgress.pendingProps, - resolvedProps$jscomp$0 = + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (prevSibling = disableDefaultPropsExceptForClasses || - workInProgress.elementType === Component$jscomp$0 - ? unresolvedProps + workInProgress.elementType === returnFiber + ? prevSibling : resolveDefaultPropsOnNonClassComponent( - Component$jscomp$0, - unresolvedProps - ); - return updateFunctionComponent( - current, - workInProgress, - Component$jscomp$0, - resolvedProps$jscomp$0, - renderLanes + returnFiber, + prevSibling + )), + updateFunctionComponent( + current, + workInProgress, + returnFiber, + prevSibling, + renderLanes + ) ); case 1: - var _Component = workInProgress.type, - _resolvedProps4 = resolveClassComponentProps( - _Component, + return ( + (returnFiber = workInProgress.type), + (prevSibling = resolveClassComponentProps( + returnFiber, workInProgress.pendingProps, - workInProgress.elementType === _Component - ); - return updateClassComponent( - current, - workInProgress, - _Component, - _resolvedProps4, - renderLanes + workInProgress.elementType === returnFiber + )), + updateClassComponent( + current, + workInProgress, + returnFiber, + prevSibling, + renderLanes + ) ); case 3: a: { @@ -10252,325 +10094,330 @@ __DEV__ && throw Error( "Should have a current fiber. This is a bug in React." ); - var nextProps = workInProgress.pendingProps, - prevState = workInProgress.memoizedState, - prevChildren = prevState.element; + var nextProps = workInProgress.pendingProps; + prevSibling = workInProgress.memoizedState; + returnFiber = prevSibling.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions, workInProgress); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - var nextCache = nextState.cache; - pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== prevState.cache && + nextProps = nextState.cache; + pushProvider(workInProgress, CacheContext, nextProps); + nextProps !== prevSibling.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - var nextChildren = nextState.element; - if (prevState.isDehydrated) { - var overrideState = { - element: nextChildren, - isDehydrated: !1, - cache: nextState.cache - }; - workInProgress.updateQueue.baseState = overrideState; - workInProgress.memoizedState = overrideState; - if (workInProgress.flags & 256) { - var JSCompiler_inline_result$jscomp$0 = - mountHostRootWithoutHydrating( - current, - workInProgress, - nextChildren, - renderLanes - ); + nextProps = nextState.element; + if (prevSibling.isDehydrated) + if ( + ((prevSibling = { + element: nextProps, + isDehydrated: !1, + cache: nextState.cache + }), + (workInProgress.updateQueue.baseState = prevSibling), + (workInProgress.memoizedState = prevSibling), + workInProgress.flags & 256) + ) { + workInProgress = mountHostRootWithoutHydrating( + current, + workInProgress, + nextProps, + renderLanes + ); break a; - } else if (nextChildren !== prevChildren) { - var recoverableError = createCapturedValueAtFiber( + } else if (nextProps !== returnFiber) { + returnFiber = createCapturedValueAtFiber( Error( "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering." ), workInProgress ); - queueHydrationError(recoverableError); - JSCompiler_inline_result$jscomp$0 = - mountHostRootWithoutHydrating( - current, - workInProgress, - nextChildren, - renderLanes - ); - break a; - } else { - nextHydratableInstance = getNextHydratable( - workInProgress.stateNode.containerInfo.firstChild + queueHydrationError(returnFiber); + workInProgress = mountHostRootWithoutHydrating( + current, + workInProgress, + nextProps, + renderLanes ); - hydrationParentFiber = workInProgress; - isHydrating = !0; - hydrationErrors = null; - didSuspendOrErrorDEV = !1; - hydrationDiffRootDEV = null; - rootOrSingletonContext = !0; + break a; + } else for ( - var child = mountChildFibers( + nextHydratableInstance = getNextHydratable( + workInProgress.stateNode.containerInfo.firstChild + ), + hydrationParentFiber = workInProgress, + isHydrating = !0, + hydrationErrors = null, + didSuspendOrErrorDEV = !1, + hydrationDiffRootDEV = null, + rootOrSingletonContext = !0, + renderLanes = mountChildFibers( workInProgress, null, - nextChildren, + nextProps, renderLanes ), - node = (workInProgress.child = child); - node; + workInProgress.child = renderLanes; + renderLanes; ) - (node.flags = (node.flags & -3) | 4096), - (node = node.sibling); - } - } else { + (renderLanes.flags = (renderLanes.flags & -3) | 4096), + (renderLanes = renderLanes.sibling); + else { resetHydrationState(); - if (nextChildren === prevChildren) { - JSCompiler_inline_result$jscomp$0 = - bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); + if (nextProps === returnFiber) { + workInProgress = bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); break a; } reconcileChildren( current, workInProgress, - nextChildren, + nextProps, renderLanes ); } - JSCompiler_inline_result$jscomp$0 = workInProgress.child; + workInProgress = workInProgress.child; } - return JSCompiler_inline_result$jscomp$0; + return workInProgress; case 26: - markRef(current, workInProgress); - if (null === current) { - var resource = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - ); - if (resource) workInProgress.memoizedState = resource; - else if (!isHydrating) { - var type = workInProgress.type, - props$jscomp$0 = workInProgress.pendingProps, - rootContainerInstance = requiredContext( - rootInstanceStackCursor.current - ), - domElement = getOwnerDocumentFromRootContainer( - rootContainerInstance - ).createElement(type); - domElement[internalInstanceKey] = workInProgress; - domElement[internalPropsKey] = props$jscomp$0; - setInitialProperties(domElement, type, props$jscomp$0); - markNodeAsHoistable(domElement); - workInProgress.stateNode = domElement; - } - } else - workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - ); - return null; + return ( + markRef(current, workInProgress), + null === current + ? (renderLanes = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + )) + ? (workInProgress.memoizedState = renderLanes) + : isHydrating || + ((renderLanes = workInProgress.type), + (current = workInProgress.pendingProps), + (returnFiber = requiredContext( + rootInstanceStackCursor.current + )), + (returnFiber = + getOwnerDocumentFromRootContainer( + returnFiber + ).createElement(renderLanes)), + (returnFiber[internalInstanceKey] = workInProgress), + (returnFiber[internalPropsKey] = current), + setInitialProperties(returnFiber, renderLanes, current), + markNodeAsHoistable(returnFiber), + (workInProgress.stateNode = returnFiber)) + : (workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + )), + null + ); case 27: - pushHostContext(workInProgress); - if (null === current && isHydrating) { - var currentRootContainer = requiredContext( - rootInstanceStackCursor.current - ), - currentHostContext = getHostContext(), - instance = (workInProgress.stateNode = resolveSingletonInstance( + return ( + pushHostContext(workInProgress), + null === current && + isHydrating && + ((prevSibling = requiredContext(rootInstanceStackCursor.current)), + (returnFiber = getHostContext()), + (prevSibling = workInProgress.stateNode = + resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + prevSibling, + returnFiber, + !1 + )), + didSuspendOrErrorDEV || + ((returnFiber = diffHydratedProperties( + prevSibling, + workInProgress.type, + workInProgress.pendingProps, + returnFiber + )), + null !== returnFiber && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + returnFiber)), + (hydrationParentFiber = workInProgress), + (rootOrSingletonContext = !0), + (nextHydratableInstance = getNextHydratable( + prevSibling.firstChild + ))), + (returnFiber = workInProgress.pendingProps.children), + null !== current || isHydrating + ? reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ) + : (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + returnFiber, + renderLanes + )), + markRef(current, workInProgress), + workInProgress.child + ); + case 5: + return ( + null === current && + isHydrating && + ((nextProps = getHostContext()), + (returnFiber = validateDOMNesting( workInProgress.type, - workInProgress.pendingProps, - currentRootContainer, - currentHostContext, - !1 - )); - if (!didSuspendOrErrorDEV) { - var differences = diffHydratedProperties( - instance, - workInProgress.type, - workInProgress.pendingProps, - currentHostContext - ); - null !== differences && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - differences); - } - hydrationParentFiber = workInProgress; - rootOrSingletonContext = !0; - nextHydratableInstance = getNextHydratable(instance.firstChild); - } - var nextChildren$jscomp$0 = workInProgress.pendingProps.children; - null !== current || isHydrating - ? reconcileChildren( + nextProps.ancestorInfo + )), + (prevSibling = nextHydratableInstance), + (nextState = !prevSibling) || + ((nextState = canHydrateInstance( + prevSibling, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== nextState + ? ((workInProgress.stateNode = nextState), + didSuspendOrErrorDEV || + ((nextProps = diffHydratedProperties( + nextState, + workInProgress.type, + workInProgress.pendingProps, + nextProps + )), + null !== nextProps && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + nextProps)), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + nextState.firstChild + )), + (rootOrSingletonContext = !1), + (nextProps = !0)) + : (nextProps = !1), + (nextState = !nextProps)), + nextState && + (returnFiber && + warnNonHydratedInstance(workInProgress, prevSibling), + throwOnHydrationMismatch(workInProgress))), + pushHostContext(workInProgress), + (prevSibling = workInProgress.type), + (nextProps = workInProgress.pendingProps), + (nextState = null !== current ? current.memoizedProps : null), + (returnFiber = nextProps.children), + shouldSetTextContent(prevSibling, nextProps) + ? (returnFiber = null) + : null !== nextState && + shouldSetTextContent(prevSibling, nextState) && + (workInProgress.flags |= 32), + null !== workInProgress.memoizedState && + ((prevSibling = renderWithHooks( current, workInProgress, - nextChildren$jscomp$0, - renderLanes - ) - : (workInProgress.child = reconcileChildFibers( - workInProgress, + TransitionAwareHostComponent, + null, null, - nextChildren$jscomp$0, renderLanes - )); - markRef(current, workInProgress); - return workInProgress.child; - case 5: - if (null === current && isHydrating) { - var currentHostContext$jscomp$0 = getHostContext(), - shouldKeepWarning = validateDOMNesting( - workInProgress.type, - currentHostContext$jscomp$0.ancestorInfo - ), - nextInstance = nextHydratableInstance, - JSCompiler_temp$jscomp$0; - if (!(JSCompiler_temp$jscomp$0 = !nextInstance)) { - var instance$jscomp$0 = canHydrateInstance( - nextInstance, - workInProgress.type, - workInProgress.pendingProps, - rootOrSingletonContext - ); - if (null !== instance$jscomp$0) { - workInProgress.stateNode = instance$jscomp$0; - if (!didSuspendOrErrorDEV) { - var differences$jscomp$0 = diffHydratedProperties( - instance$jscomp$0, - workInProgress.type, - workInProgress.pendingProps, - currentHostContext$jscomp$0 - ); - null !== differences$jscomp$0 && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - differences$jscomp$0); - } - hydrationParentFiber = workInProgress; - nextHydratableInstance = getNextHydratable( - instance$jscomp$0.firstChild - ); - rootOrSingletonContext = !1; - var JSCompiler_inline_result$jscomp$1 = !0; - } else JSCompiler_inline_result$jscomp$1 = !1; - JSCompiler_temp$jscomp$0 = !JSCompiler_inline_result$jscomp$1; - } - JSCompiler_temp$jscomp$0 && - (shouldKeepWarning && - warnNonHydratedInstance(workInProgress, nextInstance), - throwOnHydrationMismatch(workInProgress)); - } - pushHostContext(workInProgress); - var type$jscomp$0 = workInProgress.type, - nextProps$jscomp$0 = workInProgress.pendingProps, - prevProps = null !== current ? current.memoizedProps : null, - nextChildren$jscomp$1 = nextProps$jscomp$0.children; - shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) - ? (nextChildren$jscomp$1 = null) - : null !== prevProps && - shouldSetTextContent(type$jscomp$0, prevProps) && - (workInProgress.flags |= 32); - if (null !== workInProgress.memoizedState) { - var newState = renderWithHooks( + )), + (HostTransitionContext._currentValue = prevSibling), + enableLazyContextPropagation || + (didReceiveUpdate && + null !== current && + current.memoizedState.memoizedState !== prevSibling && + propagateContextChange( + workInProgress, + HostTransitionContext, + renderLanes + ))), + markRef(current, workInProgress), + reconcileChildren( current, workInProgress, - TransitionAwareHostComponent, - null, - null, + returnFiber, renderLanes - ); - HostTransitionContext._currentValue = newState; - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== newState && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - )); - } - markRef(current, workInProgress); - reconcileChildren( - current, - workInProgress, - nextChildren$jscomp$1, - renderLanes + ), + workInProgress.child ); - return workInProgress.child; case 6: - if (null === current && isHydrating) { - var text = workInProgress.pendingProps, - ancestor = getHostContext().ancestorInfo.current; - var shouldKeepWarning$jscomp$0 = - null != ancestor ? validateTextNesting(text, ancestor.tag) : !0; - var nextInstance$jscomp$0 = nextHydratableInstance, - JSCompiler_temp$jscomp$1; - if (!(JSCompiler_temp$jscomp$1 = !nextInstance$jscomp$0)) { - var textInstance = canHydrateTextInstance( - nextInstance$jscomp$0, - workInProgress.pendingProps, - rootOrSingletonContext - ); - if (null !== textInstance) { - workInProgress.stateNode = textInstance; - hydrationParentFiber = workInProgress; - nextHydratableInstance = null; - var JSCompiler_inline_result$jscomp$2 = !0; - } else JSCompiler_inline_result$jscomp$2 = !1; - JSCompiler_temp$jscomp$1 = !JSCompiler_inline_result$jscomp$2; - } - JSCompiler_temp$jscomp$1 && - (shouldKeepWarning$jscomp$0 && - warnNonHydratedInstance(workInProgress, nextInstance$jscomp$0), - throwOnHydrationMismatch(workInProgress)); - } - return null; + return ( + null === current && + isHydrating && + ((renderLanes = workInProgress.pendingProps), + (current = getHostContext().ancestorInfo.current), + (renderLanes = + null != current + ? validateTextNesting(renderLanes, current.tag) + : !0), + (current = nextHydratableInstance), + (returnFiber = !current) || + ((returnFiber = canHydrateTextInstance( + current, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== returnFiber + ? ((workInProgress.stateNode = returnFiber), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (returnFiber = !0)) + : (returnFiber = !1), + (returnFiber = !returnFiber)), + returnFiber && + (renderLanes && + warnNonHydratedInstance(workInProgress, current), + throwOnHydrationMismatch(workInProgress))), + null + ); case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo + return ( + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo + ), + (returnFiber = workInProgress.pendingProps), + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + returnFiber, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ), + workInProgress.child ); - var nextChildren$jscomp$2 = workInProgress.pendingProps; - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - nextChildren$jscomp$2, - renderLanes - )) - : reconcileChildren( - current, - workInProgress, - nextChildren$jscomp$2, - renderLanes - ); - return workInProgress.child; case 11: - var type$jscomp$1 = workInProgress.type, - _unresolvedProps2 = workInProgress.pendingProps, - _resolvedProps5 = + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (prevSibling = disableDefaultPropsExceptForClasses || - workInProgress.elementType === type$jscomp$1 - ? _unresolvedProps2 + workInProgress.elementType === returnFiber + ? prevSibling : resolveDefaultPropsOnNonClassComponent( - type$jscomp$1, - _unresolvedProps2 - ); - return updateForwardRef( - current, - workInProgress, - type$jscomp$1, - _resolvedProps5, - renderLanes + returnFiber, + prevSibling + )), + updateForwardRef( + current, + workInProgress, + returnFiber, + prevSibling, + renderLanes + ) ); case 7: return ( @@ -10593,103 +10440,116 @@ __DEV__ && workInProgress.child ); case 12: - workInProgress.flags |= 4; - var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes + return ( + (workInProgress.flags |= 4), + (returnFiber = workInProgress.stateNode), + (returnFiber.effectDuration = 0), + (returnFiber.passiveEffectDuration = 0), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child ); - return workInProgress.child; case 10: a: { - var context = enableRenderableContext + returnFiber = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - var newProps = workInProgress.pendingProps, - oldProps = workInProgress.memoizedProps, - newValue = newProps.value; - "value" in newProps || + prevSibling = workInProgress.pendingProps; + nextProps = workInProgress.memoizedProps; + nextState = prevSibling.value; + "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), error$jscomp$0( "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" )); - pushProvider(workInProgress, context, newValue); - if (!enableLazyContextPropagation && null !== oldProps) - if (objectIs(oldProps.value, newValue)) { + pushProvider(workInProgress, returnFiber, nextState); + if (!enableLazyContextPropagation && null !== nextProps) + if (objectIs(nextProps.value, nextState)) { if ( - oldProps.children === newProps.children && + nextProps.children === prevSibling.children && !didPerformWorkStackCursor.current ) { - var JSCompiler_inline_result$jscomp$3 = - bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); + workInProgress = bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); break a; } } else - propagateContextChange(workInProgress, context, renderLanes); + propagateContextChange( + workInProgress, + returnFiber, + renderLanes + ); reconcileChildren( current, workInProgress, - newProps.children, + prevSibling.children, renderLanes ); - JSCompiler_inline_result$jscomp$3 = workInProgress.child; + workInProgress = workInProgress.child; } - return JSCompiler_inline_result$jscomp$3; + return workInProgress; case 9: - if (enableRenderableContext) - var context$jscomp$0 = workInProgress.type._context; - else - (context$jscomp$0 = workInProgress.type), - void 0 !== context$jscomp$0._context && - (context$jscomp$0 = context$jscomp$0._context); - var render = workInProgress.pendingProps.children; - "function" !== typeof render && - error$jscomp$0( - "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." - ); - prepareToReadContext(workInProgress, renderLanes); - var newValue$jscomp$0 = readContext(context$jscomp$0); - enableSchedulingProfiler && - markComponentRenderStarted(workInProgress); - var newChildren = callComponentInDEV( - render, - newValue$jscomp$0, - void 0 + return ( + enableRenderableContext + ? (prevSibling = workInProgress.type._context) + : ((prevSibling = workInProgress.type), + void 0 !== prevSibling._context && + (prevSibling = prevSibling._context)), + (returnFiber = workInProgress.pendingProps.children), + "function" !== typeof returnFiber && + error$jscomp$0( + "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." + ), + prepareToReadContext(workInProgress, renderLanes), + (prevSibling = readContext(prevSibling)), + enableSchedulingProfiler && + markComponentRenderStarted(workInProgress), + (returnFiber = callComponentInDEV( + returnFiber, + prevSibling, + void 0 + )), + enableSchedulingProfiler && markComponentRenderStopped(), + (workInProgress.flags |= 1), + reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ), + workInProgress.child ); - enableSchedulingProfiler && markComponentRenderStopped(); - workInProgress.flags |= 1; - reconcileChildren(current, workInProgress, newChildren, renderLanes); - return workInProgress.child; case 14: - var _type = workInProgress.type, - _unresolvedProps3 = workInProgress.pendingProps, - _resolvedProps6 = disableDefaultPropsExceptForClasses - ? _unresolvedProps3 + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (prevSibling = disableDefaultPropsExceptForClasses + ? prevSibling : resolveDefaultPropsOnNonClassComponent( - _type, - _unresolvedProps3 - ); - _resolvedProps6 = disableDefaultPropsExceptForClasses - ? _resolvedProps6 - : resolveDefaultPropsOnNonClassComponent( - _type.type, - _resolvedProps6 - ); - return updateMemoComponent( - current, - workInProgress, - _type, - _resolvedProps6, - renderLanes + returnFiber, + prevSibling + )), + (prevSibling = disableDefaultPropsExceptForClasses + ? prevSibling + : resolveDefaultPropsOnNonClassComponent( + returnFiber.type, + prevSibling + )), + updateMemoComponent( + current, + workInProgress, + returnFiber, + prevSibling, + renderLanes + ) ); case 15: return updateSimpleMemoComponent( @@ -10699,53 +10559,6 @@ __DEV__ && workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - var _Component2 = workInProgress.type, - _resolvedProps7 = resolveClassComponentProps( - _Component2, - workInProgress.pendingProps, - workInProgress.elementType === _Component2 - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - if (isContextProvider(_Component2)) { - var hasContext = !0; - pushContextProvider(workInProgress); - } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); - constructClassInstance(workInProgress, _Component2, _resolvedProps7); - mountClassInstance( - workInProgress, - _Component2, - _resolvedProps7, - renderLanes - ); - return finishClassComponent( - null, - workInProgress, - _Component2, - !0, - hasContext, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - var _Component3 = workInProgress.type, - _resolvedProps8 = resolveClassComponentProps( - _Component3, - workInProgress.pendingProps, - workInProgress.elementType === _Component3 - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - _Component3, - _resolvedProps8, - renderLanes - ); case 19: return updateSuspenseListComponent( current, @@ -10753,15 +10566,17 @@ __DEV__ && renderLanes ); case 21: - var nextChildren$jscomp$3 = workInProgress.pendingProps.children; - markRef(current, workInProgress); - reconcileChildren( - current, - workInProgress, - nextChildren$jscomp$3, - renderLanes + return ( + (returnFiber = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ), + workInProgress.child ); - return workInProgress.child; case 22: return updateOffscreenComponent(current, workInProgress, renderLanes); case 23: @@ -10771,96 +10586,94 @@ __DEV__ && renderLanes ); case 24: - prepareToReadContext(workInProgress, renderLanes); - var parentCache = readContext(CacheContext); - if (null === current) { - var cacheFromPool = peekCacheFromPool(); - if (null !== cacheFromPool) var freshCache = cacheFromPool; - else { - var root = workInProgressRoot, - freshCache$jscomp$0 = createCache(); - root.pooledCache = freshCache$jscomp$0; - retainCache(freshCache$jscomp$0); - null !== freshCache$jscomp$0 && - (root.pooledCacheLanes |= renderLanes); - freshCache = freshCache$jscomp$0; - } - workInProgress.memoizedState = { - parent: parentCache, - cache: freshCache - }; - initializeUpdateQueue(workInProgress); - pushProvider(workInProgress, CacheContext, freshCache); - } else { - 0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()); - var prevState$jscomp$0 = current.memoizedState, - nextState$jscomp$0 = workInProgress.memoizedState; - if (prevState$jscomp$0.parent !== parentCache) { - var derivedState = { parent: parentCache, cache: parentCache }; - workInProgress.memoizedState = derivedState; - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - derivedState); - pushProvider(workInProgress, CacheContext, parentCache); - } else { - var nextCache$jscomp$0 = nextState$jscomp$0.cache; - pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); - nextCache$jscomp$0 !== prevState$jscomp$0.cache && - propagateContextChange( - workInProgress, - CacheContext, - renderLanes - ); - } - } - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes + return ( + prepareToReadContext(workInProgress, renderLanes), + (returnFiber = readContext(CacheContext)), + null === current + ? ((prevSibling = peekCacheFromPool()), + null === prevSibling && + ((prevSibling = workInProgressRoot), + (nextProps = createCache()), + (prevSibling.pooledCache = nextProps), + retainCache(nextProps), + null !== nextProps && + (prevSibling.pooledCacheLanes |= renderLanes), + (prevSibling = nextProps)), + (workInProgress.memoizedState = { + parent: returnFiber, + cache: prevSibling + }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, prevSibling)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (prevSibling = current.memoizedState), + (nextProps = workInProgress.memoizedState), + prevSibling.parent !== returnFiber + ? ((prevSibling = { + parent: returnFiber, + cache: returnFiber + }), + (workInProgress.memoizedState = prevSibling), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + prevSibling), + pushProvider(workInProgress, CacheContext, returnFiber)) + : ((returnFiber = nextProps.cache), + pushProvider(workInProgress, CacheContext, returnFiber), + returnFiber !== prevSibling.cache && + propagateContextChange( + workInProgress, + CacheContext, + renderLanes + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child ); - return workInProgress.child; case 25: - if (enableTransitionTracing) { - if (enableTransitionTracing) { - if (null === current) { - var currentTransitions = enableTransitionTracing - ? transitionStack.current - : null; - if (null !== currentTransitions) { - var markerInstance = { - tag: TransitionTracingMarker, - transitions: new Set(currentTransitions), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }; - workInProgress.stateNode = markerInstance; - workInProgress.flags |= 2048; - } - } else - current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ); - var instance$jscomp$1 = workInProgress.stateNode; - null !== instance$jscomp$1 && - pushMarkerInstance(workInProgress, instance$jscomp$1); - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ); - var JSCompiler_inline_result$jscomp$4 = workInProgress.child; - } else JSCompiler_inline_result$jscomp$4 = null; - return JSCompiler_inline_result$jscomp$4; - } + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); break; case 29: throw workInProgress.pendingProps; @@ -11468,8 +11281,6 @@ __DEV__ && var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -11900,11 +11711,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; @@ -12027,14 +11833,14 @@ __DEV__ && ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || (!disableLegacyMode && 0 === (workInProgress.mode & 1)) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & OffscreenLane) && + newProps + ? 0 !== (renderLanes & OffscreenLane) && 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), @@ -12070,8 +11876,6 @@ __DEV__ && bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error( "Unknown unit of work tag (" + @@ -12232,30 +12036,20 @@ __DEV__ && (executionContext & CommitContext) !== NoContext ); } - function safelyCallComponentWillUnmount( - current, - nearestMountedAncestor, - instance - ) { - try { - if ( - ((instance.props = resolveClassComponentProps( - current.type, - current.memoizedProps, - current.elementType === current.type - )), - (instance.state = current.memoizedState), - shouldProfile(current)) - ) - try { - startLayoutEffectTimer(), instance.componentWillUnmount(); - } finally { - recordLayoutEffectDuration(current); - } - else instance.componentWillUnmount(); - } catch (error$7) { - captureCommitPhaseError(current, nearestMountedAncestor, error$7); - } + function callComponentWillUnmountWithTimer(current, instance) { + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); + instance.state = current.memoizedState; + if (shouldProfile(current)) + try { + startLayoutEffectTimer(), instance.componentWillUnmount(); + } finally { + recordLayoutEffectDuration(current); + } + else instance.componentWillUnmount(); } function safelyAttachRef(current, nearestMountedAncestor) { try { @@ -12358,7 +12152,7 @@ __DEV__ && selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$50) { + } catch (e$45) { JSCompiler_temp = null; break a; } @@ -12542,8 +12336,23 @@ __DEV__ && (current.__reactInternalSnapshotBeforeUpdate = flags)); break; case 3: - 0 !== (flags & 1024) && - clearContainer(finishedWork.stateNode.containerInfo); + if (0 !== (flags & 1024)) + a: if ( + ((finishedWork = finishedWork.stateNode.containerInfo), + (current = finishedWork.nodeType), + current === DOCUMENT_NODE) + ) + clearContainerSparingly(finishedWork); + else if (1 === current) + switch (finishedWork.nodeName) { + case "HEAD": + case "HTML": + case "BODY": + clearContainerSparingly(finishedWork); + break a; + default: + finishedWork.textContent = ""; + } break; case 5: case 26: @@ -12993,40 +12802,30 @@ __DEV__ && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevState = - null !== finishedWork.memoizedState || - offscreenSubtreeIsHidden), - !prevState) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevState; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects( - finishedRoot, - finishedWork, - committedLanes - ); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else - recursivelyTraverseLayoutEffects( - finishedRoot, - finishedWork, - committedLanes - ); + prevState = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevState) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevState; + (offscreenSubtreeWasHidden = current) && + !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects( + finishedRoot, + finishedWork, + committedLanes + ); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -13489,15 +13288,21 @@ __DEV__ && ); break; case 1: - offscreenSubtreeWasHidden || + if ( + !offscreenSubtreeWasHidden && (safelyDetachRef(deletedFiber, nearestMountedAncestor), (prevHostParent = deletedFiber.stateNode), - "function" === typeof prevHostParent.componentWillUnmount && - safelyCallComponentWillUnmount( + "function" === typeof prevHostParent.componentWillUnmount) + ) + try { + callComponentWillUnmountWithTimer(deletedFiber, prevHostParent); + } catch (error$7) { + captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - prevHostParent - )); + error$7 + ); + } recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -13514,21 +13319,15 @@ __DEV__ && break; case 22: 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( @@ -14122,15 +13921,13 @@ __DEV__ && safelyDetachRef(current, current.return); domElement = null !== finishedWork.memoizedState; newProps = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & 1 - ? ((suspenseCallback = offscreenSubtreeIsHidden), - (retryQueue = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = suspenseCallback || domElement), - (offscreenSubtreeWasHidden = retryQueue || newProps), - recursivelyTraverseMutationEffects(root, finishedWork, lanes), - (offscreenSubtreeWasHidden = retryQueue), - (offscreenSubtreeIsHidden = suspenseCallback)) - : recursivelyTraverseMutationEffects(root, finishedWork, lanes); + suspenseCallback = offscreenSubtreeIsHidden; + retryQueue = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = suspenseCallback || domElement; + offscreenSubtreeWasHidden = retryQueue || newProps; + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + offscreenSubtreeWasHidden = retryQueue; + offscreenSubtreeIsHidden = suspenseCallback; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -14146,8 +13943,7 @@ __DEV__ && null === current || newProps || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -14368,12 +14164,18 @@ __DEV__ && case 1: safelyDetachRef(finishedWork, finishedWork.return); var instance = finishedWork.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount( - finishedWork, - finishedWork.return, - instance - ); + if ("function" === typeof instance.componentWillUnmount) { + var nearestMountedAncestor = finishedWork.return; + try { + callComponentWillUnmountWithTimer(finishedWork, instance); + } catch (error$7) { + captureCommitPhaseError( + finishedWork, + nearestMountedAncestor, + error$7 + ); + } + } recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 26: @@ -14752,20 +14554,12 @@ __DEV__ && committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) : nextCache._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -14888,21 +14682,12 @@ __DEV__ && committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((_instance4._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) : ((_instance4._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, @@ -15302,88 +15087,11 @@ __DEV__ && ))); } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListMount(Layout | HasEffect, fiber); - } catch (error$40) { - captureCommitPhaseError(fiber, fiber.return, error$40); - } - break; - case 1: - var instance = fiber.stateNode; - if ("function" === typeof instance.componentDidMount) - try { - instance.componentDidMount(); - } catch (error$41) { - captureCommitPhaseError(fiber, fiber.return, error$41); - } - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListMount(Passive | HasEffect, fiber); - } catch (error$42) { - captureCommitPhaseError(fiber, fiber.return, error$42); - } - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListUnmount( - Layout | HasEffect, - fiber, - fiber.return - ); - } catch (error$43) { - captureCommitPhaseError(fiber, fiber.return, error$43); - } - 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: - try { - commitHookEffectListUnmount( - Passive | HasEffect, - fiber, - fiber.return - ); - } catch (error$44) { - captureCommitPhaseError(fiber, fiber.return, error$44); - } - } - } 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 @@ -15471,17 +15179,15 @@ __DEV__ && )); } function requestUpdateLane(fiber) { - var mode = fiber.mode; - if (!disableLegacyMode && 0 === (mode & 1)) return SyncLane; 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(); @@ -15526,10 +15232,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 )); @@ -15544,21 +15250,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 && @@ -15570,13 +15275,6 @@ __DEV__ && workInProgressDeferredLane )); ensureRootIsScheduled(root); - lane !== SyncLane || - executionContext !== NoContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ReactSharedInternals.isBatchingLegacy || - ((workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(!0)); } } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -15809,7 +15507,7 @@ __DEV__ && check = check.value; try { if (!objectIs(getSnapshot(), check)) return !1; - } catch (error$45) { + } catch (error$40) { return !1; } } @@ -15865,7 +15563,7 @@ __DEV__ && currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync(root, lanes); - if ((disableLegacyMode || 0 !== root.tag) && exitStatus === RootErrored) { + if (exitStatus === RootErrored) { var originallyAttemptedLanes = lanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( root, @@ -15904,20 +15602,6 @@ __DEV__ && ensureRootIsScheduled(root); return null; } - 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)); - } - } function flushSyncWork$1() { return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(!1), !1) @@ -16132,8 +15816,8 @@ __DEV__ && } workLoopSync(); break; - } catch (thrownValue$46) { - handleThrow(root, thrownValue$46); + } catch (thrownValue$41) { + handleThrow(root, thrownValue$41); } while (1); lanes && root.shellSuspendCounter++; @@ -16275,8 +15959,8 @@ __DEV__ && ? workLoopSync() : workLoopConcurrent(); break; - } catch (thrownValue$47) { - handleThrow(root, thrownValue$47); + } catch (thrownValue$42) { + handleThrow(root, thrownValue$42); } while (1); resetContextDependencies(); @@ -16420,9 +16104,9 @@ __DEV__ && workInProgress = null; return; } - } catch (error$48) { + } catch (error$43) { if (null !== returnFiber) - throw ((workInProgress = returnFiber), error$48); + throw ((workInProgress = returnFiber), error$43); workInProgressRootExitStatus = RootFatalErrored; logUncaughtError( root, @@ -16650,7 +16334,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(); @@ -16669,8 +16353,7 @@ __DEV__ && remainingLanes.value, transitions ); - 0 === (pendingPassiveEffectsLanes & (SyncLane | SyncHydrationLane)) || - (!disableLegacyMode && 0 === root.tag) || + 0 !== (pendingPassiveEffectsLanes & (SyncLane | SyncHydrationLane)) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && @@ -16797,7 +16480,7 @@ __DEV__ && "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped && injectedProfilingHooks.markPassiveEffectsStopped(); - commitDoubleInvokeEffectsInDEV(root, !0); + commitDoubleInvokeEffectsInDEV(root); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(!1); if (enableTransitionTracing) { @@ -16935,8 +16618,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" @@ -16954,12 +16636,7 @@ __DEV__ && ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || 0 !== (retryLane & 1) - ? claimNextRetryLane() - : SyncLane)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -17070,52 +16747,17 @@ __DEV__ && reconnectPassiveEffects(root, fiber, 0, null, !1); 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 || @@ -17151,15 +16793,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", @@ -17532,12 +17167,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 ( @@ -17755,7 +17388,7 @@ __DEV__ && onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -17795,30 +17428,16 @@ __DEV__ && for ( this.transitionCallbacks = null, containerInfo = this.transitionLanes = [], - identifierPrefix = 0; - identifierPrefix < TotalLanes; - identifierPrefix++ + tag = 0; + tag < TotalLanes; + tag++ ) containerInfo.push(null); this.passiveEffectDuration = this.effectDuration = 0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; - for ( - identifierPrefix = 0; - identifierPrefix < TotalLanes; - 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; tag < TotalLanes; tag++) containerInfo.push(new Set()); + this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; } function createFiberRoot( containerInfo, @@ -17848,13 +17467,11 @@ __DEV__ && containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), - !0 === isStrictMode && (tag |= 24), - concurrentUpdatesByDefaultOverride && (tag |= 32)) - : (tag = 0); - isDevToolsPresent && (tag |= 2); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + concurrentUpdatesByDefaultOverride && (hydrationCallbacks |= 32); + isDevToolsPresent && (hydrationCallbacks |= 2); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; concurrentUpdatesByDefaultOverride = createCache(); @@ -17958,61 +17575,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, - concurrentUpdatesByDefaultOverride, - 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, @@ -18084,17 +17646,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) { @@ -18128,7 +17679,7 @@ __DEV__ && if (isInsideEventHandler) return fn(a, b); isInsideEventHandler = !0; try { - return batchedUpdates$1(fn, a, b); + return fn(a); } finally { if ( ((isInsideEventHandler = !1), @@ -18819,8 +18370,8 @@ __DEV__ && previousInstance.currentTarget = currentTarget; try { _dispatchListeners$i(previousInstance); - } catch (error$51) { - reportGlobalError(error$51); + } catch (error$46) { + reportGlobalError(error$46); } previousInstance.currentTarget = null; previousInstance = instance; @@ -18841,8 +18392,8 @@ __DEV__ && previousInstance.currentTarget = currentTarget; try { _dispatchListeners$i(previousInstance); - } catch (error$51) { - reportGlobalError(error$51); + } catch (error$46) { + reportGlobalError(error$46); } previousInstance.currentTarget = null; previousInstance = instance; @@ -21847,20 +21398,6 @@ __DEV__ && } while (node); retryIfBlockedOn(suspenseInstance); } - 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); @@ -22111,16 +21648,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) { @@ -23488,16 +23015,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, @@ -23528,30 +23045,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) @@ -23579,37 +23072,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(!1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; - } function ReactDOMRoot(internalRoot) { this._internalRoot = internalRoot; } @@ -23644,122 +23106,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, - !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 && @@ -23800,7 +23146,6 @@ __DEV__ && dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableNoCloningMemoCache = dynamicFeatureFlags.enableNoCloningMemoCache, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -26284,7 +25629,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), @@ -26303,7 +25648,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), @@ -26321,7 +25666,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), @@ -26486,7 +25831,6 @@ __DEV__ && callbacks = [], PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, NoContext = 0, - BatchedContext = 1, RenderContext = 2, CommitContext = 4, RootInProgress = 0, @@ -26644,7 +25988,7 @@ __DEV__ && }); window.addEventListener("test", options$jscomp$0, options$jscomp$0); window.removeEventListener("test", options$jscomp$0, options$jscomp$0); - } catch (e$49) { + } catch (e$44) { passiveBrowserEventsSupported = !1; } var EventListenerWWW = require("EventListener"), @@ -27081,7 +26425,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 @@ -27344,17 +26692,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-50e89ec9f2-20240612" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-fb9a90fa48-20240614" !== 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-50e89ec9f2-20240612\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-fb9a90fa48-20240614\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27367,7 +26712,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) { @@ -27420,12 +26764,12 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }); })({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 1, - version: "19.0.0-www-classic-50e89ec9f2-20240612", + version: "19.0.0-www-classic-fb9a90fa48-20240614", rendererPackageName: "react-dom" }) && canUseDOM && @@ -27460,7 +26804,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) { @@ -27508,33 +26861,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 () { @@ -27632,7 +26958,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( { @@ -27672,11 +27016,11 @@ __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, concurrentUpdatesByDefaultOverride, @@ -27687,6 +27031,15 @@ __DEV__ && transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(options); + concurrentUpdatesByDefaultOverride = createUpdate(isStrictMode); + concurrentUpdatesByDefaultOverride.callback = null; + enqueueUpdate(options, concurrentUpdatesByDefaultOverride, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -27952,80 +27305,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) @@ -28068,7 +27365,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-50e89ec9f2-20240612"; + exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; "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 d053299ee0..6b0fcb957c 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -26497,11 +26497,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-50e89ec9f2-20240612" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-fb9a90fa48-20240614" !== 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-50e89ec9f2-20240612\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-fb9a90fa48-20240614\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -26566,12 +26566,12 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }); })({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 1, - version: "19.0.0-www-modern-50e89ec9f2-20240612", + version: "19.0.0-www-modern-fb9a90fa48-20240614", rendererPackageName: "react-dom" }) && canUseDOM && @@ -27167,7 +27167,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-50e89ec9f2-20240612"; + exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; "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 82e8905837..8e3c5034e8 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -61,7 +61,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"), disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableNoCloningMemoCache = dynamicFeatureFlags.enableNoCloningMemoCache, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -199,9 +198,6 @@ function getComponentNameFromFiber(fiber) { return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -1551,10 +1547,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)); @@ -1934,7 +1926,7 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { do { var didPerformSomeWork = !1; for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root$26.tag)) { + if (!onlyLegacy) { var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$28 = getNextLanes( root$26, @@ -3166,15 +3158,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; @@ -4256,7 +4240,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$77 = enqueueUpdate(provider, fiber, lane); null !== root$77 && @@ -4274,7 +4258,7 @@ function refreshCache(fiber, seedKey, seedValue) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -4291,7 +4275,7 @@ function dispatchReducerAction(fiber, queue, action) { entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber), + var lane = requestUpdateLane(), update = { lane: lane, revertLane: 0, @@ -4717,7 +4701,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); @@ -4728,7 +4712,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; @@ -4740,7 +4724,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); @@ -4766,33 +4750,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, @@ -4807,41 +4764,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, @@ -4977,36 +4899,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, @@ -5020,100 +4912,71 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + enableLazyContextPropagation && + ((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)))) @@ -5128,10 +4991,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), @@ -5139,62 +5002,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) { @@ -5304,10 +5159,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$94 = workInProgress.stateNode; + root$93 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$94.incompleteTransitions.has(transition)) { + if (!root$93.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5315,11 +5170,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$94.incompleteTransitions.set(transition, markerInstance); + root$93.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$94.incompleteTransitions.forEach(function (markerInstance) { + root$93.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5495,36 +5350,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; @@ -5654,7 +5501,7 @@ function replayFunctionComponent( return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -5665,47 +5512,123 @@ function updateClassComponent( pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress, renderLanes); - 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( - 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) + 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), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (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, + 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$jscomp$0) { + 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), + (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 || @@ -5720,49 +5643,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; - cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + unmaskedContext = workInProgress.stateNode; + cloneUpdateQueue(current$jscomp$0, workInProgress); + 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)) @@ -5773,30 +5697,31 @@ 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 || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies)) ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, @@ -5805,117 +5730,106 @@ function updateClassComponent( nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, oldContext ) || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); -} -function finishClassComponent( - current$jscomp$0, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes -) { + unmaskedContext = nextProps; markRef(current$jscomp$0, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + (current = workInProgress), + (isLegacyContextConsumer = + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? null + : unmaskedContext.render()), + (workInProgress.flags |= 1), + null !== current$jscomp$0 && nextProps + ? ((workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + isLegacyContextConsumer, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current$jscomp$0 = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current$jscomp$0 = bailoutOnAlreadyFinishedWork( current$jscomp$0, workInProgress, renderLanes - ) - ); - shouldUpdate = workInProgress.stateNode; - current = workInProgress; - var nextChildren = - didCaptureError && "function" !== typeof Component.getDerivedStateFromError - ? null - : shouldUpdate.render(); - workInProgress.flags |= 1; - null !== current$jscomp$0 && didCaptureError - ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - nextChildren, - 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; @@ -6053,18 +5967,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) @@ -6113,11 +6027,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, @@ -6130,13 +6042,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)), (nextProps.childLanes = getRemainingWorkInPrimaryTree( @@ -6241,7 +6152,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 )), @@ -6249,12 +6160,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, @@ -6270,20 +6181,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( @@ -6348,32 +6251,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); @@ -6384,30 +6282,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, @@ -6485,68 +6379,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; @@ -6716,12 +6599,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) @@ -6747,10 +6629,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); @@ -6763,7 +6642,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); @@ -6786,43 +6665,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; @@ -6831,19 +6704,19 @@ function beginWork(current, workInProgress, renderLanes) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); - nextProps !== elementType.cache && + nextProps !== init.cache && propagateContextChange(workInProgress, CacheContext, 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( @@ -6960,7 +6833,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, @@ -6972,22 +6845,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, @@ -6995,11 +6868,11 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = elementType), + (HostTransitionContext._currentValue = init), enableLazyContextPropagation || (didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== elementType && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, @@ -7047,19 +6920,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 ( @@ -7096,14 +6963,14 @@ function beginWork(current, workInProgress, renderLanes) { props = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - elementType = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextState = elementType.value; + nextState = init.value; pushProvider(workInProgress, props, nextState); if (!enableLazyContextPropagation && null !== nextProps) if (objectIs(nextProps.value, nextState)) { if ( - nextProps.children === elementType.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -7114,24 +6981,19 @@ function beginWork(current, workInProgress, renderLanes) { break a; } } else propagateContextChange(workInProgress, props, renderLanes); - reconcileChildren( - current, - workInProgress, - elementType.children, - renderLanes - ); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(elementType)), - (props = props(elementType)), + (init = readContext(init)), + (props = props(init)), (workInProgress.flags |= 1), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child @@ -7139,20 +7001,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( @@ -7162,47 +7018,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, renderLanes); - 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: @@ -7221,38 +7036,34 @@ function beginWork(current, workInProgress, renderLanes) { prepareToReadContext(workInProgress, renderLanes), (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 && propagateContextChange( workInProgress, CacheContext, @@ -7787,14 +7598,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$137 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$137 = lastTailNode), + for (var lastTailNode$129 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$129 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$137 + null === lastTailNode$129 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$137.sibling = null); + : (lastTailNode$129.sibling = null); } } function bubbleProperties(completedWork) { @@ -7804,19 +7615,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$138 = completedWork.child; null !== child$138; ) - (newChildLanes |= child$138.lanes | child$138.childLanes), - (subtreeFlags |= child$138.subtreeFlags & 31457280), - (subtreeFlags |= child$138.flags & 31457280), - (child$138.return = completedWork), - (child$138 = child$138.sibling); + for (var child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags & 31457280), + (subtreeFlags |= child$130.flags & 31457280), + (child$130.return = completedWork), + (child$130 = child$130.sibling); else - for (child$138 = completedWork.child; null !== child$138; ) - (newChildLanes |= child$138.lanes | child$138.childLanes), - (subtreeFlags |= child$138.subtreeFlags), - (subtreeFlags |= child$138.flags), - (child$138.return = completedWork), - (child$138 = child$138.sibling); + for (child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags), + (subtreeFlags |= child$130.flags), + (child$130.return = completedWork), + (child$130 = child$130.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7825,8 +7636,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: @@ -7839,7 +7648,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 ); @@ -8113,11 +7923,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$150 = null; + var cache$142 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$150 = newProps.memoizedState.cachePool.pool); - cache$150 !== type && (newProps.flags |= 2048); + (cache$142 = newProps.memoizedState.cachePool.pool); + cache$142 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8146,18 +7956,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$150 = type.rendering; - if (null === cache$150) + cache$142 = type.rendering; + if (null === cache$142) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8165,11 +7970,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$150 = findFirstSuspended(current); - if (null !== cache$150) { + cache$142 = findFirstSuspended(current); + if (null !== cache$142) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$150.updateQueue; + current = cache$142.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8194,7 +7999,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$150)), null !== current)) { + if (((current = findFirstSuspended(cache$142)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8204,7 +8009,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$150.alternate && + !cache$142.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8217,13 +8022,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$150.sibling = workInProgress.child), - (workInProgress.child = cache$150)) + ? ((cache$142.sibling = workInProgress.child), + (workInProgress.child = cache$142)) : ((current = type.last), null !== current - ? (current.sibling = cache$150) - : (workInProgress.child = cache$150), - (type.last = cache$150)); + ? (current.sibling = cache$142) + : (workInProgress.child = cache$142), + (type.last = cache$142)); } if (null !== type.tail) return ( @@ -8264,14 +8069,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), @@ -8307,8 +8112,6 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -8317,7 +8120,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) @@ -8397,7 +8201,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); @@ -8500,8 +8306,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$168) { - captureCommitPhaseError(current, nearestMountedAncestor, error$168); + } catch (error$159) { + captureCommitPhaseError(current, nearestMountedAncestor, error$159); } else ref.current = null; } @@ -8538,7 +8344,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$228) { + } catch (e$219) { JSCompiler_temp = null; break a; } @@ -8670,8 +8476,21 @@ function commitBeforeMutationEffects(root, firstChild) { } break; case 3: - 0 !== (flags & 1024) && - clearContainer(firstChild.stateNode.containerInfo); + if (0 !== (flags & 1024)) { + var container = firstChild.stateNode.containerInfo, + 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 = ""; + } + } break; case 5: case 26: @@ -8806,11 +8625,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$170) { + } catch (error$161) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$170 + error$161 ); } } @@ -8855,30 +8674,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) @@ -9333,21 +9147,15 @@ function commitDeletionEffectsOnFiber( break; case 22: 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( @@ -9359,19 +9167,19 @@ function commitDeletionEffectsOnFiber( } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { - var current$182 = finishedWork.alternate; + var current$173 = finishedWork.alternate; if ( - null !== current$182 && - ((current$182 = current$182.memoizedState), - null !== current$182 && - ((current$182 = current$182.dehydrated), null !== current$182)) + null !== current$173 && + ((current$173 = current$173.memoizedState), + null !== current$173 && + ((current$173 = current$173.dehydrated), null !== current$173)) ) try { - retryIfBlockedOn(current$182); + retryIfBlockedOn(current$173); var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$182); + onHydrated && onHydrated(current$173); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -9489,8 +9297,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$184) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$184); + } catch (error$175) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$175); } } break; @@ -9663,11 +9471,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$185) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$185 + error$176 ); } break; @@ -9704,8 +9512,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$186) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$186); + } catch (error$177) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$177); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -9715,8 +9523,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$188) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$188); + } catch (error$179) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$179); } } flags & 1024 && (needsFormReset = !0); @@ -9731,8 +9539,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$189) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$189); + } catch (error$180) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$180); } } break; @@ -9746,8 +9554,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$190) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$190); + } catch (error$181) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$181); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -9779,8 +9587,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$192) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$192); + } catch (error$183) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$183); } flags = finishedWork.updateQueue; null !== flags && @@ -9794,15 +9602,13 @@ function commitMutationEffectsOnFiber(finishedWork, root) { safelyDetachRef(current, current.return); domElement = null !== finishedWork.memoizedState; newProps = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & 1 - ? ((suspenseCallback = offscreenSubtreeIsHidden), - (retryQueue = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = suspenseCallback || domElement), - (offscreenSubtreeWasHidden = retryQueue || newProps), - recursivelyTraverseMutationEffects(root, finishedWork), - (offscreenSubtreeWasHidden = retryQueue), - (offscreenSubtreeIsHidden = suspenseCallback)) - : recursivelyTraverseMutationEffects(root, finishedWork); + suspenseCallback = offscreenSubtreeIsHidden; + retryQueue = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = suspenseCallback || domElement; + offscreenSubtreeWasHidden = retryQueue || newProps; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = retryQueue; + offscreenSubtreeIsHidden = suspenseCallback; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -9818,8 +9624,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null === current || newProps || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -9858,11 +9663,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$173) { + } catch (error$164) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$173 + error$164 ); } } else if ( @@ -9937,21 +9742,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$174 = JSCompiler_inline_result.stateNode; + var parent$165 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$174, ""), + (setTextContent(parent$165, ""), (JSCompiler_inline_result.flags &= -33)); - var before$175 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$175, parent$174); + var before$166 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$166, parent$165); break; case 3: case 4: - var parent$176 = JSCompiler_inline_result.stateNode.containerInfo, - before$177 = getHostSibling(finishedWork); + var parent$167 = JSCompiler_inline_result.stateNode.containerInfo, + before$168 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$177, - parent$176 + before$168, + parent$167 ); break; default: @@ -10030,7 +9835,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$196 = parentFiber.alternate, + var current$187 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -10058,16 +9863,16 @@ function recursivelyTraverseReappearLayoutEffects( } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } - current$196 = finishedWork.updateQueue; - if (null !== current$196) { - var hiddenCallbacks = current$196.shared.hiddenCallbacks; + current$187 = finishedWork.updateQueue; + if (null !== current$187) { + var hiddenCallbacks = current$187.shared.hiddenCallbacks; if (null !== hiddenCallbacks) for ( - current$196.shared.hiddenCallbacks = null, current$196 = 0; - current$196 < hiddenCallbacks.length; - current$196++ + current$187.shared.hiddenCallbacks = null, current$187 = 0; + current$187 < hiddenCallbacks.length; + current$187++ ) - callCallback(hiddenCallbacks[current$196], finishedRoot); + callCallback(hiddenCallbacks[current$187], finishedRoot); } includeWorkInProgressEffects && flags & 64 && @@ -10083,7 +9888,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$196 && + null === current$187 && flags & 4 && commitHostComponentMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -10321,15 +10126,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, @@ -10427,9 +10224,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$203 = finishedWork.stateNode; + var instance$194 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$203._visibility & 4 + ? instance$194._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10437,20 +10234,11 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork ) - : ((instance$203._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$203._visibility |= 4), + : ((instance$194._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10463,7 +10251,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$203 + instance$194 ); break; case 24: @@ -10884,16 +10672,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 && @@ -10918,21 +10704,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) && @@ -10944,12 +10729,6 @@ function scheduleUpdateOnFiber(root, fiber, lane) { workInProgressDeferredLane )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ((workInProgressRootRenderTargetTime = now() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(!0)); } } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -11215,7 +10994,7 @@ function performSyncWorkOnRoot(root, lanes) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; var exitStatus = renderRootSync(root, lanes); - if ((disableLegacyMode || 0 !== root.tag) && 2 === exitStatus) { + if (2 === exitStatus) { var originallyAttemptedLanes = lanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( root, @@ -11254,19 +11033,6 @@ function performSyncWorkOnRoot(root, lanes) { ensureRootIsScheduled(root); return null; } -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)); - } -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(!1), !1) @@ -11430,8 +11196,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$214) { - handleThrow(root, thrownValue$214); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); lanes && root.shellSuspendCounter++; @@ -11540,8 +11306,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$216) { - handleThrow(root, thrownValue$216); + } catch (thrownValue$207) { + handleThrow(root, thrownValue$207); } while (1); resetContextDependencies(); @@ -11766,12 +11532,12 @@ function commitRootImpl( Internals.p = 2; var prevExecutionContext = executionContext; executionContext |= 4; - var shouldFireAfterActiveInstanceBlur$222 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$213 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$222 && + shouldFireAfterActiveInstanceBlur$213 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11804,9 +11570,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)) || @@ -11843,7 +11607,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$223 = rootWithPendingPassiveEffects, + var root$214 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11858,7 +11622,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$223, remainingLanes); + releaseRootPooledCache(root$214, remainingLanes); } } return !1; @@ -11983,10 +11747,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), @@ -12161,12 +11922,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 ( @@ -12336,7 +12095,7 @@ function FiberRootNode( onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -12410,12 +12169,10 @@ function createFiberRoot( containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), - !0 === isStrictMode && (tag |= 24), - concurrentUpdatesByDefaultOverride && (tag |= 32)) - : (tag = 0); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + concurrentUpdatesByDefaultOverride && (hydrationCallbacks |= 32); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; concurrentUpdatesByDefaultOverride = createCache(); @@ -12490,73 +12247,6 @@ function findHostInstance(component) { component = findCurrentHostFiber(fiber); 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, - concurrentUpdatesByDefaultOverride, - 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, @@ -12578,17 +12268,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) { @@ -12615,7 +12294,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), @@ -13146,19 +12825,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$385; + var JSCompiler_inline_result$jscomp$369; if (canUseDOM) { - var isSupported$jscomp$inline_1555 = "oninput" in document; - if (!isSupported$jscomp$inline_1555) { - var element$jscomp$inline_1556 = document.createElement("div"); - element$jscomp$inline_1556.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1555 = - "function" === typeof element$jscomp$inline_1556.oninput; + var isSupported$jscomp$inline_1536 = "oninput" in document; + if (!isSupported$jscomp$inline_1536) { + var element$jscomp$inline_1537 = document.createElement("div"); + element$jscomp$inline_1537.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1536 = + "function" === typeof element$jscomp$inline_1537.oninput; } - JSCompiler_inline_result$jscomp$385 = isSupported$jscomp$inline_1555; - } else JSCompiler_inline_result$jscomp$385 = !1; + JSCompiler_inline_result$jscomp$369 = isSupported$jscomp$inline_1536; + } else JSCompiler_inline_result$jscomp$369 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$385 && + JSCompiler_inline_result$jscomp$369 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13567,20 +13246,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1596 = 0; - i$jscomp$inline_1596 < simpleEventPluginEvents.length; - i$jscomp$inline_1596++ + var i$jscomp$inline_1577 = 0; + i$jscomp$inline_1577 < simpleEventPluginEvents.length; + i$jscomp$inline_1577++ ) { - var eventName$jscomp$inline_1597 = - simpleEventPluginEvents[i$jscomp$inline_1596], - domEventName$jscomp$inline_1598 = - eventName$jscomp$inline_1597.toLowerCase(), - capitalizedEvent$jscomp$inline_1599 = - eventName$jscomp$inline_1597[0].toUpperCase() + - eventName$jscomp$inline_1597.slice(1); + var eventName$jscomp$inline_1578 = + simpleEventPluginEvents[i$jscomp$inline_1577], + domEventName$jscomp$inline_1579 = + eventName$jscomp$inline_1578.toLowerCase(), + capitalizedEvent$jscomp$inline_1580 = + eventName$jscomp$inline_1578[0].toUpperCase() + + eventName$jscomp$inline_1578.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1598, - "on" + capitalizedEvent$jscomp$inline_1599 + domEventName$jscomp$inline_1579, + "on" + capitalizedEvent$jscomp$inline_1580 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15058,14 +14737,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$257 in nextProps) { - var propKey = nextProps[propKey$257]; - lastProp = lastProps[propKey$257]; + for (var propKey$248 in nextProps) { + var propKey = nextProps[propKey$248]; + lastProp = lastProps[propKey$248]; if ( - nextProps.hasOwnProperty(propKey$257) && + nextProps.hasOwnProperty(propKey$248) && (null != propKey || null != lastProp) ) - switch (propKey$257) { + switch (propKey$248) { case "type": type = propKey; break; @@ -15094,7 +14773,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$257, + propKey$248, propKey, nextProps, lastProp @@ -15113,7 +14792,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$257 = null; + propKey = value = defaultValue = propKey$248 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15144,7 +14823,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$257 = type; + propKey$248 = type; break; case "defaultValue": defaultValue = type; @@ -15165,15 +14844,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$257 - ? updateOptions(domElement, !!lastProps, propKey$257, !1) + null != propKey$248 + ? updateOptions(domElement, !!lastProps, propKey$248, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$257 = null; + propKey = propKey$248 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15197,7 +14876,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$257 = name; + propKey$248 = name; break; case "defaultValue": propKey = name; @@ -15211,17 +14890,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$257, propKey); + updateTextarea(domElement, propKey$248, propKey); return; case "option": - for (var propKey$273 in lastProps) + for (var propKey$264 in lastProps) if ( - ((propKey$257 = lastProps[propKey$273]), - lastProps.hasOwnProperty(propKey$273) && - null != propKey$257 && - !nextProps.hasOwnProperty(propKey$273)) + ((propKey$248 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$264)) ) - switch (propKey$273) { + switch (propKey$264) { case "selected": domElement.selected = !1; break; @@ -15229,33 +14908,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$273, + propKey$264, null, nextProps, - propKey$257 + propKey$248 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$257 = nextProps[lastDefaultValue]), + ((propKey$248 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$257 !== propKey && - (null != propKey$257 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$257 && - "function" !== typeof propKey$257 && - "symbol" !== typeof propKey$257; + propKey$248 && + "function" !== typeof propKey$248 && + "symbol" !== typeof propKey$248; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$257, + propKey$248, nextProps, propKey ); @@ -15276,24 +14955,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$278 in lastProps) - (propKey$257 = lastProps[propKey$278]), - lastProps.hasOwnProperty(propKey$278) && - null != propKey$257 && - !nextProps.hasOwnProperty(propKey$278) && - setProp(domElement, tag, propKey$278, null, nextProps, propKey$257); + for (var propKey$269 in lastProps) + (propKey$248 = lastProps[propKey$269]), + lastProps.hasOwnProperty(propKey$269) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$269) && + setProp(domElement, tag, propKey$269, null, nextProps, propKey$248); for (checked in nextProps) if ( - ((propKey$257 = nextProps[checked]), + ((propKey$248 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$257 !== propKey && - (null != propKey$257 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$257) + if (null != propKey$248) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15301,7 +14980,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$257, + propKey$248, nextProps, propKey ); @@ -15309,49 +14988,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$283 in lastProps) - (propKey$257 = lastProps[propKey$283]), - lastProps.hasOwnProperty(propKey$283) && - void 0 !== propKey$257 && - !nextProps.hasOwnProperty(propKey$283) && + for (var propKey$274 in lastProps) + (propKey$248 = lastProps[propKey$274]), + lastProps.hasOwnProperty(propKey$274) && + void 0 !== propKey$248 && + !nextProps.hasOwnProperty(propKey$274) && setPropOnCustomElement( domElement, tag, - propKey$283, + propKey$274, void 0, nextProps, - propKey$257 + propKey$248 ); for (defaultChecked in nextProps) - (propKey$257 = nextProps[defaultChecked]), + (propKey$248 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$257 === propKey || - (void 0 === propKey$257 && void 0 === propKey) || + propKey$248 === propKey || + (void 0 === propKey$248 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$257, + propKey$248, nextProps, propKey ); return; } } - for (var propKey$288 in lastProps) - (propKey$257 = lastProps[propKey$288]), - lastProps.hasOwnProperty(propKey$288) && - null != propKey$257 && - !nextProps.hasOwnProperty(propKey$288) && - setProp(domElement, tag, propKey$288, null, nextProps, propKey$257); + for (var propKey$279 in lastProps) + (propKey$248 = lastProps[propKey$279]), + lastProps.hasOwnProperty(propKey$279) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$279) && + setProp(domElement, tag, propKey$279, null, nextProps, propKey$248); for (lastProp in nextProps) - (propKey$257 = nextProps[lastProp]), + (propKey$248 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$257 === propKey || - (null == propKey$257 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$257, nextProps, propKey); + propKey$248 === propKey || + (null == propKey$248 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$248, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15471,20 +15150,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); @@ -15653,7 +15318,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, @@ -15664,12 +15329,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); @@ -15946,26 +15608,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$296 = getResourcesFromRoot( + var styles$287 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$297 = styles$296.get(type); - resource$297 || + resource$288 = styles$287.get(type); + resource$288 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$297 = { + (resource$288 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$296.set(type, resource$297), - (styles$296 = JSCompiler_inline_result.querySelector( + styles$287.set(type, resource$288), + (styles$287 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$296._p && - ((resource$297.instance = styles$296), - (resource$297.state.loading = 5)), + !styles$287._p && + ((resource$288.instance = styles$287), + (resource$288.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15978,16 +15640,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$296 || + styles$287 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$297.state + resource$288.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$297; + return resource$288; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16084,37 +15746,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$302 = hoistableRoot.querySelector( + var instance$293 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$302) + if (instance$293) return ( (resource.state.loading |= 4), - (resource.instance = instance$302), - markNodeAsHoistable(instance$302), - instance$302 + (resource.instance = instance$293), + markNodeAsHoistable(instance$293), + instance$293 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$302 = ( + instance$293 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$302); - var linkInstance = instance$302; + markNodeAsHoistable(instance$293); + var linkInstance = instance$293; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$302, "link", instance); + setInitialProperties(instance$293, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$302, props.precedence, hoistableRoot); - return (resource.instance = instance$302); + insertStylesheet(instance$293, props.precedence, hoistableRoot); + return (resource.instance = instance$293); case "script": - instance$302 = getScriptKey(props.src); + instance$293 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$302) + getScriptSelectorFromKey(instance$293) )) ) return ( @@ -16123,7 +15785,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$302))) + if ((styleProps = preloadPropsMap.get(instance$293))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16659,7 +16321,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); @@ -17092,16 +16754,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 && @@ -17123,69 +16775,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_1769 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1750 = React.version; if ( - "19.0.0-www-classic-50e89ec9f2-20240612" !== - isomorphicReactPackageVersion$jscomp$inline_1769 + "19.0.0-www-classic-fb9a90fa48-20240614" !== + isomorphicReactPackageVersion$jscomp$inline_1750 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1769, - "19.0.0-www-classic-50e89ec9f2-20240612" + isomorphicReactPackageVersion$jscomp$inline_1750, + "19.0.0-www-classic-fb9a90fa48-20240614" ) ); -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(!1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; -} -var flushSync = disableLegacyMode ? flushSync$1 : flushSyncFromReconciler; Internals.findDOMNode = function (componentOrElement) { return findHostInstance(componentOrElement); }; @@ -17199,17 +16805,17 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1776 = { +var devToolsConfig$jscomp$inline_1752 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-50e89ec9f2-20240612", + version: "19.0.0-www-classic-fb9a90fa48-20240614", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2220 = { - bundleType: devToolsConfig$jscomp$inline_1776.bundleType, - version: devToolsConfig$jscomp$inline_1776.version, - rendererPackageName: devToolsConfig$jscomp$inline_1776.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1776.rendererConfig, +var internals$jscomp$inline_2229 = { + bundleType: devToolsConfig$jscomp$inline_1752.bundleType, + version: devToolsConfig$jscomp$inline_1752.version, + rendererPackageName: devToolsConfig$jscomp$inline_1752.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1752.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17225,26 +16831,26 @@ var internals$jscomp$inline_2220 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1776.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1752.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2221 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2230 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2221.isDisabled && - hook$jscomp$inline_2221.supportsFiber + !hook$jscomp$inline_2230.isDisabled && + hook$jscomp$inline_2230.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2221.inject( - internals$jscomp$inline_2220 + (rendererID = hook$jscomp$inline_2230.inject( + internals$jscomp$inline_2229 )), - (injectedHook = hook$jscomp$inline_2221); + (injectedHook = hook$jscomp$inline_2230); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17254,7 +16860,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 () { @@ -17262,7 +16870,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; } @@ -17306,105 +16915,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$323); - originalCallback.call(instance); - }; - } - var root$323 = createHydrationContainer( - initialChildren, - callback, - container, - 0, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$323; - container[internalContainerInstanceKey] = root$323.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - flushSyncWork$1(); - return root$323; - } - clearContainer(container); - if ("function" === typeof callback) { - var originalCallback$324 = callback; - callback = function () { - var instance = getPublicRootInstance(root$325); - originalCallback$324.call(instance); - }; - } - var root$325 = createFiberRoot( - container, - 0, - !1, - null, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$325; - container[internalContainerInstanceKey] = root$325.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - updateContainerSync(initialChildren, root$325, parentComponent, callback); - flushSyncWork$1(); - return root$325; -} -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 () { @@ -17475,7 +16985,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 }, @@ -17505,11 +17025,11 @@ 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, concurrentUpdatesByDefaultOverride, @@ -17520,6 +17040,15 @@ exports.hydrateRoot = function (container, initialChildren, options) { transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(); + concurrentUpdatesByDefaultOverride = createUpdate(isStrictMode); + concurrentUpdatesByDefaultOverride.callback = null; + enqueueUpdate(options, concurrentUpdatesByDefaultOverride, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -17632,34 +17161,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) @@ -17696,4 +17209,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index f8073647d8..47dd9e4381 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -16464,14 +16464,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1740 = React.version; if ( - "19.0.0-www-modern-50e89ec9f2-20240612" !== + "19.0.0-www-modern-fb9a90fa48-20240614" !== isomorphicReactPackageVersion$jscomp$inline_1740 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1740, - "19.0.0-www-modern-50e89ec9f2-20240612" + "19.0.0-www-modern-fb9a90fa48-20240614" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16490,7 +16490,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1742 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-50e89ec9f2-20240612", + version: "19.0.0-www-modern-fb9a90fa48-20240614", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2211 = { @@ -16520,7 +16520,7 @@ var internals$jscomp$inline_2211 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2212 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -16891,4 +16891,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 774dc1d1d9..8db0f95b25 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -66,7 +66,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"), dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableNoCloningMemoCache = dynamicFeatureFlags.enableNoCloningMemoCache, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -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: @@ -1687,10 +1683,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)); @@ -2070,7 +2062,7 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { do { var didPerformSomeWork = !1; for (var root$29 = firstScheduledRoot; null !== root$29; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root$29.tag)) { + if (!onlyLegacy) { var workInProgressRootRenderLanes$31 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$31 = getNextLanes( root$29, @@ -3302,15 +3294,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; @@ -4392,7 +4376,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$80 = enqueueUpdate(provider, fiber, lane); null !== root$80 && @@ -4410,7 +4394,7 @@ function refreshCache(fiber, seedKey, seedValue) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -4428,7 +4412,7 @@ function dispatchReducerAction(fiber, queue, action) { enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber), + var lane = requestUpdateLane(), update = { lane: lane, revertLane: 0, @@ -4918,7 +4902,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); @@ -4930,7 +4914,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; @@ -4943,7 +4927,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); @@ -4974,33 +4958,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, @@ -5015,41 +4972,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, @@ -5185,36 +5107,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, @@ -5229,100 +5121,71 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + enableLazyContextPropagation && + ((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)))) @@ -5337,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), @@ -5348,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) { @@ -5513,10 +5368,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$99 = workInProgress.stateNode; + root$98 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$99.incompleteTransitions.has(transition)) { + if (!root$98.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5524,11 +5379,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$99.incompleteTransitions.set(transition, markerInstance); + root$98.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$99.incompleteTransitions.forEach(function (markerInstance) { + root$98.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5706,36 +5561,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; @@ -5869,7 +5716,7 @@ function replayFunctionComponent( return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -5880,47 +5727,123 @@ function updateClassComponent( pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress, renderLanes); - 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( - 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) + 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), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (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, + 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$jscomp$0) { + 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), + (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 || @@ -5935,49 +5858,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; - cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + unmaskedContext = workInProgress.stateNode; + cloneUpdateQueue(current$jscomp$0, workInProgress); + 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)) @@ -5988,30 +5912,31 @@ 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 || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies)) ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, @@ -6020,124 +5945,109 @@ function updateClassComponent( nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, oldContext ) || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); -} -function finishClassComponent( - current$jscomp$0, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes -) { + unmaskedContext = nextProps; markRef(current$jscomp$0, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + (current = workInProgress), + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? ((isLegacyContextConsumer = null), (profilerStartTime = -1)) + : (enableSchedulingProfiler && + markComponentRenderStarted(workInProgress), + (isLegacyContextConsumer = unmaskedContext.render()), + enableSchedulingProfiler && markComponentRenderStopped()), + (workInProgress.flags |= 1), + null !== current$jscomp$0 && nextProps + ? ((nextProps = isLegacyContextConsumer), + (workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextProps, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current$jscomp$0 = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current$jscomp$0 = bailoutOnAlreadyFinishedWork( current$jscomp$0, workInProgress, renderLanes - ) - ); - shouldUpdate = workInProgress.stateNode; - current = workInProgress; - 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$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; @@ -6275,18 +6185,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) @@ -6335,11 +6245,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, @@ -6352,13 +6260,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)), (nextProps.childLanes = getRemainingWorkInPrimaryTree( @@ -6463,7 +6370,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 )), @@ -6471,12 +6378,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, @@ -6492,27 +6399,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), - (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( @@ -6577,32 +6469,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); @@ -6613,35 +6500,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), - (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, @@ -6719,68 +6597,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; @@ -6958,12 +6825,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) @@ -6989,10 +6855,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); @@ -7005,7 +6868,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); @@ -7028,43 +6891,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; @@ -7073,19 +6930,19 @@ function beginWork(current, workInProgress, renderLanes) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); - nextProps !== elementType.cache && + nextProps !== init.cache && propagateContextChange(workInProgress, CacheContext, 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( @@ -7202,7 +7059,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, @@ -7214,22 +7071,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, @@ -7237,11 +7094,11 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = elementType), + (HostTransitionContext._currentValue = init), enableLazyContextPropagation || (didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== elementType && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, @@ -7289,19 +7146,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 ( @@ -7342,14 +7193,14 @@ function beginWork(current, workInProgress, renderLanes) { props = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - elementType = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextState = elementType.value; + nextState = init.value; pushProvider(workInProgress, props, nextState); if (!enableLazyContextPropagation && null !== nextProps) if (objectIs(nextProps.value, nextState)) { if ( - nextProps.children === elementType.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -7360,25 +7211,20 @@ function beginWork(current, workInProgress, renderLanes) { break a; } } else propagateContextChange(workInProgress, props, renderLanes); - reconcileChildren( - current, - workInProgress, - elementType.children, - renderLanes - ); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (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), @@ -7387,20 +7233,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( @@ -7410,47 +7250,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, renderLanes); - 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: @@ -7469,38 +7268,34 @@ function beginWork(current, workInProgress, renderLanes) { prepareToReadContext(workInProgress, renderLanes), (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 && propagateContextChange( workInProgress, CacheContext, @@ -8035,14 +7830,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$143 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$143 = lastTailNode), + for (var lastTailNode$135 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$135 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$143 + null === lastTailNode$135 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$143.sibling = null); + : (lastTailNode$135.sibling = null); } } function bubbleProperties(completedWork) { @@ -8054,53 +7849,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$145 = completedWork.selfBaseDuration, - child$146 = completedWork.child; - null !== child$146; + var treeBaseDuration$137 = completedWork.selfBaseDuration, + child$138 = completedWork.child; + null !== child$138; ) - (newChildLanes |= child$146.lanes | child$146.childLanes), - (subtreeFlags |= child$146.subtreeFlags & 31457280), - (subtreeFlags |= child$146.flags & 31457280), - (treeBaseDuration$145 += child$146.treeBaseDuration), - (child$146 = child$146.sibling); - completedWork.treeBaseDuration = treeBaseDuration$145; + (newChildLanes |= child$138.lanes | child$138.childLanes), + (subtreeFlags |= child$138.subtreeFlags & 31457280), + (subtreeFlags |= child$138.flags & 31457280), + (treeBaseDuration$137 += child$138.treeBaseDuration), + (child$138 = child$138.sibling); + completedWork.treeBaseDuration = treeBaseDuration$137; } else for ( - treeBaseDuration$145 = completedWork.child; - null !== treeBaseDuration$145; + treeBaseDuration$137 = completedWork.child; + null !== treeBaseDuration$137; ) (newChildLanes |= - treeBaseDuration$145.lanes | treeBaseDuration$145.childLanes), - (subtreeFlags |= treeBaseDuration$145.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$145.flags & 31457280), - (treeBaseDuration$145.return = completedWork), - (treeBaseDuration$145 = treeBaseDuration$145.sibling); + treeBaseDuration$137.lanes | treeBaseDuration$137.childLanes), + (subtreeFlags |= treeBaseDuration$137.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$137.flags & 31457280), + (treeBaseDuration$137.return = completedWork), + (treeBaseDuration$137 = treeBaseDuration$137.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$145 = completedWork.actualDuration; - child$146 = completedWork.selfBaseDuration; + treeBaseDuration$137 = completedWork.actualDuration; + child$138 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$145 += child.actualDuration), - (child$146 += child.treeBaseDuration), + (treeBaseDuration$137 += child.actualDuration), + (child$138 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$145; - completedWork.treeBaseDuration = child$146; + completedWork.actualDuration = treeBaseDuration$137; + completedWork.treeBaseDuration = child$138; } else for ( - treeBaseDuration$145 = completedWork.child; - null !== treeBaseDuration$145; + treeBaseDuration$137 = completedWork.child; + null !== treeBaseDuration$137; ) (newChildLanes |= - treeBaseDuration$145.lanes | treeBaseDuration$145.childLanes), - (subtreeFlags |= treeBaseDuration$145.subtreeFlags), - (subtreeFlags |= treeBaseDuration$145.flags), - (treeBaseDuration$145.return = completedWork), - (treeBaseDuration$145 = treeBaseDuration$145.sibling); + treeBaseDuration$137.lanes | treeBaseDuration$137.childLanes), + (subtreeFlags |= treeBaseDuration$137.subtreeFlags), + (subtreeFlags |= treeBaseDuration$137.flags), + (treeBaseDuration$137.return = completedWork), + (treeBaseDuration$137 = treeBaseDuration$137.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8109,8 +7904,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: @@ -8123,7 +7916,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 ); @@ -8413,11 +8207,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$161 = null; + var cache$153 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$161 = newProps.memoizedState.cachePool.pool); - cache$161 !== type && (newProps.flags |= 2048); + (cache$153 = newProps.memoizedState.cachePool.pool); + cache$153 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8451,18 +8245,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$161 = type.rendering; - if (null === cache$161) + cache$153 = type.rendering; + if (null === cache$153) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8470,11 +8259,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$161 = findFirstSuspended(current); - if (null !== cache$161) { + cache$153 = findFirstSuspended(current); + if (null !== cache$153) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$161.updateQueue; + current = cache$153.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8499,7 +8288,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$161)), null !== current)) { + if (((current = findFirstSuspended(cache$153)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8509,7 +8298,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$161.alternate && + !cache$153.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8522,13 +8311,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$161.sibling = workInProgress.child), - (workInProgress.child = cache$161)) + ? ((cache$153.sibling = workInProgress.child), + (workInProgress.child = cache$153)) : ((current = type.last), null !== current - ? (current.sibling = cache$161) - : (workInProgress.child = cache$161), - (type.last = cache$161)); + ? (current.sibling = cache$153) + : (workInProgress.child = cache$153), + (type.last = cache$153)); } if (null !== type.tail) return ( @@ -8569,14 +8358,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), @@ -8612,8 +8401,6 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -8622,7 +8409,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), @@ -8711,7 +8499,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); @@ -8843,8 +8633,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$179) { - captureCommitPhaseError(current, nearestMountedAncestor, error$179); + } catch (error$170) { + captureCommitPhaseError(current, nearestMountedAncestor, error$170); } else ref.current = null; } @@ -8881,7 +8671,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$249) { + } catch (e$240) { JSCompiler_temp = null; break a; } @@ -9013,8 +8803,21 @@ function commitBeforeMutationEffects(root, firstChild) { } break; case 3: - 0 !== (flags & 1024) && - clearContainer(firstChild.stateNode.containerInfo); + if (0 !== (flags & 1024)) { + var container = firstChild.stateNode.containerInfo, + 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 = ""; + } + } break; case 5: case 26: @@ -9139,11 +8942,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$181 = commitTime, + var commitTime$172 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$181); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$172); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -9170,8 +8973,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$183) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$183); + } catch (error$174) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$174); } } function commitClassCallbacks(finishedWork) { @@ -9270,11 +9073,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$184) { + } catch (error$175) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$184 + error$175 ); } else { @@ -9292,11 +9095,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$185) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$185 + error$176 ); } recordLayoutEffectDuration(finishedWork); @@ -9307,11 +9110,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$186) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$186 + error$177 ); } } @@ -9357,30 +9160,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) @@ -9848,21 +9646,15 @@ function commitDeletionEffectsOnFiber( break; case 22: 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( @@ -9874,19 +9666,19 @@ function commitDeletionEffectsOnFiber( } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { - var current$200 = finishedWork.alternate; + var current$191 = finishedWork.alternate; if ( - null !== current$200 && - ((current$200 = current$200.memoizedState), - null !== current$200 && - ((current$200 = current$200.dehydrated), null !== current$200)) + null !== current$191 && + ((current$191 = current$191.memoizedState), + null !== current$191 && + ((current$191 = current$191.dehydrated), null !== current$191)) ) try { - retryIfBlockedOn(current$200); + retryIfBlockedOn(current$191); var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$200); + onHydrated && onHydrated(current$191); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -10018,22 +9810,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$202) { + } catch (error$193) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$202 + error$193 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$203) { + } catch (error$194) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$203 + error$194 ); } } @@ -10207,11 +9999,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$204) { + } catch (error$195) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$204 + error$195 ); } break; @@ -10248,8 +10040,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$205) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$205); + } catch (error$196) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$196); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -10259,8 +10051,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$207) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$207); + } catch (error$198) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$198); } } flags & 1024 && (needsFormReset = !0); @@ -10275,8 +10067,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$208) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$208); + } catch (error$199) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$199); } } break; @@ -10290,8 +10082,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$209) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$209); + } catch (error$200) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$200); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -10323,8 +10115,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$211) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$211); + } catch (error$202) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$202); } flags = finishedWork.updateQueue; null !== flags && @@ -10338,15 +10130,13 @@ function commitMutationEffectsOnFiber(finishedWork, root) { safelyDetachRef(current, current.return); domElement = null !== finishedWork.memoizedState; newProps = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & 1 - ? ((suspenseCallback = offscreenSubtreeIsHidden), - (retryQueue = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = suspenseCallback || domElement), - (offscreenSubtreeWasHidden = retryQueue || newProps), - recursivelyTraverseMutationEffects(root, finishedWork), - (offscreenSubtreeWasHidden = retryQueue), - (offscreenSubtreeIsHidden = suspenseCallback)) - : recursivelyTraverseMutationEffects(root, finishedWork); + suspenseCallback = offscreenSubtreeIsHidden; + retryQueue = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = suspenseCallback || domElement; + offscreenSubtreeWasHidden = retryQueue || newProps; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = retryQueue; + offscreenSubtreeIsHidden = suspenseCallback; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -10362,8 +10152,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null === current || newProps || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -10402,11 +10191,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$191) { + } catch (error$182) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$191 + error$182 ); } } else if ( @@ -10481,21 +10270,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$192 = JSCompiler_inline_result.stateNode; + var parent$183 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$192, ""), + (setTextContent(parent$183, ""), (JSCompiler_inline_result.flags &= -33)); - var before$193 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$193, parent$192); + var before$184 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$184, parent$183); break; case 3: case 4: - var parent$194 = JSCompiler_inline_result.stateNode.containerInfo, - before$195 = getHostSibling(finishedWork); + var parent$185 = JSCompiler_inline_result.stateNode.containerInfo, + before$186 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$195, - parent$194 + before$186, + parent$185 ); break; default: @@ -10587,7 +10376,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$215 = parentFiber.alternate, + var current$206 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -10615,16 +10404,16 @@ function recursivelyTraverseReappearLayoutEffects( } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } - current$215 = finishedWork.updateQueue; - if (null !== current$215) { - var hiddenCallbacks = current$215.shared.hiddenCallbacks; + current$206 = finishedWork.updateQueue; + if (null !== current$206) { + var hiddenCallbacks = current$206.shared.hiddenCallbacks; if (null !== hiddenCallbacks) for ( - current$215.shared.hiddenCallbacks = null, current$215 = 0; - current$215 < hiddenCallbacks.length; - current$215++ + current$206.shared.hiddenCallbacks = null, current$206 = 0; + current$206 < hiddenCallbacks.length; + current$206++ ) - callCallback(hiddenCallbacks[current$215], finishedRoot); + callCallback(hiddenCallbacks[current$206], finishedRoot); } includeWorkInProgressEffects && flags & 64 && @@ -10640,7 +10429,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$215 && + null === current$206 && flags & 4 && commitHostComponentMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -10653,7 +10442,7 @@ function recursivelyTraverseReappearLayoutEffects( ); includeWorkInProgressEffects && flags & 4 && - commitProfilerUpdate(finishedWork, current$215); + commitProfilerUpdate(finishedWork, current$206); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -10696,8 +10485,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$216) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$216); + } catch (error$207) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$207); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -10890,15 +10679,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, @@ -10996,9 +10777,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$223 = finishedWork.stateNode; + var instance$214 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$223._visibility & 4 + ? instance$214._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11006,20 +10787,11 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork ) - : ((instance$223._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$223._visibility |= 4), + : ((instance$214._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11032,7 +10804,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$223 + instance$214 ); break; case 24: @@ -11473,16 +11245,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 && @@ -11508,21 +11278,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$14 = 31 - clz32(lane), - transitions = transitionLanesMap[index$14]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index$14] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now$1()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index$14 = 31 - clz32(lane), + transitions = transitionLanesMap[index$14]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index$14] = transitions; } root === workInProgressRoot && (0 === (executionContext & 2) && @@ -11534,12 +11303,6 @@ function scheduleUpdateOnFiber(root, fiber, lane) { workInProgressDeferredLane )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ((workInProgressRootRenderTargetTime = now$1() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(!0)); } } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -11808,7 +11571,7 @@ function performSyncWorkOnRoot(root, lanes) { currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync(root, lanes); - if ((disableLegacyMode || 0 !== root.tag) && 2 === exitStatus) { + if (2 === exitStatus) { var originallyAttemptedLanes = lanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( root, @@ -11847,19 +11610,6 @@ function performSyncWorkOnRoot(root, lanes) { ensureRootIsScheduled(root); return null; } -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)); - } -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(!1), !1) @@ -12062,8 +11812,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$234) { - handleThrow(root, thrownValue$234); + } catch (thrownValue$225) { + handleThrow(root, thrownValue$225); } while (1); lanes && root.shellSuspendCounter++; @@ -12183,8 +11933,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$236) { - handleThrow(root, thrownValue$236); + } catch (thrownValue$227) { + handleThrow(root, thrownValue$227); } while (1); resetContextDependencies(); @@ -12359,23 +12109,23 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { function completeUnitOfWork(unitOfWork) { var completedWork = unitOfWork; do { - var current$240 = completedWork.alternate; + var current$231 = completedWork.alternate; unitOfWork = completedWork.return; 0 === (completedWork.mode & 2) - ? (current$240 = completeWork( - current$240, + ? (current$231 = completeWork( + current$231, completedWork, entangledRenderLanes )) : (startProfilerTimer(completedWork), - (current$240 = completeWork( - current$240, + (current$231 = completeWork( + current$231, completedWork, entangledRenderLanes )), stopProfilerTimerIfRunningAndRecordDelta(completedWork, !1)); - if (null !== current$240) { - workInProgress = current$240; + if (null !== current$231) { + workInProgress = current$231; return; } completedWork = completedWork.sibling; @@ -12464,13 +12214,13 @@ function commitRootImpl( Internals.p = 2; var prevExecutionContext = executionContext; executionContext |= 4; - var shouldFireAfterActiveInstanceBlur$242 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$233 = commitBeforeMutationEffects( root, finishedWork ); commitTime = now(); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$242 && + shouldFireAfterActiveInstanceBlur$233 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12514,9 +12264,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)) || @@ -12555,7 +12303,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$243 = rootWithPendingPassiveEffects, + var root$234 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12570,7 +12318,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$243, remainingLanes); + releaseRootPooledCache(root$234, remainingLanes); } } return !1; @@ -12722,10 +12470,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), @@ -12917,12 +12662,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 ( @@ -13093,7 +12836,7 @@ function FiberRootNode( onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -13171,13 +12914,11 @@ function createFiberRoot( containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), - !0 === isStrictMode && (tag |= 24), - concurrentUpdatesByDefaultOverride && (tag |= 32)) - : (tag = 0); - isDevToolsPresent && (tag |= 2); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + concurrentUpdatesByDefaultOverride && (hydrationCallbacks |= 32); + isDevToolsPresent && (hydrationCallbacks |= 2); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; concurrentUpdatesByDefaultOverride = createCache(); @@ -13252,73 +12993,6 @@ function findHostInstance(component) { component = findCurrentHostFiber(fiber); 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, - concurrentUpdatesByDefaultOverride, - 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, @@ -13345,17 +13019,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) { @@ -13382,7 +13045,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), @@ -13913,19 +13576,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$406; + var JSCompiler_inline_result$jscomp$390; if (canUseDOM) { - var isSupported$jscomp$inline_1642 = "oninput" in document; - if (!isSupported$jscomp$inline_1642) { - var element$jscomp$inline_1643 = document.createElement("div"); - element$jscomp$inline_1643.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1642 = - "function" === typeof element$jscomp$inline_1643.oninput; + var isSupported$jscomp$inline_1623 = "oninput" in document; + if (!isSupported$jscomp$inline_1623) { + var element$jscomp$inline_1624 = document.createElement("div"); + element$jscomp$inline_1624.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1623 = + "function" === typeof element$jscomp$inline_1624.oninput; } - JSCompiler_inline_result$jscomp$406 = isSupported$jscomp$inline_1642; - } else JSCompiler_inline_result$jscomp$406 = !1; + JSCompiler_inline_result$jscomp$390 = isSupported$jscomp$inline_1623; + } else JSCompiler_inline_result$jscomp$390 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$406 && + JSCompiler_inline_result$jscomp$390 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14334,20 +13997,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1683 = 0; - i$jscomp$inline_1683 < simpleEventPluginEvents.length; - i$jscomp$inline_1683++ + var i$jscomp$inline_1664 = 0; + i$jscomp$inline_1664 < simpleEventPluginEvents.length; + i$jscomp$inline_1664++ ) { - var eventName$jscomp$inline_1684 = - simpleEventPluginEvents[i$jscomp$inline_1683], - domEventName$jscomp$inline_1685 = - eventName$jscomp$inline_1684.toLowerCase(), - capitalizedEvent$jscomp$inline_1686 = - eventName$jscomp$inline_1684[0].toUpperCase() + - eventName$jscomp$inline_1684.slice(1); + var eventName$jscomp$inline_1665 = + simpleEventPluginEvents[i$jscomp$inline_1664], + domEventName$jscomp$inline_1666 = + eventName$jscomp$inline_1665.toLowerCase(), + capitalizedEvent$jscomp$inline_1667 = + eventName$jscomp$inline_1665[0].toUpperCase() + + eventName$jscomp$inline_1665.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1685, - "on" + capitalizedEvent$jscomp$inline_1686 + domEventName$jscomp$inline_1666, + "on" + capitalizedEvent$jscomp$inline_1667 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15825,14 +15488,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$278 in nextProps) { - var propKey = nextProps[propKey$278]; - lastProp = lastProps[propKey$278]; + for (var propKey$269 in nextProps) { + var propKey = nextProps[propKey$269]; + lastProp = lastProps[propKey$269]; if ( - nextProps.hasOwnProperty(propKey$278) && + nextProps.hasOwnProperty(propKey$269) && (null != propKey || null != lastProp) ) - switch (propKey$278) { + switch (propKey$269) { case "type": type = propKey; break; @@ -15861,7 +15524,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$278, + propKey$269, propKey, nextProps, lastProp @@ -15880,7 +15543,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$278 = null; + propKey = value = defaultValue = propKey$269 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15911,7 +15574,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$278 = type; + propKey$269 = type; break; case "defaultValue": defaultValue = type; @@ -15932,15 +15595,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$278 - ? updateOptions(domElement, !!lastProps, propKey$278, !1) + null != propKey$269 + ? updateOptions(domElement, !!lastProps, propKey$269, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$278 = null; + propKey = propKey$269 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15964,7 +15627,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$278 = name; + propKey$269 = name; break; case "defaultValue": propKey = name; @@ -15978,17 +15641,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$278, propKey); + updateTextarea(domElement, propKey$269, propKey); return; case "option": - for (var propKey$294 in lastProps) + for (var propKey$285 in lastProps) if ( - ((propKey$278 = lastProps[propKey$294]), - lastProps.hasOwnProperty(propKey$294) && - null != propKey$278 && - !nextProps.hasOwnProperty(propKey$294)) + ((propKey$269 = lastProps[propKey$285]), + lastProps.hasOwnProperty(propKey$285) && + null != propKey$269 && + !nextProps.hasOwnProperty(propKey$285)) ) - switch (propKey$294) { + switch (propKey$285) { case "selected": domElement.selected = !1; break; @@ -15996,33 +15659,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$294, + propKey$285, null, nextProps, - propKey$278 + propKey$269 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$278 = nextProps[lastDefaultValue]), + ((propKey$269 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$278 !== propKey && - (null != propKey$278 || null != propKey)) + propKey$269 !== propKey && + (null != propKey$269 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$278 && - "function" !== typeof propKey$278 && - "symbol" !== typeof propKey$278; + propKey$269 && + "function" !== typeof propKey$269 && + "symbol" !== typeof propKey$269; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$278, + propKey$269, nextProps, propKey ); @@ -16043,24 +15706,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$299 in lastProps) - (propKey$278 = lastProps[propKey$299]), - lastProps.hasOwnProperty(propKey$299) && - null != propKey$278 && - !nextProps.hasOwnProperty(propKey$299) && - setProp(domElement, tag, propKey$299, null, nextProps, propKey$278); + for (var propKey$290 in lastProps) + (propKey$269 = lastProps[propKey$290]), + lastProps.hasOwnProperty(propKey$290) && + null != propKey$269 && + !nextProps.hasOwnProperty(propKey$290) && + setProp(domElement, tag, propKey$290, null, nextProps, propKey$269); for (checked in nextProps) if ( - ((propKey$278 = nextProps[checked]), + ((propKey$269 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$278 !== propKey && - (null != propKey$278 || null != propKey)) + propKey$269 !== propKey && + (null != propKey$269 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$278) + if (null != propKey$269) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16068,7 +15731,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$278, + propKey$269, nextProps, propKey ); @@ -16076,49 +15739,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$304 in lastProps) - (propKey$278 = lastProps[propKey$304]), - lastProps.hasOwnProperty(propKey$304) && - void 0 !== propKey$278 && - !nextProps.hasOwnProperty(propKey$304) && + for (var propKey$295 in lastProps) + (propKey$269 = lastProps[propKey$295]), + lastProps.hasOwnProperty(propKey$295) && + void 0 !== propKey$269 && + !nextProps.hasOwnProperty(propKey$295) && setPropOnCustomElement( domElement, tag, - propKey$304, + propKey$295, void 0, nextProps, - propKey$278 + propKey$269 ); for (defaultChecked in nextProps) - (propKey$278 = nextProps[defaultChecked]), + (propKey$269 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$278 === propKey || - (void 0 === propKey$278 && void 0 === propKey) || + propKey$269 === propKey || + (void 0 === propKey$269 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$278, + propKey$269, nextProps, propKey ); return; } } - for (var propKey$309 in lastProps) - (propKey$278 = lastProps[propKey$309]), - lastProps.hasOwnProperty(propKey$309) && - null != propKey$278 && - !nextProps.hasOwnProperty(propKey$309) && - setProp(domElement, tag, propKey$309, null, nextProps, propKey$278); + for (var propKey$300 in lastProps) + (propKey$269 = lastProps[propKey$300]), + lastProps.hasOwnProperty(propKey$300) && + null != propKey$269 && + !nextProps.hasOwnProperty(propKey$300) && + setProp(domElement, tag, propKey$300, null, nextProps, propKey$269); for (lastProp in nextProps) - (propKey$278 = nextProps[lastProp]), + (propKey$269 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$278 === propKey || - (null == propKey$278 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$278, nextProps, propKey); + propKey$269 === propKey || + (null == propKey$269 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$269, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16238,20 +15901,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); @@ -16420,7 +16069,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, @@ -16431,12 +16080,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); @@ -16713,26 +16359,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$317 = getResourcesFromRoot( + var styles$308 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$318 = styles$317.get(type); - resource$318 || + resource$309 = styles$308.get(type); + resource$309 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$318 = { + (resource$309 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$317.set(type, resource$318), - (styles$317 = JSCompiler_inline_result.querySelector( + styles$308.set(type, resource$309), + (styles$308 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$317._p && - ((resource$318.instance = styles$317), - (resource$318.state.loading = 5)), + !styles$308._p && + ((resource$309.instance = styles$308), + (resource$309.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16745,16 +16391,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$317 || + styles$308 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$318.state + resource$309.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$318; + return resource$309; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16851,37 +16497,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$323 = hoistableRoot.querySelector( + var instance$314 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$323) + if (instance$314) return ( (resource.state.loading |= 4), - (resource.instance = instance$323), - markNodeAsHoistable(instance$323), - instance$323 + (resource.instance = instance$314), + markNodeAsHoistable(instance$314), + instance$314 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$323 = ( + instance$314 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$323); - var linkInstance = instance$323; + markNodeAsHoistable(instance$314); + var linkInstance = instance$314; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$323, "link", instance); + setInitialProperties(instance$314, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$323, props.precedence, hoistableRoot); - return (resource.instance = instance$323); + insertStylesheet(instance$314, props.precedence, hoistableRoot); + return (resource.instance = instance$314); case "script": - instance$323 = getScriptKey(props.src); + instance$314 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$323) + getScriptSelectorFromKey(instance$314) )) ) return ( @@ -16890,7 +16536,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$323))) + if ((styleProps = preloadPropsMap.get(instance$314))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17426,7 +17072,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); @@ -17859,16 +17505,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 && @@ -17890,69 +17526,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_1856 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1837 = React.version; if ( - "19.0.0-www-classic-50e89ec9f2-20240612" !== - isomorphicReactPackageVersion$jscomp$inline_1856 + "19.0.0-www-classic-fb9a90fa48-20240614" !== + isomorphicReactPackageVersion$jscomp$inline_1837 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1856, - "19.0.0-www-classic-50e89ec9f2-20240612" + isomorphicReactPackageVersion$jscomp$inline_1837, + "19.0.0-www-classic-fb9a90fa48-20240614" ) ); -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(!1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; -} -var flushSync = disableLegacyMode ? flushSync$1 : flushSyncFromReconciler; Internals.findDOMNode = function (componentOrElement) { return findHostInstance(componentOrElement); }; @@ -17966,10 +17556,10 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1863 = { +var devToolsConfig$jscomp$inline_1839 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-50e89ec9f2-20240612", + version: "19.0.0-www-classic-fb9a90fa48-20240614", rendererPackageName: "react-dom" }; (function (internals) { @@ -17987,10 +17577,10 @@ var devToolsConfig$jscomp$inline_1863 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1863.bundleType, - version: devToolsConfig$jscomp$inline_1863.version, - rendererPackageName: devToolsConfig$jscomp$inline_1863.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1863.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1839.bundleType, + version: devToolsConfig$jscomp$inline_1839.version, + rendererPackageName: devToolsConfig$jscomp$inline_1839.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1839.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -18006,14 +17596,14 @@ var devToolsConfig$jscomp$inline_1863 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1863.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1839.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }); function ReactDOMRoot(internalRoot) { this._internalRoot = internalRoot; @@ -18022,7 +17612,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 () { @@ -18030,7 +17622,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; } @@ -18074,105 +17667,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$344); - originalCallback.call(instance); - }; - } - var root$344 = createHydrationContainer( - initialChildren, - callback, - container, - 0, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$344; - container[internalContainerInstanceKey] = root$344.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - flushSyncWork$1(); - return root$344; - } - clearContainer(container); - if ("function" === typeof callback) { - var originalCallback$345 = callback; - callback = function () { - var instance = getPublicRootInstance(root$346); - originalCallback$345.call(instance); - }; - } - var root$346 = createFiberRoot( - container, - 0, - !1, - null, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$346; - container[internalContainerInstanceKey] = root$346.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - updateContainerSync(initialChildren, root$346, parentComponent, callback); - flushSyncWork$1(); - return root$346; -} -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 () { @@ -18243,7 +17737,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 }, @@ -18273,11 +17777,11 @@ 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, concurrentUpdatesByDefaultOverride, @@ -18288,6 +17792,15 @@ exports.hydrateRoot = function (container, initialChildren, options) { transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(); + concurrentUpdatesByDefaultOverride = createUpdate(isStrictMode); + concurrentUpdatesByDefaultOverride.callback = null; + enqueueUpdate(options, concurrentUpdatesByDefaultOverride, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -18400,34 +17913,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) @@ -18464,7 +17961,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; "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 5b2005e267..22f50e2810 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -17214,14 +17214,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1827 = React.version; if ( - "19.0.0-www-modern-50e89ec9f2-20240612" !== + "19.0.0-www-modern-fb9a90fa48-20240614" !== isomorphicReactPackageVersion$jscomp$inline_1827 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1827, - "19.0.0-www-modern-50e89ec9f2-20240612" + "19.0.0-www-modern-fb9a90fa48-20240614" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17240,7 +17240,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1829 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-50e89ec9f2-20240612", + version: "19.0.0-www-modern-fb9a90fa48-20240614", rendererPackageName: "react-dom" }; (function (internals) { @@ -17284,7 +17284,7 @@ var devToolsConfig$jscomp$inline_1829 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }); function ReactDOMRoot(internalRoot) { this._internalRoot = internalRoot; @@ -17642,7 +17642,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; "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 81bfeffa57..68075c5f8a 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -8721,5 +8721,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-50e89ec9f2-20240612"; + exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index e75e37dda5..1562404fc2 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8677,5 +8677,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-50e89ec9f2-20240612"; + exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index e9668835f5..66b881bce5 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5719,4 +5719,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-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 9b5dd0e4aa..5be232fafe 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5697,4 +5697,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-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index f61e3192ff..1afc8c5cc0 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -295,9 +295,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -748,19 +745,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 ( @@ -3844,10 +3828,6 @@ __DEV__ && scheduleImmediateTask(processRootScheduleInMicrotask)); enableDeferRootSchedulingToMicrotask || scheduleTaskForRootDuringMicrotask(root, now$1()); - !disableLegacyMode && - ReactSharedInternals.isBatchingLegacy && - 0 === root.tag && - (ReactSharedInternals.didScheduleLegacyUpdate = !0); } function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (!isFlushingWork && mightHavePendingSyncWork) { @@ -3855,7 +3835,7 @@ __DEV__ && do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) { + if (!onlyLegacy) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( @@ -5510,15 +5490,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; @@ -5801,9 +5773,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." ); @@ -7345,7 +7316,7 @@ __DEV__ && for (var child = fiber.child; child; ) (fiber.actualDuration += child.actualDuration), (child = child.sibling); } - function warnOnInvalidCallback$1(callback) { + function warnOnInvalidCallback(callback) { if (null !== callback && "function" !== typeof callback) { var key = String(callback); didWarnOnInvalidCallback.has(key) || @@ -7427,124 +7398,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 & 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, @@ -7571,192 +7424,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.propTypes && - error$jscomp$0( - "propTypes was defined as an instance property on %s. Use a static property to define propTypes 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 - )); - "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 & 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, @@ -7913,36 +7580,6 @@ __DEV__ && )); }); } - 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(SyncLane)), - (returnFiber.tag = ForceUpdate), - enqueueUpdate(sourceFiber, returnFiber, SyncLane)) - : 0 === sourceFiber.tag && - null === sourceFiber.alternate && - (sourceFiber.tag = 28), - (sourceFiber.lanes |= SyncLane)), - suspenseBoundary - ); - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; - } function throwException( root, returnFiber, @@ -7957,115 +7594,81 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + enableLazyContextPropagation && + ((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))); - 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( @@ -8090,10 +7693,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), @@ -8101,7 +7704,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 } @@ -8109,58 +7712,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( @@ -8493,37 +8094,30 @@ __DEV__ && renderLanes ); } - if (disableLegacyMode || 0 !== (workInProgress.mode & 1)) - if (0 !== (renderLanes & OffscreenLane)) - (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 = - OffscreenLane), - deferHiddenOffscreenComponent( - current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - else + if (0 !== (renderLanes & OffscreenLane)) (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 = OffscreenLane), + deferHiddenOffscreenComponent( + current, + workInProgress, + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else if (null !== prevState) { nextProps = prevState.cachePool; nextIsDetached = null; @@ -8685,7 +8279,7 @@ __DEV__ && return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -8724,214 +8318,570 @@ __DEV__ && ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); prepareToReadContext(workInProgress, renderLanes); - 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), - 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 { + (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; - cloneUpdateQueue(current, workInProgress); + 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.propTypes && + error$jscomp$0( + "propTypes was defined as an instance property on %s. Use a static property to define propTypes 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 + )); + "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 & 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, + 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.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), + 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$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.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 || (enableLazyContextPropagation && - 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 ) || (enableLazyContextPropagation && - 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 && @@ -8941,76 +8891,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; @@ -9083,32 +8964,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2466; - var JSCompiler_object_inline_stack_2467 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2493; + var JSCompiler_object_inline_stack_2494 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2468 = !1; + var JSCompiler_object_inline_componentStack_2495 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2466 = didSuspend) || - (JSCompiler_object_inline_digest_2466 = + (JSCompiler_object_inline_digest_2493 = didSuspend) || + (JSCompiler_object_inline_digest_2493 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2466 && - ((JSCompiler_object_inline_componentStack_2468 = !0), + JSCompiler_object_inline_digest_2493 && + ((JSCompiler_object_inline_componentStack_2495 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2466 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2493 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2468 + JSCompiler_object_inline_componentStack_2495 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2465 = nextHydratableInstance; + var JSCompiler_object_inline_message_2492 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2465)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2492)) { c: { - var instance = JSCompiler_object_inline_message_2465; + var instance = JSCompiler_object_inline_message_2492; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9149,19 +9030,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2465 + JSCompiler_object_inline_message_2492 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2465 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2492 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2465 && - ((JSCompiler_object_inline_message_2465 = - JSCompiler_object_inline_message_2465.dehydrated), - null !== JSCompiler_object_inline_message_2465) + null !== JSCompiler_object_inline_message_2492 && + ((JSCompiler_object_inline_message_2492 = + JSCompiler_object_inline_message_2492.dehydrated), + null !== JSCompiler_object_inline_message_2492) ) return ( - JSCompiler_object_inline_message_2465.data === + JSCompiler_object_inline_message_2492.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = DefaultHydrationLane) : (workInProgress.lanes = OffscreenLane), @@ -9169,27 +9050,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2465 = - JSCompiler_object_inline_stack_2467.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2467.fallback; - if (JSCompiler_object_inline_componentStack_2468) + JSCompiler_object_inline_message_2492 = + JSCompiler_object_inline_stack_2494.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2494.fallback; + if (JSCompiler_object_inline_componentStack_2495) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2467 = + (JSCompiler_object_inline_stack_2494 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2465, + JSCompiler_object_inline_message_2492, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2468 = + (JSCompiler_object_inline_componentStack_2495 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2468.memoizedState = + (JSCompiler_object_inline_componentStack_2495.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2468.childLanes = + (JSCompiler_object_inline_componentStack_2495.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2466, + JSCompiler_object_inline_digest_2493, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9198,60 +9079,60 @@ __DEV__ && ? transitionStack.current : null), null !== workInProgress && - ((renderLanes = enableTransitionTracing + ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (current = - JSCompiler_object_inline_componentStack_2468.updateQueue), - null === current - ? (JSCompiler_object_inline_componentStack_2468.updateQueue = + (renderLanes = + JSCompiler_object_inline_componentStack_2495.updateQueue), + null === renderLanes + ? (JSCompiler_object_inline_componentStack_2495.updateQueue = { transitions: workInProgress, - markerInstances: renderLanes, + markerInstances: current, retryQueue: null }) - : ((current.transitions = workInProgress), - (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2467 + : ((renderLanes.transitions = workInProgress), + (renderLanes.markerInstances = current)))), + JSCompiler_object_inline_stack_2494 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2467.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2494.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2467 = + (JSCompiler_object_inline_stack_2494 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2465, + JSCompiler_object_inline_message_2492, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2468 = + (JSCompiler_object_inline_componentStack_2495 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2468.memoizedState = + (JSCompiler_object_inline_componentStack_2495.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2468.childLanes = + (JSCompiler_object_inline_componentStack_2495.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2466, + JSCompiler_object_inline_digest_2493, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2467 + JSCompiler_object_inline_stack_2494 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2465 + JSCompiler_object_inline_message_2492 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2465 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2465) + ((JSCompiler_object_inline_message_2492 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2492) ) { if (didSuspend) workInProgress.flags & 256 @@ -9268,95 +9149,93 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2468 = - JSCompiler_object_inline_stack_2467.fallback), - (JSCompiler_object_inline_message_2465 = workInProgress.mode), - (JSCompiler_object_inline_stack_2467 = createFiberFromOffscreen( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2467.children - }, - JSCompiler_object_inline_message_2465, - 0, - null - )), - (JSCompiler_object_inline_componentStack_2468 = + (JSCompiler_object_inline_componentStack_2495 = + JSCompiler_object_inline_stack_2494.fallback), + (JSCompiler_object_inline_message_2492 = workInProgress.mode), + (JSCompiler_object_inline_stack_2494 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2494.children + }, + JSCompiler_object_inline_message_2492 + )), + (JSCompiler_object_inline_componentStack_2495 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2468, - JSCompiler_object_inline_message_2465, + JSCompiler_object_inline_componentStack_2495, + JSCompiler_object_inline_message_2492, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2468.flags |= 2), - (JSCompiler_object_inline_stack_2467.return = workInProgress), - (JSCompiler_object_inline_componentStack_2468.return = + (JSCompiler_object_inline_componentStack_2495.flags |= 2), + (JSCompiler_object_inline_stack_2494.return = workInProgress), + (JSCompiler_object_inline_componentStack_2495.return = workInProgress), - (JSCompiler_object_inline_stack_2467.sibling = - JSCompiler_object_inline_componentStack_2468), - (workInProgress.child = JSCompiler_object_inline_stack_2467), - (disableLegacyMode || 0 !== (workInProgress.mode & 1)) && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2467 = workInProgress.child), - (JSCompiler_object_inline_stack_2467.memoizedState = + (JSCompiler_object_inline_stack_2494.sibling = + JSCompiler_object_inline_componentStack_2495), + (workInProgress.child = JSCompiler_object_inline_stack_2494), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (JSCompiler_object_inline_stack_2494 = workInProgress.child), + (JSCompiler_object_inline_stack_2494.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2467.childLanes = + (JSCompiler_object_inline_stack_2494.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2466, + JSCompiler_object_inline_digest_2493, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_componentStack_2468)); + (workInProgress = JSCompiler_object_inline_componentStack_2495)); 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_2465.data === + JSCompiler_object_inline_message_2492.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2466 = - JSCompiler_object_inline_message_2465.nextSibling && - JSCompiler_object_inline_message_2465.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2466) { - JSCompiler_temp = JSCompiler_object_inline_digest_2466.dgst; - var message = JSCompiler_object_inline_digest_2466.msg; - instance = JSCompiler_object_inline_digest_2466.stck; - var componentStack = JSCompiler_object_inline_digest_2466.cstck; + JSCompiler_object_inline_digest_2493 = + JSCompiler_object_inline_message_2492.nextSibling && + JSCompiler_object_inline_message_2492.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2493) { + JSCompiler_temp = JSCompiler_object_inline_digest_2493.dgst; + var message = JSCompiler_object_inline_digest_2493.msg; + instance = JSCompiler_object_inline_digest_2493.stck; + var componentStack = JSCompiler_object_inline_digest_2493.cstck; } - JSCompiler_object_inline_message_2465 = message; - JSCompiler_object_inline_digest_2466 = JSCompiler_temp; - JSCompiler_object_inline_stack_2467 = instance; - JSCompiler_object_inline_componentStack_2468 = componentStack; - JSCompiler_object_inline_message_2465 = - JSCompiler_object_inline_message_2465 - ? Error(JSCompiler_object_inline_message_2465) + JSCompiler_object_inline_message_2492 = message; + JSCompiler_object_inline_digest_2493 = JSCompiler_temp; + JSCompiler_object_inline_stack_2494 = instance; + JSCompiler_object_inline_componentStack_2495 = componentStack; + JSCompiler_object_inline_message_2492 = + JSCompiler_object_inline_message_2492 + ? Error(JSCompiler_object_inline_message_2492) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2465.stack = - JSCompiler_object_inline_stack_2467 || ""; - JSCompiler_object_inline_message_2465.digest = - JSCompiler_object_inline_digest_2466; - JSCompiler_object_inline_digest_2466 = - void 0 === JSCompiler_object_inline_componentStack_2468 + JSCompiler_object_inline_message_2492.stack = + JSCompiler_object_inline_stack_2494 || ""; + JSCompiler_object_inline_message_2492.digest = + JSCompiler_object_inline_digest_2493; + JSCompiler_object_inline_digest_2493 = + void 0 === JSCompiler_object_inline_componentStack_2495 ? null - : JSCompiler_object_inline_componentStack_2468; - "string" === typeof JSCompiler_object_inline_digest_2466 && + : JSCompiler_object_inline_componentStack_2495; + "string" === typeof JSCompiler_object_inline_digest_2493 && CapturedStacks.set( - JSCompiler_object_inline_message_2465, - JSCompiler_object_inline_digest_2466 + JSCompiler_object_inline_message_2492, + JSCompiler_object_inline_digest_2493 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2465, + value: JSCompiler_object_inline_message_2492, source: null, - stack: JSCompiler_object_inline_digest_2466 + stack: JSCompiler_object_inline_digest_2493 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9372,29 +9251,29 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2466 = + (JSCompiler_object_inline_digest_2493 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2466) + didReceiveUpdate || JSCompiler_object_inline_digest_2493) ) { - JSCompiler_object_inline_digest_2466 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2466) { - JSCompiler_object_inline_stack_2467 = renderLanes & -renderLanes; + JSCompiler_object_inline_digest_2493 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2493) { + JSCompiler_object_inline_stack_2494 = renderLanes & -renderLanes; if ( enableUnifiedSyncLane && - 0 !== (JSCompiler_object_inline_stack_2467 & SyncUpdateLanes) + 0 !== (JSCompiler_object_inline_stack_2494 & SyncUpdateLanes) ) - JSCompiler_object_inline_stack_2467 = SyncHydrationLane; + JSCompiler_object_inline_stack_2494 = SyncHydrationLane; else - switch (JSCompiler_object_inline_stack_2467) { + switch (JSCompiler_object_inline_stack_2494) { case SyncLane: - JSCompiler_object_inline_stack_2467 = SyncHydrationLane; + JSCompiler_object_inline_stack_2494 = SyncHydrationLane; break; case InputContinuousLane: - JSCompiler_object_inline_stack_2467 = + JSCompiler_object_inline_stack_2494 = InputContinuousHydrationLane; break; case DefaultLane: - JSCompiler_object_inline_stack_2467 = DefaultHydrationLane; + JSCompiler_object_inline_stack_2494 = DefaultHydrationLane; break; case 128: case 256: @@ -9415,40 +9294,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2467 = TransitionHydrationLane; + JSCompiler_object_inline_stack_2494 = TransitionHydrationLane; break; case IdleLane: - JSCompiler_object_inline_stack_2467 = IdleHydrationLane; + JSCompiler_object_inline_stack_2494 = IdleHydrationLane; break; default: - JSCompiler_object_inline_stack_2467 = 0; + JSCompiler_object_inline_stack_2494 = 0; } - JSCompiler_object_inline_stack_2467 = + JSCompiler_object_inline_stack_2494 = 0 !== - (JSCompiler_object_inline_stack_2467 & - (JSCompiler_object_inline_digest_2466.suspendedLanes | + (JSCompiler_object_inline_stack_2494 & + (JSCompiler_object_inline_digest_2493.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2467; + : JSCompiler_object_inline_stack_2494; if ( - 0 !== JSCompiler_object_inline_stack_2467 && - JSCompiler_object_inline_stack_2467 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2494 && + JSCompiler_object_inline_stack_2494 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2467), + ((prevState.retryLane = JSCompiler_object_inline_stack_2494), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2467 + JSCompiler_object_inline_stack_2494 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2466, + JSCompiler_object_inline_digest_2493, current, - JSCompiler_object_inline_stack_2467 + JSCompiler_object_inline_stack_2494 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2465.data === + JSCompiler_object_inline_message_2492.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9456,7 +9335,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2465.data === + JSCompiler_object_inline_message_2492.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9464,12 +9343,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2465._reactRetry = + (JSCompiler_object_inline_message_2492._reactRetry = workInProgress), (workInProgress = null)) - : ((renderLanes = prevState.treeContext), + : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2465.nextSibling + JSCompiler_object_inline_message_2492.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9477,83 +9356,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_2467.children + JSCompiler_object_inline_stack_2494.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2468) + if (JSCompiler_object_inline_componentStack_2495) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2468 = - JSCompiler_object_inline_stack_2467.fallback), - (JSCompiler_object_inline_message_2465 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2495 = + JSCompiler_object_inline_stack_2494.fallback), + (JSCompiler_object_inline_message_2492 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (componentStack = { - mode: "hidden", - children: JSCompiler_object_inline_stack_2467.children - }), - disableLegacyMode || - 0 !== (JSCompiler_object_inline_message_2465 & 1) || - workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2467 = createWorkInProgress( - JSCompiler_temp, - componentStack - )), - (JSCompiler_object_inline_stack_2467.subtreeFlags = - JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2467 = workInProgress.child), - (JSCompiler_object_inline_stack_2467.childLanes = 0), - (JSCompiler_object_inline_stack_2467.pendingProps = - componentStack), - workInProgress.mode & 2 && - ((JSCompiler_object_inline_stack_2467.actualDuration = 0), - (JSCompiler_object_inline_stack_2467.actualStartTime = -1), - (JSCompiler_object_inline_stack_2467.selfBaseDuration = - JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2467.treeBaseDuration = - JSCompiler_temp.treeBaseDuration)), - (workInProgress.deletions = null)), + (JSCompiler_object_inline_stack_2494 = createWorkInProgress( + JSCompiler_temp, + { + mode: "hidden", + children: JSCompiler_object_inline_stack_2494.children + } + )), + (JSCompiler_object_inline_stack_2494.subtreeFlags = + JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2468 = + ? (JSCompiler_object_inline_componentStack_2495 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2468 + JSCompiler_object_inline_componentStack_2495 )) - : ((JSCompiler_object_inline_componentStack_2468 = + : ((JSCompiler_object_inline_componentStack_2495 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2468, - JSCompiler_object_inline_message_2465, + JSCompiler_object_inline_componentStack_2495, + JSCompiler_object_inline_message_2492, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2468.flags |= 2)), - (JSCompiler_object_inline_componentStack_2468.return = + (JSCompiler_object_inline_componentStack_2495.flags |= 2)), + (JSCompiler_object_inline_componentStack_2495.return = workInProgress), - (JSCompiler_object_inline_stack_2467.return = workInProgress), - (JSCompiler_object_inline_stack_2467.sibling = - JSCompiler_object_inline_componentStack_2468), - (workInProgress.child = JSCompiler_object_inline_stack_2467), - (JSCompiler_object_inline_stack_2467 = - JSCompiler_object_inline_componentStack_2468), - (JSCompiler_object_inline_componentStack_2468 = workInProgress.child), - (JSCompiler_object_inline_message_2465 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2465 - ? (JSCompiler_object_inline_message_2465 = + (JSCompiler_object_inline_stack_2494.return = workInProgress), + (JSCompiler_object_inline_stack_2494.sibling = + JSCompiler_object_inline_componentStack_2495), + (workInProgress.child = JSCompiler_object_inline_stack_2494), + (JSCompiler_object_inline_stack_2494 = + JSCompiler_object_inline_componentStack_2495), + (JSCompiler_object_inline_componentStack_2495 = workInProgress.child), + (JSCompiler_object_inline_message_2492 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2492 + ? (JSCompiler_object_inline_message_2492 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2465.cachePool), + JSCompiler_object_inline_message_2492.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9561,80 +9424,72 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2465 = { + (JSCompiler_object_inline_message_2492 = { baseLanes: - JSCompiler_object_inline_message_2465.baseLanes | renderLanes, + JSCompiler_object_inline_message_2492.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2468.memoizedState = - JSCompiler_object_inline_message_2465), + (JSCompiler_object_inline_componentStack_2495.memoizedState = + JSCompiler_object_inline_message_2492), enableTransitionTracing && - ((JSCompiler_object_inline_message_2465 = enableTransitionTracing + ((JSCompiler_object_inline_message_2492 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2465 && + null !== JSCompiler_object_inline_message_2492 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2468.updateQueue), + JSCompiler_object_inline_componentStack_2495.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2468.updateQueue = { - transitions: JSCompiler_object_inline_message_2465, + ? (JSCompiler_object_inline_componentStack_2495.updateQueue = { + transitions: JSCompiler_object_inline_message_2492, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2468.updateQueue = { - transitions: JSCompiler_object_inline_message_2465, + ? (JSCompiler_object_inline_componentStack_2495.updateQueue = { + transitions: JSCompiler_object_inline_message_2492, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack ? componentStack.retryQueue : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2465), + JSCompiler_object_inline_message_2492), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2468.childLanes = + (JSCompiler_object_inline_componentStack_2495.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2466, + JSCompiler_object_inline_digest_2493, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2467 + JSCompiler_object_inline_stack_2494 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2466 = current.child; - current = JSCompiler_object_inline_digest_2466.sibling; - JSCompiler_object_inline_digest_2466 = createWorkInProgress( - JSCompiler_object_inline_digest_2466, - { - mode: "visible", - children: JSCompiler_object_inline_stack_2467.children - } - ); - disableLegacyMode || - 0 !== (workInProgress.mode & 1) || - (JSCompiler_object_inline_digest_2466.lanes = renderLanes); - JSCompiler_object_inline_digest_2466.return = workInProgress; - JSCompiler_object_inline_digest_2466.sibling = null; + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { + mode: "visible", + children: JSCompiler_object_inline_stack_2494.children + }); + renderLanes.return = workInProgress; + renderLanes.sibling = null; null !== current && - ((renderLanes = workInProgress.deletions), - null === renderLanes + ((JSCompiler_object_inline_digest_2493 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2493 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2466; + : JSCompiler_object_inline_digest_2493.push(current)); + workInProgress.child = renderLanes; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2466; + 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); @@ -9645,37 +9500,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), - (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, @@ -9854,69 +9698,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, @@ -10090,7 +9924,7 @@ __DEV__ && } function beginWork(current, workInProgress, renderLanes) { if (workInProgress._debugNeedsRemount && null !== current) { - var copiedFiber = createFiberFromTypeAndProps( + renderLanes = createFiberFromTypeAndProps( workInProgress.type, workInProgress.key, workInProgress.pendingProps, @@ -10102,13 +9936,13 @@ __DEV__ && if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; workInProgress.alternate = null; - copiedFiber.index = workInProgress.index; - copiedFiber.sibling = workInProgress.sibling; - copiedFiber.return = workInProgress.return; - copiedFiber.ref = workInProgress.ref; - copiedFiber._debugInfo = workInProgress._debugInfo; + renderLanes.index = workInProgress.index; + renderLanes.sibling = workInProgress.sibling; + renderLanes.return = workInProgress.return; + renderLanes.ref = workInProgress.ref; + renderLanes._debugInfo = workInProgress._debugInfo; if (workInProgress === returnFiber.child) - returnFiber.child = copiedFiber; + returnFiber.child = renderLanes; else { var prevSibling = returnFiber.child; if (null === prevSibling) @@ -10116,14 +9950,14 @@ __DEV__ && for (; prevSibling.sibling !== workInProgress; ) if (((prevSibling = prevSibling.sibling), null === prevSibling)) throw Error("Expected to find the previous sibling."); - prevSibling.sibling = copiedFiber; + prevSibling.sibling = renderLanes; } - var deletions = returnFiber.deletions; - null === deletions + workInProgress = returnFiber.deletions; + null === workInProgress ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16)) - : deletions.push(current); - copiedFiber.flags |= 2; - return copiedFiber; + : workInProgress.push(current); + renderLanes.flags |= 2; + return renderLanes; } if (null !== current) if ( @@ -10149,142 +9983,150 @@ __DEV__ && } else { didReceiveUpdate = !1; - var JSCompiler_temp; - if ((JSCompiler_temp = isHydrating)) + if ((returnFiber = isHydrating)) warnIfNotHydrating(), - (JSCompiler_temp = 0 !== (workInProgress.flags & 1048576)); - if (JSCompiler_temp) { - var slotIndex = workInProgress.index; - warnIfNotHydrating(); - pushTreeId(workInProgress, treeForkCount, slotIndex); - } + (returnFiber = 0 !== (workInProgress.flags & 1048576)); + returnFiber && + ((returnFiber = workInProgress.index), + warnIfNotHydrating(), + pushTreeId(workInProgress, treeForkCount, returnFiber)); } workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - a: { - var elementType = workInProgress.elementType; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - var props = workInProgress.pendingProps; - var Component = callLazyInitInDEV(elementType); - workInProgress.type = Component; - if ("function" === typeof Component) - if (shouldConstruct(Component)) { - var resolvedProps = resolveClassComponentProps( - Component, - props, + a: if ( + ((returnFiber = workInProgress.pendingProps), + (current = callLazyInitInDEV(workInProgress.elementType)), + (workInProgress.type = current), + "function" === typeof current) + ) + shouldConstruct(current) + ? ((returnFiber = resolveClassComponentProps( + current, + returnFiber, !1 - ); - workInProgress.tag = 1; - workInProgress.type = Component = - resolveFunctionForHotReloading(Component); - var JSCompiler_inline_result = updateClassComponent( + )), + (workInProgress.tag = 1), + (workInProgress.type = current = + resolveFunctionForHotReloading(current)), + (workInProgress = updateClassComponent( null, workInProgress, - Component, - resolvedProps, + current, + returnFiber, renderLanes - ); - } else { - var _resolvedProps = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(Component, props); - workInProgress.tag = 0; - validateFunctionComponentInDev(workInProgress, Component); - workInProgress.type = Component = - resolveFunctionForHotReloading(Component); - JSCompiler_inline_result = updateFunctionComponent( + ))) + : ((returnFiber = disableDefaultPropsExceptForClasses + ? returnFiber + : resolveDefaultPropsOnNonClassComponent( + current, + returnFiber + )), + (workInProgress.tag = 0), + validateFunctionComponentInDev(workInProgress, current), + (workInProgress.type = current = + resolveFunctionForHotReloading(current)), + (workInProgress = updateFunctionComponent( null, workInProgress, - Component, - _resolvedProps, + current, + returnFiber, + renderLanes + ))); + else { + if (void 0 !== current && null !== current) + if ( + ((prevSibling = current.$$typeof), + prevSibling === REACT_FORWARD_REF_TYPE) + ) { + returnFiber = disableDefaultPropsExceptForClasses + ? returnFiber + : resolveDefaultPropsOnNonClassComponent( + current, + returnFiber + ); + workInProgress.tag = 11; + workInProgress.type = current = + resolveForwardRefForHotReloading(current); + workInProgress = updateForwardRef( + null, + workInProgress, + current, + returnFiber, renderLanes ); + break a; + } else if (prevSibling === REACT_MEMO_TYPE) { + returnFiber = disableDefaultPropsExceptForClasses + ? returnFiber + : resolveDefaultPropsOnNonClassComponent( + current, + returnFiber + ); + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + current, + disableDefaultPropsExceptForClasses + ? returnFiber + : resolveDefaultPropsOnNonClassComponent( + current.type, + returnFiber + ), + renderLanes + ); + break a; } - else { - if (void 0 !== Component && null !== Component) { - var $$typeof = Component.$$typeof; - if ($$typeof === REACT_FORWARD_REF_TYPE) { - var _resolvedProps2 = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(Component, props); - workInProgress.tag = 11; - workInProgress.type = Component = - resolveForwardRefForHotReloading(Component); - JSCompiler_inline_result = updateForwardRef( - null, - workInProgress, - Component, - _resolvedProps2, - renderLanes - ); - break a; - } else if ($$typeof === REACT_MEMO_TYPE) { - var _resolvedProps3 = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(Component, props); - workInProgress.tag = 14; - JSCompiler_inline_result = updateMemoComponent( - null, - workInProgress, - Component, - disableDefaultPropsExceptForClasses - ? _resolvedProps3 - : resolveDefaultPropsOnNonClassComponent( - Component.type, - _resolvedProps3 - ), - renderLanes - ); - break a; - } - } - var hint = ""; - null !== Component && - "object" === typeof Component && - Component.$$typeof === REACT_LAZY_TYPE && - (hint = - " Did you wrap a component in React.lazy() more than once?"); - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." + - hint - ); - } + workInProgress = ""; + null !== current && + "object" === typeof current && + current.$$typeof === REACT_LAZY_TYPE && + (workInProgress = + " Did you wrap a component in React.lazy() more than once?"); + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + current + + ". Lazy element type must resolve to a class or function." + + workInProgress + ); } - return JSCompiler_inline_result; + return workInProgress; case 0: - var Component$jscomp$0 = workInProgress.type, - unresolvedProps = workInProgress.pendingProps, - resolvedProps$jscomp$0 = + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (prevSibling = disableDefaultPropsExceptForClasses || - workInProgress.elementType === Component$jscomp$0 - ? unresolvedProps + workInProgress.elementType === returnFiber + ? prevSibling : resolveDefaultPropsOnNonClassComponent( - Component$jscomp$0, - unresolvedProps - ); - return updateFunctionComponent( - current, - workInProgress, - Component$jscomp$0, - resolvedProps$jscomp$0, - renderLanes + returnFiber, + prevSibling + )), + updateFunctionComponent( + current, + workInProgress, + returnFiber, + prevSibling, + renderLanes + ) ); case 1: - var _Component = workInProgress.type, - _resolvedProps4 = resolveClassComponentProps( - _Component, + return ( + (returnFiber = workInProgress.type), + (prevSibling = resolveClassComponentProps( + returnFiber, workInProgress.pendingProps, - workInProgress.elementType === _Component - ); - return updateClassComponent( - current, - workInProgress, - _Component, - _resolvedProps4, - renderLanes + workInProgress.elementType === returnFiber + )), + updateClassComponent( + current, + workInProgress, + returnFiber, + prevSibling, + renderLanes + ) ); case 3: a: { @@ -10293,325 +10135,330 @@ __DEV__ && throw Error( "Should have a current fiber. This is a bug in React." ); - var nextProps = workInProgress.pendingProps, - prevState = workInProgress.memoizedState, - prevChildren = prevState.element; + var nextProps = workInProgress.pendingProps; + prevSibling = workInProgress.memoizedState; + returnFiber = prevSibling.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions, workInProgress); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - var nextCache = nextState.cache; - pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== prevState.cache && + nextProps = nextState.cache; + pushProvider(workInProgress, CacheContext, nextProps); + nextProps !== prevSibling.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - var nextChildren = nextState.element; - if (prevState.isDehydrated) { - var overrideState = { - element: nextChildren, - isDehydrated: !1, - cache: nextState.cache - }; - workInProgress.updateQueue.baseState = overrideState; - workInProgress.memoizedState = overrideState; - if (workInProgress.flags & 256) { - var JSCompiler_inline_result$jscomp$0 = - mountHostRootWithoutHydrating( - current, - workInProgress, - nextChildren, - renderLanes - ); + nextProps = nextState.element; + if (prevSibling.isDehydrated) + if ( + ((prevSibling = { + element: nextProps, + isDehydrated: !1, + cache: nextState.cache + }), + (workInProgress.updateQueue.baseState = prevSibling), + (workInProgress.memoizedState = prevSibling), + workInProgress.flags & 256) + ) { + workInProgress = mountHostRootWithoutHydrating( + current, + workInProgress, + nextProps, + renderLanes + ); break a; - } else if (nextChildren !== prevChildren) { - var recoverableError = createCapturedValueAtFiber( + } else if (nextProps !== returnFiber) { + returnFiber = createCapturedValueAtFiber( Error( "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering." ), workInProgress ); - queueHydrationError(recoverableError); - JSCompiler_inline_result$jscomp$0 = - mountHostRootWithoutHydrating( - current, - workInProgress, - nextChildren, - renderLanes - ); - break a; - } else { - nextHydratableInstance = getNextHydratable( - workInProgress.stateNode.containerInfo.firstChild + queueHydrationError(returnFiber); + workInProgress = mountHostRootWithoutHydrating( + current, + workInProgress, + nextProps, + renderLanes ); - hydrationParentFiber = workInProgress; - isHydrating = !0; - hydrationErrors = null; - didSuspendOrErrorDEV = !1; - hydrationDiffRootDEV = null; - rootOrSingletonContext = !0; + break a; + } else for ( - var child = mountChildFibers( + nextHydratableInstance = getNextHydratable( + workInProgress.stateNode.containerInfo.firstChild + ), + hydrationParentFiber = workInProgress, + isHydrating = !0, + hydrationErrors = null, + didSuspendOrErrorDEV = !1, + hydrationDiffRootDEV = null, + rootOrSingletonContext = !0, + renderLanes = mountChildFibers( workInProgress, null, - nextChildren, + nextProps, renderLanes ), - node = (workInProgress.child = child); - node; + workInProgress.child = renderLanes; + renderLanes; ) - (node.flags = (node.flags & -3) | 4096), - (node = node.sibling); - } - } else { + (renderLanes.flags = (renderLanes.flags & -3) | 4096), + (renderLanes = renderLanes.sibling); + else { resetHydrationState(); - if (nextChildren === prevChildren) { - JSCompiler_inline_result$jscomp$0 = - bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); + if (nextProps === returnFiber) { + workInProgress = bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); break a; } reconcileChildren( current, workInProgress, - nextChildren, + nextProps, renderLanes ); } - JSCompiler_inline_result$jscomp$0 = workInProgress.child; + workInProgress = workInProgress.child; } - return JSCompiler_inline_result$jscomp$0; + return workInProgress; case 26: - markRef(current, workInProgress); - if (null === current) { - var resource = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - ); - if (resource) workInProgress.memoizedState = resource; - else if (!isHydrating) { - var type = workInProgress.type, - props$jscomp$0 = workInProgress.pendingProps, - rootContainerInstance = requiredContext( - rootInstanceStackCursor.current - ), - domElement = getOwnerDocumentFromRootContainer( - rootContainerInstance - ).createElement(type); - domElement[internalInstanceKey] = workInProgress; - domElement[internalPropsKey] = props$jscomp$0; - setInitialProperties(domElement, type, props$jscomp$0); - markNodeAsHoistable(domElement); - workInProgress.stateNode = domElement; - } - } else - workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - ); - return null; + return ( + markRef(current, workInProgress), + null === current + ? (renderLanes = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + )) + ? (workInProgress.memoizedState = renderLanes) + : isHydrating || + ((renderLanes = workInProgress.type), + (current = workInProgress.pendingProps), + (returnFiber = requiredContext( + rootInstanceStackCursor.current + )), + (returnFiber = + getOwnerDocumentFromRootContainer( + returnFiber + ).createElement(renderLanes)), + (returnFiber[internalInstanceKey] = workInProgress), + (returnFiber[internalPropsKey] = current), + setInitialProperties(returnFiber, renderLanes, current), + markNodeAsHoistable(returnFiber), + (workInProgress.stateNode = returnFiber)) + : (workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + )), + null + ); case 27: - pushHostContext(workInProgress); - if (null === current && isHydrating) { - var currentRootContainer = requiredContext( - rootInstanceStackCursor.current - ), - currentHostContext = getHostContext(), - instance = (workInProgress.stateNode = resolveSingletonInstance( + return ( + pushHostContext(workInProgress), + null === current && + isHydrating && + ((prevSibling = requiredContext(rootInstanceStackCursor.current)), + (returnFiber = getHostContext()), + (prevSibling = workInProgress.stateNode = + resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + prevSibling, + returnFiber, + !1 + )), + didSuspendOrErrorDEV || + ((returnFiber = diffHydratedProperties( + prevSibling, + workInProgress.type, + workInProgress.pendingProps, + returnFiber + )), + null !== returnFiber && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + returnFiber)), + (hydrationParentFiber = workInProgress), + (rootOrSingletonContext = !0), + (nextHydratableInstance = getNextHydratable( + prevSibling.firstChild + ))), + (returnFiber = workInProgress.pendingProps.children), + null !== current || isHydrating + ? reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ) + : (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + returnFiber, + renderLanes + )), + markRef(current, workInProgress), + workInProgress.child + ); + case 5: + return ( + null === current && + isHydrating && + ((nextProps = getHostContext()), + (returnFiber = validateDOMNesting( workInProgress.type, - workInProgress.pendingProps, - currentRootContainer, - currentHostContext, - !1 - )); - if (!didSuspendOrErrorDEV) { - var differences = diffHydratedProperties( - instance, - workInProgress.type, - workInProgress.pendingProps, - currentHostContext - ); - null !== differences && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - differences); - } - hydrationParentFiber = workInProgress; - rootOrSingletonContext = !0; - nextHydratableInstance = getNextHydratable(instance.firstChild); - } - var nextChildren$jscomp$0 = workInProgress.pendingProps.children; - null !== current || isHydrating - ? reconcileChildren( + nextProps.ancestorInfo + )), + (prevSibling = nextHydratableInstance), + (nextState = !prevSibling) || + ((nextState = canHydrateInstance( + prevSibling, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== nextState + ? ((workInProgress.stateNode = nextState), + didSuspendOrErrorDEV || + ((nextProps = diffHydratedProperties( + nextState, + workInProgress.type, + workInProgress.pendingProps, + nextProps + )), + null !== nextProps && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + nextProps)), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + nextState.firstChild + )), + (rootOrSingletonContext = !1), + (nextProps = !0)) + : (nextProps = !1), + (nextState = !nextProps)), + nextState && + (returnFiber && + warnNonHydratedInstance(workInProgress, prevSibling), + throwOnHydrationMismatch(workInProgress))), + pushHostContext(workInProgress), + (prevSibling = workInProgress.type), + (nextProps = workInProgress.pendingProps), + (nextState = null !== current ? current.memoizedProps : null), + (returnFiber = nextProps.children), + shouldSetTextContent(prevSibling, nextProps) + ? (returnFiber = null) + : null !== nextState && + shouldSetTextContent(prevSibling, nextState) && + (workInProgress.flags |= 32), + null !== workInProgress.memoizedState && + ((prevSibling = renderWithHooks( current, workInProgress, - nextChildren$jscomp$0, - renderLanes - ) - : (workInProgress.child = reconcileChildFibers( - workInProgress, + TransitionAwareHostComponent, + null, null, - nextChildren$jscomp$0, renderLanes - )); - markRef(current, workInProgress); - return workInProgress.child; - case 5: - if (null === current && isHydrating) { - var currentHostContext$jscomp$0 = getHostContext(), - shouldKeepWarning = validateDOMNesting( - workInProgress.type, - currentHostContext$jscomp$0.ancestorInfo - ), - nextInstance = nextHydratableInstance, - JSCompiler_temp$jscomp$0; - if (!(JSCompiler_temp$jscomp$0 = !nextInstance)) { - var instance$jscomp$0 = canHydrateInstance( - nextInstance, - workInProgress.type, - workInProgress.pendingProps, - rootOrSingletonContext - ); - if (null !== instance$jscomp$0) { - workInProgress.stateNode = instance$jscomp$0; - if (!didSuspendOrErrorDEV) { - var differences$jscomp$0 = diffHydratedProperties( - instance$jscomp$0, - workInProgress.type, - workInProgress.pendingProps, - currentHostContext$jscomp$0 - ); - null !== differences$jscomp$0 && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - differences$jscomp$0); - } - hydrationParentFiber = workInProgress; - nextHydratableInstance = getNextHydratable( - instance$jscomp$0.firstChild - ); - rootOrSingletonContext = !1; - var JSCompiler_inline_result$jscomp$1 = !0; - } else JSCompiler_inline_result$jscomp$1 = !1; - JSCompiler_temp$jscomp$0 = !JSCompiler_inline_result$jscomp$1; - } - JSCompiler_temp$jscomp$0 && - (shouldKeepWarning && - warnNonHydratedInstance(workInProgress, nextInstance), - throwOnHydrationMismatch(workInProgress)); - } - pushHostContext(workInProgress); - var type$jscomp$0 = workInProgress.type, - nextProps$jscomp$0 = workInProgress.pendingProps, - prevProps = null !== current ? current.memoizedProps : null, - nextChildren$jscomp$1 = nextProps$jscomp$0.children; - shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) - ? (nextChildren$jscomp$1 = null) - : null !== prevProps && - shouldSetTextContent(type$jscomp$0, prevProps) && - (workInProgress.flags |= 32); - if (null !== workInProgress.memoizedState) { - var newState = renderWithHooks( + )), + (HostTransitionContext._currentValue = prevSibling), + enableLazyContextPropagation || + (didReceiveUpdate && + null !== current && + current.memoizedState.memoizedState !== prevSibling && + propagateContextChange( + workInProgress, + HostTransitionContext, + renderLanes + ))), + markRef(current, workInProgress), + reconcileChildren( current, workInProgress, - TransitionAwareHostComponent, - null, - null, + returnFiber, renderLanes - ); - HostTransitionContext._currentValue = newState; - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== newState && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - )); - } - markRef(current, workInProgress); - reconcileChildren( - current, - workInProgress, - nextChildren$jscomp$1, - renderLanes + ), + workInProgress.child ); - return workInProgress.child; case 6: - if (null === current && isHydrating) { - var text = workInProgress.pendingProps, - ancestor = getHostContext().ancestorInfo.current; - var shouldKeepWarning$jscomp$0 = - null != ancestor ? validateTextNesting(text, ancestor.tag) : !0; - var nextInstance$jscomp$0 = nextHydratableInstance, - JSCompiler_temp$jscomp$1; - if (!(JSCompiler_temp$jscomp$1 = !nextInstance$jscomp$0)) { - var textInstance = canHydrateTextInstance( - nextInstance$jscomp$0, - workInProgress.pendingProps, - rootOrSingletonContext - ); - if (null !== textInstance) { - workInProgress.stateNode = textInstance; - hydrationParentFiber = workInProgress; - nextHydratableInstance = null; - var JSCompiler_inline_result$jscomp$2 = !0; - } else JSCompiler_inline_result$jscomp$2 = !1; - JSCompiler_temp$jscomp$1 = !JSCompiler_inline_result$jscomp$2; - } - JSCompiler_temp$jscomp$1 && - (shouldKeepWarning$jscomp$0 && - warnNonHydratedInstance(workInProgress, nextInstance$jscomp$0), - throwOnHydrationMismatch(workInProgress)); - } - return null; + return ( + null === current && + isHydrating && + ((renderLanes = workInProgress.pendingProps), + (current = getHostContext().ancestorInfo.current), + (renderLanes = + null != current + ? validateTextNesting(renderLanes, current.tag) + : !0), + (current = nextHydratableInstance), + (returnFiber = !current) || + ((returnFiber = canHydrateTextInstance( + current, + workInProgress.pendingProps, + rootOrSingletonContext + )), + null !== returnFiber + ? ((workInProgress.stateNode = returnFiber), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (returnFiber = !0)) + : (returnFiber = !1), + (returnFiber = !returnFiber)), + returnFiber && + (renderLanes && + warnNonHydratedInstance(workInProgress, current), + throwOnHydrationMismatch(workInProgress))), + null + ); case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo + return ( + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo + ), + (returnFiber = workInProgress.pendingProps), + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + returnFiber, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ), + workInProgress.child ); - var nextChildren$jscomp$2 = workInProgress.pendingProps; - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - nextChildren$jscomp$2, - renderLanes - )) - : reconcileChildren( - current, - workInProgress, - nextChildren$jscomp$2, - renderLanes - ); - return workInProgress.child; case 11: - var type$jscomp$1 = workInProgress.type, - _unresolvedProps2 = workInProgress.pendingProps, - _resolvedProps5 = + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (prevSibling = disableDefaultPropsExceptForClasses || - workInProgress.elementType === type$jscomp$1 - ? _unresolvedProps2 + workInProgress.elementType === returnFiber + ? prevSibling : resolveDefaultPropsOnNonClassComponent( - type$jscomp$1, - _unresolvedProps2 - ); - return updateForwardRef( - current, - workInProgress, - type$jscomp$1, - _resolvedProps5, - renderLanes + returnFiber, + prevSibling + )), + updateForwardRef( + current, + workInProgress, + returnFiber, + prevSibling, + renderLanes + ) ); case 7: return ( @@ -10634,103 +10481,116 @@ __DEV__ && workInProgress.child ); case 12: - workInProgress.flags |= 4; - var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes + return ( + (workInProgress.flags |= 4), + (returnFiber = workInProgress.stateNode), + (returnFiber.effectDuration = 0), + (returnFiber.passiveEffectDuration = 0), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child ); - return workInProgress.child; case 10: a: { - var context = enableRenderableContext + returnFiber = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - var newProps = workInProgress.pendingProps, - oldProps = workInProgress.memoizedProps, - newValue = newProps.value; - "value" in newProps || + prevSibling = workInProgress.pendingProps; + nextProps = workInProgress.memoizedProps; + nextState = prevSibling.value; + "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), error$jscomp$0( "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" )); - pushProvider(workInProgress, context, newValue); - if (!enableLazyContextPropagation && null !== oldProps) - if (objectIs(oldProps.value, newValue)) { + pushProvider(workInProgress, returnFiber, nextState); + if (!enableLazyContextPropagation && null !== nextProps) + if (objectIs(nextProps.value, nextState)) { if ( - oldProps.children === newProps.children && + nextProps.children === prevSibling.children && !didPerformWorkStackCursor.current ) { - var JSCompiler_inline_result$jscomp$3 = - bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); + workInProgress = bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); break a; } } else - propagateContextChange(workInProgress, context, renderLanes); + propagateContextChange( + workInProgress, + returnFiber, + renderLanes + ); reconcileChildren( current, workInProgress, - newProps.children, + prevSibling.children, renderLanes ); - JSCompiler_inline_result$jscomp$3 = workInProgress.child; + workInProgress = workInProgress.child; } - return JSCompiler_inline_result$jscomp$3; + return workInProgress; case 9: - if (enableRenderableContext) - var context$jscomp$0 = workInProgress.type._context; - else - (context$jscomp$0 = workInProgress.type), - void 0 !== context$jscomp$0._context && - (context$jscomp$0 = context$jscomp$0._context); - var render = workInProgress.pendingProps.children; - "function" !== typeof render && - error$jscomp$0( - "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." - ); - prepareToReadContext(workInProgress, renderLanes); - var newValue$jscomp$0 = readContext(context$jscomp$0); - enableSchedulingProfiler && - markComponentRenderStarted(workInProgress); - var newChildren = callComponentInDEV( - render, - newValue$jscomp$0, - void 0 + return ( + enableRenderableContext + ? (prevSibling = workInProgress.type._context) + : ((prevSibling = workInProgress.type), + void 0 !== prevSibling._context && + (prevSibling = prevSibling._context)), + (returnFiber = workInProgress.pendingProps.children), + "function" !== typeof returnFiber && + error$jscomp$0( + "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." + ), + prepareToReadContext(workInProgress, renderLanes), + (prevSibling = readContext(prevSibling)), + enableSchedulingProfiler && + markComponentRenderStarted(workInProgress), + (returnFiber = callComponentInDEV( + returnFiber, + prevSibling, + void 0 + )), + enableSchedulingProfiler && markComponentRenderStopped(), + (workInProgress.flags |= 1), + reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ), + workInProgress.child ); - enableSchedulingProfiler && markComponentRenderStopped(); - workInProgress.flags |= 1; - reconcileChildren(current, workInProgress, newChildren, renderLanes); - return workInProgress.child; case 14: - var _type = workInProgress.type, - _unresolvedProps3 = workInProgress.pendingProps, - _resolvedProps6 = disableDefaultPropsExceptForClasses - ? _unresolvedProps3 + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (prevSibling = disableDefaultPropsExceptForClasses + ? prevSibling : resolveDefaultPropsOnNonClassComponent( - _type, - _unresolvedProps3 - ); - _resolvedProps6 = disableDefaultPropsExceptForClasses - ? _resolvedProps6 - : resolveDefaultPropsOnNonClassComponent( - _type.type, - _resolvedProps6 - ); - return updateMemoComponent( - current, - workInProgress, - _type, - _resolvedProps6, - renderLanes + returnFiber, + prevSibling + )), + (prevSibling = disableDefaultPropsExceptForClasses + ? prevSibling + : resolveDefaultPropsOnNonClassComponent( + returnFiber.type, + prevSibling + )), + updateMemoComponent( + current, + workInProgress, + returnFiber, + prevSibling, + renderLanes + ) ); case 15: return updateSimpleMemoComponent( @@ -10740,53 +10600,6 @@ __DEV__ && workInProgress.pendingProps, renderLanes ); - case 17: - if (disableLegacyMode) break; - var _Component2 = workInProgress.type, - _resolvedProps7 = resolveClassComponentProps( - _Component2, - workInProgress.pendingProps, - workInProgress.elementType === _Component2 - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 1; - if (isContextProvider(_Component2)) { - var hasContext = !0; - pushContextProvider(workInProgress); - } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); - constructClassInstance(workInProgress, _Component2, _resolvedProps7); - mountClassInstance( - workInProgress, - _Component2, - _resolvedProps7, - renderLanes - ); - return finishClassComponent( - null, - workInProgress, - _Component2, - !0, - hasContext, - renderLanes - ); - case 28: - if (disableLegacyMode) break; - var _Component3 = workInProgress.type, - _resolvedProps8 = resolveClassComponentProps( - _Component3, - workInProgress.pendingProps, - workInProgress.elementType === _Component3 - ); - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - workInProgress.tag = 0; - return updateFunctionComponent( - null, - workInProgress, - _Component3, - _resolvedProps8, - renderLanes - ); case 19: return updateSuspenseListComponent( current, @@ -10794,15 +10607,17 @@ __DEV__ && renderLanes ); case 21: - var nextChildren$jscomp$3 = workInProgress.pendingProps.children; - markRef(current, workInProgress); - reconcileChildren( - current, - workInProgress, - nextChildren$jscomp$3, - renderLanes + return ( + (returnFiber = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ), + workInProgress.child ); - return workInProgress.child; case 22: return updateOffscreenComponent(current, workInProgress, renderLanes); case 23: @@ -10812,96 +10627,94 @@ __DEV__ && renderLanes ); case 24: - prepareToReadContext(workInProgress, renderLanes); - var parentCache = readContext(CacheContext); - if (null === current) { - var cacheFromPool = peekCacheFromPool(); - if (null !== cacheFromPool) var freshCache = cacheFromPool; - else { - var root = workInProgressRoot, - freshCache$jscomp$0 = createCache(); - root.pooledCache = freshCache$jscomp$0; - retainCache(freshCache$jscomp$0); - null !== freshCache$jscomp$0 && - (root.pooledCacheLanes |= renderLanes); - freshCache = freshCache$jscomp$0; - } - workInProgress.memoizedState = { - parent: parentCache, - cache: freshCache - }; - initializeUpdateQueue(workInProgress); - pushProvider(workInProgress, CacheContext, freshCache); - } else { - 0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()); - var prevState$jscomp$0 = current.memoizedState, - nextState$jscomp$0 = workInProgress.memoizedState; - if (prevState$jscomp$0.parent !== parentCache) { - var derivedState = { parent: parentCache, cache: parentCache }; - workInProgress.memoizedState = derivedState; - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - derivedState); - pushProvider(workInProgress, CacheContext, parentCache); - } else { - var nextCache$jscomp$0 = nextState$jscomp$0.cache; - pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); - nextCache$jscomp$0 !== prevState$jscomp$0.cache && - propagateContextChange( - workInProgress, - CacheContext, - renderLanes - ); - } - } - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes + return ( + prepareToReadContext(workInProgress, renderLanes), + (returnFiber = readContext(CacheContext)), + null === current + ? ((prevSibling = peekCacheFromPool()), + null === prevSibling && + ((prevSibling = workInProgressRoot), + (nextProps = createCache()), + (prevSibling.pooledCache = nextProps), + retainCache(nextProps), + null !== nextProps && + (prevSibling.pooledCacheLanes |= renderLanes), + (prevSibling = nextProps)), + (workInProgress.memoizedState = { + parent: returnFiber, + cache: prevSibling + }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, prevSibling)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (prevSibling = current.memoizedState), + (nextProps = workInProgress.memoizedState), + prevSibling.parent !== returnFiber + ? ((prevSibling = { + parent: returnFiber, + cache: returnFiber + }), + (workInProgress.memoizedState = prevSibling), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + prevSibling), + pushProvider(workInProgress, CacheContext, returnFiber)) + : ((returnFiber = nextProps.cache), + pushProvider(workInProgress, CacheContext, returnFiber), + returnFiber !== prevSibling.cache && + propagateContextChange( + workInProgress, + CacheContext, + renderLanes + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child ); - return workInProgress.child; case 25: - if (enableTransitionTracing) { - if (enableTransitionTracing) { - if (null === current) { - var currentTransitions = enableTransitionTracing - ? transitionStack.current - : null; - if (null !== currentTransitions) { - var markerInstance = { - tag: TransitionTracingMarker, - transitions: new Set(currentTransitions), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }; - workInProgress.stateNode = markerInstance; - workInProgress.flags |= 2048; - } - } else - current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ); - var instance$jscomp$1 = workInProgress.stateNode; - null !== instance$jscomp$1 && - pushMarkerInstance(workInProgress, instance$jscomp$1); - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ); - var JSCompiler_inline_result$jscomp$4 = workInProgress.child; - } else JSCompiler_inline_result$jscomp$4 = null; - return JSCompiler_inline_result$jscomp$4; - } + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); break; case 29: throw workInProgress.pendingProps; @@ -11509,8 +11322,6 @@ __DEV__ && var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -11941,11 +11752,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; @@ -12068,14 +11874,14 @@ __DEV__ && ? (null !== current.memoizedState) !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192)), - !newProps || (!disableLegacyMode && 0 === (workInProgress.mode & 1)) - ? bubbleProperties(workInProgress) - : 0 !== (renderLanes & OffscreenLane) && + newProps + ? 0 !== (renderLanes & OffscreenLane) && 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), @@ -12111,8 +11917,6 @@ __DEV__ && bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error( "Unknown unit of work tag (" + @@ -12273,30 +12077,20 @@ __DEV__ && (executionContext & CommitContext) !== NoContext ); } - function safelyCallComponentWillUnmount( - current, - nearestMountedAncestor, - instance - ) { - try { - if ( - ((instance.props = resolveClassComponentProps( - current.type, - current.memoizedProps, - current.elementType === current.type - )), - (instance.state = current.memoizedState), - shouldProfile(current)) - ) - try { - startLayoutEffectTimer(), instance.componentWillUnmount(); - } finally { - recordLayoutEffectDuration(current); - } - else instance.componentWillUnmount(); - } catch (error$7) { - captureCommitPhaseError(current, nearestMountedAncestor, error$7); - } + function callComponentWillUnmountWithTimer(current, instance) { + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); + instance.state = current.memoizedState; + if (shouldProfile(current)) + try { + startLayoutEffectTimer(), instance.componentWillUnmount(); + } finally { + recordLayoutEffectDuration(current); + } + else instance.componentWillUnmount(); } function safelyAttachRef(current, nearestMountedAncestor) { try { @@ -12399,7 +12193,7 @@ __DEV__ && selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$50) { + } catch (e$45) { JSCompiler_temp = null; break a; } @@ -12583,8 +12377,23 @@ __DEV__ && (current.__reactInternalSnapshotBeforeUpdate = flags)); break; case 3: - 0 !== (flags & 1024) && - clearContainer(finishedWork.stateNode.containerInfo); + if (0 !== (flags & 1024)) + a: if ( + ((finishedWork = finishedWork.stateNode.containerInfo), + (current = finishedWork.nodeType), + current === DOCUMENT_NODE) + ) + clearContainerSparingly(finishedWork); + else if (1 === current) + switch (finishedWork.nodeName) { + case "HEAD": + case "HTML": + case "BODY": + clearContainerSparingly(finishedWork); + break a; + default: + finishedWork.textContent = ""; + } break; case 5: case 26: @@ -13034,40 +12843,30 @@ __DEV__ && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevState = - null !== finishedWork.memoizedState || - offscreenSubtreeIsHidden), - !prevState) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevState; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects( - finishedRoot, - finishedWork, - committedLanes - ); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else - recursivelyTraverseLayoutEffects( - finishedRoot, - finishedWork, - committedLanes - ); + prevState = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevState) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevState; + (offscreenSubtreeWasHidden = current) && + !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects( + finishedRoot, + finishedWork, + committedLanes + ); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -13530,15 +13329,21 @@ __DEV__ && ); break; case 1: - offscreenSubtreeWasHidden || + if ( + !offscreenSubtreeWasHidden && (safelyDetachRef(deletedFiber, nearestMountedAncestor), (prevHostParent = deletedFiber.stateNode), - "function" === typeof prevHostParent.componentWillUnmount && - safelyCallComponentWillUnmount( + "function" === typeof prevHostParent.componentWillUnmount) + ) + try { + callComponentWillUnmountWithTimer(deletedFiber, prevHostParent); + } catch (error$7) { + captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - prevHostParent - )); + error$7 + ); + } recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -13555,21 +13360,15 @@ __DEV__ && break; case 22: 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( @@ -14163,15 +13962,13 @@ __DEV__ && safelyDetachRef(current, current.return); domElement = null !== finishedWork.memoizedState; newProps = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & 1 - ? ((suspenseCallback = offscreenSubtreeIsHidden), - (retryQueue = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = suspenseCallback || domElement), - (offscreenSubtreeWasHidden = retryQueue || newProps), - recursivelyTraverseMutationEffects(root, finishedWork, lanes), - (offscreenSubtreeWasHidden = retryQueue), - (offscreenSubtreeIsHidden = suspenseCallback)) - : recursivelyTraverseMutationEffects(root, finishedWork, lanes); + suspenseCallback = offscreenSubtreeIsHidden; + retryQueue = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = suspenseCallback || domElement; + offscreenSubtreeWasHidden = retryQueue || newProps; + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + offscreenSubtreeWasHidden = retryQueue; + offscreenSubtreeIsHidden = suspenseCallback; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -14187,8 +13984,7 @@ __DEV__ && null === current || newProps || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -14409,12 +14205,18 @@ __DEV__ && case 1: safelyDetachRef(finishedWork, finishedWork.return); var instance = finishedWork.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount( - finishedWork, - finishedWork.return, - instance - ); + if ("function" === typeof instance.componentWillUnmount) { + var nearestMountedAncestor = finishedWork.return; + try { + callComponentWillUnmountWithTimer(finishedWork, instance); + } catch (error$7) { + captureCommitPhaseError( + finishedWork, + nearestMountedAncestor, + error$7 + ); + } + } recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 26: @@ -14793,20 +14595,12 @@ __DEV__ && committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) : nextCache._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -14929,21 +14723,12 @@ __DEV__ && committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((_instance4._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) : ((_instance4._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, @@ -15343,76 +15128,6 @@ __DEV__ && ))); } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListMount(Layout | HasEffect, fiber); - } catch (error$40) { - captureCommitPhaseError(fiber, fiber.return, error$40); - } - break; - case 1: - var instance = fiber.stateNode; - if ("function" === typeof instance.componentDidMount) - try { - instance.componentDidMount(); - } catch (error$41) { - captureCommitPhaseError(fiber, fiber.return, error$41); - } - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListMount(Passive | HasEffect, fiber); - } catch (error$42) { - captureCommitPhaseError(fiber, fiber.return, error$42); - } - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListUnmount( - Layout | HasEffect, - fiber, - fiber.return - ); - } catch (error$43) { - captureCommitPhaseError(fiber, fiber.return, error$43); - } - 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: - try { - commitHookEffectListUnmount( - Passive | HasEffect, - fiber, - fiber.return - ); - } catch (error$44) { - captureCommitPhaseError(fiber, fiber.return, error$44); - } - } - } function findFiberRootForHostRoot(hostRoot) { var maybeFiber = getClosestInstanceFromNode(hostRoot) || null; if (null != maybeFiber) { @@ -15600,13 +15315,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 @@ -15694,17 +15402,15 @@ __DEV__ && )); } function requestUpdateLane(fiber) { - var mode = fiber.mode; - if (!disableLegacyMode && 0 === (mode & 1)) return SyncLane; 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(); @@ -15749,10 +15455,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 )); @@ -15767,21 +15473,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 && @@ -15793,13 +15498,6 @@ __DEV__ && workInProgressDeferredLane )); ensureRootIsScheduled(root); - lane !== SyncLane || - executionContext !== NoContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ReactSharedInternals.isBatchingLegacy || - ((workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(!0)); } } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -16032,7 +15730,7 @@ __DEV__ && check = check.value; try { if (!objectIs(getSnapshot(), check)) return !1; - } catch (error$45) { + } catch (error$40) { return !1; } } @@ -16088,7 +15786,7 @@ __DEV__ && currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync(root, lanes); - if ((disableLegacyMode || 0 !== root.tag) && exitStatus === RootErrored) { + if (exitStatus === RootErrored) { var originallyAttemptedLanes = lanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( root, @@ -16127,20 +15825,6 @@ __DEV__ && ensureRootIsScheduled(root); return null; } - 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)); - } - } function flushSyncWork$1() { return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(!1), !1) @@ -16355,8 +16039,8 @@ __DEV__ && } workLoopSync(); break; - } catch (thrownValue$46) { - handleThrow(root, thrownValue$46); + } catch (thrownValue$41) { + handleThrow(root, thrownValue$41); } while (1); lanes && root.shellSuspendCounter++; @@ -16498,8 +16182,8 @@ __DEV__ && ? workLoopSync() : workLoopConcurrent(); break; - } catch (thrownValue$47) { - handleThrow(root, thrownValue$47); + } catch (thrownValue$42) { + handleThrow(root, thrownValue$42); } while (1); resetContextDependencies(); @@ -16643,9 +16327,9 @@ __DEV__ && workInProgress = null; return; } - } catch (error$48) { + } catch (error$43) { if (null !== returnFiber) - throw ((workInProgress = returnFiber), error$48); + throw ((workInProgress = returnFiber), error$43); workInProgressRootExitStatus = RootFatalErrored; logUncaughtError( root, @@ -16873,7 +16557,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(); @@ -16892,8 +16576,7 @@ __DEV__ && remainingLanes.value, transitions ); - 0 === (pendingPassiveEffectsLanes & (SyncLane | SyncHydrationLane)) || - (!disableLegacyMode && 0 === root.tag) || + 0 !== (pendingPassiveEffectsLanes & (SyncLane | SyncHydrationLane)) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && @@ -17020,7 +16703,7 @@ __DEV__ && "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped && injectedProfilingHooks.markPassiveEffectsStopped(); - commitDoubleInvokeEffectsInDEV(root, !0); + commitDoubleInvokeEffectsInDEV(root); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(!1); if (enableTransitionTracing) { @@ -17158,8 +16841,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" @@ -17177,12 +16859,7 @@ __DEV__ && ensureRootIsScheduled(root); } function retryTimedOutBoundary(boundaryFiber, retryLane) { - 0 === retryLane && - ((retryLane = boundaryFiber.mode), - (retryLane = - disableLegacyMode || 0 !== (retryLane & 1) - ? claimNextRetryLane() - : SyncLane)); + 0 === retryLane && (retryLane = claimNextRetryLane()); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), @@ -17293,52 +16970,17 @@ __DEV__ && reconnectPassiveEffects(root, fiber, 0, null, !1); 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 || @@ -17374,15 +17016,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", @@ -17755,12 +17390,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 ( @@ -17978,7 +17611,7 @@ __DEV__ && onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -18018,30 +17651,16 @@ __DEV__ && for ( this.transitionCallbacks = null, containerInfo = this.transitionLanes = [], - identifierPrefix = 0; - identifierPrefix < TotalLanes; - identifierPrefix++ + tag = 0; + tag < TotalLanes; + tag++ ) containerInfo.push(null); this.passiveEffectDuration = this.effectDuration = 0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; - for ( - identifierPrefix = 0; - identifierPrefix < TotalLanes; - 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; tag < TotalLanes; tag++) containerInfo.push(new Set()); + this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; } function createFiberRoot( containerInfo, @@ -18071,13 +17690,11 @@ __DEV__ && containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), - !0 === isStrictMode && (tag |= 24), - concurrentUpdatesByDefaultOverride && (tag |= 32)) - : (tag = 0); - isDevToolsPresent && (tag |= 2); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + concurrentUpdatesByDefaultOverride && (hydrationCallbacks |= 32); + isDevToolsPresent && (hydrationCallbacks |= 2); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; concurrentUpdatesByDefaultOverride = createCache(); @@ -18181,61 +17798,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, - concurrentUpdatesByDefaultOverride, - 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, @@ -18307,17 +17869,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) { @@ -18351,7 +17902,7 @@ __DEV__ && if (isInsideEventHandler) return fn(a, b); isInsideEventHandler = !0; try { - return batchedUpdates$1(fn, a, b); + return fn(a); } finally { if ( ((isInsideEventHandler = !1), @@ -19042,8 +18593,8 @@ __DEV__ && previousInstance.currentTarget = currentTarget; try { _dispatchListeners$i(previousInstance); - } catch (error$51) { - reportGlobalError(error$51); + } catch (error$46) { + reportGlobalError(error$46); } previousInstance.currentTarget = null; previousInstance = instance; @@ -19064,8 +18615,8 @@ __DEV__ && previousInstance.currentTarget = currentTarget; try { _dispatchListeners$i(previousInstance); - } catch (error$51) { - reportGlobalError(error$51); + } catch (error$46) { + reportGlobalError(error$46); } previousInstance.currentTarget = null; previousInstance = instance; @@ -22070,20 +21621,6 @@ __DEV__ && } while (node); retryIfBlockedOn(suspenseInstance); } - 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); @@ -22399,16 +21936,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) { @@ -23776,16 +23303,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, @@ -23816,30 +23333,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) @@ -23867,37 +23360,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(!1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; - } function ReactDOMRoot(internalRoot) { this._internalRoot = internalRoot; } @@ -23932,122 +23394,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, - !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, @@ -24084,7 +23430,6 @@ __DEV__ && dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableNoCloningMemoCache = dynamicFeatureFlags.enableNoCloningMemoCache, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -26613,7 +25958,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), @@ -26632,7 +25977,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), @@ -26650,7 +25995,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), @@ -26820,7 +26165,6 @@ __DEV__ && callbacks = [], PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, NoContext = 0, - BatchedContext = 1, RenderContext = 2, CommitContext = 4, RootInProgress = 0, @@ -26978,7 +26322,7 @@ __DEV__ && }); window.addEventListener("test", options$jscomp$0, options$jscomp$0); window.removeEventListener("test", options$jscomp$0, options$jscomp$0); - } catch (e$49) { + } catch (e$44) { passiveBrowserEventsSupported = !1; } var EventListenerWWW = require("EventListener"), @@ -27415,7 +26759,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 @@ -27678,17 +27026,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-50e89ec9f2-20240612" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-fb9a90fa48-20240614" !== 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-50e89ec9f2-20240612\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-fb9a90fa48-20240614\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27701,7 +27046,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) { @@ -27754,12 +27098,12 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }); })({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 1, - version: "19.0.0-www-classic-50e89ec9f2-20240612", + version: "19.0.0-www-classic-fb9a90fa48-20240614", rendererPackageName: "react-dom" }) && canUseDOM && @@ -27794,7 +27138,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) { @@ -27842,33 +27195,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 () { @@ -28047,7 +27373,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); @@ -28143,11 +27487,11 @@ __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, concurrentUpdatesByDefaultOverride, @@ -28158,6 +27502,15 @@ __DEV__ && transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(options); + concurrentUpdatesByDefaultOverride = createUpdate(isStrictMode); + concurrentUpdatesByDefaultOverride.callback = null; + enqueueUpdate(options, concurrentUpdatesByDefaultOverride, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -28452,80 +27805,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) @@ -28568,5 +27865,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-50e89ec9f2-20240612"; + exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 2db17dcee0..af3a990396 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -26831,11 +26831,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-50e89ec9f2-20240612" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-fb9a90fa48-20240614" !== 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-50e89ec9f2-20240612\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-fb9a90fa48-20240614\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -26900,12 +26900,12 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }); })({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 1, - version: "19.0.0-www-modern-50e89ec9f2-20240612", + version: "19.0.0-www-modern-fb9a90fa48-20240614", rendererPackageName: "react-dom" }) && canUseDOM && @@ -27667,5 +27667,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-50e89ec9f2-20240612"; + exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 1ce2293ff6..0e3babf84e 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -61,7 +61,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"), disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableNoCloningMemoCache = dynamicFeatureFlags.enableNoCloningMemoCache, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -199,9 +198,6 @@ function getComponentNameFromFiber(fiber) { return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -1637,10 +1633,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)); @@ -2020,7 +2012,7 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { do { var didPerformSomeWork = !1; for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root$26.tag)) { + if (!onlyLegacy) { var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$28 = getNextLanes( root$26, @@ -3252,15 +3244,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; @@ -4342,7 +4326,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$77 = enqueueUpdate(provider, fiber, lane); null !== root$77 && @@ -4360,7 +4344,7 @@ function refreshCache(fiber, seedKey, seedValue) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -4377,7 +4361,7 @@ function dispatchReducerAction(fiber, queue, action) { entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber), + var lane = requestUpdateLane(), update = { lane: lane, revertLane: 0, @@ -4803,7 +4787,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); @@ -4814,7 +4798,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; @@ -4826,7 +4810,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); @@ -4852,33 +4836,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, @@ -4893,41 +4850,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, @@ -5063,36 +4985,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, @@ -5106,100 +4998,71 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + enableLazyContextPropagation && + ((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)))) @@ -5214,10 +5077,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), @@ -5225,62 +5088,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) { @@ -5390,10 +5245,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$94 = workInProgress.stateNode; + root$93 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$94.incompleteTransitions.has(transition)) { + if (!root$93.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5401,11 +5256,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$94.incompleteTransitions.set(transition, markerInstance); + root$93.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$94.incompleteTransitions.forEach(function (markerInstance) { + root$93.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5581,36 +5436,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; @@ -5740,7 +5587,7 @@ function replayFunctionComponent( return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -5751,47 +5598,123 @@ function updateClassComponent( pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress, renderLanes); - 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( - 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) + 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), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (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, + 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$jscomp$0) { + 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), + (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 || @@ -5806,49 +5729,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; - cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + unmaskedContext = workInProgress.stateNode; + cloneUpdateQueue(current$jscomp$0, workInProgress); + 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)) @@ -5859,30 +5783,31 @@ 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 || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies)) ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, @@ -5891,117 +5816,106 @@ function updateClassComponent( nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, oldContext ) || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); -} -function finishClassComponent( - current$jscomp$0, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes -) { + unmaskedContext = nextProps; markRef(current$jscomp$0, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + (current = workInProgress), + (isLegacyContextConsumer = + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? null + : unmaskedContext.render()), + (workInProgress.flags |= 1), + null !== current$jscomp$0 && nextProps + ? ((workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + isLegacyContextConsumer, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current$jscomp$0 = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current$jscomp$0 = bailoutOnAlreadyFinishedWork( current$jscomp$0, workInProgress, renderLanes - ) - ); - shouldUpdate = workInProgress.stateNode; - current = workInProgress; - var nextChildren = - didCaptureError && "function" !== typeof Component.getDerivedStateFromError - ? null - : shouldUpdate.render(); - workInProgress.flags |= 1; - null !== current$jscomp$0 && didCaptureError - ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - nextChildren, - 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; @@ -6139,18 +6053,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) @@ -6199,11 +6113,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, @@ -6216,13 +6128,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)), (nextProps.childLanes = getRemainingWorkInPrimaryTree( @@ -6327,7 +6238,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 )), @@ -6335,12 +6246,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, @@ -6356,20 +6267,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( @@ -6434,32 +6337,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); @@ -6470,30 +6368,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, @@ -6571,68 +6465,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; @@ -6802,12 +6685,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) @@ -6833,10 +6715,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); @@ -6849,7 +6728,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); @@ -6872,43 +6751,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; @@ -6917,19 +6790,19 @@ function beginWork(current, workInProgress, renderLanes) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); - nextProps !== elementType.cache && + nextProps !== init.cache && propagateContextChange(workInProgress, CacheContext, 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( @@ -7046,7 +6919,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, @@ -7058,22 +6931,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, @@ -7081,11 +6954,11 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = elementType), + (HostTransitionContext._currentValue = init), enableLazyContextPropagation || (didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== elementType && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, @@ -7133,19 +7006,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 ( @@ -7182,14 +7049,14 @@ function beginWork(current, workInProgress, renderLanes) { props = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - elementType = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextState = elementType.value; + nextState = init.value; pushProvider(workInProgress, props, nextState); if (!enableLazyContextPropagation && null !== nextProps) if (objectIs(nextProps.value, nextState)) { if ( - nextProps.children === elementType.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -7200,24 +7067,19 @@ function beginWork(current, workInProgress, renderLanes) { break a; } } else propagateContextChange(workInProgress, props, renderLanes); - reconcileChildren( - current, - workInProgress, - elementType.children, - renderLanes - ); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(elementType)), - (props = props(elementType)), + (init = readContext(init)), + (props = props(init)), (workInProgress.flags |= 1), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child @@ -7225,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( @@ -7248,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, renderLanes); - 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: @@ -7307,38 +7122,34 @@ function beginWork(current, workInProgress, renderLanes) { prepareToReadContext(workInProgress, renderLanes), (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 && propagateContextChange( workInProgress, CacheContext, @@ -7873,14 +7684,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$137 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$137 = lastTailNode), + for (var lastTailNode$129 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$129 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$137 + null === lastTailNode$129 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$137.sibling = null); + : (lastTailNode$129.sibling = null); } } function bubbleProperties(completedWork) { @@ -7890,19 +7701,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$138 = completedWork.child; null !== child$138; ) - (newChildLanes |= child$138.lanes | child$138.childLanes), - (subtreeFlags |= child$138.subtreeFlags & 31457280), - (subtreeFlags |= child$138.flags & 31457280), - (child$138.return = completedWork), - (child$138 = child$138.sibling); + for (var child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags & 31457280), + (subtreeFlags |= child$130.flags & 31457280), + (child$130.return = completedWork), + (child$130 = child$130.sibling); else - for (child$138 = completedWork.child; null !== child$138; ) - (newChildLanes |= child$138.lanes | child$138.childLanes), - (subtreeFlags |= child$138.subtreeFlags), - (subtreeFlags |= child$138.flags), - (child$138.return = completedWork), - (child$138 = child$138.sibling); + for (child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags), + (subtreeFlags |= child$130.flags), + (child$130.return = completedWork), + (child$130 = child$130.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7911,8 +7722,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: @@ -7925,7 +7734,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 ); @@ -8199,11 +8009,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$150 = null; + var cache$142 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$150 = newProps.memoizedState.cachePool.pool); - cache$150 !== type && (newProps.flags |= 2048); + (cache$142 = newProps.memoizedState.cachePool.pool); + cache$142 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8232,18 +8042,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$150 = type.rendering; - if (null === cache$150) + cache$142 = type.rendering; + if (null === cache$142) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8251,11 +8056,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$150 = findFirstSuspended(current); - if (null !== cache$150) { + cache$142 = findFirstSuspended(current); + if (null !== cache$142) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$150.updateQueue; + current = cache$142.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8280,7 +8085,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$150)), null !== current)) { + if (((current = findFirstSuspended(cache$142)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8290,7 +8095,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$150.alternate && + !cache$142.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8303,13 +8108,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$150.sibling = workInProgress.child), - (workInProgress.child = cache$150)) + ? ((cache$142.sibling = workInProgress.child), + (workInProgress.child = cache$142)) : ((current = type.last), null !== current - ? (current.sibling = cache$150) - : (workInProgress.child = cache$150), - (type.last = cache$150)); + ? (current.sibling = cache$142) + : (workInProgress.child = cache$142), + (type.last = cache$142)); } if (null !== type.tail) return ( @@ -8350,14 +8155,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), @@ -8393,8 +8198,6 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -8403,7 +8206,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) @@ -8483,7 +8287,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); @@ -8586,8 +8392,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$168) { - captureCommitPhaseError(current, nearestMountedAncestor, error$168); + } catch (error$159) { + captureCommitPhaseError(current, nearestMountedAncestor, error$159); } else ref.current = null; } @@ -8624,7 +8430,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$229) { + } catch (e$220) { JSCompiler_temp = null; break a; } @@ -8756,8 +8562,21 @@ function commitBeforeMutationEffects(root, firstChild) { } break; case 3: - 0 !== (flags & 1024) && - clearContainer(firstChild.stateNode.containerInfo); + if (0 !== (flags & 1024)) { + var container = firstChild.stateNode.containerInfo, + 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 = ""; + } + } break; case 5: case 26: @@ -8892,11 +8711,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$170) { + } catch (error$161) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$170 + error$161 ); } } @@ -8941,30 +8760,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) @@ -9419,21 +9233,15 @@ function commitDeletionEffectsOnFiber( break; case 22: 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( @@ -9445,19 +9253,19 @@ function commitDeletionEffectsOnFiber( } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { - var current$182 = finishedWork.alternate; + var current$173 = finishedWork.alternate; if ( - null !== current$182 && - ((current$182 = current$182.memoizedState), - null !== current$182 && - ((current$182 = current$182.dehydrated), null !== current$182)) + null !== current$173 && + ((current$173 = current$173.memoizedState), + null !== current$173 && + ((current$173 = current$173.dehydrated), null !== current$173)) ) try { - retryIfBlockedOn(current$182); + retryIfBlockedOn(current$173); var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$182); + onHydrated && onHydrated(current$173); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -9575,8 +9383,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$184) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$184); + } catch (error$175) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$175); } } break; @@ -9749,11 +9557,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$185) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$185 + error$176 ); } break; @@ -9790,8 +9598,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$186) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$186); + } catch (error$177) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$177); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -9801,8 +9609,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$188) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$188); + } catch (error$179) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$179); } } flags & 1024 && (needsFormReset = !0); @@ -9817,8 +9625,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$189) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$189); + } catch (error$180) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$180); } } break; @@ -9832,8 +9640,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$190) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$190); + } catch (error$181) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$181); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -9865,8 +9673,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$192) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$192); + } catch (error$183) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$183); } flags = finishedWork.updateQueue; null !== flags && @@ -9880,15 +9688,13 @@ function commitMutationEffectsOnFiber(finishedWork, root) { safelyDetachRef(current, current.return); domElement = null !== finishedWork.memoizedState; newProps = null !== current && null !== current.memoizedState; - disableLegacyMode || finishedWork.mode & 1 - ? ((suspenseCallback = offscreenSubtreeIsHidden), - (retryQueue = offscreenSubtreeWasHidden), - (offscreenSubtreeIsHidden = suspenseCallback || domElement), - (offscreenSubtreeWasHidden = retryQueue || newProps), - recursivelyTraverseMutationEffects(root, finishedWork), - (offscreenSubtreeWasHidden = retryQueue), - (offscreenSubtreeIsHidden = suspenseCallback)) - : recursivelyTraverseMutationEffects(root, finishedWork); + suspenseCallback = offscreenSubtreeIsHidden; + retryQueue = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = suspenseCallback || domElement; + offscreenSubtreeWasHidden = retryQueue || newProps; + recursivelyTraverseMutationEffects(root, finishedWork); + offscreenSubtreeWasHidden = retryQueue; + offscreenSubtreeIsHidden = suspenseCallback; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -9904,8 +9710,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null === current || newProps || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) @@ -9944,11 +9749,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$173) { + } catch (error$164) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$173 + error$164 ); } } else if ( @@ -10023,21 +9828,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$174 = JSCompiler_inline_result.stateNode; + var parent$165 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$174, ""), + (setTextContent(parent$165, ""), (JSCompiler_inline_result.flags &= -33)); - var before$175 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$175, parent$174); + var before$166 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$166, parent$165); break; case 3: case 4: - var parent$176 = JSCompiler_inline_result.stateNode.containerInfo, - before$177 = getHostSibling(finishedWork); + var parent$167 = JSCompiler_inline_result.stateNode.containerInfo, + before$168 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$177, - parent$176 + before$168, + parent$167 ); break; default: @@ -10116,7 +9921,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$196 = parentFiber.alternate, + var current$187 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -10144,16 +9949,16 @@ function recursivelyTraverseReappearLayoutEffects( } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } - current$196 = finishedWork.updateQueue; - if (null !== current$196) { - var hiddenCallbacks = current$196.shared.hiddenCallbacks; + current$187 = finishedWork.updateQueue; + if (null !== current$187) { + var hiddenCallbacks = current$187.shared.hiddenCallbacks; if (null !== hiddenCallbacks) for ( - current$196.shared.hiddenCallbacks = null, current$196 = 0; - current$196 < hiddenCallbacks.length; - current$196++ + current$187.shared.hiddenCallbacks = null, current$187 = 0; + current$187 < hiddenCallbacks.length; + current$187++ ) - callCallback(hiddenCallbacks[current$196], finishedRoot); + callCallback(hiddenCallbacks[current$187], finishedRoot); } includeWorkInProgressEffects && flags & 64 && @@ -10169,7 +9974,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$196 && + null === current$187 && flags & 4 && commitHostComponentMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -10407,15 +10212,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, @@ -10513,9 +10310,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$203 = finishedWork.stateNode; + var instance$194 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$203._visibility & 4 + ? instance$194._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10523,20 +10320,11 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork ) - : ((instance$203._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$203._visibility |= 4), + : ((instance$194._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10549,7 +10337,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$203 + instance$194 ); break; case 24: @@ -10889,12 +10677,12 @@ function findFiberRootForHostRoot(hostRoot) { a: { hostRoot = [hostRoot]; for (maybeFiber = 0; maybeFiber < hostRoot.length; ) { - var current$296 = hostRoot[maybeFiber++]; - if (current$296[internalContainerInstanceKey]) { - hostRoot = getInstanceFromNode(current$296); + var current$287 = hostRoot[maybeFiber++]; + if (current$287[internalContainerInstanceKey]) { + hostRoot = getInstanceFromNode(current$287); break a; } - hostRoot.push.apply(hostRoot, current$296.children); + hostRoot.push.apply(hostRoot, current$287.children); } hostRoot = null; } @@ -11156,16 +10944,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 && @@ -11190,21 +10976,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) && @@ -11216,12 +11001,6 @@ function scheduleUpdateOnFiber(root, fiber, lane) { workInProgressDeferredLane )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ((workInProgressRootRenderTargetTime = now() + 500), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(!0)); } } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -11487,7 +11266,7 @@ function performSyncWorkOnRoot(root, lanes) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; var exitStatus = renderRootSync(root, lanes); - if ((disableLegacyMode || 0 !== root.tag) && 2 === exitStatus) { + if (2 === exitStatus) { var originallyAttemptedLanes = lanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( root, @@ -11526,19 +11305,6 @@ function performSyncWorkOnRoot(root, lanes) { ensureRootIsScheduled(root); return null; } -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)); - } -} function flushSyncWork$1() { return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(!1), !1) @@ -11702,8 +11468,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$215) { - handleThrow(root, thrownValue$215); + } catch (thrownValue$206) { + handleThrow(root, thrownValue$206); } while (1); lanes && root.shellSuspendCounter++; @@ -11812,8 +11578,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$217) { - handleThrow(root, thrownValue$217); + } catch (thrownValue$208) { + handleThrow(root, thrownValue$208); } while (1); resetContextDependencies(); @@ -12038,12 +11804,12 @@ function commitRootImpl( Internals.p = 2; var prevExecutionContext = executionContext; executionContext |= 4; - var shouldFireAfterActiveInstanceBlur$223 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$214 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$223 && + shouldFireAfterActiveInstanceBlur$214 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12076,9 +11842,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)) || @@ -12115,7 +11879,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$224 = rootWithPendingPassiveEffects, + var root$215 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12130,7 +11894,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$224, remainingLanes); + releaseRootPooledCache(root$215, remainingLanes); } } return !1; @@ -12255,10 +12019,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), @@ -12433,12 +12194,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 ( @@ -12608,7 +12367,7 @@ function FiberRootNode( onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -12682,12 +12441,10 @@ function createFiberRoot( containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), - !0 === isStrictMode && (tag |= 24), - concurrentUpdatesByDefaultOverride && (tag |= 32)) - : (tag = 0); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + concurrentUpdatesByDefaultOverride && (hydrationCallbacks |= 32); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; concurrentUpdatesByDefaultOverride = createCache(); @@ -12762,73 +12519,6 @@ function findHostInstance(component) { component = findCurrentHostFiber(fiber); 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, - concurrentUpdatesByDefaultOverride, - 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, @@ -12850,17 +12540,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) { @@ -12887,7 +12566,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), @@ -13418,19 +13097,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$388; + var JSCompiler_inline_result$jscomp$372; if (canUseDOM) { - var isSupported$jscomp$inline_1585 = "oninput" in document; - if (!isSupported$jscomp$inline_1585) { - var element$jscomp$inline_1586 = document.createElement("div"); - element$jscomp$inline_1586.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1585 = - "function" === typeof element$jscomp$inline_1586.oninput; + var isSupported$jscomp$inline_1566 = "oninput" in document; + if (!isSupported$jscomp$inline_1566) { + var element$jscomp$inline_1567 = document.createElement("div"); + element$jscomp$inline_1567.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1566 = + "function" === typeof element$jscomp$inline_1567.oninput; } - JSCompiler_inline_result$jscomp$388 = isSupported$jscomp$inline_1585; - } else JSCompiler_inline_result$jscomp$388 = !1; + JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1566; + } else JSCompiler_inline_result$jscomp$372 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$388 && + JSCompiler_inline_result$jscomp$372 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13839,20 +13518,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1626 = 0; - i$jscomp$inline_1626 < simpleEventPluginEvents.length; - i$jscomp$inline_1626++ + var i$jscomp$inline_1607 = 0; + i$jscomp$inline_1607 < simpleEventPluginEvents.length; + i$jscomp$inline_1607++ ) { - var eventName$jscomp$inline_1627 = - simpleEventPluginEvents[i$jscomp$inline_1626], - domEventName$jscomp$inline_1628 = - eventName$jscomp$inline_1627.toLowerCase(), - capitalizedEvent$jscomp$inline_1629 = - eventName$jscomp$inline_1627[0].toUpperCase() + - eventName$jscomp$inline_1627.slice(1); + var eventName$jscomp$inline_1608 = + simpleEventPluginEvents[i$jscomp$inline_1607], + domEventName$jscomp$inline_1609 = + eventName$jscomp$inline_1608.toLowerCase(), + capitalizedEvent$jscomp$inline_1610 = + eventName$jscomp$inline_1608[0].toUpperCase() + + eventName$jscomp$inline_1608.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1628, - "on" + capitalizedEvent$jscomp$inline_1629 + domEventName$jscomp$inline_1609, + "on" + capitalizedEvent$jscomp$inline_1610 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15330,14 +15009,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$258 in nextProps) { - var propKey = nextProps[propKey$258]; - lastProp = lastProps[propKey$258]; + for (var propKey$249 in nextProps) { + var propKey = nextProps[propKey$249]; + lastProp = lastProps[propKey$249]; if ( - nextProps.hasOwnProperty(propKey$258) && + nextProps.hasOwnProperty(propKey$249) && (null != propKey || null != lastProp) ) - switch (propKey$258) { + switch (propKey$249) { case "type": type = propKey; break; @@ -15366,7 +15045,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$258, + propKey$249, propKey, nextProps, lastProp @@ -15385,7 +15064,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$258 = null; + propKey = value = defaultValue = propKey$249 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15416,7 +15095,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$258 = type; + propKey$249 = type; break; case "defaultValue": defaultValue = type; @@ -15437,15 +15116,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$258 - ? updateOptions(domElement, !!lastProps, propKey$258, !1) + null != propKey$249 + ? updateOptions(domElement, !!lastProps, propKey$249, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$258 = null; + propKey = propKey$249 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15469,7 +15148,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$258 = name; + propKey$249 = name; break; case "defaultValue": propKey = name; @@ -15483,17 +15162,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$258, propKey); + updateTextarea(domElement, propKey$249, propKey); return; case "option": - for (var propKey$274 in lastProps) + for (var propKey$265 in lastProps) if ( - ((propKey$258 = lastProps[propKey$274]), - lastProps.hasOwnProperty(propKey$274) && - null != propKey$258 && - !nextProps.hasOwnProperty(propKey$274)) + ((propKey$249 = lastProps[propKey$265]), + lastProps.hasOwnProperty(propKey$265) && + null != propKey$249 && + !nextProps.hasOwnProperty(propKey$265)) ) - switch (propKey$274) { + switch (propKey$265) { case "selected": domElement.selected = !1; break; @@ -15501,33 +15180,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$274, + propKey$265, null, nextProps, - propKey$258 + propKey$249 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$258 = nextProps[lastDefaultValue]), + ((propKey$249 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$258 !== propKey && - (null != propKey$258 || null != propKey)) + propKey$249 !== propKey && + (null != propKey$249 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$258 && - "function" !== typeof propKey$258 && - "symbol" !== typeof propKey$258; + propKey$249 && + "function" !== typeof propKey$249 && + "symbol" !== typeof propKey$249; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$258, + propKey$249, nextProps, propKey ); @@ -15548,24 +15227,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$279 in lastProps) - (propKey$258 = lastProps[propKey$279]), - lastProps.hasOwnProperty(propKey$279) && - null != propKey$258 && - !nextProps.hasOwnProperty(propKey$279) && - setProp(domElement, tag, propKey$279, null, nextProps, propKey$258); + for (var propKey$270 in lastProps) + (propKey$249 = lastProps[propKey$270]), + lastProps.hasOwnProperty(propKey$270) && + null != propKey$249 && + !nextProps.hasOwnProperty(propKey$270) && + setProp(domElement, tag, propKey$270, null, nextProps, propKey$249); for (checked in nextProps) if ( - ((propKey$258 = nextProps[checked]), + ((propKey$249 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$258 !== propKey && - (null != propKey$258 || null != propKey)) + propKey$249 !== propKey && + (null != propKey$249 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$258) + if (null != propKey$249) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15573,7 +15252,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$258, + propKey$249, nextProps, propKey ); @@ -15581,49 +15260,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$284 in lastProps) - (propKey$258 = lastProps[propKey$284]), - lastProps.hasOwnProperty(propKey$284) && - void 0 !== propKey$258 && - !nextProps.hasOwnProperty(propKey$284) && + for (var propKey$275 in lastProps) + (propKey$249 = lastProps[propKey$275]), + lastProps.hasOwnProperty(propKey$275) && + void 0 !== propKey$249 && + !nextProps.hasOwnProperty(propKey$275) && setPropOnCustomElement( domElement, tag, - propKey$284, + propKey$275, void 0, nextProps, - propKey$258 + propKey$249 ); for (defaultChecked in nextProps) - (propKey$258 = nextProps[defaultChecked]), + (propKey$249 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$258 === propKey || - (void 0 === propKey$258 && void 0 === propKey) || + propKey$249 === propKey || + (void 0 === propKey$249 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$258, + propKey$249, nextProps, propKey ); return; } } - for (var propKey$289 in lastProps) - (propKey$258 = lastProps[propKey$289]), - lastProps.hasOwnProperty(propKey$289) && - null != propKey$258 && - !nextProps.hasOwnProperty(propKey$289) && - setProp(domElement, tag, propKey$289, null, nextProps, propKey$258); + for (var propKey$280 in lastProps) + (propKey$249 = lastProps[propKey$280]), + lastProps.hasOwnProperty(propKey$280) && + null != propKey$249 && + !nextProps.hasOwnProperty(propKey$280) && + setProp(domElement, tag, propKey$280, null, nextProps, propKey$249); for (lastProp in nextProps) - (propKey$258 = nextProps[lastProp]), + (propKey$249 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$258 === propKey || - (null == propKey$258 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$258, nextProps, propKey); + propKey$249 === propKey || + (null == propKey$249 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$249, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15743,20 +15422,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); @@ -15982,7 +15647,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, @@ -15993,12 +15658,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); @@ -16275,26 +15937,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$298 = getResourcesFromRoot( + var styles$289 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$299 = styles$298.get(type); - resource$299 || + resource$290 = styles$289.get(type); + resource$290 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$299 = { + (resource$290 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$298.set(type, resource$299), - (styles$298 = JSCompiler_inline_result.querySelector( + styles$289.set(type, resource$290), + (styles$289 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$298._p && - ((resource$299.instance = styles$298), - (resource$299.state.loading = 5)), + !styles$289._p && + ((resource$290.instance = styles$289), + (resource$290.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16307,16 +15969,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$298 || + styles$289 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$299.state + resource$290.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$299; + return resource$290; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16413,37 +16075,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$304 = hoistableRoot.querySelector( + var instance$295 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$304) + if (instance$295) return ( (resource.state.loading |= 4), - (resource.instance = instance$304), - markNodeAsHoistable(instance$304), - instance$304 + (resource.instance = instance$295), + markNodeAsHoistable(instance$295), + instance$295 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$304 = ( + instance$295 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$304); - var linkInstance = instance$304; + markNodeAsHoistable(instance$295); + var linkInstance = instance$295; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$304, "link", instance); + setInitialProperties(instance$295, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$304, props.precedence, hoistableRoot); - return (resource.instance = instance$304); + insertStylesheet(instance$295, props.precedence, hoistableRoot); + return (resource.instance = instance$295); case "script": - instance$304 = getScriptKey(props.src); + instance$295 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$304) + getScriptSelectorFromKey(instance$295) )) ) return ( @@ -16452,7 +16114,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$304))) + if ((styleProps = preloadPropsMap.get(instance$295))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16988,7 +16650,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); @@ -17421,16 +17083,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 && @@ -17452,69 +17104,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_1799 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1780 = React.version; if ( - "19.0.0-www-classic-50e89ec9f2-20240612" !== - isomorphicReactPackageVersion$jscomp$inline_1799 + "19.0.0-www-classic-fb9a90fa48-20240614" !== + isomorphicReactPackageVersion$jscomp$inline_1780 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1799, - "19.0.0-www-classic-50e89ec9f2-20240612" + isomorphicReactPackageVersion$jscomp$inline_1780, + "19.0.0-www-classic-fb9a90fa48-20240614" ) ); -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(!1); - } - JSCompiler_inline_result = void 0; - } - return JSCompiler_inline_result; -} -var flushSync = disableLegacyMode ? flushSync$1 : flushSyncFromReconciler; Internals.findDOMNode = function (componentOrElement) { return findHostInstance(componentOrElement); }; @@ -17528,17 +17134,17 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1806 = { +var devToolsConfig$jscomp$inline_1782 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-50e89ec9f2-20240612", + version: "19.0.0-www-classic-fb9a90fa48-20240614", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2255 = { - bundleType: devToolsConfig$jscomp$inline_1806.bundleType, - version: devToolsConfig$jscomp$inline_1806.version, - rendererPackageName: devToolsConfig$jscomp$inline_1806.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1806.rendererConfig, +var internals$jscomp$inline_2264 = { + bundleType: devToolsConfig$jscomp$inline_1782.bundleType, + version: devToolsConfig$jscomp$inline_1782.version, + rendererPackageName: devToolsConfig$jscomp$inline_1782.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1782.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17554,26 +17160,26 @@ var internals$jscomp$inline_2255 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1806.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1782.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2256 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2265 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2256.isDisabled && - hook$jscomp$inline_2256.supportsFiber + !hook$jscomp$inline_2265.isDisabled && + hook$jscomp$inline_2265.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2256.inject( - internals$jscomp$inline_2255 + (rendererID = hook$jscomp$inline_2265.inject( + internals$jscomp$inline_2264 )), - (injectedHook = hook$jscomp$inline_2256); + (injectedHook = hook$jscomp$inline_2265); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17583,7 +17189,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 () { @@ -17591,7 +17199,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; } @@ -17635,105 +17244,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$325); - originalCallback.call(instance); - }; - } - var root$325 = createHydrationContainer( - initialChildren, - callback, - container, - 0, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$325; - container[internalContainerInstanceKey] = root$325.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - flushSyncWork$1(); - return root$325; - } - clearContainer(container); - if ("function" === typeof callback) { - var originalCallback$326 = callback; - callback = function () { - var instance = getPublicRootInstance(root$327); - originalCallback$326.call(instance); - }; - } - var root$327 = createFiberRoot( - container, - 0, - !1, - null, - null, - !1, - !1, - "", - wwwOnUncaughtError, - wwwOnCaughtError, - noopOnRecoverableError, - null, - null - ); - container._reactRootContainer = root$327; - container[internalContainerInstanceKey] = root$327.current; - listenToAllSupportedEvents( - 8 === container.nodeType ? container.parentNode : container - ); - updateContainerSync(initialChildren, root$327, parentComponent, callback); - flushSyncWork$1(); - return root$327; -} -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 () { @@ -17885,7 +17395,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); @@ -17967,11 +17487,11 @@ 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, concurrentUpdatesByDefaultOverride, @@ -17982,6 +17502,15 @@ exports.hydrateRoot = function (container, initialChildren, options) { transitionCallbacks, formState ); + initialChildren.context = getContextForSubtree(null); + options = initialChildren.current; + isStrictMode = requestUpdateLane(); + concurrentUpdatesByDefaultOverride = createUpdate(isStrictMode); + concurrentUpdatesByDefaultOverride.callback = null; + enqueueUpdate(options, concurrentUpdatesByDefaultOverride, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode); + ensureRootIsScheduled(initialChildren); container[internalContainerInstanceKey] = initialChildren.current; listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); @@ -18112,34 +17641,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) @@ -18176,4 +17689,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-classic-fb9a90fa48-20240614"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index d77bda4af9..d212526e21 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -16852,14 +16852,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1770 = React.version; if ( - "19.0.0-www-modern-50e89ec9f2-20240612" !== + "19.0.0-www-modern-fb9a90fa48-20240614" !== isomorphicReactPackageVersion$jscomp$inline_1770 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1770, - "19.0.0-www-modern-50e89ec9f2-20240612" + "19.0.0-www-modern-fb9a90fa48-20240614" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16878,7 +16878,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1772 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-50e89ec9f2-20240612", + version: "19.0.0-www-modern-fb9a90fa48-20240614", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2246 = { @@ -16908,7 +16908,7 @@ var internals$jscomp$inline_2246 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2247 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17430,4 +17430,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-50e89ec9f2-20240612"; +exports.version = "19.0.0-www-modern-fb9a90fa48-20240614"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 76d3a90db9..23b23c035b 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -285,9 +285,6 @@ __DEV__ && return "SuspenseList"; case 25: return "TracingMarker"; - case 17: - case 28: - if (disableLegacyMode) break; case 1: case 0: case 14: @@ -2234,10 +2231,6 @@ __DEV__ && scheduleImmediateTask(processRootScheduleInMicrotask)); enableDeferRootSchedulingToMicrotask || scheduleTaskForRootDuringMicrotask(root, now$1()); - !disableLegacyMode && - ReactSharedInternals.isBatchingLegacy && - 0 === root.tag && - (ReactSharedInternals.didScheduleLegacyUpdate = !0); } function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (!isFlushingWork && mightHavePendingSyncWork) { @@ -2245,7 +2238,7 @@ __DEV__ && do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) { + if (!onlyLegacy) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( @@ -3896,15 +3889,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; @@ -4187,9 +4172,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." ); @@ -5762,124 +5746,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, @@ -5906,192 +5772,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.propTypes && - error$jscomp$0( - "propTypes was defined as an instance property on %s. Use a static property to define propTypes 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 - )); - "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, @@ -6222,36 +5902,6 @@ __DEV__ && )); }); } - 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 = 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, @@ -6266,115 +5916,81 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + enableLazyContextPropagation && + ((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))); - 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( @@ -6399,10 +6015,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), @@ -6410,7 +6026,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 } @@ -6418,58 +6034,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( @@ -6802,36 +6416,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; @@ -6995,7 +6603,7 @@ __DEV__ && return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -7034,214 +6642,570 @@ __DEV__ && ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); prepareToReadContext(workInProgress, renderLanes); - 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$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, - 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), - 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 { + (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; - cloneUpdateQueue(current, workInProgress); + 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.propTypes && + error$jscomp$0( + "propTypes was defined as an instance property on %s. Use a static property to define propTypes 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 + )); + "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), + (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, + 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, + 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), + 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$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 || (enableLazyContextPropagation && - 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 ) || (enableLazyContextPropagation && - 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 && @@ -7251,76 +7215,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; @@ -7480,18 +7375,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) @@ -7541,11 +7436,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, @@ -7558,13 +7451,12 @@ __DEV__ && (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)), @@ -7696,7 +7588,7 @@ __DEV__ && )), registerSuspenseInstanceRetry(nextInstance, workInProgress), (workInProgress = null)) - : ((renderLanes = JSCompiler_temp$jscomp$0.treeContext), + : ((current = JSCompiler_temp$jscomp$0.treeContext), supportsHydration && ((nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(nextInstance)), @@ -7706,13 +7598,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, @@ -7727,30 +7619,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 || - 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.mode & 2 && - ((nextProps.actualDuration = 0), - (nextProps.actualStartTime = -1), - (nextProps.selfBaseDuration = - JSCompiler_temp$jscomp$0.selfBaseDuration), - (nextProps.treeBaseDuration = - JSCompiler_temp$jscomp$0.treeBaseDuration)), - (workInProgress.deletions = null)); + }); + nextProps.subtreeFlags = + JSCompiler_temp$jscomp$0.subtreeFlags & 31457280; null !== didSuspend ? (showFallback = createWorkInProgress(didSuspend, showFallback)) : ((showFallback = createFiberFromFragment( @@ -7784,33 +7658,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 - ? (showFallback.updateQueue = { - transitions: nextInstance, - markerInstances: JSCompiler_temp$jscomp$0, - 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)))); + 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 !== currentOffscreenQueue + ? currentOffscreenQueue.retryQueue + : null + }) + : ((didSuspend.transitions = nextInstance), + (didSuspend.markerInstances = JSCompiler_temp$jscomp$0)); + } showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7820,33 +7697,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); @@ -7857,37 +7729,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), - (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, @@ -8066,69 +7927,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, @@ -8373,10 +8224,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) ) @@ -8980,52 +8829,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, renderLanes); - 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, @@ -9974,8 +9777,6 @@ __DEV__ && var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 28: - if (disableLegacyMode) break; case 16: case 15: case 0: @@ -10356,11 +10157,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; @@ -10488,14 +10284,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), @@ -10531,8 +10327,6 @@ __DEV__ && bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error( "Unknown unit of work tag (" + @@ -10693,30 +10487,20 @@ __DEV__ && (executionContext & CommitContext) !== NoContext ); } - function safelyCallComponentWillUnmount( - current, - nearestMountedAncestor, - instance - ) { - try { - if ( - ((instance.props = resolveClassComponentProps( - current.type, - current.memoizedProps, - current.elementType === current.type - )), - (instance.state = current.memoizedState), - shouldProfile(current)) - ) - try { - startLayoutEffectTimer(), instance.componentWillUnmount(); - } finally { - recordLayoutEffectDuration(current); - } - else instance.componentWillUnmount(); - } catch (error$7) { - captureCommitPhaseError(current, nearestMountedAncestor, error$7); - } + function callComponentWillUnmountWithTimer(current, instance) { + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); + instance.state = current.memoizedState; + if (shouldProfile(current)) + try { + startLayoutEffectTimer(), instance.componentWillUnmount(); + } finally { + recordLayoutEffectDuration(current); + } + else instance.componentWillUnmount(); } function safelyAttachRef(current, nearestMountedAncestor) { try { @@ -11359,40 +11143,30 @@ __DEV__ && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; case 22: - if (disableLegacyMode || 0 !== (finishedWork.mode & 1)) { - if ( - ((prevState = - null !== finishedWork.memoizedState || - offscreenSubtreeIsHidden), - !prevState) - ) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevState; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects( - finishedRoot, - finishedWork, - committedLanes - ); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - } - } else - recursivelyTraverseLayoutEffects( - finishedRoot, - finishedWork, - committedLanes - ); + prevState = + null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; + if (!prevState) { + current = + (null !== current && null !== current.memoizedState) || + offscreenSubtreeWasHidden; + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevState; + (offscreenSubtreeWasHidden = current) && + !prevOffscreenSubtreeWasHidden + ? recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) + : recursivelyTraverseLayoutEffects( + finishedRoot, + finishedWork, + committedLanes + ); + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + } flags & 512 && ("manual" === finishedWork.memoizedProps.mode ? safelyAttachRef(finishedWork, finishedWork.return) @@ -11867,15 +11641,21 @@ __DEV__ && ); break; case 1: - offscreenSubtreeWasHidden || + if ( + !offscreenSubtreeWasHidden && (safelyDetachRef(deletedFiber, nearestMountedAncestor), (prevHostParent = deletedFiber.stateNode), - "function" === typeof prevHostParent.componentWillUnmount && - safelyCallComponentWillUnmount( + "function" === typeof prevHostParent.componentWillUnmount) + ) + try { + callComponentWillUnmountWithTimer(deletedFiber, prevHostParent); + } catch (error$7) { + captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - prevHostParent - )); + error$7 + ); + } recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -11892,21 +11672,15 @@ __DEV__ && break; case 22: 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( @@ -12407,17 +12181,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, lanes); - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - } else recursivelyTraverseMutationEffects(root, finishedWork, lanes); + var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, + prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = + prevOffscreenSubtreeIsHidden || suspenseCallback; + offscreenSubtreeWasHidden = + prevOffscreenSubtreeWasHidden || retryQueue; + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; commitReconciliationEffects(finishedWork); root = finishedWork.stateNode; root._current = finishedWork; @@ -12433,8 +12205,7 @@ __DEV__ && null === current || retryQueue || root || - ((disableLegacyMode || 0 !== (finishedWork.mode & 1)) && - recursivelyTraverseDisappearLayoutEffects(finishedWork))), + recursivelyTraverseDisappearLayoutEffects(finishedWork)), supportsMutation && (null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode)) @@ -12654,12 +12425,18 @@ __DEV__ && case 1: safelyDetachRef(finishedWork, finishedWork.return); var instance = finishedWork.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount( - finishedWork, - finishedWork.return, - instance - ); + if ("function" === typeof instance.componentWillUnmount) { + var nearestMountedAncestor = finishedWork.return; + try { + callComponentWillUnmountWithTimer(finishedWork, instance); + } catch (error$7) { + captureCommitPhaseError( + finishedWork, + nearestMountedAncestor, + error$7 + ); + } + } recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 26: @@ -13038,20 +12815,12 @@ __DEV__ && committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) : nextCache._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -13174,21 +12943,12 @@ __DEV__ && committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((_instance4._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) : ((_instance4._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, @@ -13593,76 +13353,6 @@ __DEV__ && ))); } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListMount(Layout | HasEffect, fiber); - } catch (error$42) { - captureCommitPhaseError(fiber, fiber.return, error$42); - } - break; - case 1: - var instance = fiber.stateNode; - if ("function" === typeof instance.componentDidMount) - try { - instance.componentDidMount(); - } catch (error$43) { - captureCommitPhaseError(fiber, fiber.return, error$43); - } - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListMount(Passive | HasEffect, fiber); - } catch (error$44) { - captureCommitPhaseError(fiber, fiber.return, error$44); - } - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - try { - commitHookEffectListUnmount( - Layout | HasEffect, - fiber, - fiber.return - ); - } catch (error$45) { - captureCommitPhaseError(fiber, fiber.return, error$45); - } - 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: - try { - commitHookEffectListUnmount( - Passive | HasEffect, - fiber, - fiber.return - ); - } catch (error$46) { - captureCommitPhaseError(fiber, fiber.return, error$46); - } - } - } function findFiberRootForHostRoot(hostRoot) { var maybeFiber = getInstanceFromNode(hostRoot); if (null != maybeFiber) { @@ -13814,16 +13504,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 @@ -13910,21 +13590,16 @@ __DEV__ && boundaries )); } - function resetRenderTimer() { - workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; - } 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()) : resolveUpdatePriority(); @@ -13969,10 +13644,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 )); @@ -13987,21 +13662,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 && @@ -14013,13 +13687,6 @@ __DEV__ && workInProgressDeferredLane )); ensureRootIsScheduled(root); - 2 !== lane || - executionContext !== NoContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - ReactSharedInternals.isBatchingLegacy || - (resetRenderTimer(), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(!0)); } } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -14253,7 +13920,7 @@ __DEV__ && check = check.value; try { if (!objectIs(getSnapshot(), check)) return !1; - } catch (error$47) { + } catch (error$42) { return !1; } } @@ -14309,7 +13976,7 @@ __DEV__ && currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync(root, lanes); - if ((disableLegacyMode || 0 !== root.tag) && exitStatus === RootErrored) { + if (exitStatus === RootErrored) { var originallyAttemptedLanes = lanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( root, @@ -14562,8 +14229,8 @@ __DEV__ && } workLoopSync(); break; - } catch (thrownValue$48) { - handleThrow(root, thrownValue$48); + } catch (thrownValue$43) { + handleThrow(root, thrownValue$43); } while (1); lanes && root.shellSuspendCounter++; @@ -14602,7 +14269,7 @@ __DEV__ && movePendingFibersToMemoized(root, lanes); } workInProgressTransitions = getTransitionsForLanes(root, lanes); - resetRenderTimer(); + workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } enableDebugTracing && logRenderStarted(lanes); @@ -14711,8 +14378,8 @@ __DEV__ && ? workLoopSync() : workLoopConcurrent(); break; - } catch (thrownValue$49) { - handleThrow(root, thrownValue$49); + } catch (thrownValue$44) { + handleThrow(root, thrownValue$44); } while (1); resetContextDependencies(); @@ -14856,9 +14523,9 @@ __DEV__ && workInProgress = null; return; } - } catch (error$50) { + } catch (error$45) { if (null !== returnFiber) - throw ((workInProgress = returnFiber), error$50); + throw ((workInProgress = returnFiber), error$45); workInProgressRootExitStatus = RootFatalErrored; logUncaughtError( root, @@ -15081,7 +14748,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(); @@ -15100,9 +14767,7 @@ __DEV__ && remainingLanes.value, transitions ); - 0 === (pendingPassiveEffectsLanes & 3) || - (!disableLegacyMode && 0 === root.tag) || - flushPassiveEffects(); + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -15225,7 +14890,7 @@ __DEV__ && "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped && injectedProfilingHooks.markPassiveEffectsStopped(); - commitDoubleInvokeEffectsInDEV(root, !0); + commitDoubleInvokeEffectsInDEV(root); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(!1); if (enableTransitionTracing) { @@ -15354,8 +15019,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" @@ -15373,12 +15037,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), @@ -15489,52 +15148,17 @@ __DEV__ && reconnectPassiveEffects(root, fiber, 0, null, !1); 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 || @@ -15570,15 +15194,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", @@ -15965,12 +15582,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 ( @@ -16195,7 +15810,7 @@ __DEV__ && onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -16235,26 +15850,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, @@ -16284,13 +15889,11 @@ __DEV__ && containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), - !0 === isStrictMode && (tag |= 24), - concurrentUpdatesByDefaultOverride && (tag |= 32)) - : (tag = 0); - isDevToolsPresent && (tag |= 2); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + concurrentUpdatesByDefaultOverride && (hydrationCallbacks |= 32); + isDevToolsPresent && (hydrationCallbacks |= 2); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; concurrentUpdatesByDefaultOverride = createCache(); @@ -16474,7 +16077,6 @@ __DEV__ && dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableNoCloningMemoCache = dynamicFeatureFlags.enableNoCloningMemoCache, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -16529,9 +16131,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, @@ -18562,7 +18164,9 @@ __DEV__ && ensureRootIsScheduled(fiber); (executionContext & (RenderContext | CommitContext)) === NoContext && - (resetRenderTimer(), flushSyncWorkAcrossRoots_impl(!1)); + ((workInProgressRootRenderTargetTime = + now$1() + RENDER_TIMEOUT_MS), + flushSyncWorkAcrossRoots_impl(!1)); } } break; @@ -18574,18 +18178,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)); - } + return fn(a); }; exports.createComponentSelector = function (component) { return { $$typeof: COMPONENT_TYPE, value: component }; @@ -18669,7 +18262,7 @@ __DEV__ && try { testStringCoercion(key); var JSCompiler_inline_result = !1; - } catch (e$51) { + } catch (e$46) { JSCompiler_inline_result = !0; } JSCompiler_inline_result && @@ -18749,7 +18342,8 @@ __DEV__ && } finally { setCurrentUpdatePriority(previousPriority), (ReactSharedInternals.T = prevTransition), - executionContext === NoContext && resetRenderTimer(); + executionContext === NoContext && + (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS); } }; exports.findAllNodes = findAllNodes; @@ -18875,11 +18469,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, @@ -18992,7 +18581,7 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }); }; exports.isAlreadyRendering = function () { diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 9d0cdca19b..4d20fbad99 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -18371,7 +18371,7 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }); }; exports.isAlreadyRendering = function () { diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index a475c2017b..7d77b1dca0 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: @@ -513,10 +510,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)); @@ -1089,7 +1082,7 @@ module.exports = function ($$$config) { do { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { - if (!onlyLegacy || (!disableLegacyMode && 0 === root.tag)) { + if (!onlyLegacy) { var workInProgressRootRenderLanes$16 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$16 = getNextLanes( @@ -2326,15 +2319,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; @@ -3363,7 +3348,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 && @@ -3381,7 +3366,7 @@ module.exports = function ($$$config) { } } function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(fiber); + var lane = requestUpdateLane(); action = { lane: lane, revertLane: 0, @@ -3398,7 +3383,7 @@ module.exports = function ($$$config) { entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(fiber), + var lane = requestUpdateLane(), update = { lane: lane, revertLane: 0, @@ -3517,34 +3502,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, @@ -3559,45 +3516,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, @@ -3695,36 +3613,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, @@ -3738,100 +3626,71 @@ module.exports = function ($$$config) { "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && + enableLazyContextPropagation && + ((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( @@ -3848,10 +3707,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), @@ -3859,62 +3718,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) { @@ -4222,36 +4075,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; @@ -4386,7 +4233,7 @@ module.exports = function ($$$config) { return workInProgress.child; } function updateClassComponent( - current, + current$jscomp$0, workInProgress, Component, nextProps, @@ -4397,47 +4244,129 @@ module.exports = function ($$$config) { pushContextProvider(workInProgress); } else hasContext = !1; prepareToReadContext(workInProgress, renderLanes); - 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( - 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) + 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), - (contextType = getMaskedContext(workInProgress, contextType))); - var getDerivedStateFromProps = Component.getDerivedStateFromProps, - hasNewLifecycles = - "function" === typeof getDerivedStateFromProps || - "function" === typeof instance.getSnapshotBeforeUpdate; + (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, + 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$jscomp$0) { + 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), + (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 || @@ -4452,49 +4381,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; - cloneUpdateQueue(current, workInProgress); - oldProps = workInProgress.memoizedProps; - contextType = resolveClassComponentProps( + unmaskedContext = workInProgress.stateNode; + cloneUpdateQueue(current$jscomp$0, workInProgress); + 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)) @@ -4505,30 +4436,37 @@ 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 || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.dependencies)) ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, @@ -4537,118 +4475,106 @@ module.exports = function ($$$config) { nextProps ), (newState = workInProgress.memoizedState)), - (contextType = + (context = hasForceUpdate || checkShouldComponentUpdate( workInProgress, Component, - contextType, + context, nextProps, unresolvedOldProps, newState, oldContext ) || (enableLazyContextPropagation && - null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) + null !== current$jscomp$0 && + null !== current$jscomp$0.dependencies && + checkIfContextChanged(current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.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 && - unresolvedOldProps === current.memoizedState) || + (unmaskedContext.props = nextProps), + (unmaskedContext.state = newState), + (unmaskedContext.context = oldContext), + (nextProps = context)) + : ("function" !== typeof unmaskedContext.componentDidUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 4), - "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - unresolvedOldProps === current.memoizedState) || + "function" !== typeof unmaskedContext.getSnapshotBeforeUpdate || + (isLegacyContextConsumer === current$jscomp$0.memoizedProps && + unresolvedOldProps === current$jscomp$0.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } - return finishClassComponent( - current, - workInProgress, - Component, - nextProps, - hasContext, - renderLanes - ); - } - function finishClassComponent( - current$jscomp$0, - workInProgress, - Component, - shouldUpdate, - hasContext, - renderLanes - ) { + unmaskedContext = nextProps; markRef(current$jscomp$0, workInProgress); - var didCaptureError = 0 !== (workInProgress.flags & 128); - if (!shouldUpdate && !didCaptureError) - return ( - hasContext && invalidateContextProvider(workInProgress, Component, !1), - bailoutOnAlreadyFinishedWork( + nextProps = 0 !== (workInProgress.flags & 128); + unmaskedContext || nextProps + ? ((unmaskedContext = workInProgress.stateNode), + (current = workInProgress), + (isLegacyContextConsumer = + nextProps && "function" !== typeof Component.getDerivedStateFromError + ? null + : unmaskedContext.render()), + (workInProgress.flags |= 1), + null !== current$jscomp$0 && nextProps + ? ((workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + isLegacyContextConsumer, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + isLegacyContextConsumer, + renderLanes + ), + (workInProgress.memoizedState = unmaskedContext.state), + hasContext && invalidateContextProvider(workInProgress, Component, !0), + (current$jscomp$0 = workInProgress.child)) + : (hasContext && invalidateContextProvider(workInProgress, Component, !1), + (current$jscomp$0 = bailoutOnAlreadyFinishedWork( current$jscomp$0, workInProgress, renderLanes - ) - ); - shouldUpdate = workInProgress.stateNode; - current = workInProgress; - var nextChildren = - didCaptureError && - "function" !== typeof Component.getDerivedStateFromError - ? null - : shouldUpdate.render(); - workInProgress.flags |= 1; - null !== current$jscomp$0 && didCaptureError - ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - nextChildren, - 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; @@ -4768,18 +4694,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) @@ -4829,11 +4755,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, @@ -4846,13 +4770,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)), @@ -4965,7 +4888,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)), @@ -4973,12 +4896,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, @@ -4993,20 +4916,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( @@ -5040,33 +4954,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 - ? (showFallback.updateQueue = { - transitions: nextInstance, - markerInstances: JSCompiler_temp$jscomp$0, - 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)))); + 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 !== currentOffscreenQueue + ? currentOffscreenQueue.retryQueue + : null + }) + : ((didSuspend.transitions = nextInstance), + (didSuspend.markerInstances = JSCompiler_temp$jscomp$0)); + } showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -5076,32 +4993,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); @@ -5112,30 +5024,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, @@ -5213,69 +5121,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; @@ -5452,12 +5349,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) @@ -5484,8 +5380,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 @@ -5499,7 +5394,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); @@ -5525,24 +5420,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 @@ -5551,7 +5446,7 @@ module.exports = function ($$$config) { current, workInProgress, props, - elementType, + init, renderLanes ) ); @@ -5560,8 +5455,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; @@ -5570,19 +5465,19 @@ module.exports = function ($$$config) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); - nextProps !== elementType.cache && + nextProps !== init.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); 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( @@ -5707,7 +5602,7 @@ module.exports = function ($$$config) { workInProgress.pendingProps, contextStackCursor.current ); - if ((elementType = props = nextHydratableInstance)) + if ((init = props = nextHydratableInstance)) (props = canHydrateInstance( props, workInProgress.type, @@ -5719,22 +5614,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, @@ -5743,12 +5638,12 @@ module.exports = function ($$$config) { renderLanes )), isPrimaryRenderer - ? (HostTransitionContext._currentValue = elementType) - : (HostTransitionContext._currentValue2 = elementType), + ? (HostTransitionContext._currentValue = init) + : (HostTransitionContext._currentValue2 = init), enableLazyContextPropagation || (didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== elementType && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, @@ -5800,19 +5695,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 ( @@ -5849,14 +5738,14 @@ module.exports = function ($$$config) { props = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - elementType = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextState = elementType.value; + nextState = init.value; pushProvider(workInProgress, props, nextState); if (!enableLazyContextPropagation && null !== nextProps) if (objectIs(nextProps.value, nextState)) { if ( - nextProps.children === elementType.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -5870,7 +5759,7 @@ module.exports = function ($$$config) { reconcileChildren( current, workInProgress, - elementType.children, + init.children, renderLanes ); workInProgress = workInProgress.child; @@ -5878,13 +5767,13 @@ module.exports = function ($$$config) { return workInProgress; case 9: return ( - (elementType = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(elementType)), - (props = props(elementType)), + (init = readContext(init)), + (props = props(init)), (workInProgress.flags |= 1), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child @@ -5892,20 +5781,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( @@ -5915,47 +5798,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, renderLanes); - 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, @@ -5982,38 +5824,34 @@ module.exports = function ($$$config) { prepareToReadContext(workInProgress, renderLanes), (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 && propagateContextChange( workInProgress, CacheContext, @@ -6554,44 +6392,44 @@ module.exports = function ($$$config) { needsVisibilityToggle = needsVisibilityToggle.sibling; } else if (supportsPersistence) - for (var node$114 = workInProgress.child; null !== node$114; ) { - if (5 === node$114.tag) { - var instance = node$114.stateNode; + for (var node$106 = workInProgress.child; null !== node$106; ) { + if (5 === node$106.tag) { + var instance = node$106.stateNode; needsVisibilityToggle && isHidden && (instance = cloneHiddenInstance( instance, - node$114.type, - node$114.memoizedProps + node$106.type, + node$106.memoizedProps )); appendInitialChild(parent, instance); - } else if (6 === node$114.tag) - (instance = node$114.stateNode), + } else if (6 === node$106.tag) + (instance = node$106.stateNode), needsVisibilityToggle && isHidden && (instance = cloneHiddenTextInstance( instance, - node$114.memoizedProps + node$106.memoizedProps )), appendInitialChild(parent, instance); - else if (4 !== node$114.tag) - if (22 === node$114.tag && null !== node$114.memoizedState) - (instance = node$114.child), - null !== instance && (instance.return = node$114), - appendAllChildren(parent, node$114, !0, !0); - else if (null !== node$114.child) { - node$114.child.return = node$114; - node$114 = node$114.child; + else if (4 !== node$106.tag) + if (22 === node$106.tag && null !== node$106.memoizedState) + (instance = node$106.child), + null !== instance && (instance.return = node$106), + appendAllChildren(parent, node$106, !0, !0); + else if (null !== node$106.child) { + node$106.child.return = node$106; + node$106 = node$106.child; continue; } - if (node$114 === workInProgress) break; - for (; null === node$114.sibling; ) { - if (null === node$114.return || node$114.return === workInProgress) + if (node$106 === workInProgress) break; + for (; null === node$106.sibling; ) { + if (null === node$106.return || node$106.return === workInProgress) return; - node$114 = node$114.return; + node$106 = node$106.return; } - node$114.sibling.return = node$114.return; - node$114 = node$114.sibling; + node$106.sibling.return = node$106.return; + node$106 = node$106.sibling; } } function appendAllChildrenToContainer( @@ -6664,31 +6502,31 @@ module.exports = function ($$$config) { current.memoizedProps !== newProps && markUpdate(workInProgress); else if (supportsPersistence) { var currentInstance = current.stateNode, - oldProps$117 = current.memoizedProps; + oldProps$109 = current.memoizedProps; if ( (current = doesRequireClone(current, workInProgress)) || - oldProps$117 !== newProps + oldProps$109 !== newProps ) { var currentHostContext = contextStackCursor.current; - oldProps$117 = cloneInstance( + oldProps$109 = cloneInstance( currentInstance, type, - oldProps$117, + oldProps$109, newProps, !current, null ); - oldProps$117 === currentInstance + oldProps$109 === currentInstance ? (workInProgress.stateNode = currentInstance) : (finalizeInitialChildren( - oldProps$117, + oldProps$109, type, newProps, currentHostContext ) && markUpdate(workInProgress), - (workInProgress.stateNode = oldProps$117), + (workInProgress.stateNode = oldProps$109), current - ? appendAllChildren(oldProps$117, workInProgress, !1, !1) + ? appendAllChildren(oldProps$109, workInProgress, !1, !1) : markUpdate(workInProgress)); } else workInProgress.stateNode = currentInstance; } @@ -6738,15 +6576,15 @@ module.exports = function ($$$config) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$119 = null; null !== lastTailNode; ) + for (var lastTailNode$111 = null; null !== lastTailNode; ) null !== lastTailNode.alternate && - (lastTailNode$119 = lastTailNode), + (lastTailNode$111 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$119 + null === lastTailNode$111 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$119.sibling = null); + : (lastTailNode$111.sibling = null); } } function bubbleProperties(completedWork) { @@ -6756,19 +6594,19 @@ module.exports = function ($$$config) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags & 31457280), - (subtreeFlags |= child$120.flags & 31457280), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (var child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags & 31457280), + (subtreeFlags |= child$112.flags & 31457280), + (child$112.return = completedWork), + (child$112 = child$112.sibling); else - for (child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags), - (subtreeFlags |= child$120.flags), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (child$112 = completedWork.child; null !== child$112; ) + (newChildLanes |= child$112.lanes | child$112.childLanes), + (subtreeFlags |= child$112.subtreeFlags), + (subtreeFlags |= child$112.flags), + (child$112.return = completedWork), + (child$112 = child$112.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6777,8 +6615,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: @@ -6791,7 +6627,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 ); @@ -7046,11 +6883,11 @@ module.exports = function ($$$config) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (nextResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$133 = null; + var cache$125 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$133 = newProps.memoizedState.cachePool.pool); - cache$133 !== nextResource && (newProps.flags |= 2048); + (cache$125 = newProps.memoizedState.cachePool.pool); + cache$125 !== nextResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7080,19 +6917,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$133 = nextResource.rendering; - if (null === cache$133) + cache$125 = nextResource.rendering; + if (null === cache$125) if (newProps) cutOffTailIfNeeded(nextResource, !1); else { if ( @@ -7100,11 +6932,11 @@ module.exports = function ($$$config) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$133 = findFirstSuspended(current); - if (null !== cache$133) { + cache$125 = findFirstSuspended(current); + if (null !== cache$125) { workInProgress.flags |= 128; cutOffTailIfNeeded(nextResource, !1); - current = cache$133.updateQueue; + current = cache$125.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7133,7 +6965,7 @@ module.exports = function ($$$config) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$133)), null !== current)) { + if (((current = findFirstSuspended(cache$125)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7143,7 +6975,7 @@ module.exports = function ($$$config) { cutOffTailIfNeeded(nextResource, !0), null === nextResource.tail && "hidden" === nextResource.tailMode && - !cache$133.alternate && + !cache$125.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7156,13 +6988,13 @@ module.exports = function ($$$config) { cutOffTailIfNeeded(nextResource, !1), (workInProgress.lanes = 4194304)); nextResource.isBackwards - ? ((cache$133.sibling = workInProgress.child), - (workInProgress.child = cache$133)) + ? ((cache$125.sibling = workInProgress.child), + (workInProgress.child = cache$125)) : ((current = nextResource.last), null !== current - ? (current.sibling = cache$133) - : (workInProgress.child = cache$133), - (nextResource.last = cache$133)); + ? (current.sibling = cache$125) + : (workInProgress.child = cache$125), + (nextResource.last = cache$125)); } if (null !== nextResource.tail) return ( @@ -7206,14 +7038,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), @@ -7249,8 +7081,6 @@ module.exports = function ($$$config) { bubbleProperties(workInProgress)), null ); - case 29: - if (!disableLegacyMode) return null; } throw Error(formatProdErrorMessage(156, workInProgress.tag)); } @@ -7259,7 +7089,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), @@ -7342,7 +7173,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); @@ -7440,8 +7273,8 @@ module.exports = function ($$$config) { else if ("function" === typeof ref) try { ref(null); - } catch (error$151) { - captureCommitPhaseError(current, nearestMountedAncestor, error$151); + } catch (error$142) { + captureCommitPhaseError(current, nearestMountedAncestor, error$142); } else ref.current = null; } @@ -7664,11 +7497,11 @@ module.exports = function ($$$config) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$152) { + } catch (error$143) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$152 + error$143 ); } } @@ -7719,30 +7552,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) @@ -8215,21 +8044,15 @@ module.exports = function ($$$config) { break; case 22: 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( @@ -8241,19 +8064,19 @@ module.exports = function ($$$config) { } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (supportsHydration && null === finishedWork.memoizedState) { - var current$163 = finishedWork.alternate; + var current$154 = finishedWork.alternate; if ( - null !== current$163 && - ((current$163 = current$163.memoizedState), - null !== current$163 && - ((current$163 = current$163.dehydrated), null !== current$163)) + null !== current$154 && + ((current$154 = current$154.memoizedState), + null !== current$154 && + ((current$154 = current$154.dehydrated), null !== current$154)) ) try { - commitHydratedSuspenseInstance(current$163); + commitHydratedSuspenseInstance(current$154); var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$163); + onHydrated && onHydrated(current$154); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -8372,11 +8195,11 @@ module.exports = function ($$$config) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$165) { + } catch (error$156) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$165 + error$156 ); } } @@ -8454,11 +8277,11 @@ module.exports = function ($$$config) { finishedWork.memoizedProps, finishedWork ); - } catch (error$166) { + } catch (error$157) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$166 + error$157 ); } break; @@ -8490,11 +8313,11 @@ module.exports = function ($$$config) { root = finishedWork.stateNode; try { resetTextContent(root); - } catch (error$167) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$167 + error$158 ); } } @@ -8504,11 +8327,11 @@ module.exports = function ($$$config) { props = finishedWork.type; try { commitUpdate(root, props, current, hoistableRoot, finishedWork); - } catch (error$169) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$169 + error$160 ); } } @@ -8526,11 +8349,11 @@ module.exports = function ($$$config) { current = null !== current ? current.memoizedProps : root; try { commitTextUpdate(flags, current, root); - } catch (error$170) { + } catch (error$161) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$170 + error$161 ); } } @@ -8553,11 +8376,11 @@ module.exports = function ($$$config) { ) try { commitHydratedContainer(root.containerInfo); - } catch (error$171) { + } catch (error$162) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$171 + error$162 ); } if (supportsPersistence) { @@ -8565,11 +8388,11 @@ module.exports = function ($$$config) { current = root.pendingChildren; try { replaceContainerChildren(flags, current); - } catch (error$172) { + } catch (error$163) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$172 + error$163 ); } } @@ -8594,11 +8417,11 @@ module.exports = function ($$$config) { current = current.pendingChildren; try { replaceContainerChildren(flags, current); - } catch (error$176) { + } catch (error$167) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$167 ); } } @@ -8622,11 +8445,11 @@ module.exports = function ($$$config) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$177) { + } catch (error$168) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$177 + error$168 ); } flags = finishedWork.updateQueue; @@ -8641,17 +8464,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; @@ -8667,8 +8487,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)) @@ -8702,11 +8521,11 @@ module.exports = function ($$$config) { suspenseCallback ? hideTextInstance(props) : unhideTextInstance(props, root.memoizedProps); - } catch (error$154) { + } catch (error$145) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$154 + error$145 ); } } else if ( @@ -8792,21 +8611,21 @@ module.exports = function ($$$config) { break; } case 5: - var parent$155 = JSCompiler_inline_result.stateNode; + var parent$146 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (resetTextContent(parent$155), + (resetTextContent(parent$146), (JSCompiler_inline_result.flags &= -33)); - var before$156 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$156, parent$155); + var before$147 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$147, parent$146); break; case 3: case 4: - var parent$157 = JSCompiler_inline_result.stateNode.containerInfo, - before$158 = getHostSibling(finishedWork); + var parent$148 = JSCompiler_inline_result.stateNode.containerInfo, + before$149 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$158, - parent$157 + before$149, + parent$148 ); break; default: @@ -8887,7 +8706,7 @@ module.exports = function ($$$config) { includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$181 = parentFiber.alternate, + var current$172 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -8915,16 +8734,16 @@ module.exports = function ($$$config) { } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } - current$181 = finishedWork.updateQueue; - if (null !== current$181) { - var hiddenCallbacks = current$181.shared.hiddenCallbacks; + current$172 = finishedWork.updateQueue; + if (null !== current$172) { + var hiddenCallbacks = current$172.shared.hiddenCallbacks; if (null !== hiddenCallbacks) for ( - current$181.shared.hiddenCallbacks = null, current$181 = 0; - current$181 < hiddenCallbacks.length; - current$181++ + current$172.shared.hiddenCallbacks = null, current$172 = 0; + current$172 < hiddenCallbacks.length; + current$172++ ) - callCallback(hiddenCallbacks[current$181], finishedRoot); + callCallback(hiddenCallbacks[current$172], finishedRoot); } includeWorkInProgressEffects && flags & 64 && @@ -8940,7 +8759,7 @@ module.exports = function ($$$config) { includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$181 && + null === current$172 && flags & 4 && commitHostComponentMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -9182,18 +9001,10 @@ module.exports = function ($$$config) { committedLanes, committedTransitions ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork ) - : ((nextCache._visibility |= 4), - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - )) : nextCache._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, @@ -9291,9 +9102,9 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$187 = finishedWork.stateNode; + var instance$178 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$187._visibility & 4 + ? instance$178._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9301,20 +9112,11 @@ module.exports = function ($$$config) { committedTransitions, includeWorkInProgressEffects ) - : disableLegacyMode || finishedWork.mode & 1 - ? recursivelyTraverseAtomicPassiveEffects( + : recursivelyTraverseAtomicPassiveEffects( finishedRoot, finishedWork ) - : ((instance$187._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - )) - : ((instance$187._visibility |= 4), + : ((instance$178._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9327,7 +9129,7 @@ module.exports = function ($$$config) { commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$187 + instance$178 ); break; case 24: @@ -9853,19 +9655,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 && @@ -9890,21 +9687,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$10 = 31 - clz32(lane), - transitions = transitionLanesMap[index$10]; - null === transitions && (transitions = new Set()); - transitions.add(transition); - transitionLanesMap[index$10] = transitions; - } + if ( + enableTransitionTracing && + ((fiber = ReactSharedInternals.T), + null !== fiber && + null != fiber.name && + (-1 === fiber.startTime && (fiber.startTime = now()), + enableTransitionTracing)) + ) { + var transitionLanesMap = root.transitionLanes, + index$10 = 31 - clz32(lane), + transitions = transitionLanesMap[index$10]; + null === transitions && (transitions = new Set()); + transitions.add(fiber); + transitionLanesMap[index$10] = transitions; } root === workInProgressRoot && (0 === (executionContext & 2) && @@ -9916,12 +9712,6 @@ module.exports = function ($$$config) { workInProgressDeferredLane )); ensureRootIsScheduled(root); - 2 !== lane || - 0 !== executionContext || - disableLegacyMode || - 0 !== (fiber.mode & 1) || - (resetRenderTimer(), - disableLegacyMode || flushSyncWorkAcrossRoots_impl(!0)); } } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -10190,7 +9980,7 @@ module.exports = function ($$$config) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (flushPassiveEffects()) return ensureRootIsScheduled(root), null; var exitStatus = renderRootSync(root, lanes); - if ((disableLegacyMode || 0 !== root.tag) && 2 === exitStatus) { + if (2 === exitStatus) { var originallyAttemptedLanes = lanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( root, @@ -10394,8 +10184,8 @@ module.exports = function ($$$config) { } workLoopSync(); break; - } catch (thrownValue$201) { - handleThrow(root, thrownValue$201); + } catch (thrownValue$192) { + handleThrow(root, thrownValue$192); } while (1); lanes && root.shellSuspendCounter++; @@ -10419,7 +10209,7 @@ module.exports = function ($$$config) { prevAsyncDispatcher = pushAsyncDispatcher(); if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) (workInProgressTransitions = getTransitionsForLanes(root, lanes)), - resetRenderTimer(), + (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes); a: do try { @@ -10510,8 +10300,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$203) { - handleThrow(root, thrownValue$203); + } catch (thrownValue$194) { + handleThrow(root, thrownValue$194); } while (1); resetContextDependencies(); @@ -10746,12 +10536,12 @@ module.exports = function ($$$config) { setCurrentUpdatePriority(2); var prevExecutionContext = executionContext; executionContext |= 4; - var shouldFireAfterActiveInstanceBlur$209 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$200 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$209 && afterActiveInstanceBlur(); + shouldFireAfterActiveInstanceBlur$200 && afterActiveInstanceBlur(); resetAfterCommit(root.containerInfo); root.current = finishedWork; commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); @@ -10779,9 +10569,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)) || @@ -10963,10 +10751,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), @@ -11156,12 +10941,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 ( @@ -11335,7 +11118,7 @@ module.exports = function ($$$config) { onRecoverableError, formState ) { - this.tag = disableLegacyMode ? 1 : tag; + this.tag = 1; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = @@ -11409,12 +11192,10 @@ module.exports = function ($$$config) { containerInfo.hydrationCallbacks = hydrationCallbacks; enableTransitionTracing && (containerInfo.transitionCallbacks = transitionCallbacks); - disableLegacyMode || 1 === tag - ? ((tag = 1), - !0 === isStrictMode && (tag |= 24), - concurrentUpdatesByDefaultOverride && (tag |= 32)) - : (tag = 0); - isStrictMode = createFiber(3, null, null, tag); + hydrationCallbacks = 1; + !0 === isStrictMode && (hydrationCallbacks |= 24); + concurrentUpdatesByDefaultOverride && (hydrationCallbacks |= 32); + isStrictMode = createFiber(3, null, null, hydrationCallbacks); containerInfo.current = isStrictMode; isStrictMode.stateNode = containerInfo; concurrentUpdatesByDefaultOverride = createCache(); @@ -11550,7 +11331,6 @@ module.exports = function ($$$config) { disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, enableNoCloningMemoCache = dynamicFeatureFlags.enableNoCloningMemoCache, - disableLegacyMode = dynamicFeatureFlags.disableLegacyMode, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -12131,7 +11911,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 && @@ -12144,7 +11924,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; @@ -12158,7 +11938,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 && @@ -12327,7 +12107,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); @@ -12348,7 +12128,8 @@ module.exports = function ($$$config) { } ensureRootIsScheduled(fiber); 0 === (executionContext & 6) && - (resetRenderTimer(), flushSyncWorkAcrossRoots_impl(!1)); + ((workInProgressRootRenderTargetTime = now() + 500), + flushSyncWorkAcrossRoots_impl(!1)); } } break; @@ -12360,17 +12141,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)); - } + return fn(a); }; exports.createComponentSelector = function (component) { return { $$typeof: COMPONENT_TYPE, value: component }; @@ -12438,7 +12209,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; @@ -12501,7 +12272,8 @@ module.exports = function ($$$config) { } finally { setCurrentUpdatePriority(previousPriority), (ReactSharedInternals.T = prevTransition), - 0 === executionContext && resetRenderTimer(); + 0 === executionContext && + (workInProgressRootRenderTargetTime = now() + 500); } }; exports.findAllNodes = findAllNodes; @@ -12583,11 +12355,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, @@ -12696,7 +12463,7 @@ module.exports = function ($$$config) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; @@ -12770,7 +12537,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 98e9444f2c..4d8caff6a1 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -12188,7 +12188,7 @@ module.exports = function ($$$config) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index acdd259d36..b1e54bd329 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -14712,14 +14712,14 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614" }); })({ findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 1, - version: "19.0.0-www-classic-50e89ec9f2-20240612", + version: "19.0.0-www-classic-fb9a90fa48-20240614", rendererPackageName: "react-test-renderer" }); exports._Scheduler = Scheduler; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index dbc516fcd6..8ce555b51b 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -14712,14 +14712,14 @@ __DEV__ && scheduleRoot: scheduleRoot, setRefreshHandler: setRefreshHandler, getCurrentFiber: getCurrentFiberForDevTools, - reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612" + reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614" }); })({ findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 1, - version: "19.0.0-www-modern-50e89ec9f2-20240612", + version: "19.0.0-www-modern-fb9a90fa48-20240614", rendererPackageName: "react-test-renderer" }); exports._Scheduler = Scheduler; diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index 09638f7223..770332aa49 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.0.0-www-classic-50e89ec9f2-20240612 \ No newline at end of file +19.0.0-www-classic-fb9a90fa48-20240614 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 4f929eff94..8d4ba71b1d 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.0.0-www-modern-50e89ec9f2-20240612 \ No newline at end of file +19.0.0-www-modern-fb9a90fa48-20240614 \ No newline at end of file