diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index e2eb2eec0e..bc60c33d6f 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -5fcaa0a832db9573364cb73738e0a3b4cf2d27f2 +5998a775194f491afa5d3badd9afe9ceaf12845e diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 44e98b6c5f..6b6678254a 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "19.0.0-www-classic-19a521f0"; + var ReactVersion = "19.0.0-www-classic-1a37f8de"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -198,8 +198,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -226,6 +224,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; // ATTENTION // When adding new symbols to this file, @@ -496,7 +495,6 @@ if (__DEV__) { case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -3760,7 +3758,6 @@ if (__DEV__) { return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -6119,7 +6116,6 @@ if (__DEV__) { return describeBuiltInComponentFrame("SuspenseList"); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); @@ -13852,17 +13848,6 @@ if (__DEV__) { } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = false; var unmaskedContext = emptyContextObject; @@ -13938,7 +13923,14 @@ if (__DEV__) { instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -14862,6 +14854,14 @@ if (__DEV__) { update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -15395,7 +15395,6 @@ if (__DEV__) { ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -15406,7 +15405,6 @@ if (__DEV__) { { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -16118,6 +16116,24 @@ if (__DEV__) { } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -16125,6 +16141,39 @@ if (__DEV__) { nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + } + } + var context; { @@ -16603,70 +16652,68 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + + { + workInProgress.type = Component = + resolveClassForHotReloading(Component); + } + + return updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + workInProgress.tag = FunctionComponent; + { validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = resolveFunctionForHotReloading(Component); } - child = updateFunctionComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; - case ClassComponent: { - { - workInProgress.type = Component = - resolveClassForHotReloading(Component); - } + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - child = updateClassComponent( - null, - workInProgress, - Component, - resolvedProps, - renderLanes - ); - return child; - } - - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -16728,116 +16775,6 @@ if (__DEV__) { ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - { - var unmaskedContext = getUnmaskedContext( - workInProgress, - Component, - false - ); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - prepareToReadContext(workInProgress, renderLanes); - var value; - - if (enableSchedulingProfiler) { - markComponentRenderStarted(workInProgress); - } - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$1.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - setIsRendering(false); - } - - if (enableSchedulingProfiler) { - markComponentRenderStopped(); - } // React DevTools reads this flag. - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -16874,33 +16811,32 @@ if (__DEV__) { } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -16909,16 +16845,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -18796,15 +18732,6 @@ if (__DEV__) { workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -18949,6 +18876,24 @@ if (__DEV__) { ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -20545,10 +20490,10 @@ if (__DEV__) { var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -27703,12 +27648,6 @@ if (__DEV__) { } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -29069,7 +29008,6 @@ if (__DEV__) { var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -29868,22 +29806,8 @@ if (__DEV__) { type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -29968,7 +29892,6 @@ if (__DEV__) { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -30094,7 +30017,7 @@ if (__DEV__) { mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 93f1fac8fa..b5e4ccc89a 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "19.0.0-www-modern-55690e70"; + var ReactVersion = "19.0.0-www-modern-d5826a7d"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -198,8 +198,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -226,6 +224,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; // ATTENTION // When adding new symbols to this file, @@ -496,7 +495,6 @@ if (__DEV__) { case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -3525,7 +3523,6 @@ if (__DEV__) { return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -5884,7 +5881,6 @@ if (__DEV__) { return describeBuiltInComponentFrame("SuspenseList"); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); @@ -13609,17 +13605,6 @@ if (__DEV__) { } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var context = emptyContextObject; var contextType = ctor.contextType; @@ -13685,7 +13670,14 @@ if (__DEV__) { instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -14586,6 +14578,14 @@ if (__DEV__) { update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -15119,7 +15119,6 @@ if (__DEV__) { ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -15130,7 +15129,6 @@ if (__DEV__) { { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -15842,6 +15840,24 @@ if (__DEV__) { } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -15849,6 +15865,47 @@ if (__DEV__) { nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + + if (Component.contextTypes) { + error( + "%s uses the legacy contextTypes API which was removed in React 19. " + + "Use React.createContext() with React.useContext() instead.", + getComponentNameFromType(Component) || "Unknown" + ); + } + } + } + var context; var nextChildren; @@ -16297,70 +16354,68 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + + { + workInProgress.type = Component = + resolveClassForHotReloading(Component); + } + + return updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + workInProgress.tag = FunctionComponent; + { validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = resolveFunctionForHotReloading(Component); } - child = updateFunctionComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; - case ClassComponent: { - { - workInProgress.type = Component = - resolveClassForHotReloading(Component); - } + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - child = updateClassComponent( - null, - workInProgress, - Component, - resolvedProps, - renderLanes - ); - return child; - } - - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -16421,117 +16476,6 @@ if (__DEV__) { ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - prepareToReadContext(workInProgress, renderLanes); - var value; - - if (enableSchedulingProfiler) { - markComponentRenderStarted(workInProgress); - } - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$1.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - setIsRendering(false); - } - - if (enableSchedulingProfiler) { - markComponentRenderStopped(); - } // React DevTools reads this flag. - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - { - if (Component.contextTypes) { - error( - "%s uses the legacy contextTypes API which was removed in React 19. " + - "Use React.createContext() with React.useContext() instead.", - getComponentNameFromType(Component) || "Unknown" - ); - } - } - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -16568,33 +16512,32 @@ if (__DEV__) { } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -16603,16 +16546,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -18484,15 +18427,6 @@ if (__DEV__) { workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -18637,6 +18571,24 @@ if (__DEV__) { ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -20233,10 +20185,10 @@ if (__DEV__) { var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -27362,12 +27314,6 @@ if (__DEV__) { } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -28719,7 +28665,6 @@ if (__DEV__) { var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -29518,22 +29463,8 @@ if (__DEV__) { type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -29618,7 +29549,6 @@ if (__DEV__) { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -29744,7 +29674,7 @@ if (__DEV__) { mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 07605a07bc..88881939be 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -226,7 +226,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -1661,7 +1660,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber; case 11: @@ -4114,12 +4112,15 @@ function throwException( : ((value.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) : ((value.flags |= 65536), (value.lanes = rootRenderLanes)), wakeable === noopSuspenseyCommitThenable @@ -5603,107 +5604,91 @@ function beginWork(current, workInProgress, renderLanes) { else didReceiveUpdate = !1; workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor$1.current - ); - prepareToReadContext(workInProgress, renderLanes); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - workInProgress.flags |= 1; - workInProgress.tag = 0; - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error(formatProdErrorMessage(306, elementType, "")); } - throw Error(formatProdErrorMessage(306, Component, "")); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -5711,8 +5696,8 @@ function beginWork(current, workInProgress, renderLanes) { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); var nextProps = workInProgress.pendingProps; - context = workInProgress.memoizedState; - Component = context.element; + init = workInProgress.memoizedState; + elementType = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; @@ -5721,17 +5706,17 @@ function beginWork(current, workInProgress, renderLanes) { enableTransitionTracing && pushRootMarkerInstance(workInProgress); var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== context.cache && + nextCache !== init.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextProps.element; - context === Component + init = nextProps.element; + init === elementType ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, context, renderLanes), + : (reconcileChildren(current, workInProgress, init, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: @@ -5739,17 +5724,17 @@ function beginWork(current, workInProgress, renderLanes) { case 5: return ( pushHostContext(workInProgress), - (context = workInProgress.type), + (init = workInProgress.type), (nextProps = workInProgress.pendingProps), (nextCache = null !== current ? current.memoizedProps : null), - (Component = nextProps.children), - shouldSetTextContent(context, nextProps) - ? (Component = null) + (elementType = nextProps.children), + shouldSetTextContent(init, nextProps) + ? (elementType = null) : null !== nextCache && - shouldSetTextContent(context, nextCache) && + shouldSetTextContent(init, nextCache) && (workInProgress.flags |= 32), null !== workInProgress.memoizedState && - ((context = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -5757,18 +5742,18 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = context), + (HostTransitionContext._currentValue2 = init), enableLazyContextPropagation || (didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, renderLanes ))), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 6: @@ -5781,30 +5766,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -5840,17 +5830,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = context.value; - pushProvider(workInProgress, Component, nextCache); + nextCache = init.value; + pushProvider(workInProgress, elementType, nextCache); if (!enableLazyContextPropagation && null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === context.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -5860,39 +5850,35 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), - (Component = Component(context)), + (init = readContext(init)), + (elementType = elementType(init)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -5906,36 +5892,54 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: return ( - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 22: @@ -5945,39 +5949,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (context.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (context.pooledCacheLanes |= renderLanes), - (context = nextProps)), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = nextProps.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = nextProps.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -5996,22 +6000,22 @@ function beginWork(current, workInProgress, renderLanes) { return ( enableTransitionTracing ? (null === current && - ((Component = enableTransitionTracing + ((elementType = enableTransitionTracing ? transitionStack.current : null), - null !== Component && - ((Component = { + null !== elementType && + ((elementType = { tag: 1, - transitions: new Set(Component), + transitions: new Set(elementType), pendingBoundaries: null, name: workInProgress.pendingProps.name, aborts: null }), - (workInProgress.stateNode = Component), + (workInProgress.stateNode = elementType), (workInProgress.flags |= 2048))), - (Component = workInProgress.stateNode), - null !== Component && - pushMarkerInstance(workInProgress, Component), + (elementType = workInProgress.stateNode), + null !== elementType && + pushMarkerInstance(workInProgress, elementType), reconcileChildren( current, workInProgress, @@ -6496,14 +6500,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$77 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode), + for (var lastTailNode$81 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$81 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$77 + null === lastTailNode$81 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$77.sibling = null); + : (lastTailNode$81.sibling = null); } } function bubbleProperties(completedWork) { @@ -6513,19 +6517,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags & 31457280), - (subtreeFlags |= child$78.flags & 31457280), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (var child$82 = completedWork.child; null !== child$82; ) + (newChildLanes |= child$82.lanes | child$82.childLanes), + (subtreeFlags |= child$82.subtreeFlags & 31457280), + (subtreeFlags |= child$82.flags & 31457280), + (child$82.return = completedWork), + (child$82 = child$82.sibling); else - for (child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags), - (subtreeFlags |= child$78.flags), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (child$82 = completedWork.child; null !== child$82; ) + (newChildLanes |= child$82.lanes | child$82.childLanes), + (subtreeFlags |= child$82.subtreeFlags), + (subtreeFlags |= child$82.flags), + (child$82.return = completedWork), + (child$82 = child$82.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6533,10 +6537,10 @@ function bubbleProperties(completedWork) { function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -6703,11 +6707,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$82 = null; + var cache$86 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$82 = newProps.memoizedState.cachePool.pool); - cache$82 !== instance && (newProps.flags |= 2048); + (cache$86 = newProps.memoizedState.cachePool.pool); + cache$86 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6741,8 +6745,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$82 = instance.rendering; - if (null === cache$82) + cache$86 = instance.rendering; + if (null === cache$86) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6750,11 +6754,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$82 = findFirstSuspended(current); - if (null !== cache$82) { + cache$86 = findFirstSuspended(current); + if (null !== cache$86) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$82.updateQueue; + current = cache$86.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6779,7 +6783,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$82)), null !== current)) { + if (((current = findFirstSuspended(cache$86)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6789,7 +6793,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$82.alternate) + !cache$86.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6801,13 +6805,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$82.sibling = workInProgress.child), - (workInProgress.child = cache$82)) + ? ((cache$86.sibling = workInProgress.child), + (workInProgress.child = cache$86)) : ((current = instance.last), null !== current - ? (current.sibling = cache$82) - : (workInProgress.child = cache$82), - (instance.last = cache$82)); + ? (current.sibling = cache$86) + : (workInProgress.child = cache$86), + (instance.last = cache$86)); } if (null !== instance.tail) return ( @@ -7070,8 +7074,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$100) { - captureCommitPhaseError(current, nearestMountedAncestor, error$100); + } catch (error$104) { + captureCommitPhaseError(current, nearestMountedAncestor, error$104); } else ref.current = null; } @@ -7273,11 +7277,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$101) { + } catch (error$105) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$101 + error$105 ); } } @@ -7870,8 +7874,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$109) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$109); + } catch (error$113) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$113); } } break; @@ -7905,8 +7909,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { flags._applyProps(flags, newProps, current); - } catch (error$112) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$112); + } catch (error$116) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$116); } } break; @@ -7942,8 +7946,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$114) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$114); + } catch (error$118) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$118); } flags = finishedWork.updateQueue; null !== flags && @@ -8083,12 +8087,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$104 = JSCompiler_inline_result.stateNode.containerInfo, - before$105 = getHostSibling(finishedWork); + var parent$108 = JSCompiler_inline_result.stateNode.containerInfo, + before$109 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$105, - parent$104 + before$109, + parent$108 ); break; default: @@ -8549,9 +8553,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$120 = finishedWork.stateNode; + var instance$124 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$120._visibility & 4 + ? instance$124._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8564,7 +8568,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$120._visibility |= 4), + : ((instance$124._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8572,7 +8576,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$120._visibility |= 4), + : ((instance$124._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8585,7 +8589,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$120 + instance$124 ); break; case 24: @@ -9506,8 +9510,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$128) { - handleThrow(root, thrownValue$128); + } catch (thrownValue$132) { + handleThrow(root, thrownValue$132); } while (1); lanes && root.shellSuspendCounter++; @@ -9612,8 +9616,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$134) { + handleThrow(root, thrownValue$134); } while (1); resetContextDependencies(); @@ -9639,8 +9643,6 @@ function performUnitOfWork(unitOfWork) { function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -10113,16 +10115,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -10200,7 +10192,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) fiberTag = 5; @@ -10652,19 +10644,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1119 = { + devToolsConfig$jscomp$inline_1117 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "19.0.0-www-classic-26116729", + version: "19.0.0-www-classic-da81c41b", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1313 = { - bundleType: devToolsConfig$jscomp$inline_1119.bundleType, - version: devToolsConfig$jscomp$inline_1119.version, - rendererPackageName: devToolsConfig$jscomp$inline_1119.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1119.rendererConfig, +var internals$jscomp$inline_1308 = { + bundleType: devToolsConfig$jscomp$inline_1117.bundleType, + version: devToolsConfig$jscomp$inline_1117.version, + rendererPackageName: devToolsConfig$jscomp$inline_1117.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1117.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10681,26 +10673,26 @@ var internals$jscomp$inline_1313 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1119.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1117.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-26116729" + reconcilerVersion: "19.0.0-www-classic-da81c41b" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1314 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1309 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1314.isDisabled && - hook$jscomp$inline_1314.supportsFiber + !hook$jscomp$inline_1309.isDisabled && + hook$jscomp$inline_1309.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1314.inject( - internals$jscomp$inline_1313 + (rendererID = hook$jscomp$inline_1309.inject( + internals$jscomp$inline_1308 )), - (injectedHook = hook$jscomp$inline_1314); + (injectedHook = hook$jscomp$inline_1309); } 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 5277e21468..adc17dcbdd 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -1459,7 +1459,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber; case 11: @@ -3897,12 +3896,15 @@ function throwException( : ((value.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) : ((value.flags |= 65536), (value.lanes = rootRenderLanes)), wakeable === noopSuspenseyCommitThenable @@ -5347,102 +5349,90 @@ function beginWork(current, workInProgress, renderLanes) { else didReceiveUpdate = !1; workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - prepareToReadContext(workInProgress, renderLanes); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - void 0, - renderLanes - ); - workInProgress.flags |= 1; - workInProgress.tag = 0; - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - var init = Component._init; - Component = init(Component._payload); - workInProgress.type = Component; - init = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (init) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error(formatProdErrorMessage(306, elementType, "")); } - throw Error(formatProdErrorMessage(306, Component, "")); } return workInProgress; case 0: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) @@ -5452,7 +5442,7 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error(formatProdErrorMessage(387)); var nextProps = workInProgress.pendingProps; init = workInProgress.memoizedState; - Component = init.element; + elementType = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; @@ -5465,7 +5455,7 @@ function beginWork(current, workInProgress, renderLanes) { propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); init = nextProps.element; - init === Component + init === elementType ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -5482,9 +5472,9 @@ function beginWork(current, workInProgress, renderLanes) { (init = workInProgress.type), (nextProps = workInProgress.pendingProps), (nextCache = null !== current ? current.memoizedProps : null), - (Component = nextProps.children), + (elementType = nextProps.children), shouldSetTextContent(init, nextProps) - ? (Component = null) + ? (elementType = null) : null !== nextCache && shouldSetTextContent(init, nextCache) && (workInProgress.flags |= 32), @@ -5508,7 +5498,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes ))), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 6: @@ -5521,26 +5511,37 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), - updateForwardRef(current, workInProgress, Component, init, renderLanes) + : resolveDefaultProps(elementType, init)), + updateForwardRef( + current, + workInProgress, + elementType, + init, + renderLanes + ) ); case 7: return ( @@ -5574,13 +5575,13 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; nextCache = init.value; - pushProvider(workInProgress, Component, nextCache); + pushProvider(workInProgress, elementType, nextCache); if (!enableLazyContextPropagation && null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if (nextProps.children === init.children) { @@ -5591,7 +5592,8 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); + } else + propagateContextChange(workInProgress, elementType, renderLanes); reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } @@ -5601,23 +5603,23 @@ function beginWork(current, workInProgress, renderLanes) { (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), - (Component = Component(init)), + (elementType = elementType(init)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (init = resolveDefaultProps(Component, workInProgress.pendingProps)), - (init = resolveDefaultProps(Component.type, init)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) @@ -5632,33 +5634,51 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, init), - mountClassInstance(workInProgress, Component, init, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, !1, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: return ( - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 22: @@ -5668,7 +5688,7 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), null === init && @@ -5678,7 +5698,10 @@ function beginWork(current, workInProgress, renderLanes) { nextProps.refCount++, null !== nextProps && (init.pooledCacheLanes |= renderLanes), (init = nextProps)), - (workInProgress.memoizedState = { parent: Component, cache: init }), + (workInProgress.memoizedState = { + parent: elementType, + cache: init + }), initializeUpdateQueue(workInProgress), pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && @@ -5687,17 +5710,17 @@ function beginWork(current, workInProgress, renderLanes) { suspendIfUpdateReadFromEntangledAsyncAction()), (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - init.parent !== Component - ? ((init = { parent: Component, cache: Component }), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = init), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = nextProps.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== init.cache && + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = nextProps.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -5716,22 +5739,22 @@ function beginWork(current, workInProgress, renderLanes) { return ( enableTransitionTracing ? (null === current && - ((Component = enableTransitionTracing + ((elementType = enableTransitionTracing ? transitionStack.current : null), - null !== Component && - ((Component = { + null !== elementType && + ((elementType = { tag: 1, - transitions: new Set(Component), + transitions: new Set(elementType), pendingBoundaries: null, name: workInProgress.pendingProps.name, aborts: null }), - (workInProgress.stateNode = Component), + (workInProgress.stateNode = elementType), (workInProgress.flags |= 2048))), - (Component = workInProgress.stateNode), - null !== Component && - pushMarkerInstance(workInProgress, Component), + (elementType = workInProgress.stateNode), + null !== elementType && + pushMarkerInstance(workInProgress, elementType), reconcileChildren( current, workInProgress, @@ -6216,14 +6239,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$77 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode), + for (var lastTailNode$81 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$81 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$77 + null === lastTailNode$81 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$77.sibling = null); + : (lastTailNode$81.sibling = null); } } function bubbleProperties(completedWork) { @@ -6233,19 +6256,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags & 31457280), - (subtreeFlags |= child$78.flags & 31457280), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (var child$82 = completedWork.child; null !== child$82; ) + (newChildLanes |= child$82.lanes | child$82.childLanes), + (subtreeFlags |= child$82.subtreeFlags & 31457280), + (subtreeFlags |= child$82.flags & 31457280), + (child$82.return = completedWork), + (child$82 = child$82.sibling); else - for (child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags), - (subtreeFlags |= child$78.flags), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (child$82 = completedWork.child; null !== child$82; ) + (newChildLanes |= child$82.lanes | child$82.childLanes), + (subtreeFlags |= child$82.subtreeFlags), + (subtreeFlags |= child$82.flags), + (child$82.return = completedWork), + (child$82 = child$82.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6253,10 +6276,10 @@ function bubbleProperties(completedWork) { function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -6417,11 +6440,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$82 = null; + var cache$86 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$82 = newProps.memoizedState.cachePool.pool); - cache$82 !== instance && (newProps.flags |= 2048); + (cache$86 = newProps.memoizedState.cachePool.pool); + cache$86 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6451,8 +6474,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$82 = instance.rendering; - if (null === cache$82) + cache$86 = instance.rendering; + if (null === cache$86) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6460,11 +6483,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$82 = findFirstSuspended(current); - if (null !== cache$82) { + cache$86 = findFirstSuspended(current); + if (null !== cache$86) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$82.updateQueue; + current = cache$86.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6489,7 +6512,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$82)), null !== current)) { + if (((current = findFirstSuspended(cache$86)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6499,7 +6522,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$82.alternate) + !cache$86.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6511,13 +6534,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$82.sibling = workInProgress.child), - (workInProgress.child = cache$82)) + ? ((cache$86.sibling = workInProgress.child), + (workInProgress.child = cache$86)) : ((current = instance.last), null !== current - ? (current.sibling = cache$82) - : (workInProgress.child = cache$82), - (instance.last = cache$82)); + ? (current.sibling = cache$86) + : (workInProgress.child = cache$86), + (instance.last = cache$86)); } if (null !== instance.tail) return ( @@ -6771,8 +6794,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$99) { - captureCommitPhaseError(current, nearestMountedAncestor, error$99); + } catch (error$103) { + captureCommitPhaseError(current, nearestMountedAncestor, error$103); } else ref.current = null; } @@ -6974,11 +6997,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$100) { + } catch (error$104) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$100 + error$104 ); } } @@ -7571,8 +7594,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$108) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$108); + } catch (error$112) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$112); } } break; @@ -7606,8 +7629,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { flags._applyProps(flags, newProps, current); - } catch (error$111) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$111); + } catch (error$115) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$115); } } break; @@ -7643,8 +7666,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$113) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$113); + } catch (error$117) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$117); } flags = finishedWork.updateQueue; null !== flags && @@ -7784,12 +7807,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$103 = JSCompiler_inline_result.stateNode.containerInfo, - before$104 = getHostSibling(finishedWork); + var parent$107 = JSCompiler_inline_result.stateNode.containerInfo, + before$108 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$104, - parent$103 + before$108, + parent$107 ); break; default: @@ -8250,9 +8273,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$119 = finishedWork.stateNode; + var instance$123 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$119._visibility & 4 + ? instance$123._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8265,7 +8288,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$119._visibility |= 4), + : ((instance$123._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8273,7 +8296,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$119._visibility |= 4), + : ((instance$123._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8286,7 +8309,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$119 + instance$123 ); break; case 24: @@ -9207,8 +9230,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$127) { - handleThrow(root, thrownValue$127); + } catch (thrownValue$131) { + handleThrow(root, thrownValue$131); } while (1); lanes && root.shellSuspendCounter++; @@ -9313,8 +9336,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$129) { - handleThrow(root, thrownValue$129); + } catch (thrownValue$133) { + handleThrow(root, thrownValue$133); } while (1); resetContextDependencies(); @@ -9340,8 +9363,6 @@ function performUnitOfWork(unitOfWork) { function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -9810,16 +9831,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -9897,7 +9908,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) fiberTag = 5; @@ -10309,19 +10320,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1099 = { + devToolsConfig$jscomp$inline_1098 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "19.0.0-www-modern-0c8ed270", + version: "19.0.0-www-modern-7cc92098", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1293 = { - bundleType: devToolsConfig$jscomp$inline_1099.bundleType, - version: devToolsConfig$jscomp$inline_1099.version, - rendererPackageName: devToolsConfig$jscomp$inline_1099.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1099.rendererConfig, +var internals$jscomp$inline_1289 = { + bundleType: devToolsConfig$jscomp$inline_1098.bundleType, + version: devToolsConfig$jscomp$inline_1098.version, + rendererPackageName: devToolsConfig$jscomp$inline_1098.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1098.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10338,26 +10349,26 @@ var internals$jscomp$inline_1293 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1099.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1098.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-0c8ed270" + reconcilerVersion: "19.0.0-www-modern-7cc92098" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1294 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1290 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1294.isDisabled && - hook$jscomp$inline_1294.supportsFiber + !hook$jscomp$inline_1290.isDisabled && + hook$jscomp$inline_1290.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1294.inject( - internals$jscomp$inline_1293 + (rendererID = hook$jscomp$inline_1290.inject( + internals$jscomp$inline_1289 )), - (injectedHook = hook$jscomp$inline_1294); + (injectedHook = hook$jscomp$inline_1290); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 218b92a072..17ed9b647e 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -162,8 +162,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -190,6 +188,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; // ATTENTION // When adding new symbols to this file, @@ -460,7 +459,6 @@ if (__DEV__) { case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -3704,7 +3702,6 @@ if (__DEV__) { return describeBuiltInComponentFrame("SuspenseList"); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); @@ -8112,7 +8109,6 @@ if (__DEV__) { return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -18501,17 +18497,6 @@ if (__DEV__) { } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = false; var unmaskedContext = emptyContextObject; @@ -18587,7 +18572,14 @@ if (__DEV__) { instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -19563,6 +19555,14 @@ if (__DEV__) { update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -20139,7 +20139,6 @@ if (__DEV__) { ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -20150,7 +20149,6 @@ if (__DEV__) { { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -20868,6 +20866,24 @@ if (__DEV__) { } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -20875,6 +20891,39 @@ if (__DEV__) { nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + } + } + var context; { @@ -21519,70 +21568,68 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + + { + workInProgress.type = Component = + resolveClassForHotReloading(Component); + } + + return updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + workInProgress.tag = FunctionComponent; + { validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = resolveFunctionForHotReloading(Component); } - child = updateFunctionComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; - case ClassComponent: { - { - workInProgress.type = Component = - resolveClassForHotReloading(Component); - } + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - child = updateClassComponent( - null, - workInProgress, - Component, - resolvedProps, - renderLanes - ); - return child; - } - - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -21644,122 +21691,6 @@ if (__DEV__) { ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - { - var unmaskedContext = getUnmaskedContext( - workInProgress, - Component, - false - ); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - prepareToReadContext(workInProgress, renderLanes); - var value; - var hasId; - - if (enableSchedulingProfiler) { - markComponentRenderStarted(workInProgress); - } - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$2.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - hasId = checkDidRenderIdHook(); - setIsRendering(false); - } - - if (enableSchedulingProfiler) { - markComponentRenderStopped(); - } // React DevTools reads this flag. - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - if (getIsHydrating() && hasId) { - pushMaterializedTreeId(workInProgress); - } - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -21796,33 +21727,32 @@ if (__DEV__) { } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -21831,16 +21761,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -23806,15 +23736,6 @@ if (__DEV__) { workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -23963,6 +23884,24 @@ if (__DEV__) { ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -25602,10 +25541,10 @@ if (__DEV__) { popTreeContext(workInProgress); switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -33331,12 +33270,6 @@ if (__DEV__) { } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -34745,7 +34678,6 @@ if (__DEV__) { var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -35544,22 +35476,8 @@ if (__DEV__) { type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -35644,7 +35562,6 @@ if (__DEV__) { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -35770,7 +35687,7 @@ if (__DEV__) { mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; @@ -36273,7 +36190,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-6e35fd06"; + var ReactVersion = "19.0.0-www-classic-7e51a591"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index d20c020a2f..403917f478 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -2374,8 +2374,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -2402,6 +2400,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; var randomKey = Math.random().toString(36).slice(2); var internalInstanceKey = "__reactFiber$" + randomKey; @@ -3311,7 +3310,6 @@ if (__DEV__) { return describeBuiltInComponentFrame("SuspenseList"); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); @@ -3585,7 +3583,6 @@ if (__DEV__) { case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -8075,7 +8072,6 @@ if (__DEV__) { return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -18456,17 +18452,6 @@ if (__DEV__) { } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var context = emptyContextObject; var contextType = ctor.contextType; @@ -18532,7 +18517,14 @@ if (__DEV__) { instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -19485,6 +19477,14 @@ if (__DEV__) { update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -20061,7 +20061,6 @@ if (__DEV__) { ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -20072,7 +20071,6 @@ if (__DEV__) { { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -20790,6 +20788,24 @@ if (__DEV__) { } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -20797,6 +20813,47 @@ if (__DEV__) { nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + + if (Component.contextTypes) { + error( + "%s uses the legacy contextTypes API which was removed in React 19. " + + "Use React.createContext() with React.useContext() instead.", + getComponentNameFromType(Component) || "Unknown" + ); + } + } + } + var context; var nextChildren; @@ -21411,70 +21468,68 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + + { + workInProgress.type = Component = + resolveClassForHotReloading(Component); + } + + return updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + workInProgress.tag = FunctionComponent; + { validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = resolveFunctionForHotReloading(Component); } - child = updateFunctionComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; - case ClassComponent: { - { - workInProgress.type = Component = - resolveClassForHotReloading(Component); - } + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - child = updateClassComponent( - null, - workInProgress, - Component, - resolvedProps, - renderLanes - ); - return child; - } - - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -21535,123 +21590,6 @@ if (__DEV__) { ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - prepareToReadContext(workInProgress, renderLanes); - var value; - var hasId; - - if (enableSchedulingProfiler) { - markComponentRenderStarted(workInProgress); - } - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$2.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - hasId = checkDidRenderIdHook(); - setIsRendering(false); - } - - if (enableSchedulingProfiler) { - markComponentRenderStopped(); - } // React DevTools reads this flag. - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - { - if (Component.contextTypes) { - error( - "%s uses the legacy contextTypes API which was removed in React 19. " + - "Use React.createContext() with React.useContext() instead.", - getComponentNameFromType(Component) || "Unknown" - ); - } - } - - if (getIsHydrating() && hasId) { - pushMaterializedTreeId(workInProgress); - } - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -21688,33 +21626,32 @@ if (__DEV__) { } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -21723,16 +21660,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -23692,15 +23629,6 @@ if (__DEV__) { workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -23849,6 +23777,24 @@ if (__DEV__) { ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -25488,10 +25434,10 @@ if (__DEV__) { popTreeContext(workInProgress); switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -33188,12 +33134,6 @@ if (__DEV__) { } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -34593,7 +34533,6 @@ if (__DEV__) { var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -35392,22 +35331,8 @@ if (__DEV__) { type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -35492,7 +35417,6 @@ if (__DEV__) { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -35618,7 +35542,7 @@ if (__DEV__) { mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; @@ -36121,7 +36045,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-e8cb623a"; + var ReactVersion = "19.0.0-www-modern-cab6e9ae"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 5e70ac04dd..f9c25e5e0a 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -204,7 +204,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -984,7 +983,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber; case 11: @@ -4931,12 +4929,15 @@ function markSuspenseBoundaryShouldCapture( : ((suspenseBoundary.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)), suspenseBoundary ); @@ -5212,10 +5213,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$71 = workInProgress.stateNode; + root$72 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$71.incompleteTransitions.has(transition)) { + if (!root$72.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5223,11 +5224,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$71.incompleteTransitions.set(transition, markerInstance); + root$72.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$71.incompleteTransitions.forEach(function (markerInstance) { + root$72.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6598,109 +6599,91 @@ function beginWork(current, workInProgress, renderLanes) { pushTreeId(workInProgress, treeForkCount, workInProgress.index); workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor.current - ); - prepareToReadContext(workInProgress, renderLanes); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - Component = checkDidRenderIdHook(); - workInProgress.flags |= 1; - workInProgress.tag = 0; - isHydrating && Component && pushMaterializedTreeId(workInProgress); - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error(formatProdErrorMessage(306, elementType, "")); } - throw Error(formatProdErrorMessage(306, Component, "")); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6708,25 +6691,25 @@ function beginWork(current, workInProgress, renderLanes) { a: { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; var prevState = workInProgress.memoizedState; - Component = prevState.element; + elementType = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, context, null, renderLanes); + processUpdateQueue(workInProgress, init, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - context = nextState.cache; - pushProvider(workInProgress, CacheContext, context); - context !== prevState.cache && + init = nextState.cache; + pushProvider(workInProgress, CacheContext, init); + init !== prevState.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextState.element; + init = nextState.element; if (prevState.isDehydrated) if ( ((prevState = { - element: context, + element: init, isDehydrated: !1, cache: nextState.cache }), @@ -6734,29 +6717,29 @@ function beginWork(current, workInProgress, renderLanes) { (workInProgress.memoizedState = prevState), workInProgress.flags & 256) ) { - Component = createCapturedValueAtFiber( + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(423)), workInProgress ); workInProgress = mountHostRootWithoutHydrating( current, workInProgress, - context, + init, renderLanes, - Component + elementType ); break a; - } else if (context !== Component) { - Component = createCapturedValueAtFiber( + } else if (init !== elementType) { + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); workInProgress = mountHostRootWithoutHydrating( current, workInProgress, - context, + init, renderLanes, - Component + elementType ); break a; } else @@ -6771,7 +6754,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes = mountChildFibers( workInProgress, null, - context, + init, renderLanes ), workInProgress.child = renderLanes; @@ -6782,7 +6765,7 @@ function beginWork(current, workInProgress, renderLanes) { (renderLanes = renderLanes.sibling); else { resetHydrationState(); - if (context === Component) { + if (init === elementType) { workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -6790,7 +6773,7 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - reconcileChildren(current, workInProgress, context, renderLanes); + reconcileChildren(current, workInProgress, init, renderLanes); } workInProgress = workInProgress.child; } @@ -6809,14 +6792,14 @@ function beginWork(current, workInProgress, renderLanes) { null !== renderLanes || ((renderLanes = workInProgress.type), (current = workInProgress.pendingProps), - (Component = getOwnerDocumentFromRootContainer( + (elementType = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current ).createElement(renderLanes)), - (Component[internalInstanceKey] = workInProgress), - (Component[internalPropsKey] = current), - setInitialProperties(Component, renderLanes, current), - markNodeAsHoistable(Component), - (workInProgress.stateNode = Component)), + (elementType[internalInstanceKey] = workInProgress), + (elementType[internalPropsKey] = current), + setInitialProperties(elementType, renderLanes, current), + markNodeAsHoistable(elementType), + (workInProgress.stateNode = elementType)), null ); case 27: @@ -6824,7 +6807,7 @@ function beginWork(current, workInProgress, renderLanes) { pushHostContext(workInProgress), null === current && isHydrating && - ((Component = workInProgress.stateNode = + ((elementType = workInProgress.stateNode = resolveSingletonInstance( workInProgress.type, workInProgress.pendingProps, @@ -6832,14 +6815,14 @@ function beginWork(current, workInProgress, renderLanes) { )), (hydrationParentFiber = workInProgress), (rootOrSingletonContext = !0), - (nextHydratableInstance = getNextHydratable(Component.firstChild))), - (Component = workInProgress.pendingProps.children), + (nextHydratableInstance = getNextHydratable(elementType.firstChild))), + (elementType = workInProgress.pendingProps.children), null !== current || isHydrating - ? reconcileChildren(current, workInProgress, Component, renderLanes) + ? reconcileChildren(current, workInProgress, elementType, renderLanes) : (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )), markRef(current, workInProgress), @@ -6847,36 +6830,36 @@ function beginWork(current, workInProgress, renderLanes) { ); case 5: if (null === current && isHydrating) { - if ((context = Component = nextHydratableInstance)) - (Component = canHydrateInstance( - Component, + if ((init = elementType = nextHydratableInstance)) + (elementType = canHydrateInstance( + elementType, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext )), - null !== Component - ? ((workInProgress.stateNode = Component), + null !== elementType + ? ((workInProgress.stateNode = elementType), (hydrationParentFiber = workInProgress), (nextHydratableInstance = getNextHydratable( - Component.firstChild + elementType.firstChild )), (rootOrSingletonContext = !1), - (context = !0)) - : (context = !1); - context || throwOnHydrationMismatch(); + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(); } pushHostContext(workInProgress); - context = workInProgress.type; + init = workInProgress.type; prevState = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; - Component = prevState.children; - shouldSetTextContent(context, prevState) - ? (Component = null) + elementType = prevState.children; + shouldSetTextContent(init, prevState) + ? (elementType = null) : null !== nextState && - shouldSetTextContent(context, nextState) && + shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); null !== workInProgress.memoizedState && - ((context = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6884,18 +6867,18 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = context), + (HostTransitionContext._currentValue = init), enableLazyContextPropagation || (didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, renderLanes ))); markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: if (null === current && isHydrating) { @@ -6922,30 +6905,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6981,17 +6969,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; - nextState = context.value; - pushProvider(workInProgress, Component, nextState); + nextState = init.value; + pushProvider(workInProgress, elementType, nextState); if (!enableLazyContextPropagation && null !== prevState) if (objectIs(prevState.value, nextState)) { if ( - prevState.children === context.children && + prevState.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -7001,39 +6989,35 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), - (Component = Component(context)), + (init = readContext(init)), + (elementType = elementType(init)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -7047,36 +7031,54 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: return ( - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 22: @@ -7086,39 +7088,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (prevState = createCache()), - (context.pooledCache = prevState), + (init.pooledCache = prevState), prevState.refCount++, - null !== prevState && (context.pooledCacheLanes |= renderLanes), - (context = prevState)), + null !== prevState && (init.pooledCacheLanes |= renderLanes), + (init = prevState)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (prevState = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = prevState.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = prevState.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -7137,22 +7139,22 @@ function beginWork(current, workInProgress, renderLanes) { return ( enableTransitionTracing ? (null === current && - ((Component = enableTransitionTracing + ((elementType = enableTransitionTracing ? transitionStack.current : null), - null !== Component && - ((Component = { + null !== elementType && + ((elementType = { tag: 1, - transitions: new Set(Component), + transitions: new Set(elementType), pendingBoundaries: null, name: workInProgress.pendingProps.name, aborts: null }), - (workInProgress.stateNode = Component), + (workInProgress.stateNode = elementType), (workInProgress.flags |= 2048))), - (Component = workInProgress.stateNode), - null !== Component && - pushMarkerInstance(workInProgress, Component), + (elementType = workInProgress.stateNode), + null !== elementType && + pushMarkerInstance(workInProgress, elementType), reconcileChildren( current, workInProgress, @@ -7664,14 +7666,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$110 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$110 = lastTailNode), + for (var lastTailNode$114 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$114 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$110 + null === lastTailNode$114 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$110.sibling = null); + : (lastTailNode$114.sibling = null); } } function bubbleProperties(completedWork) { @@ -7681,19 +7683,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$111 = completedWork.child; null !== child$111; ) - (newChildLanes |= child$111.lanes | child$111.childLanes), - (subtreeFlags |= child$111.subtreeFlags & 31457280), - (subtreeFlags |= child$111.flags & 31457280), - (child$111.return = completedWork), - (child$111 = child$111.sibling); + for (var child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags & 31457280), + (subtreeFlags |= child$115.flags & 31457280), + (child$115.return = completedWork), + (child$115 = child$115.sibling); else - for (child$111 = completedWork.child; null !== child$111; ) - (newChildLanes |= child$111.lanes | child$111.childLanes), - (subtreeFlags |= child$111.subtreeFlags), - (subtreeFlags |= child$111.flags), - (child$111.return = completedWork), - (child$111 = child$111.sibling); + for (child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags), + (subtreeFlags |= child$115.flags), + (child$115.return = completedWork), + (child$115 = child$115.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7702,10 +7704,10 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -8009,11 +8011,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$123 = null; + var cache$127 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$123 = newProps.memoizedState.cachePool.pool); - cache$123 !== currentResource && (newProps.flags |= 2048); + (cache$127 = newProps.memoizedState.cachePool.pool); + cache$127 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8054,8 +8056,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$123 = currentResource.rendering; - if (null === cache$123) + cache$127 = currentResource.rendering; + if (null === cache$127) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8063,11 +8065,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$123 = findFirstSuspended(current); - if (null !== cache$123) { + cache$127 = findFirstSuspended(current); + if (null !== cache$127) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$123.updateQueue; + current = cache$127.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8092,7 +8094,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$123)), null !== current)) { + if (((current = findFirstSuspended(cache$127)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8102,7 +8104,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$123.alternate && + !cache$127.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8115,13 +8117,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$123.sibling = workInProgress.child), - (workInProgress.child = cache$123)) + ? ((cache$127.sibling = workInProgress.child), + (workInProgress.child = cache$127)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$123) - : (workInProgress.child = cache$123), - (currentResource.last = cache$123)); + ? (current.sibling = cache$127) + : (workInProgress.child = cache$127), + (currentResource.last = cache$127)); } if (null !== currentResource.tail) return ( @@ -8386,8 +8388,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$141) { - captureCommitPhaseError(current, nearestMountedAncestor, error$141); + } catch (error$145) { + captureCommitPhaseError(current, nearestMountedAncestor, error$145); } else ref.current = null; } @@ -8424,7 +8426,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$191) { + } catch (e$195) { JSCompiler_temp = null; break a; } @@ -8690,11 +8692,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$143) { + } catch (error$147) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$143 + error$147 ); } } @@ -9374,8 +9376,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$156) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$156); + } catch (error$160) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$160); } } break; @@ -9547,11 +9549,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$157) { + } catch (error$161) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$161 ); } } @@ -9589,8 +9591,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$158) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$158); + } catch (error$162) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$162); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9601,8 +9603,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$161) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$161); + } catch (error$165) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$165); } } break; @@ -9616,8 +9618,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } } break; @@ -9631,8 +9633,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$167) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$167); } break; case 4: @@ -9662,8 +9664,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$169) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$169); } current = finishedWork.updateQueue; null !== current && @@ -9741,11 +9743,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$146) { + } catch (error$150) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$146 + error$150 ); } } else if ( @@ -9820,21 +9822,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$147 = JSCompiler_inline_result.stateNode; + var parent$151 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$147, ""), + (setTextContent(parent$151, ""), (JSCompiler_inline_result.flags &= -33)); - var before$148 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$148, parent$147); + var before$152 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$152, parent$151); break; case 3: case 4: - var parent$149 = JSCompiler_inline_result.stateNode.containerInfo, - before$150 = getHostSibling(finishedWork); + var parent$153 = JSCompiler_inline_result.stateNode.containerInfo, + before$154 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$150, - parent$149 + before$154, + parent$153 ); break; default: @@ -10304,9 +10306,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$172 = finishedWork.stateNode; + var instance$176 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$172._visibility & 4 + ? instance$176._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10319,7 +10321,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$172._visibility |= 4), + : ((instance$176._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10327,7 +10329,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$172._visibility |= 4), + : ((instance$176._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10340,7 +10342,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$172 + instance$176 ); break; case 24: @@ -11322,8 +11324,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$180) { - handleThrow(root, thrownValue$180); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); lanes && root.shellSuspendCounter++; @@ -11428,8 +11430,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$182) { - handleThrow(root, thrownValue$182); + } catch (thrownValue$186) { + handleThrow(root, thrownValue$186); } while (1); resetContextDependencies(); @@ -11455,8 +11457,6 @@ function performUnitOfWork(unitOfWork) { function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -11658,12 +11658,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$186 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$190 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$186 && + shouldFireAfterActiveInstanceBlur$190 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11735,7 +11735,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$187 = rootWithPendingPassiveEffects, + var root$191 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11751,7 +11751,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$187, remainingLanes); + releaseRootPooledCache(root$191, remainingLanes); } } return !1; @@ -11956,16 +11956,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -12043,7 +12033,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) @@ -12453,12 +12443,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$189 = fiber.stateNode; - if (root$189.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$189.pendingLanes); + var root$193 = fiber.stateNode; + if (root$193.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$193.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$189, lanes), - ensureRootIsScheduled(root$189), + (upgradePendingLanesToSync(root$193, lanes), + ensureRootIsScheduled(root$193), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13024,19 +13014,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$345; + var JSCompiler_inline_result$jscomp$349; if (canUseDOM) { - var isSupported$jscomp$inline_1487 = "oninput" in document; - if (!isSupported$jscomp$inline_1487) { - var element$jscomp$inline_1488 = document.createElement("div"); - element$jscomp$inline_1488.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1487 = - "function" === typeof element$jscomp$inline_1488.oninput; + var isSupported$jscomp$inline_1483 = "oninput" in document; + if (!isSupported$jscomp$inline_1483) { + var element$jscomp$inline_1484 = document.createElement("div"); + element$jscomp$inline_1484.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1483 = + "function" === typeof element$jscomp$inline_1484.oninput; } - JSCompiler_inline_result$jscomp$345 = isSupported$jscomp$inline_1487; - } else JSCompiler_inline_result$jscomp$345 = !1; + JSCompiler_inline_result$jscomp$349 = isSupported$jscomp$inline_1483; + } else JSCompiler_inline_result$jscomp$349 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$345 && + JSCompiler_inline_result$jscomp$349 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13408,20 +13398,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1528 = 0; - i$jscomp$inline_1528 < simpleEventPluginEvents.length; - i$jscomp$inline_1528++ + var i$jscomp$inline_1524 = 0; + i$jscomp$inline_1524 < simpleEventPluginEvents.length; + i$jscomp$inline_1524++ ) { - var eventName$jscomp$inline_1529 = - simpleEventPluginEvents[i$jscomp$inline_1528], - domEventName$jscomp$inline_1530 = - eventName$jscomp$inline_1529.toLowerCase(), - capitalizedEvent$jscomp$inline_1531 = - eventName$jscomp$inline_1529[0].toUpperCase() + - eventName$jscomp$inline_1529.slice(1); + var eventName$jscomp$inline_1525 = + simpleEventPluginEvents[i$jscomp$inline_1524], + domEventName$jscomp$inline_1526 = + eventName$jscomp$inline_1525.toLowerCase(), + capitalizedEvent$jscomp$inline_1527 = + eventName$jscomp$inline_1525[0].toUpperCase() + + eventName$jscomp$inline_1525.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1530, - "on" + capitalizedEvent$jscomp$inline_1531 + domEventName$jscomp$inline_1526, + "on" + capitalizedEvent$jscomp$inline_1527 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14893,14 +14883,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$218 in nextProps) { - var propKey = nextProps[propKey$218]; - lastProp = lastProps[propKey$218]; + for (var propKey$222 in nextProps) { + var propKey = nextProps[propKey$222]; + lastProp = lastProps[propKey$222]; if ( - nextProps.hasOwnProperty(propKey$218) && + nextProps.hasOwnProperty(propKey$222) && (null != propKey || null != lastProp) ) - switch (propKey$218) { + switch (propKey$222) { case "type": type = propKey; break; @@ -14929,7 +14919,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$218, + propKey$222, propKey, nextProps, lastProp @@ -14948,7 +14938,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$218 = null; + propKey = value = defaultValue = propKey$222 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14979,7 +14969,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$218 = type; + propKey$222 = type; break; case "defaultValue": defaultValue = type; @@ -15000,15 +14990,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$218 - ? updateOptions(domElement, !!lastProps, propKey$218, !1) + null != propKey$222 + ? updateOptions(domElement, !!lastProps, propKey$222, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$218 = null; + propKey = propKey$222 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15032,7 +15022,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$218 = name; + propKey$222 = name; break; case "defaultValue": propKey = name; @@ -15046,17 +15036,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$218, propKey); + updateTextarea(domElement, propKey$222, propKey); return; case "option": - for (var propKey$234 in lastProps) + for (var propKey$238 in lastProps) if ( - ((propKey$218 = lastProps[propKey$234]), - lastProps.hasOwnProperty(propKey$234) && - null != propKey$218 && - !nextProps.hasOwnProperty(propKey$234)) + ((propKey$222 = lastProps[propKey$238]), + lastProps.hasOwnProperty(propKey$238) && + null != propKey$222 && + !nextProps.hasOwnProperty(propKey$238)) ) - switch (propKey$234) { + switch (propKey$238) { case "selected": domElement.selected = !1; break; @@ -15064,33 +15054,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$234, + propKey$238, null, nextProps, - propKey$218 + propKey$222 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$218 = nextProps[lastDefaultValue]), + ((propKey$222 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$218 !== propKey && - (null != propKey$218 || null != propKey)) + propKey$222 !== propKey && + (null != propKey$222 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$218 && - "function" !== typeof propKey$218 && - "symbol" !== typeof propKey$218; + propKey$222 && + "function" !== typeof propKey$222 && + "symbol" !== typeof propKey$222; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$218, + propKey$222, nextProps, propKey ); @@ -15111,24 +15101,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$239 in lastProps) - (propKey$218 = lastProps[propKey$239]), - lastProps.hasOwnProperty(propKey$239) && - null != propKey$218 && - !nextProps.hasOwnProperty(propKey$239) && - setProp(domElement, tag, propKey$239, null, nextProps, propKey$218); + for (var propKey$243 in lastProps) + (propKey$222 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$222 && + !nextProps.hasOwnProperty(propKey$243) && + setProp(domElement, tag, propKey$243, null, nextProps, propKey$222); for (checked in nextProps) if ( - ((propKey$218 = nextProps[checked]), + ((propKey$222 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$218 !== propKey && - (null != propKey$218 || null != propKey)) + propKey$222 !== propKey && + (null != propKey$222 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$218) + if (null != propKey$222) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15136,7 +15126,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$218, + propKey$222, nextProps, propKey ); @@ -15144,49 +15134,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$244 in lastProps) - (propKey$218 = lastProps[propKey$244]), - lastProps.hasOwnProperty(propKey$244) && - void 0 !== propKey$218 && - !nextProps.hasOwnProperty(propKey$244) && + for (var propKey$248 in lastProps) + (propKey$222 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + void 0 !== propKey$222 && + !nextProps.hasOwnProperty(propKey$248) && setPropOnCustomElement( domElement, tag, - propKey$244, + propKey$248, void 0, nextProps, - propKey$218 + propKey$222 ); for (defaultChecked in nextProps) - (propKey$218 = nextProps[defaultChecked]), + (propKey$222 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$218 === propKey || - (void 0 === propKey$218 && void 0 === propKey) || + propKey$222 === propKey || + (void 0 === propKey$222 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$218, + propKey$222, nextProps, propKey ); return; } } - for (var propKey$249 in lastProps) - (propKey$218 = lastProps[propKey$249]), - lastProps.hasOwnProperty(propKey$249) && - null != propKey$218 && - !nextProps.hasOwnProperty(propKey$249) && - setProp(domElement, tag, propKey$249, null, nextProps, propKey$218); + for (var propKey$253 in lastProps) + (propKey$222 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + null != propKey$222 && + !nextProps.hasOwnProperty(propKey$253) && + setProp(domElement, tag, propKey$253, null, nextProps, propKey$222); for (lastProp in nextProps) - (propKey$218 = nextProps[lastProp]), + (propKey$222 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$218 === propKey || - (null == propKey$218 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$218, nextProps, propKey); + propKey$222 === propKey || + (null == propKey$222 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$222, nextProps, propKey); } function noop$1() {} var Internals = { @@ -15775,17 +15765,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$257 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$258 = styles$257.get(type); - resource$258 || + var styles$261 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$262 = styles$261.get(type); + resource$262 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$258 = { + (resource$262 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$257.set(type, resource$258), + styles$261.set(type, resource$262), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -15800,9 +15790,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$258.state + resource$262.state )); - return resource$258; + return resource$262; } return null; case "script": @@ -15885,37 +15875,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$262 = hoistableRoot.querySelector( + var instance$266 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$262) + if (instance$266) return ( (resource.state.loading |= 4), - (resource.instance = instance$262), - markNodeAsHoistable(instance$262), - instance$262 + (resource.instance = instance$266), + markNodeAsHoistable(instance$266), + instance$266 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$262 = ( + instance$266 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$262); - var linkInstance = instance$262; + markNodeAsHoistable(instance$266); + var linkInstance = instance$266; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$262, "link", instance); + setInitialProperties(instance$266, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$262, props.precedence, hoistableRoot); - return (resource.instance = instance$262); + insertStylesheet(instance$266, props.precedence, hoistableRoot); + return (resource.instance = instance$266); case "script": - instance$262 = getScriptKey(props.src); + instance$266 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$262) + getScriptSelectorFromKey(instance$266) )) ) return ( @@ -15924,7 +15914,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$262))) + if ((styleProps = preloadPropsMap.get(instance$266))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16923,11 +16913,11 @@ function legacyCreateRootFromDOMContainer$1( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$283); + var instance = getPublicRootInstance(root$287); originalCallback.call(instance); }; } - var root$283 = createHydrationContainer( + var root$287 = createHydrationContainer( initialChildren, callback, container, @@ -16942,23 +16932,23 @@ function legacyCreateRootFromDOMContainer$1( null, null ); - container._reactRootContainer = root$283; - container[internalContainerInstanceKey] = root$283.current; + container._reactRootContainer = root$287; + container[internalContainerInstanceKey] = root$287.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$283; + return root$287; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$284 = callback; + var originalCallback$288 = callback; callback = function () { - var instance = getPublicRootInstance(root$285); - originalCallback$284.call(instance); + var instance = getPublicRootInstance(root$289); + originalCallback$288.call(instance); }; } - var root$285 = createFiberRoot( + var root$289 = createFiberRoot( container, 0, !1, @@ -16973,15 +16963,15 @@ function legacyCreateRootFromDOMContainer$1( null, null ); - container._reactRootContainer = root$285; - container[internalContainerInstanceKey] = root$285.current; + container._reactRootContainer = root$289; + container[internalContainerInstanceKey] = root$289.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$285, parentComponent, callback); + updateContainer(initialChildren, root$289, parentComponent, callback); }); - return root$285; + return root$289; } function legacyRenderSubtreeIntoContainer$1( parentComponent, @@ -17064,17 +17054,17 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1722 = { +var devToolsConfig$jscomp$inline_1718 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-74cf60c9", + version: "19.0.0-www-classic-fe506364", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2150 = { - bundleType: devToolsConfig$jscomp$inline_1722.bundleType, - version: devToolsConfig$jscomp$inline_1722.version, - rendererPackageName: devToolsConfig$jscomp$inline_1722.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1722.rendererConfig, +var internals$jscomp$inline_2143 = { + bundleType: devToolsConfig$jscomp$inline_1718.bundleType, + version: devToolsConfig$jscomp$inline_1718.version, + rendererPackageName: devToolsConfig$jscomp$inline_1718.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1718.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17090,26 +17080,26 @@ var internals$jscomp$inline_2150 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1722.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1718.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-74cf60c9" + reconcilerVersion: "19.0.0-www-classic-fe506364" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2151 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2144 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2151.isDisabled && - hook$jscomp$inline_2151.supportsFiber + !hook$jscomp$inline_2144.isDisabled && + hook$jscomp$inline_2144.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2151.inject( - internals$jscomp$inline_2150 + (rendererID = hook$jscomp$inline_2144.inject( + internals$jscomp$inline_2143 )), - (injectedHook = hook$jscomp$inline_2151); + (injectedHook = hook$jscomp$inline_2144); } catch (err) {} } var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -17145,11 +17135,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$287); + var instance = getPublicRootInstance(root$291); originalCallback.call(instance); }; } - var root$287 = createHydrationContainer( + var root$291 = createHydrationContainer( initialChildren, callback, container, @@ -17164,23 +17154,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$287; - container[internalContainerInstanceKey] = root$287.current; + container._reactRootContainer = root$291; + container[internalContainerInstanceKey] = root$291.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$287; + return root$291; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$288 = callback; + var originalCallback$292 = callback; callback = function () { - var instance = getPublicRootInstance(root$289); - originalCallback$288.call(instance); + var instance = getPublicRootInstance(root$293); + originalCallback$292.call(instance); }; } - var root$289 = createFiberRoot( + var root$293 = createFiberRoot( container, 0, !1, @@ -17195,15 +17185,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$289; - container[internalContainerInstanceKey] = root$289.current; + container._reactRootContainer = root$293; + container[internalContainerInstanceKey] = root$293.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$289, parentComponent, callback); + updateContainer(initialChildren, root$293, parentComponent, callback); }); - return root$289; + return root$293; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17547,4 +17537,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-74cf60c9"; +exports.version = "19.0.0-www-classic-fe506364"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 9032295ada..6e32524b31 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -841,7 +841,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber; case 11: @@ -4817,12 +4816,15 @@ function markSuspenseBoundaryShouldCapture( : ((suspenseBoundary.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)), suspenseBoundary ); @@ -5098,10 +5100,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$71 = workInProgress.stateNode; + root$72 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$71.incompleteTransitions.has(transition)) { + if (!root$72.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5109,11 +5111,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$71.incompleteTransitions.set(transition, markerInstance); + root$72.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$71.incompleteTransitions.forEach(function (markerInstance) { + root$72.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6445,104 +6447,90 @@ function beginWork(current, workInProgress, renderLanes) { pushTreeId(workInProgress, treeForkCount, workInProgress.index); workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - prepareToReadContext(workInProgress, renderLanes); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - void 0, - renderLanes - ); - Component = checkDidRenderIdHook(); - workInProgress.flags |= 1; - workInProgress.tag = 0; - isHydrating && Component && pushMaterializedTreeId(workInProgress); - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - var init = Component._init; - Component = init(Component._payload); - workInProgress.type = Component; - init = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (init) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error(formatProdErrorMessage(306, elementType, "")); } - throw Error(formatProdErrorMessage(306, Component, "")); } return workInProgress; case 0: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) @@ -6556,7 +6544,7 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error(formatProdErrorMessage(387)); init = workInProgress.pendingProps; var prevState = workInProgress.memoizedState; - Component = prevState.element; + elementType = prevState.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, init, null, renderLanes); var nextState = workInProgress.memoizedState; @@ -6580,7 +6568,7 @@ function beginWork(current, workInProgress, renderLanes) { (workInProgress.memoizedState = prevState), workInProgress.flags & 256) ) { - Component = createCapturedValueAtFiber( + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(423)), workInProgress ); @@ -6589,11 +6577,11 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, init, renderLanes, - Component + elementType ); break a; - } else if (init !== Component) { - Component = createCapturedValueAtFiber( + } else if (init !== elementType) { + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); @@ -6602,7 +6590,7 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, init, renderLanes, - Component + elementType ); break a; } else @@ -6628,7 +6616,7 @@ function beginWork(current, workInProgress, renderLanes) { (renderLanes = renderLanes.sibling); else { resetHydrationState(); - if (init === Component) { + if (init === elementType) { workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -6655,14 +6643,14 @@ function beginWork(current, workInProgress, renderLanes) { null !== renderLanes || ((renderLanes = workInProgress.type), (current = workInProgress.pendingProps), - (Component = getOwnerDocumentFromRootContainer( + (elementType = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current ).createElement(renderLanes)), - (Component[internalInstanceKey] = workInProgress), - (Component[internalPropsKey] = current), - setInitialProperties(Component, renderLanes, current), - markNodeAsHoistable(Component), - (workInProgress.stateNode = Component)), + (elementType[internalInstanceKey] = workInProgress), + (elementType[internalPropsKey] = current), + setInitialProperties(elementType, renderLanes, current), + markNodeAsHoistable(elementType), + (workInProgress.stateNode = elementType)), null ); case 27: @@ -6670,7 +6658,7 @@ function beginWork(current, workInProgress, renderLanes) { pushHostContext(workInProgress), null === current && isHydrating && - ((Component = workInProgress.stateNode = + ((elementType = workInProgress.stateNode = resolveSingletonInstance( workInProgress.type, workInProgress.pendingProps, @@ -6678,14 +6666,14 @@ function beginWork(current, workInProgress, renderLanes) { )), (hydrationParentFiber = workInProgress), (rootOrSingletonContext = !0), - (nextHydratableInstance = getNextHydratable(Component.firstChild))), - (Component = workInProgress.pendingProps.children), + (nextHydratableInstance = getNextHydratable(elementType.firstChild))), + (elementType = workInProgress.pendingProps.children), null !== current || isHydrating - ? reconcileChildren(current, workInProgress, Component, renderLanes) + ? reconcileChildren(current, workInProgress, elementType, renderLanes) : (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )), markRef(current, workInProgress), @@ -6693,18 +6681,18 @@ function beginWork(current, workInProgress, renderLanes) { ); case 5: if (null === current && isHydrating) { - if ((init = Component = nextHydratableInstance)) - (Component = canHydrateInstance( - Component, + if ((init = elementType = nextHydratableInstance)) + (elementType = canHydrateInstance( + elementType, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext )), - null !== Component - ? ((workInProgress.stateNode = Component), + null !== elementType + ? ((workInProgress.stateNode = elementType), (hydrationParentFiber = workInProgress), (nextHydratableInstance = getNextHydratable( - Component.firstChild + elementType.firstChild )), (rootOrSingletonContext = !1), (init = !0)) @@ -6715,9 +6703,9 @@ function beginWork(current, workInProgress, renderLanes) { init = workInProgress.type; prevState = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; - Component = prevState.children; + elementType = prevState.children; shouldSetTextContent(init, prevState) - ? (Component = null) + ? (elementType = null) : null !== nextState && shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); @@ -6741,7 +6729,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes ))); markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: if (null === current && isHydrating) { @@ -6768,26 +6756,37 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), - updateForwardRef(current, workInProgress, Component, init, renderLanes) + : resolveDefaultProps(elementType, init)), + updateForwardRef( + current, + workInProgress, + elementType, + init, + renderLanes + ) ); case 7: return ( @@ -6821,13 +6820,13 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = init.value; - pushProvider(workInProgress, Component, nextState); + pushProvider(workInProgress, elementType, nextState); if (!enableLazyContextPropagation && null !== prevState) if (objectIs(prevState.value, nextState)) { if (prevState.children === init.children) { @@ -6838,7 +6837,8 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); + } else + propagateContextChange(workInProgress, elementType, renderLanes); reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } @@ -6848,23 +6848,23 @@ function beginWork(current, workInProgress, renderLanes) { (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), - (Component = Component(init)), + (elementType = elementType(init)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (init = resolveDefaultProps(Component, workInProgress.pendingProps)), - (init = resolveDefaultProps(Component.type, init)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) @@ -6879,33 +6879,51 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, init), - mountClassInstance(workInProgress, Component, init, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, !1, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: return ( - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 22: @@ -6915,7 +6933,7 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), null === init && @@ -6925,7 +6943,10 @@ function beginWork(current, workInProgress, renderLanes) { prevState.refCount++, null !== prevState && (init.pooledCacheLanes |= renderLanes), (init = prevState)), - (workInProgress.memoizedState = { parent: Component, cache: init }), + (workInProgress.memoizedState = { + parent: elementType, + cache: init + }), initializeUpdateQueue(workInProgress), pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && @@ -6934,17 +6955,17 @@ function beginWork(current, workInProgress, renderLanes) { suspendIfUpdateReadFromEntangledAsyncAction()), (init = current.memoizedState), (prevState = workInProgress.memoizedState), - init.parent !== Component - ? ((init = { parent: Component, cache: Component }), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = init), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = prevState.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== init.cache && + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = prevState.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -6963,22 +6984,22 @@ function beginWork(current, workInProgress, renderLanes) { return ( enableTransitionTracing ? (null === current && - ((Component = enableTransitionTracing + ((elementType = enableTransitionTracing ? transitionStack.current : null), - null !== Component && - ((Component = { + null !== elementType && + ((elementType = { tag: 1, - transitions: new Set(Component), + transitions: new Set(elementType), pendingBoundaries: null, name: workInProgress.pendingProps.name, aborts: null }), - (workInProgress.stateNode = Component), + (workInProgress.stateNode = elementType), (workInProgress.flags |= 2048))), - (Component = workInProgress.stateNode), - null !== Component && - pushMarkerInstance(workInProgress, Component), + (elementType = workInProgress.stateNode), + null !== elementType && + pushMarkerInstance(workInProgress, elementType), reconcileChildren( current, workInProgress, @@ -7490,14 +7511,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$110 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$110 = lastTailNode), + for (var lastTailNode$114 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$114 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$110 + null === lastTailNode$114 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$110.sibling = null); + : (lastTailNode$114.sibling = null); } } function bubbleProperties(completedWork) { @@ -7507,19 +7528,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$111 = completedWork.child; null !== child$111; ) - (newChildLanes |= child$111.lanes | child$111.childLanes), - (subtreeFlags |= child$111.subtreeFlags & 31457280), - (subtreeFlags |= child$111.flags & 31457280), - (child$111.return = completedWork), - (child$111 = child$111.sibling); + for (var child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags & 31457280), + (subtreeFlags |= child$115.flags & 31457280), + (child$115.return = completedWork), + (child$115 = child$115.sibling); else - for (child$111 = completedWork.child; null !== child$111; ) - (newChildLanes |= child$111.lanes | child$111.childLanes), - (subtreeFlags |= child$111.subtreeFlags), - (subtreeFlags |= child$111.flags), - (child$111.return = completedWork), - (child$111 = child$111.sibling); + for (child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags), + (subtreeFlags |= child$115.flags), + (child$115.return = completedWork), + (child$115 = child$115.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7528,10 +7549,10 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -7829,11 +7850,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$123 = null; + var cache$127 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$123 = newProps.memoizedState.cachePool.pool); - cache$123 !== currentResource && (newProps.flags |= 2048); + (cache$127 = newProps.memoizedState.cachePool.pool); + cache$127 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7870,8 +7891,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$123 = currentResource.rendering; - if (null === cache$123) + cache$127 = currentResource.rendering; + if (null === cache$127) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -7879,11 +7900,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$123 = findFirstSuspended(current); - if (null !== cache$123) { + cache$127 = findFirstSuspended(current); + if (null !== cache$127) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$123.updateQueue; + current = cache$127.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7908,7 +7929,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$123)), null !== current)) { + if (((current = findFirstSuspended(cache$127)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7918,7 +7939,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$123.alternate && + !cache$127.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7931,13 +7952,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$123.sibling = workInProgress.child), - (workInProgress.child = cache$123)) + ? ((cache$127.sibling = workInProgress.child), + (workInProgress.child = cache$127)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$123) - : (workInProgress.child = cache$123), - (currentResource.last = cache$123)); + ? (current.sibling = cache$127) + : (workInProgress.child = cache$127), + (currentResource.last = cache$127)); } if (null !== currentResource.tail) return ( @@ -8193,8 +8214,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$140) { - captureCommitPhaseError(current, nearestMountedAncestor, error$140); + } catch (error$144) { + captureCommitPhaseError(current, nearestMountedAncestor, error$144); } else ref.current = null; } @@ -8231,7 +8252,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$196) { + } catch (e$200) { JSCompiler_temp = null; break a; } @@ -8510,11 +8531,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$142) { + } catch (error$146) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$142 + error$146 ); } } @@ -9194,8 +9215,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$155) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$155); + } catch (error$159) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$159); } } break; @@ -9367,11 +9388,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$156) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$156 + error$160 ); } } @@ -9409,8 +9430,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$157) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$157); + } catch (error$161) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$161); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9421,8 +9442,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$160) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$160); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } } break; @@ -9436,8 +9457,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$161) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$161); + } catch (error$165) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$165); } } break; @@ -9451,8 +9472,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } break; case 4: @@ -9482,8 +9503,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$164) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$164); + } catch (error$168) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$168); } current = finishedWork.updateQueue; null !== current && @@ -9561,11 +9582,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$145) { + } catch (error$149) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$145 + error$149 ); } } else if ( @@ -9640,21 +9661,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$146 = JSCompiler_inline_result.stateNode; + var parent$150 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$146, ""), + (setTextContent(parent$150, ""), (JSCompiler_inline_result.flags &= -33)); - var before$147 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$147, parent$146); + var before$151 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$151, parent$150); break; case 3: case 4: - var parent$148 = JSCompiler_inline_result.stateNode.containerInfo, - before$149 = getHostSibling(finishedWork); + var parent$152 = JSCompiler_inline_result.stateNode.containerInfo, + before$153 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$149, - parent$148 + before$153, + parent$152 ); break; default: @@ -10124,9 +10145,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$171 = finishedWork.stateNode; + var instance$175 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$171._visibility & 4 + ? instance$175._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10139,7 +10160,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$171._visibility |= 4), + : ((instance$175._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10147,7 +10168,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$171._visibility |= 4), + : ((instance$175._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10160,7 +10181,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$171 + instance$175 ); break; case 24: @@ -11130,8 +11151,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$179) { - handleThrow(root, thrownValue$179); + } catch (thrownValue$183) { + handleThrow(root, thrownValue$183); } while (1); lanes && root.shellSuspendCounter++; @@ -11236,8 +11257,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$181) { - handleThrow(root, thrownValue$181); + } catch (thrownValue$185) { + handleThrow(root, thrownValue$185); } while (1); resetContextDependencies(); @@ -11263,8 +11284,6 @@ function performUnitOfWork(unitOfWork) { function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -11462,12 +11481,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$185 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$189 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$185 && + shouldFireAfterActiveInstanceBlur$189 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11539,7 +11558,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$186 = rootWithPendingPassiveEffects, + var root$190 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11555,7 +11574,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$186, remainingLanes); + releaseRootPooledCache(root$190, remainingLanes); } } return !1; @@ -11760,16 +11779,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -11847,7 +11856,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) @@ -12165,12 +12174,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$188 = fiber.stateNode; - if (root$188.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$188.pendingLanes); + var root$192 = fiber.stateNode; + if (root$192.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$192.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$188, lanes), - ensureRootIsScheduled(root$188), + (upgradePendingLanesToSync(root$192, lanes), + ensureRootIsScheduled(root$192), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13396,19 +13405,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$340; + var JSCompiler_inline_result$jscomp$344; if (canUseDOM) { - var isSupported$jscomp$inline_1484 = "oninput" in document; - if (!isSupported$jscomp$inline_1484) { - var element$jscomp$inline_1485 = document.createElement("div"); - element$jscomp$inline_1485.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1484 = - "function" === typeof element$jscomp$inline_1485.oninput; + var isSupported$jscomp$inline_1481 = "oninput" in document; + if (!isSupported$jscomp$inline_1481) { + var element$jscomp$inline_1482 = document.createElement("div"); + element$jscomp$inline_1482.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1481 = + "function" === typeof element$jscomp$inline_1482.oninput; } - JSCompiler_inline_result$jscomp$340 = isSupported$jscomp$inline_1484; - } else JSCompiler_inline_result$jscomp$340 = !1; + JSCompiler_inline_result$jscomp$344 = isSupported$jscomp$inline_1481; + } else JSCompiler_inline_result$jscomp$344 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$340 && + JSCompiler_inline_result$jscomp$344 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13717,20 +13726,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1525 = 0; - i$jscomp$inline_1525 < simpleEventPluginEvents.length; - i$jscomp$inline_1525++ + var i$jscomp$inline_1522 = 0; + i$jscomp$inline_1522 < simpleEventPluginEvents.length; + i$jscomp$inline_1522++ ) { - var eventName$jscomp$inline_1526 = - simpleEventPluginEvents[i$jscomp$inline_1525], - domEventName$jscomp$inline_1527 = - eventName$jscomp$inline_1526.toLowerCase(), - capitalizedEvent$jscomp$inline_1528 = - eventName$jscomp$inline_1526[0].toUpperCase() + - eventName$jscomp$inline_1526.slice(1); + var eventName$jscomp$inline_1523 = + simpleEventPluginEvents[i$jscomp$inline_1522], + domEventName$jscomp$inline_1524 = + eventName$jscomp$inline_1523.toLowerCase(), + capitalizedEvent$jscomp$inline_1525 = + eventName$jscomp$inline_1523[0].toUpperCase() + + eventName$jscomp$inline_1523.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1527, - "on" + capitalizedEvent$jscomp$inline_1528 + domEventName$jscomp$inline_1524, + "on" + capitalizedEvent$jscomp$inline_1525 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15201,14 +15210,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$223 in nextProps) { - var propKey = nextProps[propKey$223]; - lastProp = lastProps[propKey$223]; + for (var propKey$227 in nextProps) { + var propKey = nextProps[propKey$227]; + lastProp = lastProps[propKey$227]; if ( - nextProps.hasOwnProperty(propKey$223) && + nextProps.hasOwnProperty(propKey$227) && (null != propKey || null != lastProp) ) - switch (propKey$223) { + switch (propKey$227) { case "type": type = propKey; break; @@ -15237,7 +15246,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$223, + propKey$227, propKey, nextProps, lastProp @@ -15256,7 +15265,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$223 = null; + propKey = value = defaultValue = propKey$227 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15287,7 +15296,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$223 = type; + propKey$227 = type; break; case "defaultValue": defaultValue = type; @@ -15308,15 +15317,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$223 - ? updateOptions(domElement, !!lastProps, propKey$223, !1) + null != propKey$227 + ? updateOptions(domElement, !!lastProps, propKey$227, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$223 = null; + propKey = propKey$227 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15340,7 +15349,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$223 = name; + propKey$227 = name; break; case "defaultValue": propKey = name; @@ -15354,17 +15363,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$223, propKey); + updateTextarea(domElement, propKey$227, propKey); return; case "option": - for (var propKey$239 in lastProps) + for (var propKey$243 in lastProps) if ( - ((propKey$223 = lastProps[propKey$239]), - lastProps.hasOwnProperty(propKey$239) && - null != propKey$223 && - !nextProps.hasOwnProperty(propKey$239)) + ((propKey$227 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$243)) ) - switch (propKey$239) { + switch (propKey$243) { case "selected": domElement.selected = !1; break; @@ -15372,33 +15381,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$239, + propKey$243, null, nextProps, - propKey$223 + propKey$227 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$223 = nextProps[lastDefaultValue]), + ((propKey$227 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$223 !== propKey && - (null != propKey$223 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$223 && - "function" !== typeof propKey$223 && - "symbol" !== typeof propKey$223; + propKey$227 && + "function" !== typeof propKey$227 && + "symbol" !== typeof propKey$227; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$223, + propKey$227, nextProps, propKey ); @@ -15419,24 +15428,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$244 in lastProps) - (propKey$223 = lastProps[propKey$244]), - lastProps.hasOwnProperty(propKey$244) && - null != propKey$223 && - !nextProps.hasOwnProperty(propKey$244) && - setProp(domElement, tag, propKey$244, null, nextProps, propKey$223); + for (var propKey$248 in lastProps) + (propKey$227 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$248) && + setProp(domElement, tag, propKey$248, null, nextProps, propKey$227); for (checked in nextProps) if ( - ((propKey$223 = nextProps[checked]), + ((propKey$227 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$223 !== propKey && - (null != propKey$223 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$223) + if (null != propKey$227) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15444,7 +15453,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$223, + propKey$227, nextProps, propKey ); @@ -15452,49 +15461,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$249 in lastProps) - (propKey$223 = lastProps[propKey$249]), - lastProps.hasOwnProperty(propKey$249) && - void 0 !== propKey$223 && - !nextProps.hasOwnProperty(propKey$249) && + for (var propKey$253 in lastProps) + (propKey$227 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + void 0 !== propKey$227 && + !nextProps.hasOwnProperty(propKey$253) && setPropOnCustomElement( domElement, tag, - propKey$249, + propKey$253, void 0, nextProps, - propKey$223 + propKey$227 ); for (defaultChecked in nextProps) - (propKey$223 = nextProps[defaultChecked]), + (propKey$227 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$223 === propKey || - (void 0 === propKey$223 && void 0 === propKey) || + propKey$227 === propKey || + (void 0 === propKey$227 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$223, + propKey$227, nextProps, propKey ); return; } } - for (var propKey$254 in lastProps) - (propKey$223 = lastProps[propKey$254]), - lastProps.hasOwnProperty(propKey$254) && - null != propKey$223 && - !nextProps.hasOwnProperty(propKey$254) && - setProp(domElement, tag, propKey$254, null, nextProps, propKey$223); + for (var propKey$258 in lastProps) + (propKey$227 = lastProps[propKey$258]), + lastProps.hasOwnProperty(propKey$258) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$258) && + setProp(domElement, tag, propKey$258, null, nextProps, propKey$227); for (lastProp in nextProps) - (propKey$223 = nextProps[lastProp]), + (propKey$227 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$223 === propKey || - (null == propKey$223 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$223, nextProps, propKey); + propKey$227 === propKey || + (null == propKey$227 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$227, nextProps, propKey); } var ReactDOMCurrentDispatcher$1 = Internals.ReactDOMCurrentDispatcher, eventsEnabled = null, @@ -16052,17 +16061,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$262 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$263 = styles$262.get(type); - resource$263 || + var styles$266 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$267 = styles$266.get(type); + resource$267 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$263 = { + (resource$267 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$262.set(type, resource$263), + styles$266.set(type, resource$267), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16077,9 +16086,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$263.state + resource$267.state )); - return resource$263; + return resource$267; } return null; case "script": @@ -16162,37 +16171,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$267 = hoistableRoot.querySelector( + var instance$271 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$267) + if (instance$271) return ( (resource.state.loading |= 4), - (resource.instance = instance$267), - markNodeAsHoistable(instance$267), - instance$267 + (resource.instance = instance$271), + markNodeAsHoistable(instance$271), + instance$271 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$267 = ( + instance$271 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$267); - var linkInstance = instance$267; + markNodeAsHoistable(instance$271); + var linkInstance = instance$271; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$267, "link", instance); + setInitialProperties(instance$271, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$267, props.precedence, hoistableRoot); - return (resource.instance = instance$267); + insertStylesheet(instance$271, props.precedence, hoistableRoot); + return (resource.instance = instance$271); case "script": - instance$267 = getScriptKey(props.src); + instance$271 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$267) + getScriptSelectorFromKey(instance$271) )) ) return ( @@ -16201,7 +16210,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$267))) + if ((styleProps = preloadPropsMap.get(instance$271))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16580,17 +16589,17 @@ Internals.Events = [ restoreStateIfNeeded, unstable_batchedUpdates ]; -var devToolsConfig$jscomp$inline_1683 = { +var devToolsConfig$jscomp$inline_1680 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-51569d18", + version: "19.0.0-www-modern-efc3a4a0", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2112 = { - bundleType: devToolsConfig$jscomp$inline_1683.bundleType, - version: devToolsConfig$jscomp$inline_1683.version, - rendererPackageName: devToolsConfig$jscomp$inline_1683.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1683.rendererConfig, +var internals$jscomp$inline_2106 = { + bundleType: devToolsConfig$jscomp$inline_1680.bundleType, + version: devToolsConfig$jscomp$inline_1680.version, + rendererPackageName: devToolsConfig$jscomp$inline_1680.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1680.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -16606,26 +16615,26 @@ var internals$jscomp$inline_2112 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1683.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1680.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-51569d18" + reconcilerVersion: "19.0.0-www-modern-efc3a4a0" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2113 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2107 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2113.isDisabled && - hook$jscomp$inline_2113.supportsFiber + !hook$jscomp$inline_2107.isDisabled && + hook$jscomp$inline_2107.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2113.inject( - internals$jscomp$inline_2112 + (rendererID = hook$jscomp$inline_2107.inject( + internals$jscomp$inline_2106 )), - (injectedHook = hook$jscomp$inline_2113); + (injectedHook = hook$jscomp$inline_2107); } catch (err) {} } var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -16916,4 +16925,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-51569d18"; +exports.version = "19.0.0-www-modern-efc3a4a0"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 006544b555..7ec42b3837 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -209,7 +209,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -1120,7 +1119,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber; case 11: @@ -5139,12 +5137,15 @@ function markSuspenseBoundaryShouldCapture( : ((suspenseBoundary.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)), suspenseBoundary ); @@ -5421,10 +5422,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$76 = workInProgress.stateNode; + root$77 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$76.incompleteTransitions.has(transition)) { + if (!root$77.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5432,11 +5433,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$76.incompleteTransitions.set(transition, markerInstance); + root$77.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$76.incompleteTransitions.forEach(function (markerInstance) { + root$77.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6840,111 +6841,91 @@ function beginWork(current, workInProgress, renderLanes) { pushTreeId(workInProgress, treeForkCount, workInProgress.index); workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor.current - ); - prepareToReadContext(workInProgress, renderLanes); - enableSchedulingProfiler && markComponentRenderStarted(workInProgress); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - Component = checkDidRenderIdHook(); - enableSchedulingProfiler && markComponentRenderStopped(); - workInProgress.flags |= 1; - workInProgress.tag = 0; - isHydrating && Component && pushMaterializedTreeId(workInProgress); - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error(formatProdErrorMessage(306, elementType, "")); } - throw Error(formatProdErrorMessage(306, Component, "")); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6952,25 +6933,25 @@ function beginWork(current, workInProgress, renderLanes) { a: { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; var prevState = workInProgress.memoizedState; - Component = prevState.element; + elementType = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, context, null, renderLanes); + processUpdateQueue(workInProgress, init, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - context = nextState.cache; - pushProvider(workInProgress, CacheContext, context); - context !== prevState.cache && + init = nextState.cache; + pushProvider(workInProgress, CacheContext, init); + init !== prevState.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextState.element; + init = nextState.element; if (prevState.isDehydrated) if ( ((prevState = { - element: context, + element: init, isDehydrated: !1, cache: nextState.cache }), @@ -6978,29 +6959,29 @@ function beginWork(current, workInProgress, renderLanes) { (workInProgress.memoizedState = prevState), workInProgress.flags & 256) ) { - Component = createCapturedValueAtFiber( + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(423)), workInProgress ); workInProgress = mountHostRootWithoutHydrating( current, workInProgress, - context, + init, renderLanes, - Component + elementType ); break a; - } else if (context !== Component) { - Component = createCapturedValueAtFiber( + } else if (init !== elementType) { + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); workInProgress = mountHostRootWithoutHydrating( current, workInProgress, - context, + init, renderLanes, - Component + elementType ); break a; } else @@ -7015,7 +6996,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes = mountChildFibers( workInProgress, null, - context, + init, renderLanes ), workInProgress.child = renderLanes; @@ -7026,7 +7007,7 @@ function beginWork(current, workInProgress, renderLanes) { (renderLanes = renderLanes.sibling); else { resetHydrationState(); - if (context === Component) { + if (init === elementType) { workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -7034,7 +7015,7 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - reconcileChildren(current, workInProgress, context, renderLanes); + reconcileChildren(current, workInProgress, init, renderLanes); } workInProgress = workInProgress.child; } @@ -7053,14 +7034,14 @@ function beginWork(current, workInProgress, renderLanes) { null !== renderLanes || ((renderLanes = workInProgress.type), (current = workInProgress.pendingProps), - (Component = getOwnerDocumentFromRootContainer( + (elementType = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current ).createElement(renderLanes)), - (Component[internalInstanceKey] = workInProgress), - (Component[internalPropsKey] = current), - setInitialProperties(Component, renderLanes, current), - markNodeAsHoistable(Component), - (workInProgress.stateNode = Component)), + (elementType[internalInstanceKey] = workInProgress), + (elementType[internalPropsKey] = current), + setInitialProperties(elementType, renderLanes, current), + markNodeAsHoistable(elementType), + (workInProgress.stateNode = elementType)), null ); case 27: @@ -7068,7 +7049,7 @@ function beginWork(current, workInProgress, renderLanes) { pushHostContext(workInProgress), null === current && isHydrating && - ((Component = workInProgress.stateNode = + ((elementType = workInProgress.stateNode = resolveSingletonInstance( workInProgress.type, workInProgress.pendingProps, @@ -7076,14 +7057,14 @@ function beginWork(current, workInProgress, renderLanes) { )), (hydrationParentFiber = workInProgress), (rootOrSingletonContext = !0), - (nextHydratableInstance = getNextHydratable(Component.firstChild))), - (Component = workInProgress.pendingProps.children), + (nextHydratableInstance = getNextHydratable(elementType.firstChild))), + (elementType = workInProgress.pendingProps.children), null !== current || isHydrating - ? reconcileChildren(current, workInProgress, Component, renderLanes) + ? reconcileChildren(current, workInProgress, elementType, renderLanes) : (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )), markRef(current, workInProgress), @@ -7091,36 +7072,36 @@ function beginWork(current, workInProgress, renderLanes) { ); case 5: if (null === current && isHydrating) { - if ((context = Component = nextHydratableInstance)) - (Component = canHydrateInstance( - Component, + if ((init = elementType = nextHydratableInstance)) + (elementType = canHydrateInstance( + elementType, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext )), - null !== Component - ? ((workInProgress.stateNode = Component), + null !== elementType + ? ((workInProgress.stateNode = elementType), (hydrationParentFiber = workInProgress), (nextHydratableInstance = getNextHydratable( - Component.firstChild + elementType.firstChild )), (rootOrSingletonContext = !1), - (context = !0)) - : (context = !1); - context || throwOnHydrationMismatch(); + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(); } pushHostContext(workInProgress); - context = workInProgress.type; + init = workInProgress.type; prevState = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; - Component = prevState.children; - shouldSetTextContent(context, prevState) - ? (Component = null) + elementType = prevState.children; + shouldSetTextContent(init, prevState) + ? (elementType = null) : null !== nextState && - shouldSetTextContent(context, nextState) && + shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); null !== workInProgress.memoizedState && - ((context = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -7128,18 +7109,18 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = context), + (HostTransitionContext._currentValue = init), enableLazyContextPropagation || (didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, renderLanes ))); markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: if (null === current && isHydrating) { @@ -7166,30 +7147,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -7216,9 +7202,9 @@ function beginWork(current, workInProgress, renderLanes) { case 12: return ( (workInProgress.flags |= 4), - (Component = workInProgress.stateNode), - (Component.effectDuration = 0), - (Component.passiveEffectDuration = 0), + (elementType = workInProgress.stateNode), + (elementType.effectDuration = 0), + (elementType.passiveEffectDuration = 0), reconcileChildren( current, workInProgress, @@ -7229,17 +7215,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; - nextState = context.value; - pushProvider(workInProgress, Component, nextState); + nextState = init.value; + pushProvider(workInProgress, elementType, nextState); if (!enableLazyContextPropagation && null !== prevState) if (objectIs(prevState.value, nextState)) { if ( - prevState.children === context.children && + prevState.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -7249,41 +7235,37 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), + (init = readContext(init)), enableSchedulingProfiler && markComponentRenderStarted(workInProgress), - (Component = Component(context)), + (elementType = elementType(init)), enableSchedulingProfiler && markComponentRenderStopped(), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -7297,36 +7279,54 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: return ( - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 22: @@ -7336,39 +7336,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (prevState = createCache()), - (context.pooledCache = prevState), + (init.pooledCache = prevState), prevState.refCount++, - null !== prevState && (context.pooledCacheLanes |= renderLanes), - (context = prevState)), + null !== prevState && (init.pooledCacheLanes |= renderLanes), + (init = prevState)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (prevState = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = prevState.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = prevState.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -7387,22 +7387,22 @@ function beginWork(current, workInProgress, renderLanes) { return ( enableTransitionTracing ? (null === current && - ((Component = enableTransitionTracing + ((elementType = enableTransitionTracing ? transitionStack.current : null), - null !== Component && - ((Component = { + null !== elementType && + ((elementType = { tag: 1, - transitions: new Set(Component), + transitions: new Set(elementType), pendingBoundaries: null, name: workInProgress.pendingProps.name, aborts: null }), - (workInProgress.stateNode = Component), + (workInProgress.stateNode = elementType), (workInProgress.flags |= 2048))), - (Component = workInProgress.stateNode), - null !== Component && - pushMarkerInstance(workInProgress, Component), + (elementType = workInProgress.stateNode), + null !== elementType && + pushMarkerInstance(workInProgress, elementType), reconcileChildren( current, workInProgress, @@ -7914,14 +7914,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$116 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$116 = lastTailNode), + for (var lastTailNode$120 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$120 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$116 + null === lastTailNode$120 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$116.sibling = null); + : (lastTailNode$120.sibling = null); } } function bubbleProperties(completedWork) { @@ -7933,53 +7933,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$118 = completedWork.selfBaseDuration, - child$119 = completedWork.child; - null !== child$119; + var treeBaseDuration$122 = completedWork.selfBaseDuration, + child$123 = completedWork.child; + null !== child$123; ) - (newChildLanes |= child$119.lanes | child$119.childLanes), - (subtreeFlags |= child$119.subtreeFlags & 31457280), - (subtreeFlags |= child$119.flags & 31457280), - (treeBaseDuration$118 += child$119.treeBaseDuration), - (child$119 = child$119.sibling); - completedWork.treeBaseDuration = treeBaseDuration$118; + (newChildLanes |= child$123.lanes | child$123.childLanes), + (subtreeFlags |= child$123.subtreeFlags & 31457280), + (subtreeFlags |= child$123.flags & 31457280), + (treeBaseDuration$122 += child$123.treeBaseDuration), + (child$123 = child$123.sibling); + completedWork.treeBaseDuration = treeBaseDuration$122; } else for ( - treeBaseDuration$118 = completedWork.child; - null !== treeBaseDuration$118; + treeBaseDuration$122 = completedWork.child; + null !== treeBaseDuration$122; ) (newChildLanes |= - treeBaseDuration$118.lanes | treeBaseDuration$118.childLanes), - (subtreeFlags |= treeBaseDuration$118.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$118.flags & 31457280), - (treeBaseDuration$118.return = completedWork), - (treeBaseDuration$118 = treeBaseDuration$118.sibling); + treeBaseDuration$122.lanes | treeBaseDuration$122.childLanes), + (subtreeFlags |= treeBaseDuration$122.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$122.flags & 31457280), + (treeBaseDuration$122.return = completedWork), + (treeBaseDuration$122 = treeBaseDuration$122.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$118 = completedWork.actualDuration; - child$119 = completedWork.selfBaseDuration; + treeBaseDuration$122 = completedWork.actualDuration; + child$123 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$118 += child.actualDuration), - (child$119 += child.treeBaseDuration), + (treeBaseDuration$122 += child.actualDuration), + (child$123 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$118; - completedWork.treeBaseDuration = child$119; + completedWork.actualDuration = treeBaseDuration$122; + completedWork.treeBaseDuration = child$123; } else for ( - treeBaseDuration$118 = completedWork.child; - null !== treeBaseDuration$118; + treeBaseDuration$122 = completedWork.child; + null !== treeBaseDuration$122; ) (newChildLanes |= - treeBaseDuration$118.lanes | treeBaseDuration$118.childLanes), - (subtreeFlags |= treeBaseDuration$118.subtreeFlags), - (subtreeFlags |= treeBaseDuration$118.flags), - (treeBaseDuration$118.return = completedWork), - (treeBaseDuration$118 = treeBaseDuration$118.sibling); + treeBaseDuration$122.lanes | treeBaseDuration$122.childLanes), + (subtreeFlags |= treeBaseDuration$122.subtreeFlags), + (subtreeFlags |= treeBaseDuration$122.flags), + (treeBaseDuration$122.return = completedWork), + (treeBaseDuration$122 = treeBaseDuration$122.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7988,10 +7988,10 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -8313,11 +8313,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$134 = null; + var cache$138 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$134 = newProps.memoizedState.cachePool.pool); - cache$134 !== currentResource && (newProps.flags |= 2048); + (cache$138 = newProps.memoizedState.cachePool.pool); + cache$138 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8363,8 +8363,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$134 = currentResource.rendering; - if (null === cache$134) + cache$138 = currentResource.rendering; + if (null === cache$138) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8372,11 +8372,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$134 = findFirstSuspended(current); - if (null !== cache$134) { + cache$138 = findFirstSuspended(current); + if (null !== cache$138) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$134.updateQueue; + current = cache$138.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8401,7 +8401,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$134)), null !== current)) { + if (((current = findFirstSuspended(cache$138)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8411,7 +8411,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$134.alternate && + !cache$138.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8424,13 +8424,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$134.sibling = workInProgress.child), - (workInProgress.child = cache$134)) + ? ((cache$138.sibling = workInProgress.child), + (workInProgress.child = cache$138)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$134) - : (workInProgress.child = cache$134), - (currentResource.last = cache$134)); + ? (current.sibling = cache$138) + : (workInProgress.child = cache$138), + (currentResource.last = cache$138)); } if (null !== currentResource.tail) return ( @@ -8738,8 +8738,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$152) { - captureCommitPhaseError(current, nearestMountedAncestor, error$152); + } catch (error$156) { + captureCommitPhaseError(current, nearestMountedAncestor, error$156); } else ref.current = null; } @@ -8776,7 +8776,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$212) { + } catch (e$216) { JSCompiler_temp = null; break a; } @@ -9033,11 +9033,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$154 = commitTime, + var commitTime$158 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$154); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$158); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -9064,8 +9064,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$156) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$156); + } catch (error$160) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$160); } } function commitClassCallbacks(finishedWork) { @@ -9164,11 +9164,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$157) { + } catch (error$161) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$161 ); } else { @@ -9185,11 +9185,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$158) { + } catch (error$162) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$162 ); } recordLayoutEffectDuration(finishedWork); @@ -9200,11 +9200,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$159) { + } catch (error$163) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$163 ); } } @@ -9910,22 +9910,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$174) { + } catch (error$178) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$174 + error$178 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$175) { + } catch (error$179) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$179 ); } } @@ -10098,11 +10098,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$176) { + } catch (error$180) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$180 ); } } @@ -10140,8 +10140,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$177) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$177); + } catch (error$181) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$181); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -10152,8 +10152,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$180) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$180); + } catch (error$184) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$184); } } break; @@ -10167,8 +10167,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$181) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$181); + } catch (error$185) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$185); } } break; @@ -10182,8 +10182,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$182) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$182); + } catch (error$186) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$186); } break; case 4: @@ -10213,8 +10213,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$184) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$184); + } catch (error$188) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$188); } current = finishedWork.updateQueue; null !== current && @@ -10292,11 +10292,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$164) { + } catch (error$168) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$164 + error$168 ); } } else if ( @@ -10371,21 +10371,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$165 = JSCompiler_inline_result.stateNode; + var parent$169 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$165, ""), + (setTextContent(parent$169, ""), (JSCompiler_inline_result.flags &= -33)); - var before$166 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$166, parent$165); + var before$170 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$170, parent$169); break; case 3: case 4: - var parent$167 = JSCompiler_inline_result.stateNode.containerInfo, - before$168 = getHostSibling(finishedWork); + var parent$171 = JSCompiler_inline_result.stateNode.containerInfo, + before$172 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$168, - parent$167 + before$172, + parent$171 ); break; default: @@ -10577,8 +10577,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$187) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$187); + } catch (error$191) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$191); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -10877,9 +10877,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$192 = finishedWork.stateNode; + var instance$196 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$192._visibility & 4 + ? instance$196._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10892,7 +10892,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$192._visibility |= 4), + : ((instance$196._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10900,7 +10900,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$192._visibility |= 4), + : ((instance$196._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10913,7 +10913,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$192 + instance$196 ); break; case 24: @@ -11958,8 +11958,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$200) { - handleThrow(root, thrownValue$200); + } catch (thrownValue$204) { + handleThrow(root, thrownValue$204); } while (1); lanes && root.shellSuspendCounter++; @@ -12075,8 +12075,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$202) { - handleThrow(root, thrownValue$202); + } catch (thrownValue$206) { + handleThrow(root, thrownValue$206); } while (1); resetContextDependencies(); @@ -12120,8 +12120,6 @@ function replaySuspendedUnitOfWork(unitOfWork) { isProfilingMode = 0 !== (unitOfWork.mode & 2); isProfilingMode && startProfilerTimer(unitOfWork); switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -12339,13 +12337,13 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$206 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$210 = commitBeforeMutationEffects( root, finishedWork ); commitTime = now(); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$206 && + shouldFireAfterActiveInstanceBlur$210 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12430,7 +12428,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$207 = rootWithPendingPassiveEffects, + var root$211 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -12446,7 +12444,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$207, remainingLanes); + releaseRootPooledCache(root$211, remainingLanes); } } return !1; @@ -12687,16 +12685,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -12782,7 +12770,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) @@ -13203,12 +13191,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$210 = fiber.stateNode; - if (root$210.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$210.pendingLanes); + var root$214 = fiber.stateNode; + if (root$214.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$214.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$210, lanes), - ensureRootIsScheduled(root$210), + (upgradePendingLanesToSync(root$214, lanes), + ensureRootIsScheduled(root$214), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now$1() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13774,19 +13762,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$366; + var JSCompiler_inline_result$jscomp$370; if (canUseDOM) { - var isSupported$jscomp$inline_1573 = "oninput" in document; - if (!isSupported$jscomp$inline_1573) { - var element$jscomp$inline_1574 = document.createElement("div"); - element$jscomp$inline_1574.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1573 = - "function" === typeof element$jscomp$inline_1574.oninput; + var isSupported$jscomp$inline_1569 = "oninput" in document; + if (!isSupported$jscomp$inline_1569) { + var element$jscomp$inline_1570 = document.createElement("div"); + element$jscomp$inline_1570.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1569 = + "function" === typeof element$jscomp$inline_1570.oninput; } - JSCompiler_inline_result$jscomp$366 = isSupported$jscomp$inline_1573; - } else JSCompiler_inline_result$jscomp$366 = !1; + JSCompiler_inline_result$jscomp$370 = isSupported$jscomp$inline_1569; + } else JSCompiler_inline_result$jscomp$370 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$366 && + JSCompiler_inline_result$jscomp$370 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14158,20 +14146,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1614 = 0; - i$jscomp$inline_1614 < simpleEventPluginEvents.length; - i$jscomp$inline_1614++ + var i$jscomp$inline_1610 = 0; + i$jscomp$inline_1610 < simpleEventPluginEvents.length; + i$jscomp$inline_1610++ ) { - var eventName$jscomp$inline_1615 = - simpleEventPluginEvents[i$jscomp$inline_1614], - domEventName$jscomp$inline_1616 = - eventName$jscomp$inline_1615.toLowerCase(), - capitalizedEvent$jscomp$inline_1617 = - eventName$jscomp$inline_1615[0].toUpperCase() + - eventName$jscomp$inline_1615.slice(1); + var eventName$jscomp$inline_1611 = + simpleEventPluginEvents[i$jscomp$inline_1610], + domEventName$jscomp$inline_1612 = + eventName$jscomp$inline_1611.toLowerCase(), + capitalizedEvent$jscomp$inline_1613 = + eventName$jscomp$inline_1611[0].toUpperCase() + + eventName$jscomp$inline_1611.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1616, - "on" + capitalizedEvent$jscomp$inline_1617 + domEventName$jscomp$inline_1612, + "on" + capitalizedEvent$jscomp$inline_1613 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15643,14 +15631,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$239 in nextProps) { - var propKey = nextProps[propKey$239]; - lastProp = lastProps[propKey$239]; + for (var propKey$243 in nextProps) { + var propKey = nextProps[propKey$243]; + lastProp = lastProps[propKey$243]; if ( - nextProps.hasOwnProperty(propKey$239) && + nextProps.hasOwnProperty(propKey$243) && (null != propKey || null != lastProp) ) - switch (propKey$239) { + switch (propKey$243) { case "type": type = propKey; break; @@ -15679,7 +15667,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$239, + propKey$243, propKey, nextProps, lastProp @@ -15698,7 +15686,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$239 = null; + propKey = value = defaultValue = propKey$243 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15729,7 +15717,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$239 = type; + propKey$243 = type; break; case "defaultValue": defaultValue = type; @@ -15750,15 +15738,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$239 - ? updateOptions(domElement, !!lastProps, propKey$239, !1) + null != propKey$243 + ? updateOptions(domElement, !!lastProps, propKey$243, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$239 = null; + propKey = propKey$243 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15782,7 +15770,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$239 = name; + propKey$243 = name; break; case "defaultValue": propKey = name; @@ -15796,17 +15784,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$239, propKey); + updateTextarea(domElement, propKey$243, propKey); return; case "option": - for (var propKey$255 in lastProps) + for (var propKey$259 in lastProps) if ( - ((propKey$239 = lastProps[propKey$255]), - lastProps.hasOwnProperty(propKey$255) && - null != propKey$239 && - !nextProps.hasOwnProperty(propKey$255)) + ((propKey$243 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + null != propKey$243 && + !nextProps.hasOwnProperty(propKey$259)) ) - switch (propKey$255) { + switch (propKey$259) { case "selected": domElement.selected = !1; break; @@ -15814,33 +15802,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$255, + propKey$259, null, nextProps, - propKey$239 + propKey$243 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$239 = nextProps[lastDefaultValue]), + ((propKey$243 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$239 !== propKey && - (null != propKey$239 || null != propKey)) + propKey$243 !== propKey && + (null != propKey$243 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$239 && - "function" !== typeof propKey$239 && - "symbol" !== typeof propKey$239; + propKey$243 && + "function" !== typeof propKey$243 && + "symbol" !== typeof propKey$243; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$239, + propKey$243, nextProps, propKey ); @@ -15861,24 +15849,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$260 in lastProps) - (propKey$239 = lastProps[propKey$260]), - lastProps.hasOwnProperty(propKey$260) && - null != propKey$239 && - !nextProps.hasOwnProperty(propKey$260) && - setProp(domElement, tag, propKey$260, null, nextProps, propKey$239); + for (var propKey$264 in lastProps) + (propKey$243 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$243 && + !nextProps.hasOwnProperty(propKey$264) && + setProp(domElement, tag, propKey$264, null, nextProps, propKey$243); for (checked in nextProps) if ( - ((propKey$239 = nextProps[checked]), + ((propKey$243 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$239 !== propKey && - (null != propKey$239 || null != propKey)) + propKey$243 !== propKey && + (null != propKey$243 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$239) + if (null != propKey$243) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15886,7 +15874,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$239, + propKey$243, nextProps, propKey ); @@ -15894,49 +15882,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$265 in lastProps) - (propKey$239 = lastProps[propKey$265]), - lastProps.hasOwnProperty(propKey$265) && - void 0 !== propKey$239 && - !nextProps.hasOwnProperty(propKey$265) && + for (var propKey$269 in lastProps) + (propKey$243 = lastProps[propKey$269]), + lastProps.hasOwnProperty(propKey$269) && + void 0 !== propKey$243 && + !nextProps.hasOwnProperty(propKey$269) && setPropOnCustomElement( domElement, tag, - propKey$265, + propKey$269, void 0, nextProps, - propKey$239 + propKey$243 ); for (defaultChecked in nextProps) - (propKey$239 = nextProps[defaultChecked]), + (propKey$243 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$239 === propKey || - (void 0 === propKey$239 && void 0 === propKey) || + propKey$243 === propKey || + (void 0 === propKey$243 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$239, + propKey$243, nextProps, propKey ); return; } } - for (var propKey$270 in lastProps) - (propKey$239 = lastProps[propKey$270]), - lastProps.hasOwnProperty(propKey$270) && - null != propKey$239 && - !nextProps.hasOwnProperty(propKey$270) && - setProp(domElement, tag, propKey$270, null, nextProps, propKey$239); + for (var propKey$274 in lastProps) + (propKey$243 = lastProps[propKey$274]), + lastProps.hasOwnProperty(propKey$274) && + null != propKey$243 && + !nextProps.hasOwnProperty(propKey$274) && + setProp(domElement, tag, propKey$274, null, nextProps, propKey$243); for (lastProp in nextProps) - (propKey$239 = nextProps[lastProp]), + (propKey$243 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$239 === propKey || - (null == propKey$239 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$239, nextProps, propKey); + propKey$243 === propKey || + (null == propKey$243 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$243, nextProps, propKey); } function noop$1() {} var Internals = { @@ -16525,17 +16513,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$278 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$279 = styles$278.get(type); - resource$279 || + var styles$282 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$283 = styles$282.get(type); + resource$283 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$279 = { + (resource$283 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$278.set(type, resource$279), + styles$282.set(type, resource$283), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16550,9 +16538,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$279.state + resource$283.state )); - return resource$279; + return resource$283; } return null; case "script": @@ -16635,37 +16623,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$283 = hoistableRoot.querySelector( + var instance$287 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$283) + if (instance$287) return ( (resource.state.loading |= 4), - (resource.instance = instance$283), - markNodeAsHoistable(instance$283), - instance$283 + (resource.instance = instance$287), + markNodeAsHoistable(instance$287), + instance$287 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$283 = ( + instance$287 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$283); - var linkInstance = instance$283; + markNodeAsHoistable(instance$287); + var linkInstance = instance$287; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$283, "link", instance); + setInitialProperties(instance$287, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$283, props.precedence, hoistableRoot); - return (resource.instance = instance$283); + insertStylesheet(instance$287, props.precedence, hoistableRoot); + return (resource.instance = instance$287); case "script": - instance$283 = getScriptKey(props.src); + instance$287 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$283) + getScriptSelectorFromKey(instance$287) )) ) return ( @@ -16674,7 +16662,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$283))) + if ((styleProps = preloadPropsMap.get(instance$287))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17673,11 +17661,11 @@ function legacyCreateRootFromDOMContainer$1( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$304); + var instance = getPublicRootInstance(root$308); originalCallback.call(instance); }; } - var root$304 = createHydrationContainer( + var root$308 = createHydrationContainer( initialChildren, callback, container, @@ -17692,23 +17680,23 @@ function legacyCreateRootFromDOMContainer$1( null, null ); - container._reactRootContainer = root$304; - container[internalContainerInstanceKey] = root$304.current; + container._reactRootContainer = root$308; + container[internalContainerInstanceKey] = root$308.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$304; + return root$308; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$305 = callback; + var originalCallback$309 = callback; callback = function () { - var instance = getPublicRootInstance(root$306); - originalCallback$305.call(instance); + var instance = getPublicRootInstance(root$310); + originalCallback$309.call(instance); }; } - var root$306 = createFiberRoot( + var root$310 = createFiberRoot( container, 0, !1, @@ -17723,15 +17711,15 @@ function legacyCreateRootFromDOMContainer$1( null, null ); - container._reactRootContainer = root$306; - container[internalContainerInstanceKey] = root$306.current; + container._reactRootContainer = root$310; + container[internalContainerInstanceKey] = root$310.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$306, parentComponent, callback); + updateContainer(initialChildren, root$310, parentComponent, callback); }); - return root$306; + return root$310; } function legacyRenderSubtreeIntoContainer$1( parentComponent, @@ -17814,10 +17802,10 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1808 = { +var devToolsConfig$jscomp$inline_1804 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-c8ce430f", + version: "19.0.0-www-classic-448692bf", rendererPackageName: "react-dom" }; (function (internals) { @@ -17835,10 +17823,10 @@ var devToolsConfig$jscomp$inline_1808 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1808.bundleType, - version: devToolsConfig$jscomp$inline_1808.version, - rendererPackageName: devToolsConfig$jscomp$inline_1808.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1808.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1804.bundleType, + version: devToolsConfig$jscomp$inline_1804.version, + rendererPackageName: devToolsConfig$jscomp$inline_1804.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1804.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17854,14 +17842,14 @@ var devToolsConfig$jscomp$inline_1808 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1808.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1804.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-c8ce430f" + reconcilerVersion: "19.0.0-www-classic-448692bf" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -17896,11 +17884,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$308); + var instance = getPublicRootInstance(root$312); originalCallback.call(instance); }; } - var root$308 = createHydrationContainer( + var root$312 = createHydrationContainer( initialChildren, callback, container, @@ -17915,23 +17903,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$308; - container[internalContainerInstanceKey] = root$308.current; + container._reactRootContainer = root$312; + container[internalContainerInstanceKey] = root$312.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$308; + return root$312; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$309 = callback; + var originalCallback$313 = callback; callback = function () { - var instance = getPublicRootInstance(root$310); - originalCallback$309.call(instance); + var instance = getPublicRootInstance(root$314); + originalCallback$313.call(instance); }; } - var root$310 = createFiberRoot( + var root$314 = createFiberRoot( container, 0, !1, @@ -17946,15 +17934,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$310; - container[internalContainerInstanceKey] = root$310.current; + container._reactRootContainer = root$314; + container[internalContainerInstanceKey] = root$314.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$310, parentComponent, callback); + updateContainer(initialChildren, root$314, parentComponent, callback); }); - return root$310; + return root$314; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -18298,7 +18286,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-c8ce430f"; +exports.version = "19.0.0-www-classic-448692bf"; "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 75d6e353dc..6366f2f3c2 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -977,7 +977,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber; case 11: @@ -5025,12 +5024,15 @@ function markSuspenseBoundaryShouldCapture( : ((suspenseBoundary.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)), suspenseBoundary ); @@ -5307,10 +5309,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$76 = workInProgress.stateNode; + root$77 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$76.incompleteTransitions.has(transition)) { + if (!root$77.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5318,11 +5320,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$76.incompleteTransitions.set(transition, markerInstance); + root$77.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$76.incompleteTransitions.forEach(function (markerInstance) { + root$77.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6681,106 +6683,90 @@ function beginWork(current, workInProgress, renderLanes) { pushTreeId(workInProgress, treeForkCount, workInProgress.index); workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - prepareToReadContext(workInProgress, renderLanes); - enableSchedulingProfiler && markComponentRenderStarted(workInProgress); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - void 0, - renderLanes - ); - Component = checkDidRenderIdHook(); - enableSchedulingProfiler && markComponentRenderStopped(); - workInProgress.flags |= 1; - workInProgress.tag = 0; - isHydrating && Component && pushMaterializedTreeId(workInProgress); - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - var init = Component._init; - Component = init(Component._payload); - workInProgress.type = Component; - init = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (init) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error(formatProdErrorMessage(306, elementType, "")); } - throw Error(formatProdErrorMessage(306, Component, "")); } return workInProgress; case 0: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) @@ -6794,7 +6780,7 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error(formatProdErrorMessage(387)); init = workInProgress.pendingProps; var prevState = workInProgress.memoizedState; - Component = prevState.element; + elementType = prevState.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, init, null, renderLanes); var nextState = workInProgress.memoizedState; @@ -6818,7 +6804,7 @@ function beginWork(current, workInProgress, renderLanes) { (workInProgress.memoizedState = prevState), workInProgress.flags & 256) ) { - Component = createCapturedValueAtFiber( + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(423)), workInProgress ); @@ -6827,11 +6813,11 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, init, renderLanes, - Component + elementType ); break a; - } else if (init !== Component) { - Component = createCapturedValueAtFiber( + } else if (init !== elementType) { + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); @@ -6840,7 +6826,7 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, init, renderLanes, - Component + elementType ); break a; } else @@ -6866,7 +6852,7 @@ function beginWork(current, workInProgress, renderLanes) { (renderLanes = renderLanes.sibling); else { resetHydrationState(); - if (init === Component) { + if (init === elementType) { workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -6893,14 +6879,14 @@ function beginWork(current, workInProgress, renderLanes) { null !== renderLanes || ((renderLanes = workInProgress.type), (current = workInProgress.pendingProps), - (Component = getOwnerDocumentFromRootContainer( + (elementType = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current ).createElement(renderLanes)), - (Component[internalInstanceKey] = workInProgress), - (Component[internalPropsKey] = current), - setInitialProperties(Component, renderLanes, current), - markNodeAsHoistable(Component), - (workInProgress.stateNode = Component)), + (elementType[internalInstanceKey] = workInProgress), + (elementType[internalPropsKey] = current), + setInitialProperties(elementType, renderLanes, current), + markNodeAsHoistable(elementType), + (workInProgress.stateNode = elementType)), null ); case 27: @@ -6908,7 +6894,7 @@ function beginWork(current, workInProgress, renderLanes) { pushHostContext(workInProgress), null === current && isHydrating && - ((Component = workInProgress.stateNode = + ((elementType = workInProgress.stateNode = resolveSingletonInstance( workInProgress.type, workInProgress.pendingProps, @@ -6916,14 +6902,14 @@ function beginWork(current, workInProgress, renderLanes) { )), (hydrationParentFiber = workInProgress), (rootOrSingletonContext = !0), - (nextHydratableInstance = getNextHydratable(Component.firstChild))), - (Component = workInProgress.pendingProps.children), + (nextHydratableInstance = getNextHydratable(elementType.firstChild))), + (elementType = workInProgress.pendingProps.children), null !== current || isHydrating - ? reconcileChildren(current, workInProgress, Component, renderLanes) + ? reconcileChildren(current, workInProgress, elementType, renderLanes) : (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )), markRef(current, workInProgress), @@ -6931,18 +6917,18 @@ function beginWork(current, workInProgress, renderLanes) { ); case 5: if (null === current && isHydrating) { - if ((init = Component = nextHydratableInstance)) - (Component = canHydrateInstance( - Component, + if ((init = elementType = nextHydratableInstance)) + (elementType = canHydrateInstance( + elementType, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext )), - null !== Component - ? ((workInProgress.stateNode = Component), + null !== elementType + ? ((workInProgress.stateNode = elementType), (hydrationParentFiber = workInProgress), (nextHydratableInstance = getNextHydratable( - Component.firstChild + elementType.firstChild )), (rootOrSingletonContext = !1), (init = !0)) @@ -6953,9 +6939,9 @@ function beginWork(current, workInProgress, renderLanes) { init = workInProgress.type; prevState = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; - Component = prevState.children; + elementType = prevState.children; shouldSetTextContent(init, prevState) - ? (Component = null) + ? (elementType = null) : null !== nextState && shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); @@ -6979,7 +6965,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes ))); markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: if (null === current && isHydrating) { @@ -7006,26 +6992,37 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), - updateForwardRef(current, workInProgress, Component, init, renderLanes) + : resolveDefaultProps(elementType, init)), + updateForwardRef( + current, + workInProgress, + elementType, + init, + renderLanes + ) ); case 7: return ( @@ -7050,9 +7047,9 @@ function beginWork(current, workInProgress, renderLanes) { case 12: return ( (workInProgress.flags |= 4), - (Component = workInProgress.stateNode), - (Component.effectDuration = 0), - (Component.passiveEffectDuration = 0), + (elementType = workInProgress.stateNode), + (elementType.effectDuration = 0), + (elementType.passiveEffectDuration = 0), reconcileChildren( current, workInProgress, @@ -7063,13 +7060,13 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = init.value; - pushProvider(workInProgress, Component, nextState); + pushProvider(workInProgress, elementType, nextState); if (!enableLazyContextPropagation && null !== prevState) if (objectIs(prevState.value, nextState)) { if (prevState.children === init.children) { @@ -7080,7 +7077,8 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); + } else + propagateContextChange(workInProgress, elementType, renderLanes); reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } @@ -7090,25 +7088,25 @@ function beginWork(current, workInProgress, renderLanes) { (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), enableSchedulingProfiler && markComponentRenderStarted(workInProgress), - (Component = Component(init)), + (elementType = elementType(init)), enableSchedulingProfiler && markComponentRenderStopped(), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (init = resolveDefaultProps(Component, workInProgress.pendingProps)), - (init = resolveDefaultProps(Component.type, init)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) @@ -7123,33 +7121,51 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, init), - mountClassInstance(workInProgress, Component, init, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, !1, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: return ( - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 22: @@ -7159,7 +7175,7 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), null === init && @@ -7169,7 +7185,10 @@ function beginWork(current, workInProgress, renderLanes) { prevState.refCount++, null !== prevState && (init.pooledCacheLanes |= renderLanes), (init = prevState)), - (workInProgress.memoizedState = { parent: Component, cache: init }), + (workInProgress.memoizedState = { + parent: elementType, + cache: init + }), initializeUpdateQueue(workInProgress), pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && @@ -7178,17 +7197,17 @@ function beginWork(current, workInProgress, renderLanes) { suspendIfUpdateReadFromEntangledAsyncAction()), (init = current.memoizedState), (prevState = workInProgress.memoizedState), - init.parent !== Component - ? ((init = { parent: Component, cache: Component }), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = init), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = prevState.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== init.cache && + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = prevState.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -7207,22 +7226,22 @@ function beginWork(current, workInProgress, renderLanes) { return ( enableTransitionTracing ? (null === current && - ((Component = enableTransitionTracing + ((elementType = enableTransitionTracing ? transitionStack.current : null), - null !== Component && - ((Component = { + null !== elementType && + ((elementType = { tag: 1, - transitions: new Set(Component), + transitions: new Set(elementType), pendingBoundaries: null, name: workInProgress.pendingProps.name, aborts: null }), - (workInProgress.stateNode = Component), + (workInProgress.stateNode = elementType), (workInProgress.flags |= 2048))), - (Component = workInProgress.stateNode), - null !== Component && - pushMarkerInstance(workInProgress, Component), + (elementType = workInProgress.stateNode), + null !== elementType && + pushMarkerInstance(workInProgress, elementType), reconcileChildren( current, workInProgress, @@ -7734,14 +7753,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$116 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$116 = lastTailNode), + for (var lastTailNode$120 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$120 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$116 + null === lastTailNode$120 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$116.sibling = null); + : (lastTailNode$120.sibling = null); } } function bubbleProperties(completedWork) { @@ -7753,53 +7772,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$118 = completedWork.selfBaseDuration, - child$119 = completedWork.child; - null !== child$119; + var treeBaseDuration$122 = completedWork.selfBaseDuration, + child$123 = completedWork.child; + null !== child$123; ) - (newChildLanes |= child$119.lanes | child$119.childLanes), - (subtreeFlags |= child$119.subtreeFlags & 31457280), - (subtreeFlags |= child$119.flags & 31457280), - (treeBaseDuration$118 += child$119.treeBaseDuration), - (child$119 = child$119.sibling); - completedWork.treeBaseDuration = treeBaseDuration$118; + (newChildLanes |= child$123.lanes | child$123.childLanes), + (subtreeFlags |= child$123.subtreeFlags & 31457280), + (subtreeFlags |= child$123.flags & 31457280), + (treeBaseDuration$122 += child$123.treeBaseDuration), + (child$123 = child$123.sibling); + completedWork.treeBaseDuration = treeBaseDuration$122; } else for ( - treeBaseDuration$118 = completedWork.child; - null !== treeBaseDuration$118; + treeBaseDuration$122 = completedWork.child; + null !== treeBaseDuration$122; ) (newChildLanes |= - treeBaseDuration$118.lanes | treeBaseDuration$118.childLanes), - (subtreeFlags |= treeBaseDuration$118.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$118.flags & 31457280), - (treeBaseDuration$118.return = completedWork), - (treeBaseDuration$118 = treeBaseDuration$118.sibling); + treeBaseDuration$122.lanes | treeBaseDuration$122.childLanes), + (subtreeFlags |= treeBaseDuration$122.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$122.flags & 31457280), + (treeBaseDuration$122.return = completedWork), + (treeBaseDuration$122 = treeBaseDuration$122.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$118 = completedWork.actualDuration; - child$119 = completedWork.selfBaseDuration; + treeBaseDuration$122 = completedWork.actualDuration; + child$123 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$118 += child.actualDuration), - (child$119 += child.treeBaseDuration), + (treeBaseDuration$122 += child.actualDuration), + (child$123 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$118; - completedWork.treeBaseDuration = child$119; + completedWork.actualDuration = treeBaseDuration$122; + completedWork.treeBaseDuration = child$123; } else for ( - treeBaseDuration$118 = completedWork.child; - null !== treeBaseDuration$118; + treeBaseDuration$122 = completedWork.child; + null !== treeBaseDuration$122; ) (newChildLanes |= - treeBaseDuration$118.lanes | treeBaseDuration$118.childLanes), - (subtreeFlags |= treeBaseDuration$118.subtreeFlags), - (subtreeFlags |= treeBaseDuration$118.flags), - (treeBaseDuration$118.return = completedWork), - (treeBaseDuration$118 = treeBaseDuration$118.sibling); + treeBaseDuration$122.lanes | treeBaseDuration$122.childLanes), + (subtreeFlags |= treeBaseDuration$122.subtreeFlags), + (subtreeFlags |= treeBaseDuration$122.flags), + (treeBaseDuration$122.return = completedWork), + (treeBaseDuration$122 = treeBaseDuration$122.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7808,10 +7827,10 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -8127,11 +8146,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$134 = null; + var cache$138 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$134 = newProps.memoizedState.cachePool.pool); - cache$134 !== currentResource && (newProps.flags |= 2048); + (cache$138 = newProps.memoizedState.cachePool.pool); + cache$138 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8173,8 +8192,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$134 = currentResource.rendering; - if (null === cache$134) + cache$138 = currentResource.rendering; + if (null === cache$138) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8182,11 +8201,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$134 = findFirstSuspended(current); - if (null !== cache$134) { + cache$138 = findFirstSuspended(current); + if (null !== cache$138) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$134.updateQueue; + current = cache$138.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8211,7 +8230,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$134)), null !== current)) { + if (((current = findFirstSuspended(cache$138)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8221,7 +8240,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$134.alternate && + !cache$138.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8234,13 +8253,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$134.sibling = workInProgress.child), - (workInProgress.child = cache$134)) + ? ((cache$138.sibling = workInProgress.child), + (workInProgress.child = cache$138)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$134) - : (workInProgress.child = cache$134), - (currentResource.last = cache$134)); + ? (current.sibling = cache$138) + : (workInProgress.child = cache$138), + (currentResource.last = cache$138)); } if (null !== currentResource.tail) return ( @@ -8539,8 +8558,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$151) { - captureCommitPhaseError(current, nearestMountedAncestor, error$151); + } catch (error$155) { + captureCommitPhaseError(current, nearestMountedAncestor, error$155); } else ref.current = null; } @@ -8577,7 +8596,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$217) { + } catch (e$221) { JSCompiler_temp = null; break a; } @@ -8847,11 +8866,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$153 = commitTime, + var commitTime$157 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$153); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$157); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -8878,8 +8897,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$155) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$155); + } catch (error$159) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$159); } } function commitClassCallbacks(finishedWork) { @@ -8978,11 +8997,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$156) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$156 + error$160 ); } else { @@ -8999,11 +9018,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$157) { + } catch (error$161) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$161 ); } recordLayoutEffectDuration(finishedWork); @@ -9014,11 +9033,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$158) { + } catch (error$162) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$162 ); } } @@ -9724,22 +9743,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$173) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$173 + error$177 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$174) { + } catch (error$178) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$174 + error$178 ); } } @@ -9912,11 +9931,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$175) { + } catch (error$179) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$179 ); } } @@ -9954,8 +9973,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$176) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$176); + } catch (error$180) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$180); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9966,8 +9985,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$179) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$179); + } catch (error$183) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$183); } } break; @@ -9981,8 +10000,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$180) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$180); + } catch (error$184) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$184); } } break; @@ -9996,8 +10015,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$181) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$181); + } catch (error$185) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$185); } break; case 4: @@ -10027,8 +10046,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$183) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$183); + } catch (error$187) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$187); } current = finishedWork.updateQueue; null !== current && @@ -10106,11 +10125,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$163) { + } catch (error$167) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$163 + error$167 ); } } else if ( @@ -10185,21 +10204,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$164 = JSCompiler_inline_result.stateNode; + var parent$168 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$164, ""), + (setTextContent(parent$168, ""), (JSCompiler_inline_result.flags &= -33)); - var before$165 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$165, parent$164); + var before$169 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$169, parent$168); break; case 3: case 4: - var parent$166 = JSCompiler_inline_result.stateNode.containerInfo, - before$167 = getHostSibling(finishedWork); + var parent$170 = JSCompiler_inline_result.stateNode.containerInfo, + before$171 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$167, - parent$166 + before$171, + parent$170 ); break; default: @@ -10391,8 +10410,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$186) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$186); + } catch (error$190) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$190); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -10691,9 +10710,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$191 = finishedWork.stateNode; + var instance$195 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$191._visibility & 4 + ? instance$195._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10706,7 +10725,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$191._visibility |= 4), + : ((instance$195._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10714,7 +10733,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$191._visibility |= 4), + : ((instance$195._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10727,7 +10746,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$191 + instance$195 ); break; case 24: @@ -11760,8 +11779,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$199) { - handleThrow(root, thrownValue$199); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); lanes && root.shellSuspendCounter++; @@ -11877,8 +11896,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$201) { - handleThrow(root, thrownValue$201); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); resetContextDependencies(); @@ -11922,8 +11941,6 @@ function replaySuspendedUnitOfWork(unitOfWork) { isProfilingMode = 0 !== (unitOfWork.mode & 2); isProfilingMode && startProfilerTimer(unitOfWork); switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -12137,13 +12154,13 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$205 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$209 = commitBeforeMutationEffects( root, finishedWork ); commitTime = now(); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$205 && + shouldFireAfterActiveInstanceBlur$209 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12228,7 +12245,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$206 = rootWithPendingPassiveEffects, + var root$210 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -12244,7 +12261,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$206, remainingLanes); + releaseRootPooledCache(root$210, remainingLanes); } } return !1; @@ -12485,16 +12502,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -12580,7 +12587,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) @@ -12909,12 +12916,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$209 = fiber.stateNode; - if (root$209.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$209.pendingLanes); + var root$213 = fiber.stateNode; + if (root$213.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$213.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$209, lanes), - ensureRootIsScheduled(root$209), + (upgradePendingLanesToSync(root$213, lanes), + ensureRootIsScheduled(root$213), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now$1() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -14140,19 +14147,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$361; + var JSCompiler_inline_result$jscomp$365; if (canUseDOM) { - var isSupported$jscomp$inline_1570 = "oninput" in document; - if (!isSupported$jscomp$inline_1570) { - var element$jscomp$inline_1571 = document.createElement("div"); - element$jscomp$inline_1571.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1570 = - "function" === typeof element$jscomp$inline_1571.oninput; + var isSupported$jscomp$inline_1567 = "oninput" in document; + if (!isSupported$jscomp$inline_1567) { + var element$jscomp$inline_1568 = document.createElement("div"); + element$jscomp$inline_1568.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1567 = + "function" === typeof element$jscomp$inline_1568.oninput; } - JSCompiler_inline_result$jscomp$361 = isSupported$jscomp$inline_1570; - } else JSCompiler_inline_result$jscomp$361 = !1; + JSCompiler_inline_result$jscomp$365 = isSupported$jscomp$inline_1567; + } else JSCompiler_inline_result$jscomp$365 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$361 && + JSCompiler_inline_result$jscomp$365 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14461,20 +14468,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1611 = 0; - i$jscomp$inline_1611 < simpleEventPluginEvents.length; - i$jscomp$inline_1611++ + var i$jscomp$inline_1608 = 0; + i$jscomp$inline_1608 < simpleEventPluginEvents.length; + i$jscomp$inline_1608++ ) { - var eventName$jscomp$inline_1612 = - simpleEventPluginEvents[i$jscomp$inline_1611], - domEventName$jscomp$inline_1613 = - eventName$jscomp$inline_1612.toLowerCase(), - capitalizedEvent$jscomp$inline_1614 = - eventName$jscomp$inline_1612[0].toUpperCase() + - eventName$jscomp$inline_1612.slice(1); + var eventName$jscomp$inline_1609 = + simpleEventPluginEvents[i$jscomp$inline_1608], + domEventName$jscomp$inline_1610 = + eventName$jscomp$inline_1609.toLowerCase(), + capitalizedEvent$jscomp$inline_1611 = + eventName$jscomp$inline_1609[0].toUpperCase() + + eventName$jscomp$inline_1609.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1613, - "on" + capitalizedEvent$jscomp$inline_1614 + domEventName$jscomp$inline_1610, + "on" + capitalizedEvent$jscomp$inline_1611 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15945,14 +15952,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$244 in nextProps) { - var propKey = nextProps[propKey$244]; - lastProp = lastProps[propKey$244]; + for (var propKey$248 in nextProps) { + var propKey = nextProps[propKey$248]; + lastProp = lastProps[propKey$248]; if ( - nextProps.hasOwnProperty(propKey$244) && + nextProps.hasOwnProperty(propKey$248) && (null != propKey || null != lastProp) ) - switch (propKey$244) { + switch (propKey$248) { case "type": type = propKey; break; @@ -15981,7 +15988,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$244, + propKey$248, propKey, nextProps, lastProp @@ -16000,7 +16007,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$244 = null; + propKey = value = defaultValue = propKey$248 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16031,7 +16038,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$244 = type; + propKey$248 = type; break; case "defaultValue": defaultValue = type; @@ -16052,15 +16059,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$244 - ? updateOptions(domElement, !!lastProps, propKey$244, !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$244 = null; + propKey = propKey$248 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16084,7 +16091,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$244 = name; + propKey$248 = name; break; case "defaultValue": propKey = name; @@ -16098,17 +16105,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$244, propKey); + updateTextarea(domElement, propKey$248, propKey); return; case "option": - for (var propKey$260 in lastProps) + for (var propKey$264 in lastProps) if ( - ((propKey$244 = lastProps[propKey$260]), - lastProps.hasOwnProperty(propKey$260) && - null != propKey$244 && - !nextProps.hasOwnProperty(propKey$260)) + ((propKey$248 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$264)) ) - switch (propKey$260) { + switch (propKey$264) { case "selected": domElement.selected = !1; break; @@ -16116,33 +16123,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$260, + propKey$264, null, nextProps, - propKey$244 + propKey$248 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$244 = nextProps[lastDefaultValue]), + ((propKey$248 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$244 !== propKey && - (null != propKey$244 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$244 && - "function" !== typeof propKey$244 && - "symbol" !== typeof propKey$244; + propKey$248 && + "function" !== typeof propKey$248 && + "symbol" !== typeof propKey$248; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$244, + propKey$248, nextProps, propKey ); @@ -16163,24 +16170,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$265 in lastProps) - (propKey$244 = lastProps[propKey$265]), - lastProps.hasOwnProperty(propKey$265) && - null != propKey$244 && - !nextProps.hasOwnProperty(propKey$265) && - setProp(domElement, tag, propKey$265, null, nextProps, propKey$244); + 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$244 = nextProps[checked]), + ((propKey$248 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$244 !== propKey && - (null != propKey$244 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$244) + if (null != propKey$248) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16188,7 +16195,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$244, + propKey$248, nextProps, propKey ); @@ -16196,49 +16203,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$270 in lastProps) - (propKey$244 = lastProps[propKey$270]), - lastProps.hasOwnProperty(propKey$270) && - void 0 !== propKey$244 && - !nextProps.hasOwnProperty(propKey$270) && + 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$270, + propKey$274, void 0, nextProps, - propKey$244 + propKey$248 ); for (defaultChecked in nextProps) - (propKey$244 = nextProps[defaultChecked]), + (propKey$248 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$244 === propKey || - (void 0 === propKey$244 && void 0 === propKey) || + propKey$248 === propKey || + (void 0 === propKey$248 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$244, + propKey$248, nextProps, propKey ); return; } } - for (var propKey$275 in lastProps) - (propKey$244 = lastProps[propKey$275]), - lastProps.hasOwnProperty(propKey$275) && - null != propKey$244 && - !nextProps.hasOwnProperty(propKey$275) && - setProp(domElement, tag, propKey$275, null, nextProps, propKey$244); + 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$244 = nextProps[lastProp]), + (propKey$248 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$244 === propKey || - (null == propKey$244 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$244, nextProps, propKey); + propKey$248 === propKey || + (null == propKey$248 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$248, nextProps, propKey); } var ReactDOMCurrentDispatcher$1 = Internals.ReactDOMCurrentDispatcher, eventsEnabled = null, @@ -16796,17 +16803,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$283 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$284 = styles$283.get(type); - resource$284 || + var styles$287 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$288 = styles$287.get(type); + resource$288 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$284 = { + (resource$288 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$283.set(type, resource$284), + styles$287.set(type, resource$288), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16821,9 +16828,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$284.state + resource$288.state )); - return resource$284; + return resource$288; } return null; case "script": @@ -16906,37 +16913,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$288 = hoistableRoot.querySelector( + var instance$292 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$288) + if (instance$292) return ( (resource.state.loading |= 4), - (resource.instance = instance$288), - markNodeAsHoistable(instance$288), - instance$288 + (resource.instance = instance$292), + markNodeAsHoistable(instance$292), + instance$292 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$288 = ( + instance$292 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$288); - var linkInstance = instance$288; + markNodeAsHoistable(instance$292); + var linkInstance = instance$292; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$288, "link", instance); + setInitialProperties(instance$292, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$288, props.precedence, hoistableRoot); - return (resource.instance = instance$288); + insertStylesheet(instance$292, props.precedence, hoistableRoot); + return (resource.instance = instance$292); case "script": - instance$288 = getScriptKey(props.src); + instance$292 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$288) + getScriptSelectorFromKey(instance$292) )) ) return ( @@ -16945,7 +16952,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$288))) + if ((styleProps = preloadPropsMap.get(instance$292))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17324,10 +17331,10 @@ Internals.Events = [ restoreStateIfNeeded, unstable_batchedUpdates ]; -var devToolsConfig$jscomp$inline_1769 = { +var devToolsConfig$jscomp$inline_1766 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-95141c03", + version: "19.0.0-www-modern-affc19ee", rendererPackageName: "react-dom" }; (function (internals) { @@ -17345,10 +17352,10 @@ var devToolsConfig$jscomp$inline_1769 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1769.bundleType, - version: devToolsConfig$jscomp$inline_1769.version, - rendererPackageName: devToolsConfig$jscomp$inline_1769.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1769.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1766.bundleType, + version: devToolsConfig$jscomp$inline_1766.version, + rendererPackageName: devToolsConfig$jscomp$inline_1766.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1766.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17364,14 +17371,14 @@ var devToolsConfig$jscomp$inline_1769 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1769.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1766.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-95141c03" + reconcilerVersion: "19.0.0-www-modern-affc19ee" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -17661,7 +17668,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-95141c03"; +exports.version = "19.0.0-www-modern-affc19ee"; "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 71615e26c3..3692516d78 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "19.0.0-www-classic-a2ba8df5"; + var ReactVersion = "19.0.0-www-classic-7b148b32"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -12013,22 +12013,14 @@ if (__DEV__) { } var didWarnAboutBadClass = {}; - var didWarnAboutModulePatternComponent = {}; var didWarnAboutContextTypeOnFunctionComponent = {}; var didWarnAboutGetDerivedStateOnFunctionComponent = {}; var didWarnAboutReassigningProps = false; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var didWarnAboutGenerators = false; - var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern - // components for some reason. + var didWarnAboutMaps = false; - function renderIndeterminateComponent( - request, - task, - keyPath, - Component, - props - ) { + function renderFunctionComponent(request, task, keyPath, Component, props) { var legacyContext; { @@ -12070,34 +12062,6 @@ if (__DEV__) { var actionStateCount = getActionStateCount(); var actionStateMatchingIndex = getActionStateMatchingIndex(); - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - { validateFunctionComponentInDev(Component); } @@ -12208,18 +12172,15 @@ if (__DEV__) { } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] - ) { + if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName]) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName2 + _componentName ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName] = true; } } @@ -12228,16 +12189,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName2]) { error( "%s: Function components do not support contextType.", - _componentName3 + _componentName2 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName2] = true; } } } @@ -12398,7 +12359,7 @@ if (__DEV__) { renderClassComponent(request, task, keyPath, type, props); return; } else { - renderIndeterminateComponent(request, task, keyPath, type, props); + renderFunctionComponent(request, task, keyPath, type, props); return; } } diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 42d314f86d..4df5d3d783 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "19.0.0-www-modern-4693f3a0"; + var ReactVersion = "19.0.0-www-modern-51e910d2"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -11916,22 +11916,14 @@ if (__DEV__) { } var didWarnAboutBadClass = {}; - var didWarnAboutModulePatternComponent = {}; var didWarnAboutContextTypeOnFunctionComponent = {}; var didWarnAboutGetDerivedStateOnFunctionComponent = {}; var didWarnAboutReassigningProps = false; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var didWarnAboutGenerators = false; - var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern - // components for some reason. + var didWarnAboutMaps = false; - function renderIndeterminateComponent( - request, - task, - keyPath, - Component, - props - ) { + function renderFunctionComponent(request, task, keyPath, Component, props) { var legacyContext; var previousComponentStack = task.componentStack; @@ -11969,34 +11961,6 @@ if (__DEV__) { var actionStateCount = getActionStateCount(); var actionStateMatchingIndex = getActionStateMatchingIndex(); - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - { if (Component.contextTypes) { error( @@ -12117,18 +12081,15 @@ if (__DEV__) { } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] - ) { + if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName]) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName2 + _componentName ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName] = true; } } @@ -12137,16 +12098,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName2]) { error( "%s: Function components do not support contextType.", - _componentName3 + _componentName2 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName2] = true; } } } @@ -12307,7 +12268,7 @@ if (__DEV__) { renderClassComponent(request, task, keyPath, type, props); return; } else { - renderIndeterminateComponent(request, task, keyPath, type, props); + renderFunctionComponent(request, task, keyPath, type, props); return; } } diff --git a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js index d5b6d10c8e..09289a61d1 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js @@ -11795,22 +11795,14 @@ if (__DEV__) { } var didWarnAboutBadClass = {}; - var didWarnAboutModulePatternComponent = {}; var didWarnAboutContextTypeOnFunctionComponent = {}; var didWarnAboutGetDerivedStateOnFunctionComponent = {}; var didWarnAboutReassigningProps = false; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var didWarnAboutGenerators = false; - var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern - // components for some reason. + var didWarnAboutMaps = false; - function renderIndeterminateComponent( - request, - task, - keyPath, - Component, - props - ) { + function renderFunctionComponent(request, task, keyPath, Component, props) { var legacyContext; var previousComponentStack = task.componentStack; @@ -11848,34 +11840,6 @@ if (__DEV__) { var actionStateCount = getActionStateCount(); var actionStateMatchingIndex = getActionStateMatchingIndex(); - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - { if (Component.contextTypes) { error( @@ -11996,18 +11960,15 @@ if (__DEV__) { } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] - ) { + if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName]) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName2 + _componentName ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName] = true; } } @@ -12016,16 +11977,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName2]) { error( "%s: Function components do not support contextType.", - _componentName3 + _componentName2 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName2] = true; } } } @@ -12186,7 +12147,7 @@ if (__DEV__) { renderClassComponent(request, task, keyPath, type, props); return; } else { - renderIndeterminateComponent(request, task, keyPath, type, props); + renderFunctionComponent(request, task, keyPath, type, props); return; } } diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 6780d488b7..a173e1723c 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -154,8 +154,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -182,6 +180,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; // ATTENTION // When adding new symbols to this file, @@ -452,7 +451,6 @@ if (__DEV__) { case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -3841,7 +3839,6 @@ if (__DEV__) { return describeBuiltInComponentFrame("SuspenseList"); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); @@ -8249,7 +8246,6 @@ if (__DEV__) { return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -18638,17 +18634,6 @@ if (__DEV__) { } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = false; var unmaskedContext = emptyContextObject; @@ -18724,7 +18709,14 @@ if (__DEV__) { instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -19700,6 +19692,14 @@ if (__DEV__) { update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -20276,7 +20276,6 @@ if (__DEV__) { ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -20287,7 +20286,6 @@ if (__DEV__) { { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -21005,6 +21003,24 @@ if (__DEV__) { } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -21012,6 +21028,39 @@ if (__DEV__) { nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + } + } + var context; { @@ -21656,70 +21705,68 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + + { + workInProgress.type = Component = + resolveClassForHotReloading(Component); + } + + return updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + workInProgress.tag = FunctionComponent; + { validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = resolveFunctionForHotReloading(Component); } - child = updateFunctionComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; - case ClassComponent: { - { - workInProgress.type = Component = - resolveClassForHotReloading(Component); - } + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - child = updateClassComponent( - null, - workInProgress, - Component, - resolvedProps, - renderLanes - ); - return child; - } - - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -21781,122 +21828,6 @@ if (__DEV__) { ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - { - var unmaskedContext = getUnmaskedContext( - workInProgress, - Component, - false - ); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - prepareToReadContext(workInProgress, renderLanes); - var value; - var hasId; - - if (enableSchedulingProfiler) { - markComponentRenderStarted(workInProgress); - } - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$2.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - hasId = checkDidRenderIdHook(); - setIsRendering(false); - } - - if (enableSchedulingProfiler) { - markComponentRenderStopped(); - } // React DevTools reads this flag. - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - if (getIsHydrating() && hasId) { - pushMaterializedTreeId(workInProgress); - } - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -21933,33 +21864,32 @@ if (__DEV__) { } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -21968,16 +21898,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -23943,15 +23873,6 @@ if (__DEV__) { workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -24100,6 +24021,24 @@ if (__DEV__) { ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -25739,10 +25678,10 @@ if (__DEV__) { popTreeContext(workInProgress); switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -33955,12 +33894,6 @@ if (__DEV__) { } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -35369,7 +35302,6 @@ if (__DEV__) { var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -36168,22 +36100,8 @@ if (__DEV__) { type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -36268,7 +36186,6 @@ if (__DEV__) { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -36394,7 +36311,7 @@ if (__DEV__) { mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; @@ -36897,7 +36814,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-b3f8d371"; + var ReactVersion = "19.0.0-www-classic-47215e9a"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 9d9cd02f93..1067a77d27 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -2366,8 +2366,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -2394,6 +2392,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; var randomKey = Math.random().toString(36).slice(2); var internalInstanceKey = "__reactFiber$" + randomKey; @@ -3448,7 +3447,6 @@ if (__DEV__) { return describeBuiltInComponentFrame("SuspenseList"); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); @@ -3722,7 +3720,6 @@ if (__DEV__) { case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -8212,7 +8209,6 @@ if (__DEV__) { return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -18593,17 +18589,6 @@ if (__DEV__) { } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var context = emptyContextObject; var contextType = ctor.contextType; @@ -18669,7 +18654,14 @@ if (__DEV__) { instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -19622,6 +19614,14 @@ if (__DEV__) { update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -20198,7 +20198,6 @@ if (__DEV__) { ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -20209,7 +20208,6 @@ if (__DEV__) { { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -20927,6 +20925,24 @@ if (__DEV__) { } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -20934,6 +20950,47 @@ if (__DEV__) { nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + + if (Component.contextTypes) { + error( + "%s uses the legacy contextTypes API which was removed in React 19. " + + "Use React.createContext() with React.useContext() instead.", + getComponentNameFromType(Component) || "Unknown" + ); + } + } + } + var context; var nextChildren; @@ -21548,70 +21605,68 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + + { + workInProgress.type = Component = + resolveClassForHotReloading(Component); + } + + return updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + workInProgress.tag = FunctionComponent; + { validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = resolveFunctionForHotReloading(Component); } - child = updateFunctionComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; - case ClassComponent: { - { - workInProgress.type = Component = - resolveClassForHotReloading(Component); - } + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - child = updateClassComponent( - null, - workInProgress, - Component, - resolvedProps, - renderLanes - ); - return child; - } - - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -21672,123 +21727,6 @@ if (__DEV__) { ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - prepareToReadContext(workInProgress, renderLanes); - var value; - var hasId; - - if (enableSchedulingProfiler) { - markComponentRenderStarted(workInProgress); - } - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$2.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - hasId = checkDidRenderIdHook(); - setIsRendering(false); - } - - if (enableSchedulingProfiler) { - markComponentRenderStopped(); - } // React DevTools reads this flag. - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - { - if (Component.contextTypes) { - error( - "%s uses the legacy contextTypes API which was removed in React 19. " + - "Use React.createContext() with React.useContext() instead.", - getComponentNameFromType(Component) || "Unknown" - ); - } - } - - if (getIsHydrating() && hasId) { - pushMaterializedTreeId(workInProgress); - } - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -21825,33 +21763,32 @@ if (__DEV__) { } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -21860,16 +21797,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -23829,15 +23766,6 @@ if (__DEV__) { workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -23986,6 +23914,24 @@ if (__DEV__) { ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -25625,10 +25571,10 @@ if (__DEV__) { popTreeContext(workInProgress); switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -33812,12 +33758,6 @@ if (__DEV__) { } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -35217,7 +35157,6 @@ if (__DEV__) { var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -36016,22 +35955,8 @@ if (__DEV__) { type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -36116,7 +36041,6 @@ if (__DEV__) { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -36242,7 +36166,7 @@ if (__DEV__) { mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; @@ -36745,7 +36669,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-cfc7c1e7"; + var ReactVersion = "19.0.0-www-modern-7a34747a"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 0ddbb19fb7..8cb3870234 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -204,7 +204,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -1070,7 +1069,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber; case 11: @@ -5017,12 +5015,15 @@ function markSuspenseBoundaryShouldCapture( : ((suspenseBoundary.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)), suspenseBoundary ); @@ -5298,10 +5299,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$71 = workInProgress.stateNode; + root$72 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$71.incompleteTransitions.has(transition)) { + if (!root$72.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5309,11 +5310,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$71.incompleteTransitions.set(transition, markerInstance); + root$72.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$71.incompleteTransitions.forEach(function (markerInstance) { + root$72.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6684,109 +6685,91 @@ function beginWork(current, workInProgress, renderLanes) { pushTreeId(workInProgress, treeForkCount, workInProgress.index); workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor.current - ); - prepareToReadContext(workInProgress, renderLanes); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - Component = checkDidRenderIdHook(); - workInProgress.flags |= 1; - workInProgress.tag = 0; - isHydrating && Component && pushMaterializedTreeId(workInProgress); - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error(formatProdErrorMessage(306, elementType, "")); } - throw Error(formatProdErrorMessage(306, Component, "")); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6794,25 +6777,25 @@ function beginWork(current, workInProgress, renderLanes) { a: { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; var prevState = workInProgress.memoizedState; - Component = prevState.element; + elementType = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, context, null, renderLanes); + processUpdateQueue(workInProgress, init, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - context = nextState.cache; - pushProvider(workInProgress, CacheContext, context); - context !== prevState.cache && + init = nextState.cache; + pushProvider(workInProgress, CacheContext, init); + init !== prevState.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextState.element; + init = nextState.element; if (prevState.isDehydrated) if ( ((prevState = { - element: context, + element: init, isDehydrated: !1, cache: nextState.cache }), @@ -6820,29 +6803,29 @@ function beginWork(current, workInProgress, renderLanes) { (workInProgress.memoizedState = prevState), workInProgress.flags & 256) ) { - Component = createCapturedValueAtFiber( + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(423)), workInProgress ); workInProgress = mountHostRootWithoutHydrating( current, workInProgress, - context, + init, renderLanes, - Component + elementType ); break a; - } else if (context !== Component) { - Component = createCapturedValueAtFiber( + } else if (init !== elementType) { + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); workInProgress = mountHostRootWithoutHydrating( current, workInProgress, - context, + init, renderLanes, - Component + elementType ); break a; } else @@ -6857,7 +6840,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes = mountChildFibers( workInProgress, null, - context, + init, renderLanes ), workInProgress.child = renderLanes; @@ -6868,7 +6851,7 @@ function beginWork(current, workInProgress, renderLanes) { (renderLanes = renderLanes.sibling); else { resetHydrationState(); - if (context === Component) { + if (init === elementType) { workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -6876,7 +6859,7 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - reconcileChildren(current, workInProgress, context, renderLanes); + reconcileChildren(current, workInProgress, init, renderLanes); } workInProgress = workInProgress.child; } @@ -6895,14 +6878,14 @@ function beginWork(current, workInProgress, renderLanes) { null !== renderLanes || ((renderLanes = workInProgress.type), (current = workInProgress.pendingProps), - (Component = getOwnerDocumentFromRootContainer( + (elementType = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current ).createElement(renderLanes)), - (Component[internalInstanceKey] = workInProgress), - (Component[internalPropsKey] = current), - setInitialProperties(Component, renderLanes, current), - markNodeAsHoistable(Component), - (workInProgress.stateNode = Component)), + (elementType[internalInstanceKey] = workInProgress), + (elementType[internalPropsKey] = current), + setInitialProperties(elementType, renderLanes, current), + markNodeAsHoistable(elementType), + (workInProgress.stateNode = elementType)), null ); case 27: @@ -6910,7 +6893,7 @@ function beginWork(current, workInProgress, renderLanes) { pushHostContext(workInProgress), null === current && isHydrating && - ((Component = workInProgress.stateNode = + ((elementType = workInProgress.stateNode = resolveSingletonInstance( workInProgress.type, workInProgress.pendingProps, @@ -6918,14 +6901,14 @@ function beginWork(current, workInProgress, renderLanes) { )), (hydrationParentFiber = workInProgress), (rootOrSingletonContext = !0), - (nextHydratableInstance = getNextHydratable(Component.firstChild))), - (Component = workInProgress.pendingProps.children), + (nextHydratableInstance = getNextHydratable(elementType.firstChild))), + (elementType = workInProgress.pendingProps.children), null !== current || isHydrating - ? reconcileChildren(current, workInProgress, Component, renderLanes) + ? reconcileChildren(current, workInProgress, elementType, renderLanes) : (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )), markRef(current, workInProgress), @@ -6933,36 +6916,36 @@ function beginWork(current, workInProgress, renderLanes) { ); case 5: if (null === current && isHydrating) { - if ((context = Component = nextHydratableInstance)) - (Component = canHydrateInstance( - Component, + if ((init = elementType = nextHydratableInstance)) + (elementType = canHydrateInstance( + elementType, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext )), - null !== Component - ? ((workInProgress.stateNode = Component), + null !== elementType + ? ((workInProgress.stateNode = elementType), (hydrationParentFiber = workInProgress), (nextHydratableInstance = getNextHydratable( - Component.firstChild + elementType.firstChild )), (rootOrSingletonContext = !1), - (context = !0)) - : (context = !1); - context || throwOnHydrationMismatch(); + (init = !0)) + : (init = !1); + init || throwOnHydrationMismatch(); } pushHostContext(workInProgress); - context = workInProgress.type; + init = workInProgress.type; prevState = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; - Component = prevState.children; - shouldSetTextContent(context, prevState) - ? (Component = null) + elementType = prevState.children; + shouldSetTextContent(init, prevState) + ? (elementType = null) : null !== nextState && - shouldSetTextContent(context, nextState) && + shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); null !== workInProgress.memoizedState && - ((context = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6970,18 +6953,18 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = context), + (HostTransitionContext._currentValue = init), enableLazyContextPropagation || (didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, renderLanes ))); markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: if (null === current && isHydrating) { @@ -7008,30 +6991,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -7067,17 +7055,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; - nextState = context.value; - pushProvider(workInProgress, Component, nextState); + nextState = init.value; + pushProvider(workInProgress, elementType, nextState); if (!enableLazyContextPropagation && null !== prevState) if (objectIs(prevState.value, nextState)) { if ( - prevState.children === context.children && + prevState.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -7087,39 +7075,35 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), - (Component = Component(context)), + (init = readContext(init)), + (elementType = elementType(init)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -7133,36 +7117,54 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: return ( - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 22: @@ -7172,39 +7174,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (prevState = createCache()), - (context.pooledCache = prevState), + (init.pooledCache = prevState), prevState.refCount++, - null !== prevState && (context.pooledCacheLanes |= renderLanes), - (context = prevState)), + null !== prevState && (init.pooledCacheLanes |= renderLanes), + (init = prevState)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (prevState = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = prevState.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = prevState.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -7223,22 +7225,22 @@ function beginWork(current, workInProgress, renderLanes) { return ( enableTransitionTracing ? (null === current && - ((Component = enableTransitionTracing + ((elementType = enableTransitionTracing ? transitionStack.current : null), - null !== Component && - ((Component = { + null !== elementType && + ((elementType = { tag: 1, - transitions: new Set(Component), + transitions: new Set(elementType), pendingBoundaries: null, name: workInProgress.pendingProps.name, aborts: null }), - (workInProgress.stateNode = Component), + (workInProgress.stateNode = elementType), (workInProgress.flags |= 2048))), - (Component = workInProgress.stateNode), - null !== Component && - pushMarkerInstance(workInProgress, Component), + (elementType = workInProgress.stateNode), + null !== elementType && + pushMarkerInstance(workInProgress, elementType), reconcileChildren( current, workInProgress, @@ -7750,14 +7752,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$110 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$110 = lastTailNode), + for (var lastTailNode$114 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$114 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$110 + null === lastTailNode$114 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$110.sibling = null); + : (lastTailNode$114.sibling = null); } } function bubbleProperties(completedWork) { @@ -7767,19 +7769,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$111 = completedWork.child; null !== child$111; ) - (newChildLanes |= child$111.lanes | child$111.childLanes), - (subtreeFlags |= child$111.subtreeFlags & 31457280), - (subtreeFlags |= child$111.flags & 31457280), - (child$111.return = completedWork), - (child$111 = child$111.sibling); + for (var child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags & 31457280), + (subtreeFlags |= child$115.flags & 31457280), + (child$115.return = completedWork), + (child$115 = child$115.sibling); else - for (child$111 = completedWork.child; null !== child$111; ) - (newChildLanes |= child$111.lanes | child$111.childLanes), - (subtreeFlags |= child$111.subtreeFlags), - (subtreeFlags |= child$111.flags), - (child$111.return = completedWork), - (child$111 = child$111.sibling); + for (child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags), + (subtreeFlags |= child$115.flags), + (child$115.return = completedWork), + (child$115 = child$115.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7788,10 +7790,10 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -8095,11 +8097,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$123 = null; + var cache$127 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$123 = newProps.memoizedState.cachePool.pool); - cache$123 !== currentResource && (newProps.flags |= 2048); + (cache$127 = newProps.memoizedState.cachePool.pool); + cache$127 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8140,8 +8142,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$123 = currentResource.rendering; - if (null === cache$123) + cache$127 = currentResource.rendering; + if (null === cache$127) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8149,11 +8151,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$123 = findFirstSuspended(current); - if (null !== cache$123) { + cache$127 = findFirstSuspended(current); + if (null !== cache$127) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$123.updateQueue; + current = cache$127.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8178,7 +8180,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$123)), null !== current)) { + if (((current = findFirstSuspended(cache$127)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8188,7 +8190,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$123.alternate && + !cache$127.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8201,13 +8203,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$123.sibling = workInProgress.child), - (workInProgress.child = cache$123)) + ? ((cache$127.sibling = workInProgress.child), + (workInProgress.child = cache$127)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$123) - : (workInProgress.child = cache$123), - (currentResource.last = cache$123)); + ? (current.sibling = cache$127) + : (workInProgress.child = cache$127), + (currentResource.last = cache$127)); } if (null !== currentResource.tail) return ( @@ -8472,8 +8474,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$141) { - captureCommitPhaseError(current, nearestMountedAncestor, error$141); + } catch (error$145) { + captureCommitPhaseError(current, nearestMountedAncestor, error$145); } else ref.current = null; } @@ -8510,7 +8512,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$192) { + } catch (e$196) { JSCompiler_temp = null; break a; } @@ -8776,11 +8778,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$143) { + } catch (error$147) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$143 + error$147 ); } } @@ -9460,8 +9462,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$156) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$156); + } catch (error$160) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$160); } } break; @@ -9633,11 +9635,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$157) { + } catch (error$161) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$161 ); } } @@ -9675,8 +9677,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$158) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$158); + } catch (error$162) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$162); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9687,8 +9689,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$161) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$161); + } catch (error$165) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$165); } } break; @@ -9702,8 +9704,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } } break; @@ -9717,8 +9719,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$167) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$167); } break; case 4: @@ -9748,8 +9750,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$169) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$169); } current = finishedWork.updateQueue; null !== current && @@ -9827,11 +9829,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$146) { + } catch (error$150) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$146 + error$150 ); } } else if ( @@ -9906,21 +9908,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$147 = JSCompiler_inline_result.stateNode; + var parent$151 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$147, ""), + (setTextContent(parent$151, ""), (JSCompiler_inline_result.flags &= -33)); - var before$148 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$148, parent$147); + var before$152 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$152, parent$151); break; case 3: case 4: - var parent$149 = JSCompiler_inline_result.stateNode.containerInfo, - before$150 = getHostSibling(finishedWork); + var parent$153 = JSCompiler_inline_result.stateNode.containerInfo, + before$154 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$150, - parent$149 + before$154, + parent$153 ); break; default: @@ -10390,9 +10392,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$172 = finishedWork.stateNode; + var instance$176 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$172._visibility & 4 + ? instance$176._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10405,7 +10407,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$172._visibility |= 4), + : ((instance$176._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10413,7 +10415,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$172._visibility |= 4), + : ((instance$176._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10426,7 +10428,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$172 + instance$176 ); break; case 24: @@ -11594,8 +11596,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$181) { - handleThrow(root, thrownValue$181); + } catch (thrownValue$185) { + handleThrow(root, thrownValue$185); } while (1); lanes && root.shellSuspendCounter++; @@ -11700,8 +11702,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$187) { + handleThrow(root, thrownValue$187); } while (1); resetContextDependencies(); @@ -11727,8 +11729,6 @@ function performUnitOfWork(unitOfWork) { function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -11930,12 +11930,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$187 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$191 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$187 && + shouldFireAfterActiveInstanceBlur$191 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12007,7 +12007,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$188 = rootWithPendingPassiveEffects, + var root$192 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -12023,7 +12023,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$188, remainingLanes); + releaseRootPooledCache(root$192, remainingLanes); } } return !1; @@ -12228,16 +12228,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -12315,7 +12305,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) @@ -12725,12 +12715,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$190 = fiber.stateNode; - if (root$190.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$190.pendingLanes); + var root$194 = fiber.stateNode; + if (root$194.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$194.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$190, lanes), - ensureRootIsScheduled(root$190), + (upgradePendingLanesToSync(root$194, lanes), + ensureRootIsScheduled(root$194), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13296,19 +13286,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$347; + var JSCompiler_inline_result$jscomp$351; if (canUseDOM) { - var isSupported$jscomp$inline_1514 = "oninput" in document; - if (!isSupported$jscomp$inline_1514) { - var element$jscomp$inline_1515 = document.createElement("div"); - element$jscomp$inline_1515.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1514 = - "function" === typeof element$jscomp$inline_1515.oninput; + var isSupported$jscomp$inline_1510 = "oninput" in document; + if (!isSupported$jscomp$inline_1510) { + var element$jscomp$inline_1511 = document.createElement("div"); + element$jscomp$inline_1511.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1510 = + "function" === typeof element$jscomp$inline_1511.oninput; } - JSCompiler_inline_result$jscomp$347 = isSupported$jscomp$inline_1514; - } else JSCompiler_inline_result$jscomp$347 = !1; + JSCompiler_inline_result$jscomp$351 = isSupported$jscomp$inline_1510; + } else JSCompiler_inline_result$jscomp$351 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$347 && + JSCompiler_inline_result$jscomp$351 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13680,20 +13670,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1555 = 0; - i$jscomp$inline_1555 < simpleEventPluginEvents.length; - i$jscomp$inline_1555++ + var i$jscomp$inline_1551 = 0; + i$jscomp$inline_1551 < simpleEventPluginEvents.length; + i$jscomp$inline_1551++ ) { - var eventName$jscomp$inline_1556 = - simpleEventPluginEvents[i$jscomp$inline_1555], - domEventName$jscomp$inline_1557 = - eventName$jscomp$inline_1556.toLowerCase(), - capitalizedEvent$jscomp$inline_1558 = - eventName$jscomp$inline_1556[0].toUpperCase() + - eventName$jscomp$inline_1556.slice(1); + var eventName$jscomp$inline_1552 = + simpleEventPluginEvents[i$jscomp$inline_1551], + domEventName$jscomp$inline_1553 = + eventName$jscomp$inline_1552.toLowerCase(), + capitalizedEvent$jscomp$inline_1554 = + eventName$jscomp$inline_1552[0].toUpperCase() + + eventName$jscomp$inline_1552.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1557, - "on" + capitalizedEvent$jscomp$inline_1558 + domEventName$jscomp$inline_1553, + "on" + capitalizedEvent$jscomp$inline_1554 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15165,14 +15155,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$219 in nextProps) { - var propKey = nextProps[propKey$219]; - lastProp = lastProps[propKey$219]; + for (var propKey$223 in nextProps) { + var propKey = nextProps[propKey$223]; + lastProp = lastProps[propKey$223]; if ( - nextProps.hasOwnProperty(propKey$219) && + nextProps.hasOwnProperty(propKey$223) && (null != propKey || null != lastProp) ) - switch (propKey$219) { + switch (propKey$223) { case "type": type = propKey; break; @@ -15201,7 +15191,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$219, + propKey$223, propKey, nextProps, lastProp @@ -15220,7 +15210,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$219 = null; + propKey = value = defaultValue = propKey$223 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15251,7 +15241,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$219 = type; + propKey$223 = type; break; case "defaultValue": defaultValue = type; @@ -15272,15 +15262,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$219 - ? updateOptions(domElement, !!lastProps, propKey$219, !1) + null != propKey$223 + ? updateOptions(domElement, !!lastProps, propKey$223, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$219 = null; + propKey = propKey$223 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15304,7 +15294,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$219 = name; + propKey$223 = name; break; case "defaultValue": propKey = name; @@ -15318,17 +15308,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$219, propKey); + updateTextarea(domElement, propKey$223, propKey); return; case "option": - for (var propKey$235 in lastProps) + for (var propKey$239 in lastProps) if ( - ((propKey$219 = lastProps[propKey$235]), - lastProps.hasOwnProperty(propKey$235) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$235)) + ((propKey$223 = lastProps[propKey$239]), + lastProps.hasOwnProperty(propKey$239) && + null != propKey$223 && + !nextProps.hasOwnProperty(propKey$239)) ) - switch (propKey$235) { + switch (propKey$239) { case "selected": domElement.selected = !1; break; @@ -15336,33 +15326,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$235, + propKey$239, null, nextProps, - propKey$219 + propKey$223 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$219 = nextProps[lastDefaultValue]), + ((propKey$223 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$219 !== propKey && - (null != propKey$219 || null != propKey)) + propKey$223 !== propKey && + (null != propKey$223 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$219 && - "function" !== typeof propKey$219 && - "symbol" !== typeof propKey$219; + propKey$223 && + "function" !== typeof propKey$223 && + "symbol" !== typeof propKey$223; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$219, + propKey$223, nextProps, propKey ); @@ -15383,24 +15373,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$240 in lastProps) - (propKey$219 = lastProps[propKey$240]), - lastProps.hasOwnProperty(propKey$240) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$240) && - setProp(domElement, tag, propKey$240, null, nextProps, propKey$219); + for (var propKey$244 in lastProps) + (propKey$223 = lastProps[propKey$244]), + lastProps.hasOwnProperty(propKey$244) && + null != propKey$223 && + !nextProps.hasOwnProperty(propKey$244) && + setProp(domElement, tag, propKey$244, null, nextProps, propKey$223); for (checked in nextProps) if ( - ((propKey$219 = nextProps[checked]), + ((propKey$223 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$219 !== propKey && - (null != propKey$219 || null != propKey)) + propKey$223 !== propKey && + (null != propKey$223 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$219) + if (null != propKey$223) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15408,7 +15398,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$219, + propKey$223, nextProps, propKey ); @@ -15416,49 +15406,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$245 in lastProps) - (propKey$219 = lastProps[propKey$245]), - lastProps.hasOwnProperty(propKey$245) && - void 0 !== propKey$219 && - !nextProps.hasOwnProperty(propKey$245) && + for (var propKey$249 in lastProps) + (propKey$223 = lastProps[propKey$249]), + lastProps.hasOwnProperty(propKey$249) && + void 0 !== propKey$223 && + !nextProps.hasOwnProperty(propKey$249) && setPropOnCustomElement( domElement, tag, - propKey$245, + propKey$249, void 0, nextProps, - propKey$219 + propKey$223 ); for (defaultChecked in nextProps) - (propKey$219 = nextProps[defaultChecked]), + (propKey$223 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$219 === propKey || - (void 0 === propKey$219 && void 0 === propKey) || + propKey$223 === propKey || + (void 0 === propKey$223 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$219, + propKey$223, nextProps, propKey ); return; } } - for (var propKey$250 in lastProps) - (propKey$219 = lastProps[propKey$250]), - lastProps.hasOwnProperty(propKey$250) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$250) && - setProp(domElement, tag, propKey$250, null, nextProps, propKey$219); + for (var propKey$254 in lastProps) + (propKey$223 = lastProps[propKey$254]), + lastProps.hasOwnProperty(propKey$254) && + null != propKey$223 && + !nextProps.hasOwnProperty(propKey$254) && + setProp(domElement, tag, propKey$254, null, nextProps, propKey$223); for (lastProp in nextProps) - (propKey$219 = nextProps[lastProp]), + (propKey$223 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$219 === propKey || - (null == propKey$219 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$219, nextProps, propKey); + propKey$223 === propKey || + (null == propKey$223 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$223, nextProps, propKey); } function noop$1() {} var Internals = { @@ -16104,17 +16094,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$258 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$259 = styles$258.get(type); - resource$259 || + var styles$262 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$263 = styles$262.get(type); + resource$263 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$259 = { + (resource$263 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$258.set(type, resource$259), + styles$262.set(type, resource$263), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16129,9 +16119,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$259.state + resource$263.state )); - return resource$259; + return resource$263; } return null; case "script": @@ -16214,37 +16204,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$263 = hoistableRoot.querySelector( + var instance$267 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$263) + if (instance$267) return ( (resource.state.loading |= 4), - (resource.instance = instance$263), - markNodeAsHoistable(instance$263), - instance$263 + (resource.instance = instance$267), + markNodeAsHoistable(instance$267), + instance$267 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$263 = ( + instance$267 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$263); - var linkInstance = instance$263; + markNodeAsHoistable(instance$267); + var linkInstance = instance$267; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$263, "link", instance); + setInitialProperties(instance$267, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$263, props.precedence, hoistableRoot); - return (resource.instance = instance$263); + insertStylesheet(instance$267, props.precedence, hoistableRoot); + return (resource.instance = instance$267); case "script": - instance$263 = getScriptKey(props.src); + instance$267 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$263) + getScriptSelectorFromKey(instance$267) )) ) return ( @@ -16253,7 +16243,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$263))) + if ((styleProps = preloadPropsMap.get(instance$267))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17252,11 +17242,11 @@ function legacyCreateRootFromDOMContainer$1( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$284); + var instance = getPublicRootInstance(root$288); originalCallback.call(instance); }; } - var root$284 = createHydrationContainer( + var root$288 = createHydrationContainer( initialChildren, callback, container, @@ -17271,23 +17261,23 @@ function legacyCreateRootFromDOMContainer$1( null, null ); - container._reactRootContainer = root$284; - container[internalContainerInstanceKey] = root$284.current; + container._reactRootContainer = root$288; + container[internalContainerInstanceKey] = root$288.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$284; + return root$288; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$285 = callback; + var originalCallback$289 = callback; callback = function () { - var instance = getPublicRootInstance(root$286); - originalCallback$285.call(instance); + var instance = getPublicRootInstance(root$290); + originalCallback$289.call(instance); }; } - var root$286 = createFiberRoot( + var root$290 = createFiberRoot( container, 0, !1, @@ -17302,15 +17292,15 @@ function legacyCreateRootFromDOMContainer$1( null, null ); - container._reactRootContainer = root$286; - container[internalContainerInstanceKey] = root$286.current; + container._reactRootContainer = root$290; + container[internalContainerInstanceKey] = root$290.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$286, parentComponent, callback); + updateContainer(initialChildren, root$290, parentComponent, callback); }); - return root$286; + return root$290; } function legacyRenderSubtreeIntoContainer$1( parentComponent, @@ -17393,17 +17383,17 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1749 = { +var devToolsConfig$jscomp$inline_1745 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-1a554f4a", + version: "19.0.0-www-classic-a4f1494e", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2158 = { - bundleType: devToolsConfig$jscomp$inline_1749.bundleType, - version: devToolsConfig$jscomp$inline_1749.version, - rendererPackageName: devToolsConfig$jscomp$inline_1749.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1749.rendererConfig, +var internals$jscomp$inline_2151 = { + bundleType: devToolsConfig$jscomp$inline_1745.bundleType, + version: devToolsConfig$jscomp$inline_1745.version, + rendererPackageName: devToolsConfig$jscomp$inline_1745.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1745.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17419,26 +17409,26 @@ var internals$jscomp$inline_2158 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1749.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1745.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-1a554f4a" + reconcilerVersion: "19.0.0-www-classic-a4f1494e" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2159 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2152 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2159.isDisabled && - hook$jscomp$inline_2159.supportsFiber + !hook$jscomp$inline_2152.isDisabled && + hook$jscomp$inline_2152.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2159.inject( - internals$jscomp$inline_2158 + (rendererID = hook$jscomp$inline_2152.inject( + internals$jscomp$inline_2151 )), - (injectedHook = hook$jscomp$inline_2159); + (injectedHook = hook$jscomp$inline_2152); } catch (err) {} } var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -17474,11 +17464,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$288); + var instance = getPublicRootInstance(root$292); originalCallback.call(instance); }; } - var root$288 = createHydrationContainer( + var root$292 = createHydrationContainer( initialChildren, callback, container, @@ -17493,23 +17483,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$288; - container[internalContainerInstanceKey] = root$288.current; + container._reactRootContainer = root$292; + container[internalContainerInstanceKey] = root$292.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$288; + return root$292; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$289 = callback; + var originalCallback$293 = callback; callback = function () { - var instance = getPublicRootInstance(root$290); - originalCallback$289.call(instance); + var instance = getPublicRootInstance(root$294); + originalCallback$293.call(instance); }; } - var root$290 = createFiberRoot( + var root$294 = createFiberRoot( container, 0, !1, @@ -17524,15 +17514,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$290; - container[internalContainerInstanceKey] = root$290.current; + container._reactRootContainer = root$294; + container[internalContainerInstanceKey] = root$294.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$290, parentComponent, callback); + updateContainer(initialChildren, root$294, parentComponent, callback); }); - return root$290; + return root$294; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -18019,4 +18009,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-1a554f4a"; +exports.version = "19.0.0-www-classic-a4f1494e"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index c228704639..0868689e1b 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -927,7 +927,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber; case 11: @@ -4962,12 +4961,15 @@ function markSuspenseBoundaryShouldCapture( : ((suspenseBoundary.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)), suspenseBoundary ); @@ -5243,10 +5245,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$71 = workInProgress.stateNode; + root$72 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$71.incompleteTransitions.has(transition)) { + if (!root$72.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5254,11 +5256,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$71.incompleteTransitions.set(transition, markerInstance); + root$72.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$71.incompleteTransitions.forEach(function (markerInstance) { + root$72.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6590,104 +6592,90 @@ function beginWork(current, workInProgress, renderLanes) { pushTreeId(workInProgress, treeForkCount, workInProgress.index); workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - prepareToReadContext(workInProgress, renderLanes); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - void 0, - renderLanes - ); - Component = checkDidRenderIdHook(); - workInProgress.flags |= 1; - workInProgress.tag = 0; - isHydrating && Component && pushMaterializedTreeId(workInProgress); - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - var init = Component._init; - Component = init(Component._payload); - workInProgress.type = Component; - init = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (init) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error(formatProdErrorMessage(306, elementType, "")); } - throw Error(formatProdErrorMessage(306, Component, "")); } return workInProgress; case 0: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) @@ -6701,7 +6689,7 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error(formatProdErrorMessage(387)); init = workInProgress.pendingProps; var prevState = workInProgress.memoizedState; - Component = prevState.element; + elementType = prevState.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, init, null, renderLanes); var nextState = workInProgress.memoizedState; @@ -6725,7 +6713,7 @@ function beginWork(current, workInProgress, renderLanes) { (workInProgress.memoizedState = prevState), workInProgress.flags & 256) ) { - Component = createCapturedValueAtFiber( + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(423)), workInProgress ); @@ -6734,11 +6722,11 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, init, renderLanes, - Component + elementType ); break a; - } else if (init !== Component) { - Component = createCapturedValueAtFiber( + } else if (init !== elementType) { + elementType = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); @@ -6747,7 +6735,7 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, init, renderLanes, - Component + elementType ); break a; } else @@ -6773,7 +6761,7 @@ function beginWork(current, workInProgress, renderLanes) { (renderLanes = renderLanes.sibling); else { resetHydrationState(); - if (init === Component) { + if (init === elementType) { workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, @@ -6800,14 +6788,14 @@ function beginWork(current, workInProgress, renderLanes) { null !== renderLanes || ((renderLanes = workInProgress.type), (current = workInProgress.pendingProps), - (Component = getOwnerDocumentFromRootContainer( + (elementType = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current ).createElement(renderLanes)), - (Component[internalInstanceKey] = workInProgress), - (Component[internalPropsKey] = current), - setInitialProperties(Component, renderLanes, current), - markNodeAsHoistable(Component), - (workInProgress.stateNode = Component)), + (elementType[internalInstanceKey] = workInProgress), + (elementType[internalPropsKey] = current), + setInitialProperties(elementType, renderLanes, current), + markNodeAsHoistable(elementType), + (workInProgress.stateNode = elementType)), null ); case 27: @@ -6815,7 +6803,7 @@ function beginWork(current, workInProgress, renderLanes) { pushHostContext(workInProgress), null === current && isHydrating && - ((Component = workInProgress.stateNode = + ((elementType = workInProgress.stateNode = resolveSingletonInstance( workInProgress.type, workInProgress.pendingProps, @@ -6823,14 +6811,14 @@ function beginWork(current, workInProgress, renderLanes) { )), (hydrationParentFiber = workInProgress), (rootOrSingletonContext = !0), - (nextHydratableInstance = getNextHydratable(Component.firstChild))), - (Component = workInProgress.pendingProps.children), + (nextHydratableInstance = getNextHydratable(elementType.firstChild))), + (elementType = workInProgress.pendingProps.children), null !== current || isHydrating - ? reconcileChildren(current, workInProgress, Component, renderLanes) + ? reconcileChildren(current, workInProgress, elementType, renderLanes) : (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )), markRef(current, workInProgress), @@ -6838,18 +6826,18 @@ function beginWork(current, workInProgress, renderLanes) { ); case 5: if (null === current && isHydrating) { - if ((init = Component = nextHydratableInstance)) - (Component = canHydrateInstance( - Component, + if ((init = elementType = nextHydratableInstance)) + (elementType = canHydrateInstance( + elementType, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext )), - null !== Component - ? ((workInProgress.stateNode = Component), + null !== elementType + ? ((workInProgress.stateNode = elementType), (hydrationParentFiber = workInProgress), (nextHydratableInstance = getNextHydratable( - Component.firstChild + elementType.firstChild )), (rootOrSingletonContext = !1), (init = !0)) @@ -6860,9 +6848,9 @@ function beginWork(current, workInProgress, renderLanes) { init = workInProgress.type; prevState = workInProgress.pendingProps; nextState = null !== current ? current.memoizedProps : null; - Component = prevState.children; + elementType = prevState.children; shouldSetTextContent(init, prevState) - ? (Component = null) + ? (elementType = null) : null !== nextState && shouldSetTextContent(init, nextState) && (workInProgress.flags |= 32); @@ -6886,7 +6874,7 @@ function beginWork(current, workInProgress, renderLanes) { renderLanes ))); markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: if (null === current && isHydrating) { @@ -6913,26 +6901,37 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), - updateForwardRef(current, workInProgress, Component, init, renderLanes) + : resolveDefaultProps(elementType, init)), + updateForwardRef( + current, + workInProgress, + elementType, + init, + renderLanes + ) ); case 7: return ( @@ -6966,13 +6965,13 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = init.value; - pushProvider(workInProgress, Component, nextState); + pushProvider(workInProgress, elementType, nextState); if (!enableLazyContextPropagation && null !== prevState) if (objectIs(prevState.value, nextState)) { if (prevState.children === init.children) { @@ -6983,7 +6982,8 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); + } else + propagateContextChange(workInProgress, elementType, renderLanes); reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } @@ -6993,23 +6993,23 @@ function beginWork(current, workInProgress, renderLanes) { (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), - (Component = Component(init)), + (elementType = elementType(init)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (init = resolveDefaultProps(Component, workInProgress.pendingProps)), - (init = resolveDefaultProps(Component.type, init)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, + elementType, init, renderLanes ) @@ -7024,33 +7024,51 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), + (elementType = workInProgress.type), (init = workInProgress.pendingProps), (init = - workInProgress.elementType === Component + workInProgress.elementType === elementType ? init - : resolveDefaultProps(Component, init)), + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, init), - mountClassInstance(workInProgress, Component, init, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, !1, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: return ( - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 22: @@ -7060,7 +7078,7 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), null === init && @@ -7070,7 +7088,10 @@ function beginWork(current, workInProgress, renderLanes) { prevState.refCount++, null !== prevState && (init.pooledCacheLanes |= renderLanes), (init = prevState)), - (workInProgress.memoizedState = { parent: Component, cache: init }), + (workInProgress.memoizedState = { + parent: elementType, + cache: init + }), initializeUpdateQueue(workInProgress), pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && @@ -7079,17 +7100,17 @@ function beginWork(current, workInProgress, renderLanes) { suspendIfUpdateReadFromEntangledAsyncAction()), (init = current.memoizedState), (prevState = workInProgress.memoizedState), - init.parent !== Component - ? ((init = { parent: Component, cache: Component }), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = init), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = prevState.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== init.cache && + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = prevState.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -7108,22 +7129,22 @@ function beginWork(current, workInProgress, renderLanes) { return ( enableTransitionTracing ? (null === current && - ((Component = enableTransitionTracing + ((elementType = enableTransitionTracing ? transitionStack.current : null), - null !== Component && - ((Component = { + null !== elementType && + ((elementType = { tag: 1, - transitions: new Set(Component), + transitions: new Set(elementType), pendingBoundaries: null, name: workInProgress.pendingProps.name, aborts: null }), - (workInProgress.stateNode = Component), + (workInProgress.stateNode = elementType), (workInProgress.flags |= 2048))), - (Component = workInProgress.stateNode), - null !== Component && - pushMarkerInstance(workInProgress, Component), + (elementType = workInProgress.stateNode), + null !== elementType && + pushMarkerInstance(workInProgress, elementType), reconcileChildren( current, workInProgress, @@ -7635,14 +7656,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$110 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$110 = lastTailNode), + for (var lastTailNode$114 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$114 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$110 + null === lastTailNode$114 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$110.sibling = null); + : (lastTailNode$114.sibling = null); } } function bubbleProperties(completedWork) { @@ -7652,19 +7673,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$111 = completedWork.child; null !== child$111; ) - (newChildLanes |= child$111.lanes | child$111.childLanes), - (subtreeFlags |= child$111.subtreeFlags & 31457280), - (subtreeFlags |= child$111.flags & 31457280), - (child$111.return = completedWork), - (child$111 = child$111.sibling); + for (var child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags & 31457280), + (subtreeFlags |= child$115.flags & 31457280), + (child$115.return = completedWork), + (child$115 = child$115.sibling); else - for (child$111 = completedWork.child; null !== child$111; ) - (newChildLanes |= child$111.lanes | child$111.childLanes), - (subtreeFlags |= child$111.subtreeFlags), - (subtreeFlags |= child$111.flags), - (child$111.return = completedWork), - (child$111 = child$111.sibling); + for (child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags), + (subtreeFlags |= child$115.flags), + (child$115.return = completedWork), + (child$115 = child$115.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7673,10 +7694,10 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -7974,11 +7995,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$123 = null; + var cache$127 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$123 = newProps.memoizedState.cachePool.pool); - cache$123 !== currentResource && (newProps.flags |= 2048); + (cache$127 = newProps.memoizedState.cachePool.pool); + cache$127 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8015,8 +8036,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$123 = currentResource.rendering; - if (null === cache$123) + cache$127 = currentResource.rendering; + if (null === cache$127) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8024,11 +8045,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$123 = findFirstSuspended(current); - if (null !== cache$123) { + cache$127 = findFirstSuspended(current); + if (null !== cache$127) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$123.updateQueue; + current = cache$127.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8053,7 +8074,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$123)), null !== current)) { + if (((current = findFirstSuspended(cache$127)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8063,7 +8084,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$123.alternate && + !cache$127.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8076,13 +8097,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$123.sibling = workInProgress.child), - (workInProgress.child = cache$123)) + ? ((cache$127.sibling = workInProgress.child), + (workInProgress.child = cache$127)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$123) - : (workInProgress.child = cache$123), - (currentResource.last = cache$123)); + ? (current.sibling = cache$127) + : (workInProgress.child = cache$127), + (currentResource.last = cache$127)); } if (null !== currentResource.tail) return ( @@ -8338,8 +8359,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$140) { - captureCommitPhaseError(current, nearestMountedAncestor, error$140); + } catch (error$144) { + captureCommitPhaseError(current, nearestMountedAncestor, error$144); } else ref.current = null; } @@ -8376,7 +8397,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$197) { + } catch (e$201) { JSCompiler_temp = null; break a; } @@ -8655,11 +8676,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$142) { + } catch (error$146) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$142 + error$146 ); } } @@ -9339,8 +9360,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$155) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$155); + } catch (error$159) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$159); } } break; @@ -9512,11 +9533,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$156) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$156 + error$160 ); } } @@ -9554,8 +9575,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$157) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$157); + } catch (error$161) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$161); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9566,8 +9587,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$160) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$160); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } } break; @@ -9581,8 +9602,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$161) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$161); + } catch (error$165) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$165); } } break; @@ -9596,8 +9617,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } break; case 4: @@ -9627,8 +9648,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$164) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$164); + } catch (error$168) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$168); } current = finishedWork.updateQueue; null !== current && @@ -9706,11 +9727,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$145) { + } catch (error$149) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$145 + error$149 ); } } else if ( @@ -9785,21 +9806,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$146 = JSCompiler_inline_result.stateNode; + var parent$150 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$146, ""), + (setTextContent(parent$150, ""), (JSCompiler_inline_result.flags &= -33)); - var before$147 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$147, parent$146); + var before$151 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$151, parent$150); break; case 3: case 4: - var parent$148 = JSCompiler_inline_result.stateNode.containerInfo, - before$149 = getHostSibling(finishedWork); + var parent$152 = JSCompiler_inline_result.stateNode.containerInfo, + before$153 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$149, - parent$148 + before$153, + parent$152 ); break; default: @@ -10269,9 +10290,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$171 = finishedWork.stateNode; + var instance$175 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$171._visibility & 4 + ? instance$175._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10284,7 +10305,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$171._visibility |= 4), + : ((instance$175._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10292,7 +10313,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$171._visibility |= 4), + : ((instance$175._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10305,7 +10326,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$171 + instance$175 ); break; case 24: @@ -11461,8 +11482,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$180) { - handleThrow(root, thrownValue$180); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); lanes && root.shellSuspendCounter++; @@ -11567,8 +11588,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$182) { - handleThrow(root, thrownValue$182); + } catch (thrownValue$186) { + handleThrow(root, thrownValue$186); } while (1); resetContextDependencies(); @@ -11594,8 +11615,6 @@ function performUnitOfWork(unitOfWork) { function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -11793,12 +11812,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$186 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$190 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$186 && + shouldFireAfterActiveInstanceBlur$190 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11870,7 +11889,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$187 = rootWithPendingPassiveEffects, + var root$191 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11886,7 +11905,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$187, remainingLanes); + releaseRootPooledCache(root$191, remainingLanes); } } return !1; @@ -12091,16 +12110,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -12178,7 +12187,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) @@ -12496,12 +12505,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$189 = fiber.stateNode; - if (root$189.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$189.pendingLanes); + var root$193 = fiber.stateNode; + if (root$193.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$193.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$189, lanes), - ensureRootIsScheduled(root$189), + (upgradePendingLanesToSync(root$193, lanes), + ensureRootIsScheduled(root$193), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13727,19 +13736,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$342; + var JSCompiler_inline_result$jscomp$346; if (canUseDOM) { - var isSupported$jscomp$inline_1511 = "oninput" in document; - if (!isSupported$jscomp$inline_1511) { - var element$jscomp$inline_1512 = document.createElement("div"); - element$jscomp$inline_1512.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1511 = - "function" === typeof element$jscomp$inline_1512.oninput; + var isSupported$jscomp$inline_1508 = "oninput" in document; + if (!isSupported$jscomp$inline_1508) { + var element$jscomp$inline_1509 = document.createElement("div"); + element$jscomp$inline_1509.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1508 = + "function" === typeof element$jscomp$inline_1509.oninput; } - JSCompiler_inline_result$jscomp$342 = isSupported$jscomp$inline_1511; - } else JSCompiler_inline_result$jscomp$342 = !1; + JSCompiler_inline_result$jscomp$346 = isSupported$jscomp$inline_1508; + } else JSCompiler_inline_result$jscomp$346 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$342 && + JSCompiler_inline_result$jscomp$346 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14048,20 +14057,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1552 = 0; - i$jscomp$inline_1552 < simpleEventPluginEvents.length; - i$jscomp$inline_1552++ + var i$jscomp$inline_1549 = 0; + i$jscomp$inline_1549 < simpleEventPluginEvents.length; + i$jscomp$inline_1549++ ) { - var eventName$jscomp$inline_1553 = - simpleEventPluginEvents[i$jscomp$inline_1552], - domEventName$jscomp$inline_1554 = - eventName$jscomp$inline_1553.toLowerCase(), - capitalizedEvent$jscomp$inline_1555 = - eventName$jscomp$inline_1553[0].toUpperCase() + - eventName$jscomp$inline_1553.slice(1); + var eventName$jscomp$inline_1550 = + simpleEventPluginEvents[i$jscomp$inline_1549], + domEventName$jscomp$inline_1551 = + eventName$jscomp$inline_1550.toLowerCase(), + capitalizedEvent$jscomp$inline_1552 = + eventName$jscomp$inline_1550[0].toUpperCase() + + eventName$jscomp$inline_1550.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1554, - "on" + capitalizedEvent$jscomp$inline_1555 + domEventName$jscomp$inline_1551, + "on" + capitalizedEvent$jscomp$inline_1552 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15532,14 +15541,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$224 in nextProps) { - var propKey = nextProps[propKey$224]; - lastProp = lastProps[propKey$224]; + for (var propKey$228 in nextProps) { + var propKey = nextProps[propKey$228]; + lastProp = lastProps[propKey$228]; if ( - nextProps.hasOwnProperty(propKey$224) && + nextProps.hasOwnProperty(propKey$228) && (null != propKey || null != lastProp) ) - switch (propKey$224) { + switch (propKey$228) { case "type": type = propKey; break; @@ -15568,7 +15577,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$224, + propKey$228, propKey, nextProps, lastProp @@ -15587,7 +15596,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$224 = null; + propKey = value = defaultValue = propKey$228 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15618,7 +15627,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$224 = type; + propKey$228 = type; break; case "defaultValue": defaultValue = type; @@ -15639,15 +15648,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$224 - ? updateOptions(domElement, !!lastProps, propKey$224, !1) + null != propKey$228 + ? updateOptions(domElement, !!lastProps, propKey$228, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$224 = null; + propKey = propKey$228 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15671,7 +15680,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$224 = name; + propKey$228 = name; break; case "defaultValue": propKey = name; @@ -15685,17 +15694,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$224, propKey); + updateTextarea(domElement, propKey$228, propKey); return; case "option": - for (var propKey$240 in lastProps) + for (var propKey$244 in lastProps) if ( - ((propKey$224 = lastProps[propKey$240]), - lastProps.hasOwnProperty(propKey$240) && - null != propKey$224 && - !nextProps.hasOwnProperty(propKey$240)) + ((propKey$228 = lastProps[propKey$244]), + lastProps.hasOwnProperty(propKey$244) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$244)) ) - switch (propKey$240) { + switch (propKey$244) { case "selected": domElement.selected = !1; break; @@ -15703,33 +15712,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$240, + propKey$244, null, nextProps, - propKey$224 + propKey$228 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$224 = nextProps[lastDefaultValue]), + ((propKey$228 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$224 !== propKey && - (null != propKey$224 || null != propKey)) + propKey$228 !== propKey && + (null != propKey$228 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$224 && - "function" !== typeof propKey$224 && - "symbol" !== typeof propKey$224; + propKey$228 && + "function" !== typeof propKey$228 && + "symbol" !== typeof propKey$228; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$224, + propKey$228, nextProps, propKey ); @@ -15750,24 +15759,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$245 in lastProps) - (propKey$224 = lastProps[propKey$245]), - lastProps.hasOwnProperty(propKey$245) && - null != propKey$224 && - !nextProps.hasOwnProperty(propKey$245) && - setProp(domElement, tag, propKey$245, null, nextProps, propKey$224); + for (var propKey$249 in lastProps) + (propKey$228 = lastProps[propKey$249]), + lastProps.hasOwnProperty(propKey$249) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$249) && + setProp(domElement, tag, propKey$249, null, nextProps, propKey$228); for (checked in nextProps) if ( - ((propKey$224 = nextProps[checked]), + ((propKey$228 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$224 !== propKey && - (null != propKey$224 || null != propKey)) + propKey$228 !== propKey && + (null != propKey$228 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$224) + if (null != propKey$228) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15775,7 +15784,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$224, + propKey$228, nextProps, propKey ); @@ -15783,49 +15792,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$250 in lastProps) - (propKey$224 = lastProps[propKey$250]), - lastProps.hasOwnProperty(propKey$250) && - void 0 !== propKey$224 && - !nextProps.hasOwnProperty(propKey$250) && + for (var propKey$254 in lastProps) + (propKey$228 = lastProps[propKey$254]), + lastProps.hasOwnProperty(propKey$254) && + void 0 !== propKey$228 && + !nextProps.hasOwnProperty(propKey$254) && setPropOnCustomElement( domElement, tag, - propKey$250, + propKey$254, void 0, nextProps, - propKey$224 + propKey$228 ); for (defaultChecked in nextProps) - (propKey$224 = nextProps[defaultChecked]), + (propKey$228 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$224 === propKey || - (void 0 === propKey$224 && void 0 === propKey) || + propKey$228 === propKey || + (void 0 === propKey$228 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$224, + propKey$228, nextProps, propKey ); return; } } - for (var propKey$255 in lastProps) - (propKey$224 = lastProps[propKey$255]), - lastProps.hasOwnProperty(propKey$255) && - null != propKey$224 && - !nextProps.hasOwnProperty(propKey$255) && - setProp(domElement, tag, propKey$255, null, nextProps, propKey$224); + for (var propKey$259 in lastProps) + (propKey$228 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$259) && + setProp(domElement, tag, propKey$259, null, nextProps, propKey$228); for (lastProp in nextProps) - (propKey$224 = nextProps[lastProp]), + (propKey$228 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$224 === propKey || - (null == propKey$224 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$224, nextProps, propKey); + propKey$228 === propKey || + (null == propKey$228 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$228, nextProps, propKey); } var ReactDOMCurrentDispatcher$1 = Internals.ReactDOMCurrentDispatcher, eventsEnabled = null, @@ -16440,17 +16449,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$263 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$264 = styles$263.get(type); - resource$264 || + var styles$267 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$268 = styles$267.get(type); + resource$268 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$264 = { + (resource$268 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$263.set(type, resource$264), + styles$267.set(type, resource$268), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16465,9 +16474,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$264.state + resource$268.state )); - return resource$264; + return resource$268; } return null; case "script": @@ -16550,37 +16559,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$268 = hoistableRoot.querySelector( + var instance$272 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$268) + if (instance$272) return ( (resource.state.loading |= 4), - (resource.instance = instance$268), - markNodeAsHoistable(instance$268), - instance$268 + (resource.instance = instance$272), + markNodeAsHoistable(instance$272), + instance$272 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$268 = ( + instance$272 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$268); - var linkInstance = instance$268; + markNodeAsHoistable(instance$272); + var linkInstance = instance$272; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$268, "link", instance); + setInitialProperties(instance$272, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$268, props.precedence, hoistableRoot); - return (resource.instance = instance$268); + insertStylesheet(instance$272, props.precedence, hoistableRoot); + return (resource.instance = instance$272); case "script": - instance$268 = getScriptKey(props.src); + instance$272 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$268) + getScriptSelectorFromKey(instance$272) )) ) return ( @@ -16589,7 +16598,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$268))) + if ((styleProps = preloadPropsMap.get(instance$272))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16968,17 +16977,17 @@ Internals.Events = [ restoreStateIfNeeded, unstable_batchedUpdates ]; -var devToolsConfig$jscomp$inline_1710 = { +var devToolsConfig$jscomp$inline_1707 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-7feddd56", + version: "19.0.0-www-modern-efc491b3", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2116 = { - bundleType: devToolsConfig$jscomp$inline_1710.bundleType, - version: devToolsConfig$jscomp$inline_1710.version, - rendererPackageName: devToolsConfig$jscomp$inline_1710.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1710.rendererConfig, +var internals$jscomp$inline_2110 = { + bundleType: devToolsConfig$jscomp$inline_1707.bundleType, + version: devToolsConfig$jscomp$inline_1707.version, + rendererPackageName: devToolsConfig$jscomp$inline_1707.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1707.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -16994,26 +17003,26 @@ var internals$jscomp$inline_2116 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1710.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1707.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-7feddd56" + reconcilerVersion: "19.0.0-www-modern-efc491b3" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2117 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2111 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2117.isDisabled && - hook$jscomp$inline_2117.supportsFiber + !hook$jscomp$inline_2111.isDisabled && + hook$jscomp$inline_2111.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2117.inject( - internals$jscomp$inline_2116 + (rendererID = hook$jscomp$inline_2111.inject( + internals$jscomp$inline_2110 )), - (injectedHook = hook$jscomp$inline_2117); + (injectedHook = hook$jscomp$inline_2111); } catch (err) {} } if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog) @@ -17427,4 +17436,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-7feddd56"; +exports.version = "19.0.0-www-modern-efc491b3"; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 9727ef839b..0e741ad445 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -148,8 +148,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -176,6 +174,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; // ATTENTION // When adding new symbols to this file, @@ -423,7 +422,6 @@ if (__DEV__) { case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -2731,7 +2729,6 @@ if (__DEV__) { return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -5062,7 +5059,6 @@ if (__DEV__) { return describeBuiltInComponentFrame("SuspenseList"); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); @@ -12424,17 +12420,6 @@ if (__DEV__) { } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = false; var unmaskedContext = emptyContextObject; @@ -12498,7 +12483,14 @@ if (__DEV__) { instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -13449,6 +13441,14 @@ if (__DEV__) { update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -13759,7 +13759,6 @@ if (__DEV__) { ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -13770,7 +13769,6 @@ if (__DEV__) { { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -14376,6 +14374,24 @@ if (__DEV__) { } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -14383,6 +14399,39 @@ if (__DEV__) { nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + } + } + var context; { @@ -14813,70 +14862,68 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + + { + workInProgress.type = Component = + resolveClassForHotReloading(Component); + } + + return updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + workInProgress.tag = FunctionComponent; + { validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = resolveFunctionForHotReloading(Component); } - child = updateFunctionComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; - case ClassComponent: { - { - workInProgress.type = Component = - resolveClassForHotReloading(Component); - } + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - child = updateClassComponent( - null, - workInProgress, - Component, - resolvedProps, - renderLanes - ); - return child; - } - - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -14938,108 +14985,6 @@ if (__DEV__) { ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - { - var unmaskedContext = getUnmaskedContext( - workInProgress, - Component, - false - ); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - prepareToReadContext(workInProgress, renderLanes); - var value; - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$1.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - setIsRendering(false); - } - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -15076,33 +15021,32 @@ if (__DEV__) { } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -15111,16 +15055,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -16820,15 +16764,6 @@ if (__DEV__) { workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -16973,6 +16908,24 @@ if (__DEV__) { ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -18168,10 +18121,10 @@ if (__DEV__) { var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -24281,12 +24234,6 @@ if (__DEV__) { } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -25414,7 +25361,6 @@ if (__DEV__) { var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -26200,22 +26146,8 @@ if (__DEV__) { type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -26300,7 +26232,6 @@ if (__DEV__) { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -26426,7 +26357,7 @@ if (__DEV__) { mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; @@ -26829,7 +26760,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-2fc232e4"; + var ReactVersion = "19.0.0-www-classic-ac0a3da0"; // Might add PROFILE later. diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 85dc5d938f..5bd96afc97 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -148,8 +148,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -176,6 +174,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; // ATTENTION // When adding new symbols to this file, @@ -423,7 +422,6 @@ if (__DEV__) { case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -2731,7 +2729,6 @@ if (__DEV__) { return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -5062,7 +5059,6 @@ if (__DEV__) { return describeBuiltInComponentFrame("SuspenseList"); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); @@ -12424,17 +12420,6 @@ if (__DEV__) { } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = false; var unmaskedContext = emptyContextObject; @@ -12498,7 +12483,14 @@ if (__DEV__) { instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -13449,6 +13441,14 @@ if (__DEV__) { update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -13759,7 +13759,6 @@ if (__DEV__) { ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -13770,7 +13769,6 @@ if (__DEV__) { { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -14376,6 +14374,24 @@ if (__DEV__) { } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -14383,6 +14399,39 @@ if (__DEV__) { nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + } + } + var context; { @@ -14813,70 +14862,68 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + + { + workInProgress.type = Component = + resolveClassForHotReloading(Component); + } + + return updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + workInProgress.tag = FunctionComponent; + { validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = resolveFunctionForHotReloading(Component); } - child = updateFunctionComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; - case ClassComponent: { - { - workInProgress.type = Component = - resolveClassForHotReloading(Component); - } + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - child = updateClassComponent( - null, - workInProgress, - Component, - resolvedProps, - renderLanes - ); - return child; - } - - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -14938,108 +14985,6 @@ if (__DEV__) { ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - { - var unmaskedContext = getUnmaskedContext( - workInProgress, - Component, - false - ); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - prepareToReadContext(workInProgress, renderLanes); - var value; - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$1.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - setIsRendering(false); - } - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -15076,33 +15021,32 @@ if (__DEV__) { } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -15111,16 +15055,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -16820,15 +16764,6 @@ if (__DEV__) { workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -16973,6 +16908,24 @@ if (__DEV__) { ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -18168,10 +18121,10 @@ if (__DEV__) { var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -24281,12 +24234,6 @@ if (__DEV__) { } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -25414,7 +25361,6 @@ if (__DEV__) { var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -26200,22 +26146,8 @@ if (__DEV__) { type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -26300,7 +26232,6 @@ if (__DEV__) { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -26426,7 +26357,7 @@ if (__DEV__) { mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; @@ -26829,7 +26760,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-2fc232e4"; + var ReactVersion = "19.0.0-www-modern-ac0a3da0"; // Might add PROFILE later. diff --git a/compiled/facebook-www/ReactTestUtils-dev.classic.js b/compiled/facebook-www/ReactTestUtils-dev.classic.js index fdd99a6100..5c58d54d96 100644 --- a/compiled/facebook-www/ReactTestUtils-dev.classic.js +++ b/compiled/facebook-www/ReactTestUtils-dev.classic.js @@ -98,7 +98,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostComponent = 5; diff --git a/compiled/facebook-www/ReactTestUtils-dev.modern.js b/compiled/facebook-www/ReactTestUtils-dev.modern.js index fdd99a6100..5c58d54d96 100644 --- a/compiled/facebook-www/ReactTestUtils-dev.modern.js +++ b/compiled/facebook-www/ReactTestUtils-dev.modern.js @@ -98,7 +98,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostComponent = 5; diff --git a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js index 16031ebe77..b4ff524678 100644 --- a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js +++ b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js @@ -273,7 +273,6 @@ export default [ "Symbols are not valid as a React child.\n root.render(%s)", "Text strings must be rendered within a component.", "Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components", - "The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", "The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", "The `%s` prop supplied to must be a scalar value if `multiple` is false.%s",