Skip to content

Instantly share code, notes, and snippets.

@jiahut
Last active July 9, 2025 07:46
Show Gist options
  • Save jiahut/c0aaadb2b2f2a402b12bae75c035b74a to your computer and use it in GitHub Desktop.
Save jiahut/c0aaadb2b2f2a402b12bae75c035b74a to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
#!/usr/bin/env node
import { createRequire } from 'module'; const require = createRequire(import.meta.url); globalThis.__filename = require('url').fileURLToPath(import.meta.url); globalThis.__dirname = require('path').dirname(globalThis.__filename);
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x2)(function(x2) {
if (typeof require !== "undefined") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x2 + '" is not supported');
});
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod2) => function __require2() {
return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
};
var __export = (target, all2) => {
for (var name2 in all2)
__defProp(target, name2, { get: all2[name2], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target,
mod2
));
var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2);
// node_modules/react/cjs/react.production.js
var require_react_production = __commonJS({
"node_modules/react/cjs/react.production.js"(exports2) {
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
var REACT_MEMO_TYPE = Symbol.for("react.memo");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
var ReactNoopUpdateQueue = {
isMounted: function() {
return false;
},
enqueueForceUpdate: function() {
},
enqueueReplaceState: function() {
},
enqueueSetState: function() {
}
};
var assign = Object.assign;
var emptyObject = {};
function Component(props, context2, updater) {
this.props = props;
this.context = context2;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
Component.prototype.isReactComponent = {};
Component.prototype.setState = function(partialState, callback) {
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
throw Error(
"takes an object of state variables to update or a function which returns an object of state variables."
);
this.updater.enqueueSetState(this, partialState, callback, "setState");
};
Component.prototype.forceUpdate = function(callback) {
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
};
function ComponentDummy() {
}
ComponentDummy.prototype = Component.prototype;
function PureComponent2(props, context2, updater) {
this.props = props;
this.context = context2;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
var pureComponentPrototype = PureComponent2.prototype = new ComponentDummy();
pureComponentPrototype.constructor = PureComponent2;
assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = true;
var isArrayImpl = Array.isArray;
var ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null };
var hasOwnProperty = Object.prototype.hasOwnProperty;
function ReactElement(type, key, self2, source2, owner, props) {
self2 = props.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type,
key,
ref: void 0 !== self2 ? self2 : null,
props
};
}
function cloneAndReplaceKey(oldElement, newKey) {
return ReactElement(
oldElement.type,
newKey,
void 0,
void 0,
void 0,
oldElement.props
);
}
function isValidElement(object) {
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
}
function escape6(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return "$" + key.replace(/[=:]/g, function(match2) {
return escaperLookup[match2];
});
}
var userProvidedKeyEscapeRegex = /\/+/g;
function getElementKey(element, index) {
return "object" === typeof element && null !== element && null != element.key ? escape6("" + element.key) : index.toString(36);
}
function noop$1() {
}
function resolveThenable(thenable) {
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
default:
switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
function(fulfilledValue) {
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
},
function(error) {
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
}
)), thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = false;
if (null === children) invokeCallback = true;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = true;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = true;
break;
case REACT_LAZY_TYPE:
return invokeCallback = children._init, mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
);
}
}
if (invokeCallback)
return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c3) {
return c3;
})) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
callback,
escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
userProvidedKeyEscapeRegex,
"$&/"
) + "/") + invokeCallback
)), array.push(callback)), 1;
invokeCallback = 0;
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i2 = 0; i2 < children.length; i2++)
nameSoFar = children[i2], type = nextNamePrefix + getElementKey(nameSoFar, i2), invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
);
else if (i2 = getIteratorFn(children), "function" === typeof i2)
for (children = i2.call(children), i2 = 0; !(nameSoFar = children.next()).done; )
nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i2++), invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
);
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
);
}
return invokeCallback;
}
function mapChildren(children, func, context2) {
if (null == children) return children;
var result = [], count = 0;
mapIntoArray(children, result, "", "", function(child) {
return func.call(context2, child, count++);
});
return result;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ctor = payload._result;
ctor = ctor();
ctor.then(
function(moduleObject) {
if (0 === payload._status || -1 === payload._status)
payload._status = 1, payload._result = moduleObject;
},
function(error) {
if (0 === payload._status || -1 === payload._status)
payload._status = 2, payload._result = error;
}
);
-1 === payload._status && (payload._status = 0, payload._result = ctor);
}
if (1 === payload._status) return payload._result.default;
throw payload._result;
}
var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
var event = new window.ErrorEvent("error", {
bubbles: true,
cancelable: true,
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
error
});
if (!window.dispatchEvent(event)) return;
} else if ("object" === typeof process && "function" === typeof process.emit) {
process.emit("uncaughtException", error);
return;
}
console.error(error);
};
function noop4() {
}
exports2.Children = {
map: mapChildren,
forEach: function(children, forEachFunc, forEachContext) {
mapChildren(
children,
function() {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function(children) {
var n2 = 0;
mapChildren(children, function() {
n2++;
});
return n2;
},
toArray: function(children) {
return mapChildren(children, function(child) {
return child;
}) || [];
},
only: function(children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."
);
return children;
}
};
exports2.Component = Component;
exports2.Fragment = REACT_FRAGMENT_TYPE;
exports2.Profiler = REACT_PROFILER_TYPE;
exports2.PureComponent = PureComponent2;
exports2.StrictMode = REACT_STRICT_MODE_TYPE;
exports2.Suspense = REACT_SUSPENSE_TYPE;
exports2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
exports2.__COMPILER_RUNTIME = {
__proto__: null,
c: function(size) {
return ReactSharedInternals.H.useMemoCache(size);
}
};
exports2.cache = function(fn) {
return function() {
return fn.apply(null, arguments);
};
};
exports2.cloneElement = function(element, config2, children) {
if (null === element || void 0 === element)
throw Error(
"The argument must be a React element, but you passed " + element + "."
);
var props = assign({}, element.props), key = element.key, owner = void 0;
if (null != config2)
for (propName in void 0 !== config2.ref && (owner = void 0), void 0 !== config2.key && (key = "" + config2.key), config2)
!hasOwnProperty.call(config2, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config2.ref || (props[propName] = config2[propName]);
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
for (var childArray = Array(propName), i2 = 0; i2 < propName; i2++)
childArray[i2] = arguments[i2 + 2];
props.children = childArray;
}
return ReactElement(element.type, key, void 0, void 0, owner, props);
};
exports2.createContext = function(defaultValue) {
defaultValue = {
$$typeof: REACT_CONTEXT_TYPE,
_currentValue: defaultValue,
_currentValue2: defaultValue,
_threadCount: 0,
Provider: null,
Consumer: null
};
defaultValue.Provider = defaultValue;
defaultValue.Consumer = {
$$typeof: REACT_CONSUMER_TYPE,
_context: defaultValue
};
return defaultValue;
};
exports2.createElement = function(type, config2, children) {
var propName, props = {}, key = null;
if (null != config2)
for (propName in void 0 !== config2.key && (key = "" + config2.key), config2)
hasOwnProperty.call(config2, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config2[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) props.children = children;
else if (1 < childrenLength) {
for (var childArray = Array(childrenLength), i2 = 0; i2 < childrenLength; i2++)
childArray[i2] = arguments[i2 + 2];
props.children = childArray;
}
if (type && type.defaultProps)
for (propName in childrenLength = type.defaultProps, childrenLength)
void 0 === props[propName] && (props[propName] = childrenLength[propName]);
return ReactElement(type, key, void 0, void 0, null, props);
};
exports2.createRef = function() {
return { current: null };
};
exports2.forwardRef = function(render3) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render3 };
};
exports2.isValidElement = isValidElement;
exports2.lazy = function(ctor) {
return {
$$typeof: REACT_LAZY_TYPE,
_payload: { _status: -1, _result: ctor },
_init: lazyInitializer
};
};
exports2.memo = function(type, compare) {
return {
$$typeof: REACT_MEMO_TYPE,
type,
compare: void 0 === compare ? null : compare
};
};
exports2.startTransition = function(scope) {
var prevTransition = ReactSharedInternals.T, currentTransition = {};
ReactSharedInternals.T = currentTransition;
try {
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop4, reportGlobalError);
} catch (error) {
reportGlobalError(error);
} finally {
ReactSharedInternals.T = prevTransition;
}
};
exports2.unstable_useCacheRefresh = function() {
return ReactSharedInternals.H.useCacheRefresh();
};
exports2.use = function(usable) {
return ReactSharedInternals.H.use(usable);
};
exports2.useActionState = function(action, initialState, permalink) {
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
};
exports2.useCallback = function(callback, deps) {
return ReactSharedInternals.H.useCallback(callback, deps);
};
exports2.useContext = function(Context) {
return ReactSharedInternals.H.useContext(Context);
};
exports2.useDebugValue = function() {
};
exports2.useDeferredValue = function(value, initialValue) {
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
};
exports2.useEffect = function(create2, createDeps, update) {
var dispatcher = ReactSharedInternals.H;
if ("function" === typeof update)
throw Error(
"useEffect CRUD overload is not enabled in this build of React."
);
return dispatcher.useEffect(create2, createDeps);
};
exports2.useId = function() {
return ReactSharedInternals.H.useId();
};
exports2.useImperativeHandle = function(ref, create2, deps) {
return ReactSharedInternals.H.useImperativeHandle(ref, create2, deps);
};
exports2.useInsertionEffect = function(create2, deps) {
return ReactSharedInternals.H.useInsertionEffect(create2, deps);
};
exports2.useLayoutEffect = function(create2, deps) {
return ReactSharedInternals.H.useLayoutEffect(create2, deps);
};
exports2.useMemo = function(create2, deps) {
return ReactSharedInternals.H.useMemo(create2, deps);
};
exports2.useOptimistic = function(passthrough, reducer) {
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
};
exports2.useReducer = function(reducer, initialArg, init) {
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
};
exports2.useRef = function(initialValue) {
return ReactSharedInternals.H.useRef(initialValue);
};
exports2.useState = function(initialState) {
return ReactSharedInternals.H.useState(initialState);
};
exports2.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
return ReactSharedInternals.H.useSyncExternalStore(
subscribe,
getSnapshot,
getServerSnapshot
);
};
exports2.useTransition = function() {
return ReactSharedInternals.H.useTransition();
};
exports2.version = "19.1.0";
}
});
// node_modules/react/cjs/react.development.js
var require_react_development = __commonJS({
"node_modules/react/cjs/react.development.js"(exports2, module2) {
"use strict";
"production" !== process.env.NODE_ENV && function() {
function defineDeprecationWarning(methodName, info) {
Object.defineProperty(Component.prototype, methodName, {
get: function() {
console.warn(
"%s(...) is deprecated in plain JavaScript React classes. %s",
info[0],
info[1]
);
}
});
}
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable)
return null;
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
function warnNoop(publicInstance, callerName) {
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
var warningKey = publicInstance + "." + callerName;
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
callerName,
publicInstance
), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
}
function Component(props, context2, updater) {
this.props = props;
this.context = context2;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
function ComponentDummy() {
}
function PureComponent2(props, context2, updater) {
this.props = props;
this.context = context2;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = false;
} catch (e3) {
JSCompiler_inline_result = true;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch ("number" === typeof type.tag && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), type.$$typeof) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
return type;
case REACT_MEMO_TYPE:
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x2) {
}
}
return null;
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
return "<...>";
try {
var name2 = getComponentNameFromType(type);
return name2 ? "<" + name2 + ">" : "<...>";
} catch (x2) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config2) {
if (hasOwnProperty.call(config2, "key")) {
var getter = Object.getOwnPropertyDescriptor(config2, "key").get;
if (getter && getter.isReactWarning) return false;
}
return void 0 !== config2.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: true
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, self2, source2, owner, props, debugStack, debugTask) {
self2 = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type,
key,
props,
_owner: owner
};
null !== (void 0 !== self2 ? self2 : null) ? Object.defineProperty(type, "ref", {
enumerable: false,
get: elementRefGetterWithDeprecationWarning
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: false,
enumerable: false,
writable: true,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: false,
enumerable: false,
writable: true,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: false,
enumerable: false,
writable: true,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: false,
enumerable: false,
writable: true,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function cloneAndReplaceKey(oldElement, newKey) {
newKey = ReactElement(
oldElement.type,
newKey,
void 0,
void 0,
oldElement._owner,
oldElement.props,
oldElement._debugStack,
oldElement._debugTask
);
oldElement._store && (newKey._store.validated = oldElement._store.validated);
return newKey;
}
function isValidElement(object) {
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
}
function escape6(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return "$" + key.replace(/[=:]/g, function(match2) {
return escaperLookup[match2];
});
}
function getElementKey(element, index) {
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape6("" + element.key)) : index.toString(36);
}
function noop$1() {
}
function resolveThenable(thenable) {
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
default:
switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
function(fulfilledValue) {
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
},
function(error) {
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
}
)), thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = false;
if (null === children) invokeCallback = true;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = true;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = true;
break;
case REACT_LAZY_TYPE:
return invokeCallback = children._init, mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
);
}
}
if (invokeCallback) {
invokeCallback = children;
callback = callback(invokeCallback);
var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c3) {
return c3;
})) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
callback,
escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
userProvidedKeyEscapeRegex,
"$&/"
) + "/") + childKey
), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
return 1;
}
invokeCallback = 0;
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i2 = 0; i2 < children.length; i2++)
nameSoFar = children[i2], type = childKey + getElementKey(nameSoFar, i2), invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
);
else if (i2 = getIteratorFn(children), "function" === typeof i2)
for (i2 === children.entries && (didWarnAboutMaps || console.warn(
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
), didWarnAboutMaps = true), children = i2.call(children), i2 = 0; !(nameSoFar = children.next()).done; )
nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i2++), invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
);
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
);
}
return invokeCallback;
}
function mapChildren(children, func, context2) {
if (null == children) return children;
var result = [], count = 0;
mapIntoArray(children, result, "", "", function(child) {
return func.call(context2, child, count++);
});
return result;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ctor = payload._result;
ctor = ctor();
ctor.then(
function(moduleObject) {
if (0 === payload._status || -1 === payload._status)
payload._status = 1, payload._result = moduleObject;
},
function(error) {
if (0 === payload._status || -1 === payload._status)
payload._status = 2, payload._result = error;
}
);
-1 === payload._status && (payload._status = 0, payload._result = ctor);
}
if (1 === payload._status)
return ctor = payload._result, void 0 === ctor && console.error(
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
ctor
), "default" in ctor || console.error(
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
ctor
), ctor.default;
throw payload._result;
}
function resolveDispatcher() {
var dispatcher = ReactSharedInternals.H;
null === dispatcher && console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher;
}
function noop4() {
}
function enqueueTask(task) {
if (null === enqueueTaskImpl)
try {
var requireString = ("require" + Math.random()).slice(0, 7);
enqueueTaskImpl = (module2 && module2[requireString]).call(
module2,
"timers"
).setImmediate;
} catch (_err) {
enqueueTaskImpl = function(callback) {
false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
));
var channel = new MessageChannel();
channel.port1.onmessage = callback;
channel.port2.postMessage(void 0);
};
}
return enqueueTaskImpl(task);
}
function aggregateErrors(errors) {
return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
}
function popActScope(prevActQueue, prevActScopeDepth) {
prevActScopeDepth !== actScopeDepth - 1 && console.error(
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
);
actScopeDepth = prevActScopeDepth;
}
function recursivelyFlushAsyncActWork(returnValue, resolve18, reject) {
var queue = ReactSharedInternals.actQueue;
if (null !== queue)
if (0 !== queue.length)
try {
flushActQueue(queue);
enqueueTask(function() {
return recursivelyFlushAsyncActWork(returnValue, resolve18, reject);
});
return;
} catch (error) {
ReactSharedInternals.thrownErrors.push(error);
}
else ReactSharedInternals.actQueue = null;
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve18(returnValue);
}
function flushActQueue(queue) {
if (!isFlushing) {
isFlushing = true;
var i2 = 0;
try {
for (; i2 < queue.length; i2++) {
var callback = queue[i2];
do {
ReactSharedInternals.didUsePromise = false;
var continuation = callback(false);
if (null !== continuation) {
if (ReactSharedInternals.didUsePromise) {
queue[i2] = callback;
queue.splice(0, i2);
return;
}
callback = continuation;
} else break;
} while (1);
}
queue.length = 0;
} catch (error) {
queue.splice(0, i2 + 1), ReactSharedInternals.thrownErrors.push(error);
} finally {
isFlushing = false;
}
}
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
Symbol.for("react.provider");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
isMounted: function() {
return false;
},
enqueueForceUpdate: function(publicInstance) {
warnNoop(publicInstance, "forceUpdate");
},
enqueueReplaceState: function(publicInstance) {
warnNoop(publicInstance, "replaceState");
},
enqueueSetState: function(publicInstance) {
warnNoop(publicInstance, "setState");
}
}, assign = Object.assign, emptyObject = {};
Object.freeze(emptyObject);
Component.prototype.isReactComponent = {};
Component.prototype.setState = function(partialState, callback) {
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
throw Error(
"takes an object of state variables to update or a function which returns an object of state variables."
);
this.updater.enqueueSetState(this, partialState, callback, "setState");
};
Component.prototype.forceUpdate = function(callback) {
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
};
var deprecatedAPIs = {
isMounted: [
"isMounted",
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
],
replaceState: [
"replaceState",
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
]
}, fnName;
for (fnName in deprecatedAPIs)
deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
ComponentDummy.prototype = Component.prototype;
deprecatedAPIs = PureComponent2.prototype = new ComponentDummy();
deprecatedAPIs.constructor = PureComponent2;
assign(deprecatedAPIs, Component.prototype);
deprecatedAPIs.isPureReactComponent = true;
var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = {
H: null,
A: null,
T: null,
S: null,
V: null,
actQueue: null,
isBatchingLegacy: false,
didScheduleLegacyUpdate: false,
didUsePromise: false,
thrownErrors: [],
getCurrentStack: null,
recentlyCreatedOwnerStacks: 0
}, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
return null;
};
deprecatedAPIs = {
"react-stack-bottom-frame": function(callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = deprecatedAPIs["react-stack-bottom-frame"].bind(deprecatedAPIs, UnknownOwner)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
var event = new window.ErrorEvent("error", {
bubbles: true,
cancelable: true,
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
error
});
if (!window.dispatchEvent(event)) return;
} else if ("object" === typeof process && "function" === typeof process.emit) {
process.emit("uncaughtException", error);
return;
}
console.error(error);
}, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
queueMicrotask(function() {
return queueMicrotask(callback);
});
} : enqueueTask;
deprecatedAPIs = Object.freeze({
__proto__: null,
c: function(size) {
return resolveDispatcher().useMemoCache(size);
}
});
exports2.Children = {
map: mapChildren,
forEach: function(children, forEachFunc, forEachContext) {
mapChildren(
children,
function() {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function(children) {
var n2 = 0;
mapChildren(children, function() {
n2++;
});
return n2;
},
toArray: function(children) {
return mapChildren(children, function(child) {
return child;
}) || [];
},
only: function(children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."
);
return children;
}
};
exports2.Component = Component;
exports2.Fragment = REACT_FRAGMENT_TYPE;
exports2.Profiler = REACT_PROFILER_TYPE;
exports2.PureComponent = PureComponent2;
exports2.StrictMode = REACT_STRICT_MODE_TYPE;
exports2.Suspense = REACT_SUSPENSE_TYPE;
exports2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
exports2.__COMPILER_RUNTIME = deprecatedAPIs;
exports2.act = function(callback) {
var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
actScopeDepth++;
var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
try {
var result = callback();
} catch (error) {
ReactSharedInternals.thrownErrors.push(error);
}
if (0 < ReactSharedInternals.thrownErrors.length)
throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
if (null !== result && "object" === typeof result && "function" === typeof result.then) {
var thenable = result;
queueSeveralMicrotasks(function() {
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
));
});
return {
then: function(resolve18, reject) {
didAwaitActCall = true;
thenable.then(
function(returnValue) {
popActScope(prevActQueue, prevActScopeDepth);
if (0 === prevActScopeDepth) {
try {
flushActQueue(queue), enqueueTask(function() {
return recursivelyFlushAsyncActWork(
returnValue,
resolve18,
reject
);
});
} catch (error$0) {
ReactSharedInternals.thrownErrors.push(error$0);
}
if (0 < ReactSharedInternals.thrownErrors.length) {
var _thrownError = aggregateErrors(
ReactSharedInternals.thrownErrors
);
ReactSharedInternals.thrownErrors.length = 0;
reject(_thrownError);
}
} else resolve18(returnValue);
},
function(error) {
popActScope(prevActQueue, prevActScopeDepth);
0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
ReactSharedInternals.thrownErrors
), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
}
);
}
};
}
var returnValue$jscomp$0 = result;
popActScope(prevActQueue, prevActScopeDepth);
0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
));
}), ReactSharedInternals.actQueue = null);
if (0 < ReactSharedInternals.thrownErrors.length)
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
return {
then: function(resolve18, reject) {
didAwaitActCall = true;
0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
return recursivelyFlushAsyncActWork(
returnValue$jscomp$0,
resolve18,
reject
);
})) : resolve18(returnValue$jscomp$0);
}
};
};
exports2.cache = function(fn) {
return function() {
return fn.apply(null, arguments);
};
};
exports2.captureOwnerStack = function() {
var getCurrentStack = ReactSharedInternals.getCurrentStack;
return null === getCurrentStack ? null : getCurrentStack();
};
exports2.cloneElement = function(element, config2, children) {
if (null === element || void 0 === element)
throw Error(
"The argument must be a React element, but you passed " + element + "."
);
var props = assign({}, element.props), key = element.key, owner = element._owner;
if (null != config2) {
var JSCompiler_inline_result;
a: {
if (hasOwnProperty.call(config2, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
config2,
"ref"
).get) && JSCompiler_inline_result.isReactWarning) {
JSCompiler_inline_result = false;
break a;
}
JSCompiler_inline_result = void 0 !== config2.ref;
}
JSCompiler_inline_result && (owner = getOwner());
hasValidKey(config2) && (checkKeyStringCoercion(config2.key), key = "" + config2.key);
for (propName in config2)
!hasOwnProperty.call(config2, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config2.ref || (props[propName] = config2[propName]);
}
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
JSCompiler_inline_result = Array(propName);
for (var i2 = 0; i2 < propName; i2++)
JSCompiler_inline_result[i2] = arguments[i2 + 2];
props.children = JSCompiler_inline_result;
}
props = ReactElement(
element.type,
key,
void 0,
void 0,
owner,
props,
element._debugStack,
element._debugTask
);
for (key = 2; key < arguments.length; key++)
owner = arguments[key], isValidElement(owner) && owner._store && (owner._store.validated = 1);
return props;
};
exports2.createContext = function(defaultValue) {
defaultValue = {
$$typeof: REACT_CONTEXT_TYPE,
_currentValue: defaultValue,
_currentValue2: defaultValue,
_threadCount: 0,
Provider: null,
Consumer: null
};
defaultValue.Provider = defaultValue;
defaultValue.Consumer = {
$$typeof: REACT_CONSUMER_TYPE,
_context: defaultValue
};
defaultValue._currentRenderer = null;
defaultValue._currentRenderer2 = null;
return defaultValue;
};
exports2.createElement = function(type, config2, children) {
for (var i2 = 2; i2 < arguments.length; i2++) {
var node = arguments[i2];
isValidElement(node) && node._store && (node._store.validated = 1);
}
i2 = {};
node = null;
if (null != config2)
for (propName in didWarnAboutOldJSXRuntime || !("__self" in config2) || "key" in config2 || (didWarnAboutOldJSXRuntime = true, console.warn(
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
)), hasValidKey(config2) && (checkKeyStringCoercion(config2.key), node = "" + config2.key), config2)
hasOwnProperty.call(config2, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i2[propName] = config2[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) i2.children = children;
else if (1 < childrenLength) {
for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
childArray[_i] = arguments[_i + 2];
Object.freeze && Object.freeze(childArray);
i2.children = childArray;
}
if (type && type.defaultProps)
for (propName in childrenLength = type.defaultProps, childrenLength)
void 0 === i2[propName] && (i2[propName] = childrenLength[propName]);
node && defineKeyPropWarningGetter(
i2,
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
);
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return ReactElement(
type,
node,
void 0,
void 0,
getOwner(),
i2,
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports2.createRef = function() {
var refObject = { current: null };
Object.seal(refObject);
return refObject;
};
exports2.forwardRef = function(render3) {
null != render3 && render3.$$typeof === REACT_MEMO_TYPE ? console.error(
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
) : "function" !== typeof render3 ? console.error(
"forwardRef requires a render function but was given %s.",
null === render3 ? "null" : typeof render3
) : 0 !== render3.length && 2 !== render3.length && console.error(
"forwardRef render functions accept exactly two parameters: props and ref. %s",
1 === render3.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
);
null != render3 && null != render3.defaultProps && console.error(
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
);
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render3 }, ownName;
Object.defineProperty(elementType, "displayName", {
enumerable: false,
configurable: true,
get: function() {
return ownName;
},
set: function(name2) {
ownName = name2;
render3.name || render3.displayName || (Object.defineProperty(render3, "name", { value: name2 }), render3.displayName = name2);
}
});
return elementType;
};
exports2.isValidElement = isValidElement;
exports2.lazy = function(ctor) {
return {
$$typeof: REACT_LAZY_TYPE,
_payload: { _status: -1, _result: ctor },
_init: lazyInitializer
};
};
exports2.memo = function(type, compare) {
null == type && console.error(
"memo: The first argument must be a component. Instead received: %s",
null === type ? "null" : typeof type
);
compare = {
$$typeof: REACT_MEMO_TYPE,
type,
compare: void 0 === compare ? null : compare
};
var ownName;
Object.defineProperty(compare, "displayName", {
enumerable: false,
configurable: true,
get: function() {
return ownName;
},
set: function(name2) {
ownName = name2;
type.name || type.displayName || (Object.defineProperty(type, "name", { value: name2 }), type.displayName = name2);
}
});
return compare;
};
exports2.startTransition = function(scope) {
var prevTransition = ReactSharedInternals.T, currentTransition = {};
ReactSharedInternals.T = currentTransition;
currentTransition._updatedFibers = /* @__PURE__ */ new Set();
try {
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop4, reportGlobalError);
} catch (error) {
reportGlobalError(error);
} finally {
null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
)), ReactSharedInternals.T = prevTransition;
}
};
exports2.unstable_useCacheRefresh = function() {
return resolveDispatcher().useCacheRefresh();
};
exports2.use = function(usable) {
return resolveDispatcher().use(usable);
};
exports2.useActionState = function(action, initialState, permalink) {
return resolveDispatcher().useActionState(
action,
initialState,
permalink
);
};
exports2.useCallback = function(callback, deps) {
return resolveDispatcher().useCallback(callback, deps);
};
exports2.useContext = function(Context) {
var dispatcher = resolveDispatcher();
Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
);
return dispatcher.useContext(Context);
};
exports2.useDebugValue = function(value, formatterFn) {
return resolveDispatcher().useDebugValue(value, formatterFn);
};
exports2.useDeferredValue = function(value, initialValue) {
return resolveDispatcher().useDeferredValue(value, initialValue);
};
exports2.useEffect = function(create2, createDeps, update) {
null == create2 && console.warn(
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
);
var dispatcher = resolveDispatcher();
if ("function" === typeof update)
throw Error(
"useEffect CRUD overload is not enabled in this build of React."
);
return dispatcher.useEffect(create2, createDeps);
};
exports2.useId = function() {
return resolveDispatcher().useId();
};
exports2.useImperativeHandle = function(ref, create2, deps) {
return resolveDispatcher().useImperativeHandle(ref, create2, deps);
};
exports2.useInsertionEffect = function(create2, deps) {
null == create2 && console.warn(
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
);
return resolveDispatcher().useInsertionEffect(create2, deps);
};
exports2.useLayoutEffect = function(create2, deps) {
null == create2 && console.warn(
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
);
return resolveDispatcher().useLayoutEffect(create2, deps);
};
exports2.useMemo = function(create2, deps) {
return resolveDispatcher().useMemo(create2, deps);
};
exports2.useOptimistic = function(passthrough, reducer) {
return resolveDispatcher().useOptimistic(passthrough, reducer);
};
exports2.useReducer = function(reducer, initialArg, init) {
return resolveDispatcher().useReducer(reducer, initialArg, init);
};
exports2.useRef = function(initialValue) {
return resolveDispatcher().useRef(initialValue);
};
exports2.useState = function(initialState) {
return resolveDispatcher().useState(initialState);
};
exports2.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
return resolveDispatcher().useSyncExternalStore(
subscribe,
getSnapshot,
getServerSnapshot
);
};
exports2.useTransition = function() {
return resolveDispatcher().useTransition();
};
exports2.version = "19.1.0";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
}();
}
});
// node_modules/react/index.js
var require_react = __commonJS({
"node_modules/react/index.js"(exports2, module2) {
"use strict";
if (process.env.NODE_ENV === "production") {
module2.exports = require_react_production();
} else {
module2.exports = require_react_development();
}
}
});
// node_modules/ink/node_modules/signal-exit/signals.js
var require_signals = __commonJS({
"node_modules/ink/node_modules/signal-exit/signals.js"(exports2, module2) {
module2.exports = [
"SIGABRT",
"SIGALRM",
"SIGHUP",
"SIGINT",
"SIGTERM"
];
if (process.platform !== "win32") {
module2.exports.push(
"SIGVTALRM",
"SIGXCPU",
"SIGXFSZ",
"SIGUSR2",
"SIGTRAP",
"SIGSYS",
"SIGQUIT",
"SIGIOT"
// should detect profiler and enable/disable accordingly.
// see #21
// 'SIGPROF'
);
}
if (process.platform === "linux") {
module2.exports.push(
"SIGIO",
"SIGPOLL",
"SIGPWR",
"SIGSTKFLT",
"SIGUNUSED"
);
}
}
});
// node_modules/ink/node_modules/signal-exit/index.js
var require_signal_exit = __commonJS({
"node_modules/ink/node_modules/signal-exit/index.js"(exports2, module2) {
var process40 = global.process;
var processOk = function(process41) {
return process41 && typeof process41 === "object" && typeof process41.removeListener === "function" && typeof process41.emit === "function" && typeof process41.reallyExit === "function" && typeof process41.listeners === "function" && typeof process41.kill === "function" && typeof process41.pid === "number" && typeof process41.on === "function";
};
if (!processOk(process40)) {
module2.exports = function() {
return function() {
};
};
} else {
assert = __require("assert");
signals = require_signals();
isWin = /^win/i.test(process40.platform);
EE = __require("events");
if (typeof EE !== "function") {
EE = EE.EventEmitter;
}
if (process40.__signal_exit_emitter__) {
emitter = process40.__signal_exit_emitter__;
} else {
emitter = process40.__signal_exit_emitter__ = new EE();
emitter.count = 0;
emitter.emitted = {};
}
if (!emitter.infinite) {
emitter.setMaxListeners(Infinity);
emitter.infinite = true;
}
module2.exports = function(cb, opts) {
if (!processOk(global.process)) {
return function() {
};
}
assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
if (loaded === false) {
load();
}
var ev = "exit";
if (opts && opts.alwaysLast) {
ev = "afterexit";
}
var remove2 = function() {
emitter.removeListener(ev, cb);
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
unload();
}
};
emitter.on(ev, cb);
return remove2;
};
unload = function unload2() {
if (!loaded || !processOk(global.process)) {
return;
}
loaded = false;
signals.forEach(function(sig) {
try {
process40.removeListener(sig, sigListeners[sig]);
} catch (er) {
}
});
process40.emit = originalProcessEmit;
process40.reallyExit = originalProcessReallyExit;
emitter.count -= 1;
};
module2.exports.unload = unload;
emit = function emit2(event, code, signal) {
if (emitter.emitted[event]) {
return;
}
emitter.emitted[event] = true;
emitter.emit(event, code, signal);
};
sigListeners = {};
signals.forEach(function(sig) {
sigListeners[sig] = function listener() {
if (!processOk(global.process)) {
return;
}
var listeners = process40.listeners(sig);
if (listeners.length === emitter.count) {
unload();
emit("exit", null, sig);
emit("afterexit", null, sig);
if (isWin && sig === "SIGHUP") {
sig = "SIGINT";
}
process40.kill(process40.pid, sig);
}
};
});
module2.exports.signals = function() {
return signals;
};
loaded = false;
load = function load2() {
if (loaded || !processOk(global.process)) {
return;
}
loaded = true;
emitter.count += 1;
signals = signals.filter(function(sig) {
try {
process40.on(sig, sigListeners[sig]);
return true;
} catch (er) {
return false;
}
});
process40.emit = processEmit;
process40.reallyExit = processReallyExit;
};
module2.exports.load = load;
originalProcessReallyExit = process40.reallyExit;
processReallyExit = function processReallyExit2(code) {
if (!processOk(global.process)) {
return;
}
process40.exitCode = code || /* istanbul ignore next */
0;
emit("exit", process40.exitCode, null);
emit("afterexit", process40.exitCode, null);
originalProcessReallyExit.call(process40, process40.exitCode);
};
originalProcessEmit = process40.emit;
processEmit = function processEmit2(ev, arg) {
if (ev === "exit" && processOk(global.process)) {
if (arg !== void 0) {
process40.exitCode = arg;
}
var ret = originalProcessEmit.apply(this, arguments);
emit("exit", process40.exitCode, null);
emit("afterexit", process40.exitCode, null);
return ret;
} else {
return originalProcessEmit.apply(this, arguments);
}
};
}
var assert;
var signals;
var isWin;
var EE;
var emitter;
var unload;
var emit;
var sigListeners;
var loaded;
var load;
var originalProcessReallyExit;
var processReallyExit;
var originalProcessEmit;
var processEmit;
}
});
// node_modules/react-reconciler/cjs/react-reconciler-constants.production.js
var require_react_reconciler_constants_production = __commonJS({
"node_modules/react-reconciler/cjs/react-reconciler-constants.production.js"(exports2) {
"use strict";
exports2.ConcurrentRoot = 1;
exports2.ContinuousEventPriority = 8;
exports2.DefaultEventPriority = 32;
exports2.DiscreteEventPriority = 2;
exports2.IdleEventPriority = 268435456;
exports2.LegacyRoot = 0;
exports2.NoEventPriority = 0;
}
});
// node_modules/react-reconciler/cjs/react-reconciler-constants.development.js
var require_react_reconciler_constants_development = __commonJS({
"node_modules/react-reconciler/cjs/react-reconciler-constants.development.js"(exports2) {
"use strict";
"production" !== process.env.NODE_ENV && (exports2.ConcurrentRoot = 1, exports2.ContinuousEventPriority = 8, exports2.DefaultEventPriority = 32, exports2.DiscreteEventPriority = 2, exports2.IdleEventPriority = 268435456, exports2.LegacyRoot = 0, exports2.NoEventPriority = 0);
}
});
// node_modules/react-reconciler/constants.js
var require_constants = __commonJS({
"node_modules/react-reconciler/constants.js"(exports2, module2) {
"use strict";
if (process.env.NODE_ENV === "production") {
module2.exports = require_react_reconciler_constants_production();
} else {
module2.exports = require_react_reconciler_constants_development();
}
}
});
// node_modules/react-reconciler/node_modules/scheduler/cjs/scheduler.production.js
var require_scheduler_production = __commonJS({
"node_modules/react-reconciler/node_modules/scheduler/cjs/scheduler.production.js"(exports2) {
"use strict";
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
if (0 < compare(parent, node))
heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first2 = heap[0], last2 = heap.pop();
if (last2 !== first2) {
heap[0] = last2;
a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
var leftIndex = 2 * (index + 1) - 1, left3 = heap[leftIndex], rightIndex = leftIndex + 1, right3 = heap[rightIndex];
if (0 > compare(left3, last2))
rightIndex < length && 0 > compare(right3, left3) ? (heap[index] = right3, heap[rightIndex] = last2, index = rightIndex) : (heap[index] = left3, heap[leftIndex] = last2, index = leftIndex);
else if (rightIndex < length && 0 > compare(right3, last2))
heap[index] = right3, heap[rightIndex] = last2, index = rightIndex;
else break a;
}
}
return first2;
}
function compare(a, b) {
var diff4 = a.sortIndex - b.sortIndex;
return 0 !== diff4 ? diff4 : a.id - b.id;
}
exports2.unstable_now = void 0;
if ("object" === typeof performance && "function" === typeof performance.now) {
localPerformance = performance;
exports2.unstable_now = function() {
return localPerformance.now();
};
} else {
localDate = Date, initialTime = localDate.now();
exports2.unstable_now = function() {
return localDate.now() - initialTime;
};
}
var localPerformance;
var localDate;
var initialTime;
var taskQueue = [];
var timerQueue = [];
var taskIdCounter = 1;
var currentTask = null;
var currentPriorityLevel = 3;
var isPerformingWork = false;
var isHostCallbackScheduled = false;
var isHostTimeoutScheduled = false;
var needsPaint = false;
var localSetTimeout = "function" === typeof setTimeout ? setTimeout : null;
var localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null;
var localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = false;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
}
var isMessageLoopRunning = false;
var taskTimeoutID = -1;
var frameInterval = 5;
var startTime = -1;
function shouldYieldToHost() {
return needsPaint ? true : exports2.unstable_now() - startTime < frameInterval ? false : true;
}
function performWorkUntilDeadline() {
needsPaint = false;
if (isMessageLoopRunning) {
var currentTime = exports2.unstable_now();
startTime = currentTime;
var hasMoreWork = true;
try {
a: {
isHostCallbackScheduled = false;
isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
isPerformingWork = true;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = exports2.unstable_now();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = true;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = true;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer && requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = false;
}
}
break a;
} finally {
currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false;
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
}
}
}
var schedulePerformWorkUntilDeadline;
if ("function" === typeof localSetImmediate)
schedulePerformWorkUntilDeadline = function() {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
channel = new MessageChannel(), port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function() {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function() {
localSetTimeout(performWorkUntilDeadline, 0);
};
var channel;
var port;
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function() {
callback(exports2.unstable_now());
}, ms);
}
exports2.unstable_IdlePriority = 5;
exports2.unstable_ImmediatePriority = 1;
exports2.unstable_LowPriority = 4;
exports2.unstable_NormalPriority = 3;
exports2.unstable_Profiling = null;
exports2.unstable_UserBlockingPriority = 2;
exports2.unstable_cancelCallback = function(task) {
task.callback = null;
};
exports2.unstable_forceFrameRate = function(fps) {
0 > fps || 125 < fps ? console.error(
"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
};
exports2.unstable_getCurrentPriorityLevel = function() {
return currentPriorityLevel;
};
exports2.unstable_next = function(eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports2.unstable_requestPaint = function() {
needsPaint = true;
};
exports2.unstable_runWithPriority = function(priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports2.unstable_scheduleCallback = function(priorityLevel, callback, options) {
var currentTime = exports2.unstable_now();
"object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
switch (priorityLevel) {
case 1:
var timeout2 = -1;
break;
case 2:
timeout2 = 250;
break;
case 5:
timeout2 = 1073741823;
break;
case 4:
timeout2 = 1e4;
break;
default:
timeout2 = 5e3;
}
timeout2 = options + timeout2;
priorityLevel = {
id: taskIdCounter++,
callback,
priorityLevel,
startTime: options,
expirationTime: timeout2,
sortIndex: -1
};
options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout2, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline())));
return priorityLevel;
};
exports2.unstable_shouldYield = shouldYieldToHost;
exports2.unstable_wrapCallback = function(callback) {
var parentPriorityLevel = currentPriorityLevel;
return function() {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
}
});
// node_modules/react-reconciler/node_modules/scheduler/cjs/scheduler.development.js
var require_scheduler_development = __commonJS({
"node_modules/react-reconciler/node_modules/scheduler/cjs/scheduler.development.js"(exports2) {
"use strict";
"production" !== process.env.NODE_ENV && function() {
function performWorkUntilDeadline() {
needsPaint = false;
if (isMessageLoopRunning) {
var currentTime = exports2.unstable_now();
startTime = currentTime;
var hasMoreWork = true;
try {
a: {
isHostCallbackScheduled = false;
isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
isPerformingWork = true;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = exports2.unstable_now();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = true;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = true;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer && requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = false;
}
}
break a;
} finally {
currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false;
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
}
}
}
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
if (0 < compare(parent, node))
heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first2 = heap[0], last2 = heap.pop();
if (last2 !== first2) {
heap[0] = last2;
a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
var leftIndex = 2 * (index + 1) - 1, left3 = heap[leftIndex], rightIndex = leftIndex + 1, right3 = heap[rightIndex];
if (0 > compare(left3, last2))
rightIndex < length && 0 > compare(right3, left3) ? (heap[index] = right3, heap[rightIndex] = last2, index = rightIndex) : (heap[index] = left3, heap[leftIndex] = last2, index = leftIndex);
else if (rightIndex < length && 0 > compare(right3, last2))
heap[index] = right3, heap[rightIndex] = last2, index = rightIndex;
else break a;
}
}
return first2;
}
function compare(a, b) {
var diff4 = a.sortIndex - b.sortIndex;
return 0 !== diff4 ? diff4 : a.id - b.id;
}
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = false;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer && requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
}
}
function shouldYieldToHost() {
return needsPaint ? true : exports2.unstable_now() - startTime < frameInterval ? false : true;
}
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function() {
callback(exports2.unstable_now());
}, ms);
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
exports2.unstable_now = void 0;
if ("object" === typeof performance && "function" === typeof performance.now) {
var localPerformance = performance;
exports2.unstable_now = function() {
return localPerformance.now();
};
} else {
var localDate = Date, initialTime = localDate.now();
exports2.unstable_now = function() {
return localDate.now() - initialTime;
};
}
var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, needsPaint = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, isMessageLoopRunning = false, taskTimeoutID = -1, frameInterval = 5, startTime = -1;
if ("function" === typeof localSetImmediate)
var schedulePerformWorkUntilDeadline = function() {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(), port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function() {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function() {
localSetTimeout(performWorkUntilDeadline, 0);
};
exports2.unstable_IdlePriority = 5;
exports2.unstable_ImmediatePriority = 1;
exports2.unstable_LowPriority = 4;
exports2.unstable_NormalPriority = 3;
exports2.unstable_Profiling = null;
exports2.unstable_UserBlockingPriority = 2;
exports2.unstable_cancelCallback = function(task) {
task.callback = null;
};
exports2.unstable_forceFrameRate = function(fps) {
0 > fps || 125 < fps ? console.error(
"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
};
exports2.unstable_getCurrentPriorityLevel = function() {
return currentPriorityLevel;
};
exports2.unstable_next = function(eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports2.unstable_requestPaint = function() {
needsPaint = true;
};
exports2.unstable_runWithPriority = function(priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports2.unstable_scheduleCallback = function(priorityLevel, callback, options) {
var currentTime = exports2.unstable_now();
"object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
switch (priorityLevel) {
case 1:
var timeout2 = -1;
break;
case 2:
timeout2 = 250;
break;
case 5:
timeout2 = 1073741823;
break;
case 4:
timeout2 = 1e4;
break;
default:
timeout2 = 5e3;
}
timeout2 = options + timeout2;
priorityLevel = {
id: taskIdCounter++,
callback,
priorityLevel,
startTime: options,
expirationTime: timeout2,
sortIndex: -1
};
options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout2, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline())));
return priorityLevel;
};
exports2.unstable_shouldYield = shouldYieldToHost;
exports2.unstable_wrapCallback = function(callback) {
var parentPriorityLevel = currentPriorityLevel;
return function() {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
}();
}
});
// node_modules/react-reconciler/node_modules/scheduler/index.js
var require_scheduler = __commonJS({
"node_modules/react-reconciler/node_modules/scheduler/index.js"(exports2, module2) {
"use strict";
if (process.env.NODE_ENV === "production") {
module2.exports = require_scheduler_production();
} else {
module2.exports = require_scheduler_development();
}
}
});
// node_modules/react-reconciler/cjs/react-reconciler.production.js
var require_react_reconciler_production = __commonJS({
"node_modules/react-reconciler/cjs/react-reconciler.production.js"(exports2, module2) {
"use strict";
module2.exports = function($$$config) {
function createFiber(tag, pendingProps, key, mode) {
return new FiberNode(tag, pendingProps, key, mode);
}
function noop4() {
}
function formatProdErrorMessage(code) {
var url2 = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url2 += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i2 = 2; i2 < arguments.length; i2++)
url2 += "&args[]=" + encodeURIComponent(arguments[i2]);
}
return "Minified React error #" + code + "; visit " + url2 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
}
function getNearestMountedFiber(fiber) {
var node = fiber, nearestMounted = fiber;
if (fiber.alternate) for (; node.return; ) node = node.return;
else {
fiber = node;
do
node = fiber, 0 !== (node.flags & 4098) && (nearestMounted = node.return), fiber = node.return;
while (fiber);
}
return 3 === node.tag ? nearestMounted : null;
}
function assertIsMounted(fiber) {
if (getNearestMountedFiber(fiber) !== fiber)
throw Error(formatProdErrorMessage(188));
}
function findCurrentFiberUsingSlowPath(fiber) {
var alternate = fiber.alternate;
if (!alternate) {
alternate = getNearestMountedFiber(fiber);
if (null === alternate) throw Error(formatProdErrorMessage(188));
return alternate !== fiber ? null : fiber;
}
for (var a = fiber, b = alternate; ; ) {
var parentA = a.return;
if (null === parentA) break;
var parentB = parentA.alternate;
if (null === parentB) {
b = parentA.return;
if (null !== b) {
a = b;
continue;
}
break;
}
if (parentA.child === parentB.child) {
for (parentB = parentA.child; parentB; ) {
if (parentB === a) return assertIsMounted(parentA), fiber;
if (parentB === b) return assertIsMounted(parentA), alternate;
parentB = parentB.sibling;
}
throw Error(formatProdErrorMessage(188));
}
if (a.return !== b.return) a = parentA, b = parentB;
else {
for (var didFindChild = false, child$0 = parentA.child; child$0; ) {
if (child$0 === a) {
didFindChild = true;
a = parentA;
b = parentB;
break;
}
if (child$0 === b) {
didFindChild = true;
b = parentA;
a = parentB;
break;
}
child$0 = child$0.sibling;
}
if (!didFindChild) {
for (child$0 = parentB.child; child$0; ) {
if (child$0 === a) {
didFindChild = true;
a = parentB;
b = parentA;
break;
}
if (child$0 === b) {
didFindChild = true;
b = parentB;
a = parentA;
break;
}
child$0 = child$0.sibling;
}
if (!didFindChild) throw Error(formatProdErrorMessage(189));
}
}
if (a.alternate !== b) throw Error(formatProdErrorMessage(190));
}
if (3 !== a.tag) throw Error(formatProdErrorMessage(188));
return a.stateNode.current === a ? fiber : alternate;
}
function findCurrentHostFiberImpl(node) {
var tag = node.tag;
if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
for (node = node.child; null !== node; ) {
tag = findCurrentHostFiberImpl(node);
if (null !== tag) return tag;
node = node.sibling;
}
return null;
}
function findCurrentHostFiberWithNoPortalsImpl(node) {
var tag = node.tag;
if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
for (node = node.child; null !== node; ) {
if (4 !== node.tag && (tag = findCurrentHostFiberWithNoPortalsImpl(node), null !== tag))
return tag;
node = node.sibling;
}
return null;
}
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable)
return null;
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (type.$$typeof) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
return type;
case REACT_MEMO_TYPE:
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x2) {
}
}
return null;
}
function createCursor(defaultValue) {
return { current: defaultValue };
}
function pop(cursor) {
0 > index$jscomp$0 || (cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, index$jscomp$0--);
}
function push(cursor, value) {
index$jscomp$0++;
valueStack[index$jscomp$0] = cursor.current;
cursor.current = value;
}
function clz32Fallback(x2) {
x2 >>>= 0;
return 0 === x2 ? 32 : 31 - (log$1(x2) / LN2 | 0) | 0;
}
function getHighestPriorityLanes(lanes) {
var pendingSyncLanes = lanes & 42;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
switch (lanes & -lanes) {
case 1:
return 1;
case 2:
return 2;
case 4:
return 4;
case 8:
return 8;
case 16:
return 16;
case 32:
return 32;
case 64:
return 64;
case 128:
return 128;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return lanes & 4194048;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
return lanes & 62914560;
case 67108864:
return 67108864;
case 134217728:
return 134217728;
case 268435456:
return 268435456;
case 536870912:
return 536870912;
case 1073741824:
return 0;
default:
return lanes;
}
}
function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0, suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes;
root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes;
}
function checkIfRootIsPrerendering(root, renderLanes2) {
return 0 === (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & renderLanes2);
}
function computeExpirationTime(lane, currentTime) {
switch (lane) {
case 1:
case 2:
case 4:
case 8:
case 64:
return currentTime + 250;
case 16:
case 32:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return currentTime + 5e3;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
return -1;
case 67108864:
case 134217728:
case 268435456:
case 536870912:
case 1073741824:
return -1;
default:
return -1;
}
}
function claimNextTransitionLane() {
var lane = nextTransitionLane;
nextTransitionLane <<= 1;
0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256);
return lane;
}
function claimNextRetryLane() {
var lane = nextRetryLane;
nextRetryLane <<= 1;
0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
return lane;
}
function createLaneMap(initial) {
for (var laneMap = [], i2 = 0; 31 > i2; i2++) laneMap.push(initial);
return laneMap;
}
function markRootUpdated$1(root, updateLane) {
root.pendingLanes |= updateLane;
268435456 !== updateLane && (root.suspendedLanes = 0, root.pingedLanes = 0, root.warmLanes = 0);
}
function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) {
var previouslyPendingLanes = root.pendingLanes;
root.pendingLanes = remainingLanes;
root.suspendedLanes = 0;
root.pingedLanes = 0;
root.warmLanes = 0;
root.expiredLanes &= remainingLanes;
root.entangledLanes &= remainingLanes;
root.errorRecoveryDisabledLanes &= remainingLanes;
root.shellSuspendCounter = 0;
var entanglements = root.entanglements, expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates;
for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) {
var index$5 = 31 - clz32(remainingLanes), lane = 1 << index$5;
entanglements[index$5] = 0;
expirationTimes[index$5] = -1;
var hiddenUpdatesForLane = hiddenUpdates[index$5];
if (null !== hiddenUpdatesForLane)
for (hiddenUpdates[index$5] = null, index$5 = 0; index$5 < hiddenUpdatesForLane.length; index$5++) {
var update = hiddenUpdatesForLane[index$5];
null !== update && (update.lane &= -536870913);
}
remainingLanes &= ~lane;
}
0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
}
function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
root.pendingLanes |= spawnedLane;
root.suspendedLanes &= ~spawnedLane;
var spawnedLaneIndex = 31 - clz32(spawnedLane);
root.entangledLanes |= spawnedLane;
root.entanglements[spawnedLaneIndex] = root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 4194090;
}
function markRootEntangled(root, entangledLanes) {
var rootEntangledLanes = root.entangledLanes |= entangledLanes;
for (root = root.entanglements; rootEntangledLanes; ) {
var index$6 = 31 - clz32(rootEntangledLanes), lane = 1 << index$6;
lane & entangledLanes | root[index$6] & entangledLanes && (root[index$6] |= entangledLanes);
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydrationByLane(lane) {
switch (lane) {
case 2:
lane = 1;
break;
case 8:
lane = 4;
break;
case 32:
lane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
lane = 128;
break;
case 268435456:
lane = 134217728;
break;
default:
lane = 0;
}
return lane;
}
function lanesToEventPriority(lanes) {
lanes &= -lanes;
return 2 < lanes ? 8 < lanes ? 0 !== (lanes & 134217727) ? 32 : 268435456 : 8 : 2;
}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {
}
}
function describeBuiltInComponentFrame(name2) {
if (void 0 === prefix)
try {
throw Error();
} catch (x2) {
var match2 = x2.stack.trim().match(/\n( *(at )?)/);
prefix = match2 && match2[1] || "";
suffix = -1 < x2.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x2.stack.indexOf("@") ? "@unknown:0:0" : "";
}
return "\n" + prefix + name2 + suffix;
}
function describeNativeComponentFrame(fn, construct) {
if (!fn || reentry) return "";
reentry = true;
var previousPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
try {
var RunInRootFrame = {
DetermineComponentFrameRoot: function() {
try {
if (construct) {
var Fake = function() {
throw Error();
};
Object.defineProperty(Fake.prototype, "props", {
set: function() {
throw Error();
}
});
if ("object" === typeof Reflect && Reflect.construct) {
try {
Reflect.construct(Fake, []);
} catch (x2) {
var control = x2;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x$8) {
control = x$8;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x$9) {
control = x$9;
}
(Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
});
}
} catch (sample) {
if (sample && control && "string" === typeof sample.stack)
return [sample.stack, control.stack];
}
return [null, null];
}
};
RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
var namePropDescriptor = Object.getOwnPropertyDescriptor(
RunInRootFrame.DetermineComponentFrameRoot,
"name"
);
namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
RunInRootFrame.DetermineComponentFrameRoot,
"name",
{ value: "DetermineComponentFrameRoot" }
);
var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
if (sampleStack && controlStack) {
var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
for (namePropDescriptor = RunInRootFrame = 0; RunInRootFrame < sampleLines.length && !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); )
RunInRootFrame++;
for (; namePropDescriptor < controlLines.length && !controlLines[namePropDescriptor].includes(
"DetermineComponentFrameRoot"
); )
namePropDescriptor++;
if (RunInRootFrame === sampleLines.length || namePropDescriptor === controlLines.length)
for (RunInRootFrame = sampleLines.length - 1, namePropDescriptor = controlLines.length - 1; 1 <= RunInRootFrame && 0 <= namePropDescriptor && sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; )
namePropDescriptor--;
for (; 1 <= RunInRootFrame && 0 <= namePropDescriptor; RunInRootFrame--, namePropDescriptor--)
if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {
do
if (RunInRootFrame--, namePropDescriptor--, 0 > namePropDescriptor || sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
var frame = "\n" + sampleLines[RunInRootFrame].replace(" at new ", " at ");
fn.displayName && frame.includes("<anonymous>") && (frame = frame.replace("<anonymous>", fn.displayName));
return frame;
}
while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
}
break;
}
}
} finally {
reentry = false, Error.prepareStackTrace = previousPrepareStackTrace;
}
return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(previousPrepareStackTrace) : "";
}
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
case 27:
case 5:
return describeBuiltInComponentFrame(fiber.type);
case 16:
return describeBuiltInComponentFrame("Lazy");
case 13:
return describeBuiltInComponentFrame("Suspense");
case 19:
return describeBuiltInComponentFrame("SuspenseList");
case 0:
case 15:
return describeNativeComponentFrame(fiber.type, false);
case 11:
return describeNativeComponentFrame(fiber.type.render, false);
case 1:
return describeNativeComponentFrame(fiber.type, true);
case 31:
return describeBuiltInComponentFrame("Activity");
default:
return "";
}
}
function getStackByFiberInDevAndProd(workInProgress2) {
try {
var info = "";
do
info += describeFiber(workInProgress2), workInProgress2 = workInProgress2.return;
while (workInProgress2);
return info;
} catch (x2) {
return "\nError generating stack: " + x2.message + "\n" + x2.stack;
}
}
function createCapturedValueAtFiber(value, source2) {
if ("object" === typeof value && null !== value) {
var existing = CapturedStacks.get(value);
if (void 0 !== existing) return existing;
source2 = {
value,
source: source2,
stack: getStackByFiberInDevAndProd(source2)
};
CapturedStacks.set(value, source2);
return source2;
}
return {
value,
source: source2,
stack: getStackByFiberInDevAndProd(source2)
};
}
function pushTreeFork(workInProgress2, totalChildren) {
forkStack[forkStackIndex++] = treeForkCount;
forkStack[forkStackIndex++] = treeForkProvider;
treeForkProvider = workInProgress2;
treeForkCount = totalChildren;
}
function pushTreeId(workInProgress2, totalChildren, index) {
idStack[idStackIndex++] = treeContextId;
idStack[idStackIndex++] = treeContextOverflow;
idStack[idStackIndex++] = treeContextProvider;
treeContextProvider = workInProgress2;
var baseIdWithLeadingBit = treeContextId;
workInProgress2 = treeContextOverflow;
var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
baseIdWithLeadingBit &= ~(1 << baseLength);
index += 1;
var length = 32 - clz32(totalChildren) + baseLength;
if (30 < length) {
var numberOfOverflowBits = baseLength - baseLength % 5;
length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32);
baseIdWithLeadingBit >>= numberOfOverflowBits;
baseLength -= numberOfOverflowBits;
treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index << baseLength | baseIdWithLeadingBit;
treeContextOverflow = length + workInProgress2;
} else
treeContextId = 1 << length | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress2;
}
function pushMaterializedTreeId(workInProgress2) {
null !== workInProgress2.return && (pushTreeFork(workInProgress2, 1), pushTreeId(workInProgress2, 1, 0));
}
function popTreeContext(workInProgress2) {
for (; workInProgress2 === treeForkProvider; )
treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null;
for (; workInProgress2 === treeContextProvider; )
treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null;
}
function pushHostContainer(fiber, nextRootInstance) {
push(rootInstanceStackCursor, nextRootInstance);
push(contextFiberStackCursor, fiber);
push(contextStackCursor, null);
fiber = getRootHostContext(nextRootInstance);
pop(contextStackCursor);
push(contextStackCursor, fiber);
}
function popHostContainer() {
pop(contextStackCursor);
pop(contextFiberStackCursor);
pop(rootInstanceStackCursor);
}
function pushHostContext(fiber) {
null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber);
var context2 = contextStackCursor.current, nextContext = getChildHostContext(context2, fiber.type);
context2 !== nextContext && (push(contextFiberStackCursor, fiber), push(contextStackCursor, nextContext));
}
function popHostContext(fiber) {
contextFiberStackCursor.current === fiber && (pop(contextStackCursor), pop(contextFiberStackCursor));
hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor), isPrimaryRenderer ? HostTransitionContext._currentValue = NotPendingTransition : HostTransitionContext._currentValue2 = NotPendingTransition);
}
function throwOnHydrationMismatch(fiber) {
var error = Error(formatProdErrorMessage(418, ""));
queueHydrationError(createCapturedValueAtFiber(error, fiber));
throw HydrationMismatchException;
}
function prepareToHydrateHostInstance(fiber, hostContext) {
if (!supportsHydration) throw Error(formatProdErrorMessage(175));
hydrateInstance(
fiber.stateNode,
fiber.type,
fiber.memoizedProps,
hostContext,
fiber
) || throwOnHydrationMismatch(fiber);
}
function popToNextHostParent(fiber) {
for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
switch (hydrationParentFiber.tag) {
case 5:
case 13:
rootOrSingletonContext = false;
return;
case 27:
case 3:
rootOrSingletonContext = true;
return;
default:
hydrationParentFiber = hydrationParentFiber.return;
}
}
function popHydrationState(fiber) {
if (!supportsHydration || fiber !== hydrationParentFiber) return false;
if (!isHydrating) return popToNextHostParent(fiber), isHydrating = true, false;
var tag = fiber.tag;
supportsSingletons ? 3 !== tag && 27 !== tag && (5 !== tag || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps)) && nextHydratableInstance && throwOnHydrationMismatch(fiber) : 3 !== tag && (5 !== tag || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps)) && nextHydratableInstance && throwOnHydrationMismatch(fiber);
popToNextHostParent(fiber);
if (13 === tag) {
if (!supportsHydration) throw Error(formatProdErrorMessage(316));
fiber = fiber.memoizedState;
fiber = null !== fiber ? fiber.dehydrated : null;
if (!fiber) throw Error(formatProdErrorMessage(317));
nextHydratableInstance = getNextHydratableInstanceAfterSuspenseInstance(fiber);
} else
nextHydratableInstance = supportsSingletons && 27 === tag ? getNextHydratableSiblingAfterSingleton(
fiber.type,
nextHydratableInstance
) : hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
return true;
}
function resetHydrationState() {
supportsHydration && (nextHydratableInstance = hydrationParentFiber = null, isHydrating = false);
}
function upgradeHydrationErrorsToRecoverable() {
var queuedErrors = hydrationErrors;
null !== queuedErrors && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply(
workInProgressRootRecoverableErrors,
queuedErrors
), hydrationErrors = null);
return queuedErrors;
}
function queueHydrationError(error) {
null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error);
}
function is(x2, y) {
return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
}
function pushProvider(providerFiber, context2, nextValue) {
isPrimaryRenderer ? (push(valueCursor, context2._currentValue), context2._currentValue = nextValue) : (push(valueCursor, context2._currentValue2), context2._currentValue2 = nextValue);
}
function popProvider(context2) {
var currentValue = valueCursor.current;
isPrimaryRenderer ? context2._currentValue = currentValue : context2._currentValue2 = currentValue;
pop(valueCursor);
}
function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) {
for (; null !== parent; ) {
var alternate = parent.alternate;
(parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2);
if (parent === propagationRoot) break;
parent = parent.return;
}
}
function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) {
var fiber = workInProgress2.child;
null !== fiber && (fiber.return = workInProgress2);
for (; null !== fiber; ) {
var list = fiber.dependencies;
if (null !== list) {
var nextFiber = fiber.child;
list = list.firstContext;
a: for (; null !== list; ) {
var dependency = list;
list = fiber;
for (var i2 = 0; i2 < contexts.length; i2++)
if (dependency.context === contexts[i2]) {
list.lanes |= renderLanes2;
dependency = list.alternate;
null !== dependency && (dependency.lanes |= renderLanes2);
scheduleContextWorkOnParentPath(
list.return,
renderLanes2,
workInProgress2
);
forcePropagateEntireTree || (nextFiber = null);
break a;
}
list = dependency.next;
}
} else if (18 === fiber.tag) {
nextFiber = fiber.return;
if (null === nextFiber) throw Error(formatProdErrorMessage(341));
nextFiber.lanes |= renderLanes2;
list = nextFiber.alternate;
null !== list && (list.lanes |= renderLanes2);
scheduleContextWorkOnParentPath(nextFiber, renderLanes2, workInProgress2);
nextFiber = null;
} else nextFiber = fiber.child;
if (null !== nextFiber) nextFiber.return = fiber;
else
for (nextFiber = fiber; null !== nextFiber; ) {
if (nextFiber === workInProgress2) {
nextFiber = null;
break;
}
fiber = nextFiber.sibling;
if (null !== fiber) {
fiber.return = nextFiber.return;
nextFiber = fiber;
break;
}
nextFiber = nextFiber.return;
}
fiber = nextFiber;
}
}
function propagateParentContextChanges(current, workInProgress2, renderLanes2, forcePropagateEntireTree) {
current = null;
for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) {
if (!isInsidePropagationBailout) {
if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true;
else if (0 !== (parent.flags & 262144)) break;
}
if (10 === parent.tag) {
var currentParent = parent.alternate;
if (null === currentParent) throw Error(formatProdErrorMessage(387));
currentParent = currentParent.memoizedProps;
if (null !== currentParent) {
var context2 = parent.type;
objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context2) : current = [context2]);
}
} else if (parent === hostTransitionProviderCursor.current) {
currentParent = parent.alternate;
if (null === currentParent) throw Error(formatProdErrorMessage(387));
currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current ? current.push(HostTransitionContext) : current = [HostTransitionContext]);
}
parent = parent.return;
}
null !== current && propagateContextChanges(
workInProgress2,
current,
renderLanes2,
forcePropagateEntireTree
);
workInProgress2.flags |= 262144;
}
function checkIfContextChanged(currentDependencies) {
for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) {
var context2 = currentDependencies.context;
if (!objectIs(
isPrimaryRenderer ? context2._currentValue : context2._currentValue2,
currentDependencies.memoizedValue
))
return true;
currentDependencies = currentDependencies.next;
}
return false;
}
function prepareToReadContext(workInProgress2) {
currentlyRenderingFiber$1 = workInProgress2;
lastContextDependency = null;
workInProgress2 = workInProgress2.dependencies;
null !== workInProgress2 && (workInProgress2.firstContext = null);
}
function readContext(context2) {
return readContextForConsumer(currentlyRenderingFiber$1, context2);
}
function readContextDuringReconciliation(consumer, context2) {
null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
return readContextForConsumer(consumer, context2);
}
function readContextForConsumer(consumer, context2) {
var value = isPrimaryRenderer ? context2._currentValue : context2._currentValue2;
context2 = { context: context2, memoizedValue: value, next: null };
if (null === lastContextDependency) {
if (null === consumer) throw Error(formatProdErrorMessage(308));
lastContextDependency = context2;
consumer.dependencies = { lanes: 0, firstContext: context2 };
consumer.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context2;
return value;
}
function createCache() {
return {
controller: new AbortControllerLocal(),
data: /* @__PURE__ */ new Map(),
refCount: 0
};
}
function releaseCache(cache4) {
cache4.refCount--;
0 === cache4.refCount && scheduleCallback$2(NormalPriority, function() {
cache4.controller.abort();
});
}
function ensureRootIsScheduled(root) {
root !== lastScheduledRoot && null === root.next && (null === lastScheduledRoot ? firstScheduledRoot = lastScheduledRoot = root : lastScheduledRoot = lastScheduledRoot.next = root);
mightHavePendingSyncWork = true;
didScheduleMicrotask || (didScheduleMicrotask = true, scheduleImmediateRootScheduleTask());
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
isFlushingWork = true;
do {
var didPerformSomeWork = false;
for (var root = firstScheduledRoot; null !== root; ) {
if (!onlyLegacy)
if (0 !== syncTransitionLanes) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) var JSCompiler_inline_result = 0;
else {
var suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes;
JSCompiler_inline_result = (1 << 31 - clz32(42 | syncTransitionLanes) + 1) - 1;
JSCompiler_inline_result &= pendingLanes & ~(suspendedLanes & ~pingedLanes);
JSCompiler_inline_result = JSCompiler_inline_result & 201326741 ? JSCompiler_inline_result & 201326741 | 1 : JSCompiler_inline_result ? JSCompiler_inline_result | 2 : 0;
}
0 !== JSCompiler_inline_result && (didPerformSomeWork = true, performSyncWorkOnRoot(root, JSCompiler_inline_result));
} else
JSCompiler_inline_result = workInProgressRootRenderLanes, JSCompiler_inline_result = getNextLanes(
root,
root === workInProgressRoot ? JSCompiler_inline_result : 0,
null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root, JSCompiler_inline_result) || (didPerformSomeWork = true, performSyncWorkOnRoot(root, JSCompiler_inline_result));
root = root.next;
}
} while (didPerformSomeWork);
isFlushingWork = false;
}
}
function processRootScheduleInImmediateTask() {
processRootScheduleInMicrotask();
}
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork = didScheduleMicrotask = false;
var syncTransitionLanes = 0;
0 !== currentEventTransitionLane && (shouldAttemptEagerTransition() && (syncTransitionLanes = currentEventTransitionLane), currentEventTransitionLane = 0);
for (var currentTime = now(), prev = null, root = firstScheduledRoot; null !== root; ) {
var next = root.next, nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);
if (0 === nextLanes)
root.next = null, null === prev ? firstScheduledRoot = next : prev.next = next, null === next && (lastScheduledRoot = prev);
else if (prev = root, 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
mightHavePendingSyncWork = true;
root = next;
}
flushSyncWorkAcrossRoots_impl(syncTransitionLanes, false);
}
function scheduleTaskForRootDuringMicrotask(root, currentTime) {
for (var suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes, expirationTimes = root.expirationTimes, lanes = root.pendingLanes & -62914561; 0 < lanes; ) {
var index$3 = 31 - clz32(lanes), lane = 1 << index$3, expirationTime = expirationTimes[index$3];
if (-1 === expirationTime) {
if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
expirationTimes[index$3] = computeExpirationTime(lane, currentTime);
} else expirationTime <= currentTime && (root.expiredLanes |= lane);
lanes &= ~lane;
}
currentTime = workInProgressRoot;
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
root === currentTime ? suspendedLanes : 0,
null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
pingedLanes = root.callbackNode;
if (0 === suspendedLanes || root === currentTime && (2 === workInProgressSuspendedReason || 9 === workInProgressSuspendedReason) || null !== root.cancelPendingCommit)
return null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes), root.callbackNode = null, root.callbackPriority = 0;
if (0 === (suspendedLanes & 3) || checkIfRootIsPrerendering(root, suspendedLanes)) {
currentTime = suspendedLanes & -suspendedLanes;
if (currentTime === root.callbackPriority) return currentTime;
null !== pingedLanes && cancelCallback$1(pingedLanes);
switch (lanesToEventPriority(suspendedLanes)) {
case 2:
case 8:
suspendedLanes = UserBlockingPriority;
break;
case 32:
suspendedLanes = NormalPriority$1;
break;
case 268435456:
suspendedLanes = IdlePriority;
break;
default:
suspendedLanes = NormalPriority$1;
}
pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
root.callbackPriority = currentTime;
root.callbackNode = suspendedLanes;
return currentTime;
}
null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes);
root.callbackPriority = 2;
root.callbackNode = null;
return 2;
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
if (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus)
return root.callbackNode = null, root.callbackPriority = 0, null;
var originalCallbackNode = root.callbackNode;
if (flushPendingEffects(true) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
scheduleTaskForRootDuringMicrotask(root, now());
return null != root.callbackNode && root.callbackNode === originalCallbackNode ? performWorkOnRootViaSchedulerTask.bind(null, root) : null;
}
function performSyncWorkOnRoot(root, lanes) {
if (flushPendingEffects()) return null;
performWorkOnRoot(root, lanes, true);
}
function scheduleImmediateRootScheduleTask() {
supportsMicrotasks ? scheduleMicrotask(function() {
0 !== (executionContext & 6) ? scheduleCallback$3(
ImmediatePriority,
processRootScheduleInImmediateTask
) : processRootScheduleInMicrotask();
}) : scheduleCallback$3(
ImmediatePriority,
processRootScheduleInImmediateTask
);
}
function requestTransitionLane() {
0 === currentEventTransitionLane && (currentEventTransitionLane = claimNextTransitionLane());
return currentEventTransitionLane;
}
function entangleAsyncAction(transition, thenable) {
if (null === currentEntangledListeners) {
var entangledListeners = currentEntangledListeners = [];
currentEntangledPendingCount = 0;
currentEntangledLane = requestTransitionLane();
currentEntangledActionThenable = {
status: "pending",
value: void 0,
then: function(resolve18) {
entangledListeners.push(resolve18);
}
};
}
currentEntangledPendingCount++;
thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
return thenable;
}
function pingEngtangledActionScope() {
if (0 === --currentEntangledPendingCount && null !== currentEntangledListeners) {
null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled");
var listeners = currentEntangledListeners;
currentEntangledListeners = null;
currentEntangledLane = 0;
currentEntangledActionThenable = null;
for (var i2 = 0; i2 < listeners.length; i2++) (0, listeners[i2])();
}
}
function chainThenableValue(thenable, result) {
var listeners = [], thenableWithOverride = {
status: "pending",
value: null,
reason: null,
then: function(resolve18) {
listeners.push(resolve18);
}
};
thenable.then(
function() {
thenableWithOverride.status = "fulfilled";
thenableWithOverride.value = result;
for (var i2 = 0; i2 < listeners.length; i2++) (0, listeners[i2])(result);
},
function(error) {
thenableWithOverride.status = "rejected";
thenableWithOverride.reason = error;
for (error = 0; error < listeners.length; error++)
(0, listeners[error])(void 0);
}
);
return thenableWithOverride;
}
function peekCacheFromPool() {
var cacheResumedFromPreviousRender = resumedCache.current;
return null !== cacheResumedFromPreviousRender ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache;
}
function pushTransition(offscreenWorkInProgress, prevCachePool) {
null === prevCachePool ? push(resumedCache, resumedCache.current) : push(resumedCache, prevCachePool.pool);
}
function getSuspendedCache() {
var cacheFromPool = peekCacheFromPool();
return null === cacheFromPool ? null : {
parent: isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2,
pool: cacheFromPool
};
}
function shallowEqual(objA, objB) {
if (objectIs(objA, objB)) return true;
if ("object" !== typeof objA || null === objA || "object" !== typeof objB || null === objB)
return false;
var keysA = Object.keys(objA), keysB = Object.keys(objB);
if (keysA.length !== keysB.length) return false;
for (keysB = 0; keysB < keysA.length; keysB++) {
var currentKey = keysA[keysB];
if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey]))
return false;
}
return true;
}
function isThenableResolved(thenable) {
thenable = thenable.status;
return "fulfilled" === thenable || "rejected" === thenable;
}
function noop$1() {
}
function trackUsedThenable(thenableState2, thenable, index) {
index = thenableState2[index];
void 0 === index ? thenableState2.push(thenable) : index !== thenable && (thenable.then(noop$1, noop$1), thenable = index);
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
default:
if ("string" === typeof thenable.status) thenable.then(noop$1, noop$1);
else {
thenableState2 = workInProgressRoot;
if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter)
throw Error(formatProdErrorMessage(482));
thenableState2 = thenable;
thenableState2.status = "pending";
thenableState2.then(
function(fulfilledValue) {
if ("pending" === thenable.status) {
var fulfilledThenable = thenable;
fulfilledThenable.status = "fulfilled";
fulfilledThenable.value = fulfilledValue;
}
},
function(error) {
if ("pending" === thenable.status) {
var rejectedThenable = thenable;
rejectedThenable.status = "rejected";
rejectedThenable.reason = error;
}
}
);
}
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
}
suspendedThenable = thenable;
throw SuspenseException;
}
}
function getSuspendedThenable() {
if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));
var thenable = suspendedThenable;
suspendedThenable = null;
return thenable;
}
function checkIfUseWrappedInAsyncCatch(rejectedReason) {
if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException)
throw Error(formatProdErrorMessage(483));
}
function finishQueueingConcurrentUpdates() {
for (var endIndex = concurrentQueuesIndex, i2 = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i2 < endIndex; ) {
var fiber = concurrentQueues[i2];
concurrentQueues[i2++] = null;
var queue = concurrentQueues[i2];
concurrentQueues[i2++] = null;
var update = concurrentQueues[i2];
concurrentQueues[i2++] = null;
var lane = concurrentQueues[i2];
concurrentQueues[i2++] = null;
if (null !== queue && null !== update) {
var pending = queue.pending;
null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
queue.pending = update;
}
0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
}
}
function enqueueUpdate$1(fiber, queue, update, lane) {
concurrentQueues[concurrentQueuesIndex++] = fiber;
concurrentQueues[concurrentQueuesIndex++] = queue;
concurrentQueues[concurrentQueuesIndex++] = update;
concurrentQueues[concurrentQueuesIndex++] = lane;
concurrentlyUpdatedLanes |= lane;
fiber.lanes |= lane;
fiber = fiber.alternate;
null !== fiber && (fiber.lanes |= lane);
}
function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
enqueueUpdate$1(fiber, queue, update, lane);
return getRootForUpdatedFiber(fiber);
}
function enqueueConcurrentRenderForLane(fiber, lane) {
enqueueUpdate$1(fiber, null, null, lane);
return getRootForUpdatedFiber(fiber);
}
function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
sourceFiber.lanes |= lane;
var alternate = sourceFiber.alternate;
null !== alternate && (alternate.lanes |= lane);
for (var isHidden2 = false, parent = sourceFiber.return; null !== parent; )
parent.childLanes |= lane, alternate = parent.alternate, null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && (sourceFiber = parent.stateNode, null === sourceFiber || sourceFiber._visibility & 1 || (isHidden2 = true)), sourceFiber = parent, parent = parent.return;
return 3 === sourceFiber.tag ? (parent = sourceFiber.stateNode, isHidden2 && null !== update && (isHidden2 = 31 - clz32(lane), sourceFiber = parent.hiddenUpdates, alternate = sourceFiber[isHidden2], null === alternate ? sourceFiber[isHidden2] = [update] : alternate.push(update), update.lane = lane | 536870912), parent) : null;
}
function getRootForUpdatedFiber(sourceFiber) {
if (50 < nestedUpdateCount)
throw nestedUpdateCount = 0, rootWithNestedUpdates = null, Error(formatProdErrorMessage(185));
for (var parent = sourceFiber.return; null !== parent; )
sourceFiber = parent, parent = sourceFiber.return;
return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;
}
function initializeUpdateQueue(fiber) {
fiber.updateQueue = {
baseState: fiber.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: { pending: null, lanes: 0, hiddenCallbacks: null },
callbacks: null
};
}
function cloneUpdateQueue(current, workInProgress2) {
current = current.updateQueue;
workInProgress2.updateQueue === current && (workInProgress2.updateQueue = {
baseState: current.baseState,
firstBaseUpdate: current.firstBaseUpdate,
lastBaseUpdate: current.lastBaseUpdate,
shared: current.shared,
callbacks: null
});
}
function createUpdate(lane) {
return { lane, tag: 0, payload: null, callback: null, next: null };
}
function enqueueUpdate(fiber, update, lane) {
var updateQueue = fiber.updateQueue;
if (null === updateQueue) return null;
updateQueue = updateQueue.shared;
if (0 !== (executionContext & 2)) {
var pending = updateQueue.pending;
null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
updateQueue.pending = update;
update = getRootForUpdatedFiber(fiber);
markUpdateLaneFromFiberToRoot(fiber, null, lane);
return update;
}
enqueueUpdate$1(fiber, updateQueue, update, lane);
return getRootForUpdatedFiber(fiber);
}
function entangleTransitions(root, fiber, lane) {
fiber = fiber.updateQueue;
if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194048))) {
var queueLanes = fiber.lanes;
queueLanes &= root.pendingLanes;
lane |= queueLanes;
fiber.lanes = lane;
markRootEntangled(root, lane);
}
}
function enqueueCapturedUpdate(workInProgress2, capturedUpdate) {
var queue = workInProgress2.updateQueue, current = workInProgress2.alternate;
if (null !== current && (current = current.updateQueue, queue === current)) {
var newFirst = null, newLast = null;
queue = queue.firstBaseUpdate;
if (null !== queue) {
do {
var clone2 = {
lane: queue.lane,
tag: queue.tag,
payload: queue.payload,
callback: null,
next: null
};
null === newLast ? newFirst = newLast = clone2 : newLast = newLast.next = clone2;
queue = queue.next;
} while (null !== queue);
null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate;
} else newFirst = newLast = capturedUpdate;
queue = {
baseState: current.baseState,
firstBaseUpdate: newFirst,
lastBaseUpdate: newLast,
shared: current.shared,
callbacks: current.callbacks
};
workInProgress2.updateQueue = queue;
return;
}
workInProgress2 = queue.lastBaseUpdate;
null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate;
queue.lastBaseUpdate = capturedUpdate;
}
function suspendIfUpdateReadFromEntangledAsyncAction() {
if (didReadFromEntangledAsyncAction) {
var entangledActionThenable = currentEntangledActionThenable;
if (null !== entangledActionThenable) throw entangledActionThenable;
}
}
function processUpdateQueue(workInProgress$jscomp$0, props, instance$jscomp$0, renderLanes2) {
didReadFromEntangledAsyncAction = false;
var queue = workInProgress$jscomp$0.updateQueue;
hasForceUpdate = false;
var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending;
if (null !== pendingQueue) {
queue.shared.pending = null;
var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next;
lastPendingUpdate.next = null;
null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate;
lastBaseUpdate = lastPendingUpdate;
var current = workInProgress$jscomp$0.alternate;
null !== current && (current = current.updateQueue, pendingQueue = current.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current.lastBaseUpdate = lastPendingUpdate));
}
if (null !== firstBaseUpdate) {
var newState = queue.baseState;
lastBaseUpdate = 0;
current = firstPendingUpdate = lastPendingUpdate = null;
pendingQueue = firstBaseUpdate;
do {
var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane;
if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) {
0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true);
null !== current && (current = current.next = {
lane: 0,
tag: pendingQueue.tag,
payload: pendingQueue.payload,
callback: null,
next: null
});
a: {
var workInProgress2 = workInProgress$jscomp$0, update = pendingQueue;
updateLane = props;
var instance2 = instance$jscomp$0;
switch (update.tag) {
case 1:
workInProgress2 = update.payload;
if ("function" === typeof workInProgress2) {
newState = workInProgress2.call(
instance2,
newState,
updateLane
);
break a;
}
newState = workInProgress2;
break a;
case 3:
workInProgress2.flags = workInProgress2.flags & -65537 | 128;
case 0:
workInProgress2 = update.payload;
updateLane = "function" === typeof workInProgress2 ? workInProgress2.call(instance2, newState, updateLane) : workInProgress2;
if (null === updateLane || void 0 === updateLane) break a;
newState = assign({}, newState, updateLane);
break a;
case 2:
hasForceUpdate = true;
}
}
updateLane = pendingQueue.callback;
null !== updateLane && (workInProgress$jscomp$0.flags |= 64, isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), isHiddenUpdate = queue.callbacks, null === isHiddenUpdate ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane));
} else
isHiddenUpdate = {
lane: updateLane,
tag: pendingQueue.tag,
payload: pendingQueue.payload,
callback: pendingQueue.callback,
next: null
}, null === current ? (firstPendingUpdate = current = isHiddenUpdate, lastPendingUpdate = newState) : current = current.next = isHiddenUpdate, lastBaseUpdate |= updateLane;
pendingQueue = pendingQueue.next;
if (null === pendingQueue)
if (pendingQueue = queue.shared.pending, null === pendingQueue)
break;
else
isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null;
} while (1);
null === current && (lastPendingUpdate = newState);
queue.baseState = lastPendingUpdate;
queue.firstBaseUpdate = firstPendingUpdate;
queue.lastBaseUpdate = current;
null === firstBaseUpdate && (queue.shared.lanes = 0);
workInProgressRootSkippedLanes |= lastBaseUpdate;
workInProgress$jscomp$0.lanes = lastBaseUpdate;
workInProgress$jscomp$0.memoizedState = newState;
}
}
function callCallback(callback, context2) {
if ("function" !== typeof callback)
throw Error(formatProdErrorMessage(191, callback));
callback.call(context2);
}
function commitCallbacks(updateQueue, context2) {
var callbacks = updateQueue.callbacks;
if (null !== callbacks)
for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++)
callCallback(callbacks[updateQueue], context2);
}
function pushHiddenContext(fiber, context2) {
fiber = entangledRenderLanes;
push(prevEntangledRenderLanesCursor, fiber);
push(currentTreeHiddenStackCursor, context2);
entangledRenderLanes = fiber | context2.baseLanes;
}
function reuseHiddenContextOnStack() {
push(prevEntangledRenderLanesCursor, entangledRenderLanes);
push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);
}
function popHiddenContext() {
entangledRenderLanes = prevEntangledRenderLanesCursor.current;
pop(currentTreeHiddenStackCursor);
pop(prevEntangledRenderLanesCursor);
}
function throwInvalidHookError() {
throw Error(formatProdErrorMessage(321));
}
function areHookInputsEqual(nextDeps, prevDeps) {
if (null === prevDeps) return false;
for (var i2 = 0; i2 < prevDeps.length && i2 < nextDeps.length; i2++)
if (!objectIs(nextDeps[i2], prevDeps[i2])) return false;
return true;
}
function renderWithHooks(current, workInProgress2, Component, props, secondArg, nextRenderLanes) {
renderLanes = nextRenderLanes;
currentlyRenderingFiber = workInProgress2;
workInProgress2.memoizedState = null;
workInProgress2.updateQueue = null;
workInProgress2.lanes = 0;
ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate;
shouldDoubleInvokeUserFnsInHooksDEV = false;
nextRenderLanes = Component(props, secondArg);
shouldDoubleInvokeUserFnsInHooksDEV = false;
didScheduleRenderPhaseUpdateDuringThisPass && (nextRenderLanes = renderWithHooksAgain(
workInProgress2,
Component,
props,
secondArg
));
finishRenderingHooks(current);
return nextRenderLanes;
}
function finishRenderingHooks(current) {
ReactSharedInternals.H = ContextOnlyDispatcher;
var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
renderLanes = 0;
workInProgressHook = currentHook = currentlyRenderingFiber = null;
didScheduleRenderPhaseUpdate = false;
thenableIndexCounter$1 = 0;
thenableState$1 = null;
if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));
null === current || didReceiveUpdate || (current = current.dependencies, null !== current && checkIfContextChanged(current) && (didReceiveUpdate = true));
}
function renderWithHooksAgain(workInProgress2, Component, props, secondArg) {
currentlyRenderingFiber = workInProgress2;
var numberOfReRenders = 0;
do {
didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null);
thenableIndexCounter$1 = 0;
didScheduleRenderPhaseUpdateDuringThisPass = false;
if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));
numberOfReRenders += 1;
workInProgressHook = currentHook = null;
if (null != workInProgress2.updateQueue) {
var children = workInProgress2.updateQueue;
children.lastEffect = null;
children.events = null;
children.stores = null;
null != children.memoCache && (children.memoCache.index = 0);
}
ReactSharedInternals.H = HooksDispatcherOnRerender;
children = Component(props, secondArg);
} while (didScheduleRenderPhaseUpdateDuringThisPass);
return children;
}
function TransitionAwareHostComponent() {
var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0];
maybeThenable = "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable;
dispatcher = dispatcher.useState()[0];
(null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024);
return maybeThenable;
}
function checkDidRenderIdHook() {
var didRenderIdHook = 0 !== localIdCounter;
localIdCounter = 0;
return didRenderIdHook;
}
function bailoutHooks(current, workInProgress2, lanes) {
workInProgress2.updateQueue = current.updateQueue;
workInProgress2.flags &= -2053;
current.lanes &= ~lanes;
}
function resetHooksOnUnwind(workInProgress2) {
if (didScheduleRenderPhaseUpdate) {
for (workInProgress2 = workInProgress2.memoizedState; null !== workInProgress2; ) {
var queue = workInProgress2.queue;
null !== queue && (queue.pending = null);
workInProgress2 = workInProgress2.next;
}
didScheduleRenderPhaseUpdate = false;
}
renderLanes = 0;
workInProgressHook = currentHook = currentlyRenderingFiber = null;
didScheduleRenderPhaseUpdateDuringThisPass = false;
thenableIndexCounter$1 = localIdCounter = 0;
thenableState$1 = null;
}
function mountWorkInProgressHook() {
var hook = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook;
return workInProgressHook;
}
function updateWorkInProgressHook() {
if (null === currentHook) {
var nextCurrentHook = currentlyRenderingFiber.alternate;
nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
} else nextCurrentHook = currentHook.next;
var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber.memoizedState : workInProgressHook.next;
if (null !== nextWorkInProgressHook)
workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook;
else {
if (null === nextCurrentHook) {
if (null === currentlyRenderingFiber.alternate)
throw Error(formatProdErrorMessage(467));
throw Error(formatProdErrorMessage(310));
}
currentHook = nextCurrentHook;
nextCurrentHook = {
memoizedState: currentHook.memoizedState,
baseState: currentHook.baseState,
baseQueue: currentHook.baseQueue,
queue: currentHook.queue,
next: null
};
null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook;
}
return workInProgressHook;
}
function createFunctionComponentUpdateQueue() {
return { lastEffect: null, events: null, stores: null, memoCache: null };
}
function useThenable(thenable) {
var index = thenableIndexCounter$1;
thenableIndexCounter$1 += 1;
null === thenableState$1 && (thenableState$1 = []);
thenable = trackUsedThenable(thenableState$1, thenable, index);
index = currentlyRenderingFiber;
null === (null === workInProgressHook ? index.memoizedState : workInProgressHook.next) && (index = index.alternate, ReactSharedInternals.H = null === index || null === index.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate);
return thenable;
}
function use(usable) {
if (null !== usable && "object" === typeof usable) {
if ("function" === typeof usable.then) return useThenable(usable);
if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
}
throw Error(formatProdErrorMessage(438, String(usable)));
}
function useMemoCache(size) {
var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue;
null !== updateQueue && (memoCache = updateQueue.memoCache);
if (null == memoCache) {
var current = currentlyRenderingFiber.alternate;
null !== current && (current = current.updateQueue, null !== current && (current = current.memoCache, null != current && (memoCache = {
data: current.data.map(function(array) {
return array.slice();
}),
index: 0
})));
}
null == memoCache && (memoCache = { data: [], index: 0 });
null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue);
updateQueue.memoCache = memoCache;
updateQueue = memoCache.data[memoCache.index];
if (void 0 === updateQueue)
for (updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0; current < size; current++)
updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;
memoCache.index++;
return updateQueue;
}
function basicStateReducer(state, action) {
return "function" === typeof action ? action(state) : action;
}
function updateReducer(reducer) {
var hook = updateWorkInProgressHook();
return updateReducerImpl(hook, currentHook, reducer);
}
function updateReducerImpl(hook, current, reducer) {
var queue = hook.queue;
if (null === queue) throw Error(formatProdErrorMessage(311));
queue.lastRenderedReducer = reducer;
var baseQueue = hook.baseQueue, pendingQueue = queue.pending;
if (null !== pendingQueue) {
if (null !== baseQueue) {
var baseFirst = baseQueue.next;
baseQueue.next = pendingQueue.next;
pendingQueue.next = baseFirst;
}
current.baseQueue = baseQueue = pendingQueue;
queue.pending = null;
}
pendingQueue = hook.baseState;
if (null === baseQueue) hook.memoizedState = pendingQueue;
else {
current = baseQueue.next;
var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current, didReadFromEntangledAsyncAction$23 = false;
do {
var updateLane = update.lane & -536870913;
if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) {
var revertLane = update.revertLane;
if (0 === revertLane)
null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = {
lane: 0,
revertLane: 0,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
}), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction$23 = true);
else if ((renderLanes & revertLane) === revertLane) {
update = update.next;
revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction$23 = true);
continue;
} else
updateLane = {
lane: 0,
revertLane: update.revertLane,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
}, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane;
updateLane = update.action;
shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane);
pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane);
} else
revertLane = {
lane: updateLane,
revertLane: update.revertLane,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
}, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane;
update = update.next;
} while (null !== update && update !== current);
null === newBaseQueueLast ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst;
if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction$23 && (reducer = currentEntangledActionThenable, null !== reducer)))
throw reducer;
hook.memoizedState = pendingQueue;
hook.baseState = baseFirst;
hook.baseQueue = newBaseQueueLast;
queue.lastRenderedState = pendingQueue;
}
null === baseQueue && (queue.lanes = 0);
return [hook.memoizedState, queue.dispatch];
}
function rerenderReducer(reducer) {
var hook = updateWorkInProgressHook(), queue = hook.queue;
if (null === queue) throw Error(formatProdErrorMessage(311));
queue.lastRenderedReducer = reducer;
var dispatch = queue.dispatch, lastRenderPhaseUpdate = queue.pending, newState = hook.memoizedState;
if (null !== lastRenderPhaseUpdate) {
queue.pending = null;
var update = lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
do
newState = reducer(newState, update.action), update = update.next;
while (update !== lastRenderPhaseUpdate);
objectIs(newState, hook.memoizedState) || (didReceiveUpdate = true);
hook.memoizedState = newState;
null === hook.baseQueue && (hook.baseState = newState);
queue.lastRenderedState = newState;
}
return [newState, dispatch];
}
function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating;
if (isHydrating$jscomp$0) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else getServerSnapshot = getSnapshot();
var snapshotChanged = !objectIs(
(currentHook || hook).memoizedState,
getServerSnapshot
);
snapshotChanged && (hook.memoizedState = getServerSnapshot, didReceiveUpdate = true);
hook = hook.queue;
var create2 = subscribeToStore.bind(null, fiber, hook, subscribe);
updateEffectImpl(2048, 8, create2, [subscribe]);
if (hook.getSnapshot !== getSnapshot || snapshotChanged || null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1) {
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
hook,
getServerSnapshot,
getSnapshot
),
null
);
if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
isHydrating$jscomp$0 || 0 !== (renderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
return getServerSnapshot;
}
function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
fiber.flags |= 16384;
fiber = { getSnapshot, value: renderedSnapshot };
getSnapshot = currentlyRenderingFiber.updateQueue;
null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber));
}
function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
inst.value = nextSnapshot;
inst.getSnapshot = getSnapshot;
checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
}
function subscribeToStore(fiber, inst, subscribe) {
return subscribe(function() {
checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
});
}
function checkIfSnapshotChanged(inst) {
var latestGetSnapshot = inst.getSnapshot;
inst = inst.value;
try {
var nextValue = latestGetSnapshot();
return !objectIs(inst, nextValue);
} catch (error) {
return true;
}
}
function forceStoreRerender(fiber) {
var root = enqueueConcurrentRenderForLane(fiber, 2);
null !== root && scheduleUpdateOnFiber(root, fiber, 2);
}
function mountStateImpl(initialState) {
var hook = mountWorkInProgressHook();
if ("function" === typeof initialState) {
var initialStateInitializer = initialState;
initialState = initialStateInitializer();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(true);
try {
initialStateInitializer();
} finally {
setIsStrictModeForDevtools(false);
}
}
}
hook.memoizedState = hook.baseState = initialState;
hook.queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: basicStateReducer,
lastRenderedState: initialState
};
return hook;
}
function updateOptimisticImpl(hook, current, passthrough, reducer) {
hook.baseState = passthrough;
return updateReducerImpl(
hook,
currentHook,
"function" === typeof reducer ? reducer : basicStateReducer
);
}
function dispatchActionState(fiber, actionQueue, setPendingState, setState, payload) {
if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));
fiber = actionQueue.action;
if (null !== fiber) {
var actionNode = {
payload,
action: fiber,
next: null,
isTransition: true,
status: "pending",
value: null,
reason: null,
listeners: [],
then: function(listener) {
actionNode.listeners.push(listener);
}
};
null !== ReactSharedInternals.T ? setPendingState(true) : actionNode.isTransition = false;
setState(actionNode);
setPendingState = actionQueue.pending;
null === setPendingState ? (actionNode.next = actionQueue.pending = actionNode, runActionStateAction(actionQueue, actionNode)) : (actionNode.next = setPendingState.next, actionQueue.pending = setPendingState.next = actionNode);
}
}
function runActionStateAction(actionQueue, node) {
var action = node.action, payload = node.payload, prevState = actionQueue.state;
if (node.isTransition) {
var prevTransition = ReactSharedInternals.T, currentTransition = {};
ReactSharedInternals.T = currentTransition;
try {
var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
handleActionReturnValue(actionQueue, node, returnValue);
} catch (error) {
onActionError(actionQueue, node, error);
} finally {
ReactSharedInternals.T = prevTransition;
}
} else
try {
prevTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node, prevTransition);
} catch (error$27) {
onActionError(actionQueue, node, error$27);
}
}
function handleActionReturnValue(actionQueue, node, returnValue) {
null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then ? returnValue.then(
function(nextState) {
onActionSuccess(actionQueue, node, nextState);
},
function(error) {
return onActionError(actionQueue, node, error);
}
) : onActionSuccess(actionQueue, node, returnValue);
}
function onActionSuccess(actionQueue, actionNode, nextState) {
actionNode.status = "fulfilled";
actionNode.value = nextState;
notifyActionListeners(actionNode);
actionQueue.state = nextState;
actionNode = actionQueue.pending;
null !== actionNode && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState)));
}
function onActionError(actionQueue, actionNode, error) {
var last2 = actionQueue.pending;
actionQueue.pending = null;
if (null !== last2) {
last2 = last2.next;
do
actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next;
while (actionNode !== last2);
}
actionQueue.action = null;
}
function notifyActionListeners(actionNode) {
actionNode = actionNode.listeners;
for (var i2 = 0; i2 < actionNode.length; i2++) (0, actionNode[i2])();
}
function actionStateReducer(oldState, newState) {
return newState;
}
function mountActionState(action, initialStateProp) {
if (isHydrating) {
var ssrFormState = workInProgressRoot.formState;
if (null !== ssrFormState) {
a: {
var JSCompiler_inline_result = currentlyRenderingFiber;
if (isHydrating) {
if (nextHydratableInstance) {
var markerInstance = canHydrateFormStateMarker(
nextHydratableInstance,
rootOrSingletonContext
);
if (markerInstance) {
nextHydratableInstance = getNextHydratableSibling(markerInstance);
JSCompiler_inline_result = isFormStateMarkerMatching(markerInstance);
break a;
}
}
throwOnHydrationMismatch(JSCompiler_inline_result);
}
JSCompiler_inline_result = false;
}
JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);
}
}
ssrFormState = mountWorkInProgressHook();
ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
JSCompiler_inline_result = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: actionStateReducer,
lastRenderedState: initialStateProp
};
ssrFormState.queue = JSCompiler_inline_result;
ssrFormState = dispatchSetState.bind(
null,
currentlyRenderingFiber,
JSCompiler_inline_result
);
JSCompiler_inline_result.dispatch = ssrFormState;
JSCompiler_inline_result = mountStateImpl(false);
var setPendingState = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
false,
JSCompiler_inline_result.queue
);
JSCompiler_inline_result = mountWorkInProgressHook();
markerInstance = {
state: initialStateProp,
dispatch: null,
action,
pending: null
};
JSCompiler_inline_result.queue = markerInstance;
ssrFormState = dispatchActionState.bind(
null,
currentlyRenderingFiber,
markerInstance,
setPendingState,
ssrFormState
);
markerInstance.dispatch = ssrFormState;
JSCompiler_inline_result.memoizedState = action;
return [initialStateProp, ssrFormState, false];
}
function updateActionState(action) {
var stateHook = updateWorkInProgressHook();
return updateActionStateImpl(stateHook, currentHook, action);
}
function updateActionStateImpl(stateHook, currentStateHook, action) {
currentStateHook = updateReducerImpl(
stateHook,
currentStateHook,
actionStateReducer
)[0];
stateHook = updateReducer(basicStateReducer)[0];
if ("object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then)
try {
var state = useThenable(currentStateHook);
} catch (x2) {
if (x2 === SuspenseException) throw SuspenseActionException;
throw x2;
}
else state = currentStateHook;
currentStateHook = updateWorkInProgressHook();
var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch;
action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect(
9,
createEffectInstance(),
actionStateActionEffect.bind(null, actionQueue, action),
null
));
return [state, dispatch, stateHook];
}
function actionStateActionEffect(actionQueue, action) {
actionQueue.action = action;
}
function rerenderActionState(action) {
var stateHook = updateWorkInProgressHook(), currentStateHook = currentHook;
if (null !== currentStateHook)
return updateActionStateImpl(stateHook, currentStateHook, action);
updateWorkInProgressHook();
stateHook = stateHook.memoizedState;
currentStateHook = updateWorkInProgressHook();
var dispatch = currentStateHook.queue.dispatch;
currentStateHook.memoizedState = action;
return [stateHook, dispatch, false];
}
function pushSimpleEffect(tag, inst, create2, createDeps) {
tag = {
tag,
create: create2,
deps: createDeps,
inst,
next: null
};
inst = currentlyRenderingFiber.updateQueue;
null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
create2 = inst.lastEffect;
null === create2 ? inst.lastEffect = tag.next = tag : (createDeps = create2.next, create2.next = tag, tag.next = createDeps, inst.lastEffect = tag);
return tag;
}
function createEffectInstance() {
return { destroy: void 0, resource: void 0 };
}
function updateRef() {
return updateWorkInProgressHook().memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create2, createDeps) {
var hook = mountWorkInProgressHook();
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
createEffectInstance(),
create2,
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create2, deps) {
var hook = updateWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var inst = hook.memoizedState.inst;
null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create2, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
1 | hookFlags,
inst,
create2,
deps
));
}
function mountEffect(create2, createDeps) {
mountEffectImpl(8390656, 8, create2, createDeps);
}
function updateEffect(create2, createDeps) {
updateEffectImpl(2048, 8, create2, createDeps);
}
function updateInsertionEffect(create2, deps) {
return updateEffectImpl(4, 2, create2, deps);
}
function updateLayoutEffect(create2, deps) {
return updateEffectImpl(4, 4, create2, deps);
}
function imperativeHandleEffect(create2, ref) {
if ("function" === typeof ref) {
create2 = create2();
var refCleanup = ref(create2);
return function() {
"function" === typeof refCleanup ? refCleanup() : ref(null);
};
}
if (null !== ref && void 0 !== ref)
return create2 = create2(), ref.current = create2, function() {
ref.current = null;
};
}
function updateImperativeHandle(ref, create2, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
updateEffectImpl(
4,
4,
imperativeHandleEffect.bind(null, create2, ref),
deps
);
}
function mountDebugValue() {
}
function updateCallback(callback, deps) {
var hook = updateWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var prevState = hook.memoizedState;
if (null !== deps && areHookInputsEqual(deps, prevState[1]))
return prevState[0];
hook.memoizedState = [callback, deps];
return callback;
}
function updateMemo(nextCreate, deps) {
var hook = updateWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var prevState = hook.memoizedState;
if (null !== deps && areHookInputsEqual(deps, prevState[1]))
return prevState[0];
prevState = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(true);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(false);
}
}
hook.memoizedState = [prevState, deps];
return prevState;
}
function mountDeferredValueImpl(hook, value, initialValue) {
if (void 0 === initialValue || 0 !== (renderLanes & 1073741824))
return hook.memoizedState = value;
hook.memoizedState = initialValue;
hook = requestDeferredLane();
currentlyRenderingFiber.lanes |= hook;
workInProgressRootSkippedLanes |= hook;
return initialValue;
}
function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
if (objectIs(value, prevValue)) return value;
if (null !== currentTreeHiddenStackCursor.current)
return hook = mountDeferredValueImpl(hook, value, initialValue), objectIs(hook, prevValue) || (didReceiveUpdate = true), hook;
if (0 === (renderLanes & 42))
return didReceiveUpdate = true, hook.memoizedState = value;
hook = requestDeferredLane();
currentlyRenderingFiber.lanes |= hook;
workInProgressRootSkippedLanes |= hook;
return prevValue;
}
function startTransition(fiber, queue, pendingState, finishedState, callback) {
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(
0 !== previousPriority && 8 > previousPriority ? previousPriority : 8
);
var prevTransition = ReactSharedInternals.T, currentTransition = {};
ReactSharedInternals.T = currentTransition;
dispatchOptimisticSetState(fiber, false, queue, pendingState);
try {
var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) {
var thenableForFinishedState = chainThenableValue(
returnValue,
finishedState
);
dispatchSetStateInternal(
fiber,
queue,
thenableForFinishedState,
requestUpdateLane(fiber)
);
} else
dispatchSetStateInternal(
fiber,
queue,
finishedState,
requestUpdateLane(fiber)
);
} catch (error) {
dispatchSetStateInternal(
fiber,
queue,
{ then: function() {
}, status: "rejected", reason: error },
requestUpdateLane()
);
} finally {
setCurrentUpdatePriority(previousPriority), ReactSharedInternals.T = prevTransition;
}
}
function ensureFormComponentIsStateful(formFiber) {
var existingStateHook = formFiber.memoizedState;
if (null !== existingStateHook) return existingStateHook;
existingStateHook = {
memoizedState: NotPendingTransition,
baseState: NotPendingTransition,
baseQueue: null,
queue: {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: basicStateReducer,
lastRenderedState: NotPendingTransition
},
next: null
};
var initialResetState = {};
existingStateHook.next = {
memoizedState: initialResetState,
baseState: initialResetState,
baseQueue: null,
queue: {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: basicStateReducer,
lastRenderedState: initialResetState
},
next: null
};
formFiber.memoizedState = existingStateHook;
formFiber = formFiber.alternate;
null !== formFiber && (formFiber.memoizedState = existingStateHook);
return existingStateHook;
}
function useHostTransitionStatus() {
return readContext(HostTransitionContext);
}
function updateId() {
return updateWorkInProgressHook().memoizedState;
}
function updateRefresh() {
return updateWorkInProgressHook().memoizedState;
}
function refreshCache(fiber) {
for (var provider = fiber.return; null !== provider; ) {
switch (provider.tag) {
case 24:
case 3:
var lane = requestUpdateLane();
fiber = createUpdate(lane);
var root = enqueueUpdate(provider, fiber, lane);
null !== root && (scheduleUpdateOnFiber(root, provider, lane), entangleTransitions(root, provider, lane));
provider = { cache: createCache() };
fiber.payload = provider;
return;
}
provider = provider.return;
}
}
function dispatchReducerAction(fiber, queue, action) {
var lane = requestUpdateLane();
action = {
lane,
revertLane: 0,
action,
hasEagerState: false,
eagerState: null,
next: null
};
isRenderPhaseUpdate(fiber) ? enqueueRenderPhaseUpdate(queue, action) : (action = enqueueConcurrentHookUpdate(fiber, queue, action, lane), null !== action && (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane)));
}
function dispatchSetState(fiber, queue, action) {
var lane = requestUpdateLane();
dispatchSetStateInternal(fiber, queue, action, lane);
}
function dispatchSetStateInternal(fiber, queue, action, lane) {
var update = {
lane,
revertLane: 0,
action,
hasEagerState: false,
eagerState: null,
next: null
};
if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
else {
var alternate = fiber.alternate;
if (0 === fiber.lanes && (null === alternate || 0 === alternate.lanes) && (alternate = queue.lastRenderedReducer, null !== alternate))
try {
var currentState = queue.lastRenderedState, eagerState = alternate(currentState, action);
update.hasEagerState = true;
update.eagerState = eagerState;
if (objectIs(eagerState, currentState))
return enqueueUpdate$1(fiber, queue, update, 0), null === workInProgressRoot && finishQueueingConcurrentUpdates(), false;
} catch (error) {
} finally {
}
action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
if (null !== action)
return scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane), true;
}
return false;
}
function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
action = {
lane: 2,
revertLane: requestTransitionLane(),
action,
hasEagerState: false,
eagerState: null,
next: null
};
if (isRenderPhaseUpdate(fiber)) {
if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));
} else
throwIfDuringRender = enqueueConcurrentHookUpdate(
fiber,
queue,
action,
2
), null !== throwIfDuringRender && scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);
}
function isRenderPhaseUpdate(fiber) {
var alternate = fiber.alternate;
return fiber === currentlyRenderingFiber || null !== alternate && alternate === currentlyRenderingFiber;
}
function enqueueRenderPhaseUpdate(queue, update) {
didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
var pending = queue.pending;
null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
queue.pending = update;
}
function entangleTransitionUpdate(root, queue, lane) {
if (0 !== (lane & 4194048)) {
var queueLanes = queue.lanes;
queueLanes &= root.pendingLanes;
lane |= queueLanes;
queue.lanes = lane;
markRootEntangled(root, lane);
}
}
function unwrapThenable(thenable) {
var index = thenableIndexCounter;
thenableIndexCounter += 1;
null === thenableState && (thenableState = []);
return trackUsedThenable(thenableState, thenable, index);
}
function coerceRef(workInProgress2, element) {
element = element.props.ref;
workInProgress2.ref = void 0 !== element ? element : null;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
throw Error(formatProdErrorMessage(525));
returnFiber = Object.prototype.toString.call(newChild);
throw Error(
formatProdErrorMessage(
31,
"[object Object]" === returnFiber ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber
)
);
}
function resolveLazy(lazyType2) {
var init = lazyType2._init;
return init(lazyType2._payload);
}
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (shouldTrackSideEffects) {
var deletions = returnFiber.deletions;
null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete);
}
}
function deleteRemainingChildren(returnFiber, currentFirstChild) {
if (!shouldTrackSideEffects) return null;
for (; null !== currentFirstChild; )
deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
return null;
}
function mapRemainingChildren(currentFirstChild) {
for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; )
null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
return existingChildren;
}
function useFiber(fiber, pendingProps) {
fiber = createWorkInProgress(fiber, pendingProps);
fiber.index = 0;
fiber.sibling = null;
return fiber;
}
function placeChild(newFiber, lastPlacedIndex, newIndex) {
newFiber.index = newIndex;
if (!shouldTrackSideEffects)
return newFiber.flags |= 1048576, lastPlacedIndex;
newIndex = newFiber.alternate;
if (null !== newIndex)
return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex;
newFiber.flags |= 67108866;
return lastPlacedIndex;
}
function placeSingleChild(newFiber) {
shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 67108866);
return newFiber;
}
function updateTextNode(returnFiber, current, textContent2, lanes) {
if (null === current || 6 !== current.tag)
return current = createFiberFromText(textContent2, returnFiber.mode, lanes), current.return = returnFiber, current;
current = useFiber(current, textContent2);
current.return = returnFiber;
return current;
}
function updateElement(returnFiber, current, element, lanes) {
var elementType = element.type;
if (elementType === REACT_FRAGMENT_TYPE)
return updateFragment(
returnFiber,
current,
element.props.children,
lanes,
element.key
);
if (null !== current && (current.elementType === elementType || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type))
return current = useFiber(current, element.props), coerceRef(current, element), current.return = returnFiber, current;
current = createFiberFromTypeAndProps(
element.type,
element.key,
element.props,
null,
returnFiber.mode,
lanes
);
coerceRef(current, element);
current.return = returnFiber;
return current;
}
function updatePortal(returnFiber, current, portal, lanes) {
if (null === current || 4 !== current.tag || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation)
return current = createFiberFromPortal(portal, returnFiber.mode, lanes), current.return = returnFiber, current;
current = useFiber(current, portal.children || []);
current.return = returnFiber;
return current;
}
function updateFragment(returnFiber, current, fragment, lanes, key) {
if (null === current || 7 !== current.tag)
return current = createFiberFromFragment(
fragment,
returnFiber.mode,
lanes,
key
), current.return = returnFiber, current;
current = useFiber(current, fragment);
current.return = returnFiber;
return current;
}
function createChild(returnFiber, newChild, lanes) {
if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
return newChild = createFiberFromText(
"" + newChild,
returnFiber.mode,
lanes
), newChild.return = returnFiber, newChild;
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return lanes = createFiberFromTypeAndProps(
newChild.type,
newChild.key,
newChild.props,
null,
returnFiber.mode,
lanes
), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes;
case REACT_PORTAL_TYPE:
return newChild = createFiberFromPortal(
newChild,
returnFiber.mode,
lanes
), newChild.return = returnFiber, newChild;
case REACT_LAZY_TYPE:
var init = newChild._init;
newChild = init(newChild._payload);
return createChild(returnFiber, newChild, lanes);
}
if (isArrayImpl(newChild) || getIteratorFn(newChild))
return newChild = createFiberFromFragment(
newChild,
returnFiber.mode,
lanes,
null
), newChild.return = returnFiber, newChild;
if ("function" === typeof newChild.then)
return createChild(returnFiber, unwrapThenable(newChild), lanes);
if (newChild.$$typeof === REACT_CONTEXT_TYPE)
return createChild(
returnFiber,
readContextDuringReconciliation(returnFiber, newChild),
lanes
);
throwOnInvalidObjectType(returnFiber, newChild);
}
return null;
}
function updateSlot(returnFiber, oldFiber, newChild, lanes) {
var key = null !== oldFiber ? oldFiber.key : null;
if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null;
case REACT_PORTAL_TYPE:
return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null;
case REACT_LAZY_TYPE:
return key = newChild._init, newChild = key(newChild._payload), updateSlot(returnFiber, oldFiber, newChild, lanes);
}
if (isArrayImpl(newChild) || getIteratorFn(newChild))
return null !== key ? null : updateFragment(returnFiber, oldFiber, newChild, lanes, null);
if ("function" === typeof newChild.then)
return updateSlot(
returnFiber,
oldFiber,
unwrapThenable(newChild),
lanes
);
if (newChild.$$typeof === REACT_CONTEXT_TYPE)
return updateSlot(
returnFiber,
oldFiber,
readContextDuringReconciliation(returnFiber, newChild),
lanes
);
throwOnInvalidObjectType(returnFiber, newChild);
}
return null;
}
function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes);
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return existingChildren = existingChildren.get(
null === newChild.key ? newIdx : newChild.key
) || null, updateElement(returnFiber, existingChildren, newChild, lanes);
case REACT_PORTAL_TYPE:
return existingChildren = existingChildren.get(
null === newChild.key ? newIdx : newChild.key
) || null, updatePortal(returnFiber, existingChildren, newChild, lanes);
case REACT_LAZY_TYPE:
var init = newChild._init;
newChild = init(newChild._payload);
return updateFromMap(
existingChildren,
returnFiber,
newIdx,
newChild,
lanes
);
}
if (isArrayImpl(newChild) || getIteratorFn(newChild))
return existingChildren = existingChildren.get(newIdx) || null, updateFragment(returnFiber, existingChildren, newChild, lanes, null);
if ("function" === typeof newChild.then)
return updateFromMap(
existingChildren,
returnFiber,
newIdx,
unwrapThenable(newChild),
lanes
);
if (newChild.$$typeof === REACT_CONTEXT_TYPE)
return updateFromMap(
existingChildren,
returnFiber,
newIdx,
readContextDuringReconciliation(returnFiber, newChild),
lanes
);
throwOnInvalidObjectType(returnFiber, newChild);
}
return null;
}
function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) {
oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
var newFiber = updateSlot(
returnFiber,
oldFiber,
newChildren[newIdx],
lanes
);
if (null === newFiber) {
null === oldFiber && (oldFiber = nextOldFiber);
break;
}
shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (newIdx === newChildren.length)
return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
if (null === oldFiber) {
for (; newIdx < newChildren.length; newIdx++)
oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (currentFirstChild = placeChild(
oldFiber,
currentFirstChild,
newIdx
), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
isHydrating && pushTreeFork(returnFiber, newIdx);
return resultingFirstChild;
}
for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++)
nextOldFiber = updateFromMap(
oldFiber,
returnFiber,
newIdx,
newChildren[newIdx],
lanes
), null !== nextOldFiber && (shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
null === nextOldFiber.key ? newIdx : nextOldFiber.key
), currentFirstChild = placeChild(
nextOldFiber,
currentFirstChild,
newIdx
), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
shouldTrackSideEffects && oldFiber.forEach(function(child) {
return deleteChild(returnFiber, child);
});
isHydrating && pushTreeFork(returnFiber, newIdx);
return resultingFirstChild;
}
function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) {
if (null == newChildren) throw Error(formatProdErrorMessage(151));
for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()) {
oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
if (null === newFiber) {
null === oldFiber && (oldFiber = nextOldFiber);
break;
}
shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (step.done)
return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
if (null === oldFiber) {
for (; !step.done; newIdx++, step = newChildren.next())
step = createChild(returnFiber, step.value, lanes), null !== step && (currentFirstChild = placeChild(
step,
currentFirstChild,
newIdx
), null === previousNewFiber ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step);
isHydrating && pushTreeFork(returnFiber, newIdx);
return resultingFirstChild;
}
for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next())
step = updateFromMap(
oldFiber,
returnFiber,
newIdx,
step.value,
lanes
), null !== step && (shouldTrackSideEffects && null !== step.alternate && oldFiber.delete(null === step.key ? newIdx : step.key), currentFirstChild = placeChild(step, currentFirstChild, newIdx), null === previousNewFiber ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step);
shouldTrackSideEffects && oldFiber.forEach(function(child) {
return deleteChild(returnFiber, child);
});
isHydrating && pushTreeFork(returnFiber, newIdx);
return resultingFirstChild;
}
function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) {
"object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (newChild = newChild.props.children);
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
a: {
for (var key = newChild.key; null !== currentFirstChild; ) {
if (currentFirstChild.key === key) {
key = newChild.type;
if (key === REACT_FRAGMENT_TYPE) {
if (7 === currentFirstChild.tag) {
deleteRemainingChildren(
returnFiber,
currentFirstChild.sibling
);
lanes = useFiber(
currentFirstChild,
newChild.props.children
);
lanes.return = returnFiber;
returnFiber = lanes;
break a;
}
} else if (currentFirstChild.elementType === key || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && resolveLazy(key) === currentFirstChild.type) {
deleteRemainingChildren(
returnFiber,
currentFirstChild.sibling
);
lanes = useFiber(currentFirstChild, newChild.props);
coerceRef(lanes, newChild);
lanes.return = returnFiber;
returnFiber = lanes;
break a;
}
deleteRemainingChildren(returnFiber, currentFirstChild);
break;
} else deleteChild(returnFiber, currentFirstChild);
currentFirstChild = currentFirstChild.sibling;
}
newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment(
newChild.props.children,
returnFiber.mode,
lanes,
newChild.key
), lanes.return = returnFiber, returnFiber = lanes) : (lanes = createFiberFromTypeAndProps(
newChild.type,
newChild.key,
newChild.props,
null,
returnFiber.mode,
lanes
), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = lanes);
}
return placeSingleChild(returnFiber);
case REACT_PORTAL_TYPE:
a: {
for (key = newChild.key; null !== currentFirstChild; ) {
if (currentFirstChild.key === key)
if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === newChild.containerInfo && currentFirstChild.stateNode.implementation === newChild.implementation) {
deleteRemainingChildren(
returnFiber,
currentFirstChild.sibling
);
lanes = useFiber(
currentFirstChild,
newChild.children || []
);
lanes.return = returnFiber;
returnFiber = lanes;
break a;
} else {
deleteRemainingChildren(returnFiber, currentFirstChild);
break;
}
else deleteChild(returnFiber, currentFirstChild);
currentFirstChild = currentFirstChild.sibling;
}
lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);
lanes.return = returnFiber;
returnFiber = lanes;
}
return placeSingleChild(returnFiber);
case REACT_LAZY_TYPE:
return key = newChild._init, newChild = key(newChild._payload), reconcileChildFibersImpl(
returnFiber,
currentFirstChild,
newChild,
lanes
);
}
if (isArrayImpl(newChild))
return reconcileChildrenArray(
returnFiber,
currentFirstChild,
newChild,
lanes
);
if (getIteratorFn(newChild)) {
key = getIteratorFn(newChild);
if ("function" !== typeof key)
throw Error(formatProdErrorMessage(150));
newChild = key.call(newChild);
return reconcileChildrenIterator(
returnFiber,
currentFirstChild,
newChild,
lanes
);
}
if ("function" === typeof newChild.then)
return reconcileChildFibersImpl(
returnFiber,
currentFirstChild,
unwrapThenable(newChild),
lanes
);
if (newChild.$$typeof === REACT_CONTEXT_TYPE)
return reconcileChildFibersImpl(
returnFiber,
currentFirstChild,
readContextDuringReconciliation(returnFiber, newChild),
lanes
);
throwOnInvalidObjectType(returnFiber, newChild);
}
return "string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild ? (newChild = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling), lanes = useFiber(currentFirstChild, newChild), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(newChild, returnFiber.mode, lanes), lanes.return = returnFiber, returnFiber = lanes), placeSingleChild(returnFiber)) : deleteRemainingChildren(returnFiber, currentFirstChild);
}
return function(returnFiber, currentFirstChild, newChild, lanes) {
try {
thenableIndexCounter = 0;
var firstChildFiber = reconcileChildFibersImpl(
returnFiber,
currentFirstChild,
newChild,
lanes
);
thenableState = null;
return firstChildFiber;
} catch (x2) {
if (x2 === SuspenseException || x2 === SuspenseActionException) throw x2;
var fiber = createFiber(29, x2, null, returnFiber.mode);
fiber.lanes = lanes;
fiber.return = returnFiber;
return fiber;
} finally {
}
};
}
function pushPrimaryTreeSuspenseHandler(handler) {
var current = handler.alternate;
push(suspenseStackCursor, suspenseStackCursor.current & 1);
push(suspenseHandlerStackCursor, handler);
null === shellBoundary && (null === current || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current.memoizedState && (shellBoundary = handler));
}
function pushOffscreenSuspenseHandler(fiber) {
if (22 === fiber.tag) {
if (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), null === shellBoundary) {
var current = fiber.alternate;
null !== current && null !== current.memoizedState && (shellBoundary = fiber);
}
} else reuseSuspenseHandlerOnStack(fiber);
}
function reuseSuspenseHandlerOnStack() {
push(suspenseStackCursor, suspenseStackCursor.current);
push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
}
function popSuspenseHandler(fiber) {
pop(suspenseHandlerStackCursor);
shellBoundary === fiber && (shellBoundary = null);
pop(suspenseStackCursor);
}
function findFirstSuspended(row) {
for (var node = row; null !== node; ) {
if (13 === node.tag) {
var state = node.memoizedState;
if (null !== state && (state = state.dehydrated, null === state || isSuspenseInstancePending(state) || isSuspenseInstanceFallback(state)))
return node;
} else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
if (0 !== (node.flags & 128)) return node;
} else if (null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === row) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === row) return null;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
return null;
}
function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) {
ctor = workInProgress2.memoizedState;
getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
getDerivedStateFromProps = null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps ? ctor : assign({}, ctor, getDerivedStateFromProps);
workInProgress2.memoizedState = getDerivedStateFromProps;
0 === workInProgress2.lanes && (workInProgress2.updateQueue.baseState = getDerivedStateFromProps);
}
function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
workInProgress2 = workInProgress2.stateNode;
return "function" === typeof workInProgress2.shouldComponentUpdate ? workInProgress2.shouldComponentUpdate(newProps, newState, nextContext) : ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : true;
}
function callComponentWillReceiveProps(workInProgress2, instance2, newProps, nextContext) {
workInProgress2 = instance2.state;
"function" === typeof instance2.componentWillReceiveProps && instance2.componentWillReceiveProps(newProps, nextContext);
"function" === typeof instance2.UNSAFE_componentWillReceiveProps && instance2.UNSAFE_componentWillReceiveProps(newProps, nextContext);
instance2.state !== workInProgress2 && classComponentUpdater.enqueueReplaceState(instance2, instance2.state, null);
}
function resolveClassComponentProps(Component, baseProps) {
var newProps = baseProps;
if ("ref" in baseProps) {
newProps = {};
for (var propName in baseProps)
"ref" !== propName && (newProps[propName] = baseProps[propName]);
}
if (Component = Component.defaultProps) {
newProps === baseProps && (newProps = assign({}, newProps));
for (var propName$57 in Component)
void 0 === newProps[propName$57] && (newProps[propName$57] = Component[propName$57]);
}
return newProps;
}
function logUncaughtError(root, errorInfo) {
try {
var onUncaughtError = root.onUncaughtError;
onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });
} catch (e3) {
setTimeout(function() {
throw e3;
});
}
}
function logCaughtError(root, boundary, errorInfo) {
try {
var onCaughtError = root.onCaughtError;
onCaughtError(errorInfo.value, {
componentStack: errorInfo.stack,
errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
});
} catch (e3) {
setTimeout(function() {
throw e3;
});
}
}
function createRootErrorUpdate(root, errorInfo, lane) {
lane = createUpdate(lane);
lane.tag = 3;
lane.payload = { element: null };
lane.callback = function() {
logUncaughtError(root, errorInfo);
};
return lane;
}
function createClassErrorUpdate(lane) {
lane = createUpdate(lane);
lane.tag = 3;
return lane;
}
function initializeClassErrorUpdate(update, root, fiber, errorInfo) {
var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
if ("function" === typeof getDerivedStateFromError) {
var error = errorInfo.value;
update.payload = function() {
return getDerivedStateFromError(error);
};
update.callback = function() {
logCaughtError(root, fiber, errorInfo);
};
}
var inst = fiber.stateNode;
null !== inst && "function" === typeof inst.componentDidCatch && (update.callback = function() {
logCaughtError(root, fiber, errorInfo);
"function" !== typeof getDerivedStateFromError && (null === legacyErrorBoundariesThatAlreadyFailed ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this));
var stack = errorInfo.stack;
this.componentDidCatch(errorInfo.value, {
componentStack: null !== stack ? stack : ""
});
});
}
function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
sourceFiber.flags |= 32768;
if (null !== value && "object" === typeof value && "function" === typeof value.then) {
returnFiber = sourceFiber.alternate;
null !== returnFiber && propagateParentContextChanges(
returnFiber,
sourceFiber,
rootRenderLanes,
true
);
sourceFiber = suspenseHandlerStackCursor.current;
if (null !== sourceFiber) {
switch (sourceFiber.tag) {
case 13:
return null === shellBoundary ? renderDidSuspendDelayIfPossible() : null === sourceFiber.alternate && 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 3), sourceFiber.flags &= -257, sourceFiber.flags |= 65536, sourceFiber.lanes = rootRenderLanes, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? sourceFiber.updateQueue = /* @__PURE__ */ new Set([value]) : returnFiber.add(value), attachPingListener(root, value, rootRenderLanes)), false;
case 22:
return sourceFiber.flags |= 65536, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? (returnFiber = {
transitions: null,
markerInstances: null,
retryQueue: /* @__PURE__ */ new Set([value])
}, sourceFiber.updateQueue = returnFiber) : (sourceFiber = returnFiber.retryQueue, null === sourceFiber ? returnFiber.retryQueue = /* @__PURE__ */ new Set([value]) : sourceFiber.add(value)), attachPingListener(root, value, rootRenderLanes)), false;
}
throw Error(formatProdErrorMessage(435, sourceFiber.tag));
}
attachPingListener(root, value, rootRenderLanes);
renderDidSuspendDelayIfPossible();
return false;
}
if (isHydrating)
return returnFiber = suspenseHandlerStackCursor.current, null !== returnFiber ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), returnFiber.flags |= 65536, returnFiber.lanes = rootRenderLanes, value !== HydrationMismatchException && (root = Error(formatProdErrorMessage(422), { cause: value }), queueHydrationError(
createCapturedValueAtFiber(root, sourceFiber)
))) : (value !== HydrationMismatchException && (returnFiber = Error(formatProdErrorMessage(423), {
cause: value
}), queueHydrationError(
createCapturedValueAtFiber(returnFiber, sourceFiber)
)), root = root.current.alternate, root.flags |= 65536, rootRenderLanes &= -rootRenderLanes, root.lanes |= rootRenderLanes, value = createCapturedValueAtFiber(value, sourceFiber), rootRenderLanes = createRootErrorUpdate(
root.stateNode,
value,
rootRenderLanes
), enqueueCapturedUpdate(root, rootRenderLanes), 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2)), false;
var wrapperError = Error(formatProdErrorMessage(520), { cause: value });
wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber);
null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [wrapperError] : workInProgressRootConcurrentErrors.push(wrapperError);
4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);
if (null === returnFiber) return true;
value = createCapturedValueAtFiber(value, sourceFiber);
sourceFiber = returnFiber;
do {
switch (sourceFiber.tag) {
case 3:
return sourceFiber.flags |= 65536, root = rootRenderLanes & -rootRenderLanes, sourceFiber.lanes |= root, root = createRootErrorUpdate(sourceFiber.stateNode, value, root), enqueueCapturedUpdate(sourceFiber, root), false;
case 1:
if (returnFiber = sourceFiber.type, wrapperError = sourceFiber.stateNode, 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || null !== wrapperError && "function" === typeof wrapperError.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(
wrapperError
))))
return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate(
rootRenderLanes,
root,
sourceFiber,
value
), enqueueCapturedUpdate(sourceFiber, rootRenderLanes), false;
}
sourceFiber = sourceFiber.return;
} while (null !== sourceFiber);
return false;
}
function reconcileChildren(current, workInProgress2, nextChildren, renderLanes2) {
workInProgress2.child = null === current ? mountChildFibers(workInProgress2, null, nextChildren, renderLanes2) : reconcileChildFibers(
workInProgress2,
current.child,
nextChildren,
renderLanes2
);
}
function updateForwardRef(current, workInProgress2, Component, nextProps, renderLanes2) {
Component = Component.render;
var ref = workInProgress2.ref;
if ("ref" in nextProps) {
var propsWithoutRef = {};
for (var key in nextProps)
"ref" !== key && (propsWithoutRef[key] = nextProps[key]);
} else propsWithoutRef = nextProps;
prepareToReadContext(workInProgress2);
nextProps = renderWithHooks(
current,
workInProgress2,
Component,
propsWithoutRef,
ref,
renderLanes2
);
key = checkDidRenderIdHook();
if (null !== current && !didReceiveUpdate)
return bailoutHooks(current, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2);
isHydrating && key && pushMaterializedTreeId(workInProgress2);
workInProgress2.flags |= 1;
reconcileChildren(current, workInProgress2, nextProps, renderLanes2);
return workInProgress2.child;
}
function updateMemoComponent(current, workInProgress2, Component, nextProps, renderLanes2) {
if (null === current) {
var type = Component.type;
if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component.compare)
return workInProgress2.tag = 15, workInProgress2.type = type, updateSimpleMemoComponent(
current,
workInProgress2,
type,
nextProps,
renderLanes2
);
current = createFiberFromTypeAndProps(
Component.type,
null,
nextProps,
workInProgress2,
workInProgress2.mode,
renderLanes2
);
current.ref = workInProgress2.ref;
current.return = workInProgress2;
return workInProgress2.child = current;
}
type = current.child;
if (!checkScheduledUpdateOrContext(current, renderLanes2)) {
var prevProps = type.memoizedProps;
Component = Component.compare;
Component = null !== Component ? Component : shallowEqual;
if (Component(prevProps, nextProps) && current.ref === workInProgress2.ref)
return bailoutOnAlreadyFinishedWork(
current,
workInProgress2,
renderLanes2
);
}
workInProgress2.flags |= 1;
current = createWorkInProgress(type, nextProps);
current.ref = workInProgress2.ref;
current.return = workInProgress2;
return workInProgress2.child = current;
}
function updateSimpleMemoComponent(current, workInProgress2, Component, nextProps, renderLanes2) {
if (null !== current) {
var prevProps = current.memoizedProps;
if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress2.ref)
if (didReceiveUpdate = false, workInProgress2.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current, renderLanes2))
0 !== (current.flags & 131072) && (didReceiveUpdate = true);
else
return workInProgress2.lanes = current.lanes, bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2);
}
return updateFunctionComponent(
current,
workInProgress2,
Component,
nextProps,
renderLanes2
);
}
function updateOffscreenComponent(current, workInProgress2, renderLanes2) {
var nextProps = workInProgress2.pendingProps, nextChildren = nextProps.children, prevState = null !== current ? current.memoizedState : null;
if ("hidden" === nextProps.mode) {
if (0 !== (workInProgress2.flags & 128)) {
nextProps = null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2;
if (null !== current) {
nextChildren = workInProgress2.child = current.child;
for (prevState = 0; null !== nextChildren; )
prevState = prevState | nextChildren.lanes | nextChildren.childLanes, nextChildren = nextChildren.sibling;
workInProgress2.childLanes = prevState & ~nextProps;
} else workInProgress2.childLanes = 0, workInProgress2.child = null;
return deferHiddenOffscreenComponent(
current,
workInProgress2,
nextProps,
renderLanes2
);
}
if (0 !== (renderLanes2 & 536870912))
workInProgress2.memoizedState = { baseLanes: 0, cachePool: null }, null !== current && pushTransition(
workInProgress2,
null !== prevState ? prevState.cachePool : null
), null !== prevState ? pushHiddenContext(workInProgress2, prevState) : reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress2);
else
return workInProgress2.lanes = workInProgress2.childLanes = 536870912, deferHiddenOffscreenComponent(
current,
workInProgress2,
null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2,
renderLanes2
);
} else
null !== prevState ? (pushTransition(workInProgress2, prevState.cachePool), pushHiddenContext(workInProgress2, prevState), reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.memoizedState = null) : (null !== current && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(), reuseSuspenseHandlerOnStack(workInProgress2));
reconcileChildren(current, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function deferHiddenOffscreenComponent(current, workInProgress2, nextBaseLanes, renderLanes2) {
var JSCompiler_inline_result = peekCacheFromPool();
JSCompiler_inline_result = null === JSCompiler_inline_result ? null : {
parent: isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2,
pool: JSCompiler_inline_result
};
workInProgress2.memoizedState = {
baseLanes: nextBaseLanes,
cachePool: JSCompiler_inline_result
};
null !== current && pushTransition(workInProgress2, null);
reuseHiddenContextOnStack();
pushOffscreenSuspenseHandler(workInProgress2);
null !== current && propagateParentContextChanges(current, workInProgress2, renderLanes2, true);
return null;
}
function markRef(current, workInProgress2) {
var ref = workInProgress2.ref;
if (null === ref)
null !== current && null !== current.ref && (workInProgress2.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(formatProdErrorMessage(284));
if (null === current || current.ref !== ref)
workInProgress2.flags |= 4194816;
}
}
function updateFunctionComponent(current, workInProgress2, Component, nextProps, renderLanes2) {
prepareToReadContext(workInProgress2);
Component = renderWithHooks(
current,
workInProgress2,
Component,
nextProps,
void 0,
renderLanes2
);
nextProps = checkDidRenderIdHook();
if (null !== current && !didReceiveUpdate)
return bailoutHooks(current, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2);
isHydrating && nextProps && pushMaterializedTreeId(workInProgress2);
workInProgress2.flags |= 1;
reconcileChildren(current, workInProgress2, Component, renderLanes2);
return workInProgress2.child;
}
function replayFunctionComponent(current, workInProgress2, nextProps, Component, secondArg, renderLanes2) {
prepareToReadContext(workInProgress2);
workInProgress2.updateQueue = null;
nextProps = renderWithHooksAgain(
workInProgress2,
Component,
nextProps,
secondArg
);
finishRenderingHooks(current);
Component = checkDidRenderIdHook();
if (null !== current && !didReceiveUpdate)
return bailoutHooks(current, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2);
isHydrating && Component && pushMaterializedTreeId(workInProgress2);
workInProgress2.flags |= 1;
reconcileChildren(current, workInProgress2, nextProps, renderLanes2);
return workInProgress2.child;
}
function updateClassComponent(current, workInProgress2, Component, nextProps, renderLanes2) {
prepareToReadContext(workInProgress2);
if (null === workInProgress2.stateNode) {
var context2 = emptyContextObject, contextType = Component.contextType;
"object" === typeof contextType && null !== contextType && (context2 = readContext(contextType));
context2 = new Component(nextProps, context2);
workInProgress2.memoizedState = null !== context2.state && void 0 !== context2.state ? context2.state : null;
context2.updater = classComponentUpdater;
workInProgress2.stateNode = context2;
context2._reactInternals = workInProgress2;
context2 = workInProgress2.stateNode;
context2.props = nextProps;
context2.state = workInProgress2.memoizedState;
context2.refs = {};
initializeUpdateQueue(workInProgress2);
contextType = Component.contextType;
context2.context = "object" === typeof contextType && null !== contextType ? readContext(contextType) : emptyContextObject;
context2.state = workInProgress2.memoizedState;
contextType = Component.getDerivedStateFromProps;
"function" === typeof contextType && (applyDerivedStateFromProps(
workInProgress2,
Component,
contextType,
nextProps
), context2.state = workInProgress2.memoizedState);
"function" === typeof Component.getDerivedStateFromProps || "function" === typeof context2.getSnapshotBeforeUpdate || "function" !== typeof context2.UNSAFE_componentWillMount && "function" !== typeof context2.componentWillMount || (contextType = context2.state, "function" === typeof context2.componentWillMount && context2.componentWillMount(), "function" === typeof context2.UNSAFE_componentWillMount && context2.UNSAFE_componentWillMount(), contextType !== context2.state && classComponentUpdater.enqueueReplaceState(
context2,
context2.state,
null
), processUpdateQueue(workInProgress2, nextProps, context2, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), context2.state = workInProgress2.memoizedState);
"function" === typeof context2.componentDidMount && (workInProgress2.flags |= 4194308);
nextProps = true;
} else if (null === current) {
context2 = workInProgress2.stateNode;
var unresolvedOldProps = workInProgress2.memoizedProps, oldProps = resolveClassComponentProps(Component, unresolvedOldProps);
context2.props = oldProps;
var oldContext = context2.context, contextType$jscomp$0 = Component.contextType;
contextType = emptyContextObject;
"object" === typeof contextType$jscomp$0 && null !== contextType$jscomp$0 && (contextType = readContext(contextType$jscomp$0));
var getDerivedStateFromProps = Component.getDerivedStateFromProps;
contextType$jscomp$0 = "function" === typeof getDerivedStateFromProps || "function" === typeof context2.getSnapshotBeforeUpdate;
unresolvedOldProps = workInProgress2.pendingProps !== unresolvedOldProps;
contextType$jscomp$0 || "function" !== typeof context2.UNSAFE_componentWillReceiveProps && "function" !== typeof context2.componentWillReceiveProps || (unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps(
workInProgress2,
context2,
nextProps,
contextType
);
hasForceUpdate = false;
var oldState = workInProgress2.memoizedState;
context2.state = oldState;
processUpdateQueue(workInProgress2, nextProps, context2, renderLanes2);
suspendIfUpdateReadFromEntangledAsyncAction();
oldContext = workInProgress2.memoizedState;
unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof getDerivedStateFromProps && (applyDerivedStateFromProps(
workInProgress2,
Component,
getDerivedStateFromProps,
nextProps
), oldContext = workInProgress2.memoizedState), (oldProps = hasForceUpdate || checkShouldComponentUpdate(
workInProgress2,
Component,
oldProps,
nextProps,
oldState,
oldContext,
contextType
)) ? (contextType$jscomp$0 || "function" !== typeof context2.UNSAFE_componentWillMount && "function" !== typeof context2.componentWillMount || ("function" === typeof context2.componentWillMount && context2.componentWillMount(), "function" === typeof context2.UNSAFE_componentWillMount && context2.UNSAFE_componentWillMount()), "function" === typeof context2.componentDidMount && (workInProgress2.flags |= 4194308)) : ("function" === typeof context2.componentDidMount && (workInProgress2.flags |= 4194308), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = oldContext), context2.props = nextProps, context2.state = oldContext, context2.context = contextType, nextProps = oldProps) : ("function" === typeof context2.componentDidMount && (workInProgress2.flags |= 4194308), nextProps = false);
} else {
context2 = workInProgress2.stateNode;
cloneUpdateQueue(current, workInProgress2);
contextType = workInProgress2.memoizedProps;
contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);
context2.props = contextType$jscomp$0;
getDerivedStateFromProps = workInProgress2.pendingProps;
oldState = context2.context;
oldContext = Component.contextType;
oldProps = emptyContextObject;
"object" === typeof oldContext && null !== oldContext && (oldProps = readContext(oldContext));
unresolvedOldProps = Component.getDerivedStateFromProps;
(oldContext = "function" === typeof unresolvedOldProps || "function" === typeof context2.getSnapshotBeforeUpdate) || "function" !== typeof context2.UNSAFE_componentWillReceiveProps && "function" !== typeof context2.componentWillReceiveProps || (contextType !== getDerivedStateFromProps || oldState !== oldProps) && callComponentWillReceiveProps(
workInProgress2,
context2,
nextProps,
oldProps
);
hasForceUpdate = false;
oldState = workInProgress2.memoizedState;
context2.state = oldState;
processUpdateQueue(workInProgress2, nextProps, context2, renderLanes2);
suspendIfUpdateReadFromEntangledAsyncAction();
var newState = workInProgress2.memoizedState;
contextType !== getDerivedStateFromProps || oldState !== newState || hasForceUpdate || null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(
workInProgress2,
Component,
unresolvedOldProps,
nextProps
), newState = workInProgress2.memoizedState), (contextType$jscomp$0 = hasForceUpdate || checkShouldComponentUpdate(
workInProgress2,
Component,
contextType$jscomp$0,
nextProps,
oldState,
newState,
oldProps
) || null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? (oldContext || "function" !== typeof context2.UNSAFE_componentWillUpdate && "function" !== typeof context2.componentWillUpdate || ("function" === typeof context2.componentWillUpdate && context2.componentWillUpdate(nextProps, newState, oldProps), "function" === typeof context2.UNSAFE_componentWillUpdate && context2.UNSAFE_componentWillUpdate(
nextProps,
newState,
oldProps
)), "function" === typeof context2.componentDidUpdate && (workInProgress2.flags |= 4), "function" === typeof context2.getSnapshotBeforeUpdate && (workInProgress2.flags |= 1024)) : ("function" !== typeof context2.componentDidUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof context2.getSnapshotBeforeUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 1024), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = newState), context2.props = nextProps, context2.state = newState, context2.context = oldProps, nextProps = contextType$jscomp$0) : ("function" !== typeof context2.componentDidUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof context2.getSnapshotBeforeUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 1024), nextProps = false);
}
context2 = nextProps;
markRef(current, workInProgress2);
nextProps = 0 !== (workInProgress2.flags & 128);
context2 || nextProps ? (context2 = workInProgress2.stateNode, Component = nextProps && "function" !== typeof Component.getDerivedStateFromError ? null : context2.render(), workInProgress2.flags |= 1, null !== current && nextProps ? (workInProgress2.child = reconcileChildFibers(
workInProgress2,
current.child,
null,
renderLanes2
), workInProgress2.child = reconcileChildFibers(
workInProgress2,
null,
Component,
renderLanes2
)) : reconcileChildren(current, workInProgress2, Component, renderLanes2), workInProgress2.memoizedState = context2.state, current = workInProgress2.child) : current = bailoutOnAlreadyFinishedWork(
current,
workInProgress2,
renderLanes2
);
return current;
}
function mountHostRootWithoutHydrating(current, workInProgress2, nextChildren, renderLanes2) {
resetHydrationState();
workInProgress2.flags |= 256;
reconcileChildren(current, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function mountSuspenseOffscreenState(renderLanes2) {
return { baseLanes: renderLanes2, cachePool: getSuspendedCache() };
}
function getRemainingWorkInPrimaryTree(current, primaryTreeDidDefer, renderLanes2) {
current = null !== current ? current.childLanes & ~renderLanes2 : 0;
primaryTreeDidDefer && (current |= workInProgressDeferredLane);
return current;
}
function updateSuspenseComponent(current, workInProgress2, renderLanes2) {
var nextProps = workInProgress2.pendingProps, showFallback = false, didSuspend = 0 !== (workInProgress2.flags & 128), JSCompiler_temp;
(JSCompiler_temp = didSuspend) || (JSCompiler_temp = null !== current && null === current.memoizedState ? false : 0 !== (suspenseStackCursor.current & 2));
JSCompiler_temp && (showFallback = true, workInProgress2.flags &= -129);
JSCompiler_temp = 0 !== (workInProgress2.flags & 32);
workInProgress2.flags &= -33;
if (null === current) {
if (isHydrating) {
showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress2) : reuseSuspenseHandlerOnStack(workInProgress2);
if (isHydrating) {
var nextInstance = nextHydratableInstance, JSCompiler_temp$jscomp$0;
if (JSCompiler_temp$jscomp$0 = nextInstance)
nextInstance = canHydrateSuspenseInstance(
nextInstance,
rootOrSingletonContext
), null !== nextInstance ? (workInProgress2.memoizedState = {
dehydrated: nextInstance,
treeContext: null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null,
retryLane: 536870912,
hydrationErrors: null
}, JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0), JSCompiler_temp$jscomp$0.stateNode = nextInstance, JSCompiler_temp$jscomp$0.return = workInProgress2, workInProgress2.child = JSCompiler_temp$jscomp$0, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, JSCompiler_temp$jscomp$0 = true) : JSCompiler_temp$jscomp$0 = false;
JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress2);
}
nextInstance = workInProgress2.memoizedState;
if (null !== nextInstance && (nextInstance = nextInstance.dehydrated, null !== nextInstance))
return isSuspenseInstanceFallback(nextInstance) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912, null;
popSuspenseHandler(workInProgress2);
}
nextInstance = nextProps.children;
nextProps = nextProps.fallback;
if (showFallback)
return reuseSuspenseHandlerOnStack(workInProgress2), showFallback = workInProgress2.mode, nextInstance = mountWorkInProgressOffscreenFiber(
{ mode: "hidden", children: nextInstance },
showFallback
), nextProps = createFiberFromFragment(
nextProps,
showFallback,
renderLanes2,
null
), nextInstance.return = workInProgress2, nextProps.return = workInProgress2, nextInstance.sibling = nextProps, workInProgress2.child = nextInstance, showFallback = workInProgress2.child, showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes2), showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes2
), workInProgress2.memoizedState = SUSPENDED_MARKER, nextProps;
pushPrimaryTreeSuspenseHandler(workInProgress2);
return mountSuspensePrimaryChildren(workInProgress2, nextInstance);
}
JSCompiler_temp$jscomp$0 = current.memoizedState;
if (null !== JSCompiler_temp$jscomp$0 && (nextInstance = JSCompiler_temp$jscomp$0.dehydrated, null !== nextInstance)) {
if (didSuspend)
workInProgress2.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags &= -257, workInProgress2 = retrySuspenseComponentWithoutHydrating(
current,
workInProgress2,
renderLanes2
)) : null !== workInProgress2.memoizedState ? (reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.child = current.child, workInProgress2.flags |= 128, workInProgress2 = null) : (reuseSuspenseHandlerOnStack(workInProgress2), showFallback = nextProps.fallback, nextInstance = workInProgress2.mode, nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
nextInstance
), showFallback = createFiberFromFragment(
showFallback,
nextInstance,
renderLanes2,
null
), showFallback.flags |= 2, nextProps.return = workInProgress2, showFallback.return = workInProgress2, nextProps.sibling = showFallback, workInProgress2.child = nextProps, reconcileChildFibers(
workInProgress2,
current.child,
null,
renderLanes2
), nextProps = workInProgress2.child, nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes2), nextProps.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes2
), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = showFallback);
else if (pushPrimaryTreeSuspenseHandler(workInProgress2), isSuspenseInstanceFallback(nextInstance))
JSCompiler_temp = getSuspenseInstanceFallbackErrorDetails(nextInstance).digest, nextProps = Error(formatProdErrorMessage(419)), nextProps.stack = "", nextProps.digest = JSCompiler_temp, queueHydrationError({ value: nextProps, source: null, stack: null }), workInProgress2 = retrySuspenseComponentWithoutHydrating(
current,
workInProgress2,
renderLanes2
);
else if (didReceiveUpdate || propagateParentContextChanges(
current,
workInProgress2,
renderLanes2,
false
), JSCompiler_temp = 0 !== (renderLanes2 & current.childLanes), didReceiveUpdate || JSCompiler_temp) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp && (nextProps = renderLanes2 & -renderLanes2, nextProps = 0 !== (nextProps & 42) ? 1 : getBumpedLaneForHydrationByLane(nextProps), nextProps = 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes2)) ? 0 : nextProps, 0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane))
throw JSCompiler_temp$jscomp$0.retryLane = nextProps, enqueueConcurrentRenderForLane(current, nextProps), scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), SelectiveHydrationException;
isSuspenseInstancePending(nextInstance) || renderDidSuspendDelayIfPossible();
workInProgress2 = retrySuspenseComponentWithoutHydrating(
current,
workInProgress2,
renderLanes2
);
} else
isSuspenseInstancePending(nextInstance) ? (workInProgress2.flags |= 192, workInProgress2.child = current.child, workInProgress2 = null) : (current = JSCompiler_temp$jscomp$0.treeContext, supportsHydration && (nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(nextInstance), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, rootOrSingletonContext = false, null !== current && (idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextId = current.id, treeContextOverflow = current.overflow, treeContextProvider = workInProgress2)), workInProgress2 = mountSuspensePrimaryChildren(
workInProgress2,
nextProps.children
), workInProgress2.flags |= 4096);
return workInProgress2;
}
if (showFallback)
return reuseSuspenseHandlerOnStack(workInProgress2), showFallback = nextProps.fallback, nextInstance = workInProgress2.mode, JSCompiler_temp$jscomp$0 = current.child, didSuspend = JSCompiler_temp$jscomp$0.sibling, nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, {
mode: "hidden",
children: nextProps.children
}), nextProps.subtreeFlags = JSCompiler_temp$jscomp$0.subtreeFlags & 65011712, null !== didSuspend ? showFallback = createWorkInProgress(didSuspend, showFallback) : (showFallback = createFiberFromFragment(
showFallback,
nextInstance,
renderLanes2,
null
), showFallback.flags |= 2), showFallback.return = workInProgress2, nextProps.return = workInProgress2, nextProps.sibling = showFallback, workInProgress2.child = nextProps, nextProps = showFallback, showFallback = workInProgress2.child, nextInstance = current.child.memoizedState, null === nextInstance ? nextInstance = mountSuspenseOffscreenState(renderLanes2) : (JSCompiler_temp$jscomp$0 = nextInstance.cachePool, null !== JSCompiler_temp$jscomp$0 ? (didSuspend = isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2, JSCompiler_temp$jscomp$0 = JSCompiler_temp$jscomp$0.parent !== didSuspend ? { parent: didSuspend, pool: didSuspend } : JSCompiler_temp$jscomp$0) : JSCompiler_temp$jscomp$0 = getSuspendedCache(), nextInstance = {
baseLanes: nextInstance.baseLanes | renderLanes2,
cachePool: JSCompiler_temp$jscomp$0
}), showFallback.memoizedState = nextInstance, showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes2
), workInProgress2.memoizedState = SUSPENDED_MARKER, nextProps;
pushPrimaryTreeSuspenseHandler(workInProgress2);
renderLanes2 = current.child;
current = renderLanes2.sibling;
renderLanes2 = createWorkInProgress(renderLanes2, {
mode: "visible",
children: nextProps.children
});
renderLanes2.return = workInProgress2;
renderLanes2.sibling = null;
null !== current && (JSCompiler_temp = workInProgress2.deletions, null === JSCompiler_temp ? (workInProgress2.deletions = [current], workInProgress2.flags |= 16) : JSCompiler_temp.push(current));
workInProgress2.child = renderLanes2;
workInProgress2.memoizedState = null;
return renderLanes2;
}
function mountSuspensePrimaryChildren(workInProgress2, primaryChildren) {
primaryChildren = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: primaryChildren },
workInProgress2.mode
);
primaryChildren.return = workInProgress2;
return workInProgress2.child = primaryChildren;
}
function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
offscreenProps = createFiber(22, offscreenProps, null, mode);
offscreenProps.lanes = 0;
offscreenProps.stateNode = {
_visibility: 1,
_pendingMarkers: null,
_retryCache: null,
_transitions: null
};
return offscreenProps;
}
function retrySuspenseComponentWithoutHydrating(current, workInProgress2, renderLanes2) {
reconcileChildFibers(workInProgress2, current.child, null, renderLanes2);
current = mountSuspensePrimaryChildren(
workInProgress2,
workInProgress2.pendingProps.children
);
current.flags |= 2;
workInProgress2.memoizedState = null;
return current;
}
function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) {
fiber.lanes |= renderLanes2;
var alternate = fiber.alternate;
null !== alternate && (alternate.lanes |= renderLanes2);
scheduleContextWorkOnParentPath(fiber.return, renderLanes2, propagationRoot);
}
function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode) {
var renderState = workInProgress2.memoizedState;
null === renderState ? workInProgress2.memoizedState = {
isBackwards,
rendering: null,
renderingStartTime: 0,
last: lastContentRow,
tail,
tailMode
} : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode);
}
function updateSuspenseListComponent(current, workInProgress2, renderLanes2) {
var nextProps = workInProgress2.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail;
reconcileChildren(current, workInProgress2, nextProps.children, renderLanes2);
nextProps = suspenseStackCursor.current;
if (0 !== (nextProps & 2))
nextProps = nextProps & 1 | 2, workInProgress2.flags |= 128;
else {
if (null !== current && 0 !== (current.flags & 128))
a: for (current = workInProgress2.child; null !== current; ) {
if (13 === current.tag)
null !== current.memoizedState && scheduleSuspenseWorkOnFiber(current, renderLanes2, workInProgress2);
else if (19 === current.tag)
scheduleSuspenseWorkOnFiber(current, renderLanes2, workInProgress2);
else if (null !== current.child) {
current.child.return = current;
current = current.child;
continue;
}
if (current === workInProgress2) break a;
for (; null === current.sibling; ) {
if (null === current.return || current.return === workInProgress2)
break a;
current = current.return;
}
current.sibling.return = current.return;
current = current.sibling;
}
nextProps &= 1;
}
push(suspenseStackCursor, nextProps);
switch (revealOrder) {
case "forwards":
renderLanes2 = workInProgress2.child;
for (revealOrder = null; null !== renderLanes2; )
current = renderLanes2.alternate, null !== current && null === findFirstSuspended(current) && (revealOrder = renderLanes2), renderLanes2 = renderLanes2.sibling;
renderLanes2 = revealOrder;
null === renderLanes2 ? (revealOrder = workInProgress2.child, workInProgress2.child = null) : (revealOrder = renderLanes2.sibling, renderLanes2.sibling = null);
initSuspenseListRenderState(
workInProgress2,
false,
revealOrder,
renderLanes2,
tailMode
);
break;
case "backwards":
renderLanes2 = null;
revealOrder = workInProgress2.child;
for (workInProgress2.child = null; null !== revealOrder; ) {
current = revealOrder.alternate;
if (null !== current && null === findFirstSuspended(current)) {
workInProgress2.child = revealOrder;
break;
}
current = revealOrder.sibling;
revealOrder.sibling = renderLanes2;
renderLanes2 = revealOrder;
revealOrder = current;
}
initSuspenseListRenderState(
workInProgress2,
true,
renderLanes2,
null,
tailMode
);
break;
case "together":
initSuspenseListRenderState(workInProgress2, false, null, null, void 0);
break;
default:
workInProgress2.memoizedState = null;
}
return workInProgress2.child;
}
function bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2) {
null !== current && (workInProgress2.dependencies = current.dependencies);
workInProgressRootSkippedLanes |= workInProgress2.lanes;
if (0 === (renderLanes2 & workInProgress2.childLanes))
if (null !== current) {
if (propagateParentContextChanges(
current,
workInProgress2,
renderLanes2,
false
), 0 === (renderLanes2 & workInProgress2.childLanes))
return null;
} else return null;
if (null !== current && workInProgress2.child !== current.child)
throw Error(formatProdErrorMessage(153));
if (null !== workInProgress2.child) {
current = workInProgress2.child;
renderLanes2 = createWorkInProgress(current, current.pendingProps);
workInProgress2.child = renderLanes2;
for (renderLanes2.return = workInProgress2; null !== current.sibling; )
current = current.sibling, renderLanes2 = renderLanes2.sibling = createWorkInProgress(current, current.pendingProps), renderLanes2.return = workInProgress2;
renderLanes2.sibling = null;
}
return workInProgress2.child;
}
function checkScheduledUpdateOrContext(current, renderLanes2) {
if (0 !== (current.lanes & renderLanes2)) return true;
current = current.dependencies;
return null !== current && checkIfContextChanged(current) ? true : false;
}
function attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress2, renderLanes2) {
switch (workInProgress2.tag) {
case 3:
pushHostContainer(
workInProgress2,
workInProgress2.stateNode.containerInfo
);
pushProvider(workInProgress2, CacheContext, current.memoizedState.cache);
resetHydrationState();
break;
case 27:
case 5:
pushHostContext(workInProgress2);
break;
case 4:
pushHostContainer(
workInProgress2,
workInProgress2.stateNode.containerInfo
);
break;
case 10:
pushProvider(
workInProgress2,
workInProgress2.type,
workInProgress2.memoizedProps.value
);
break;
case 13:
var state = workInProgress2.memoizedState;
if (null !== state) {
if (null !== state.dehydrated)
return pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags |= 128, null;
if (0 !== (renderLanes2 & workInProgress2.child.childLanes))
return updateSuspenseComponent(
current,
workInProgress2,
renderLanes2
);
pushPrimaryTreeSuspenseHandler(workInProgress2);
current = bailoutOnAlreadyFinishedWork(
current,
workInProgress2,
renderLanes2
);
return null !== current ? current.sibling : null;
}
pushPrimaryTreeSuspenseHandler(workInProgress2);
break;
case 19:
var didSuspendBefore = 0 !== (current.flags & 128);
state = 0 !== (renderLanes2 & workInProgress2.childLanes);
state || (propagateParentContextChanges(
current,
workInProgress2,
renderLanes2,
false
), state = 0 !== (renderLanes2 & workInProgress2.childLanes));
if (didSuspendBefore) {
if (state)
return updateSuspenseListComponent(
current,
workInProgress2,
renderLanes2
);
workInProgress2.flags |= 128;
}
didSuspendBefore = workInProgress2.memoizedState;
null !== didSuspendBefore && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null);
push(suspenseStackCursor, suspenseStackCursor.current);
if (state) break;
else return null;
case 22:
case 23:
return workInProgress2.lanes = 0, updateOffscreenComponent(current, workInProgress2, renderLanes2);
case 24:
pushProvider(workInProgress2, CacheContext, current.memoizedState.cache);
}
return bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2);
}
function beginWork(current, workInProgress2, renderLanes2) {
if (null !== current)
if (current.memoizedProps !== workInProgress2.pendingProps)
didReceiveUpdate = true;
else {
if (!checkScheduledUpdateOrContext(current, renderLanes2) && 0 === (workInProgress2.flags & 128))
return didReceiveUpdate = false, attemptEarlyBailoutIfNoScheduledUpdate(
current,
workInProgress2,
renderLanes2
);
didReceiveUpdate = 0 !== (current.flags & 131072) ? true : false;
}
else
didReceiveUpdate = false, isHydrating && 0 !== (workInProgress2.flags & 1048576) && pushTreeId(workInProgress2, treeForkCount, workInProgress2.index);
workInProgress2.lanes = 0;
switch (workInProgress2.tag) {
case 16:
a: {
current = workInProgress2.pendingProps;
var lazyComponent = workInProgress2.elementType, init = lazyComponent._init;
lazyComponent = init(lazyComponent._payload);
workInProgress2.type = lazyComponent;
if ("function" === typeof lazyComponent)
shouldConstruct(lazyComponent) ? (current = resolveClassComponentProps(lazyComponent, current), workInProgress2.tag = 1, workInProgress2 = updateClassComponent(
null,
workInProgress2,
lazyComponent,
current,
renderLanes2
)) : (workInProgress2.tag = 0, workInProgress2 = updateFunctionComponent(
null,
workInProgress2,
lazyComponent,
current,
renderLanes2
));
else {
if (void 0 !== lazyComponent && null !== lazyComponent) {
if (init = lazyComponent.$$typeof, init === REACT_FORWARD_REF_TYPE) {
workInProgress2.tag = 11;
workInProgress2 = updateForwardRef(
null,
workInProgress2,
lazyComponent,
current,
renderLanes2
);
break a;
} else if (init === REACT_MEMO_TYPE) {
workInProgress2.tag = 14;
workInProgress2 = updateMemoComponent(
null,
workInProgress2,
lazyComponent,
current,
renderLanes2
);
break a;
}
}
workInProgress2 = getComponentNameFromType(lazyComponent) || lazyComponent;
throw Error(formatProdErrorMessage(306, workInProgress2, ""));
}
}
return workInProgress2;
case 0:
return updateFunctionComponent(
current,
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps,
renderLanes2
);
case 1:
return lazyComponent = workInProgress2.type, init = resolveClassComponentProps(
lazyComponent,
workInProgress2.pendingProps
), updateClassComponent(
current,
workInProgress2,
lazyComponent,
init,
renderLanes2
);
case 3:
a: {
pushHostContainer(
workInProgress2,
workInProgress2.stateNode.containerInfo
);
if (null === current) throw Error(formatProdErrorMessage(387));
var nextProps = workInProgress2.pendingProps;
init = workInProgress2.memoizedState;
lazyComponent = init.element;
cloneUpdateQueue(current, workInProgress2);
processUpdateQueue(workInProgress2, nextProps, null, renderLanes2);
var nextState = workInProgress2.memoizedState;
nextProps = nextState.cache;
pushProvider(workInProgress2, CacheContext, nextProps);
nextProps !== init.cache && propagateContextChanges(
workInProgress2,
[CacheContext],
renderLanes2,
true
);
suspendIfUpdateReadFromEntangledAsyncAction();
nextProps = nextState.element;
if (supportsHydration && init.isDehydrated)
if (init = {
element: nextProps,
isDehydrated: false,
cache: nextState.cache
}, workInProgress2.updateQueue.baseState = init, workInProgress2.memoizedState = init, workInProgress2.flags & 256) {
workInProgress2 = mountHostRootWithoutHydrating(
current,
workInProgress2,
nextProps,
renderLanes2
);
break a;
} else if (nextProps !== lazyComponent) {
lazyComponent = createCapturedValueAtFiber(
Error(formatProdErrorMessage(424)),
workInProgress2
);
queueHydrationError(lazyComponent);
workInProgress2 = mountHostRootWithoutHydrating(
current,
workInProgress2,
nextProps,
renderLanes2
);
break a;
} else
for (supportsHydration && (nextHydratableInstance = getFirstHydratableChildWithinContainer(
workInProgress2.stateNode.containerInfo
), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, rootOrSingletonContext = true), renderLanes2 = mountChildFibers(
workInProgress2,
null,
nextProps,
renderLanes2
), workInProgress2.child = renderLanes2; renderLanes2; )
renderLanes2.flags = renderLanes2.flags & -3 | 4096, renderLanes2 = renderLanes2.sibling;
else {
resetHydrationState();
if (nextProps === lazyComponent) {
workInProgress2 = bailoutOnAlreadyFinishedWork(
current,
workInProgress2,
renderLanes2
);
break a;
}
reconcileChildren(current, workInProgress2, nextProps, renderLanes2);
}
workInProgress2 = workInProgress2.child;
}
return workInProgress2;
case 26:
if (supportsResources)
return markRef(current, workInProgress2), null === current ? (renderLanes2 = getResource(
workInProgress2.type,
null,
workInProgress2.pendingProps,
null
)) ? workInProgress2.memoizedState = renderLanes2 : isHydrating || (workInProgress2.stateNode = createHoistableInstance(
workInProgress2.type,
workInProgress2.pendingProps,
rootInstanceStackCursor.current,
workInProgress2
)) : workInProgress2.memoizedState = getResource(
workInProgress2.type,
current.memoizedProps,
workInProgress2.pendingProps,
current.memoizedState
), null;
case 27:
if (supportsSingletons)
return pushHostContext(workInProgress2), null === current && supportsSingletons && isHydrating && (lazyComponent = workInProgress2.stateNode = resolveSingletonInstance(
workInProgress2.type,
workInProgress2.pendingProps,
rootInstanceStackCursor.current,
contextStackCursor.current,
false
), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, nextHydratableInstance = getFirstHydratableChildWithinSingleton(
workInProgress2.type,
lazyComponent,
nextHydratableInstance
)), reconcileChildren(
current,
workInProgress2,
workInProgress2.pendingProps.children,
renderLanes2
), markRef(current, workInProgress2), null === current && (workInProgress2.flags |= 4194304), workInProgress2.child;
case 5:
if (null === current && isHydrating) {
validateHydratableInstance(
workInProgress2.type,
workInProgress2.pendingProps,
contextStackCursor.current
);
if (init = lazyComponent = nextHydratableInstance)
lazyComponent = canHydrateInstance(
lazyComponent,
workInProgress2.type,
workInProgress2.pendingProps,
rootOrSingletonContext
), null !== lazyComponent ? (workInProgress2.stateNode = lazyComponent, hydrationParentFiber = workInProgress2, nextHydratableInstance = getFirstHydratableChild(lazyComponent), rootOrSingletonContext = false, init = true) : init = false;
init || throwOnHydrationMismatch(workInProgress2);
}
pushHostContext(workInProgress2);
init = workInProgress2.type;
nextProps = workInProgress2.pendingProps;
nextState = null !== current ? current.memoizedProps : null;
lazyComponent = nextProps.children;
shouldSetTextContent(init, nextProps) ? lazyComponent = null : null !== nextState && shouldSetTextContent(init, nextState) && (workInProgress2.flags |= 32);
null !== workInProgress2.memoizedState && (init = renderWithHooks(
current,
workInProgress2,
TransitionAwareHostComponent,
null,
null,
renderLanes2
), isPrimaryRenderer ? HostTransitionContext._currentValue = init : HostTransitionContext._currentValue2 = init);
markRef(current, workInProgress2);
reconcileChildren(current, workInProgress2, lazyComponent, renderLanes2);
return workInProgress2.child;
case 6:
if (null === current && isHydrating) {
validateHydratableTextInstance(
workInProgress2.pendingProps,
contextStackCursor.current
);
if (current = renderLanes2 = nextHydratableInstance)
renderLanes2 = canHydrateTextInstance(
renderLanes2,
workInProgress2.pendingProps,
rootOrSingletonContext
), null !== renderLanes2 ? (workInProgress2.stateNode = renderLanes2, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, current = true) : current = false;
current || throwOnHydrationMismatch(workInProgress2);
}
return null;
case 13:
return updateSuspenseComponent(current, workInProgress2, renderLanes2);
case 4:
return pushHostContainer(
workInProgress2,
workInProgress2.stateNode.containerInfo
), lazyComponent = workInProgress2.pendingProps, null === current ? workInProgress2.child = reconcileChildFibers(
workInProgress2,
null,
lazyComponent,
renderLanes2
) : reconcileChildren(
current,
workInProgress2,
lazyComponent,
renderLanes2
), workInProgress2.child;
case 11:
return updateForwardRef(
current,
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps,
renderLanes2
);
case 7:
return reconcileChildren(
current,
workInProgress2,
workInProgress2.pendingProps,
renderLanes2
), workInProgress2.child;
case 8:
return reconcileChildren(
current,
workInProgress2,
workInProgress2.pendingProps.children,
renderLanes2
), workInProgress2.child;
case 12:
return reconcileChildren(
current,
workInProgress2,
workInProgress2.pendingProps.children,
renderLanes2
), workInProgress2.child;
case 10:
return lazyComponent = workInProgress2.pendingProps, pushProvider(
workInProgress2,
workInProgress2.type,
lazyComponent.value
), reconcileChildren(
current,
workInProgress2,
lazyComponent.children,
renderLanes2
), workInProgress2.child;
case 9:
return init = workInProgress2.type._context, lazyComponent = workInProgress2.pendingProps.children, prepareToReadContext(workInProgress2), init = readContext(init), lazyComponent = lazyComponent(init), workInProgress2.flags |= 1, reconcileChildren(
current,
workInProgress2,
lazyComponent,
renderLanes2
), workInProgress2.child;
case 14:
return updateMemoComponent(
current,
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps,
renderLanes2
);
case 15:
return updateSimpleMemoComponent(
current,
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps,
renderLanes2
);
case 19:
return updateSuspenseListComponent(
current,
workInProgress2,
renderLanes2
);
case 31:
return lazyComponent = workInProgress2.pendingProps, renderLanes2 = workInProgress2.mode, lazyComponent = {
mode: lazyComponent.mode,
children: lazyComponent.children
}, null === current ? (renderLanes2 = mountWorkInProgressOffscreenFiber(
lazyComponent,
renderLanes2
), renderLanes2.ref = workInProgress2.ref, workInProgress2.child = renderLanes2, renderLanes2.return = workInProgress2, workInProgress2 = renderLanes2) : (renderLanes2 = createWorkInProgress(
current.child,
lazyComponent
), renderLanes2.ref = workInProgress2.ref, workInProgress2.child = renderLanes2, renderLanes2.return = workInProgress2, workInProgress2 = renderLanes2), workInProgress2;
case 22:
return updateOffscreenComponent(current, workInProgress2, renderLanes2);
case 24:
return prepareToReadContext(workInProgress2), lazyComponent = readContext(CacheContext), null === current ? (init = peekCacheFromPool(), null === init && (init = workInProgressRoot, nextProps = createCache(), init.pooledCache = nextProps, nextProps.refCount++, null !== nextProps && (init.pooledCacheLanes |= renderLanes2), init = nextProps), workInProgress2.memoizedState = {
parent: lazyComponent,
cache: init
}, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, init)) : (0 !== (current.lanes & renderLanes2) && (cloneUpdateQueue(current, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), init = current.memoizedState, nextProps = workInProgress2.memoizedState, init.parent !== lazyComponent ? (init = { parent: lazyComponent, cache: lazyComponent }, workInProgress2.memoizedState = init, 0 === workInProgress2.lanes && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = init), pushProvider(workInProgress2, CacheContext, lazyComponent)) : (lazyComponent = nextProps.cache, pushProvider(workInProgress2, CacheContext, lazyComponent), lazyComponent !== init.cache && propagateContextChanges(
workInProgress2,
[CacheContext],
renderLanes2,
true
))), reconcileChildren(
current,
workInProgress2,
workInProgress2.pendingProps.children,
renderLanes2
), workInProgress2.child;
case 29:
throw workInProgress2.pendingProps;
}
throw Error(formatProdErrorMessage(156, workInProgress2.tag));
}
function markUpdate(workInProgress2) {
workInProgress2.flags |= 4;
}
function doesRequireClone(current, completedWork) {
if (null !== current && current.child === completedWork.child) return false;
if (0 !== (completedWork.flags & 16)) return true;
for (current = completedWork.child; null !== current; ) {
if (0 !== (current.flags & 13878) || 0 !== (current.subtreeFlags & 13878))
return true;
current = current.sibling;
}
return false;
}
function appendAllChildren(parent, workInProgress2, needsVisibilityToggle, isHidden2) {
if (supportsMutation)
for (needsVisibilityToggle = workInProgress2.child; null !== needsVisibilityToggle; ) {
if (5 === needsVisibilityToggle.tag || 6 === needsVisibilityToggle.tag)
appendInitialChild(parent, needsVisibilityToggle.stateNode);
else if (!(4 === needsVisibilityToggle.tag || supportsSingletons && 27 === needsVisibilityToggle.tag) && null !== needsVisibilityToggle.child) {
needsVisibilityToggle.child.return = needsVisibilityToggle;
needsVisibilityToggle = needsVisibilityToggle.child;
continue;
}
if (needsVisibilityToggle === workInProgress2) break;
for (; null === needsVisibilityToggle.sibling; ) {
if (null === needsVisibilityToggle.return || needsVisibilityToggle.return === workInProgress2)
return;
needsVisibilityToggle = needsVisibilityToggle.return;
}
needsVisibilityToggle.sibling.return = needsVisibilityToggle.return;
needsVisibilityToggle = needsVisibilityToggle.sibling;
}
else if (supportsPersistence)
for (var node$93 = workInProgress2.child; null !== node$93; ) {
if (5 === node$93.tag) {
var instance2 = node$93.stateNode;
needsVisibilityToggle && isHidden2 && (instance2 = cloneHiddenInstance(
instance2,
node$93.type,
node$93.memoizedProps
));
appendInitialChild(parent, instance2);
} else if (6 === node$93.tag)
instance2 = node$93.stateNode, needsVisibilityToggle && isHidden2 && (instance2 = cloneHiddenTextInstance(
instance2,
node$93.memoizedProps
)), appendInitialChild(parent, instance2);
else if (4 !== node$93.tag) {
if (22 === node$93.tag && null !== node$93.memoizedState)
instance2 = node$93.child, null !== instance2 && (instance2.return = node$93), appendAllChildren(parent, node$93, true, true);
else if (null !== node$93.child) {
node$93.child.return = node$93;
node$93 = node$93.child;
continue;
}
}
if (node$93 === workInProgress2) break;
for (; null === node$93.sibling; ) {
if (null === node$93.return || node$93.return === workInProgress2)
return;
node$93 = node$93.return;
}
node$93.sibling.return = node$93.return;
node$93 = node$93.sibling;
}
}
function appendAllChildrenToContainer(containerChildSet, workInProgress2, needsVisibilityToggle, isHidden2) {
var hasOffscreenComponentChild = false;
if (supportsPersistence)
for (var node = workInProgress2.child; null !== node; ) {
if (5 === node.tag) {
var instance2 = node.stateNode;
needsVisibilityToggle && isHidden2 && (instance2 = cloneHiddenInstance(
instance2,
node.type,
node.memoizedProps
));
appendChildToContainerChildSet(containerChildSet, instance2);
} else if (6 === node.tag)
instance2 = node.stateNode, needsVisibilityToggle && isHidden2 && (instance2 = cloneHiddenTextInstance(
instance2,
node.memoizedProps
)), appendChildToContainerChildSet(containerChildSet, instance2);
else if (4 !== node.tag) {
if (22 === node.tag && null !== node.memoizedState)
hasOffscreenComponentChild = node.child, null !== hasOffscreenComponentChild && (hasOffscreenComponentChild.return = node), appendAllChildrenToContainer(containerChildSet, node, true, true), hasOffscreenComponentChild = true;
else if (null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
}
if (node === workInProgress2) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === workInProgress2)
return hasOffscreenComponentChild;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
return hasOffscreenComponentChild;
}
function updateHostContainer(current, workInProgress2) {
if (supportsPersistence && doesRequireClone(current, workInProgress2)) {
current = workInProgress2.stateNode;
var container = current.containerInfo, newChildSet = createContainerChildSet();
appendAllChildrenToContainer(newChildSet, workInProgress2, false, false);
current.pendingChildren = newChildSet;
markUpdate(workInProgress2);
finalizeContainerChildren(container, newChildSet);
}
}
function updateHostComponent(current, workInProgress2, type, newProps) {
if (supportsMutation)
current.memoizedProps !== newProps && markUpdate(workInProgress2);
else if (supportsPersistence) {
var currentInstance = current.stateNode, oldProps$96 = current.memoizedProps;
if ((current = doesRequireClone(current, workInProgress2)) || oldProps$96 !== newProps) {
var currentHostContext = contextStackCursor.current;
oldProps$96 = cloneInstance(
currentInstance,
type,
oldProps$96,
newProps,
!current,
null
);
oldProps$96 === currentInstance ? workInProgress2.stateNode = currentInstance : (finalizeInitialChildren(
oldProps$96,
type,
newProps,
currentHostContext
) && markUpdate(workInProgress2), workInProgress2.stateNode = oldProps$96, current ? appendAllChildren(oldProps$96, workInProgress2, false, false) : markUpdate(workInProgress2));
} else workInProgress2.stateNode = currentInstance;
}
}
function preloadInstanceAndSuspendIfNeeded(workInProgress2, type, props) {
if (maySuspendCommit(type, props)) {
if (workInProgress2.flags |= 16777216, !preloadInstance(type, props))
if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
else
throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
} else workInProgress2.flags &= -16777217;
}
function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) {
if (mayResourceSuspendCommit(resource)) {
if (workInProgress2.flags |= 16777216, !preloadResource(resource))
if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
else
throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
} else workInProgress2.flags &= -16777217;
}
function scheduleRetryEffect(workInProgress2, retryQueue) {
null !== retryQueue && (workInProgress2.flags |= 4);
workInProgress2.flags & 16384 && (retryQueue = 22 !== workInProgress2.tag ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue);
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
if (!isHydrating)
switch (renderState.tailMode) {
case "hidden":
hasRenderedATailFallback = renderState.tail;
for (var lastTailNode = null; null !== hasRenderedATailFallback; )
null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling;
null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null;
break;
case "collapsed":
lastTailNode = renderState.tail;
for (var lastTailNode$98 = null; null !== lastTailNode; )
null !== lastTailNode.alternate && (lastTailNode$98 = lastTailNode), lastTailNode = lastTailNode.sibling;
null === lastTailNode$98 ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : lastTailNode$98.sibling = null;
}
}
function bubbleProperties(completedWork) {
var didBailout = null !== completedWork.alternate && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0;
if (didBailout)
for (var child$99 = completedWork.child; null !== child$99; )
newChildLanes |= child$99.lanes | child$99.childLanes, subtreeFlags |= child$99.subtreeFlags & 65011712, subtreeFlags |= child$99.flags & 65011712, child$99.return = completedWork, child$99 = child$99.sibling;
else
for (child$99 = completedWork.child; null !== child$99; )
newChildLanes |= child$99.lanes | child$99.childLanes, subtreeFlags |= child$99.subtreeFlags, subtreeFlags |= child$99.flags, child$99.return = completedWork, child$99 = child$99.sibling;
completedWork.subtreeFlags |= subtreeFlags;
completedWork.childLanes = newChildLanes;
return didBailout;
}
function completeWork(current, workInProgress2, renderLanes2) {
var newProps = workInProgress2.pendingProps;
popTreeContext(workInProgress2);
switch (workInProgress2.tag) {
case 31:
case 16:
case 15:
case 0:
case 11:
case 7:
case 8:
case 12:
case 9:
case 14:
return bubbleProperties(workInProgress2), null;
case 1:
return bubbleProperties(workInProgress2), null;
case 3:
renderLanes2 = workInProgress2.stateNode;
newProps = null;
null !== current && (newProps = current.memoizedState.cache);
workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048);
popProvider(CacheContext);
popHostContainer();
renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null);
if (null === current || null === current.child)
popHydrationState(workInProgress2) ? markUpdate(workInProgress2) : null === current || current.memoizedState.isDehydrated && 0 === (workInProgress2.flags & 256) || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable());
updateHostContainer(current, workInProgress2);
bubbleProperties(workInProgress2);
return null;
case 26:
if (supportsResources) {
renderLanes2 = workInProgress2.type;
var nextResource = workInProgress2.memoizedState;
null === current ? (markUpdate(workInProgress2), null !== nextResource ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
workInProgress2,
nextResource
)) : (bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
workInProgress2,
renderLanes2,
newProps
))) : nextResource ? nextResource !== current.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
workInProgress2,
nextResource
)) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (supportsMutation ? current.memoizedProps !== newProps && markUpdate(workInProgress2) : updateHostComponent(
current,
workInProgress2,
renderLanes2,
newProps
), bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
workInProgress2,
renderLanes2,
newProps
));
return null;
}
case 27:
if (supportsSingletons) {
popHostContext(workInProgress2);
renderLanes2 = rootInstanceStackCursor.current;
nextResource = workInProgress2.type;
if (null !== current && null != workInProgress2.stateNode)
supportsMutation ? current.memoizedProps !== newProps && markUpdate(workInProgress2) : updateHostComponent(
current,
workInProgress2,
nextResource,
newProps
);
else {
if (!newProps) {
if (null === workInProgress2.stateNode)
throw Error(formatProdErrorMessage(166));
bubbleProperties(workInProgress2);
return null;
}
current = contextStackCursor.current;
popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current) : (current = resolveSingletonInstance(
nextResource,
newProps,
renderLanes2,
current,
true
), workInProgress2.stateNode = current, markUpdate(workInProgress2));
}
bubbleProperties(workInProgress2);
return null;
}
case 5:
popHostContext(workInProgress2);
renderLanes2 = workInProgress2.type;
if (null !== current && null != workInProgress2.stateNode)
updateHostComponent(current, workInProgress2, renderLanes2, newProps);
else {
if (!newProps) {
if (null === workInProgress2.stateNode)
throw Error(formatProdErrorMessage(166));
bubbleProperties(workInProgress2);
return null;
}
current = contextStackCursor.current;
popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current) : (nextResource = createInstance2(
renderLanes2,
newProps,
rootInstanceStackCursor.current,
current,
workInProgress2
), appendAllChildren(nextResource, workInProgress2, false, false), workInProgress2.stateNode = nextResource, finalizeInitialChildren(
nextResource,
renderLanes2,
newProps,
current
) && markUpdate(workInProgress2));
}
bubbleProperties(workInProgress2);
preloadInstanceAndSuspendIfNeeded(
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps
);
return null;
case 6:
if (current && null != workInProgress2.stateNode)
renderLanes2 = current.memoizedProps, supportsMutation ? renderLanes2 !== newProps && markUpdate(workInProgress2) : supportsPersistence && (renderLanes2 !== newProps ? (workInProgress2.stateNode = createTextInstance(
newProps,
rootInstanceStackCursor.current,
contextStackCursor.current,
workInProgress2
), markUpdate(workInProgress2)) : workInProgress2.stateNode = current.stateNode);
else {
if ("string" !== typeof newProps && null === workInProgress2.stateNode)
throw Error(formatProdErrorMessage(166));
current = rootInstanceStackCursor.current;
renderLanes2 = contextStackCursor.current;
if (popHydrationState(workInProgress2)) {
if (!supportsHydration) throw Error(formatProdErrorMessage(176));
current = workInProgress2.stateNode;
renderLanes2 = workInProgress2.memoizedProps;
newProps = null;
nextResource = hydrationParentFiber;
if (null !== nextResource)
switch (nextResource.tag) {
case 27:
case 5:
newProps = nextResource.memoizedProps;
}
hydrateTextInstance(
current,
renderLanes2,
workInProgress2,
newProps
) || throwOnHydrationMismatch(workInProgress2);
} else
workInProgress2.stateNode = createTextInstance(
newProps,
current,
renderLanes2,
workInProgress2
);
}
bubbleProperties(workInProgress2);
return null;
case 13:
newProps = workInProgress2.memoizedState;
if (null === current || null !== current.memoizedState && null !== current.memoizedState.dehydrated) {
nextResource = popHydrationState(workInProgress2);
if (null !== newProps && null !== newProps.dehydrated) {
if (null === current) {
if (!nextResource) throw Error(formatProdErrorMessage(318));
if (!supportsHydration) throw Error(formatProdErrorMessage(344));
nextResource = workInProgress2.memoizedState;
nextResource = null !== nextResource ? nextResource.dehydrated : null;
if (!nextResource) throw Error(formatProdErrorMessage(317));
hydrateSuspenseInstance(nextResource, workInProgress2);
} else
resetHydrationState(), 0 === (workInProgress2.flags & 128) && (workInProgress2.memoizedState = null), workInProgress2.flags |= 4;
bubbleProperties(workInProgress2);
nextResource = false;
} else
nextResource = upgradeHydrationErrorsToRecoverable(), null !== current && null !== current.memoizedState && (current.memoizedState.hydrationErrors = nextResource), nextResource = true;
if (!nextResource) {
if (workInProgress2.flags & 256)
return popSuspenseHandler(workInProgress2), workInProgress2;
popSuspenseHandler(workInProgress2);
return null;
}
}
popSuspenseHandler(workInProgress2);
if (0 !== (workInProgress2.flags & 128))
return workInProgress2.lanes = renderLanes2, workInProgress2;
renderLanes2 = null !== newProps;
current = null !== current && null !== current.memoizedState;
if (renderLanes2) {
newProps = workInProgress2.child;
nextResource = null;
null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (nextResource = newProps.alternate.memoizedState.cachePool.pool);
var cache$113 = null;
null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && (cache$113 = newProps.memoizedState.cachePool.pool);
cache$113 !== nextResource && (newProps.flags |= 2048);
}
renderLanes2 !== current && renderLanes2 && (workInProgress2.child.flags |= 8192);
scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue);
bubbleProperties(workInProgress2);
return null;
case 4:
return popHostContainer(), updateHostContainer(current, workInProgress2), null === current && preparePortalMount(workInProgress2.stateNode.containerInfo), bubbleProperties(workInProgress2), null;
case 10:
return popProvider(workInProgress2.type), bubbleProperties(workInProgress2), null;
case 19:
pop(suspenseStackCursor);
nextResource = workInProgress2.memoizedState;
if (null === nextResource)
return bubbleProperties(workInProgress2), null;
newProps = 0 !== (workInProgress2.flags & 128);
cache$113 = nextResource.rendering;
if (null === cache$113)
if (newProps) cutOffTailIfNeeded(nextResource, false);
else {
if (0 !== workInProgressRootExitStatus || null !== current && 0 !== (current.flags & 128))
for (current = workInProgress2.child; null !== current; ) {
cache$113 = findFirstSuspended(current);
if (null !== cache$113) {
workInProgress2.flags |= 128;
cutOffTailIfNeeded(nextResource, false);
current = cache$113.updateQueue;
workInProgress2.updateQueue = current;
scheduleRetryEffect(workInProgress2, current);
workInProgress2.subtreeFlags = 0;
current = renderLanes2;
for (renderLanes2 = workInProgress2.child; null !== renderLanes2; )
resetWorkInProgress(renderLanes2, current), renderLanes2 = renderLanes2.sibling;
push(
suspenseStackCursor,
suspenseStackCursor.current & 1 | 2
);
return workInProgress2.child;
}
current = current.sibling;
}
null !== nextResource.tail && now() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, newProps = true, cutOffTailIfNeeded(nextResource, false), workInProgress2.lanes = 4194304);
}
else {
if (!newProps)
if (current = findFirstSuspended(cache$113), null !== current) {
if (workInProgress2.flags |= 128, newProps = true, current = current.updateQueue, workInProgress2.updateQueue = current, scheduleRetryEffect(workInProgress2, current), cutOffTailIfNeeded(nextResource, true), null === nextResource.tail && "hidden" === nextResource.tailMode && !cache$113.alternate && !isHydrating)
return bubbleProperties(workInProgress2), null;
} else
2 * now() - nextResource.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128, newProps = true, cutOffTailIfNeeded(nextResource, false), workInProgress2.lanes = 4194304);
nextResource.isBackwards ? (cache$113.sibling = workInProgress2.child, workInProgress2.child = cache$113) : (current = nextResource.last, null !== current ? current.sibling = cache$113 : workInProgress2.child = cache$113, nextResource.last = cache$113);
}
if (null !== nextResource.tail)
return workInProgress2 = nextResource.tail, nextResource.rendering = workInProgress2, nextResource.tail = workInProgress2.sibling, nextResource.renderingStartTime = now(), workInProgress2.sibling = null, current = suspenseStackCursor.current, push(
suspenseStackCursor,
newProps ? current & 1 | 2 : current & 1
), workInProgress2;
bubbleProperties(workInProgress2);
return null;
case 22:
case 23:
return popSuspenseHandler(workInProgress2), popHiddenContext(), newProps = null !== workInProgress2.memoizedState, null !== current ? null !== current.memoizedState !== newProps && (workInProgress2.flags |= 8192) : newProps && (workInProgress2.flags |= 8192), newProps ? 0 !== (renderLanes2 & 536870912) && 0 === (workInProgress2.flags & 128) && (bubbleProperties(workInProgress2), workInProgress2.subtreeFlags & 6 && (workInProgress2.flags |= 8192)) : bubbleProperties(workInProgress2), renderLanes2 = workInProgress2.updateQueue, null !== renderLanes2 && scheduleRetryEffect(workInProgress2, renderLanes2.retryQueue), renderLanes2 = null, null !== current && null !== current.memoizedState && null !== current.memoizedState.cachePool && (renderLanes2 = current.memoizedState.cachePool.pool), newProps = null, null !== workInProgress2.memoizedState && null !== workInProgress2.memoizedState.cachePool && (newProps = workInProgress2.memoizedState.cachePool.pool), newProps !== renderLanes2 && (workInProgress2.flags |= 2048), null !== current && pop(resumedCache), null;
case 24:
return renderLanes2 = null, null !== current && (renderLanes2 = current.memoizedState.cache), workInProgress2.memoizedState.cache !== renderLanes2 && (workInProgress2.flags |= 2048), popProvider(CacheContext), bubbleProperties(workInProgress2), null;
case 25:
return null;
case 30:
return null;
}
throw Error(formatProdErrorMessage(156, workInProgress2.tag));
}
function unwindWork(current, workInProgress2) {
popTreeContext(workInProgress2);
switch (workInProgress2.tag) {
case 1:
return current = workInProgress2.flags, current & 65536 ? (workInProgress2.flags = current & -65537 | 128, workInProgress2) : null;
case 3:
return popProvider(CacheContext), popHostContainer(), current = workInProgress2.flags, 0 !== (current & 65536) && 0 === (current & 128) ? (workInProgress2.flags = current & -65537 | 128, workInProgress2) : null;
case 26:
case 27:
case 5:
return popHostContext(workInProgress2), null;
case 13:
popSuspenseHandler(workInProgress2);
current = workInProgress2.memoizedState;
if (null !== current && null !== current.dehydrated) {
if (null === workInProgress2.alternate)
throw Error(formatProdErrorMessage(340));
resetHydrationState();
}
current = workInProgress2.flags;
return current & 65536 ? (workInProgress2.flags = current & -65537 | 128, workInProgress2) : null;
case 19:
return pop(suspenseStackCursor), null;
case 4:
return popHostContainer(), null;
case 10:
return popProvider(workInProgress2.type), null;
case 22:
case 23:
return popSuspenseHandler(workInProgress2), popHiddenContext(), null !== current && pop(resumedCache), current = workInProgress2.flags, current & 65536 ? (workInProgress2.flags = current & -65537 | 128, workInProgress2) : null;
case 24:
return popProvider(CacheContext), null;
case 25:
return null;
default:
return null;
}
}
function unwindInterruptedWork(current, interruptedWork) {
popTreeContext(interruptedWork);
switch (interruptedWork.tag) {
case 3:
popProvider(CacheContext);
popHostContainer();
break;
case 26:
case 27:
case 5:
popHostContext(interruptedWork);
break;
case 4:
popHostContainer();
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
case 19:
pop(suspenseStackCursor);
break;
case 10:
popProvider(interruptedWork.type);
break;
case 22:
case 23:
popSuspenseHandler(interruptedWork);
popHiddenContext();
null !== current && pop(resumedCache);
break;
case 24:
popProvider(CacheContext);
}
}
function commitHookEffectListMount(flags, finishedWork) {
try {
var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
if (null !== lastEffect) {
var firstEffect = lastEffect.next;
updateQueue = firstEffect;
do {
if ((updateQueue.tag & flags) === flags) {
lastEffect = void 0;
var create2 = updateQueue.create, inst = updateQueue.inst;
lastEffect = create2();
inst.destroy = lastEffect;
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
}
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor$jscomp$0) {
try {
var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
if (null !== lastEffect) {
var firstEffect = lastEffect.next;
updateQueue = firstEffect;
do {
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst, destroy = inst.destroy;
if (void 0 !== destroy) {
inst.destroy = void 0;
lastEffect = finishedWork;
var nearestMountedAncestor = nearestMountedAncestor$jscomp$0, destroy_ = destroy;
try {
destroy_();
} catch (error) {
captureCommitPhaseError(
lastEffect,
nearestMountedAncestor,
error
);
}
}
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
}
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitClassCallbacks(finishedWork) {
var updateQueue = finishedWork.updateQueue;
if (null !== updateQueue) {
var instance2 = finishedWork.stateNode;
try {
commitCallbacks(updateQueue, instance2);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
}
function safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance2) {
instance2.props = resolveClassComponentProps(
current.type,
current.memoizedProps
);
instance2.state = current.memoizedState;
try {
instance2.componentWillUnmount();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function safelyAttachRef(current, nearestMountedAncestor) {
try {
var ref = current.ref;
if (null !== ref) {
switch (current.tag) {
case 26:
case 27:
case 5:
var instanceToUse = getPublicInstance(current.stateNode);
break;
case 30:
instanceToUse = current.stateNode;
break;
default:
instanceToUse = current.stateNode;
}
"function" === typeof ref ? current.refCleanup = ref(instanceToUse) : ref.current = instanceToUse;
}
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function safelyDetachRef(current, nearestMountedAncestor) {
var ref = current.ref, refCleanup = current.refCleanup;
if (null !== ref)
if ("function" === typeof refCleanup)
try {
refCleanup();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
} finally {
current.refCleanup = null, current = current.alternate, null != current && (current.refCleanup = null);
}
else if ("function" === typeof ref)
try {
ref(null);
} catch (error$129) {
captureCommitPhaseError(current, nearestMountedAncestor, error$129);
}
else ref.current = null;
}
function commitHostMount(finishedWork) {
var type = finishedWork.type, props = finishedWork.memoizedProps, instance2 = finishedWork.stateNode;
try {
commitMount(instance2, type, props, finishedWork);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitHostUpdate(finishedWork, newProps, oldProps) {
try {
commitUpdate(
finishedWork.stateNode,
finishedWork.type,
oldProps,
newProps,
finishedWork
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || (supportsResources ? 26 === fiber.tag : false) || (supportsSingletons ? 27 === fiber.tag && isSingletonScope(fiber.type) : false) || 4 === fiber.tag;
}
function getHostSibling(fiber) {
a: for (; ; ) {
for (; null === fiber.sibling; ) {
if (null === fiber.return || isHostParent(fiber.return)) return null;
fiber = fiber.return;
}
fiber.sibling.return = fiber.return;
for (fiber = fiber.sibling; 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag; ) {
if (supportsSingletons && 27 === fiber.tag && isSingletonScope(fiber.type))
continue a;
if (fiber.flags & 2) continue a;
if (null === fiber.child || 4 === fiber.tag) continue a;
else fiber.child.return = fiber, fiber = fiber.child;
}
if (!(fiber.flags & 2)) return fiber.stateNode;
}
}
function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
var tag = node.tag;
if (5 === tag || 6 === tag)
node = node.stateNode, before ? insertInContainerBefore(parent, node, before) : appendChildToContainer(parent, node);
else if (4 !== tag && (supportsSingletons && 27 === tag && isSingletonScope(node.type) && (parent = node.stateNode, before = null), node = node.child, null !== node))
for (insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling; null !== node; )
insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling;
}
function insertOrAppendPlacementNode(node, before, parent) {
var tag = node.tag;
if (5 === tag || 6 === tag)
node = node.stateNode, before ? insertBefore(parent, node, before) : appendChild(parent, node);
else if (4 !== tag && (supportsSingletons && 27 === tag && isSingletonScope(node.type) && (parent = node.stateNode), node = node.child, null !== node))
for (insertOrAppendPlacementNode(node, before, parent), node = node.sibling; null !== node; )
insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
}
function commitHostPortalContainerChildren(portal, finishedWork, pendingChildren) {
portal = portal.containerInfo;
try {
replaceContainerChildren(portal, pendingChildren);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitHostSingletonAcquisition(finishedWork) {
var singleton = finishedWork.stateNode, props = finishedWork.memoizedProps;
try {
acquireSingletonInstance(
finishedWork.type,
props,
singleton,
finishedWork
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitBeforeMutationEffects(root, firstChild) {
prepareForCommit(root.containerInfo);
for (nextEffect = firstChild; null !== nextEffect; )
if (root = nextEffect, firstChild = root.child, 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
firstChild.return = root, nextEffect = firstChild;
else
for (; null !== nextEffect; ) {
root = nextEffect;
var current = root.alternate;
firstChild = root.flags;
switch (root.tag) {
case 0:
break;
case 11:
case 15:
break;
case 1:
if (0 !== (firstChild & 1024) && null !== current) {
firstChild = void 0;
var finishedWork = root, prevProps = current.memoizedProps;
current = current.memoizedState;
var instance2 = finishedWork.stateNode;
try {
var resolvedPrevProps = resolveClassComponentProps(
finishedWork.type,
prevProps,
finishedWork.elementType === finishedWork.type
);
firstChild = instance2.getSnapshotBeforeUpdate(
resolvedPrevProps,
current
);
instance2.__reactInternalSnapshotBeforeUpdate = firstChild;
} catch (error) {
captureCommitPhaseError(
finishedWork,
finishedWork.return,
error
);
}
}
break;
case 3:
0 !== (firstChild & 1024) && supportsMutation && clearContainer(root.stateNode.containerInfo);
break;
case 5:
case 26:
case 27:
case 6:
case 4:
case 17:
break;
default:
if (0 !== (firstChild & 1024))
throw Error(formatProdErrorMessage(163));
}
firstChild = root.sibling;
if (null !== firstChild) {
firstChild.return = root.return;
nextEffect = firstChild;
break;
}
nextEffect = root.return;
}
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 4 && commitHookEffectListMount(5, finishedWork);
break;
case 1:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
if (flags & 4)
if (finishedRoot = finishedWork.stateNode, null === current)
try {
finishedRoot.componentDidMount();
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
else {
var prevProps = resolveClassComponentProps(
finishedWork.type,
current.memoizedProps
);
current = current.memoizedState;
try {
finishedRoot.componentDidUpdate(
prevProps,
current,
finishedRoot.__reactInternalSnapshotBeforeUpdate
);
} catch (error$128) {
captureCommitPhaseError(
finishedWork,
finishedWork.return,
error$128
);
}
}
flags & 64 && commitClassCallbacks(finishedWork);
flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
break;
case 3:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
if (flags & 64 && (finishedRoot = finishedWork.updateQueue, null !== finishedRoot)) {
current = null;
if (null !== finishedWork.child)
switch (finishedWork.child.tag) {
case 27:
case 5:
current = getPublicInstance(finishedWork.child.stateNode);
break;
case 1:
current = finishedWork.child.stateNode;
}
try {
commitCallbacks(finishedRoot, current);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
break;
case 27:
supportsSingletons && null === current && flags & 4 && commitHostSingletonAcquisition(finishedWork);
case 26:
case 5:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
null === current && flags & 4 && commitHostMount(finishedWork);
flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
break;
case 12:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
flags & 64 && (finishedRoot = finishedWork.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot && (finishedWork = retryDehydratedSuspenseBoundary.bind(
null,
finishedWork
), registerSuspenseInstanceRetry(finishedRoot, finishedWork))));
break;
case 22:
flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
if (!flags) {
current = null !== current && null !== current.memoizedState || offscreenSubtreeWasHidden;
prevProps = offscreenSubtreeIsHidden;
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
offscreenSubtreeIsHidden = flags;
(offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden ? recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
0 !== (finishedWork.subtreeFlags & 8772)
) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
offscreenSubtreeIsHidden = prevProps;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
}
break;
case 30:
break;
default:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
}
}
function detachFiberAfterEffects(fiber) {
var alternate = fiber.alternate;
null !== alternate && (fiber.alternate = null, detachFiberAfterEffects(alternate));
fiber.child = null;
fiber.deletions = null;
fiber.sibling = null;
5 === fiber.tag && (alternate = fiber.stateNode, null !== alternate && detachDeletedInstance(alternate));
fiber.stateNode = null;
fiber.return = null;
fiber.dependencies = null;
fiber.memoizedProps = null;
fiber.memoizedState = null;
fiber.pendingProps = null;
fiber.stateNode = null;
fiber.updateQueue = null;
}
function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
for (parent = parent.child; null !== parent; )
commitDeletionEffectsOnFiber(
finishedRoot,
nearestMountedAncestor,
parent
), parent = parent.sibling;
}
function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
try {
injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
} catch (err) {
}
switch (deletedFiber.tag) {
case 26:
if (supportsResources) {
offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
deletedFiber.memoizedState ? releaseResource(deletedFiber.memoizedState) : deletedFiber.stateNode && unmountHoistable(deletedFiber.stateNode);
break;
}
case 27:
if (supportsSingletons) {
offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
var prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer;
isSingletonScope(deletedFiber.type) && (hostParent = deletedFiber.stateNode, hostParentIsContainer = false);
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
releaseSingletonInstance(deletedFiber.stateNode);
hostParent = prevHostParent;
hostParentIsContainer = prevHostParentIsContainer;
break;
}
case 5:
offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
case 6:
if (supportsMutation) {
if (prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer, hostParent = null, recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
), hostParent = prevHostParent, hostParentIsContainer = prevHostParentIsContainer, null !== hostParent)
if (hostParentIsContainer)
try {
removeChildFromContainer(hostParent, deletedFiber.stateNode);
} catch (error) {
captureCommitPhaseError(
deletedFiber,
nearestMountedAncestor,
error
);
}
else
try {
removeChild(hostParent, deletedFiber.stateNode);
} catch (error) {
captureCommitPhaseError(
deletedFiber,
nearestMountedAncestor,
error
);
}
} else
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
break;
case 18:
supportsMutation && null !== hostParent && (hostParentIsContainer ? clearSuspenseBoundaryFromContainer(
hostParent,
deletedFiber.stateNode
) : clearSuspenseBoundary(hostParent, deletedFiber.stateNode));
break;
case 4:
supportsMutation ? (prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer, hostParent = deletedFiber.stateNode.containerInfo, hostParentIsContainer = true, recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
), hostParent = prevHostParent, hostParentIsContainer = prevHostParentIsContainer) : (supportsPersistence && commitHostPortalContainerChildren(
deletedFiber.stateNode,
deletedFiber,
createContainerChildSet()
), recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
));
break;
case 0:
case 11:
case 14:
case 15:
offscreenSubtreeWasHidden || commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor);
offscreenSubtreeWasHidden || commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor);
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
break;
case 1:
offscreenSubtreeWasHidden || (safelyDetachRef(deletedFiber, nearestMountedAncestor), prevHostParent = deletedFiber.stateNode, "function" === typeof prevHostParent.componentWillUnmount && safelyCallComponentWillUnmount(
deletedFiber,
nearestMountedAncestor,
prevHostParent
));
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
break;
case 21:
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
break;
case 22:
offscreenSubtreeWasHidden = (prevHostParent = offscreenSubtreeWasHidden) || null !== deletedFiber.memoizedState;
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
offscreenSubtreeWasHidden = prevHostParent;
break;
default:
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
}
}
function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
if (supportsHydration && null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot))))
try {
commitHydratedSuspenseInstance(finishedRoot);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 13:
case 19:
var retryCache = finishedWork.stateNode;
null === retryCache && (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
return retryCache;
case 22:
return finishedWork = finishedWork.stateNode, retryCache = finishedWork._retryCache, null === retryCache && (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache;
default:
throw Error(formatProdErrorMessage(435, finishedWork.tag));
}
}
function attachSuspenseRetryListeners(finishedWork, wakeables) {
var retryCache = getRetryCache(finishedWork);
wakeables.forEach(function(wakeable) {
var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
retryCache.has(wakeable) || (retryCache.add(wakeable), wakeable.then(retry, retry));
});
}
function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
for (var i2 = 0; i2 < deletions.length; i2++) {
var childToDelete = deletions[i2], root = root$jscomp$0, returnFiber = parentFiber;
if (supportsMutation) {
var parent = returnFiber;
a: for (; null !== parent; ) {
switch (parent.tag) {
case 27:
if (supportsSingletons) {
if (isSingletonScope(parent.type)) {
hostParent = parent.stateNode;
hostParentIsContainer = false;
break a;
}
break;
}
case 5:
hostParent = parent.stateNode;
hostParentIsContainer = false;
break a;
case 3:
case 4:
hostParent = parent.stateNode.containerInfo;
hostParentIsContainer = true;
break a;
}
parent = parent.return;
}
if (null === hostParent) throw Error(formatProdErrorMessage(160));
commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);
hostParent = null;
hostParentIsContainer = false;
} else commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);
root = childToDelete.alternate;
null !== root && (root.return = null);
childToDelete.return = null;
}
if (parentFiber.subtreeFlags & 13878)
for (parentFiber = parentFiber.child; null !== parentFiber; )
commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), parentFiber = parentFiber.sibling;
}
function commitMutationEffectsOnFiber(finishedWork, root) {
var current = finishedWork.alternate, flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 14:
case 15:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 4 && (commitHookEffectListUnmount(3, finishedWork, finishedWork.return), commitHookEffectListMount(3, finishedWork), commitHookEffectListUnmount(5, finishedWork, finishedWork.return));
break;
case 1:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 512 && (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return));
flags & 64 && offscreenSubtreeIsHidden && (finishedWork = finishedWork.updateQueue, null !== finishedWork && (flags = finishedWork.callbacks, null !== flags && (current = finishedWork.shared.hiddenCallbacks, finishedWork.shared.hiddenCallbacks = null === current ? flags : current.concat(flags))));
break;
case 26:
if (supportsResources) {
var hoistableRoot = currentHoistableRoot;
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 512 && (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return));
if (flags & 4) {
flags = null !== current ? current.memoizedState : null;
var newResource = finishedWork.memoizedState;
null === current ? null === newResource ? null === finishedWork.stateNode ? finishedWork.stateNode = hydrateHoistable(
hoistableRoot,
finishedWork.type,
finishedWork.memoizedProps,
finishedWork
) : mountHoistable(
hoistableRoot,
finishedWork.type,
finishedWork.stateNode
) : finishedWork.stateNode = acquireResource(
hoistableRoot,
newResource,
finishedWork.memoizedProps
) : flags !== newResource ? (null === flags ? null !== current.stateNode && unmountHoistable(current.stateNode) : releaseResource(flags), null === newResource ? mountHoistable(
hoistableRoot,
finishedWork.type,
finishedWork.stateNode
) : acquireResource(
hoistableRoot,
newResource,
finishedWork.memoizedProps
)) : null === newResource && null !== finishedWork.stateNode && commitHostUpdate(
finishedWork,
finishedWork.memoizedProps,
current.memoizedProps
);
}
break;
}
case 27:
if (supportsSingletons) {
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 512 && (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return));
null !== current && flags & 4 && commitHostUpdate(
finishedWork,
finishedWork.memoizedProps,
current.memoizedProps
);
break;
}
case 5:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 512 && (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return));
if (supportsMutation) {
if (finishedWork.flags & 32) {
hoistableRoot = finishedWork.stateNode;
try {
resetTextContent(hoistableRoot);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
flags & 4 && null != finishedWork.stateNode && (hoistableRoot = finishedWork.memoizedProps, commitHostUpdate(
finishedWork,
hoistableRoot,
null !== current ? current.memoizedProps : hoistableRoot
));
flags & 1024 && (needsFormReset = true);
}
break;
case 6:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & 4 && supportsMutation) {
if (null === finishedWork.stateNode)
throw Error(formatProdErrorMessage(162));
flags = finishedWork.memoizedProps;
current = null !== current ? current.memoizedProps : flags;
hoistableRoot = finishedWork.stateNode;
try {
commitTextUpdate(hoistableRoot, current, flags);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
break;
case 3:
supportsResources ? (prepareToCommitHoistables(), hoistableRoot = currentHoistableRoot, currentHoistableRoot = getHoistableRoot(root.containerInfo), recursivelyTraverseMutationEffects(root, finishedWork), currentHoistableRoot = hoistableRoot) : recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & 4) {
if (supportsMutation && supportsHydration && null !== current && current.memoizedState.isDehydrated)
try {
commitHydratedContainer(root.containerInfo);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
if (supportsPersistence) {
flags = root.containerInfo;
current = root.pendingChildren;
try {
replaceContainerChildren(flags, current);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
}
needsFormReset && (needsFormReset = false, recursivelyResetForms(finishedWork));
break;
case 4:
supportsResources ? (current = currentHoistableRoot, currentHoistableRoot = getHoistableRoot(
finishedWork.stateNode.containerInfo
), recursivelyTraverseMutationEffects(root, finishedWork), commitReconciliationEffects(finishedWork), currentHoistableRoot = current) : (recursivelyTraverseMutationEffects(root, finishedWork), commitReconciliationEffects(finishedWork));
flags & 4 && supportsPersistence && commitHostPortalContainerChildren(
finishedWork.stateNode,
finishedWork,
finishedWork.stateNode.pendingChildren
);
break;
case 12:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
finishedWork.child.flags & 8192 && null !== finishedWork.memoizedState !== (null !== current && null !== current.memoizedState) && (globalMostRecentFallbackTime = now());
flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 22:
hoistableRoot = null !== finishedWork.memoizedState;
var wasHidden = null !== current && null !== current.memoizedState, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;
recursivelyTraverseMutationEffects(root, finishedWork);
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
commitReconciliationEffects(finishedWork);
if (flags & 8192 && (root = finishedWork.stateNode, root._visibility = hoistableRoot ? root._visibility & -2 : root._visibility | 1, hoistableRoot && (null === current || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || recursivelyTraverseDisappearLayoutEffects(finishedWork)), supportsMutation)) {
a: if (current = null, supportsMutation)
for (root = finishedWork; ; ) {
if (5 === root.tag || supportsResources && 26 === root.tag) {
if (null === current) {
wasHidden = current = root;
try {
newResource = wasHidden.stateNode, hoistableRoot ? hideInstance(newResource) : unhideInstance(
wasHidden.stateNode,
wasHidden.memoizedProps
);
} catch (error) {
captureCommitPhaseError(wasHidden, wasHidden.return, error);
}
}
} else if (6 === root.tag) {
if (null === current) {
wasHidden = root;
try {
var instance2 = wasHidden.stateNode;
hoistableRoot ? hideTextInstance(instance2) : unhideTextInstance(instance2, wasHidden.memoizedProps);
} catch (error) {
captureCommitPhaseError(wasHidden, wasHidden.return, error);
}
}
} else if ((22 !== root.tag && 23 !== root.tag || null === root.memoizedState || root === finishedWork) && null !== root.child) {
root.child.return = root;
root = root.child;
continue;
}
if (root === finishedWork) break a;
for (; null === root.sibling; ) {
if (null === root.return || root.return === finishedWork)
break a;
current === root && (current = null);
root = root.return;
}
current === root && (current = null);
root.sibling.return = root.return;
root = root.sibling;
}
}
flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (current = flags.retryQueue, null !== current && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current))));
break;
case 19:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 30:
break;
case 21:
break;
default:
recursivelyTraverseMutationEffects(root, finishedWork), commitReconciliationEffects(finishedWork);
}
}
function commitReconciliationEffects(finishedWork) {
var flags = finishedWork.flags;
if (flags & 2) {
try {
if (supportsMutation) {
for (var hostParentFiber, parentFiber = finishedWork.return; null !== parentFiber; ) {
if (isHostParent(parentFiber)) {
hostParentFiber = parentFiber;
break;
}
parentFiber = parentFiber.return;
}
if (null == hostParentFiber) throw Error(formatProdErrorMessage(160));
switch (hostParentFiber.tag) {
case 27:
if (supportsSingletons) {
var parent = hostParentFiber.stateNode, before = getHostSibling(finishedWork);
insertOrAppendPlacementNode(finishedWork, before, parent);
break;
}
case 5:
var parent$130 = hostParentFiber.stateNode;
hostParentFiber.flags & 32 && (resetTextContent(parent$130), hostParentFiber.flags &= -33);
var before$131 = getHostSibling(finishedWork);
insertOrAppendPlacementNode(finishedWork, before$131, parent$130);
break;
case 3:
case 4:
var parent$132 = hostParentFiber.stateNode.containerInfo, before$133 = getHostSibling(finishedWork);
insertOrAppendPlacementNodeIntoContainer(
finishedWork,
before$133,
parent$132
);
break;
default:
throw Error(formatProdErrorMessage(161));
}
}
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
finishedWork.flags &= -3;
}
flags & 4096 && (finishedWork.flags &= -4097);
}
function recursivelyResetForms(parentFiber) {
if (parentFiber.subtreeFlags & 1024)
for (parentFiber = parentFiber.child; null !== parentFiber; ) {
var fiber = parentFiber;
recursivelyResetForms(fiber);
5 === fiber.tag && fiber.flags & 1024 && resetFormInstance(fiber.stateNode);
parentFiber = parentFiber.sibling;
}
}
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber), parentFiber = parentFiber.sibling;
}
function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
for (parentFiber = parentFiber.child; null !== parentFiber; ) {
var finishedWork = parentFiber;
switch (finishedWork.tag) {
case 0:
case 11:
case 14:
case 15:
commitHookEffectListUnmount(4, finishedWork, finishedWork.return);
recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
case 1:
safelyDetachRef(finishedWork, finishedWork.return);
var instance2 = finishedWork.stateNode;
"function" === typeof instance2.componentWillUnmount && safelyCallComponentWillUnmount(
finishedWork,
finishedWork.return,
instance2
);
recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
case 27:
supportsSingletons && releaseSingletonInstance(finishedWork.stateNode);
case 26:
case 5:
safelyDetachRef(finishedWork, finishedWork.return);
recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
case 22:
null === finishedWork.memoizedState && recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
case 30:
recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
default:
recursivelyTraverseDisappearLayoutEffects(finishedWork);
}
parentFiber = parentFiber.sibling;
}
}
function recursivelyTraverseReappearLayoutEffects(finishedRoot$jscomp$0, parentFiber, includeWorkInProgressEffects) {
includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
for (parentFiber = parentFiber.child; null !== parentFiber; ) {
var current = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
commitHookEffectListMount(4, finishedWork);
break;
case 1:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
current = finishedWork;
finishedRoot = current.stateNode;
if ("function" === typeof finishedRoot.componentDidMount)
try {
finishedRoot.componentDidMount();
} catch (error) {
captureCommitPhaseError(current, current.return, error);
}
current = finishedWork;
finishedRoot = current.updateQueue;
if (null !== finishedRoot) {
var instance2 = current.stateNode;
try {
var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks;
if (null !== hiddenCallbacks)
for (finishedRoot.shared.hiddenCallbacks = null, finishedRoot = 0; finishedRoot < hiddenCallbacks.length; finishedRoot++)
callCallback(hiddenCallbacks[finishedRoot], instance2);
} catch (error) {
captureCommitPhaseError(current, current.return, error);
}
}
includeWorkInProgressEffects && flags & 64 && commitClassCallbacks(finishedWork);
safelyAttachRef(finishedWork, finishedWork.return);
break;
case 27:
supportsSingletons && commitHostSingletonAcquisition(finishedWork);
case 26:
case 5:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
includeWorkInProgressEffects && null === current && flags & 4 && commitHostMount(finishedWork);
safelyAttachRef(finishedWork, finishedWork.return);
break;
case 12:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
includeWorkInProgressEffects && flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
break;
case 22:
null === finishedWork.memoizedState && recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
safelyAttachRef(finishedWork, finishedWork.return);
break;
case 30:
break;
default:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
}
parentFiber = parentFiber.sibling;
}
}
function commitOffscreenPassiveMountEffects(current, finishedWork) {
var previousCache = null;
null !== current && null !== current.memoizedState && null !== current.memoizedState.cachePool && (previousCache = current.memoizedState.cachePool.pool);
current = null;
null !== finishedWork.memoizedState && null !== finishedWork.memoizedState.cachePool && (current = finishedWork.memoizedState.cachePool.pool);
current !== previousCache && (null != current && current.refCount++, null != previousCache && releaseCache(previousCache));
}
function commitCachePassiveMountEffect(current, finishedWork) {
current = null;
null !== finishedWork.alternate && (current = finishedWork.alternate.memoizedState.cache);
finishedWork = finishedWork.memoizedState.cache;
finishedWork !== current && (finishedWork.refCount++, null != current && releaseCache(current));
}
function recursivelyTraversePassiveMountEffects(root, parentFiber, committedLanes, committedTransitions) {
if (parentFiber.subtreeFlags & 10256)
for (parentFiber = parentFiber.child; null !== parentFiber; )
commitPassiveMountOnFiber(
root,
parentFiber,
committedLanes,
committedTransitions
), parentFiber = parentFiber.sibling;
}
function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {
var flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
flags & 2048 && commitHookEffectListMount(9, finishedWork);
break;
case 1:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 3:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
flags & 2048 && (finishedRoot = null, null !== finishedWork.alternate && (finishedRoot = finishedWork.alternate.memoizedState.cache), finishedWork = finishedWork.memoizedState.cache, finishedWork !== finishedRoot && (finishedWork.refCount++, null != finishedRoot && releaseCache(finishedRoot)));
break;
case 12:
if (flags & 2048) {
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
finishedRoot = finishedWork.stateNode;
try {
var _finishedWork$memoize2 = finishedWork.memoizedProps, id = _finishedWork$memoize2.id, onPostCommit = _finishedWork$memoize2.onPostCommit;
"function" === typeof onPostCommit && onPostCommit(
id,
null === finishedWork.alternate ? "mount" : "update",
finishedRoot.passiveEffectDuration,
-0
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
} else
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 13:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 23:
break;
case 22:
_finishedWork$memoize2 = finishedWork.stateNode;
id = finishedWork.alternate;
null !== finishedWork.memoizedState ? _finishedWork$memoize2._visibility & 2 ? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
) : recursivelyTraverseAtomicPassiveEffects(
finishedRoot,
finishedWork
) : _finishedWork$memoize2._visibility & 2 ? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
) : (_finishedWork$memoize2._visibility |= 2, recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
0 !== (finishedWork.subtreeFlags & 10256)
));
flags & 2048 && commitOffscreenPassiveMountEffects(id, finishedWork);
break;
case 24:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
break;
default:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
}
}
function recursivelyTraverseReconnectPassiveEffects(finishedRoot$jscomp$0, parentFiber, committedLanes$jscomp$0, committedTransitions$jscomp$0, includeWorkInProgressEffects) {
includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 10256);
for (parentFiber = parentFiber.child; null !== parentFiber; ) {
var finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, committedLanes = committedLanes$jscomp$0, committedTransitions = committedTransitions$jscomp$0, flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
);
commitHookEffectListMount(8, finishedWork);
break;
case 23:
break;
case 22:
var instance2 = finishedWork.stateNode;
null !== finishedWork.memoizedState ? instance2._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
) : recursivelyTraverseAtomicPassiveEffects(
finishedRoot,
finishedWork
) : (instance2._visibility |= 2, recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
));
includeWorkInProgressEffects && flags & 2048 && commitOffscreenPassiveMountEffects(
finishedWork.alternate,
finishedWork
);
break;
case 24:
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
);
includeWorkInProgressEffects && flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
break;
default:
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
);
}
parentFiber = parentFiber.sibling;
}
}
function recursivelyTraverseAtomicPassiveEffects(finishedRoot$jscomp$0, parentFiber) {
if (parentFiber.subtreeFlags & 10256)
for (parentFiber = parentFiber.child; null !== parentFiber; ) {
var finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags;
switch (finishedWork.tag) {
case 22:
recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
flags & 2048 && commitOffscreenPassiveMountEffects(
finishedWork.alternate,
finishedWork
);
break;
case 24:
recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
flags & 2048 && commitCachePassiveMountEffect(
finishedWork.alternate,
finishedWork
);
break;
default:
recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
}
parentFiber = parentFiber.sibling;
}
}
function recursivelyAccumulateSuspenseyCommit(parentFiber) {
if (parentFiber.subtreeFlags & suspenseyCommitFlag)
for (parentFiber = parentFiber.child; null !== parentFiber; )
accumulateSuspenseyCommitOnFiber(parentFiber), parentFiber = parentFiber.sibling;
}
function accumulateSuspenseyCommitOnFiber(fiber) {
switch (fiber.tag) {
case 26:
recursivelyAccumulateSuspenseyCommit(fiber);
fiber.flags & suspenseyCommitFlag && (null !== fiber.memoizedState ? suspendResource(
currentHoistableRoot,
fiber.memoizedState,
fiber.memoizedProps
) : suspendInstance(fiber.type, fiber.memoizedProps));
break;
case 5:
recursivelyAccumulateSuspenseyCommit(fiber);
fiber.flags & suspenseyCommitFlag && suspendInstance(fiber.type, fiber.memoizedProps);
break;
case 3:
case 4:
if (supportsResources) {
var previousHoistableRoot = currentHoistableRoot;
currentHoistableRoot = getHoistableRoot(
fiber.stateNode.containerInfo
);
recursivelyAccumulateSuspenseyCommit(fiber);
currentHoistableRoot = previousHoistableRoot;
} else recursivelyAccumulateSuspenseyCommit(fiber);
break;
case 22:
null === fiber.memoizedState && (previousHoistableRoot = fiber.alternate, null !== previousHoistableRoot && null !== previousHoistableRoot.memoizedState ? (previousHoistableRoot = suspenseyCommitFlag, suspenseyCommitFlag = 16777216, recursivelyAccumulateSuspenseyCommit(fiber), suspenseyCommitFlag = previousHoistableRoot) : recursivelyAccumulateSuspenseyCommit(fiber));
break;
default:
recursivelyAccumulateSuspenseyCommit(fiber);
}
}
function detachAlternateSiblings(parentFiber) {
var previousFiber = parentFiber.alternate;
if (null !== previousFiber && (parentFiber = previousFiber.child, null !== parentFiber)) {
previousFiber.child = null;
do
previousFiber = parentFiber.sibling, parentFiber.sibling = null, parentFiber = previousFiber;
while (null !== parentFiber);
}
}
function recursivelyTraversePassiveUnmountEffects(parentFiber) {
var deletions = parentFiber.deletions;
if (0 !== (parentFiber.flags & 16)) {
if (null !== deletions)
for (var i2 = 0; i2 < deletions.length; i2++) {
var childToDelete = deletions[i2];
nextEffect = childToDelete;
commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
childToDelete,
parentFiber
);
}
detachAlternateSiblings(parentFiber);
}
if (parentFiber.subtreeFlags & 10256)
for (parentFiber = parentFiber.child; null !== parentFiber; )
commitPassiveUnmountOnFiber(parentFiber), parentFiber = parentFiber.sibling;
}
function commitPassiveUnmountOnFiber(finishedWork) {
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraversePassiveUnmountEffects(finishedWork);
finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return);
break;
case 3:
recursivelyTraversePassiveUnmountEffects(finishedWork);
break;
case 12:
recursivelyTraversePassiveUnmountEffects(finishedWork);
break;
case 22:
var instance2 = finishedWork.stateNode;
null !== finishedWork.memoizedState && instance2._visibility & 2 && (null === finishedWork.return || 13 !== finishedWork.return.tag) ? (instance2._visibility &= -3, recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork);
break;
default:
recursivelyTraversePassiveUnmountEffects(finishedWork);
}
}
function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
var deletions = parentFiber.deletions;
if (0 !== (parentFiber.flags & 16)) {
if (null !== deletions)
for (var i2 = 0; i2 < deletions.length; i2++) {
var childToDelete = deletions[i2];
nextEffect = childToDelete;
commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
childToDelete,
parentFiber
);
}
detachAlternateSiblings(parentFiber);
}
for (parentFiber = parentFiber.child; null !== parentFiber; ) {
deletions = parentFiber;
switch (deletions.tag) {
case 0:
case 11:
case 15:
commitHookEffectListUnmount(8, deletions, deletions.return);
recursivelyTraverseDisconnectPassiveEffects(deletions);
break;
case 22:
i2 = deletions.stateNode;
i2._visibility & 2 && (i2._visibility &= -3, recursivelyTraverseDisconnectPassiveEffects(deletions));
break;
default:
recursivelyTraverseDisconnectPassiveEffects(deletions);
}
parentFiber = parentFiber.sibling;
}
}
function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {
for (; null !== nextEffect; ) {
var fiber = nextEffect;
switch (fiber.tag) {
case 0:
case 11:
case 15:
commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);
break;
case 23:
case 22:
if (null !== fiber.memoizedState && null !== fiber.memoizedState.cachePool) {
var cache4 = fiber.memoizedState.cachePool.pool;
null != cache4 && cache4.refCount++;
}
break;
case 24:
releaseCache(fiber.memoizedState.cache);
}
cache4 = fiber.child;
if (null !== cache4) cache4.return = fiber, nextEffect = cache4;
else
a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
cache4 = nextEffect;
var sibling = cache4.sibling, returnFiber = cache4.return;
detachFiberAfterEffects(cache4);
if (cache4 === fiber) {
nextEffect = null;
break a;
}
if (null !== sibling) {
sibling.return = returnFiber;
nextEffect = sibling;
break a;
}
nextEffect = returnFiber;
}
}
}
function findFiberRootForHostRoot(hostRoot) {
var maybeFiber = getInstanceFromNode(hostRoot);
if (null != maybeFiber) {
if ("string" !== typeof maybeFiber.memoizedProps["data-testname"])
throw Error(formatProdErrorMessage(364));
return maybeFiber;
}
hostRoot = findFiberRoot(hostRoot);
if (null === hostRoot) throw Error(formatProdErrorMessage(362));
return hostRoot.stateNode.current;
}
function matchSelector(fiber$jscomp$0, selector) {
var tag = fiber$jscomp$0.tag;
switch (selector.$$typeof) {
case COMPONENT_TYPE:
if (fiber$jscomp$0.type === selector.value) return true;
break;
case HAS_PSEUDO_CLASS_TYPE:
a: {
selector = selector.value;
fiber$jscomp$0 = [fiber$jscomp$0, 0];
for (tag = 0; tag < fiber$jscomp$0.length; ) {
var fiber = fiber$jscomp$0[tag++], tag$jscomp$0 = fiber.tag, selectorIndex = fiber$jscomp$0[tag++], selector$jscomp$0 = selector[selectorIndex];
if (5 !== tag$jscomp$0 && 26 !== tag$jscomp$0 && 27 !== tag$jscomp$0 || !isHiddenSubtree(fiber)) {
for (; null != selector$jscomp$0 && matchSelector(fiber, selector$jscomp$0); )
selectorIndex++, selector$jscomp$0 = selector[selectorIndex];
if (selectorIndex === selector.length) {
selector = true;
break a;
} else
for (fiber = fiber.child; null !== fiber; )
fiber$jscomp$0.push(fiber, selectorIndex), fiber = fiber.sibling;
}
}
selector = false;
}
return selector;
case ROLE_TYPE:
if ((5 === tag || 26 === tag || 27 === tag) && matchAccessibilityRole(fiber$jscomp$0.stateNode, selector.value))
return true;
break;
case TEXT_TYPE:
if (5 === tag || 6 === tag || 26 === tag || 27 === tag) {
if (fiber$jscomp$0 = getTextContent(fiber$jscomp$0), null !== fiber$jscomp$0 && 0 <= fiber$jscomp$0.indexOf(selector.value))
return true;
}
break;
case TEST_NAME_TYPE:
if (5 === tag || 26 === tag || 27 === tag) {
if (fiber$jscomp$0 = fiber$jscomp$0.memoizedProps["data-testname"], "string" === typeof fiber$jscomp$0 && fiber$jscomp$0.toLowerCase() === selector.value.toLowerCase())
return true;
}
break;
default:
throw Error(formatProdErrorMessage(365));
}
return false;
}
function selectorToString(selector) {
switch (selector.$$typeof) {
case COMPONENT_TYPE:
return "<" + (getComponentNameFromType(selector.value) || "Unknown") + ">";
case HAS_PSEUDO_CLASS_TYPE:
return ":has(" + (selectorToString(selector) || "") + ")";
case ROLE_TYPE:
return '[role="' + selector.value + '"]';
case TEXT_TYPE:
return '"' + selector.value + '"';
case TEST_NAME_TYPE:
return '[data-testname="' + selector.value + '"]';
default:
throw Error(formatProdErrorMessage(365));
}
}
function findPaths(root, selectors) {
var matchingFibers = [];
root = [root, 0];
for (var index = 0; index < root.length; ) {
var fiber = root[index++], tag = fiber.tag, selectorIndex = root[index++], selector = selectors[selectorIndex];
if (5 !== tag && 26 !== tag && 27 !== tag || !isHiddenSubtree(fiber)) {
for (; null != selector && matchSelector(fiber, selector); )
selectorIndex++, selector = selectors[selectorIndex];
if (selectorIndex === selectors.length) matchingFibers.push(fiber);
else
for (fiber = fiber.child; null !== fiber; )
root.push(fiber, selectorIndex), fiber = fiber.sibling;
}
}
return matchingFibers;
}
function findAllNodes(hostRoot, selectors) {
if (!supportsTestSelectors) throw Error(formatProdErrorMessage(363));
hostRoot = findFiberRootForHostRoot(hostRoot);
hostRoot = findPaths(hostRoot, selectors);
selectors = [];
hostRoot = Array.from(hostRoot);
for (var index = 0; index < hostRoot.length; ) {
var node = hostRoot[index++], tag = node.tag;
if (5 === tag || 26 === tag || 27 === tag)
isHiddenSubtree(node) || selectors.push(node.stateNode);
else
for (node = node.child; null !== node; )
hostRoot.push(node), node = node.sibling;
}
return selectors;
}
function requestUpdateLane() {
if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes)
return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
if (null !== ReactSharedInternals.T) {
var actionScopeLane = currentEntangledLane;
return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane();
}
return resolveUpdatePriority();
}
function requestDeferredLane() {
0 === workInProgressDeferredLane && (workInProgressDeferredLane = 0 === (workInProgressRootRenderLanes & 536870912) || isHydrating ? claimNextTransitionLane() : 536870912);
var suspenseHandler = suspenseHandlerStackCursor.current;
null !== suspenseHandler && (suspenseHandler.flags |= 32);
return workInProgressDeferredLane;
}
function scheduleUpdateOnFiber(root, fiber, lane) {
if (root === workInProgressRoot && (2 === workInProgressSuspendedReason || 9 === workInProgressSuspendedReason) || null !== root.cancelPendingCommit)
prepareFreshStack(root, 0), markRootSuspended(
root,
workInProgressRootRenderLanes,
workInProgressDeferredLane,
false
);
markRootUpdated$1(root, lane);
if (0 === (executionContext & 2) || root !== workInProgressRoot)
root === workInProgressRoot && (0 === (executionContext & 2) && (workInProgressRootInterleavedUpdatedLanes |= lane), 4 === workInProgressRootExitStatus && markRootSuspended(
root,
workInProgressRootRenderLanes,
workInProgressDeferredLane,
false
)), ensureRootIsScheduled(root);
}
function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
var shouldTimeSlice = !forceSync && 0 === (lanes & 124) && 0 === (lanes & root$jscomp$0.expiredLanes) || checkIfRootIsPrerendering(root$jscomp$0, lanes), exitStatus = shouldTimeSlice ? renderRootConcurrent(root$jscomp$0, lanes) : renderRootSync(root$jscomp$0, lanes, true), renderWasConcurrent = shouldTimeSlice;
do {
if (0 === exitStatus) {
workInProgressRootIsPrerendering && !shouldTimeSlice && markRootSuspended(root$jscomp$0, lanes, 0, false);
break;
} else {
forceSync = root$jscomp$0.current.alternate;
if (renderWasConcurrent && !isRenderConsistentWithExternalStores(forceSync)) {
exitStatus = renderRootSync(root$jscomp$0, lanes, false);
renderWasConcurrent = false;
continue;
}
if (2 === exitStatus) {
renderWasConcurrent = lanes;
if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent)
var JSCompiler_inline_result = 0;
else
JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913, JSCompiler_inline_result = 0 !== JSCompiler_inline_result ? JSCompiler_inline_result : JSCompiler_inline_result & 536870912 ? 536870912 : 0;
if (0 !== JSCompiler_inline_result) {
lanes = JSCompiler_inline_result;
a: {
var root = root$jscomp$0;
exitStatus = workInProgressRootConcurrentErrors;
var wasRootDehydrated = supportsHydration && root.current.memoizedState.isDehydrated;
wasRootDehydrated && (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256);
JSCompiler_inline_result = renderRootSync(
root,
JSCompiler_inline_result,
false
);
if (2 !== JSCompiler_inline_result) {
if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {
root.errorRecoveryDisabledLanes |= renderWasConcurrent;
workInProgressRootInterleavedUpdatedLanes |= renderWasConcurrent;
exitStatus = 4;
break a;
}
renderWasConcurrent = workInProgressRootRecoverableErrors;
workInProgressRootRecoverableErrors = exitStatus;
null !== renderWasConcurrent && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = renderWasConcurrent : workInProgressRootRecoverableErrors.push.apply(
workInProgressRootRecoverableErrors,
renderWasConcurrent
));
}
exitStatus = JSCompiler_inline_result;
}
renderWasConcurrent = false;
if (2 !== exitStatus) continue;
}
}
if (1 === exitStatus) {
prepareFreshStack(root$jscomp$0, 0);
markRootSuspended(root$jscomp$0, lanes, 0, true);
break;
}
a: {
shouldTimeSlice = root$jscomp$0;
renderWasConcurrent = exitStatus;
switch (renderWasConcurrent) {
case 0:
case 1:
throw Error(formatProdErrorMessage(345));
case 4:
if ((lanes & 4194048) !== lanes) break;
case 6:
markRootSuspended(
shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
break a;
case 2:
workInProgressRootRecoverableErrors = null;
break;
case 3:
case 5:
break;
default:
throw Error(formatProdErrorMessage(329));
}
if ((lanes & 62914560) === lanes && (exitStatus = globalMostRecentFallbackTime + 300 - now(), 10 < exitStatus)) {
markRootSuspended(
shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
if (0 !== getNextLanes(shouldTimeSlice, 0, true)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
shouldTimeSlice,
forceSync,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
workInProgressRootDidIncludeRecursiveRenderUpdate,
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
renderWasConcurrent,
2,
-0,
0
),
exitStatus
);
break a;
}
commitRootWhenReady(
shouldTimeSlice,
forceSync,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
workInProgressRootDidIncludeRecursiveRenderUpdate,
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
renderWasConcurrent,
0,
-0,
0
);
}
}
break;
} while (1);
ensureRootIsScheduled(root$jscomp$0);
}
function commitRootWhenReady(root, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane, updatedLanes, suspendedRetryLanes, didSkipSuspendedSiblings, exitStatus, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
root.timeoutHandle = noTimeout;
suspendedCommitReason = finishedWork.subtreeFlags;
if (suspendedCommitReason & 8192 || 16785408 === (suspendedCommitReason & 16785408)) {
if (startSuspendingCommit(), accumulateSuspenseyCommitOnFiber(finishedWork), suspendedCommitReason = waitForCommitToBeReady(), null !== suspendedCommitReason) {
root.cancelPendingCommit = suspendedCommitReason(
commitRoot.bind(
null,
root,
finishedWork,
lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
1,
completedRenderStartTime,
completedRenderEndTime
)
);
markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings);
return;
}
}
commitRoot(
root,
finishedWork,
lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
suspendedRetryLanes
);
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
var tag = node.tag;
if ((0 === tag || 11 === tag || 15 === tag) && node.flags & 16384 && (tag = node.updateQueue, null !== tag && (tag = tag.stores, null !== tag)))
for (var i2 = 0; i2 < tag.length; i2++) {
var check = tag[i2], getSnapshot = check.getSnapshot;
check = check.value;
try {
if (!objectIs(getSnapshot(), check)) return false;
} catch (error) {
return false;
}
}
tag = node.child;
if (node.subtreeFlags & 16384 && null !== tag)
tag.return = node, node = tag;
else {
if (node === finishedWork) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === finishedWork) return true;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
return true;
}
function markRootSuspended(root, suspendedLanes, spawnedLane, didAttemptEntireTree) {
suspendedLanes &= ~workInProgressRootPingedLanes;
suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
root.suspendedLanes |= suspendedLanes;
root.pingedLanes &= ~suspendedLanes;
didAttemptEntireTree && (root.warmLanes |= suspendedLanes);
didAttemptEntireTree = root.expirationTimes;
for (var lanes = suspendedLanes; 0 < lanes; ) {
var index$4 = 31 - clz32(lanes), lane = 1 << index$4;
didAttemptEntireTree[index$4] = -1;
lanes &= ~lane;
}
0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
}
function flushSyncWork() {
return 0 === (executionContext & 6) ? (flushSyncWorkAcrossRoots_impl(0, false), false) : true;
}
function resetWorkInProgressStack() {
if (null !== workInProgress) {
if (0 === workInProgressSuspendedReason)
var interruptedWork = workInProgress.return;
else
interruptedWork = workInProgress, lastContextDependency = currentlyRenderingFiber$1 = null, resetHooksOnUnwind(interruptedWork), thenableState = null, thenableIndexCounter = 0, interruptedWork = workInProgress;
for (; null !== interruptedWork; )
unwindInterruptedWork(interruptedWork.alternate, interruptedWork), interruptedWork = interruptedWork.return;
workInProgress = null;
}
}
function prepareFreshStack(root, lanes) {
var timeoutHandle = root.timeoutHandle;
timeoutHandle !== noTimeout && (root.timeoutHandle = noTimeout, cancelTimeout(timeoutHandle));
timeoutHandle = root.cancelPendingCommit;
null !== timeoutHandle && (root.cancelPendingCommit = null, timeoutHandle());
resetWorkInProgressStack();
workInProgressRoot = root;
workInProgress = timeoutHandle = createWorkInProgress(root.current, null);
workInProgressRootRenderLanes = lanes;
workInProgressSuspendedReason = 0;
workInProgressThrownValue = null;
workInProgressRootDidSkipSuspendedSiblings = false;
workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);
workInProgressRootDidAttachPingListener = false;
workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = workInProgressRootExitStatus = 0;
workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null;
workInProgressRootDidIncludeRecursiveRenderUpdate = false;
0 !== (lanes & 8) && (lanes |= lanes & 32);
var allEntangledLanes = root.entangledLanes;
if (0 !== allEntangledLanes)
for (root = root.entanglements, allEntangledLanes &= lanes; 0 < allEntangledLanes; ) {
var index$2 = 31 - clz32(allEntangledLanes), lane = 1 << index$2;
lanes |= root[index$2];
allEntangledLanes &= ~lane;
}
entangledRenderLanes = lanes;
finishQueueingConcurrentUpdates();
return timeoutHandle;
}
function handleThrow(root, thrownValue) {
currentlyRenderingFiber = null;
ReactSharedInternals.H = ContextOnlyDispatcher;
thrownValue === SuspenseException || thrownValue === SuspenseActionException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = 3) : thrownValue === SuspenseyCommitException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = 4) : workInProgressSuspendedReason = thrownValue === SelectiveHydrationException ? 8 : null !== thrownValue && "object" === typeof thrownValue && "function" === typeof thrownValue.then ? 6 : 1;
workInProgressThrownValue = thrownValue;
null === workInProgress && (workInProgressRootExitStatus = 1, logUncaughtError(
root,
createCapturedValueAtFiber(thrownValue, root.current)
));
}
function shouldRemainOnPreviousScreen() {
var handler = suspenseHandlerStackCursor.current;
return null === handler ? true : (workInProgressRootRenderLanes & 4194048) === workInProgressRootRenderLanes ? null === shellBoundary ? true : false : (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes || 0 !== (workInProgressRootRenderLanes & 536870912) ? handler === shellBoundary : false;
}
function pushDispatcher() {
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = ContextOnlyDispatcher;
return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
}
function pushAsyncDispatcher() {
var prevAsyncDispatcher = ReactSharedInternals.A;
ReactSharedInternals.A = DefaultAsyncDispatcher;
return prevAsyncDispatcher;
}
function renderDidSuspendDelayIfPossible() {
workInProgressRootExitStatus = 4;
workInProgressRootDidSkipSuspendedSiblings || (workInProgressRootRenderLanes & 4194048) !== workInProgressRootRenderLanes && null !== suspenseHandlerStackCursor.current || (workInProgressRootIsPrerendering = true);
0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) || null === workInProgressRoot || markRootSuspended(
workInProgressRoot,
workInProgressRootRenderLanes,
workInProgressDeferredLane,
false
);
}
function renderRootSync(root, lanes, shouldYieldForPrerendering) {
var prevExecutionContext = executionContext;
executionContext |= 2;
var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)
workInProgressTransitions = null, prepareFreshStack(root, lanes);
lanes = false;
var exitStatus = workInProgressRootExitStatus;
a: do
try {
if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
var unitOfWork = workInProgress, thrownValue = workInProgressThrownValue;
switch (workInProgressSuspendedReason) {
case 8:
resetWorkInProgressStack();
exitStatus = 6;
break a;
case 3:
case 2:
case 9:
case 6:
null === suspenseHandlerStackCursor.current && (lanes = true);
var reason = workInProgressSuspendedReason;
workInProgressSuspendedReason = 0;
workInProgressThrownValue = null;
throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
if (shouldYieldForPrerendering && workInProgressRootIsPrerendering) {
exitStatus = 0;
break a;
}
break;
default:
reason = workInProgressSuspendedReason, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
}
}
workLoopSync();
exitStatus = workInProgressRootExitStatus;
break;
} catch (thrownValue$155) {
handleThrow(root, thrownValue$155);
}
while (1);
lanes && root.shellSuspendCounter++;
lastContextDependency = currentlyRenderingFiber$1 = null;
executionContext = prevExecutionContext;
ReactSharedInternals.H = prevDispatcher;
ReactSharedInternals.A = prevAsyncDispatcher;
null === workInProgress && (workInProgressRoot = null, workInProgressRootRenderLanes = 0, finishQueueingConcurrentUpdates());
return exitStatus;
}
function workLoopSync() {
for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
}
function renderRootConcurrent(root, lanes) {
var prevExecutionContext = executionContext;
executionContext |= 2;
var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes ? (workInProgressTransitions = null, workInProgressRootRenderTargetTime = now() + 500, prepareFreshStack(root, lanes)) : workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
root,
lanes
);
a: do
try {
if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
lanes = workInProgress;
var thrownValue = workInProgressThrownValue;
b: switch (workInProgressSuspendedReason) {
case 1:
workInProgressSuspendedReason = 0;
workInProgressThrownValue = null;
throwAndUnwindWorkLoop(root, lanes, thrownValue, 1);
break;
case 2:
case 9:
if (isThenableResolved(thrownValue)) {
workInProgressSuspendedReason = 0;
workInProgressThrownValue = null;
replaySuspendedUnitOfWork(lanes);
break;
}
lanes = function() {
2 !== workInProgressSuspendedReason && 9 !== workInProgressSuspendedReason || workInProgressRoot !== root || (workInProgressSuspendedReason = 7);
ensureRootIsScheduled(root);
};
thrownValue.then(lanes, lanes);
break a;
case 3:
workInProgressSuspendedReason = 7;
break a;
case 4:
workInProgressSuspendedReason = 5;
break a;
case 7:
isThenableResolved(thrownValue) ? (workInProgressSuspendedReason = 0, workInProgressThrownValue = null, replaySuspendedUnitOfWork(lanes)) : (workInProgressSuspendedReason = 0, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root, lanes, thrownValue, 7));
break;
case 5:
var resource = null;
switch (workInProgress.tag) {
case 26:
resource = workInProgress.memoizedState;
case 5:
case 27:
var hostFiber = workInProgress, type = hostFiber.type, props = hostFiber.pendingProps;
if (resource ? preloadResource(resource) : preloadInstance(type, props)) {
workInProgressSuspendedReason = 0;
workInProgressThrownValue = null;
var sibling = hostFiber.sibling;
if (null !== sibling) workInProgress = sibling;
else {
var returnFiber = hostFiber.return;
null !== returnFiber ? (workInProgress = returnFiber, completeUnitOfWork(returnFiber)) : workInProgress = null;
}
break b;
}
}
workInProgressSuspendedReason = 0;
workInProgressThrownValue = null;
throwAndUnwindWorkLoop(root, lanes, thrownValue, 5);
break;
case 6:
workInProgressSuspendedReason = 0;
workInProgressThrownValue = null;
throwAndUnwindWorkLoop(root, lanes, thrownValue, 6);
break;
case 8:
resetWorkInProgressStack();
workInProgressRootExitStatus = 6;
break a;
default:
throw Error(formatProdErrorMessage(462));
}
}
workLoopConcurrentByScheduler();
break;
} catch (thrownValue$157) {
handleThrow(root, thrownValue$157);
}
while (1);
lastContextDependency = currentlyRenderingFiber$1 = null;
ReactSharedInternals.H = prevDispatcher;
ReactSharedInternals.A = prevAsyncDispatcher;
executionContext = prevExecutionContext;
if (null !== workInProgress) return 0;
workInProgressRoot = null;
workInProgressRootRenderLanes = 0;
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
function performUnitOfWork(unitOfWork) {
var next = beginWork(
unitOfWork.alternate,
unitOfWork,
entangledRenderLanes
);
unitOfWork.memoizedProps = unitOfWork.pendingProps;
null === next ? completeUnitOfWork(unitOfWork) : workInProgress = next;
}
function replaySuspendedUnitOfWork(unitOfWork) {
var next = unitOfWork;
var current = next.alternate;
switch (next.tag) {
case 15:
case 0:
next = replayFunctionComponent(
current,
next,
next.pendingProps,
next.type,
void 0,
workInProgressRootRenderLanes
);
break;
case 11:
next = replayFunctionComponent(
current,
next,
next.pendingProps,
next.type.render,
next.ref,
workInProgressRootRenderLanes
);
break;
case 5:
resetHooksOnUnwind(next);
default:
unwindInterruptedWork(current, next), next = workInProgress = resetWorkInProgress(next, entangledRenderLanes), next = beginWork(current, next, entangledRenderLanes);
}
unitOfWork.memoizedProps = unitOfWork.pendingProps;
null === next ? completeUnitOfWork(unitOfWork) : workInProgress = next;
}
function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, suspendedReason) {
lastContextDependency = currentlyRenderingFiber$1 = null;
resetHooksOnUnwind(unitOfWork);
thenableState = null;
thenableIndexCounter = 0;
var returnFiber = unitOfWork.return;
try {
if (throwException(
root,
returnFiber,
unitOfWork,
thrownValue,
workInProgressRootRenderLanes
)) {
workInProgressRootExitStatus = 1;
logUncaughtError(
root,
createCapturedValueAtFiber(thrownValue, root.current)
);
workInProgress = null;
return;
}
} catch (error) {
if (null !== returnFiber) throw workInProgress = returnFiber, error;
workInProgressRootExitStatus = 1;
logUncaughtError(
root,
createCapturedValueAtFiber(thrownValue, root.current)
);
workInProgress = null;
return;
}
if (unitOfWork.flags & 32768) {
if (isHydrating || 1 === suspendedReason) root = true;
else if (workInProgressRootIsPrerendering || 0 !== (workInProgressRootRenderLanes & 536870912))
root = false;
else if (workInProgressRootDidSkipSuspendedSiblings = root = true, 2 === suspendedReason || 9 === suspendedReason || 3 === suspendedReason || 6 === suspendedReason)
suspendedReason = suspenseHandlerStackCursor.current, null !== suspendedReason && 13 === suspendedReason.tag && (suspendedReason.flags |= 16384);
unwindUnitOfWork(unitOfWork, root);
} else completeUnitOfWork(unitOfWork);
}
function completeUnitOfWork(unitOfWork) {
var completedWork = unitOfWork;
do {
if (0 !== (completedWork.flags & 32768)) {
unwindUnitOfWork(
completedWork,
workInProgressRootDidSkipSuspendedSiblings
);
return;
}
unitOfWork = completedWork.return;
var next = completeWork(
completedWork.alternate,
completedWork,
entangledRenderLanes
);
if (null !== next) {
workInProgress = next;
return;
}
completedWork = completedWork.sibling;
if (null !== completedWork) {
workInProgress = completedWork;
return;
}
workInProgress = completedWork = unitOfWork;
} while (null !== completedWork);
0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
}
function unwindUnitOfWork(unitOfWork, skipSiblings) {
do {
var next = unwindWork(unitOfWork.alternate, unitOfWork);
if (null !== next) {
next.flags &= 32767;
workInProgress = next;
return;
}
next = unitOfWork.return;
null !== next && (next.flags |= 32768, next.subtreeFlags = 0, next.deletions = null);
if (!skipSiblings && (unitOfWork = unitOfWork.sibling, null !== unitOfWork)) {
workInProgress = unitOfWork;
return;
}
workInProgress = unitOfWork = next;
} while (null !== unitOfWork);
workInProgressRootExitStatus = 6;
workInProgress = null;
}
function commitRoot(root, finishedWork, lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, suspendedRetryLanes) {
root.cancelPendingCommit = null;
do
flushPendingEffects();
while (0 !== pendingEffectsStatus);
if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
if (null !== finishedWork) {
if (finishedWork === root.current)
throw Error(formatProdErrorMessage(177));
didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
markRootFinished(
root,
lanes,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
suspendedRetryLanes
);
root === workInProgressRoot && (workInProgress = workInProgressRoot = null, workInProgressRootRenderLanes = 0);
pendingFinishedWork = finishedWork;
pendingEffectsRoot = root;
pendingEffectsLanes = lanes;
pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
pendingPassiveTransitions = transitions;
pendingRecoverableErrors = recoverableErrors;
0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) ? (root.callbackNode = null, root.callbackPriority = 0, scheduleCallback(NormalPriority$1, function() {
flushPassiveEffects(true);
return null;
})) : (root.callbackNode = null, root.callbackPriority = 0);
recoverableErrors = 0 !== (finishedWork.flags & 13878);
if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {
recoverableErrors = ReactSharedInternals.T;
ReactSharedInternals.T = null;
transitions = getCurrentUpdatePriority();
setCurrentUpdatePriority(2);
spawnedLane = executionContext;
executionContext |= 4;
try {
commitBeforeMutationEffects(root, finishedWork, lanes);
} finally {
executionContext = spawnedLane, setCurrentUpdatePriority(transitions), ReactSharedInternals.T = recoverableErrors;
}
}
pendingEffectsStatus = 1;
flushMutationEffects();
flushLayoutEffects();
flushSpawnedWork();
}
}
function flushMutationEffects() {
if (1 === pendingEffectsStatus) {
pendingEffectsStatus = 0;
var root = pendingEffectsRoot, finishedWork = pendingFinishedWork, rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
rootMutationHasEffect = ReactSharedInternals.T;
ReactSharedInternals.T = null;
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(2);
var prevExecutionContext = executionContext;
executionContext |= 4;
try {
commitMutationEffectsOnFiber(finishedWork, root), resetAfterCommit(root.containerInfo);
} finally {
executionContext = prevExecutionContext, setCurrentUpdatePriority(previousPriority), ReactSharedInternals.T = rootMutationHasEffect;
}
}
root.current = finishedWork;
pendingEffectsStatus = 2;
}
}
function flushLayoutEffects() {
if (2 === pendingEffectsStatus) {
pendingEffectsStatus = 0;
var root = pendingEffectsRoot, finishedWork = pendingFinishedWork, rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
rootHasLayoutEffect = ReactSharedInternals.T;
ReactSharedInternals.T = null;
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(2);
var prevExecutionContext = executionContext;
executionContext |= 4;
try {
commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
} finally {
executionContext = prevExecutionContext, setCurrentUpdatePriority(previousPriority), ReactSharedInternals.T = rootHasLayoutEffect;
}
}
pendingEffectsStatus = 3;
}
}
function flushSpawnedWork() {
if (4 === pendingEffectsStatus || 3 === pendingEffectsStatus) {
pendingEffectsStatus = 0;
requestPaint();
var root = pendingEffectsRoot, finishedWork = pendingFinishedWork, lanes = pendingEffectsLanes, recoverableErrors = pendingRecoverableErrors;
0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) ? pendingEffectsStatus = 5 : (pendingEffectsStatus = 0, pendingFinishedWork = pendingEffectsRoot = null, releaseRootPooledCache(root, root.pendingLanes));
var remainingLanes = root.pendingLanes;
0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
lanesToEventPriority(lanes);
finishedWork = finishedWork.stateNode;
if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
try {
injectedHook.onCommitFiberRoot(
rendererID,
finishedWork,
void 0,
128 === (finishedWork.current.flags & 128)
);
} catch (err) {
}
if (null !== recoverableErrors) {
finishedWork = ReactSharedInternals.T;
remainingLanes = getCurrentUpdatePriority();
setCurrentUpdatePriority(2);
ReactSharedInternals.T = null;
try {
for (var onRecoverableError = root.onRecoverableError, i2 = 0; i2 < recoverableErrors.length; i2++) {
var recoverableError = recoverableErrors[i2];
onRecoverableError(recoverableError.value, {
componentStack: recoverableError.stack
});
}
} finally {
ReactSharedInternals.T = finishedWork, setCurrentUpdatePriority(remainingLanes);
}
}
0 !== (pendingEffectsLanes & 3) && flushPendingEffects();
ensureRootIsScheduled(root);
remainingLanes = root.pendingLanes;
0 !== (lanes & 4194090) && 0 !== (remainingLanes & 42) ? root === rootWithNestedUpdates ? nestedUpdateCount++ : (nestedUpdateCount = 0, rootWithNestedUpdates = root) : nestedUpdateCount = 0;
flushSyncWorkAcrossRoots_impl(0, false);
}
}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) && (remainingLanes = root.pooledCache, null != remainingLanes && (root.pooledCache = null, releaseCache(remainingLanes)));
}
function flushPendingEffects(wasDelayedCommit) {
flushMutationEffects();
flushLayoutEffects();
flushSpawnedWork();
return flushPassiveEffects(wasDelayedCommit);
}
function flushPassiveEffects() {
if (5 !== pendingEffectsStatus) return false;
var root = pendingEffectsRoot, remainingLanes = pendingEffectsRemainingLanes;
pendingEffectsRemainingLanes = 0;
var renderPriority = lanesToEventPriority(pendingEffectsLanes), priority = 32 > renderPriority ? 32 : renderPriority;
renderPriority = ReactSharedInternals.T;
var previousPriority = getCurrentUpdatePriority();
try {
setCurrentUpdatePriority(priority);
ReactSharedInternals.T = null;
priority = pendingPassiveTransitions;
pendingPassiveTransitions = null;
var root$jscomp$0 = pendingEffectsRoot, lanes = pendingEffectsLanes;
pendingEffectsStatus = 0;
pendingFinishedWork = pendingEffectsRoot = null;
pendingEffectsLanes = 0;
if (0 !== (executionContext & 6))
throw Error(formatProdErrorMessage(331));
var prevExecutionContext = executionContext;
executionContext |= 4;
commitPassiveUnmountOnFiber(root$jscomp$0.current);
commitPassiveMountOnFiber(
root$jscomp$0,
root$jscomp$0.current,
lanes,
priority
);
executionContext = prevExecutionContext;
flushSyncWorkAcrossRoots_impl(0, false);
if (injectedHook && "function" === typeof injectedHook.onPostCommitFiberRoot)
try {
injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
} catch (err) {
}
return true;
} finally {
setCurrentUpdatePriority(previousPriority), ReactSharedInternals.T = renderPriority, releaseRootPooledCache(root, remainingLanes);
}
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
null !== rootFiber && (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
}
function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
if (3 === sourceFiber.tag)
captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
else
for (; null !== nearestMountedAncestor; ) {
if (3 === nearestMountedAncestor.tag) {
captureCommitPhaseErrorOnRoot(
nearestMountedAncestor,
sourceFiber,
error
);
break;
} else if (1 === nearestMountedAncestor.tag) {
var instance2 = nearestMountedAncestor.stateNode;
if ("function" === typeof nearestMountedAncestor.type.getDerivedStateFromError || "function" === typeof instance2.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance2))) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
error = createClassErrorUpdate(2);
instance2 = enqueueUpdate(nearestMountedAncestor, error, 2);
null !== instance2 && (initializeClassErrorUpdate(
error,
instance2,
nearestMountedAncestor,
sourceFiber
), markRootUpdated$1(instance2, 2), ensureRootIsScheduled(instance2));
break;
}
}
nearestMountedAncestor = nearestMountedAncestor.return;
}
}
function attachPingListener(root, wakeable, lanes) {
var pingCache = root.pingCache;
if (null === pingCache) {
pingCache = root.pingCache = new PossiblyWeakMap();
var threadIDs = /* @__PURE__ */ new Set();
pingCache.set(wakeable, threadIDs);
} else
threadIDs = pingCache.get(wakeable), void 0 === threadIDs && (threadIDs = /* @__PURE__ */ new Set(), pingCache.set(wakeable, threadIDs));
threadIDs.has(lanes) || (workInProgressRootDidAttachPingListener = true, threadIDs.add(lanes), root = pingSuspendedRoot.bind(null, root, wakeable, lanes), wakeable.then(root, root));
}
function pingSuspendedRoot(root, wakeable, pingedLanes) {
var pingCache = root.pingCache;
null !== pingCache && pingCache.delete(wakeable);
root.pingedLanes |= root.suspendedLanes & pingedLanes;
root.warmLanes &= ~pingedLanes;
workInProgressRoot === root && (workInProgressRootRenderLanes & pingedLanes) === pingedLanes && (4 === workInProgressRootExitStatus || 3 === workInProgressRootExitStatus && (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes && 300 > now() - globalMostRecentFallbackTime ? 0 === (executionContext & 2) && prepareFreshStack(root, 0) : workInProgressRootPingedLanes |= pingedLanes, workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && (workInProgressSuspendedRetryLanes = 0));
ensureRootIsScheduled(root);
}
function retryTimedOutBoundary(boundaryFiber, retryLane) {
0 === retryLane && (retryLane = claimNextRetryLane());
boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
null !== boundaryFiber && (markRootUpdated$1(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber));
}
function retryDehydratedSuspenseBoundary(boundaryFiber) {
var suspenseState = boundaryFiber.memoizedState, retryLane = 0;
null !== suspenseState && (retryLane = suspenseState.retryLane);
retryTimedOutBoundary(boundaryFiber, retryLane);
}
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = 0;
switch (boundaryFiber.tag) {
case 13:
var retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
null !== suspenseState && (retryLane = suspenseState.retryLane);
break;
case 19:
retryCache = boundaryFiber.stateNode;
break;
case 22:
retryCache = boundaryFiber.stateNode._retryCache;
break;
default:
throw Error(formatProdErrorMessage(314));
}
null !== retryCache && retryCache.delete(wakeable);
retryTimedOutBoundary(boundaryFiber, retryLane);
}
function scheduleCallback(priorityLevel, callback) {
return scheduleCallback$3(priorityLevel, callback);
}
function FiberNode(tag, pendingProps, key, mode) {
this.tag = tag;
this.key = key;
this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
this.index = 0;
this.refCleanup = this.ref = null;
this.pendingProps = pendingProps;
this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
this.mode = mode;
this.subtreeFlags = this.flags = 0;
this.deletions = null;
this.childLanes = this.lanes = 0;
this.alternate = null;
}
function shouldConstruct(Component) {
Component = Component.prototype;
return !(!Component || !Component.isReactComponent);
}
function createWorkInProgress(current, pendingProps) {
var workInProgress2 = current.alternate;
null === workInProgress2 ? (workInProgress2 = createFiber(
current.tag,
pendingProps,
current.key,
current.mode
), workInProgress2.elementType = current.elementType, workInProgress2.type = current.type, workInProgress2.stateNode = current.stateNode, workInProgress2.alternate = current, current.alternate = workInProgress2) : (workInProgress2.pendingProps = pendingProps, workInProgress2.type = current.type, workInProgress2.flags = 0, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null);
workInProgress2.flags = current.flags & 65011712;
workInProgress2.childLanes = current.childLanes;
workInProgress2.lanes = current.lanes;
workInProgress2.child = current.child;
workInProgress2.memoizedProps = current.memoizedProps;
workInProgress2.memoizedState = current.memoizedState;
workInProgress2.updateQueue = current.updateQueue;
pendingProps = current.dependencies;
workInProgress2.dependencies = null === pendingProps ? null : {
lanes: pendingProps.lanes,
firstContext: pendingProps.firstContext
};
workInProgress2.sibling = current.sibling;
workInProgress2.index = current.index;
workInProgress2.ref = current.ref;
workInProgress2.refCleanup = current.refCleanup;
return workInProgress2;
}
function resetWorkInProgress(workInProgress2, renderLanes2) {
workInProgress2.flags &= 65011714;
var current = workInProgress2.alternate;
null === current ? (workInProgress2.childLanes = 0, workInProgress2.lanes = renderLanes2, workInProgress2.child = null, workInProgress2.subtreeFlags = 0, workInProgress2.memoizedProps = null, workInProgress2.memoizedState = null, workInProgress2.updateQueue = null, workInProgress2.dependencies = null, workInProgress2.stateNode = null) : (workInProgress2.childLanes = current.childLanes, workInProgress2.lanes = current.lanes, workInProgress2.child = current.child, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.memoizedProps = current.memoizedProps, workInProgress2.memoizedState = current.memoizedState, workInProgress2.updateQueue = current.updateQueue, workInProgress2.type = current.type, renderLanes2 = current.dependencies, workInProgress2.dependencies = null === renderLanes2 ? null : {
lanes: renderLanes2.lanes,
firstContext: renderLanes2.firstContext
});
return workInProgress2;
}
function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes) {
var fiberTag = 0;
owner = type;
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
else if ("string" === typeof type)
fiberTag = supportsResources && supportsSingletons ? isHostHoistableType(type, pendingProps, contextStackCursor.current) ? 26 : isHostSingletonType(type) ? 27 : 5 : supportsResources ? isHostHoistableType(
type,
pendingProps,
contextStackCursor.current
) ? 26 : 5 : supportsSingletons ? isHostSingletonType(type) ? 27 : 5 : 5;
else
a: switch (type) {
case REACT_ACTIVITY_TYPE:
return type = createFiber(31, pendingProps, key, mode), type.elementType = REACT_ACTIVITY_TYPE, type.lanes = lanes, type;
case REACT_FRAGMENT_TYPE:
return createFiberFromFragment(
pendingProps.children,
mode,
lanes,
key
);
case REACT_STRICT_MODE_TYPE:
fiberTag = 8;
mode |= 24;
break;
case REACT_PROFILER_TYPE:
return type = createFiber(12, pendingProps, key, mode | 2), type.elementType = REACT_PROFILER_TYPE, type.lanes = lanes, type;
case REACT_SUSPENSE_TYPE:
return type = createFiber(13, pendingProps, key, mode), type.elementType = REACT_SUSPENSE_TYPE, type.lanes = lanes, type;
case REACT_SUSPENSE_LIST_TYPE:
return type = createFiber(19, pendingProps, key, mode), type.elementType = REACT_SUSPENSE_LIST_TYPE, type.lanes = lanes, type;
default:
if ("object" === typeof type && null !== type)
switch (type.$$typeof) {
case REACT_PROVIDER_TYPE:
case REACT_CONTEXT_TYPE:
fiberTag = 10;
break a;
case REACT_CONSUMER_TYPE:
fiberTag = 9;
break a;
case REACT_FORWARD_REF_TYPE:
fiberTag = 11;
break a;
case REACT_MEMO_TYPE:
fiberTag = 14;
break a;
case REACT_LAZY_TYPE:
fiberTag = 16;
owner = null;
break a;
}
fiberTag = 29;
pendingProps = Error(
formatProdErrorMessage(
130,
null === type ? "null" : typeof type,
""
)
);
owner = null;
}
key = createFiber(fiberTag, pendingProps, key, mode);
key.elementType = type;
key.type = owner;
key.lanes = lanes;
return key;
}
function createFiberFromFragment(elements, mode, lanes, key) {
elements = createFiber(7, elements, key, mode);
elements.lanes = lanes;
return elements;
}
function createFiberFromText(content, mode, lanes) {
content = createFiber(6, content, null, mode);
content.lanes = lanes;
return content;
}
function createFiberFromPortal(portal, mode, lanes) {
mode = createFiber(
4,
null !== portal.children ? portal.children : [],
portal.key,
mode
);
mode.lanes = lanes;
mode.stateNode = {
containerInfo: portal.containerInfo,
pendingChildren: null,
implementation: portal.implementation
};
return mode;
}
function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, formState) {
this.tag = 1;
this.containerInfo = containerInfo;
this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = noTimeout;
this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null;
this.callbackPriority = 0;
this.expirationTimes = createLaneMap(-1);
this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0;
this.entanglements = createLaneMap(0);
this.hiddenUpdates = createLaneMap(null);
this.identifierPrefix = identifierPrefix;
this.onUncaughtError = onUncaughtError;
this.onCaughtError = onCaughtError;
this.onRecoverableError = onRecoverableError;
this.pooledCache = null;
this.pooledCacheLanes = 0;
this.formState = formState;
this.incompleteTransitions = /* @__PURE__ */ new Map();
}
function createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transitionCallbacks, formState) {
containerInfo = new FiberRootNode(
containerInfo,
tag,
hydrate,
identifierPrefix,
onUncaughtError,
onCaughtError,
onRecoverableError,
formState
);
tag = 1;
true === isStrictMode && (tag |= 24);
isStrictMode = createFiber(3, null, null, tag);
containerInfo.current = isStrictMode;
isStrictMode.stateNode = containerInfo;
tag = createCache();
tag.refCount++;
containerInfo.pooledCache = tag;
tag.refCount++;
isStrictMode.memoizedState = {
element: initialChildren,
isDehydrated: hydrate,
cache: tag
};
initializeUpdateQueue(isStrictMode);
return containerInfo;
}
function getContextForSubtree(parentComponent) {
if (!parentComponent) return emptyContextObject;
parentComponent = emptyContextObject;
return parentComponent;
}
function findHostInstance(component) {
var fiber = component._reactInternals;
if (void 0 === fiber) {
if ("function" === typeof component.render)
throw Error(formatProdErrorMessage(188));
component = Object.keys(component).join(",");
throw Error(formatProdErrorMessage(268, component));
}
component = findCurrentFiberUsingSlowPath(fiber);
component = null !== component ? findCurrentHostFiberImpl(component) : null;
return null === component ? null : getPublicInstance(component.stateNode);
}
function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback) {
parentComponent = getContextForSubtree(parentComponent);
null === container.context ? container.context = parentComponent : container.pendingContext = parentComponent;
container = createUpdate(lane);
container.payload = { element };
callback = void 0 === callback ? null : callback;
null !== callback && (container.callback = callback);
element = enqueueUpdate(rootFiber, container, lane);
null !== element && (scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane));
}
function markRetryLaneImpl(fiber, retryLane) {
fiber = fiber.memoizedState;
if (null !== fiber && null !== fiber.dehydrated) {
var a = fiber.retryLane;
fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
}
}
function markRetryLaneIfNotHydrated(fiber, retryLane) {
markRetryLaneImpl(fiber, retryLane);
(fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
}
var exports3 = {};
"use strict";
var React33 = require_react(), Scheduler2 = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy");
Symbol.for("react.scope");
var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
Symbol.for("react.legacy_hidden");
Symbol.for("react.tracing_marker");
var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
Symbol.for("react.view_transition");
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React33.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance2 = $$$config.createInstance;
$$$config.cloneMutableInstance;
var appendInitialChild = $$$config.appendInitialChild, finalizeInitialChildren = $$$config.finalizeInitialChildren, shouldSetTextContent = $$$config.shouldSetTextContent, createTextInstance = $$$config.createTextInstance;
$$$config.cloneMutableTextInstance;
var scheduleTimeout = $$$config.scheduleTimeout, cancelTimeout = $$$config.cancelTimeout, noTimeout = $$$config.noTimeout, isPrimaryRenderer = $$$config.isPrimaryRenderer;
$$$config.warnsIfNotActing;
var supportsMutation = $$$config.supportsMutation, supportsPersistence = $$$config.supportsPersistence, supportsHydration = $$$config.supportsHydration, getInstanceFromNode = $$$config.getInstanceFromNode;
$$$config.beforeActiveInstanceBlur;
var preparePortalMount = $$$config.preparePortalMount;
$$$config.prepareScopeUpdate;
$$$config.getInstanceFromScope;
var setCurrentUpdatePriority = $$$config.setCurrentUpdatePriority, getCurrentUpdatePriority = $$$config.getCurrentUpdatePriority, resolveUpdatePriority = $$$config.resolveUpdatePriority;
$$$config.trackSchedulerEvent;
$$$config.resolveEventType;
$$$config.resolveEventTimeStamp;
var shouldAttemptEagerTransition = $$$config.shouldAttemptEagerTransition, detachDeletedInstance = $$$config.detachDeletedInstance;
$$$config.requestPostPaintCallback;
var maySuspendCommit = $$$config.maySuspendCommit, preloadInstance = $$$config.preloadInstance, startSuspendingCommit = $$$config.startSuspendingCommit, suspendInstance = $$$config.suspendInstance;
$$$config.suspendOnActiveViewTransition;
var waitForCommitToBeReady = $$$config.waitForCommitToBeReady, NotPendingTransition = $$$config.NotPendingTransition, HostTransitionContext = $$$config.HostTransitionContext, resetFormInstance = $$$config.resetFormInstance;
$$$config.bindToConsole;
var supportsMicrotasks = $$$config.supportsMicrotasks, scheduleMicrotask = $$$config.scheduleMicrotask, supportsTestSelectors = $$$config.supportsTestSelectors, findFiberRoot = $$$config.findFiberRoot, getBoundingRect = $$$config.getBoundingRect, getTextContent = $$$config.getTextContent, isHiddenSubtree = $$$config.isHiddenSubtree, matchAccessibilityRole = $$$config.matchAccessibilityRole, setFocusIfFocusable = $$$config.setFocusIfFocusable, setupIntersectionObserver = $$$config.setupIntersectionObserver, appendChild = $$$config.appendChild, appendChildToContainer = $$$config.appendChildToContainer, commitTextUpdate = $$$config.commitTextUpdate, commitMount = $$$config.commitMount, commitUpdate = $$$config.commitUpdate, insertBefore = $$$config.insertBefore, insertInContainerBefore = $$$config.insertInContainerBefore, removeChild = $$$config.removeChild, removeChildFromContainer = $$$config.removeChildFromContainer, resetTextContent = $$$config.resetTextContent, hideInstance = $$$config.hideInstance, hideTextInstance = $$$config.hideTextInstance, unhideInstance = $$$config.unhideInstance, unhideTextInstance = $$$config.unhideTextInstance;
$$$config.cancelViewTransitionName;
$$$config.cancelRootViewTransitionName;
$$$config.restoreRootViewTransitionName;
$$$config.cloneRootViewTransitionContainer;
$$$config.removeRootViewTransitionClone;
$$$config.measureClonedInstance;
$$$config.hasInstanceChanged;
$$$config.hasInstanceAffectedParent;
$$$config.startViewTransition;
$$$config.startGestureTransition;
$$$config.stopGestureTransition;
$$$config.getCurrentGestureOffset;
$$$config.subscribeToGestureDirection;
$$$config.createViewTransitionInstance;
var clearContainer = $$$config.clearContainer;
$$$config.createFragmentInstance;
$$$config.updateFragmentInstanceFiber;
$$$config.commitNewChildToFragmentInstance;
$$$config.deleteChildFromFragmentInstance;
var cloneInstance = $$$config.cloneInstance, createContainerChildSet = $$$config.createContainerChildSet, appendChildToContainerChildSet = $$$config.appendChildToContainerChildSet, finalizeContainerChildren = $$$config.finalizeContainerChildren, replaceContainerChildren = $$$config.replaceContainerChildren, cloneHiddenInstance = $$$config.cloneHiddenInstance, cloneHiddenTextInstance = $$$config.cloneHiddenTextInstance, isSuspenseInstancePending = $$$config.isSuspenseInstancePending, isSuspenseInstanceFallback = $$$config.isSuspenseInstanceFallback, getSuspenseInstanceFallbackErrorDetails = $$$config.getSuspenseInstanceFallbackErrorDetails, registerSuspenseInstanceRetry = $$$config.registerSuspenseInstanceRetry, canHydrateFormStateMarker = $$$config.canHydrateFormStateMarker, isFormStateMarkerMatching = $$$config.isFormStateMarkerMatching, getNextHydratableSibling = $$$config.getNextHydratableSibling, getNextHydratableSiblingAfterSingleton = $$$config.getNextHydratableSiblingAfterSingleton, getFirstHydratableChild = $$$config.getFirstHydratableChild, getFirstHydratableChildWithinContainer = $$$config.getFirstHydratableChildWithinContainer, getFirstHydratableChildWithinSuspenseInstance = $$$config.getFirstHydratableChildWithinSuspenseInstance, getFirstHydratableChildWithinSingleton = $$$config.getFirstHydratableChildWithinSingleton, canHydrateInstance = $$$config.canHydrateInstance, canHydrateTextInstance = $$$config.canHydrateTextInstance, canHydrateSuspenseInstance = $$$config.canHydrateSuspenseInstance, hydrateInstance = $$$config.hydrateInstance, hydrateTextInstance = $$$config.hydrateTextInstance, hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance, getNextHydratableInstanceAfterSuspenseInstance = $$$config.getNextHydratableInstanceAfterSuspenseInstance, commitHydratedContainer = $$$config.commitHydratedContainer, commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance, clearSuspenseBoundary = $$$config.clearSuspenseBoundary, clearSuspenseBoundaryFromContainer = $$$config.clearSuspenseBoundaryFromContainer, shouldDeleteUnhydratedTailInstances = $$$config.shouldDeleteUnhydratedTailInstances;
$$$config.diffHydratedPropsForDevWarnings;
$$$config.diffHydratedTextForDevWarnings;
$$$config.describeHydratableInstanceForDevWarnings;
var validateHydratableInstance = $$$config.validateHydratableInstance, validateHydratableTextInstance = $$$config.validateHydratableTextInstance, supportsResources = $$$config.supportsResources, isHostHoistableType = $$$config.isHostHoistableType, getHoistableRoot = $$$config.getHoistableRoot, getResource = $$$config.getResource, acquireResource = $$$config.acquireResource, releaseResource = $$$config.releaseResource, hydrateHoistable = $$$config.hydrateHoistable, mountHoistable = $$$config.mountHoistable, unmountHoistable = $$$config.unmountHoistable, createHoistableInstance = $$$config.createHoistableInstance, prepareToCommitHoistables = $$$config.prepareToCommitHoistables, mayResourceSuspendCommit = $$$config.mayResourceSuspendCommit, preloadResource = $$$config.preloadResource, suspendResource = $$$config.suspendResource, supportsSingletons = $$$config.supportsSingletons, resolveSingletonInstance = $$$config.resolveSingletonInstance, acquireSingletonInstance = $$$config.acquireSingletonInstance, releaseSingletonInstance = $$$config.releaseSingletonInstance, isHostSingletonType = $$$config.isHostSingletonType, isSingletonScope = $$$config.isSingletonScope, valueStack = [], index$jscomp$0 = -1, emptyContextObject = {}, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log$1 = Math.log, LN2 = Math.LN2, nextTransitionLane = 256, nextRetryLane = 4194304, scheduleCallback$3 = Scheduler2.unstable_scheduleCallback, cancelCallback$1 = Scheduler2.unstable_cancelCallback, shouldYield = Scheduler2.unstable_shouldYield, requestPaint = Scheduler2.unstable_requestPaint, now = Scheduler2.unstable_now, ImmediatePriority = Scheduler2.unstable_ImmediatePriority, UserBlockingPriority = Scheduler2.unstable_UserBlockingPriority, NormalPriority$1 = Scheduler2.unstable_NormalPriority, IdlePriority = Scheduler2.unstable_IdlePriority, log = Scheduler2.log, unstable_setDisableYieldValue = Scheduler2.unstable_setDisableYieldValue, rendererID = null, injectedHook = null, prefix, suffix, reentry = false, CapturedStacks = /* @__PURE__ */ new WeakMap(), forkStack = [], forkStackIndex = 0, treeForkProvider = null, treeForkCount = 0, idStack = [], idStackIndex = 0, treeContextProvider = null, treeContextId = 1, treeContextOverflow = "", contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = false, hydrationErrors = null, rootOrSingletonContext = false, HydrationMismatchException = Error(formatProdErrorMessage(519)), objectIs = "function" === typeof Object.is ? Object.is : is, valueCursor = createCursor(null), currentlyRenderingFiber$1 = null, lastContextDependency = null, AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() {
var listeners = [], signal = this.signal = {
aborted: false,
addEventListener: function(type, listener) {
listeners.push(listener);
}
};
this.abort = function() {
signal.aborted = true;
listeners.forEach(function(listener) {
return listener();
});
};
}, scheduleCallback$2 = Scheduler2.unstable_scheduleCallback, NormalPriority = Scheduler2.unstable_NormalPriority, CacheContext = {
$$typeof: REACT_CONTEXT_TYPE,
Consumer: null,
Provider: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
}, firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = false, mightHavePendingSyncWork = false, isFlushingWork = false, currentEventTransitionLane = 0, currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, prevOnStartTransitionFinish = ReactSharedInternals.S;
ReactSharedInternals.S = function(transition, returnValue) {
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && entangleAsyncAction(transition, returnValue);
null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue);
};
var resumedCache = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, SuspenseException = Error(formatProdErrorMessage(460)), SuspenseyCommitException = Error(formatProdErrorMessage(474)), SuspenseActionException = Error(formatProdErrorMessage(542)), noopSuspenseyCommitThenable = { then: function() {
} }, suspendedThenable = null, concurrentQueues = [], concurrentQueuesIndex = 0, concurrentlyUpdatedLanes = 0, hasForceUpdate = false, didReadFromEntangledAsyncAction = false, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = false, didScheduleRenderPhaseUpdateDuringThisPass = false, shouldDoubleInvokeUserFnsInHooksDEV = false, localIdCounter = 0, thenableIndexCounter$1 = 0, thenableState$1 = null, globalClientIdCounter = 0, ContextOnlyDispatcher = {
readContext,
use,
useCallback: throwInvalidHookError,
useContext: throwInvalidHookError,
useEffect: throwInvalidHookError,
useImperativeHandle: throwInvalidHookError,
useLayoutEffect: throwInvalidHookError,
useInsertionEffect: throwInvalidHookError,
useMemo: throwInvalidHookError,
useReducer: throwInvalidHookError,
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useDeferredValue: throwInvalidHookError,
useTransition: throwInvalidHookError,
useSyncExternalStore: throwInvalidHookError,
useId: throwInvalidHookError,
useHostTransitionStatus: throwInvalidHookError,
useFormState: throwInvalidHookError,
useActionState: throwInvalidHookError,
useOptimistic: throwInvalidHookError,
useMemoCache: throwInvalidHookError,
useCacheRefresh: throwInvalidHookError
}, HooksDispatcherOnMount = {
readContext,
use,
useCallback: function(callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
},
useContext: readContext,
useEffect: mountEffect,
useImperativeHandle: function(ref, create2, deps) {
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
mountEffectImpl(
4194308,
4,
imperativeHandleEffect.bind(null, create2, ref),
deps
);
},
useLayoutEffect: function(create2, deps) {
return mountEffectImpl(4194308, 4, create2, deps);
},
useInsertionEffect: function(create2, deps) {
mountEffectImpl(4, 2, create2, deps);
},
useMemo: function(nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(true);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(false);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
},
useReducer: function(reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(true);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(false);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
},
useRef: function(initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return hook.memoizedState = initialValue;
},
useState: function(initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue, dispatch = dispatchSetState.bind(
null,
currentlyRenderingFiber,
queue
);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
},
useDebugValue: mountDebugValue,
useDeferredValue: function(value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
},
useTransition: function() {
var stateHook = mountStateImpl(false);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
true,
false
);
mountWorkInProgressHook().memoizedState = stateHook;
return [false, stateHook];
},
useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(formatProdErrorMessage(407));
getServerSnapshot = getServerSnapshot();
} else {
getServerSnapshot = getSnapshot();
if (null === workInProgressRoot)
throw Error(formatProdErrorMessage(349));
0 !== (workInProgressRootRenderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
hook.memoizedState = getServerSnapshot;
var inst = { value: getServerSnapshot, getSnapshot };
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
subscribe
]);
fiber.flags |= 2048;
pushSimpleEffect(
9,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
inst,
getServerSnapshot,
getSnapshot
),
null
);
return getServerSnapshot;
},
useId: function() {
var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var JSCompiler_inline_result = treeContextOverflow;
var idWithLeadingBit = treeContextId;
JSCompiler_inline_result = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + JSCompiler_inline_result;
identifierPrefix = "\xAB" + identifierPrefix + "R" + JSCompiler_inline_result;
JSCompiler_inline_result = localIdCounter++;
0 < JSCompiler_inline_result && (identifierPrefix += "H" + JSCompiler_inline_result.toString(32));
identifierPrefix += "\xBB";
} else
JSCompiler_inline_result = globalClientIdCounter++, identifierPrefix = "\xAB" + identifierPrefix + "r" + JSCompiler_inline_result.toString(32) + "\xBB";
return hook.memoizedState = identifierPrefix;
},
useHostTransitionStatus,
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: function(passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
true,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
},
useMemoCache,
useCacheRefresh: function() {
return mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
);
}
}, HooksDispatcherOnUpdate = {
readContext,
use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: updateReducer,
useRef: updateRef,
useState: function() {
return updateReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function(value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function() {
var booleanOrThenable = updateReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus,
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: function(passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
},
useMemoCache,
useCacheRefresh: updateRefresh
}, HooksDispatcherOnRerender = {
readContext,
use,
useCallback: updateCallback,
useContext: readContext,
useEffect: updateEffect,
useImperativeHandle: updateImperativeHandle,
useInsertionEffect: updateInsertionEffect,
useLayoutEffect: updateLayoutEffect,
useMemo: updateMemo,
useReducer: rerenderReducer,
useRef: updateRef,
useState: function() {
return rerenderReducer(basicStateReducer);
},
useDebugValue: mountDebugValue,
useDeferredValue: function(value, initialValue) {
var hook = updateWorkInProgressHook();
return null === currentHook ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
},
useTransition: function() {
var booleanOrThenable = rerenderReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
start
];
},
useSyncExternalStore: updateSyncExternalStore,
useId: updateId,
useHostTransitionStatus,
useFormState: rerenderActionState,
useActionState: rerenderActionState,
useOptimistic: function(passthrough, reducer) {
var hook = updateWorkInProgressHook();
if (null !== currentHook)
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
hook.baseState = passthrough;
return [passthrough, hook.queue.dispatch];
},
useMemoCache,
useCacheRefresh: updateRefresh
}, thenableState = null, thenableIndexCounter = 0, reconcileChildFibers = createChildReconciler(true), mountChildFibers = createChildReconciler(false), suspenseHandlerStackCursor = createCursor(null), shellBoundary = null, suspenseStackCursor = createCursor(0), classComponentUpdater = {
enqueueSetState: function(inst, payload, callback) {
inst = inst._reactInternals;
var lane = requestUpdateLane(), update = createUpdate(lane);
update.payload = payload;
void 0 !== callback && null !== callback && (update.callback = callback);
payload = enqueueUpdate(inst, update, lane);
null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
},
enqueueReplaceState: function(inst, payload, callback) {
inst = inst._reactInternals;
var lane = requestUpdateLane(), update = createUpdate(lane);
update.tag = 1;
update.payload = payload;
void 0 !== callback && null !== callback && (update.callback = callback);
payload = enqueueUpdate(inst, update, lane);
null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
},
enqueueForceUpdate: function(inst, callback) {
inst = inst._reactInternals;
var lane = requestUpdateLane(), update = createUpdate(lane);
update.tag = 2;
void 0 !== callback && null !== callback && (update.callback = callback);
callback = enqueueUpdate(inst, update, lane);
null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane));
}
}, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
var event = new window.ErrorEvent("error", {
bubbles: true,
cancelable: true,
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
error
});
if (!window.dispatchEvent(event)) return;
} else if ("object" === typeof process && "function" === typeof process.emit) {
process.emit("uncaughtException", error);
return;
}
console.error(error);
}, SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = false, SUSPENDED_MARKER = {
dehydrated: null,
treeContext: null,
retryLane: 0,
hydrationErrors: null
}, offscreenSubtreeIsHidden = false, offscreenSubtreeWasHidden = false, needsFormReset = false, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null, hostParent = null, hostParentIsContainer = false, currentHoistableRoot = null, suspenseyCommitFlag = 8192, DefaultAsyncDispatcher = {
getCacheForType: function(resourceType) {
var cache4 = readContext(CacheContext), cacheForType = cache4.data.get(resourceType);
void 0 === cacheForType && (cacheForType = resourceType(), cache4.data.set(resourceType, cacheForType));
return cacheForType;
}
}, COMPONENT_TYPE = 0, HAS_PSEUDO_CLASS_TYPE = 1, ROLE_TYPE = 2, TEST_NAME_TYPE = 3, TEXT_TYPE = 4;
if ("function" === typeof Symbol && Symbol.for) {
var symbolFor = Symbol.for;
COMPONENT_TYPE = symbolFor("selector.component");
HAS_PSEUDO_CLASS_TYPE = symbolFor("selector.has_pseudo_class");
ROLE_TYPE = symbolFor("selector.role");
TEST_NAME_TYPE = symbolFor("selector.test_id");
TEXT_TYPE = symbolFor("selector.text");
}
var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, executionContext = 0, workInProgressRoot = null, workInProgress = null, workInProgressRootRenderLanes = 0, workInProgressSuspendedReason = 0, workInProgressThrownValue = null, workInProgressRootDidSkipSuspendedSiblings = false, workInProgressRootIsPrerendering = false, workInProgressRootDidAttachPingListener = false, entangledRenderLanes = 0, workInProgressRootExitStatus = 0, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = false, globalMostRecentFallbackTime = 0, workInProgressRootRenderTargetTime = Infinity, workInProgressTransitions = null, legacyErrorBoundariesThatAlreadyFailed = null, pendingEffectsStatus = 0, pendingEffectsRoot = null, pendingFinishedWork = null, pendingEffectsLanes = 0, pendingEffectsRemainingLanes = 0, pendingPassiveTransitions = null, pendingRecoverableErrors = null, nestedUpdateCount = 0, rootWithNestedUpdates = null;
exports3.attemptContinuousHydration = function(fiber) {
if (13 === fiber.tag) {
var root = enqueueConcurrentRenderForLane(fiber, 67108864);
null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);
markRetryLaneIfNotHydrated(fiber, 67108864);
}
};
exports3.attemptHydrationAtCurrentPriority = function(fiber) {
if (13 === fiber.tag) {
var lane = requestUpdateLane();
lane = getBumpedLaneForHydrationByLane(lane);
var root = enqueueConcurrentRenderForLane(fiber, lane);
null !== root && scheduleUpdateOnFiber(root, fiber, lane);
markRetryLaneIfNotHydrated(fiber, lane);
}
};
exports3.attemptSynchronousHydration = function(fiber) {
switch (fiber.tag) {
case 3:
fiber = fiber.stateNode;
if (fiber.current.memoizedState.isDehydrated) {
var lanes = getHighestPriorityLanes(fiber.pendingLanes);
if (0 !== lanes) {
fiber.pendingLanes |= 2;
for (fiber.entangledLanes |= 2; lanes; ) {
var lane = 1 << 31 - clz32(lanes);
fiber.entanglements[1] |= lane;
lanes &= ~lane;
}
ensureRootIsScheduled(fiber);
0 === (executionContext & 6) && (workInProgressRootRenderTargetTime = now() + 500, flushSyncWorkAcrossRoots_impl(0, false));
}
}
break;
case 13:
lanes = enqueueConcurrentRenderForLane(fiber, 2), null !== lanes && scheduleUpdateOnFiber(lanes, fiber, 2), flushSyncWork(), markRetryLaneIfNotHydrated(fiber, 2);
}
};
exports3.batchedUpdates = function(fn, a) {
return fn(a);
};
exports3.createComponentSelector = function(component) {
return { $$typeof: COMPONENT_TYPE, value: component };
};
exports3.createContainer = function(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transitionCallbacks) {
return createFiberRoot(
containerInfo,
tag,
false,
null,
hydrationCallbacks,
isStrictMode,
identifierPrefix,
onUncaughtError,
onCaughtError,
onRecoverableError,
transitionCallbacks,
null
);
};
exports3.createHasPseudoClassSelector = function(selectors) {
return { $$typeof: HAS_PSEUDO_CLASS_TYPE, value: selectors };
};
exports3.createHydrationContainer = function(initialChildren, callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transitionCallbacks, formState) {
initialChildren = createFiberRoot(
containerInfo,
tag,
true,
initialChildren,
hydrationCallbacks,
isStrictMode,
identifierPrefix,
onUncaughtError,
onCaughtError,
onRecoverableError,
transitionCallbacks,
formState
);
initialChildren.context = getContextForSubtree(null);
containerInfo = initialChildren.current;
tag = requestUpdateLane();
tag = getBumpedLaneForHydrationByLane(tag);
hydrationCallbacks = createUpdate(tag);
hydrationCallbacks.callback = void 0 !== callback && null !== callback ? callback : null;
enqueueUpdate(containerInfo, hydrationCallbacks, tag);
callback = tag;
initialChildren.current.lanes = callback;
markRootUpdated$1(initialChildren, callback);
ensureRootIsScheduled(initialChildren);
return initialChildren;
};
exports3.createPortal = function(children, containerInfo, implementation) {
var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
return {
$$typeof: REACT_PORTAL_TYPE,
key: null == key ? null : "" + key,
children,
containerInfo,
implementation
};
};
exports3.createRoleSelector = function(role) {
return { $$typeof: ROLE_TYPE, value: role };
};
exports3.createTestNameSelector = function(id) {
return { $$typeof: TEST_NAME_TYPE, value: id };
};
exports3.createTextSelector = function(text) {
return { $$typeof: TEXT_TYPE, value: text };
};
exports3.defaultOnCaughtError = function(error) {
console.error(error);
};
exports3.defaultOnRecoverableError = function(error) {
reportGlobalError(error);
};
exports3.defaultOnUncaughtError = function(error) {
reportGlobalError(error);
};
exports3.deferredUpdates = function(fn) {
var prevTransition = ReactSharedInternals.T, previousPriority = getCurrentUpdatePriority();
try {
return setCurrentUpdatePriority(32), ReactSharedInternals.T = null, fn();
} finally {
setCurrentUpdatePriority(previousPriority), ReactSharedInternals.T = prevTransition;
}
};
exports3.discreteUpdates = function(fn, a, b, c3, d) {
var prevTransition = ReactSharedInternals.T, previousPriority = getCurrentUpdatePriority();
try {
return setCurrentUpdatePriority(2), ReactSharedInternals.T = null, fn(a, b, c3, d);
} finally {
setCurrentUpdatePriority(previousPriority), ReactSharedInternals.T = prevTransition, 0 === executionContext && (workInProgressRootRenderTargetTime = now() + 500);
}
};
exports3.findAllNodes = findAllNodes;
exports3.findBoundingRects = function(hostRoot, selectors) {
if (!supportsTestSelectors) throw Error(formatProdErrorMessage(363));
selectors = findAllNodes(hostRoot, selectors);
hostRoot = [];
for (var i2 = 0; i2 < selectors.length; i2++)
hostRoot.push(getBoundingRect(selectors[i2]));
for (selectors = hostRoot.length - 1; 0 < selectors; selectors--) {
i2 = hostRoot[selectors];
for (var targetLeft = i2.x, targetRight = targetLeft + i2.width, targetTop = i2.y, targetBottom = targetTop + i2.height, j = selectors - 1; 0 <= j; j--)
if (selectors !== j) {
var otherRect = hostRoot[j], otherLeft = otherRect.x, otherRight = otherLeft + otherRect.width, otherTop = otherRect.y, otherBottom = otherTop + otherRect.height;
if (targetLeft >= otherLeft && targetTop >= otherTop && targetRight <= otherRight && targetBottom <= otherBottom) {
hostRoot.splice(selectors, 1);
break;
} else if (!(targetLeft !== otherLeft || i2.width !== otherRect.width || otherBottom < targetTop || otherTop > targetBottom)) {
otherTop > targetTop && (otherRect.height += otherTop - targetTop, otherRect.y = targetTop);
otherBottom < targetBottom && (otherRect.height = targetBottom - otherTop);
hostRoot.splice(selectors, 1);
break;
} else if (!(targetTop !== otherTop || i2.height !== otherRect.height || otherRight < targetLeft || otherLeft > targetRight)) {
otherLeft > targetLeft && (otherRect.width += otherLeft - targetLeft, otherRect.x = targetLeft);
otherRight < targetRight && (otherRect.width = targetRight - otherLeft);
hostRoot.splice(selectors, 1);
break;
}
}
}
return hostRoot;
};
exports3.findHostInstance = findHostInstance;
exports3.findHostInstanceWithNoPortals = function(fiber) {
fiber = findCurrentFiberUsingSlowPath(fiber);
fiber = null !== fiber ? findCurrentHostFiberWithNoPortalsImpl(fiber) : null;
return null === fiber ? null : getPublicInstance(fiber.stateNode);
};
exports3.findHostInstanceWithWarning = function(component) {
return findHostInstance(component);
};
exports3.flushPassiveEffects = flushPendingEffects;
exports3.flushSyncFromReconciler = function(fn) {
var prevExecutionContext = executionContext;
executionContext |= 1;
var prevTransition = ReactSharedInternals.T, previousPriority = getCurrentUpdatePriority();
try {
if (setCurrentUpdatePriority(2), ReactSharedInternals.T = null, fn)
return fn();
} finally {
setCurrentUpdatePriority(previousPriority), ReactSharedInternals.T = prevTransition, executionContext = prevExecutionContext, 0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(0, false);
}
};
exports3.flushSyncWork = flushSyncWork;
exports3.focusWithin = function(hostRoot, selectors) {
if (!supportsTestSelectors) throw Error(formatProdErrorMessage(363));
hostRoot = findFiberRootForHostRoot(hostRoot);
selectors = findPaths(hostRoot, selectors);
selectors = Array.from(selectors);
for (hostRoot = 0; hostRoot < selectors.length; ) {
var fiber = selectors[hostRoot++], tag = fiber.tag;
if (!isHiddenSubtree(fiber)) {
if ((5 === tag || 26 === tag || 27 === tag) && setFocusIfFocusable(fiber.stateNode))
return true;
for (fiber = fiber.child; null !== fiber; )
selectors.push(fiber), fiber = fiber.sibling;
}
}
return false;
};
exports3.getFindAllNodesFailureDescription = function(hostRoot, selectors) {
if (!supportsTestSelectors) throw Error(formatProdErrorMessage(363));
var maxSelectorIndex = 0, matchedNames = [];
hostRoot = [findFiberRootForHostRoot(hostRoot), 0];
for (var index = 0; index < hostRoot.length; ) {
var fiber = hostRoot[index++], tag = fiber.tag, selectorIndex = hostRoot[index++], selector = selectors[selectorIndex];
if (5 !== tag && 26 !== tag && 27 !== tag || !isHiddenSubtree(fiber)) {
if (matchSelector(fiber, selector) && (matchedNames.push(selectorToString(selector)), selectorIndex++, selectorIndex > maxSelectorIndex && (maxSelectorIndex = selectorIndex)), selectorIndex < selectors.length)
for (fiber = fiber.child; null !== fiber; )
hostRoot.push(fiber, selectorIndex), fiber = fiber.sibling;
}
}
if (maxSelectorIndex < selectors.length) {
for (hostRoot = []; maxSelectorIndex < selectors.length; maxSelectorIndex++)
hostRoot.push(selectorToString(selectors[maxSelectorIndex]));
return "findAllNodes was able to match part of the selector:\n " + (matchedNames.join(" > ") + "\n\nNo matching component was found for:\n ") + hostRoot.join(" > ");
}
return null;
};
exports3.getPublicRootInstance = function(container) {
container = container.current;
if (!container.child) return null;
switch (container.child.tag) {
case 27:
case 5:
return getPublicInstance(container.child.stateNode);
default:
return container.child.stateNode;
}
};
exports3.injectIntoDevTools = function() {
var internals = {
bundleType: 0,
version: rendererVersion,
rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0"
};
null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig);
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) internals = false;
else {
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (hook.isDisabled || !hook.supportsFiber) internals = true;
else {
try {
rendererID = hook.inject(internals), injectedHook = hook;
} catch (err) {
}
internals = hook.checkDCE ? true : false;
}
}
return internals;
};
exports3.isAlreadyRendering = function() {
return 0 !== (executionContext & 6);
};
exports3.observeVisibleRects = function(hostRoot, selectors, callback, options) {
if (!supportsTestSelectors) throw Error(formatProdErrorMessage(363));
hostRoot = findAllNodes(hostRoot, selectors);
var disconnect = setupIntersectionObserver(
hostRoot,
callback,
options
).disconnect;
return {
disconnect: function() {
disconnect();
}
};
};
exports3.shouldError = function() {
return null;
};
exports3.shouldSuspend = function() {
return false;
};
exports3.startHostTransition = function(formFiber, pendingState, action, formData) {
if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476));
var queue = ensureFormComponentIsStateful(formFiber).queue;
startTransition(
formFiber,
queue,
pendingState,
NotPendingTransition,
null === action ? noop4 : function() {
var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue;
dispatchSetStateInternal(
formFiber,
resetStateQueue,
{},
requestUpdateLane()
);
return action(formData);
}
);
};
exports3.updateContainer = function(element, container, parentComponent, callback) {
var current = container.current, lane = requestUpdateLane();
updateContainerImpl(
current,
lane,
element,
container,
parentComponent,
callback
);
return lane;
};
exports3.updateContainerSync = function(element, container, parentComponent, callback) {
updateContainerImpl(
container.current,
2,
element,
container,
parentComponent,
callback
);
return 2;
};
return exports3;
};
module2.exports.default = module2.exports;
Object.defineProperty(module2.exports, "__esModule", { value: true });
}
});
// node_modules/react-reconciler/cjs/react-reconciler.development.js
var require_react_reconciler_development = __commonJS({
"node_modules/react-reconciler/cjs/react-reconciler.development.js"(exports2, module2) {
"use strict";
"production" !== process.env.NODE_ENV && (module2.exports = function($$$config) {
function findHook(fiber, id) {
for (fiber = fiber.memoizedState; null !== fiber && 0 < id; )
fiber = fiber.next, id--;
return fiber;
}
function copyWithSetImpl(obj, path51, index, value) {
if (index >= path51.length) return value;
var key = path51[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
updated[key] = copyWithSetImpl(obj[key], path51, index + 1, value);
return updated;
}
function copyWithRename(obj, oldPath, newPath) {
if (oldPath.length !== newPath.length)
console.warn("copyWithRename() expects paths of the same length");
else {
for (var i2 = 0; i2 < newPath.length - 1; i2++)
if (oldPath[i2] !== newPath[i2]) {
console.warn(
"copyWithRename() expects paths to be the same except for the deepest key"
);
return;
}
return copyWithRenameImpl(obj, oldPath, newPath, 0);
}
}
function copyWithRenameImpl(obj, oldPath, newPath, index) {
var oldKey = oldPath[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(
obj[oldKey],
oldPath,
newPath,
index + 1
);
return updated;
}
function copyWithDeleteImpl(obj, path51, index) {
var key = path51[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
if (index + 1 === path51.length)
return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
updated[key] = copyWithDeleteImpl(obj[key], path51, index + 1);
return updated;
}
function shouldSuspendImpl() {
return false;
}
function shouldErrorImpl() {
return null;
}
function createFiber(tag, pendingProps, key, mode) {
return new FiberNode(tag, pendingProps, key, mode);
}
function scheduleRoot(root, element) {
root.context === emptyContextObject && (updateContainerSync(element, root, null, null), flushSyncWork());
}
function scheduleRefresh(root, update) {
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies;
update = update.updatedFamilies;
flushPendingEffects();
scheduleFibersWithFamiliesRecursively(
root.current,
update,
staleFamilies
);
flushSyncWork();
}
}
function setRefreshHandler(handler) {
resolveFamily = handler;
}
function warnForMissingKey() {
}
function warnInvalidHookAccess() {
console.error(
"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"
);
}
function warnInvalidContextAccess() {
console.error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
}
function noop4() {
}
function setToSortedString(set) {
var array = [];
set.forEach(function(value) {
array.push(value);
});
return array.sort().join(", ");
}
function getNearestMountedFiber(fiber) {
var node = fiber, nearestMounted = fiber;
if (fiber.alternate) for (; node.return; ) node = node.return;
else {
fiber = node;
do
node = fiber, 0 !== (node.flags & 4098) && (nearestMounted = node.return), fiber = node.return;
while (fiber);
}
return 3 === node.tag ? nearestMounted : null;
}
function assertIsMounted(fiber) {
if (getNearestMountedFiber(fiber) !== fiber)
throw Error("Unable to find node on an unmounted component.");
}
function findCurrentFiberUsingSlowPath(fiber) {
var alternate = fiber.alternate;
if (!alternate) {
alternate = getNearestMountedFiber(fiber);
if (null === alternate)
throw Error("Unable to find node on an unmounted component.");
return alternate !== fiber ? null : fiber;
}
for (var a = fiber, b = alternate; ; ) {
var parentA = a.return;
if (null === parentA) break;
var parentB = parentA.alternate;
if (null === parentB) {
b = parentA.return;
if (null !== b) {
a = b;
continue;
}
break;
}
if (parentA.child === parentB.child) {
for (parentB = parentA.child; parentB; ) {
if (parentB === a) return assertIsMounted(parentA), fiber;
if (parentB === b) return assertIsMounted(parentA), alternate;
parentB = parentB.sibling;
}
throw Error("Unable to find node on an unmounted component.");
}
if (a.return !== b.return) a = parentA, b = parentB;
else {
for (var didFindChild = false, _child = parentA.child; _child; ) {
if (_child === a) {
didFindChild = true;
a = parentA;
b = parentB;
break;
}
if (_child === b) {
didFindChild = true;
b = parentA;
a = parentB;
break;
}
_child = _child.sibling;
}
if (!didFindChild) {
for (_child = parentB.child; _child; ) {
if (_child === a) {
didFindChild = true;
a = parentB;
b = parentA;
break;
}
if (_child === b) {
didFindChild = true;
b = parentB;
a = parentA;
break;
}
_child = _child.sibling;
}
if (!didFindChild)
throw Error(
"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
);
}
}
if (a.alternate !== b)
throw Error(
"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
);
}
if (3 !== a.tag)
throw Error("Unable to find node on an unmounted component.");
return a.stateNode.current === a ? fiber : alternate;
}
function findCurrentHostFiber(parent) {
parent = findCurrentFiberUsingSlowPath(parent);
return null !== parent ? findCurrentHostFiberImpl(parent) : null;
}
function findCurrentHostFiberImpl(node) {
var tag = node.tag;
if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
for (node = node.child; null !== node; ) {
tag = findCurrentHostFiberImpl(node);
if (null !== tag) return tag;
node = node.sibling;
}
return null;
}
function findCurrentHostFiberWithNoPortalsImpl(node) {
var tag = node.tag;
if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
for (node = node.child; null !== node; ) {
if (4 !== node.tag && (tag = findCurrentHostFiberWithNoPortalsImpl(node), null !== tag))
return tag;
node = node.sibling;
}
return null;
}
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable)
return null;
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch ("number" === typeof type.tag && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), type.$$typeof) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
return type;
case REACT_MEMO_TYPE:
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x2) {
}
}
return null;
}
function getComponentNameFromFiber(fiber) {
var type = fiber.type;
switch (fiber.tag) {
case 31:
return "Activity";
case 24:
return "Cache";
case 9:
return (type._context.displayName || "Context") + ".Consumer";
case 10:
return (type.displayName || "Context") + ".Provider";
case 18:
return "DehydratedFragment";
case 11:
return fiber = type.render, fiber = fiber.displayName || fiber.name || "", type.displayName || ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef");
case 7:
return "Fragment";
case 26:
case 27:
case 5:
return type;
case 4:
return "Portal";
case 3:
return "Root";
case 6:
return "Text";
case 16:
return getComponentNameFromType(type);
case 8:
return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
case 22:
return "Offscreen";
case 12:
return "Profiler";
case 21:
return "Scope";
case 13:
return "Suspense";
case 19:
return "SuspenseList";
case 25:
return "TracingMarker";
case 1:
case 0:
case 14:
case 15:
if ("function" === typeof type)
return type.displayName || type.name || null;
if ("string" === typeof type) return type;
break;
case 29:
type = fiber._debugInfo;
if (null != type) {
for (var i2 = type.length - 1; 0 <= i2; i2--)
if ("string" === typeof type[i2].name) return type[i2].name;
}
if (null !== fiber.return)
return getComponentNameFromFiber(fiber.return);
}
return null;
}
function createCursor(defaultValue) {
return { current: defaultValue };
}
function pop(cursor, fiber) {
0 > index$jscomp$0 ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && console.error("Unexpected Fiber popped."), cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, fiberStack[index$jscomp$0] = null, index$jscomp$0--);
}
function push(cursor, value, fiber) {
index$jscomp$0++;
valueStack[index$jscomp$0] = cursor.current;
fiberStack[index$jscomp$0] = fiber;
cursor.current = value;
}
function clz32Fallback(x2) {
x2 >>>= 0;
return 0 === x2 ? 32 : 31 - (log$1(x2) / LN2 | 0) | 0;
}
function getLabelForLane(lane) {
if (lane & 1) return "SyncHydrationLane";
if (lane & 2) return "Sync";
if (lane & 4) return "InputContinuousHydration";
if (lane & 8) return "InputContinuous";
if (lane & 16) return "DefaultHydration";
if (lane & 32) return "Default";
if (lane & 128) return "TransitionHydration";
if (lane & 4194048) return "Transition";
if (lane & 62914560) return "Retry";
if (lane & 67108864) return "SelectiveHydration";
if (lane & 134217728) return "IdleHydration";
if (lane & 268435456) return "Idle";
if (lane & 536870912) return "Offscreen";
if (lane & 1073741824) return "Deferred";
}
function getHighestPriorityLanes(lanes) {
var pendingSyncLanes = lanes & 42;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
switch (lanes & -lanes) {
case 1:
return 1;
case 2:
return 2;
case 4:
return 4;
case 8:
return 8;
case 16:
return 16;
case 32:
return 32;
case 64:
return 64;
case 128:
return 128;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return lanes & 4194048;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
return lanes & 62914560;
case 67108864:
return 67108864;
case 134217728:
return 134217728;
case 268435456:
return 268435456;
case 536870912:
return 536870912;
case 1073741824:
return 0;
default:
return console.error(
"Should have found matching lanes. This is a bug in React."
), lanes;
}
}
function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0, suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes;
root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes;
}
function checkIfRootIsPrerendering(root, renderLanes2) {
return 0 === (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & renderLanes2);
}
function computeExpirationTime(lane, currentTime) {
switch (lane) {
case 1:
case 2:
case 4:
case 8:
case 64:
return currentTime + 250;
case 16:
case 32:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return currentTime + 5e3;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
return -1;
case 67108864:
case 134217728:
case 268435456:
case 536870912:
case 1073741824:
return -1;
default:
return console.error(
"Should have found matching lanes. This is a bug in React."
), -1;
}
}
function claimNextTransitionLane() {
var lane = nextTransitionLane;
nextTransitionLane <<= 1;
0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256);
return lane;
}
function claimNextRetryLane() {
var lane = nextRetryLane;
nextRetryLane <<= 1;
0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
return lane;
}
function createLaneMap(initial) {
for (var laneMap = [], i2 = 0; 31 > i2; i2++) laneMap.push(initial);
return laneMap;
}
function markRootUpdated$1(root, updateLane) {
root.pendingLanes |= updateLane;
268435456 !== updateLane && (root.suspendedLanes = 0, root.pingedLanes = 0, root.warmLanes = 0);
}
function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) {
var previouslyPendingLanes = root.pendingLanes;
root.pendingLanes = remainingLanes;
root.suspendedLanes = 0;
root.pingedLanes = 0;
root.warmLanes = 0;
root.expiredLanes &= remainingLanes;
root.entangledLanes &= remainingLanes;
root.errorRecoveryDisabledLanes &= remainingLanes;
root.shellSuspendCounter = 0;
var entanglements = root.entanglements, expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates;
for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) {
var index = 31 - clz32(remainingLanes), lane = 1 << index;
entanglements[index] = 0;
expirationTimes[index] = -1;
var hiddenUpdatesForLane = hiddenUpdates[index];
if (null !== hiddenUpdatesForLane)
for (hiddenUpdates[index] = null, index = 0; index < hiddenUpdatesForLane.length; index++) {
var update = hiddenUpdatesForLane[index];
null !== update && (update.lane &= -536870913);
}
remainingLanes &= ~lane;
}
0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
}
function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
root.pendingLanes |= spawnedLane;
root.suspendedLanes &= ~spawnedLane;
var spawnedLaneIndex = 31 - clz32(spawnedLane);
root.entangledLanes |= spawnedLane;
root.entanglements[spawnedLaneIndex] = root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 4194090;
}
function markRootEntangled(root, entangledLanes) {
var rootEntangledLanes = root.entangledLanes |= entangledLanes;
for (root = root.entanglements; rootEntangledLanes; ) {
var index = 31 - clz32(rootEntangledLanes), lane = 1 << index;
lane & entangledLanes | root[index] & entangledLanes && (root[index] |= entangledLanes);
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydrationByLane(lane) {
switch (lane) {
case 2:
lane = 1;
break;
case 8:
lane = 4;
break;
case 32:
lane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
lane = 128;
break;
case 268435456:
lane = 134217728;
break;
default:
lane = 0;
}
return lane;
}
function addFiberToLanesMap(root, fiber, lanes) {
if (isDevToolsPresent)
for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
var index = 31 - clz32(lanes), lane = 1 << index;
root[index].add(fiber);
lanes &= ~lane;
}
}
function movePendingFibersToMemoized(root, lanes) {
if (isDevToolsPresent)
for (var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, memoizedUpdaters = root.memoizedUpdaters; 0 < lanes; ) {
var index = 31 - clz32(lanes);
root = 1 << index;
index = pendingUpdatersLaneMap[index];
0 < index.size && (index.forEach(function(fiber) {
var alternate = fiber.alternate;
null !== alternate && memoizedUpdaters.has(alternate) || memoizedUpdaters.add(fiber);
}), index.clear());
lanes &= ~root;
}
}
function lanesToEventPriority(lanes) {
lanes &= -lanes;
return 2 < lanes ? 8 < lanes ? 0 !== (lanes & 134217727) ? 32 : 268435456 : 8 : 2;
}
function injectInternals(internals) {
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false;
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (hook.isDisabled) return true;
if (!hook.supportsFiber)
return console.error(
"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
), true;
try {
rendererID = hook.inject(internals), injectedHook = hook;
} catch (err) {
console.error("React instrumentation encountered an error: %s.", err);
}
return hook.checkDCE ? true : false;
}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {
hasLoggedError || (hasLoggedError = true, console.error(
"React instrumentation encountered an error: %s",
err
));
}
}
function injectProfilingHooks(profilingHooks) {
injectedProfilingHooks = profilingHooks;
}
function markCommitStopped() {
null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStopped && injectedProfilingHooks.markCommitStopped();
}
function markComponentRenderStarted(fiber) {
null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentRenderStarted && injectedProfilingHooks.markComponentRenderStarted(fiber);
}
function markComponentRenderStopped() {
null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped();
}
function markRenderStarted(lanes) {
null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markRenderStarted && injectedProfilingHooks.markRenderStarted(lanes);
}
function markRenderStopped() {
null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markRenderStopped && injectedProfilingHooks.markRenderStopped();
}
function markStateUpdateScheduled(fiber, lane) {
null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markStateUpdateScheduled && injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
}
function disabledLog() {
}
function disableLogs() {
if (0 === disabledDepth) {
prevLog = console.log;
prevInfo = console.info;
prevWarn = console.warn;
prevError = console.error;
prevGroup = console.group;
prevGroupCollapsed = console.groupCollapsed;
prevGroupEnd = console.groupEnd;
var props = {
configurable: true,
enumerable: true,
value: disabledLog,
writable: true
};
Object.defineProperties(console, {
info: props,
log: props,
warn: props,
error: props,
group: props,
groupCollapsed: props,
groupEnd: props
});
}
disabledDepth++;
}
function reenableLogs() {
disabledDepth--;
if (0 === disabledDepth) {
var props = { configurable: true, enumerable: true, writable: true };
Object.defineProperties(console, {
log: assign({}, props, { value: prevLog }),
info: assign({}, props, { value: prevInfo }),
warn: assign({}, props, { value: prevWarn }),
error: assign({}, props, { value: prevError }),
group: assign({}, props, { value: prevGroup }),
groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
groupEnd: assign({}, props, { value: prevGroupEnd })
});
}
0 > disabledDepth && console.error(
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
);
}
function describeBuiltInComponentFrame(name2) {
if (void 0 === prefix)
try {
throw Error();
} catch (x2) {
var match2 = x2.stack.trim().match(/\n( *(at )?)/);
prefix = match2 && match2[1] || "";
suffix = -1 < x2.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x2.stack.indexOf("@") ? "@unknown:0:0" : "";
}
return "\n" + prefix + name2 + suffix;
}
function describeNativeComponentFrame(fn, construct) {
if (!fn || reentry) return "";
var frame = componentFrameCache.get(fn);
if (void 0 !== frame) return frame;
reentry = true;
frame = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var previousDispatcher = null;
previousDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = null;
disableLogs();
try {
var RunInRootFrame = {
DetermineComponentFrameRoot: function() {
try {
if (construct) {
var Fake = function() {
throw Error();
};
Object.defineProperty(Fake.prototype, "props", {
set: function() {
throw Error();
}
});
if ("object" === typeof Reflect && Reflect.construct) {
try {
Reflect.construct(Fake, []);
} catch (x2) {
var control = x2;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x$0) {
control = x$0;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x$1) {
control = x$1;
}
(Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
});
}
} catch (sample) {
if (sample && control && "string" === typeof sample.stack)
return [sample.stack, control.stack];
}
return [null, null];
}
};
RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
var namePropDescriptor = Object.getOwnPropertyDescriptor(
RunInRootFrame.DetermineComponentFrameRoot,
"name"
);
namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
RunInRootFrame.DetermineComponentFrameRoot,
"name",
{ value: "DetermineComponentFrameRoot" }
);
var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
if (sampleStack && controlStack) {
var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes(
"DetermineComponentFrameRoot"
); )
namePropDescriptor++;
for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes(
"DetermineComponentFrameRoot"
); )
_RunInRootFrame$Deter++;
if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
_RunInRootFrame$Deter--;
for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
do
if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
var _frame = "\n" + sampleLines[namePropDescriptor].replace(
" at new ",
" at "
);
fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName));
"function" === typeof fn && componentFrameCache.set(fn, _frame);
return _frame;
}
while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
}
break;
}
}
} finally {
reentry = false, ReactSharedInternals.H = previousDispatcher, reenableLogs(), Error.prepareStackTrace = frame;
}
sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
function formatOwnerStack(error) {
var prevPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
error = error.stack;
Error.prepareStackTrace = prevPrepareStackTrace;
error.startsWith("Error: react-stack-top-frame\n") && (error = error.slice(29));
prevPrepareStackTrace = error.indexOf("\n");
-1 !== prevPrepareStackTrace && (error = error.slice(prevPrepareStackTrace + 1));
prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
-1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error.lastIndexOf(
"\n",
prevPrepareStackTrace
));
if (-1 !== prevPrepareStackTrace)
error = error.slice(0, prevPrepareStackTrace);
else return "";
return error;
}
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
case 27:
case 5:
return describeBuiltInComponentFrame(fiber.type);
case 16:
return describeBuiltInComponentFrame("Lazy");
case 13:
return describeBuiltInComponentFrame("Suspense");
case 19:
return describeBuiltInComponentFrame("SuspenseList");
case 0:
case 15:
return describeNativeComponentFrame(fiber.type, false);
case 11:
return describeNativeComponentFrame(fiber.type.render, false);
case 1:
return describeNativeComponentFrame(fiber.type, true);
case 31:
return describeBuiltInComponentFrame("Activity");
default:
return "";
}
}
function getStackByFiberInDevAndProd(workInProgress2) {
try {
var info = "";
do {
info += describeFiber(workInProgress2);
var debugInfo = workInProgress2._debugInfo;
if (debugInfo)
for (var i2 = debugInfo.length - 1; 0 <= i2; i2--) {
var entry = debugInfo[i2];
if ("string" === typeof entry.name) {
var JSCompiler_temp_const = info, env6 = entry.env;
var JSCompiler_inline_result = describeBuiltInComponentFrame(
entry.name + (env6 ? " [" + env6 + "]" : "")
);
info = JSCompiler_temp_const + JSCompiler_inline_result;
}
}
workInProgress2 = workInProgress2.return;
} while (workInProgress2);
return info;
} catch (x2) {
return "\nError generating stack: " + x2.message + "\n" + x2.stack;
}
}
function describeFunctionComponentFrameWithoutLineNumber(fn) {
return (fn = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(fn) : "";
}
function createCapturedValueAtFiber(value, source2) {
if ("object" === typeof value && null !== value) {
var existing = CapturedStacks.get(value);
if (void 0 !== existing) return existing;
source2 = {
value,
source: source2,
stack: getStackByFiberInDevAndProd(source2)
};
CapturedStacks.set(value, source2);
return source2;
}
return {
value,
source: source2,
stack: getStackByFiberInDevAndProd(source2)
};
}
function pushTreeFork(workInProgress2, totalChildren) {
warnIfNotHydrating();
forkStack[forkStackIndex++] = treeForkCount;
forkStack[forkStackIndex++] = treeForkProvider;
treeForkProvider = workInProgress2;
treeForkCount = totalChildren;
}
function pushTreeId(workInProgress2, totalChildren, index) {
warnIfNotHydrating();
idStack[idStackIndex++] = treeContextId;
idStack[idStackIndex++] = treeContextOverflow;
idStack[idStackIndex++] = treeContextProvider;
treeContextProvider = workInProgress2;
var baseIdWithLeadingBit = treeContextId;
workInProgress2 = treeContextOverflow;
var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
baseIdWithLeadingBit &= ~(1 << baseLength);
index += 1;
var length = 32 - clz32(totalChildren) + baseLength;
if (30 < length) {
var numberOfOverflowBits = baseLength - baseLength % 5;
length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32);
baseIdWithLeadingBit >>= numberOfOverflowBits;
baseLength -= numberOfOverflowBits;
treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index << baseLength | baseIdWithLeadingBit;
treeContextOverflow = length + workInProgress2;
} else
treeContextId = 1 << length | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress2;
}
function pushMaterializedTreeId(workInProgress2) {
warnIfNotHydrating();
null !== workInProgress2.return && (pushTreeFork(workInProgress2, 1), pushTreeId(workInProgress2, 1, 0));
}
function popTreeContext(workInProgress2) {
for (; workInProgress2 === treeForkProvider; )
treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null;
for (; workInProgress2 === treeContextProvider; )
treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null;
}
function warnIfNotHydrating() {
isHydrating || console.error(
"Expected to be hydrating. This is a bug in React. Please file an issue."
);
}
function requiredContext(c3) {
null === c3 && console.error(
"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
);
return c3;
}
function pushHostContainer(fiber, nextRootInstance) {
push(rootInstanceStackCursor, nextRootInstance, fiber);
push(contextFiberStackCursor, fiber, fiber);
push(contextStackCursor, null, fiber);
nextRootInstance = getRootHostContext(nextRootInstance);
pop(contextStackCursor, fiber);
push(contextStackCursor, nextRootInstance, fiber);
}
function popHostContainer(fiber) {
pop(contextStackCursor, fiber);
pop(contextFiberStackCursor, fiber);
pop(rootInstanceStackCursor, fiber);
}
function getHostContext() {
return requiredContext(contextStackCursor.current);
}
function pushHostContext(fiber) {
null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber, fiber);
var context2 = requiredContext(contextStackCursor.current), nextContext = getChildHostContext(context2, fiber.type);
context2 !== nextContext && (push(contextFiberStackCursor, fiber, fiber), push(contextStackCursor, nextContext, fiber));
}
function popHostContext(fiber) {
contextFiberStackCursor.current === fiber && (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber));
hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), isPrimaryRenderer ? HostTransitionContext._currentValue = NotPendingTransition : HostTransitionContext._currentValue2 = NotPendingTransition);
}
function findNotableNode(node, indent) {
return void 0 === node.serverProps && 0 === node.serverTail.length && 1 === node.children.length && 3 < node.distanceFromLeaf && node.distanceFromLeaf > 15 - indent ? findNotableNode(node.children[0], indent) : node;
}
function indentation(indent) {
return " " + " ".repeat(indent);
}
function added(indent) {
return "+ " + " ".repeat(indent);
}
function removed(indent) {
return "- " + " ".repeat(indent);
}
function describeFiberType(fiber) {
switch (fiber.tag) {
case 26:
case 27:
case 5:
return fiber.type;
case 16:
return "Lazy";
case 13:
return "Suspense";
case 19:
return "SuspenseList";
case 0:
case 15:
return fiber = fiber.type, fiber.displayName || fiber.name || null;
case 11:
return fiber = fiber.type.render, fiber.displayName || fiber.name || null;
case 1:
return fiber = fiber.type, fiber.displayName || fiber.name || null;
default:
return null;
}
}
function describeTextNode(content, maxLength) {
return needsEscaping.test(content) ? (content = JSON.stringify(content), content.length > maxLength - 2 ? 8 > maxLength ? '{"..."}' : "{" + content.slice(0, maxLength - 7) + '..."}' : "{" + content + "}") : content.length > maxLength ? 5 > maxLength ? '{"..."}' : content.slice(0, maxLength - 3) + "..." : content;
}
function describeTextDiff(clientText, serverProps, indent) {
var maxLength = 120 - 2 * indent;
if (null === serverProps)
return added(indent) + describeTextNode(clientText, maxLength) + "\n";
if ("string" === typeof serverProps) {
for (var firstDiff = 0; firstDiff < serverProps.length && firstDiff < clientText.length && serverProps.charCodeAt(firstDiff) === clientText.charCodeAt(firstDiff); firstDiff++) ;
firstDiff > maxLength - 8 && 10 < firstDiff && (clientText = "..." + clientText.slice(firstDiff - 8), serverProps = "..." + serverProps.slice(firstDiff - 8));
return added(indent) + describeTextNode(clientText, maxLength) + "\n" + removed(indent) + describeTextNode(serverProps, maxLength) + "\n";
}
return indentation(indent) + describeTextNode(clientText, maxLength) + "\n";
}
function objectName(object) {
return Object.prototype.toString.call(object).replace(/^\[object (.*)\]$/, function(m2, p0) {
return p0;
});
}
function describeValue(value, maxLength) {
switch (typeof value) {
case "string":
return value = JSON.stringify(value), value.length > maxLength ? 5 > maxLength ? '"..."' : value.slice(0, maxLength - 4) + '..."' : value;
case "object":
if (null === value) return "null";
if (isArrayImpl(value)) return "[...]";
if (value.$$typeof === REACT_ELEMENT_TYPE)
return (maxLength = getComponentNameFromType(value.type)) ? "<" + maxLength + ">" : "<...>";
var name2 = objectName(value);
if ("Object" === name2) {
name2 = "";
maxLength -= 2;
for (var propName in value)
if (value.hasOwnProperty(propName)) {
var jsonPropName = JSON.stringify(propName);
jsonPropName !== '"' + propName + '"' && (propName = jsonPropName);
maxLength -= propName.length - 2;
jsonPropName = describeValue(
value[propName],
15 > maxLength ? maxLength : 15
);
maxLength -= jsonPropName.length;
if (0 > maxLength) {
name2 += "" === name2 ? "..." : ", ...";
break;
}
name2 += ("" === name2 ? "" : ",") + propName + ":" + jsonPropName;
}
return "{" + name2 + "}";
}
return name2;
case "function":
return (maxLength = value.displayName || value.name) ? "function " + maxLength : "function";
default:
return String(value);
}
}
function describePropValue(value, maxLength) {
return "string" !== typeof value || needsEscaping.test(value) ? "{" + describeValue(value, maxLength - 2) + "}" : value.length > maxLength - 2 ? 5 > maxLength ? '"..."' : '"' + value.slice(0, maxLength - 5) + '..."' : '"' + value + '"';
}
function describeExpandedElement(type, props, rowPrefix) {
var remainingRowLength = 120 - rowPrefix.length - type.length, properties = [], propName;
for (propName in props)
if (props.hasOwnProperty(propName) && "children" !== propName) {
var propValue = describePropValue(
props[propName],
120 - rowPrefix.length - propName.length - 1
);
remainingRowLength -= propName.length + propValue.length + 2;
properties.push(propName + "=" + propValue);
}
return 0 === properties.length ? rowPrefix + "<" + type + ">\n" : 0 < remainingRowLength ? rowPrefix + "<" + type + " " + properties.join(" ") + ">\n" : rowPrefix + "<" + type + "\n" + rowPrefix + " " + properties.join("\n" + rowPrefix + " ") + "\n" + rowPrefix + ">\n";
}
function describePropertiesDiff(clientObject, serverObject, indent) {
var properties = "", remainingServerProperties = assign({}, serverObject), propName;
for (propName in clientObject)
if (clientObject.hasOwnProperty(propName)) {
delete remainingServerProperties[propName];
var maxLength = 120 - 2 * indent - propName.length - 2, clientPropValue = describeValue(clientObject[propName], maxLength);
serverObject.hasOwnProperty(propName) ? (maxLength = describeValue(serverObject[propName], maxLength), properties += added(indent) + propName + ": " + clientPropValue + "\n", properties += removed(indent) + propName + ": " + maxLength + "\n") : properties += added(indent) + propName + ": " + clientPropValue + "\n";
}
for (var _propName in remainingServerProperties)
remainingServerProperties.hasOwnProperty(_propName) && (clientObject = describeValue(
remainingServerProperties[_propName],
120 - 2 * indent - _propName.length - 2
), properties += removed(indent) + _propName + ": " + clientObject + "\n");
return properties;
}
function describeElementDiff(type, clientProps, serverProps, indent) {
var content = "", serverPropNames = /* @__PURE__ */ new Map();
for (propName$jscomp$0 in serverProps)
serverProps.hasOwnProperty(propName$jscomp$0) && serverPropNames.set(
propName$jscomp$0.toLowerCase(),
propName$jscomp$0
);
if (1 === serverPropNames.size && serverPropNames.has("children"))
content += describeExpandedElement(
type,
clientProps,
indentation(indent)
);
else {
for (var _propName2 in clientProps)
if (clientProps.hasOwnProperty(_propName2) && "children" !== _propName2) {
var maxLength$jscomp$0 = 120 - 2 * (indent + 1) - _propName2.length - 1, serverPropName = serverPropNames.get(_propName2.toLowerCase());
if (void 0 !== serverPropName) {
serverPropNames.delete(_propName2.toLowerCase());
var propName$jscomp$0 = clientProps[_propName2];
serverPropName = serverProps[serverPropName];
var clientPropValue = describePropValue(
propName$jscomp$0,
maxLength$jscomp$0
);
maxLength$jscomp$0 = describePropValue(
serverPropName,
maxLength$jscomp$0
);
"object" === typeof propName$jscomp$0 && null !== propName$jscomp$0 && "object" === typeof serverPropName && null !== serverPropName && "Object" === objectName(propName$jscomp$0) && "Object" === objectName(serverPropName) && (2 < Object.keys(propName$jscomp$0).length || 2 < Object.keys(serverPropName).length || -1 < clientPropValue.indexOf("...") || -1 < maxLength$jscomp$0.indexOf("...")) ? content += indentation(indent + 1) + _propName2 + "={{\n" + describePropertiesDiff(
propName$jscomp$0,
serverPropName,
indent + 2
) + indentation(indent + 1) + "}}\n" : (content += added(indent + 1) + _propName2 + "=" + clientPropValue + "\n", content += removed(indent + 1) + _propName2 + "=" + maxLength$jscomp$0 + "\n");
} else
content += indentation(indent + 1) + _propName2 + "=" + describePropValue(clientProps[_propName2], maxLength$jscomp$0) + "\n";
}
serverPropNames.forEach(function(propName) {
if ("children" !== propName) {
var maxLength = 120 - 2 * (indent + 1) - propName.length - 1;
content += removed(indent + 1) + propName + "=" + describePropValue(serverProps[propName], maxLength) + "\n";
}
});
content = "" === content ? indentation(indent) + "<" + type + ">\n" : indentation(indent) + "<" + type + "\n" + content + indentation(indent) + ">\n";
}
type = serverProps.children;
clientProps = clientProps.children;
if ("string" === typeof type || "number" === typeof type || "bigint" === typeof type) {
serverPropNames = "";
if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
serverPropNames = "" + clientProps;
content += describeTextDiff(serverPropNames, "" + type, indent + 1);
} else if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
content = null == type ? content + describeTextDiff("" + clientProps, null, indent + 1) : content + describeTextDiff("" + clientProps, void 0, indent + 1);
return content;
}
function describeSiblingFiber(fiber, indent) {
var type = describeFiberType(fiber);
if (null === type) {
type = "";
for (fiber = fiber.child; fiber; )
type += describeSiblingFiber(fiber, indent), fiber = fiber.sibling;
return type;
}
return indentation(indent) + "<" + type + ">\n";
}
function describeNode(node, indent) {
var skipToNode = findNotableNode(node, indent);
if (skipToNode !== node && (1 !== node.children.length || node.children[0] !== skipToNode))
return indentation(indent) + "...\n" + describeNode(skipToNode, indent + 1);
skipToNode = "";
var debugInfo = node.fiber._debugInfo;
if (debugInfo)
for (var i2 = 0; i2 < debugInfo.length; i2++) {
var serverComponentName = debugInfo[i2].name;
"string" === typeof serverComponentName && (skipToNode += indentation(indent) + "<" + serverComponentName + ">\n", indent++);
}
debugInfo = "";
i2 = node.fiber.pendingProps;
if (6 === node.fiber.tag)
debugInfo = describeTextDiff(i2, node.serverProps, indent), indent++;
else if (serverComponentName = describeFiberType(node.fiber), null !== serverComponentName)
if (void 0 === node.serverProps) {
debugInfo = indent;
var maxLength = 120 - 2 * debugInfo - serverComponentName.length - 2, content = "";
for (propName in i2)
if (i2.hasOwnProperty(propName) && "children" !== propName) {
var propValue = describePropValue(i2[propName], 15);
maxLength -= propName.length + propValue.length + 2;
if (0 > maxLength) {
content += " ...";
break;
}
content += " " + propName + "=" + propValue;
}
debugInfo = indentation(debugInfo) + "<" + serverComponentName + content + ">\n";
indent++;
} else
null === node.serverProps ? (debugInfo = describeExpandedElement(
serverComponentName,
i2,
added(indent)
), indent++) : "string" === typeof node.serverProps ? console.error(
"Should not have matched a non HostText fiber to a Text node. This is a bug in React."
) : (debugInfo = describeElementDiff(
serverComponentName,
i2,
node.serverProps,
indent
), indent++);
var propName = "";
i2 = node.fiber.child;
for (serverComponentName = 0; i2 && serverComponentName < node.children.length; )
maxLength = node.children[serverComponentName], maxLength.fiber === i2 ? (propName += describeNode(maxLength, indent), serverComponentName++) : propName += describeSiblingFiber(i2, indent), i2 = i2.sibling;
i2 && 0 < node.children.length && (propName += indentation(indent) + "...\n");
i2 = node.serverTail;
null === node.serverProps && indent--;
for (node = 0; node < i2.length; node++)
serverComponentName = i2[node], propName = "string" === typeof serverComponentName ? propName + (removed(indent) + describeTextNode(serverComponentName, 120 - 2 * indent) + "\n") : propName + describeExpandedElement(
serverComponentName.type,
serverComponentName.props,
removed(indent)
);
return skipToNode + debugInfo + propName;
}
function describeDiff(rootNode) {
try {
return "\n\n" + describeNode(rootNode, 0);
} catch (x2) {
return "";
}
}
function getCurrentFiberStackInDev() {
if (null === current) return "";
var workInProgress2 = current;
try {
var info = "";
6 === workInProgress2.tag && (workInProgress2 = workInProgress2.return);
switch (workInProgress2.tag) {
case 26:
case 27:
case 5:
info += describeBuiltInComponentFrame(workInProgress2.type);
break;
case 13:
info += describeBuiltInComponentFrame("Suspense");
break;
case 19:
info += describeBuiltInComponentFrame("SuspenseList");
break;
case 31:
info += describeBuiltInComponentFrame("Activity");
break;
case 30:
case 0:
case 15:
case 1:
workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
workInProgress2.type
));
break;
case 11:
workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
workInProgress2.type.render
));
}
for (; workInProgress2; )
if ("number" === typeof workInProgress2.tag) {
var fiber = workInProgress2;
workInProgress2 = fiber._debugOwner;
var debugStack = fiber._debugStack;
workInProgress2 && debugStack && ("string" !== typeof debugStack && (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), "" !== debugStack && (info += "\n" + debugStack));
} else if (null != workInProgress2.debugStack) {
var ownerStack = workInProgress2.debugStack;
(workInProgress2 = workInProgress2.owner) && ownerStack && (info += "\n" + formatOwnerStack(ownerStack));
} else break;
var JSCompiler_inline_result = info;
} catch (x2) {
JSCompiler_inline_result = "\nError generating stack: " + x2.message + "\n" + x2.stack;
}
return JSCompiler_inline_result;
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
setCurrentFiber(fiber);
try {
return null !== fiber && fiber._debugTask ? fiber._debugTask.run(
callback.bind(null, arg0, arg1, arg2, arg3, arg4)
) : callback(arg0, arg1, arg2, arg3, arg4);
} finally {
setCurrentFiber(previousFiber);
}
throw Error(
"runWithFiberInDEV should never be called in production. This is a bug in React."
);
}
function setCurrentFiber(fiber) {
ReactSharedInternals.getCurrentStack = null === fiber ? null : getCurrentFiberStackInDev;
isRendering = false;
current = fiber;
}
function buildHydrationDiffNode(fiber, distanceFromLeaf) {
if (null === fiber.return) {
if (null === hydrationDiffRootDEV)
hydrationDiffRootDEV = {
fiber,
children: [],
serverProps: void 0,
serverTail: [],
distanceFromLeaf
};
else {
if (hydrationDiffRootDEV.fiber !== fiber)
throw Error(
"Saw multiple hydration diff roots in a pass. This is a bug in React."
);
hydrationDiffRootDEV.distanceFromLeaf > distanceFromLeaf && (hydrationDiffRootDEV.distanceFromLeaf = distanceFromLeaf);
}
return hydrationDiffRootDEV;
}
var siblings = buildHydrationDiffNode(
fiber.return,
distanceFromLeaf + 1
).children;
if (0 < siblings.length && siblings[siblings.length - 1].fiber === fiber)
return siblings = siblings[siblings.length - 1], siblings.distanceFromLeaf > distanceFromLeaf && (siblings.distanceFromLeaf = distanceFromLeaf), siblings;
distanceFromLeaf = {
fiber,
children: [],
serverProps: void 0,
serverTail: [],
distanceFromLeaf
};
siblings.push(distanceFromLeaf);
return distanceFromLeaf;
}
function warnNonHydratedInstance(fiber, rejectedCandidate) {
didSuspendOrErrorDEV || (fiber = buildHydrationDiffNode(fiber, 0), fiber.serverProps = null, null !== rejectedCandidate && (rejectedCandidate = describeHydratableInstanceForDevWarnings(rejectedCandidate), fiber.serverTail.push(rejectedCandidate)));
}
function throwOnHydrationMismatch(fiber) {
var diff4 = "", diffRoot = hydrationDiffRootDEV;
null !== diffRoot && (hydrationDiffRootDEV = null, diff4 = describeDiff(diffRoot));
queueHydrationError(
createCapturedValueAtFiber(
Error(
"Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" + diff4
),
fiber
)
);
throw HydrationMismatchException;
}
function prepareToHydrateHostInstance(fiber, hostContext) {
if (!supportsHydration)
throw Error(
"Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
);
hydrateInstance(
fiber.stateNode,
fiber.type,
fiber.memoizedProps,
hostContext,
fiber
) || throwOnHydrationMismatch(fiber);
}
function popToNextHostParent(fiber) {
for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
switch (hydrationParentFiber.tag) {
case 5:
case 13:
rootOrSingletonContext = false;
return;
case 27:
case 3:
rootOrSingletonContext = true;
return;
default:
hydrationParentFiber = hydrationParentFiber.return;
}
}
function popHydrationState(fiber) {
if (!supportsHydration || fiber !== hydrationParentFiber) return false;
if (!isHydrating)
return popToNextHostParent(fiber), isHydrating = true, false;
var tag = fiber.tag;
supportsSingletons ? 3 !== tag && 27 !== tag && (5 !== tag || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps)) && nextHydratableInstance && (warnIfUnhydratedTailNodes(fiber), throwOnHydrationMismatch(fiber)) : 3 !== tag && (5 !== tag || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps)) && nextHydratableInstance && (warnIfUnhydratedTailNodes(fiber), throwOnHydrationMismatch(fiber));
popToNextHostParent(fiber);
if (13 === tag) {
if (!supportsHydration)
throw Error(
"Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
);
fiber = fiber.memoizedState;
fiber = null !== fiber ? fiber.dehydrated : null;
if (!fiber)
throw Error(
"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
);
nextHydratableInstance = getNextHydratableInstanceAfterSuspenseInstance(fiber);
} else
nextHydratableInstance = supportsSingletons && 27 === tag ? getNextHydratableSiblingAfterSingleton(
fiber.type,
nextHydratableInstance
) : hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
return true;
}
function warnIfUnhydratedTailNodes(fiber) {
for (var nextInstance = nextHydratableInstance; nextInstance; ) {
var diffNode = buildHydrationDiffNode(fiber, 0), description = describeHydratableInstanceForDevWarnings(nextInstance);
diffNode.serverTail.push(description);
nextInstance = "Suspense" === description.type ? getNextHydratableInstanceAfterSuspenseInstance(nextInstance) : getNextHydratableSibling(nextInstance);
}
}
function resetHydrationState() {
supportsHydration && (nextHydratableInstance = hydrationParentFiber = null, didSuspendOrErrorDEV = isHydrating = false);
}
function upgradeHydrationErrorsToRecoverable() {
var queuedErrors = hydrationErrors;
null !== queuedErrors && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply(
workInProgressRootRecoverableErrors,
queuedErrors
), hydrationErrors = null);
return queuedErrors;
}
function queueHydrationError(error) {
null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error);
}
function emitPendingHydrationWarnings() {
var diffRoot = hydrationDiffRootDEV;
if (null !== diffRoot) {
hydrationDiffRootDEV = null;
for (var diff4 = describeDiff(diffRoot); 0 < diffRoot.children.length; )
diffRoot = diffRoot.children[0];
runWithFiberInDEV(diffRoot.fiber, function() {
console.error(
"A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s",
"https://react.dev/link/hydration-mismatch",
diff4
);
});
}
}
function is(x2, y) {
return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
}
function resetContextDependencies() {
lastContextDependency = currentlyRenderingFiber$1 = null;
isDisallowedContextReadInDEV = false;
}
function pushProvider(providerFiber, context2, nextValue) {
isPrimaryRenderer ? (push(valueCursor, context2._currentValue, providerFiber), context2._currentValue = nextValue, push(rendererCursorDEV, context2._currentRenderer, providerFiber), void 0 !== context2._currentRenderer && null !== context2._currentRenderer && context2._currentRenderer !== rendererSigil && console.error(
"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
), context2._currentRenderer = rendererSigil) : (push(valueCursor, context2._currentValue2, providerFiber), context2._currentValue2 = nextValue, push(renderer2CursorDEV, context2._currentRenderer2, providerFiber), void 0 !== context2._currentRenderer2 && null !== context2._currentRenderer2 && context2._currentRenderer2 !== rendererSigil && console.error(
"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
), context2._currentRenderer2 = rendererSigil);
}
function popProvider(context2, providerFiber) {
var currentValue = valueCursor.current;
isPrimaryRenderer ? (context2._currentValue = currentValue, currentValue = rendererCursorDEV.current, pop(rendererCursorDEV, providerFiber), context2._currentRenderer = currentValue) : (context2._currentValue2 = currentValue, currentValue = renderer2CursorDEV.current, pop(renderer2CursorDEV, providerFiber), context2._currentRenderer2 = currentValue);
pop(valueCursor, providerFiber);
}
function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) {
for (; null !== parent; ) {
var alternate = parent.alternate;
(parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2);
if (parent === propagationRoot) break;
parent = parent.return;
}
parent !== propagationRoot && console.error(
"Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue."
);
}
function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) {
var fiber = workInProgress2.child;
null !== fiber && (fiber.return = workInProgress2);
for (; null !== fiber; ) {
var list = fiber.dependencies;
if (null !== list) {
var nextFiber = fiber.child;
list = list.firstContext;
a: for (; null !== list; ) {
var dependency = list;
list = fiber;
for (var i2 = 0; i2 < contexts.length; i2++)
if (dependency.context === contexts[i2]) {
list.lanes |= renderLanes2;
dependency = list.alternate;
null !== dependency && (dependency.lanes |= renderLanes2);
scheduleContextWorkOnParentPath(
list.return,
renderLanes2,
workInProgress2
);
forcePropagateEntireTree || (nextFiber = null);
break a;
}
list = dependency.next;
}
} else if (18 === fiber.tag) {
nextFiber = fiber.return;
if (null === nextFiber)
throw Error(
"We just came from a parent so we must have had a parent. This is a bug in React."
);
nextFiber.lanes |= renderLanes2;
list = nextFiber.alternate;
null !== list && (list.lanes |= renderLanes2);
scheduleContextWorkOnParentPath(
nextFiber,
renderLanes2,
workInProgress2
);
nextFiber = null;
} else nextFiber = fiber.child;
if (null !== nextFiber) nextFiber.return = fiber;
else
for (nextFiber = fiber; null !== nextFiber; ) {
if (nextFiber === workInProgress2) {
nextFiber = null;
break;
}
fiber = nextFiber.sibling;
if (null !== fiber) {
fiber.return = nextFiber.return;
nextFiber = fiber;
break;
}
nextFiber = nextFiber.return;
}
fiber = nextFiber;
}
}
function propagateParentContextChanges(current2, workInProgress2, renderLanes2, forcePropagateEntireTree) {
current2 = null;
for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) {
if (!isInsidePropagationBailout) {
if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true;
else if (0 !== (parent.flags & 262144)) break;
}
if (10 === parent.tag) {
var currentParent = parent.alternate;
if (null === currentParent)
throw Error("Should have a current fiber. This is a bug in React.");
currentParent = currentParent.memoizedProps;
if (null !== currentParent) {
var context2 = parent.type;
objectIs(parent.pendingProps.value, currentParent.value) || (null !== current2 ? current2.push(context2) : current2 = [context2]);
}
} else if (parent === hostTransitionProviderCursor.current) {
currentParent = parent.alternate;
if (null === currentParent)
throw Error("Should have a current fiber. This is a bug in React.");
currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current2 ? current2.push(HostTransitionContext) : current2 = [HostTransitionContext]);
}
parent = parent.return;
}
null !== current2 && propagateContextChanges(
workInProgress2,
current2,
renderLanes2,
forcePropagateEntireTree
);
workInProgress2.flags |= 262144;
}
function checkIfContextChanged(currentDependencies) {
for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) {
var context2 = currentDependencies.context;
if (!objectIs(
isPrimaryRenderer ? context2._currentValue : context2._currentValue2,
currentDependencies.memoizedValue
))
return true;
currentDependencies = currentDependencies.next;
}
return false;
}
function prepareToReadContext(workInProgress2) {
currentlyRenderingFiber$1 = workInProgress2;
lastContextDependency = null;
workInProgress2 = workInProgress2.dependencies;
null !== workInProgress2 && (workInProgress2.firstContext = null);
}
function readContext(context2) {
isDisallowedContextReadInDEV && console.error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
return readContextForConsumer(currentlyRenderingFiber$1, context2);
}
function readContextDuringReconciliation(consumer, context2) {
null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
return readContextForConsumer(consumer, context2);
}
function readContextForConsumer(consumer, context2) {
var value = isPrimaryRenderer ? context2._currentValue : context2._currentValue2;
context2 = { context: context2, memoizedValue: value, next: null };
if (null === lastContextDependency) {
if (null === consumer)
throw Error(
"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
);
lastContextDependency = context2;
consumer.dependencies = {
lanes: 0,
firstContext: context2,
_debugThenableState: null
};
consumer.flags |= 524288;
} else lastContextDependency = lastContextDependency.next = context2;
return value;
}
function createCache() {
return {
controller: new AbortControllerLocal(),
data: /* @__PURE__ */ new Map(),
refCount: 0
};
}
function retainCache(cache4) {
cache4.controller.signal.aborted && console.warn(
"A cache instance was retained after it was already freed. This likely indicates a bug in React."
);
cache4.refCount++;
}
function releaseCache(cache4) {
cache4.refCount--;
0 > cache4.refCount && console.warn(
"A cache instance was released after it was already freed. This likely indicates a bug in React."
);
0 === cache4.refCount && scheduleCallback$2(NormalPriority, function() {
cache4.controller.abort();
});
}
function pushNestedEffectDurations() {
var prevEffectDuration = profilerEffectDuration;
profilerEffectDuration = 0;
return prevEffectDuration;
}
function popNestedEffectDurations(prevEffectDuration) {
var elapsedTime = profilerEffectDuration;
profilerEffectDuration = prevEffectDuration;
return elapsedTime;
}
function bubbleNestedEffectDurations(prevEffectDuration) {
var elapsedTime = profilerEffectDuration;
profilerEffectDuration += prevEffectDuration;
return elapsedTime;
}
function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
fiber.selfBaseDuration = elapsedTime;
profilerStartTime = -1;
}
}
function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
profilerStartTime = -1;
}
}
function recordEffectDuration() {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
profilerStartTime = -1;
profilerEffectDuration += elapsedTime;
}
}
function startEffectTimer() {
profilerStartTime = now();
}
function transferActualDuration(fiber) {
for (var child = fiber.child; child; )
fiber.actualDuration += child.actualDuration, child = child.sibling;
}
function ensureRootIsScheduled(root) {
root !== lastScheduledRoot && null === root.next && (null === lastScheduledRoot ? firstScheduledRoot = lastScheduledRoot = root : lastScheduledRoot = lastScheduledRoot.next = root);
mightHavePendingSyncWork = true;
null !== ReactSharedInternals.actQueue ? didScheduleMicrotask_act || (didScheduleMicrotask_act = true, scheduleImmediateRootScheduleTask()) : didScheduleMicrotask || (didScheduleMicrotask = true, scheduleImmediateRootScheduleTask());
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
isFlushingWork = true;
do {
var didPerformSomeWork = false;
for (var root = firstScheduledRoot; null !== root; ) {
if (!onlyLegacy)
if (0 !== syncTransitionLanes) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) var nextLanes = 0;
else {
var suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes;
nextLanes = (1 << 31 - clz32(42 | syncTransitionLanes) + 1) - 1;
nextLanes &= pendingLanes & ~(suspendedLanes & ~pingedLanes);
nextLanes = nextLanes & 201326741 ? nextLanes & 201326741 | 1 : nextLanes ? nextLanes | 2 : 0;
}
0 !== nextLanes && (didPerformSomeWork = true, performSyncWorkOnRoot(root, nextLanes));
} else
nextLanes = workInProgressRootRenderLanes, nextLanes = getNextLanes(
root,
root === workInProgressRoot ? nextLanes : 0,
null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || (didPerformSomeWork = true, performSyncWorkOnRoot(root, nextLanes));
root = root.next;
}
} while (didPerformSomeWork);
isFlushingWork = false;
}
}
function processRootScheduleInImmediateTask() {
processRootScheduleInMicrotask();
}
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork = didScheduleMicrotask_act = didScheduleMicrotask = false;
var syncTransitionLanes = 0;
0 !== currentEventTransitionLane && (shouldAttemptEagerTransition() && (syncTransitionLanes = currentEventTransitionLane), currentEventTransitionLane = 0);
for (var currentTime = now$1(), prev = null, root = firstScheduledRoot; null !== root; ) {
var next = root.next, nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);
if (0 === nextLanes)
root.next = null, null === prev ? firstScheduledRoot = next : prev.next = next, null === next && (lastScheduledRoot = prev);
else if (prev = root, 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
mightHavePendingSyncWork = true;
root = next;
}
flushSyncWorkAcrossRoots_impl(syncTransitionLanes, false);
}
function scheduleTaskForRootDuringMicrotask(root, currentTime) {
for (var suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes, expirationTimes = root.expirationTimes, lanes = root.pendingLanes & -62914561; 0 < lanes; ) {
var index = 31 - clz32(lanes), lane = 1 << index, expirationTime = expirationTimes[index];
if (-1 === expirationTime) {
if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
expirationTimes[index] = computeExpirationTime(lane, currentTime);
} else expirationTime <= currentTime && (root.expiredLanes |= lane);
lanes &= ~lane;
}
currentTime = workInProgressRoot;
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
root === currentTime ? suspendedLanes : 0,
null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
pingedLanes = root.callbackNode;
if (0 === suspendedLanes || root === currentTime && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root.cancelPendingCommit)
return null !== pingedLanes && cancelCallback(pingedLanes), root.callbackNode = null, root.callbackPriority = 0;
if (0 === (suspendedLanes & 3) || checkIfRootIsPrerendering(root, suspendedLanes)) {
currentTime = suspendedLanes & -suspendedLanes;
if (currentTime !== root.callbackPriority || null !== ReactSharedInternals.actQueue && pingedLanes !== fakeActCallbackNode$1)
cancelCallback(pingedLanes);
else return currentTime;
switch (lanesToEventPriority(suspendedLanes)) {
case 2:
case 8:
suspendedLanes = UserBlockingPriority;
break;
case 32:
suspendedLanes = NormalPriority$1;
break;
case 268435456:
suspendedLanes = IdlePriority;
break;
default:
suspendedLanes = NormalPriority$1;
}
pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), suspendedLanes = fakeActCallbackNode$1) : suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
root.callbackPriority = currentTime;
root.callbackNode = suspendedLanes;
return currentTime;
}
null !== pingedLanes && cancelCallback(pingedLanes);
root.callbackPriority = 2;
root.callbackNode = null;
return 2;
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = false;
if (pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE)
return root.callbackNode = null, root.callbackPriority = 0, null;
var originalCallbackNode = root.callbackNode;
if (flushPendingEffects(true) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(
root,
workInProgressRootRenderLanes$jscomp$0,
didTimeout
);
scheduleTaskForRootDuringMicrotask(root, now$1());
return null != root.callbackNode && root.callbackNode === originalCallbackNode ? performWorkOnRootViaSchedulerTask.bind(null, root) : null;
}
function performSyncWorkOnRoot(root, lanes) {
if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = false;
performWorkOnRoot(root, lanes, true);
}
function cancelCallback(callbackNode) {
callbackNode !== fakeActCallbackNode$1 && null !== callbackNode && cancelCallback$1(callbackNode);
}
function scheduleImmediateRootScheduleTask() {
null !== ReactSharedInternals.actQueue && ReactSharedInternals.actQueue.push(function() {
processRootScheduleInMicrotask();
return null;
});
supportsMicrotasks ? scheduleMicrotask(function() {
(executionContext & (RenderContext | CommitContext)) !== NoContext ? scheduleCallback$3(
ImmediatePriority,
processRootScheduleInImmediateTask
) : processRootScheduleInMicrotask();
}) : scheduleCallback$3(
ImmediatePriority,
processRootScheduleInImmediateTask
);
}
function requestTransitionLane() {
0 === currentEventTransitionLane && (currentEventTransitionLane = claimNextTransitionLane());
return currentEventTransitionLane;
}
function entangleAsyncAction(transition, thenable) {
if (null === currentEntangledListeners) {
var entangledListeners = currentEntangledListeners = [];
currentEntangledPendingCount = 0;
currentEntangledLane = requestTransitionLane();
currentEntangledActionThenable = {
status: "pending",
value: void 0,
then: function(resolve18) {
entangledListeners.push(resolve18);
}
};
}
currentEntangledPendingCount++;
thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
return thenable;
}
function pingEngtangledActionScope() {
if (0 === --currentEntangledPendingCount && null !== currentEntangledListeners) {
null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled");
var listeners = currentEntangledListeners;
currentEntangledListeners = null;
currentEntangledLane = 0;
currentEntangledActionThenable = null;
for (var i2 = 0; i2 < listeners.length; i2++) (0, listeners[i2])();
}
}
function chainThenableValue(thenable, result) {
var listeners = [], thenableWithOverride = {
status: "pending",
value: null,
reason: null,
then: function(resolve18) {
listeners.push(resolve18);
}
};
thenable.then(
function() {
thenableWithOverride.status = "fulfilled";
thenableWithOverride.value = result;
for (var i2 = 0; i2 < listeners.length; i2++) (0, listeners[i2])(result);
},
function(error) {
thenableWithOverride.status = "rejected";
thenableWithOverride.reason = error;
for (error = 0; error < listeners.length; error++)
(0, listeners[error])(void 0);
}
);
return thenableWithOverride;
}
function peekCacheFromPool() {
var cacheResumedFromPreviousRender = resumedCache.current;
return null !== cacheResumedFromPreviousRender ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache;
}
function pushTransition(offscreenWorkInProgress, prevCachePool) {
null === prevCachePool ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);
}
function getSuspendedCache() {
var cacheFromPool = peekCacheFromPool();
return null === cacheFromPool ? null : {
parent: isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2,
pool: cacheFromPool
};
}
function shallowEqual(objA, objB) {
if (objectIs(objA, objB)) return true;
if ("object" !== typeof objA || null === objA || "object" !== typeof objB || null === objB)
return false;
var keysA = Object.keys(objA), keysB = Object.keys(objB);
if (keysA.length !== keysB.length) return false;
for (keysB = 0; keysB < keysA.length; keysB++) {
var currentKey = keysA[keysB];
if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey]))
return false;
}
return true;
}
function createThenableState() {
return { didWarnAboutUncachedPromise: false, thenables: [] };
}
function isThenableResolved(thenable) {
thenable = thenable.status;
return "fulfilled" === thenable || "rejected" === thenable;
}
function noop$1() {
}
function trackUsedThenable(thenableState2, thenable, index) {
null !== ReactSharedInternals.actQueue && (ReactSharedInternals.didUsePromise = true);
var trackedThenables = thenableState2.thenables;
index = trackedThenables[index];
void 0 === index ? trackedThenables.push(thenable) : index !== thenable && (thenableState2.didWarnAboutUncachedPromise || (thenableState2.didWarnAboutUncachedPromise = true, console.error(
"A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework."
)), thenable.then(noop$1, noop$1), thenable = index);
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
default:
if ("string" === typeof thenable.status)
thenable.then(noop$1, noop$1);
else {
thenableState2 = workInProgressRoot;
if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter)
throw Error(
"An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
);
thenableState2 = thenable;
thenableState2.status = "pending";
thenableState2.then(
function(fulfilledValue) {
if ("pending" === thenable.status) {
var fulfilledThenable = thenable;
fulfilledThenable.status = "fulfilled";
fulfilledThenable.value = fulfilledValue;
}
},
function(error) {
if ("pending" === thenable.status) {
var rejectedThenable = thenable;
rejectedThenable.status = "rejected";
rejectedThenable.reason = error;
}
}
);
}
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
}
suspendedThenable = thenable;
needsToResetSuspendedThenableDEV = true;
throw SuspenseException;
}
}
function getSuspendedThenable() {
if (null === suspendedThenable)
throw Error(
"Expected a suspended thenable. This is a bug in React. Please file an issue."
);
var thenable = suspendedThenable;
suspendedThenable = null;
needsToResetSuspendedThenableDEV = false;
return thenable;
}
function checkIfUseWrappedInAsyncCatch(rejectedReason) {
if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException)
throw Error(
"Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
);
}
function finishQueueingConcurrentUpdates() {
for (var endIndex = concurrentQueuesIndex, i2 = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i2 < endIndex; ) {
var fiber = concurrentQueues[i2];
concurrentQueues[i2++] = null;
var queue = concurrentQueues[i2];
concurrentQueues[i2++] = null;
var update = concurrentQueues[i2];
concurrentQueues[i2++] = null;
var lane = concurrentQueues[i2];
concurrentQueues[i2++] = null;
if (null !== queue && null !== update) {
var pending = queue.pending;
null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
queue.pending = update;
}
0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
}
}
function enqueueUpdate$1(fiber, queue, update, lane) {
concurrentQueues[concurrentQueuesIndex++] = fiber;
concurrentQueues[concurrentQueuesIndex++] = queue;
concurrentQueues[concurrentQueuesIndex++] = update;
concurrentQueues[concurrentQueuesIndex++] = lane;
concurrentlyUpdatedLanes |= lane;
fiber.lanes |= lane;
fiber = fiber.alternate;
null !== fiber && (fiber.lanes |= lane);
}
function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
enqueueUpdate$1(fiber, queue, update, lane);
return getRootForUpdatedFiber(fiber);
}
function enqueueConcurrentRenderForLane(fiber, lane) {
enqueueUpdate$1(fiber, null, null, lane);
return getRootForUpdatedFiber(fiber);
}
function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
sourceFiber.lanes |= lane;
var alternate = sourceFiber.alternate;
null !== alternate && (alternate.lanes |= lane);
for (var isHidden2 = false, parent = sourceFiber.return; null !== parent; )
parent.childLanes |= lane, alternate = parent.alternate, null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && (sourceFiber = parent.stateNode, null === sourceFiber || sourceFiber._visibility & 1 || (isHidden2 = true)), sourceFiber = parent, parent = parent.return;
return 3 === sourceFiber.tag ? (parent = sourceFiber.stateNode, isHidden2 && null !== update && (isHidden2 = 31 - clz32(lane), sourceFiber = parent.hiddenUpdates, alternate = sourceFiber[isHidden2], null === alternate ? sourceFiber[isHidden2] = [update] : alternate.push(update), update.lane = lane | 536870912), parent) : null;
}
function getRootForUpdatedFiber(sourceFiber) {
if (nestedUpdateCount > NESTED_UPDATE_LIMIT)
throw nestedPassiveUpdateCount = nestedUpdateCount = 0, rootWithPassiveNestedUpdates = rootWithNestedUpdates = null, Error(
"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."
);
nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, console.error(
"Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."
));
null === sourceFiber.alternate && 0 !== (sourceFiber.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
for (var node = sourceFiber, parent = node.return; null !== parent; )
null === node.alternate && 0 !== (node.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), node = parent, parent = node.return;
return 3 === node.tag ? node.stateNode : null;
}
function initializeUpdateQueue(fiber) {
fiber.updateQueue = {
baseState: fiber.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: { pending: null, lanes: 0, hiddenCallbacks: null },
callbacks: null
};
}
function cloneUpdateQueue(current2, workInProgress2) {
current2 = current2.updateQueue;
workInProgress2.updateQueue === current2 && (workInProgress2.updateQueue = {
baseState: current2.baseState,
firstBaseUpdate: current2.firstBaseUpdate,
lastBaseUpdate: current2.lastBaseUpdate,
shared: current2.shared,
callbacks: null
});
}
function createUpdate(lane) {
return {
lane,
tag: UpdateState,
payload: null,
callback: null,
next: null
};
}
function enqueueUpdate(fiber, update, lane) {
var updateQueue = fiber.updateQueue;
if (null === updateQueue) return null;
updateQueue = updateQueue.shared;
if (currentlyProcessingQueue === updateQueue && !didWarnUpdateInsideUpdate) {
var componentName2 = getComponentNameFromFiber(fiber);
console.error(
"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s",
componentName2
);
didWarnUpdateInsideUpdate = true;
}
if ((executionContext & RenderContext) !== NoContext)
return componentName2 = updateQueue.pending, null === componentName2 ? update.next = update : (update.next = componentName2.next, componentName2.next = update), updateQueue.pending = update, update = getRootForUpdatedFiber(fiber), markUpdateLaneFromFiberToRoot(fiber, null, lane), update;
enqueueUpdate$1(fiber, updateQueue, update, lane);
return getRootForUpdatedFiber(fiber);
}
function entangleTransitions(root, fiber, lane) {
fiber = fiber.updateQueue;
if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194048))) {
var queueLanes = fiber.lanes;
queueLanes &= root.pendingLanes;
lane |= queueLanes;
fiber.lanes = lane;
markRootEntangled(root, lane);
}
}
function enqueueCapturedUpdate(workInProgress2, capturedUpdate) {
var queue = workInProgress2.updateQueue, current2 = workInProgress2.alternate;
if (null !== current2 && (current2 = current2.updateQueue, queue === current2)) {
var newFirst = null, newLast = null;
queue = queue.firstBaseUpdate;
if (null !== queue) {
do {
var clone2 = {
lane: queue.lane,
tag: queue.tag,
payload: queue.payload,
callback: null,
next: null
};
null === newLast ? newFirst = newLast = clone2 : newLast = newLast.next = clone2;
queue = queue.next;
} while (null !== queue);
null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate;
} else newFirst = newLast = capturedUpdate;
queue = {
baseState: current2.baseState,
firstBaseUpdate: newFirst,
lastBaseUpdate: newLast,
shared: current2.shared,
callbacks: current2.callbacks
};
workInProgress2.updateQueue = queue;
return;
}
workInProgress2 = queue.lastBaseUpdate;
null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate;
queue.lastBaseUpdate = capturedUpdate;
}
function suspendIfUpdateReadFromEntangledAsyncAction() {
if (didReadFromEntangledAsyncAction) {
var entangledActionThenable = currentEntangledActionThenable;
if (null !== entangledActionThenable) throw entangledActionThenable;
}
}
function processUpdateQueue(workInProgress2, props, instance$jscomp$0, renderLanes2) {
didReadFromEntangledAsyncAction = false;
var queue = workInProgress2.updateQueue;
hasForceUpdate = false;
currentlyProcessingQueue = queue.shared;
var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending;
if (null !== pendingQueue) {
queue.shared.pending = null;
var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next;
lastPendingUpdate.next = null;
null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate;
lastBaseUpdate = lastPendingUpdate;
var current2 = workInProgress2.alternate;
null !== current2 && (current2 = current2.updateQueue, pendingQueue = current2.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current2.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current2.lastBaseUpdate = lastPendingUpdate));
}
if (null !== firstBaseUpdate) {
var newState = queue.baseState;
lastBaseUpdate = 0;
current2 = firstPendingUpdate = lastPendingUpdate = null;
pendingQueue = firstBaseUpdate;
do {
var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane;
if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) {
0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true);
null !== current2 && (current2 = current2.next = {
lane: 0,
tag: pendingQueue.tag,
payload: pendingQueue.payload,
callback: null,
next: null
});
a: {
updateLane = workInProgress2;
var partialState = pendingQueue;
var nextProps = props, instance2 = instance$jscomp$0;
switch (partialState.tag) {
case ReplaceState:
partialState = partialState.payload;
if ("function" === typeof partialState) {
isDisallowedContextReadInDEV = true;
var nextState = partialState.call(
instance2,
newState,
nextProps
);
if (updateLane.mode & 8) {
setIsStrictModeForDevtools(true);
try {
partialState.call(instance2, newState, nextProps);
} finally {
setIsStrictModeForDevtools(false);
}
}
isDisallowedContextReadInDEV = false;
newState = nextState;
break a;
}
newState = partialState;
break a;
case CaptureUpdate:
updateLane.flags = updateLane.flags & -65537 | 128;
case UpdateState:
nextState = partialState.payload;
if ("function" === typeof nextState) {
isDisallowedContextReadInDEV = true;
partialState = nextState.call(
instance2,
newState,
nextProps
);
if (updateLane.mode & 8) {
setIsStrictModeForDevtools(true);
try {
nextState.call(instance2, newState, nextProps);
} finally {
setIsStrictModeForDevtools(false);
}
}
isDisallowedContextReadInDEV = false;
} else partialState = nextState;
if (null === partialState || void 0 === partialState) break a;
newState = assign({}, newState, partialState);
break a;
case ForceUpdate:
hasForceUpdate = true;
}
}
updateLane = pendingQueue.callback;
null !== updateLane && (workInProgress2.flags |= 64, isHiddenUpdate && (workInProgress2.flags |= 8192), isHiddenUpdate = queue.callbacks, null === isHiddenUpdate ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane));
} else
isHiddenUpdate = {
lane: updateLane,
tag: pendingQueue.tag,
payload: pendingQueue.payload,
callback: pendingQueue.callback,
next: null
}, null === current2 ? (firstPendingUpdate = current2 = isHiddenUpdate, lastPendingUpdate = newState) : current2 = current2.next = isHiddenUpdate, lastBaseUpdate |= updateLane;
pendingQueue = pendingQueue.next;
if (null === pendingQueue)
if (pendingQueue = queue.shared.pending, null === pendingQueue)
break;
else
isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null;
} while (1);
null === current2 && (lastPendingUpdate = newState);
queue.baseState = lastPendingUpdate;
queue.firstBaseUpdate = firstPendingUpdate;
queue.lastBaseUpdate = current2;
null === firstBaseUpdate && (queue.shared.lanes = 0);
workInProgressRootSkippedLanes |= lastBaseUpdate;
workInProgress2.lanes = lastBaseUpdate;
workInProgress2.memoizedState = newState;
}
currentlyProcessingQueue = null;
}
function callCallback(callback, context2) {
if ("function" !== typeof callback)
throw Error(
"Invalid argument passed as callback. Expected a function. Instead received: " + callback
);
callback.call(context2);
}
function commitHiddenCallbacks(updateQueue, context2) {
var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;
if (null !== hiddenCallbacks)
for (updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; updateQueue < hiddenCallbacks.length; updateQueue++)
callCallback(hiddenCallbacks[updateQueue], context2);
}
function commitCallbacks(updateQueue, context2) {
var callbacks = updateQueue.callbacks;
if (null !== callbacks)
for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++)
callCallback(callbacks[updateQueue], context2);
}
function pushHiddenContext(fiber, context2) {
var prevEntangledRenderLanes = entangledRenderLanes;
push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber);
push(currentTreeHiddenStackCursor, context2, fiber);
entangledRenderLanes = prevEntangledRenderLanes | context2.baseLanes;
}
function reuseHiddenContextOnStack(fiber) {
push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber);
push(
currentTreeHiddenStackCursor,
currentTreeHiddenStackCursor.current,
fiber
);
}
function popHiddenContext(fiber) {
entangledRenderLanes = prevEntangledRenderLanesCursor.current;
pop(currentTreeHiddenStackCursor, fiber);
pop(prevEntangledRenderLanesCursor, fiber);
}
function mountHookTypesDev() {
var hookName = currentHookNameInDev;
null === hookTypesDev ? hookTypesDev = [hookName] : hookTypesDev.push(hookName);
}
function updateHookTypesDev() {
var hookName = currentHookNameInDev;
if (null !== hookTypesDev && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName)) {
var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
if (!didWarnAboutMismatchedHooksForComponent.has(componentName2) && (didWarnAboutMismatchedHooksForComponent.add(componentName2), null !== hookTypesDev)) {
for (var table = "", i2 = 0; i2 <= hookTypesUpdateIndexDev; i2++) {
var oldHookName = hookTypesDev[i2], newHookName = i2 === hookTypesUpdateIndexDev ? hookName : oldHookName;
for (oldHookName = i2 + 1 + ". " + oldHookName; 30 > oldHookName.length; )
oldHookName += " ";
oldHookName += newHookName + "\n";
table += oldHookName;
}
console.error(
"React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
componentName2,
table
);
}
}
}
function checkDepsAreArrayDev(deps) {
void 0 === deps || null === deps || isArrayImpl(deps) || console.error(
"%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",
currentHookNameInDev,
typeof deps
);
}
function warnOnUseFormStateInDev() {
var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
didWarnAboutUseFormState.has(componentName2) || (didWarnAboutUseFormState.add(componentName2), console.error(
"ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",
componentName2
));
}
function throwInvalidHookError() {
throw Error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
}
function areHookInputsEqual(nextDeps, prevDeps) {
if (ignorePreviousDependencies) return false;
if (null === prevDeps)
return console.error(
"%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",
currentHookNameInDev
), false;
nextDeps.length !== prevDeps.length && console.error(
"The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",
currentHookNameInDev,
"[" + prevDeps.join(", ") + "]",
"[" + nextDeps.join(", ") + "]"
);
for (var i2 = 0; i2 < prevDeps.length && i2 < nextDeps.length; i2++)
if (!objectIs(nextDeps[i2], prevDeps[i2])) return false;
return true;
}
function renderWithHooks(current2, workInProgress2, Component, props, secondArg, nextRenderLanes) {
renderLanes = nextRenderLanes;
currentlyRenderingFiber = workInProgress2;
hookTypesDev = null !== current2 ? current2._debugHookTypes : null;
hookTypesUpdateIndexDev = -1;
ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
if ("[object AsyncFunction]" === Object.prototype.toString.call(Component) || "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component))
nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), console.error(
"%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
null === nextRenderLanes ? "An unknown Component" : "<" + nextRenderLanes + ">"
));
workInProgress2.memoizedState = null;
workInProgress2.updateQueue = null;
workInProgress2.lanes = 0;
ReactSharedInternals.H = null !== current2 && null !== current2.memoizedState ? HooksDispatcherOnUpdateInDEV : null !== hookTypesDev ? HooksDispatcherOnMountWithHookTypesInDEV : HooksDispatcherOnMountInDEV;
shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = (workInProgress2.mode & 8) !== NoMode;
var children = callComponentInDEV(Component, props, secondArg);
shouldDoubleInvokeUserFnsInHooksDEV = false;
didScheduleRenderPhaseUpdateDuringThisPass && (children = renderWithHooksAgain(
workInProgress2,
Component,
props,
secondArg
));
if (nextRenderLanes) {
setIsStrictModeForDevtools(true);
try {
children = renderWithHooksAgain(
workInProgress2,
Component,
props,
secondArg
);
} finally {
setIsStrictModeForDevtools(false);
}
}
finishRenderingHooks(current2, workInProgress2);
return children;
}
function finishRenderingHooks(current2, workInProgress2) {
workInProgress2._debugHookTypes = hookTypesDev;
null === workInProgress2.dependencies ? null !== thenableState$1 && (workInProgress2.dependencies = {
lanes: 0,
firstContext: null,
_debugThenableState: thenableState$1
}) : workInProgress2.dependencies._debugThenableState = thenableState$1;
ReactSharedInternals.H = ContextOnlyDispatcher;
var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
renderLanes = 0;
hookTypesDev = currentHookNameInDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
hookTypesUpdateIndexDev = -1;
null !== current2 && (current2.flags & 65011712) !== (workInProgress2.flags & 65011712) && console.error(
"Internal React error: Expected static flag was missing. Please notify the React team."
);
didScheduleRenderPhaseUpdate = false;
thenableIndexCounter$1 = 0;
thenableState$1 = null;
if (didRenderTooFewHooks)
throw Error(
"Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
);
null === current2 || didReceiveUpdate || (current2 = current2.dependencies, null !== current2 && checkIfContextChanged(current2) && (didReceiveUpdate = true));
needsToResetSuspendedThenableDEV ? (needsToResetSuspendedThenableDEV = false, current2 = true) : current2 = false;
current2 && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Unknown", didWarnAboutUseWrappedInTryCatch.has(workInProgress2) || didWarnAboutAsyncClientComponent.has(workInProgress2) || (didWarnAboutUseWrappedInTryCatch.add(workInProgress2), console.error(
"`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary."
)));
}
function renderWithHooksAgain(workInProgress2, Component, props, secondArg) {
currentlyRenderingFiber = workInProgress2;
var numberOfReRenders = 0;
do {
didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null);
thenableIndexCounter$1 = 0;
didScheduleRenderPhaseUpdateDuringThisPass = false;
if (numberOfReRenders >= RE_RENDER_LIMIT)
throw Error(
"Too many re-renders. React limits the number of renders to prevent an infinite loop."
);
numberOfReRenders += 1;
ignorePreviousDependencies = false;
workInProgressHook = currentHook = null;
if (null != workInProgress2.updateQueue) {
var children = workInProgress2.updateQueue;
children.lastEffect = null;
children.events = null;
children.stores = null;
null != children.memoCache && (children.memoCache.index = 0);
}
hookTypesUpdateIndexDev = -1;
ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV;
children = callComponentInDEV(Component, props, secondArg);
} while (didScheduleRenderPhaseUpdateDuringThisPass);
return children;
}
function TransitionAwareHostComponent() {
var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0];
maybeThenable = "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable;
dispatcher = dispatcher.useState()[0];
(null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024);
return maybeThenable;
}
function checkDidRenderIdHook() {
var didRenderIdHook = 0 !== localIdCounter;
localIdCounter = 0;
return didRenderIdHook;
}
function bailoutHooks(current2, workInProgress2, lanes) {
workInProgress2.updateQueue = current2.updateQueue;
workInProgress2.flags = (workInProgress2.mode & 16) !== NoMode ? workInProgress2.flags & -402655237 : workInProgress2.flags & -2053;
current2.lanes &= ~lanes;
}
function resetHooksOnUnwind(workInProgress2) {
if (didScheduleRenderPhaseUpdate) {
for (workInProgress2 = workInProgress2.memoizedState; null !== workInProgress2; ) {
var queue = workInProgress2.queue;
null !== queue && (queue.pending = null);
workInProgress2 = workInProgress2.next;
}
didScheduleRenderPhaseUpdate = false;
}
renderLanes = 0;
hookTypesDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
hookTypesUpdateIndexDev = -1;
currentHookNameInDev = null;
didScheduleRenderPhaseUpdateDuringThisPass = false;
thenableIndexCounter$1 = localIdCounter = 0;
thenableState$1 = null;
}
function mountWorkInProgressHook() {
var hook = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook;
return workInProgressHook;
}
function updateWorkInProgressHook() {
if (null === currentHook) {
var nextCurrentHook = currentlyRenderingFiber.alternate;
nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
} else nextCurrentHook = currentHook.next;
var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber.memoizedState : workInProgressHook.next;
if (null !== nextWorkInProgressHook)
workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook;
else {
if (null === nextCurrentHook) {
if (null === currentlyRenderingFiber.alternate)
throw Error(
"Update hook called on initial render. This is likely a bug in React. Please file an issue."
);
throw Error("Rendered more hooks than during the previous render.");
}
currentHook = nextCurrentHook;
nextCurrentHook = {
memoizedState: currentHook.memoizedState,
baseState: currentHook.baseState,
baseQueue: currentHook.baseQueue,
queue: currentHook.queue,
next: null
};
null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook;
}
return workInProgressHook;
}
function createFunctionComponentUpdateQueue() {
return { lastEffect: null, events: null, stores: null, memoCache: null };
}
function useThenable(thenable) {
var index = thenableIndexCounter$1;
thenableIndexCounter$1 += 1;
null === thenableState$1 && (thenableState$1 = createThenableState());
thenable = trackUsedThenable(thenableState$1, thenable, index);
index = currentlyRenderingFiber;
null === (null === workInProgressHook ? index.memoizedState : workInProgressHook.next) && (index = index.alternate, ReactSharedInternals.H = null !== index && null !== index.memoizedState ? HooksDispatcherOnUpdateInDEV : HooksDispatcherOnMountInDEV);
return thenable;
}
function use(usable) {
if (null !== usable && "object" === typeof usable) {
if ("function" === typeof usable.then) return useThenable(usable);
if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
}
throw Error("An unsupported type was passed to use(): " + String(usable));
}
function useMemoCache(size) {
var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue;
null !== updateQueue && (memoCache = updateQueue.memoCache);
if (null == memoCache) {
var current2 = currentlyRenderingFiber.alternate;
null !== current2 && (current2 = current2.updateQueue, null !== current2 && (current2 = current2.memoCache, null != current2 && (memoCache = {
data: current2.data.map(function(array) {
return array.slice();
}),
index: 0
})));
}
null == memoCache && (memoCache = { data: [], index: 0 });
null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue);
updateQueue.memoCache = memoCache;
updateQueue = memoCache.data[memoCache.index];
if (void 0 === updateQueue || ignorePreviousDependencies)
for (updateQueue = memoCache.data[memoCache.index] = Array(size), current2 = 0; current2 < size; current2++)
updateQueue[current2] = REACT_MEMO_CACHE_SENTINEL;
else
updateQueue.length !== size && console.error(
"Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",
updateQueue.length,
size
);
memoCache.index++;
return updateQueue;
}
function basicStateReducer(state, action) {
return "function" === typeof action ? action(state) : action;
}
function mountReducer(reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
if (void 0 !== init) {
var initialState = init(initialArg);
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(true);
try {
init(initialArg);
} finally {
setIsStrictModeForDevtools(false);
}
}
} else initialState = initialArg;
hook.memoizedState = hook.baseState = initialState;
reducer = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = reducer;
reducer = reducer.dispatch = dispatchReducerAction.bind(
null,
currentlyRenderingFiber,
reducer
);
return [hook.memoizedState, reducer];
}
function updateReducer(reducer) {
var hook = updateWorkInProgressHook();
return updateReducerImpl(hook, currentHook, reducer);
}
function updateReducerImpl(hook, current2, reducer) {
var queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var baseQueue = hook.baseQueue, pendingQueue = queue.pending;
if (null !== pendingQueue) {
if (null !== baseQueue) {
var baseFirst = baseQueue.next;
baseQueue.next = pendingQueue.next;
pendingQueue.next = baseFirst;
}
current2.baseQueue !== baseQueue && console.error(
"Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."
);
current2.baseQueue = baseQueue = pendingQueue;
queue.pending = null;
}
pendingQueue = hook.baseState;
if (null === baseQueue) hook.memoizedState = pendingQueue;
else {
current2 = baseQueue.next;
var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current2, didReadFromEntangledAsyncAction2 = false;
do {
var updateLane = update.lane & -536870913;
if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) {
var revertLane = update.revertLane;
if (0 === revertLane)
null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = {
lane: 0,
revertLane: 0,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
}), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
else if ((renderLanes & revertLane) === revertLane) {
update = update.next;
revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
continue;
} else
updateLane = {
lane: 0,
revertLane: update.revertLane,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
}, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane;
updateLane = update.action;
shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane);
pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane);
} else
revertLane = {
lane: updateLane,
revertLane: update.revertLane,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
}, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane;
update = update.next;
} while (null !== update && update !== current2);
null === newBaseQueueLast ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst;
if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction2 && (reducer = currentEntangledActionThenable, null !== reducer)))
throw reducer;
hook.memoizedState = pendingQueue;
hook.baseState = baseFirst;
hook.baseQueue = newBaseQueueLast;
queue.lastRenderedState = pendingQueue;
}
null === baseQueue && (queue.lanes = 0);
return [hook.memoizedState, queue.dispatch];
}
function rerenderReducer(reducer) {
var hook = updateWorkInProgressHook(), queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var dispatch = queue.dispatch, lastRenderPhaseUpdate = queue.pending, newState = hook.memoizedState;
if (null !== lastRenderPhaseUpdate) {
queue.pending = null;
var update = lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
do
newState = reducer(newState, update.action), update = update.next;
while (update !== lastRenderPhaseUpdate);
objectIs(newState, hook.memoizedState) || (didReceiveUpdate = true);
hook.memoizedState = newState;
null === hook.baseQueue && (hook.baseState = newState);
queue.lastRenderedState = newState;
}
return [newState, dispatch];
}
function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook();
if (isHydrating) {
if (void 0 === getServerSnapshot)
throw Error(
"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
);
var nextSnapshot = getServerSnapshot();
didWarnUncachedGetSnapshot || nextSnapshot === getServerSnapshot() || (console.error(
"The result of getServerSnapshot should be cached to avoid an infinite loop"
), didWarnUncachedGetSnapshot = true);
} else {
nextSnapshot = getSnapshot();
didWarnUncachedGetSnapshot || (getServerSnapshot = getSnapshot(), objectIs(nextSnapshot, getServerSnapshot) || (console.error(
"The result of getSnapshot should be cached to avoid an infinite loop"
), didWarnUncachedGetSnapshot = true));
if (null === workInProgressRoot)
throw Error(
"Expected a work-in-progress root. This is a bug in React. Please file an issue."
);
0 !== (workInProgressRootRenderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
}
hook.memoizedState = nextSnapshot;
getServerSnapshot = { value: nextSnapshot, getSnapshot };
hook.queue = getServerSnapshot;
mountEffect(
subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe),
[subscribe]
);
fiber.flags |= 2048;
pushSimpleEffect(
HasEffect | Passive,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
getServerSnapshot,
nextSnapshot,
getSnapshot
),
null
);
return nextSnapshot;
}
function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating;
if (isHydrating$jscomp$0) {
if (void 0 === getServerSnapshot)
throw Error(
"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
);
getServerSnapshot = getServerSnapshot();
} else if (getServerSnapshot = getSnapshot(), !didWarnUncachedGetSnapshot) {
var cachedSnapshot = getSnapshot();
objectIs(getServerSnapshot, cachedSnapshot) || (console.error(
"The result of getSnapshot should be cached to avoid an infinite loop"
), didWarnUncachedGetSnapshot = true);
}
if (cachedSnapshot = !objectIs(
(currentHook || hook).memoizedState,
getServerSnapshot
))
hook.memoizedState = getServerSnapshot, didReceiveUpdate = true;
hook = hook.queue;
var create2 = subscribeToStore.bind(null, fiber, hook, subscribe);
updateEffectImpl(2048, Passive, create2, [subscribe]);
if (hook.getSnapshot !== getSnapshot || cachedSnapshot || null !== workInProgressHook && workInProgressHook.memoizedState.tag & HasEffect) {
fiber.flags |= 2048;
pushSimpleEffect(
HasEffect | Passive,
createEffectInstance(),
updateStoreInstance.bind(
null,
fiber,
hook,
getServerSnapshot,
getSnapshot
),
null
);
if (null === workInProgressRoot)
throw Error(
"Expected a work-in-progress root. This is a bug in React. Please file an issue."
);
isHydrating$jscomp$0 || 0 !== (renderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
}
return getServerSnapshot;
}
function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
fiber.flags |= 16384;
fiber = { getSnapshot, value: renderedSnapshot };
getSnapshot = currentlyRenderingFiber.updateQueue;
null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber));
}
function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
inst.value = nextSnapshot;
inst.getSnapshot = getSnapshot;
checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
}
function subscribeToStore(fiber, inst, subscribe) {
return subscribe(function() {
checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
});
}
function checkIfSnapshotChanged(inst) {
var latestGetSnapshot = inst.getSnapshot;
inst = inst.value;
try {
var nextValue = latestGetSnapshot();
return !objectIs(inst, nextValue);
} catch (error) {
return true;
}
}
function forceStoreRerender(fiber) {
var root = enqueueConcurrentRenderForLane(fiber, 2);
null !== root && scheduleUpdateOnFiber(root, fiber, 2);
}
function mountStateImpl(initialState) {
var hook = mountWorkInProgressHook();
if ("function" === typeof initialState) {
var initialStateInitializer = initialState;
initialState = initialStateInitializer();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(true);
try {
initialStateInitializer();
} finally {
setIsStrictModeForDevtools(false);
}
}
}
hook.memoizedState = hook.baseState = initialState;
hook.queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: basicStateReducer,
lastRenderedState: initialState
};
return hook;
}
function mountState(initialState) {
initialState = mountStateImpl(initialState);
var queue = initialState.queue, dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
queue.dispatch = dispatch;
return [initialState.memoizedState, dispatch];
}
function mountOptimistic(passthrough) {
var hook = mountWorkInProgressHook();
hook.memoizedState = hook.baseState = passthrough;
var queue = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: null,
lastRenderedState: null
};
hook.queue = queue;
hook = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
true,
queue
);
queue.dispatch = hook;
return [passthrough, hook];
}
function updateOptimistic(passthrough, reducer) {
var hook = updateWorkInProgressHook();
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
}
function updateOptimisticImpl(hook, current2, passthrough, reducer) {
hook.baseState = passthrough;
return updateReducerImpl(
hook,
currentHook,
"function" === typeof reducer ? reducer : basicStateReducer
);
}
function rerenderOptimistic(passthrough, reducer) {
var hook = updateWorkInProgressHook();
if (null !== currentHook)
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
hook.baseState = passthrough;
return [passthrough, hook.queue.dispatch];
}
function dispatchActionState(fiber, actionQueue, setPendingState, setState, payload) {
if (isRenderPhaseUpdate(fiber))
throw Error("Cannot update form state while rendering.");
fiber = actionQueue.action;
if (null !== fiber) {
var actionNode = {
payload,
action: fiber,
next: null,
isTransition: true,
status: "pending",
value: null,
reason: null,
listeners: [],
then: function(listener) {
actionNode.listeners.push(listener);
}
};
null !== ReactSharedInternals.T ? setPendingState(true) : actionNode.isTransition = false;
setState(actionNode);
setPendingState = actionQueue.pending;
null === setPendingState ? (actionNode.next = actionQueue.pending = actionNode, runActionStateAction(actionQueue, actionNode)) : (actionNode.next = setPendingState.next, actionQueue.pending = setPendingState.next = actionNode);
}
}
function runActionStateAction(actionQueue, node) {
var action = node.action, payload = node.payload, prevState = actionQueue.state;
if (node.isTransition) {
var prevTransition = ReactSharedInternals.T, currentTransition = {};
ReactSharedInternals.T = currentTransition;
ReactSharedInternals.T._updatedFibers = /* @__PURE__ */ new Set();
try {
var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
handleActionReturnValue(actionQueue, node, returnValue);
} catch (error) {
onActionError(actionQueue, node, error);
} finally {
ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (actionQueue = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < actionQueue && console.warn(
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
));
}
} else
try {
currentTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node, currentTransition);
} catch (error$2) {
onActionError(actionQueue, node, error$2);
}
}
function handleActionReturnValue(actionQueue, node, returnValue) {
null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then ? (returnValue.then(
function(nextState) {
onActionSuccess(actionQueue, node, nextState);
},
function(error) {
return onActionError(actionQueue, node, error);
}
), node.isTransition || console.error(
"An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
)) : onActionSuccess(actionQueue, node, returnValue);
}
function onActionSuccess(actionQueue, actionNode, nextState) {
actionNode.status = "fulfilled";
actionNode.value = nextState;
notifyActionListeners(actionNode);
actionQueue.state = nextState;
actionNode = actionQueue.pending;
null !== actionNode && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState)));
}
function onActionError(actionQueue, actionNode, error) {
var last2 = actionQueue.pending;
actionQueue.pending = null;
if (null !== last2) {
last2 = last2.next;
do
actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next;
while (actionNode !== last2);
}
actionQueue.action = null;
}
function notifyActionListeners(actionNode) {
actionNode = actionNode.listeners;
for (var i2 = 0; i2 < actionNode.length; i2++) (0, actionNode[i2])();
}
function actionStateReducer(oldState, newState) {
return newState;
}
function mountActionState(action, initialStateProp) {
if (isHydrating) {
var ssrFormState = workInProgressRoot.formState;
if (null !== ssrFormState) {
a: {
var isMatching = currentlyRenderingFiber;
if (isHydrating) {
if (nextHydratableInstance) {
var markerInstance = canHydrateFormStateMarker(
nextHydratableInstance,
rootOrSingletonContext
);
if (markerInstance) {
nextHydratableInstance = getNextHydratableSibling(markerInstance);
isMatching = isFormStateMarkerMatching(markerInstance);
break a;
}
}
throwOnHydrationMismatch(isMatching);
}
isMatching = false;
}
isMatching && (initialStateProp = ssrFormState[0]);
}
}
ssrFormState = mountWorkInProgressHook();
ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
isMatching = {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: actionStateReducer,
lastRenderedState: initialStateProp
};
ssrFormState.queue = isMatching;
ssrFormState = dispatchSetState.bind(
null,
currentlyRenderingFiber,
isMatching
);
isMatching.dispatch = ssrFormState;
isMatching = mountStateImpl(false);
var setPendingState = dispatchOptimisticSetState.bind(
null,
currentlyRenderingFiber,
false,
isMatching.queue
);
isMatching = mountWorkInProgressHook();
markerInstance = {
state: initialStateProp,
dispatch: null,
action,
pending: null
};
isMatching.queue = markerInstance;
ssrFormState = dispatchActionState.bind(
null,
currentlyRenderingFiber,
markerInstance,
setPendingState,
ssrFormState
);
markerInstance.dispatch = ssrFormState;
isMatching.memoizedState = action;
return [initialStateProp, ssrFormState, false];
}
function updateActionState(action) {
var stateHook = updateWorkInProgressHook();
return updateActionStateImpl(stateHook, currentHook, action);
}
function updateActionStateImpl(stateHook, currentStateHook, action) {
currentStateHook = updateReducerImpl(
stateHook,
currentStateHook,
actionStateReducer
)[0];
stateHook = updateReducer(basicStateReducer)[0];
if ("object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then)
try {
var state = useThenable(currentStateHook);
} catch (x2) {
if (x2 === SuspenseException) throw SuspenseActionException;
throw x2;
}
else state = currentStateHook;
currentStateHook = updateWorkInProgressHook();
var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch;
action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect(
HasEffect | Passive,
createEffectInstance(),
actionStateActionEffect.bind(null, actionQueue, action),
null
));
return [state, dispatch, stateHook];
}
function actionStateActionEffect(actionQueue, action) {
actionQueue.action = action;
}
function rerenderActionState(action) {
var stateHook = updateWorkInProgressHook(), currentStateHook = currentHook;
if (null !== currentStateHook)
return updateActionStateImpl(stateHook, currentStateHook, action);
updateWorkInProgressHook();
stateHook = stateHook.memoizedState;
currentStateHook = updateWorkInProgressHook();
var dispatch = currentStateHook.queue.dispatch;
currentStateHook.memoizedState = action;
return [stateHook, dispatch, false];
}
function pushSimpleEffect(tag, inst, create2, createDeps) {
tag = {
tag,
create: create2,
deps: createDeps,
inst,
next: null
};
inst = currentlyRenderingFiber.updateQueue;
null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
create2 = inst.lastEffect;
null === create2 ? inst.lastEffect = tag.next = tag : (createDeps = create2.next, create2.next = tag, tag.next = createDeps, inst.lastEffect = tag);
return tag;
}
function createEffectInstance() {
return { destroy: void 0, resource: void 0 };
}
function mountRef(initialValue) {
var hook = mountWorkInProgressHook();
initialValue = { current: initialValue };
return hook.memoizedState = initialValue;
}
function mountEffectImpl(fiberFlags, hookFlags, create2, createDeps) {
var hook = mountWorkInProgressHook();
createDeps = void 0 === createDeps ? null : createDeps;
currentlyRenderingFiber.flags |= fiberFlags;
hook.memoizedState = pushSimpleEffect(
HasEffect | hookFlags,
createEffectInstance(),
create2,
createDeps
);
}
function updateEffectImpl(fiberFlags, hookFlags, create2, deps) {
var hook = updateWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var inst = hook.memoizedState.inst;
null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create2, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
HasEffect | hookFlags,
inst,
create2,
deps
));
}
function mountEffect(create2, createDeps) {
(currentlyRenderingFiber.mode & 16) !== NoMode && (currentlyRenderingFiber.mode & 64) === NoMode ? mountEffectImpl(276826112, Passive, create2, createDeps) : mountEffectImpl(8390656, Passive, create2, createDeps);
}
function mountLayoutEffect(create2, deps) {
var fiberFlags = 4194308;
(currentlyRenderingFiber.mode & 16) !== NoMode && (fiberFlags |= 134217728);
return mountEffectImpl(fiberFlags, Layout, create2, deps);
}
function imperativeHandleEffect(create2, ref) {
if ("function" === typeof ref) {
create2 = create2();
var refCleanup = ref(create2);
return function() {
"function" === typeof refCleanup ? refCleanup() : ref(null);
};
}
if (null !== ref && void 0 !== ref)
return ref.hasOwnProperty("current") || console.error(
"Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.",
"an object with keys {" + Object.keys(ref).join(", ") + "}"
), create2 = create2(), ref.current = create2, function() {
ref.current = null;
};
}
function mountImperativeHandle(ref, create2, deps) {
"function" !== typeof create2 && console.error(
"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
null !== create2 ? typeof create2 : "null"
);
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
var fiberFlags = 4194308;
(currentlyRenderingFiber.mode & 16) !== NoMode && (fiberFlags |= 134217728);
mountEffectImpl(
fiberFlags,
Layout,
imperativeHandleEffect.bind(null, create2, ref),
deps
);
}
function updateImperativeHandle(ref, create2, deps) {
"function" !== typeof create2 && console.error(
"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
null !== create2 ? typeof create2 : "null"
);
deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
updateEffectImpl(
4,
Layout,
imperativeHandleEffect.bind(null, create2, ref),
deps
);
}
function mountCallback(callback, deps) {
mountWorkInProgressHook().memoizedState = [
callback,
void 0 === deps ? null : deps
];
return callback;
}
function updateCallback(callback, deps) {
var hook = updateWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var prevState = hook.memoizedState;
if (null !== deps && areHookInputsEqual(deps, prevState[1]))
return prevState[0];
hook.memoizedState = [callback, deps];
return callback;
}
function mountMemo(nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var nextValue = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(true);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(false);
}
}
hook.memoizedState = [nextValue, deps];
return nextValue;
}
function updateMemo(nextCreate, deps) {
var hook = updateWorkInProgressHook();
deps = void 0 === deps ? null : deps;
var prevState = hook.memoizedState;
if (null !== deps && areHookInputsEqual(deps, prevState[1]))
return prevState[0];
prevState = nextCreate();
if (shouldDoubleInvokeUserFnsInHooksDEV) {
setIsStrictModeForDevtools(true);
try {
nextCreate();
} finally {
setIsStrictModeForDevtools(false);
}
}
hook.memoizedState = [prevState, deps];
return prevState;
}
function mountDeferredValue(value, initialValue) {
var hook = mountWorkInProgressHook();
return mountDeferredValueImpl(hook, value, initialValue);
}
function updateDeferredValue(value, initialValue) {
var hook = updateWorkInProgressHook();
return updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
}
function rerenderDeferredValue(value, initialValue) {
var hook = updateWorkInProgressHook();
return null === currentHook ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl(
hook,
currentHook.memoizedState,
value,
initialValue
);
}
function mountDeferredValueImpl(hook, value, initialValue) {
if (void 0 === initialValue || 0 !== (renderLanes & 1073741824))
return hook.memoizedState = value;
hook.memoizedState = initialValue;
hook = requestDeferredLane();
currentlyRenderingFiber.lanes |= hook;
workInProgressRootSkippedLanes |= hook;
return initialValue;
}
function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
if (objectIs(value, prevValue)) return value;
if (null !== currentTreeHiddenStackCursor.current)
return hook = mountDeferredValueImpl(hook, value, initialValue), objectIs(hook, prevValue) || (didReceiveUpdate = true), hook;
if (0 === (renderLanes & 42))
return didReceiveUpdate = true, hook.memoizedState = value;
hook = requestDeferredLane();
currentlyRenderingFiber.lanes |= hook;
workInProgressRootSkippedLanes |= hook;
return prevValue;
}
function startTransition(fiber, queue, pendingState, finishedState, callback) {
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(
0 !== previousPriority && 8 > previousPriority ? previousPriority : 8
);
var prevTransition = ReactSharedInternals.T, currentTransition = {};
ReactSharedInternals.T = currentTransition;
dispatchOptimisticSetState(fiber, false, queue, pendingState);
currentTransition._updatedFibers = /* @__PURE__ */ new Set();
try {
var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) {
var thenableForFinishedState = chainThenableValue(
returnValue,
finishedState
);
dispatchSetStateInternal(
fiber,
queue,
thenableForFinishedState,
requestUpdateLane(fiber)
);
} else
dispatchSetStateInternal(
fiber,
queue,
finishedState,
requestUpdateLane(fiber)
);
} catch (error) {
dispatchSetStateInternal(
fiber,
queue,
{ then: function() {
}, status: "rejected", reason: error },
requestUpdateLane(fiber)
);
} finally {
setCurrentUpdatePriority(previousPriority), ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (fiber = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < fiber && console.warn(
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
));
}
}
function ensureFormComponentIsStateful(formFiber) {
var existingStateHook = formFiber.memoizedState;
if (null !== existingStateHook) return existingStateHook;
existingStateHook = {
memoizedState: NotPendingTransition,
baseState: NotPendingTransition,
baseQueue: null,
queue: {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: basicStateReducer,
lastRenderedState: NotPendingTransition
},
next: null
};
var initialResetState = {};
existingStateHook.next = {
memoizedState: initialResetState,
baseState: initialResetState,
baseQueue: null,
queue: {
pending: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: basicStateReducer,
lastRenderedState: initialResetState
},
next: null
};
formFiber.memoizedState = existingStateHook;
formFiber = formFiber.alternate;
null !== formFiber && (formFiber.memoizedState = existingStateHook);
return existingStateHook;
}
function mountTransition() {
var stateHook = mountStateImpl(false);
stateHook = startTransition.bind(
null,
currentlyRenderingFiber,
stateHook.queue,
true,
false
);
mountWorkInProgressHook().memoizedState = stateHook;
return [false, stateHook];
}
function updateTransition() {
var booleanOrThenable = updateReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
start
];
}
function rerenderTransition() {
var booleanOrThenable = rerenderReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
return [
"boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
start
];
}
function useHostTransitionStatus() {
return readContext(HostTransitionContext);
}
function mountId() {
var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix;
if (isHydrating) {
var treeId = treeContextOverflow;
var idWithLeadingBit = treeContextId;
treeId = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + treeId;
identifierPrefix = "\xAB" + identifierPrefix + "R" + treeId;
treeId = localIdCounter++;
0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
identifierPrefix += "\xBB";
} else
treeId = globalClientIdCounter++, identifierPrefix = "\xAB" + identifierPrefix + "r" + treeId.toString(32) + "\xBB";
return hook.memoizedState = identifierPrefix;
}
function mountRefresh() {
return mountWorkInProgressHook().memoizedState = refreshCache.bind(
null,
currentlyRenderingFiber
);
}
function refreshCache(fiber, seedKey) {
for (var provider = fiber.return; null !== provider; ) {
switch (provider.tag) {
case 24:
case 3:
var lane = requestUpdateLane(provider);
fiber = createUpdate(lane);
var root = enqueueUpdate(provider, fiber, lane);
null !== root && (scheduleUpdateOnFiber(root, provider, lane), entangleTransitions(root, provider, lane));
provider = createCache();
null !== seedKey && void 0 !== seedKey && null !== root && console.error(
"The seed argument is not enabled outside experimental channels."
);
fiber.payload = { cache: provider };
return;
}
provider = provider.return;
}
}
function dispatchReducerAction(fiber, queue, action) {
var args = arguments;
"function" === typeof args[3] && console.error(
"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
);
args = requestUpdateLane(fiber);
var update = {
lane: args,
revertLane: 0,
action,
hasEagerState: false,
eagerState: null,
next: null
};
isRenderPhaseUpdate(fiber) ? enqueueRenderPhaseUpdate(queue, update) : (update = enqueueConcurrentHookUpdate(fiber, queue, update, args), null !== update && (scheduleUpdateOnFiber(update, fiber, args), entangleTransitionUpdate(update, queue, args)));
markStateUpdateScheduled(fiber, args);
}
function dispatchSetState(fiber, queue, action) {
var args = arguments;
"function" === typeof args[3] && console.error(
"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
);
args = requestUpdateLane(fiber);
dispatchSetStateInternal(fiber, queue, action, args);
markStateUpdateScheduled(fiber, args);
}
function dispatchSetStateInternal(fiber, queue, action, lane) {
var update = {
lane,
revertLane: 0,
action,
hasEagerState: false,
eagerState: null,
next: null
};
if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
else {
var alternate = fiber.alternate;
if (0 === fiber.lanes && (null === alternate || 0 === alternate.lanes) && (alternate = queue.lastRenderedReducer, null !== alternate)) {
var prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
var currentState = queue.lastRenderedState, eagerState = alternate(currentState, action);
update.hasEagerState = true;
update.eagerState = eagerState;
if (objectIs(eagerState, currentState))
return enqueueUpdate$1(fiber, queue, update, 0), null === workInProgressRoot && finishQueueingConcurrentUpdates(), false;
} catch (error) {
} finally {
ReactSharedInternals.H = prevDispatcher;
}
}
action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
if (null !== action)
return scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane), true;
}
return false;
}
function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
null === ReactSharedInternals.T && 0 === currentEntangledLane && console.error(
"An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."
);
action = {
lane: 2,
revertLane: requestTransitionLane(),
action,
hasEagerState: false,
eagerState: null,
next: null
};
if (isRenderPhaseUpdate(fiber)) {
if (throwIfDuringRender)
throw Error("Cannot update optimistic state while rendering.");
console.error("Cannot call startTransition while rendering.");
} else
throwIfDuringRender = enqueueConcurrentHookUpdate(
fiber,
queue,
action,
2
), null !== throwIfDuringRender && scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);
markStateUpdateScheduled(fiber, 2);
}
function isRenderPhaseUpdate(fiber) {
var alternate = fiber.alternate;
return fiber === currentlyRenderingFiber || null !== alternate && alternate === currentlyRenderingFiber;
}
function enqueueRenderPhaseUpdate(queue, update) {
didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
var pending = queue.pending;
null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
queue.pending = update;
}
function entangleTransitionUpdate(root, queue, lane) {
if (0 !== (lane & 4194048)) {
var queueLanes = queue.lanes;
queueLanes &= root.pendingLanes;
lane |= queueLanes;
queue.lanes = lane;
markRootEntangled(root, lane);
}
}
function pushDebugInfo(debugInfo) {
var previousDebugInfo = currentDebugInfo;
null != debugInfo && (currentDebugInfo = null === previousDebugInfo ? debugInfo : previousDebugInfo.concat(debugInfo));
return previousDebugInfo;
}
function validateFragmentProps(element, fiber, returnFiber) {
for (var keys = Object.keys(element.props), i2 = 0; i2 < keys.length; i2++) {
var key = keys[i2];
if ("children" !== key && "key" !== key) {
null === fiber && (fiber = createFiberFromElement(element, returnFiber.mode, 0), fiber._debugInfo = currentDebugInfo, fiber.return = returnFiber);
runWithFiberInDEV(
fiber,
function(erroredKey) {
console.error(
"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
erroredKey
);
},
key
);
break;
}
}
}
function unwrapThenable(thenable) {
var index = thenableIndexCounter;
thenableIndexCounter += 1;
null === thenableState && (thenableState = createThenableState());
return trackUsedThenable(thenableState, thenable, index);
}
function coerceRef(workInProgress2, element) {
element = element.props.ref;
workInProgress2.ref = void 0 !== element ? element : null;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
throw Error(
'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.'
);
returnFiber = Object.prototype.toString.call(newChild);
throw Error(
"Objects are not valid as a React child (found: " + ("[object Object]" === returnFiber ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber) + "). If you meant to render a collection of children, use an array instead."
);
}
function warnOnFunctionType(returnFiber, invalidChild) {
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
ownerHasFunctionTypeWarning[parentName] || (ownerHasFunctionTypeWarning[parentName] = true, invalidChild = invalidChild.displayName || invalidChild.name || "Component", 3 === returnFiber.tag ? console.error(
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)",
invalidChild,
invalidChild,
invalidChild
) : console.error(
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}</%s>",
invalidChild,
invalidChild,
parentName,
invalidChild,
parentName
));
}
function warnOnSymbolType(returnFiber, invalidChild) {
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
ownerHasSymbolTypeWarning[parentName] || (ownerHasSymbolTypeWarning[parentName] = true, invalidChild = String(invalidChild), 3 === returnFiber.tag ? console.error(
"Symbols are not valid as a React child.\n root.render(%s)",
invalidChild
) : console.error(
"Symbols are not valid as a React child.\n <%s>%s</%s>",
parentName,
invalidChild,
parentName
));
}
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (shouldTrackSideEffects) {
var deletions = returnFiber.deletions;
null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete);
}
}
function deleteRemainingChildren(returnFiber, currentFirstChild) {
if (!shouldTrackSideEffects) return null;
for (; null !== currentFirstChild; )
deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
return null;
}
function mapRemainingChildren(currentFirstChild) {
for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; )
null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
return existingChildren;
}
function useFiber(fiber, pendingProps) {
fiber = createWorkInProgress(fiber, pendingProps);
fiber.index = 0;
fiber.sibling = null;
return fiber;
}
function placeChild(newFiber, lastPlacedIndex, newIndex) {
newFiber.index = newIndex;
if (!shouldTrackSideEffects)
return newFiber.flags |= 1048576, lastPlacedIndex;
newIndex = newFiber.alternate;
if (null !== newIndex)
return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex;
newFiber.flags |= 67108866;
return lastPlacedIndex;
}
function placeSingleChild(newFiber) {
shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 67108866);
return newFiber;
}
function updateTextNode(returnFiber, current2, textContent2, lanes) {
if (null === current2 || 6 !== current2.tag)
return current2 = createFiberFromText(
textContent2,
returnFiber.mode,
lanes
), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
current2 = useFiber(current2, textContent2);
current2.return = returnFiber;
current2._debugInfo = currentDebugInfo;
return current2;
}
function updateElement(returnFiber, current2, element, lanes) {
var elementType = element.type;
if (elementType === REACT_FRAGMENT_TYPE)
return current2 = updateFragment(
returnFiber,
current2,
element.props.children,
lanes,
element.key
), validateFragmentProps(element, current2, returnFiber), current2;
if (null !== current2 && (current2.elementType === elementType || isCompatibleFamilyForHotReloading(current2, element) || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && callLazyInitInDEV(elementType) === current2.type))
return current2 = useFiber(current2, element.props), coerceRef(current2, element), current2.return = returnFiber, current2._debugOwner = element._owner, current2._debugInfo = currentDebugInfo, current2;
current2 = createFiberFromElement(element, returnFiber.mode, lanes);
coerceRef(current2, element);
current2.return = returnFiber;
current2._debugInfo = currentDebugInfo;
return current2;
}
function updatePortal(returnFiber, current2, portal, lanes) {
if (null === current2 || 4 !== current2.tag || current2.stateNode.containerInfo !== portal.containerInfo || current2.stateNode.implementation !== portal.implementation)
return current2 = createFiberFromPortal(portal, returnFiber.mode, lanes), current2.return = returnFiber, current2._debugInfo = currentDebugInfo, current2;
current2 = useFiber(current2, portal.children || []);
current2.return = returnFiber;
current2._debugInfo = currentDebugInfo;
return current2;
}
function updateFragment(returnFiber, current2, fragment, lanes, key) {
if (null === current2 || 7 !== current2.tag)
return current2 = createFiberFromFragment(
fragment,
returnFiber.mode,
lanes,
key
), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
current2 = useFiber(current2, fragment);
current2.return = returnFiber;
current2._debugInfo = currentDebugInfo;
return current2;
}
function createChild(returnFiber, newChild, lanes) {
if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
return newChild = createFiberFromText(
"" + newChild,
returnFiber.mode,
lanes
), newChild.return = returnFiber, newChild._debugOwner = returnFiber, newChild._debugTask = returnFiber._debugTask, newChild._debugInfo = currentDebugInfo, newChild;
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return lanes = createFiberFromElement(
newChild,
returnFiber.mode,
lanes
), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
case REACT_PORTAL_TYPE:
return newChild = createFiberFromPortal(
newChild,
returnFiber.mode,
lanes
), newChild.return = returnFiber, newChild._debugInfo = currentDebugInfo, newChild;
case REACT_LAZY_TYPE:
var _prevDebugInfo = pushDebugInfo(newChild._debugInfo);
newChild = callLazyInitInDEV(newChild);
returnFiber = createChild(returnFiber, newChild, lanes);
currentDebugInfo = _prevDebugInfo;
return returnFiber;
}
if (isArrayImpl(newChild) || getIteratorFn(newChild))
return lanes = createFiberFromFragment(
newChild,
returnFiber.mode,
lanes,
null
), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
if ("function" === typeof newChild.then)
return _prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = createChild(
returnFiber,
unwrapThenable(newChild),
lanes
), currentDebugInfo = _prevDebugInfo, returnFiber;
if (newChild.$$typeof === REACT_CONTEXT_TYPE)
return createChild(
returnFiber,
readContextDuringReconciliation(returnFiber, newChild),
lanes
);
throwOnInvalidObjectType(returnFiber, newChild);
}
"function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
"symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
return null;
}
function updateSlot(returnFiber, oldFiber, newChild, lanes) {
var key = null !== oldFiber ? oldFiber.key : null;
if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return newChild.key === key ? (key = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
returnFiber,
oldFiber,
newChild,
lanes
), currentDebugInfo = key, returnFiber) : null;
case REACT_PORTAL_TYPE:
return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null;
case REACT_LAZY_TYPE:
return key = pushDebugInfo(newChild._debugInfo), newChild = callLazyInitInDEV(newChild), returnFiber = updateSlot(
returnFiber,
oldFiber,
newChild,
lanes
), currentDebugInfo = key, returnFiber;
}
if (isArrayImpl(newChild) || getIteratorFn(newChild)) {
if (null !== key) return null;
key = pushDebugInfo(newChild._debugInfo);
returnFiber = updateFragment(
returnFiber,
oldFiber,
newChild,
lanes,
null
);
currentDebugInfo = key;
return returnFiber;
}
if ("function" === typeof newChild.then)
return key = pushDebugInfo(newChild._debugInfo), returnFiber = updateSlot(
returnFiber,
oldFiber,
unwrapThenable(newChild),
lanes
), currentDebugInfo = key, returnFiber;
if (newChild.$$typeof === REACT_CONTEXT_TYPE)
return updateSlot(
returnFiber,
oldFiber,
readContextDuringReconciliation(returnFiber, newChild),
lanes
);
throwOnInvalidObjectType(returnFiber, newChild);
}
"function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
"symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
return null;
}
function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes);
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return newIdx = existingChildren.get(
null === newChild.key ? newIdx : newChild.key
) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
returnFiber,
newIdx,
newChild,
lanes
), currentDebugInfo = existingChildren, returnFiber;
case REACT_PORTAL_TYPE:
return existingChildren = existingChildren.get(
null === newChild.key ? newIdx : newChild.key
) || null, updatePortal(returnFiber, existingChildren, newChild, lanes);
case REACT_LAZY_TYPE:
var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo);
newChild = callLazyInitInDEV(newChild);
returnFiber = updateFromMap(
existingChildren,
returnFiber,
newIdx,
newChild,
lanes
);
currentDebugInfo = _prevDebugInfo7;
return returnFiber;
}
if (isArrayImpl(newChild) || getIteratorFn(newChild))
return newIdx = existingChildren.get(newIdx) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateFragment(
returnFiber,
newIdx,
newChild,
lanes,
null
), currentDebugInfo = existingChildren, returnFiber;
if ("function" === typeof newChild.then)
return _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo), returnFiber = updateFromMap(
existingChildren,
returnFiber,
newIdx,
unwrapThenable(newChild),
lanes
), currentDebugInfo = _prevDebugInfo7, returnFiber;
if (newChild.$$typeof === REACT_CONTEXT_TYPE)
return updateFromMap(
existingChildren,
returnFiber,
newIdx,
readContextDuringReconciliation(returnFiber, newChild),
lanes
);
throwOnInvalidObjectType(returnFiber, newChild);
}
"function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
"symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
return null;
}
function warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys) {
if ("object" !== typeof child || null === child) return knownKeys;
switch (child.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
warnForMissingKey(returnFiber, workInProgress2, child);
var key = child.key;
if ("string" !== typeof key) break;
if (null === knownKeys) {
knownKeys = /* @__PURE__ */ new Set();
knownKeys.add(key);
break;
}
if (!knownKeys.has(key)) {
knownKeys.add(key);
break;
}
runWithFiberInDEV(workInProgress2, function() {
console.error(
"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.",
key
);
});
break;
case REACT_LAZY_TYPE:
child = callLazyInitInDEV(child), warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys);
}
return knownKeys;
}
function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
for (var knownKeys = null, resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) {
oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
var newFiber = updateSlot(
returnFiber,
oldFiber,
newChildren[newIdx],
lanes
);
if (null === newFiber) {
null === oldFiber && (oldFiber = nextOldFiber);
break;
}
knownKeys = warnOnInvalidKey(
returnFiber,
newFiber,
newChildren[newIdx],
knownKeys
);
shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (newIdx === newChildren.length)
return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
if (null === oldFiber) {
for (; newIdx < newChildren.length; newIdx++)
oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
returnFiber,
oldFiber,
newChildren[newIdx],
knownKeys
), currentFirstChild = placeChild(
oldFiber,
currentFirstChild,
newIdx
), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
isHydrating && pushTreeFork(returnFiber, newIdx);
return resultingFirstChild;
}
for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++)
nextOldFiber = updateFromMap(
oldFiber,
returnFiber,
newIdx,
newChildren[newIdx],
lanes
), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
returnFiber,
nextOldFiber,
newChildren[newIdx],
knownKeys
), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
null === nextOldFiber.key ? newIdx : nextOldFiber.key
), currentFirstChild = placeChild(
nextOldFiber,
currentFirstChild,
newIdx
), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
shouldTrackSideEffects && oldFiber.forEach(function(child) {
return deleteChild(returnFiber, child);
});
isHydrating && pushTreeFork(returnFiber, newIdx);
return resultingFirstChild;
}
function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) {
if (null == newChildren)
throw Error("An iterable object provided no iterator.");
for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, knownKeys = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()) {
oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
if (null === newFiber) {
null === oldFiber && (oldFiber = nextOldFiber);
break;
}
knownKeys = warnOnInvalidKey(
returnFiber,
newFiber,
step.value,
knownKeys
);
shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (step.done)
return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
if (null === oldFiber) {
for (; !step.done; newIdx++, step = newChildren.next())
oldFiber = createChild(returnFiber, step.value, lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
returnFiber,
oldFiber,
step.value,
knownKeys
), currentFirstChild = placeChild(
oldFiber,
currentFirstChild,
newIdx
), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
isHydrating && pushTreeFork(returnFiber, newIdx);
return resultingFirstChild;
}
for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next())
nextOldFiber = updateFromMap(
oldFiber,
returnFiber,
newIdx,
step.value,
lanes
), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
returnFiber,
nextOldFiber,
step.value,
knownKeys
), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
null === nextOldFiber.key ? newIdx : nextOldFiber.key
), currentFirstChild = placeChild(
nextOldFiber,
currentFirstChild,
newIdx
), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
shouldTrackSideEffects && oldFiber.forEach(function(child) {
return deleteChild(returnFiber, child);
});
isHydrating && pushTreeFork(returnFiber, newIdx);
return resultingFirstChild;
}
function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) {
"object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (validateFragmentProps(newChild, null, returnFiber), newChild = newChild.props.children);
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
var prevDebugInfo = pushDebugInfo(newChild._debugInfo);
a: {
for (var key = newChild.key; null !== currentFirstChild; ) {
if (currentFirstChild.key === key) {
key = newChild.type;
if (key === REACT_FRAGMENT_TYPE) {
if (7 === currentFirstChild.tag) {
deleteRemainingChildren(
returnFiber,
currentFirstChild.sibling
);
lanes = useFiber(
currentFirstChild,
newChild.props.children
);
lanes.return = returnFiber;
lanes._debugOwner = newChild._owner;
lanes._debugInfo = currentDebugInfo;
validateFragmentProps(newChild, lanes, returnFiber);
returnFiber = lanes;
break a;
}
} else if (currentFirstChild.elementType === key || isCompatibleFamilyForHotReloading(
currentFirstChild,
newChild
) || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && callLazyInitInDEV(key) === currentFirstChild.type) {
deleteRemainingChildren(
returnFiber,
currentFirstChild.sibling
);
lanes = useFiber(currentFirstChild, newChild.props);
coerceRef(lanes, newChild);
lanes.return = returnFiber;
lanes._debugOwner = newChild._owner;
lanes._debugInfo = currentDebugInfo;
returnFiber = lanes;
break a;
}
deleteRemainingChildren(returnFiber, currentFirstChild);
break;
} else deleteChild(returnFiber, currentFirstChild);
currentFirstChild = currentFirstChild.sibling;
}
newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment(
newChild.props.children,
returnFiber.mode,
lanes,
newChild.key
), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, validateFragmentProps(newChild, lanes, returnFiber), returnFiber = lanes) : (lanes = createFiberFromElement(
newChild,
returnFiber.mode,
lanes
), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes._debugInfo = currentDebugInfo, returnFiber = lanes);
}
returnFiber = placeSingleChild(returnFiber);
currentDebugInfo = prevDebugInfo;
return returnFiber;
case REACT_PORTAL_TYPE:
a: {
prevDebugInfo = newChild;
for (newChild = prevDebugInfo.key; null !== currentFirstChild; ) {
if (currentFirstChild.key === newChild)
if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === prevDebugInfo.containerInfo && currentFirstChild.stateNode.implementation === prevDebugInfo.implementation) {
deleteRemainingChildren(
returnFiber,
currentFirstChild.sibling
);
lanes = useFiber(
currentFirstChild,
prevDebugInfo.children || []
);
lanes.return = returnFiber;
returnFiber = lanes;
break a;
} else {
deleteRemainingChildren(returnFiber, currentFirstChild);
break;
}
else deleteChild(returnFiber, currentFirstChild);
currentFirstChild = currentFirstChild.sibling;
}
lanes = createFiberFromPortal(
prevDebugInfo,
returnFiber.mode,
lanes
);
lanes.return = returnFiber;
returnFiber = lanes;
}
return placeSingleChild(returnFiber);
case REACT_LAZY_TYPE:
return prevDebugInfo = pushDebugInfo(newChild._debugInfo), newChild = callLazyInitInDEV(newChild), returnFiber = reconcileChildFibersImpl(
returnFiber,
currentFirstChild,
newChild,
lanes
), currentDebugInfo = prevDebugInfo, returnFiber;
}
if (isArrayImpl(newChild))
return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildrenArray(
returnFiber,
currentFirstChild,
newChild,
lanes
), currentDebugInfo = prevDebugInfo, returnFiber;
if (getIteratorFn(newChild)) {
prevDebugInfo = pushDebugInfo(newChild._debugInfo);
key = getIteratorFn(newChild);
if ("function" !== typeof key)
throw Error(
"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
);
var newChildren = key.call(newChild);
if (newChildren === newChild) {
if (0 !== returnFiber.tag || "[object GeneratorFunction]" !== Object.prototype.toString.call(returnFiber.type) || "[object Generator]" !== Object.prototype.toString.call(newChildren))
didWarnAboutGenerators || console.error(
"Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."
), didWarnAboutGenerators = true;
} else
newChild.entries !== key || didWarnAboutMaps || (console.error(
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
), didWarnAboutMaps = true);
returnFiber = reconcileChildrenIterator(
returnFiber,
currentFirstChild,
newChildren,
lanes
);
currentDebugInfo = prevDebugInfo;
return returnFiber;
}
if ("function" === typeof newChild.then)
return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildFibersImpl(
returnFiber,
currentFirstChild,
unwrapThenable(newChild),
lanes
), currentDebugInfo = prevDebugInfo, returnFiber;
if (newChild.$$typeof === REACT_CONTEXT_TYPE)
return reconcileChildFibersImpl(
returnFiber,
currentFirstChild,
readContextDuringReconciliation(returnFiber, newChild),
lanes
);
throwOnInvalidObjectType(returnFiber, newChild);
}
if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
return prevDebugInfo = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(
returnFiber,
currentFirstChild.sibling
), lanes = useFiber(currentFirstChild, prevDebugInfo), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(
prevDebugInfo,
returnFiber.mode,
lanes
), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, returnFiber = lanes), placeSingleChild(returnFiber);
"function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
"symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
return deleteRemainingChildren(returnFiber, currentFirstChild);
}
return function(returnFiber, currentFirstChild, newChild, lanes) {
var prevDebugInfo = currentDebugInfo;
currentDebugInfo = null;
try {
thenableIndexCounter = 0;
var firstChildFiber = reconcileChildFibersImpl(
returnFiber,
currentFirstChild,
newChild,
lanes
);
thenableState = null;
return firstChildFiber;
} catch (x2) {
if (x2 === SuspenseException || x2 === SuspenseActionException) throw x2;
var fiber = createFiber(29, x2, null, returnFiber.mode);
fiber.lanes = lanes;
fiber.return = returnFiber;
var debugInfo = fiber._debugInfo = currentDebugInfo;
fiber._debugOwner = returnFiber._debugOwner;
fiber._debugTask = returnFiber._debugTask;
if (null != debugInfo) {
for (var i2 = debugInfo.length - 1; 0 <= i2; i2--)
if ("string" === typeof debugInfo[i2].stack) {
fiber._debugOwner = debugInfo[i2];
fiber._debugTask = debugInfo[i2].debugTask;
break;
}
}
return fiber;
} finally {
currentDebugInfo = prevDebugInfo;
}
};
}
function pushPrimaryTreeSuspenseHandler(handler) {
var current2 = handler.alternate;
push(
suspenseStackCursor,
suspenseStackCursor.current & SubtreeSuspenseContextMask,
handler
);
push(suspenseHandlerStackCursor, handler, handler);
null === shellBoundary && (null === current2 || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current2.memoizedState && (shellBoundary = handler));
}
function pushOffscreenSuspenseHandler(fiber) {
if (22 === fiber.tag) {
if (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), null === shellBoundary) {
var current2 = fiber.alternate;
null !== current2 && null !== current2.memoizedState && (shellBoundary = fiber);
}
} else reuseSuspenseHandlerOnStack(fiber);
}
function reuseSuspenseHandlerOnStack(fiber) {
push(suspenseStackCursor, suspenseStackCursor.current, fiber);
push(
suspenseHandlerStackCursor,
suspenseHandlerStackCursor.current,
fiber
);
}
function popSuspenseHandler(fiber) {
pop(suspenseHandlerStackCursor, fiber);
shellBoundary === fiber && (shellBoundary = null);
pop(suspenseStackCursor, fiber);
}
function findFirstSuspended(row) {
for (var node = row; null !== node; ) {
if (13 === node.tag) {
var state = node.memoizedState;
if (null !== state && (state = state.dehydrated, null === state || isSuspenseInstancePending(state) || isSuspenseInstanceFallback(state)))
return node;
} else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
if (0 !== (node.flags & 128)) return node;
} else if (null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === row) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === row) return null;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
return null;
}
function warnOnInvalidCallback(callback) {
if (null !== callback && "function" !== typeof callback) {
var key = String(callback);
didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error(
"Expected the last optional `callback` argument to be a function. Instead received: %s.",
callback
));
}
}
function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) {
var prevState = workInProgress2.memoizedState, partialState = getDerivedStateFromProps(nextProps, prevState);
if (workInProgress2.mode & 8) {
setIsStrictModeForDevtools(true);
try {
partialState = getDerivedStateFromProps(nextProps, prevState);
} finally {
setIsStrictModeForDevtools(false);
}
}
void 0 === partialState && (ctor = getComponentNameFromType(ctor) || "Component", didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), console.error(
"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
ctor
)));
prevState = null === partialState || void 0 === partialState ? prevState : assign({}, prevState, partialState);
workInProgress2.memoizedState = prevState;
0 === workInProgress2.lanes && (workInProgress2.updateQueue.baseState = prevState);
}
function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
var instance2 = workInProgress2.stateNode;
if ("function" === typeof instance2.shouldComponentUpdate) {
oldProps = instance2.shouldComponentUpdate(
newProps,
newState,
nextContext
);
if (workInProgress2.mode & 8) {
setIsStrictModeForDevtools(true);
try {
oldProps = instance2.shouldComponentUpdate(
newProps,
newState,
nextContext
);
} finally {
setIsStrictModeForDevtools(false);
}
}
void 0 === oldProps && console.error(
"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",
getComponentNameFromType(ctor) || "Component"
);
return oldProps;
}
return ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : true;
}
function callComponentWillReceiveProps(workInProgress2, instance2, newProps, nextContext) {
var oldState = instance2.state;
"function" === typeof instance2.componentWillReceiveProps && instance2.componentWillReceiveProps(newProps, nextContext);
"function" === typeof instance2.UNSAFE_componentWillReceiveProps && instance2.UNSAFE_componentWillReceiveProps(newProps, nextContext);
instance2.state !== oldState && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Component", didWarnAboutStateAssignmentForComponent.has(workInProgress2) || (didWarnAboutStateAssignmentForComponent.add(workInProgress2), console.error(
"%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
workInProgress2
)), classComponentUpdater.enqueueReplaceState(
instance2,
instance2.state,
null
));
}
function resolveClassComponentProps(Component, baseProps) {
var newProps = baseProps;
if ("ref" in baseProps) {
newProps = {};
for (var propName in baseProps)
"ref" !== propName && (newProps[propName] = baseProps[propName]);
}
if (Component = Component.defaultProps) {
newProps === baseProps && (newProps = assign({}, newProps));
for (var _propName in Component)
void 0 === newProps[_propName] && (newProps[_propName] = Component[_propName]);
}
return newProps;
}
function logUncaughtError(root, errorInfo) {
try {
componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
errorBoundaryName = null;
var error = errorInfo.value;
if (null !== ReactSharedInternals.actQueue)
ReactSharedInternals.thrownErrors.push(error);
else {
var onUncaughtError = root.onUncaughtError;
onUncaughtError(error, { componentStack: errorInfo.stack });
}
} catch (e3) {
setTimeout(function() {
throw e3;
});
}
}
function logCaughtError(root, boundary, errorInfo) {
try {
componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
errorBoundaryName = getComponentNameFromFiber(boundary);
var onCaughtError = root.onCaughtError;
onCaughtError(errorInfo.value, {
componentStack: errorInfo.stack,
errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
});
} catch (e3) {
setTimeout(function() {
throw e3;
});
}
}
function createRootErrorUpdate(root, errorInfo, lane) {
lane = createUpdate(lane);
lane.tag = CaptureUpdate;
lane.payload = { element: null };
lane.callback = function() {
runWithFiberInDEV(errorInfo.source, logUncaughtError, root, errorInfo);
};
return lane;
}
function createClassErrorUpdate(lane) {
lane = createUpdate(lane);
lane.tag = CaptureUpdate;
return lane;
}
function initializeClassErrorUpdate(update, root, fiber, errorInfo) {
var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
if ("function" === typeof getDerivedStateFromError) {
var error = errorInfo.value;
update.payload = function() {
return getDerivedStateFromError(error);
};
update.callback = function() {
markFailedErrorBoundaryForHotReloading(fiber);
runWithFiberInDEV(
errorInfo.source,
logCaughtError,
root,
fiber,
errorInfo
);
};
}
var inst = fiber.stateNode;
null !== inst && "function" === typeof inst.componentDidCatch && (update.callback = function() {
markFailedErrorBoundaryForHotReloading(fiber);
runWithFiberInDEV(
errorInfo.source,
logCaughtError,
root,
fiber,
errorInfo
);
"function" !== typeof getDerivedStateFromError && (null === legacyErrorBoundariesThatAlreadyFailed ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this));
callComponentDidCatchInDEV(this, errorInfo);
"function" === typeof getDerivedStateFromError || 0 === (fiber.lanes & 2) && console.error(
"%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",
getComponentNameFromFiber(fiber) || "Unknown"
);
});
}
function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
sourceFiber.flags |= 32768;
isDevToolsPresent && restorePendingUpdaters(root, rootRenderLanes);
if (null !== value && "object" === typeof value && "function" === typeof value.then) {
returnFiber = sourceFiber.alternate;
null !== returnFiber && propagateParentContextChanges(
returnFiber,
sourceFiber,
rootRenderLanes,
true
);
isHydrating && (didSuspendOrErrorDEV = true);
sourceFiber = suspenseHandlerStackCursor.current;
if (null !== sourceFiber) {
switch (sourceFiber.tag) {
case 13:
return null === shellBoundary ? renderDidSuspendDelayIfPossible() : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootSuspended), sourceFiber.flags &= -257, sourceFiber.flags |= 65536, sourceFiber.lanes = rootRenderLanes, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? sourceFiber.updateQueue = /* @__PURE__ */ new Set([value]) : returnFiber.add(value), attachPingListener(root, value, rootRenderLanes)), false;
case 22:
return sourceFiber.flags |= 65536, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? (returnFiber = {
transitions: null,
markerInstances: null,
retryQueue: /* @__PURE__ */ new Set([value])
}, sourceFiber.updateQueue = returnFiber) : (sourceFiber = returnFiber.retryQueue, null === sourceFiber ? returnFiber.retryQueue = /* @__PURE__ */ new Set([value]) : sourceFiber.add(value)), attachPingListener(root, value, rootRenderLanes)), false;
}
throw Error(
"Unexpected Suspense handler tag (" + sourceFiber.tag + "). This is a bug in React."
);
}
attachPingListener(root, value, rootRenderLanes);
renderDidSuspendDelayIfPossible();
return false;
}
if (isHydrating)
return didSuspendOrErrorDEV = true, returnFiber = suspenseHandlerStackCursor.current, null !== returnFiber ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), returnFiber.flags |= 65536, returnFiber.lanes = rootRenderLanes, value !== HydrationMismatchException && queueHydrationError(
createCapturedValueAtFiber(
Error(
"There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",
{ cause: value }
),
sourceFiber
)
)) : (value !== HydrationMismatchException && queueHydrationError(
createCapturedValueAtFiber(
Error(
"There was an error while hydrating but React was able to recover by instead client rendering the entire root.",
{ cause: value }
),
sourceFiber
)
), root = root.current.alternate, root.flags |= 65536, rootRenderLanes &= -rootRenderLanes, root.lanes |= rootRenderLanes, value = createCapturedValueAtFiber(value, sourceFiber), rootRenderLanes = createRootErrorUpdate(
root.stateNode,
value,
rootRenderLanes
), enqueueCapturedUpdate(root, rootRenderLanes), workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored)), false;
var error = createCapturedValueAtFiber(
Error(
"There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",
{ cause: value }
),
sourceFiber
);
null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [error] : workInProgressRootConcurrentErrors.push(error);
workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored);
if (null === returnFiber) return true;
value = createCapturedValueAtFiber(value, sourceFiber);
sourceFiber = returnFiber;
do {
switch (sourceFiber.tag) {
case 3:
return sourceFiber.flags |= 65536, root = rootRenderLanes & -rootRenderLanes, sourceFiber.lanes |= root, root = createRootErrorUpdate(
sourceFiber.stateNode,
value,
root
), enqueueCapturedUpdate(sourceFiber, root), false;
case 1:
if (returnFiber = sourceFiber.type, error = sourceFiber.stateNode, 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || null !== error && "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(error))))
return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate(
rootRenderLanes,
root,
sourceFiber,
value
), enqueueCapturedUpdate(sourceFiber, rootRenderLanes), false;
}
sourceFiber = sourceFiber.return;
} while (null !== sourceFiber);
return false;
}
function reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2) {
workInProgress2.child = null === current2 ? mountChildFibers(workInProgress2, null, nextChildren, renderLanes2) : reconcileChildFibers(
workInProgress2,
current2.child,
nextChildren,
renderLanes2
);
}
function updateForwardRef(current2, workInProgress2, Component, nextProps, renderLanes2) {
Component = Component.render;
var ref = workInProgress2.ref;
if ("ref" in nextProps) {
var propsWithoutRef = {};
for (var key in nextProps)
"ref" !== key && (propsWithoutRef[key] = nextProps[key]);
} else propsWithoutRef = nextProps;
prepareToReadContext(workInProgress2);
markComponentRenderStarted(workInProgress2);
nextProps = renderWithHooks(
current2,
workInProgress2,
Component,
propsWithoutRef,
ref,
renderLanes2
);
key = checkDidRenderIdHook();
markComponentRenderStopped();
if (null !== current2 && !didReceiveUpdate)
return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
isHydrating && key && pushMaterializedTreeId(workInProgress2);
workInProgress2.flags |= 1;
reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
return workInProgress2.child;
}
function updateMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
if (null === current2) {
var type = Component.type;
if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component.compare)
return Component = resolveFunctionForHotReloading(type), workInProgress2.tag = 15, workInProgress2.type = Component, validateFunctionComponentInDev(workInProgress2, type), updateSimpleMemoComponent(
current2,
workInProgress2,
Component,
nextProps,
renderLanes2
);
current2 = createFiberFromTypeAndProps(
Component.type,
null,
nextProps,
workInProgress2,
workInProgress2.mode,
renderLanes2
);
current2.ref = workInProgress2.ref;
current2.return = workInProgress2;
return workInProgress2.child = current2;
}
type = current2.child;
if (!checkScheduledUpdateOrContext(current2, renderLanes2)) {
var prevProps = type.memoizedProps;
Component = Component.compare;
Component = null !== Component ? Component : shallowEqual;
if (Component(prevProps, nextProps) && current2.ref === workInProgress2.ref)
return bailoutOnAlreadyFinishedWork(
current2,
workInProgress2,
renderLanes2
);
}
workInProgress2.flags |= 1;
current2 = createWorkInProgress(type, nextProps);
current2.ref = workInProgress2.ref;
current2.return = workInProgress2;
return workInProgress2.child = current2;
}
function updateSimpleMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
if (null !== current2) {
var prevProps = current2.memoizedProps;
if (shallowEqual(prevProps, nextProps) && current2.ref === workInProgress2.ref && workInProgress2.type === current2.type)
if (didReceiveUpdate = false, workInProgress2.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current2, renderLanes2))
0 !== (current2.flags & 131072) && (didReceiveUpdate = true);
else
return workInProgress2.lanes = current2.lanes, bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
}
return updateFunctionComponent(
current2,
workInProgress2,
Component,
nextProps,
renderLanes2
);
}
function updateOffscreenComponent(current2, workInProgress2, renderLanes2) {
var nextProps = workInProgress2.pendingProps, nextChildren = nextProps.children, prevState = null !== current2 ? current2.memoizedState : null;
if ("hidden" === nextProps.mode) {
if (0 !== (workInProgress2.flags & 128)) {
nextProps = null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2;
if (null !== current2) {
nextChildren = workInProgress2.child = current2.child;
for (prevState = 0; null !== nextChildren; )
prevState = prevState | nextChildren.lanes | nextChildren.childLanes, nextChildren = nextChildren.sibling;
workInProgress2.childLanes = prevState & ~nextProps;
} else workInProgress2.childLanes = 0, workInProgress2.child = null;
return deferHiddenOffscreenComponent(
current2,
workInProgress2,
nextProps,
renderLanes2
);
}
if (0 !== (renderLanes2 & 536870912))
workInProgress2.memoizedState = { baseLanes: 0, cachePool: null }, null !== current2 && pushTransition(
workInProgress2,
null !== prevState ? prevState.cachePool : null
), null !== prevState ? pushHiddenContext(workInProgress2, prevState) : reuseHiddenContextOnStack(workInProgress2), pushOffscreenSuspenseHandler(workInProgress2);
else
return workInProgress2.lanes = workInProgress2.childLanes = 536870912, deferHiddenOffscreenComponent(
current2,
workInProgress2,
null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2,
renderLanes2
);
} else
null !== prevState ? (pushTransition(workInProgress2, prevState.cachePool), pushHiddenContext(workInProgress2, prevState), reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.memoizedState = null) : (null !== current2 && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(workInProgress2), reuseSuspenseHandlerOnStack(workInProgress2));
reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function deferHiddenOffscreenComponent(current2, workInProgress2, nextBaseLanes, renderLanes2) {
var JSCompiler_inline_result = peekCacheFromPool();
JSCompiler_inline_result = null === JSCompiler_inline_result ? null : {
parent: isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2,
pool: JSCompiler_inline_result
};
workInProgress2.memoizedState = {
baseLanes: nextBaseLanes,
cachePool: JSCompiler_inline_result
};
null !== current2 && pushTransition(workInProgress2, null);
reuseHiddenContextOnStack(workInProgress2);
pushOffscreenSuspenseHandler(workInProgress2);
null !== current2 && propagateParentContextChanges(current2, workInProgress2, renderLanes2, true);
return null;
}
function markRef(current2, workInProgress2) {
var ref = workInProgress2.ref;
if (null === ref)
null !== current2 && null !== current2.ref && (workInProgress2.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current2 || current2.ref !== ref)
workInProgress2.flags |= 4194816;
}
}
function updateFunctionComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
if (Component.prototype && "function" === typeof Component.prototype.render) {
var componentName2 = getComponentNameFromType(Component) || "Unknown";
didWarnAboutBadClass[componentName2] || (console.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.",
componentName2,
componentName2
), didWarnAboutBadClass[componentName2] = true);
}
workInProgress2.mode & 8 && ReactStrictModeWarnings.recordLegacyContextWarning(
workInProgress2,
null
);
null === current2 && (validateFunctionComponentInDev(workInProgress2, workInProgress2.type), Component.contextTypes && (componentName2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypes[componentName2] || (didWarnAboutContextTypes[componentName2] = true, console.error(
"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
componentName2
))));
prepareToReadContext(workInProgress2);
markComponentRenderStarted(workInProgress2);
Component = renderWithHooks(
current2,
workInProgress2,
Component,
nextProps,
void 0,
renderLanes2
);
nextProps = checkDidRenderIdHook();
markComponentRenderStopped();
if (null !== current2 && !didReceiveUpdate)
return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
isHydrating && nextProps && pushMaterializedTreeId(workInProgress2);
workInProgress2.flags |= 1;
reconcileChildren(current2, workInProgress2, Component, renderLanes2);
return workInProgress2.child;
}
function replayFunctionComponent(current2, workInProgress2, nextProps, Component, secondArg, renderLanes2) {
prepareToReadContext(workInProgress2);
markComponentRenderStarted(workInProgress2);
hookTypesUpdateIndexDev = -1;
ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
workInProgress2.updateQueue = null;
nextProps = renderWithHooksAgain(
workInProgress2,
Component,
nextProps,
secondArg
);
finishRenderingHooks(current2, workInProgress2);
Component = checkDidRenderIdHook();
markComponentRenderStopped();
if (null !== current2 && !didReceiveUpdate)
return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
isHydrating && Component && pushMaterializedTreeId(workInProgress2);
workInProgress2.flags |= 1;
reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
return workInProgress2.child;
}
function updateClassComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
switch (shouldErrorImpl(workInProgress2)) {
case false:
var _instance = workInProgress2.stateNode, state = new workInProgress2.type(
workInProgress2.memoizedProps,
_instance.context
).state;
_instance.updater.enqueueSetState(_instance, state, null);
break;
case true:
workInProgress2.flags |= 128;
workInProgress2.flags |= 65536;
_instance = Error("Simulated error coming from DevTools");
var lane = renderLanes2 & -renderLanes2;
workInProgress2.lanes |= lane;
state = workInProgressRoot;
if (null === state)
throw Error(
"Expected a work-in-progress root. This is a bug in React. Please file an issue."
);
lane = createClassErrorUpdate(lane);
initializeClassErrorUpdate(
lane,
state,
workInProgress2,
createCapturedValueAtFiber(_instance, workInProgress2)
);
enqueueCapturedUpdate(workInProgress2, lane);
}
prepareToReadContext(workInProgress2);
if (null === workInProgress2.stateNode) {
state = emptyContextObject;
_instance = Component.contextType;
"contextType" in Component && null !== _instance && (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) && !didWarnAboutInvalidateContextType.has(Component) && (didWarnAboutInvalidateContextType.add(Component), lane = void 0 === _instance ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : "object" !== typeof _instance ? " However, it is set to a " + typeof _instance + "." : _instance.$$typeof === REACT_CONSUMER_TYPE ? " Did you accidentally pass the Context.Consumer instead?" : " However, it is set to an object with keys {" + Object.keys(_instance).join(", ") + "}.", console.error(
"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
getComponentNameFromType(Component) || "Component",
lane
));
"object" === typeof _instance && null !== _instance && (state = readContext(_instance));
_instance = new Component(nextProps, state);
if (workInProgress2.mode & 8) {
setIsStrictModeForDevtools(true);
try {
_instance = new Component(nextProps, state);
} finally {
setIsStrictModeForDevtools(false);
}
}
state = workInProgress2.memoizedState = null !== _instance.state && void 0 !== _instance.state ? _instance.state : null;
_instance.updater = classComponentUpdater;
workInProgress2.stateNode = _instance;
_instance._reactInternals = workInProgress2;
_instance._reactInternalInstance = fakeInternalInstance;
"function" === typeof Component.getDerivedStateFromProps && null === state && (state = getComponentNameFromType(Component) || "Component", didWarnAboutUninitializedState.has(state) || (didWarnAboutUninitializedState.add(state), console.error(
"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",
state,
null === _instance.state ? "null" : "undefined",
state
)));
if ("function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate) {
var foundWillUpdateName = lane = state = null;
"function" === typeof _instance.componentWillMount && true !== _instance.componentWillMount.__suppressDeprecationWarning ? state = "componentWillMount" : "function" === typeof _instance.UNSAFE_componentWillMount && (state = "UNSAFE_componentWillMount");
"function" === typeof _instance.componentWillReceiveProps && true !== _instance.componentWillReceiveProps.__suppressDeprecationWarning ? lane = "componentWillReceiveProps" : "function" === typeof _instance.UNSAFE_componentWillReceiveProps && (lane = "UNSAFE_componentWillReceiveProps");
"function" === typeof _instance.componentWillUpdate && true !== _instance.componentWillUpdate.__suppressDeprecationWarning ? foundWillUpdateName = "componentWillUpdate" : "function" === typeof _instance.UNSAFE_componentWillUpdate && (foundWillUpdateName = "UNSAFE_componentWillUpdate");
if (null !== state || null !== lane || null !== foundWillUpdateName) {
_instance = getComponentNameFromType(Component) || "Component";
var newApiName = "function" === typeof Component.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), console.error(
"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
_instance,
newApiName,
null !== state ? "\n " + state : "",
null !== lane ? "\n " + lane : "",
null !== foundWillUpdateName ? "\n " + foundWillUpdateName : ""
));
}
}
_instance = workInProgress2.stateNode;
state = getComponentNameFromType(Component) || "Component";
_instance.render || (Component.prototype && "function" === typeof Component.prototype.render ? console.error(
"No `render` method found on the %s instance: did you accidentally return an object from the constructor?",
state
) : console.error(
"No `render` method found on the %s instance: you may have forgotten to define `render`.",
state
));
!_instance.getInitialState || _instance.getInitialState.isReactClassApproved || _instance.state || console.error(
"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",
state
);
_instance.getDefaultProps && !_instance.getDefaultProps.isReactClassApproved && console.error(
"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
state
);
_instance.contextType && console.error(
"contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
state
);
Component.childContextTypes && !didWarnAboutChildContextTypes.has(Component) && (didWarnAboutChildContextTypes.add(Component), console.error(
"%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",
state
));
Component.contextTypes && !didWarnAboutContextTypes$1.has(Component) && (didWarnAboutContextTypes$1.add(Component), console.error(
"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",
state
));
"function" === typeof _instance.componentShouldUpdate && console.error(
"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",
state
);
Component.prototype && Component.prototype.isPureReactComponent && "undefined" !== typeof _instance.shouldComponentUpdate && console.error(
"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
getComponentNameFromType(Component) || "A pure component"
);
"function" === typeof _instance.componentDidUnmount && console.error(
"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
state
);
"function" === typeof _instance.componentDidReceiveProps && console.error(
"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",
state
);
"function" === typeof _instance.componentWillRecieveProps && console.error(
"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
state
);
"function" === typeof _instance.UNSAFE_componentWillRecieveProps && console.error(
"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
state
);
lane = _instance.props !== nextProps;
void 0 !== _instance.props && lane && console.error(
"When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
state
);
_instance.defaultProps && console.error(
"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
state,
state
);
"function" !== typeof _instance.getSnapshotBeforeUpdate || "function" === typeof _instance.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), console.error(
"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
getComponentNameFromType(Component)
));
"function" === typeof _instance.getDerivedStateFromProps && console.error(
"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
state
);
"function" === typeof _instance.getDerivedStateFromError && console.error(
"%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
state
);
"function" === typeof Component.getSnapshotBeforeUpdate && console.error(
"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
state
);
(lane = _instance.state) && ("object" !== typeof lane || isArrayImpl(lane)) && console.error("%s.state: must be set to an object or null", state);
"function" === typeof _instance.getChildContext && "object" !== typeof Component.childContextTypes && console.error(
"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
state
);
_instance = workInProgress2.stateNode;
_instance.props = nextProps;
_instance.state = workInProgress2.memoizedState;
_instance.refs = {};
initializeUpdateQueue(workInProgress2);
state = Component.contextType;
_instance.context = "object" === typeof state && null !== state ? readContext(state) : emptyContextObject;
_instance.state === nextProps && (state = getComponentNameFromType(Component) || "Component", didWarnAboutDirectlyAssigningPropsToState.has(state) || (didWarnAboutDirectlyAssigningPropsToState.add(state), console.error(
"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",
state
)));
workInProgress2.mode & 8 && ReactStrictModeWarnings.recordLegacyContextWarning(
workInProgress2,
_instance
);
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(
workInProgress2,
_instance
);
_instance.state = workInProgress2.memoizedState;
state = Component.getDerivedStateFromProps;
"function" === typeof state && (applyDerivedStateFromProps(
workInProgress2,
Component,
state,
nextProps
), _instance.state = workInProgress2.memoizedState);
"function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || (state = _instance.state, "function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount(), state !== _instance.state && (console.error(
"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
getComponentNameFromFiber(workInProgress2) || "Component"
), classComponentUpdater.enqueueReplaceState(
_instance,
_instance.state,
null
)), processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), _instance.state = workInProgress2.memoizedState);
"function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308);
(workInProgress2.mode & 16) !== NoMode && (workInProgress2.flags |= 134217728);
_instance = true;
} else if (null === current2) {
_instance = workInProgress2.stateNode;
var unresolvedOldProps = workInProgress2.memoizedProps;
lane = resolveClassComponentProps(Component, unresolvedOldProps);
_instance.props = lane;
var oldContext = _instance.context;
foundWillUpdateName = Component.contextType;
state = emptyContextObject;
"object" === typeof foundWillUpdateName && null !== foundWillUpdateName && (state = readContext(foundWillUpdateName));
newApiName = Component.getDerivedStateFromProps;
foundWillUpdateName = "function" === typeof newApiName || "function" === typeof _instance.getSnapshotBeforeUpdate;
unresolvedOldProps = workInProgress2.pendingProps !== unresolvedOldProps;
foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (unresolvedOldProps || oldContext !== state) && callComponentWillReceiveProps(
workInProgress2,
_instance,
nextProps,
state
);
hasForceUpdate = false;
var oldState = workInProgress2.memoizedState;
_instance.state = oldState;
processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
suspendIfUpdateReadFromEntangledAsyncAction();
oldContext = workInProgress2.memoizedState;
unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof newApiName && (applyDerivedStateFromProps(
workInProgress2,
Component,
newApiName,
nextProps
), oldContext = workInProgress2.memoizedState), (lane = hasForceUpdate || checkShouldComponentUpdate(
workInProgress2,
Component,
lane,
nextProps,
oldState,
oldContext,
state
)) ? (foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || ("function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount()), "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & 16) !== NoMode && (workInProgress2.flags |= 134217728)) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & 16) !== NoMode && (workInProgress2.flags |= 134217728), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = oldContext), _instance.props = nextProps, _instance.state = oldContext, _instance.context = state, _instance = lane) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & 16) !== NoMode && (workInProgress2.flags |= 134217728), _instance = false);
} else {
_instance = workInProgress2.stateNode;
cloneUpdateQueue(current2, workInProgress2);
state = workInProgress2.memoizedProps;
foundWillUpdateName = resolveClassComponentProps(Component, state);
_instance.props = foundWillUpdateName;
newApiName = workInProgress2.pendingProps;
oldState = _instance.context;
oldContext = Component.contextType;
lane = emptyContextObject;
"object" === typeof oldContext && null !== oldContext && (lane = readContext(oldContext));
unresolvedOldProps = Component.getDerivedStateFromProps;
(oldContext = "function" === typeof unresolvedOldProps || "function" === typeof _instance.getSnapshotBeforeUpdate) || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (state !== newApiName || oldState !== lane) && callComponentWillReceiveProps(
workInProgress2,
_instance,
nextProps,
lane
);
hasForceUpdate = false;
oldState = workInProgress2.memoizedState;
_instance.state = oldState;
processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
suspendIfUpdateReadFromEntangledAsyncAction();
var newState = workInProgress2.memoizedState;
state !== newApiName || oldState !== newState || hasForceUpdate || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(
workInProgress2,
Component,
unresolvedOldProps,
nextProps
), newState = workInProgress2.memoizedState), (foundWillUpdateName = hasForceUpdate || checkShouldComponentUpdate(
workInProgress2,
Component,
foundWillUpdateName,
nextProps,
oldState,
newState,
lane
) || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies)) ? (oldContext || "function" !== typeof _instance.UNSAFE_componentWillUpdate && "function" !== typeof _instance.componentWillUpdate || ("function" === typeof _instance.componentWillUpdate && _instance.componentWillUpdate(nextProps, newState, lane), "function" === typeof _instance.UNSAFE_componentWillUpdate && _instance.UNSAFE_componentWillUpdate(
nextProps,
newState,
lane
)), "function" === typeof _instance.componentDidUpdate && (workInProgress2.flags |= 4), "function" === typeof _instance.getSnapshotBeforeUpdate && (workInProgress2.flags |= 1024)) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = newState), _instance.props = nextProps, _instance.state = newState, _instance.context = lane, _instance = foundWillUpdateName) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), _instance = false);
}
lane = _instance;
markRef(current2, workInProgress2);
state = 0 !== (workInProgress2.flags & 128);
if (lane || state) {
lane = workInProgress2.stateNode;
setCurrentFiber(workInProgress2);
if (state && "function" !== typeof Component.getDerivedStateFromError)
Component = null, profilerStartTime = -1;
else {
markComponentRenderStarted(workInProgress2);
Component = callRenderInDEV(lane);
if (workInProgress2.mode & 8) {
setIsStrictModeForDevtools(true);
try {
callRenderInDEV(lane);
} finally {
setIsStrictModeForDevtools(false);
}
}
markComponentRenderStopped();
}
workInProgress2.flags |= 1;
null !== current2 && state ? (workInProgress2.child = reconcileChildFibers(
workInProgress2,
current2.child,
null,
renderLanes2
), workInProgress2.child = reconcileChildFibers(
workInProgress2,
null,
Component,
renderLanes2
)) : reconcileChildren(current2, workInProgress2, Component, renderLanes2);
workInProgress2.memoizedState = lane.state;
current2 = workInProgress2.child;
} else
current2 = bailoutOnAlreadyFinishedWork(
current2,
workInProgress2,
renderLanes2
);
renderLanes2 = workInProgress2.stateNode;
_instance && renderLanes2.props !== nextProps && (didWarnAboutReassigningProps || console.error(
"It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
getComponentNameFromFiber(workInProgress2) || "a component"
), didWarnAboutReassigningProps = true);
return current2;
}
function mountHostRootWithoutHydrating(current2, workInProgress2, nextChildren, renderLanes2) {
resetHydrationState();
workInProgress2.flags |= 256;
reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function validateFunctionComponentInDev(workInProgress2, Component) {
Component && Component.childContextTypes && console.error(
"childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
Component.displayName || Component.name || "Component"
);
"function" === typeof Component.getDerivedStateFromProps && (workInProgress2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] || (console.error(
"%s: Function components do not support getDerivedStateFromProps.",
workInProgress2
), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] = true));
"object" === typeof Component.contextType && null !== Component.contextType && (Component = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypeOnFunctionComponent[Component] || (console.error(
"%s: Function components do not support contextType.",
Component
), didWarnAboutContextTypeOnFunctionComponent[Component] = true));
}
function mountSuspenseOffscreenState(renderLanes2) {
return { baseLanes: renderLanes2, cachePool: getSuspendedCache() };
}
function getRemainingWorkInPrimaryTree(current2, primaryTreeDidDefer, renderLanes2) {
current2 = null !== current2 ? current2.childLanes & ~renderLanes2 : 0;
primaryTreeDidDefer && (current2 |= workInProgressDeferredLane);
return current2;
}
function updateSuspenseComponent(current2, workInProgress2, renderLanes2) {
var nextProps = workInProgress2.pendingProps;
shouldSuspendImpl(workInProgress2) && (workInProgress2.flags |= 128);
var showFallback = false, didSuspend = 0 !== (workInProgress2.flags & 128), JSCompiler_temp;
(JSCompiler_temp = didSuspend) || (JSCompiler_temp = null !== current2 && null === current2.memoizedState ? false : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
JSCompiler_temp && (showFallback = true, workInProgress2.flags &= -129);
JSCompiler_temp = 0 !== (workInProgress2.flags & 32);
workInProgress2.flags &= -33;
if (null === current2) {
if (isHydrating) {
showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress2) : reuseSuspenseHandlerOnStack(workInProgress2);
if (isHydrating) {
var nextInstance = nextHydratableInstance, JSCompiler_temp$jscomp$0;
(JSCompiler_temp$jscomp$0 = !nextInstance) || (JSCompiler_temp$jscomp$0 = canHydrateSuspenseInstance(
nextInstance,
rootOrSingletonContext
), null !== JSCompiler_temp$jscomp$0 ? (warnIfNotHydrating(), workInProgress2.memoizedState = {
dehydrated: JSCompiler_temp$jscomp$0,
treeContext: null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null,
retryLane: 536870912,
hydrationErrors: null
}, didSuspend = createFiber(18, null, null, NoMode), didSuspend.stateNode = JSCompiler_temp$jscomp$0, didSuspend.return = workInProgress2, workInProgress2.child = didSuspend, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, JSCompiler_temp$jscomp$0 = true) : JSCompiler_temp$jscomp$0 = false, JSCompiler_temp$jscomp$0 = !JSCompiler_temp$jscomp$0);
JSCompiler_temp$jscomp$0 && (warnNonHydratedInstance(workInProgress2, nextInstance), throwOnHydrationMismatch(workInProgress2));
}
nextInstance = workInProgress2.memoizedState;
if (null !== nextInstance && (nextInstance = nextInstance.dehydrated, null !== nextInstance))
return isSuspenseInstanceFallback(nextInstance) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912, null;
popSuspenseHandler(workInProgress2);
}
nextInstance = nextProps.children;
nextProps = nextProps.fallback;
if (showFallback)
return reuseSuspenseHandlerOnStack(workInProgress2), showFallback = workInProgress2.mode, nextInstance = mountWorkInProgressOffscreenFiber(
{ mode: "hidden", children: nextInstance },
showFallback
), nextProps = createFiberFromFragment(
nextProps,
showFallback,
renderLanes2,
null
), nextInstance.return = workInProgress2, nextProps.return = workInProgress2, nextInstance.sibling = nextProps, workInProgress2.child = nextInstance, showFallback = workInProgress2.child, showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes2), showFallback.childLanes = getRemainingWorkInPrimaryTree(
current2,
JSCompiler_temp,
renderLanes2
), workInProgress2.memoizedState = SUSPENDED_MARKER, nextProps;
pushPrimaryTreeSuspenseHandler(workInProgress2);
return mountSuspensePrimaryChildren(workInProgress2, nextInstance);
}
JSCompiler_temp$jscomp$0 = current2.memoizedState;
if (null !== JSCompiler_temp$jscomp$0 && (nextInstance = JSCompiler_temp$jscomp$0.dehydrated, null !== nextInstance)) {
if (didSuspend)
workInProgress2.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags &= -257, workInProgress2 = retrySuspenseComponentWithoutHydrating(
current2,
workInProgress2,
renderLanes2
)) : null !== workInProgress2.memoizedState ? (reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null) : (reuseSuspenseHandlerOnStack(workInProgress2), showFallback = nextProps.fallback, nextInstance = workInProgress2.mode, nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
nextInstance
), showFallback = createFiberFromFragment(
showFallback,
nextInstance,
renderLanes2,
null
), showFallback.flags |= 2, nextProps.return = workInProgress2, showFallback.return = workInProgress2, nextProps.sibling = showFallback, workInProgress2.child = nextProps, reconcileChildFibers(
workInProgress2,
current2.child,
null,
renderLanes2
), nextProps = workInProgress2.child, nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes2), nextProps.childLanes = getRemainingWorkInPrimaryTree(
current2,
JSCompiler_temp,
renderLanes2
), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = showFallback);
else if (pushPrimaryTreeSuspenseHandler(workInProgress2), isHydrating && console.error(
"We should not be hydrating here. This is a bug in React. Please file a bug."
), isSuspenseInstanceFallback(nextInstance))
nextInstance = getSuspenseInstanceFallbackErrorDetails(nextInstance), JSCompiler_temp = nextInstance.digest, showFallback = nextInstance.message, nextProps = nextInstance.stack, nextInstance = nextInstance.componentStack, showFallback = showFallback ? Error(showFallback) : Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
), showFallback.stack = nextProps || "", showFallback.digest = JSCompiler_temp, JSCompiler_temp = void 0 === nextInstance ? null : nextInstance, nextProps = {
value: showFallback,
source: null,
stack: JSCompiler_temp
}, "string" === typeof JSCompiler_temp && CapturedStacks.set(showFallback, nextProps), queueHydrationError(nextProps), workInProgress2 = retrySuspenseComponentWithoutHydrating(
current2,
workInProgress2,
renderLanes2
);
else if (didReceiveUpdate || propagateParentContextChanges(
current2,
workInProgress2,
renderLanes2,
false
), JSCompiler_temp = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || JSCompiler_temp) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp && (nextProps = renderLanes2 & -renderLanes2, nextProps = 0 !== (nextProps & 42) ? 1 : getBumpedLaneForHydrationByLane(nextProps), nextProps = 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes2)) ? 0 : nextProps, 0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane))
throw JSCompiler_temp$jscomp$0.retryLane = nextProps, enqueueConcurrentRenderForLane(current2, nextProps), scheduleUpdateOnFiber(JSCompiler_temp, current2, nextProps), SelectiveHydrationException;
isSuspenseInstancePending(nextInstance) || renderDidSuspendDelayIfPossible();
workInProgress2 = retrySuspenseComponentWithoutHydrating(
current2,
workInProgress2,
renderLanes2
);
} else
isSuspenseInstancePending(nextInstance) ? (workInProgress2.flags |= 192, workInProgress2.child = current2.child, workInProgress2 = null) : (current2 = JSCompiler_temp$jscomp$0.treeContext, supportsHydration && (nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(nextInstance), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && (warnIfNotHydrating(), idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextId = current2.id, treeContextOverflow = current2.overflow, treeContextProvider = workInProgress2)), workInProgress2 = mountSuspensePrimaryChildren(
workInProgress2,
nextProps.children
), workInProgress2.flags |= 4096);
return workInProgress2;
}
if (showFallback)
return reuseSuspenseHandlerOnStack(workInProgress2), showFallback = nextProps.fallback, nextInstance = workInProgress2.mode, JSCompiler_temp$jscomp$0 = current2.child, didSuspend = JSCompiler_temp$jscomp$0.sibling, nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, {
mode: "hidden",
children: nextProps.children
}), nextProps.subtreeFlags = JSCompiler_temp$jscomp$0.subtreeFlags & 65011712, null !== didSuspend ? showFallback = createWorkInProgress(didSuspend, showFallback) : (showFallback = createFiberFromFragment(
showFallback,
nextInstance,
renderLanes2,
null
), showFallback.flags |= 2), showFallback.return = workInProgress2, nextProps.return = workInProgress2, nextProps.sibling = showFallback, workInProgress2.child = nextProps, nextProps = showFallback, showFallback = workInProgress2.child, nextInstance = current2.child.memoizedState, null === nextInstance ? nextInstance = mountSuspenseOffscreenState(renderLanes2) : (JSCompiler_temp$jscomp$0 = nextInstance.cachePool, null !== JSCompiler_temp$jscomp$0 ? (didSuspend = isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2, JSCompiler_temp$jscomp$0 = JSCompiler_temp$jscomp$0.parent !== didSuspend ? { parent: didSuspend, pool: didSuspend } : JSCompiler_temp$jscomp$0) : JSCompiler_temp$jscomp$0 = getSuspendedCache(), nextInstance = {
baseLanes: nextInstance.baseLanes | renderLanes2,
cachePool: JSCompiler_temp$jscomp$0
}), showFallback.memoizedState = nextInstance, showFallback.childLanes = getRemainingWorkInPrimaryTree(
current2,
JSCompiler_temp,
renderLanes2
), workInProgress2.memoizedState = SUSPENDED_MARKER, nextProps;
pushPrimaryTreeSuspenseHandler(workInProgress2);
renderLanes2 = current2.child;
current2 = renderLanes2.sibling;
renderLanes2 = createWorkInProgress(renderLanes2, {
mode: "visible",
children: nextProps.children
});
renderLanes2.return = workInProgress2;
renderLanes2.sibling = null;
null !== current2 && (JSCompiler_temp = workInProgress2.deletions, null === JSCompiler_temp ? (workInProgress2.deletions = [current2], workInProgress2.flags |= 16) : JSCompiler_temp.push(current2));
workInProgress2.child = renderLanes2;
workInProgress2.memoizedState = null;
return renderLanes2;
}
function mountSuspensePrimaryChildren(workInProgress2, primaryChildren) {
primaryChildren = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: primaryChildren },
workInProgress2.mode
);
primaryChildren.return = workInProgress2;
return workInProgress2.child = primaryChildren;
}
function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
offscreenProps = createFiber(22, offscreenProps, null, mode);
offscreenProps.lanes = 0;
offscreenProps.stateNode = {
_visibility: 1,
_pendingMarkers: null,
_retryCache: null,
_transitions: null
};
return offscreenProps;
}
function retrySuspenseComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
current2 = mountSuspensePrimaryChildren(
workInProgress2,
workInProgress2.pendingProps.children
);
current2.flags |= 2;
workInProgress2.memoizedState = null;
return current2;
}
function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) {
fiber.lanes |= renderLanes2;
var alternate = fiber.alternate;
null !== alternate && (alternate.lanes |= renderLanes2);
scheduleContextWorkOnParentPath(
fiber.return,
renderLanes2,
propagationRoot
);
}
function validateSuspenseListNestedChild(childSlot, index) {
var isAnArray = isArrayImpl(childSlot);
childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot);
return isAnArray || childSlot ? (isAnArray = isAnArray ? "array" : "iterable", console.error(
"A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",
isAnArray,
index,
isAnArray
), false) : true;
}
function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode) {
var renderState = workInProgress2.memoizedState;
null === renderState ? workInProgress2.memoizedState = {
isBackwards,
rendering: null,
renderingStartTime: 0,
last: lastContentRow,
tail,
tailMode
} : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode);
}
function updateSuspenseListComponent(current2, workInProgress2, renderLanes2) {
var nextProps = workInProgress2.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail;
nextProps = nextProps.children;
if (void 0 !== revealOrder && "forwards" !== revealOrder && "backwards" !== revealOrder && "together" !== revealOrder && !didWarnAboutRevealOrder[revealOrder])
if (didWarnAboutRevealOrder[revealOrder] = true, "string" === typeof revealOrder)
switch (revealOrder.toLowerCase()) {
case "together":
case "forwards":
case "backwards":
console.error(
'"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',
revealOrder,
revealOrder.toLowerCase()
);
break;
case "forward":
case "backward":
console.error(
'"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',
revealOrder,
revealOrder.toLowerCase()
);
break;
default:
console.error(
'"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',
revealOrder
);
}
else
console.error(
'%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',
revealOrder
);
void 0 === tailMode || didWarnAboutTailOptions[tailMode] || ("collapsed" !== tailMode && "hidden" !== tailMode ? (didWarnAboutTailOptions[tailMode] = true, console.error(
'"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',
tailMode
)) : "forwards" !== revealOrder && "backwards" !== revealOrder && (didWarnAboutTailOptions[tailMode] = true, console.error(
'<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',
tailMode
)));
a: if (("forwards" === revealOrder || "backwards" === revealOrder) && void 0 !== nextProps && null !== nextProps && false !== nextProps)
if (isArrayImpl(nextProps))
for (var i2 = 0; i2 < nextProps.length; i2++) {
if (!validateSuspenseListNestedChild(nextProps[i2], i2)) break a;
}
else if (i2 = getIteratorFn(nextProps), "function" === typeof i2) {
if (i2 = i2.call(nextProps))
for (var step = i2.next(), _i = 0; !step.done; step = i2.next()) {
if (!validateSuspenseListNestedChild(step.value, _i)) break a;
_i++;
}
} else
console.error(
'A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',
revealOrder
);
reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
nextProps = suspenseStackCursor.current;
if (0 !== (nextProps & ForceSuspenseFallback))
nextProps = nextProps & SubtreeSuspenseContextMask | ForceSuspenseFallback, workInProgress2.flags |= 128;
else {
if (null !== current2 && 0 !== (current2.flags & 128))
a: for (current2 = workInProgress2.child; null !== current2; ) {
if (13 === current2.tag)
null !== current2.memoizedState && scheduleSuspenseWorkOnFiber(
current2,
renderLanes2,
workInProgress2
);
else if (19 === current2.tag)
scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
else if (null !== current2.child) {
current2.child.return = current2;
current2 = current2.child;
continue;
}
if (current2 === workInProgress2) break a;
for (; null === current2.sibling; ) {
if (null === current2.return || current2.return === workInProgress2)
break a;
current2 = current2.return;
}
current2.sibling.return = current2.return;
current2 = current2.sibling;
}
nextProps &= SubtreeSuspenseContextMask;
}
push(suspenseStackCursor, nextProps, workInProgress2);
switch (revealOrder) {
case "forwards":
renderLanes2 = workInProgress2.child;
for (revealOrder = null; null !== renderLanes2; )
current2 = renderLanes2.alternate, null !== current2 && null === findFirstSuspended(current2) && (revealOrder = renderLanes2), renderLanes2 = renderLanes2.sibling;
renderLanes2 = revealOrder;
null === renderLanes2 ? (revealOrder = workInProgress2.child, workInProgress2.child = null) : (revealOrder = renderLanes2.sibling, renderLanes2.sibling = null);
initSuspenseListRenderState(
workInProgress2,
false,
revealOrder,
renderLanes2,
tailMode
);
break;
case "backwards":
renderLanes2 = null;
revealOrder = workInProgress2.child;
for (workInProgress2.child = null; null !== revealOrder; ) {
current2 = revealOrder.alternate;
if (null !== current2 && null === findFirstSuspended(current2)) {
workInProgress2.child = revealOrder;
break;
}
current2 = revealOrder.sibling;
revealOrder.sibling = renderLanes2;
renderLanes2 = revealOrder;
revealOrder = current2;
}
initSuspenseListRenderState(
workInProgress2,
true,
renderLanes2,
null,
tailMode
);
break;
case "together":
initSuspenseListRenderState(workInProgress2, false, null, null, void 0);
break;
default:
workInProgress2.memoizedState = null;
}
return workInProgress2.child;
}
function bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2) {
null !== current2 && (workInProgress2.dependencies = current2.dependencies);
profilerStartTime = -1;
workInProgressRootSkippedLanes |= workInProgress2.lanes;
if (0 === (renderLanes2 & workInProgress2.childLanes))
if (null !== current2) {
if (propagateParentContextChanges(
current2,
workInProgress2,
renderLanes2,
false
), 0 === (renderLanes2 & workInProgress2.childLanes))
return null;
} else return null;
if (null !== current2 && workInProgress2.child !== current2.child)
throw Error("Resuming work not yet implemented.");
if (null !== workInProgress2.child) {
current2 = workInProgress2.child;
renderLanes2 = createWorkInProgress(current2, current2.pendingProps);
workInProgress2.child = renderLanes2;
for (renderLanes2.return = workInProgress2; null !== current2.sibling; )
current2 = current2.sibling, renderLanes2 = renderLanes2.sibling = createWorkInProgress(current2, current2.pendingProps), renderLanes2.return = workInProgress2;
renderLanes2.sibling = null;
}
return workInProgress2.child;
}
function checkScheduledUpdateOrContext(current2, renderLanes2) {
if (0 !== (current2.lanes & renderLanes2)) return true;
current2 = current2.dependencies;
return null !== current2 && checkIfContextChanged(current2) ? true : false;
}
function attemptEarlyBailoutIfNoScheduledUpdate(current2, workInProgress2, renderLanes2) {
switch (workInProgress2.tag) {
case 3:
pushHostContainer(
workInProgress2,
workInProgress2.stateNode.containerInfo
);
pushProvider(
workInProgress2,
CacheContext,
current2.memoizedState.cache
);
resetHydrationState();
break;
case 27:
case 5:
pushHostContext(workInProgress2);
break;
case 4:
pushHostContainer(
workInProgress2,
workInProgress2.stateNode.containerInfo
);
break;
case 10:
pushProvider(
workInProgress2,
workInProgress2.type,
workInProgress2.memoizedProps.value
);
break;
case 12:
0 !== (renderLanes2 & workInProgress2.childLanes) && (workInProgress2.flags |= 4);
workInProgress2.flags |= 2048;
var stateNode = workInProgress2.stateNode;
stateNode.effectDuration = -0;
stateNode.passiveEffectDuration = -0;
break;
case 13:
stateNode = workInProgress2.memoizedState;
if (null !== stateNode) {
if (null !== stateNode.dehydrated)
return pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags |= 128, null;
if (0 !== (renderLanes2 & workInProgress2.child.childLanes))
return updateSuspenseComponent(
current2,
workInProgress2,
renderLanes2
);
pushPrimaryTreeSuspenseHandler(workInProgress2);
current2 = bailoutOnAlreadyFinishedWork(
current2,
workInProgress2,
renderLanes2
);
return null !== current2 ? current2.sibling : null;
}
pushPrimaryTreeSuspenseHandler(workInProgress2);
break;
case 19:
var didSuspendBefore = 0 !== (current2.flags & 128);
stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes);
stateNode || (propagateParentContextChanges(
current2,
workInProgress2,
renderLanes2,
false
), stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes));
if (didSuspendBefore) {
if (stateNode)
return updateSuspenseListComponent(
current2,
workInProgress2,
renderLanes2
);
workInProgress2.flags |= 128;
}
didSuspendBefore = workInProgress2.memoizedState;
null !== didSuspendBefore && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null);
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress2
);
if (stateNode) break;
else return null;
case 22:
case 23:
return workInProgress2.lanes = 0, updateOffscreenComponent(current2, workInProgress2, renderLanes2);
case 24:
pushProvider(
workInProgress2,
CacheContext,
current2.memoizedState.cache
);
}
return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
}
function beginWork(current2, workInProgress2, renderLanes2) {
if (workInProgress2._debugNeedsRemount && null !== current2) {
renderLanes2 = createFiberFromTypeAndProps(
workInProgress2.type,
workInProgress2.key,
workInProgress2.pendingProps,
workInProgress2._debugOwner || null,
workInProgress2.mode,
workInProgress2.lanes
);
renderLanes2._debugStack = workInProgress2._debugStack;
renderLanes2._debugTask = workInProgress2._debugTask;
var returnFiber = workInProgress2.return;
if (null === returnFiber) throw Error("Cannot swap the root fiber.");
current2.alternate = null;
workInProgress2.alternate = null;
renderLanes2.index = workInProgress2.index;
renderLanes2.sibling = workInProgress2.sibling;
renderLanes2.return = workInProgress2.return;
renderLanes2.ref = workInProgress2.ref;
renderLanes2._debugInfo = workInProgress2._debugInfo;
if (workInProgress2 === returnFiber.child)
returnFiber.child = renderLanes2;
else {
var prevSibling = returnFiber.child;
if (null === prevSibling)
throw Error("Expected parent to have a child.");
for (; prevSibling.sibling !== workInProgress2; )
if (prevSibling = prevSibling.sibling, null === prevSibling)
throw Error("Expected to find the previous sibling.");
prevSibling.sibling = renderLanes2;
}
workInProgress2 = returnFiber.deletions;
null === workInProgress2 ? (returnFiber.deletions = [current2], returnFiber.flags |= 16) : workInProgress2.push(current2);
renderLanes2.flags |= 2;
return renderLanes2;
}
if (null !== current2)
if (current2.memoizedProps !== workInProgress2.pendingProps || workInProgress2.type !== current2.type)
didReceiveUpdate = true;
else {
if (!checkScheduledUpdateOrContext(current2, renderLanes2) && 0 === (workInProgress2.flags & 128))
return didReceiveUpdate = false, attemptEarlyBailoutIfNoScheduledUpdate(
current2,
workInProgress2,
renderLanes2
);
didReceiveUpdate = 0 !== (current2.flags & 131072) ? true : false;
}
else {
didReceiveUpdate = false;
if (returnFiber = isHydrating)
warnIfNotHydrating(), returnFiber = 0 !== (workInProgress2.flags & 1048576);
returnFiber && (returnFiber = workInProgress2.index, warnIfNotHydrating(), pushTreeId(workInProgress2, treeForkCount, returnFiber));
}
workInProgress2.lanes = 0;
switch (workInProgress2.tag) {
case 16:
a: if (returnFiber = workInProgress2.pendingProps, current2 = callLazyInitInDEV(workInProgress2.elementType), workInProgress2.type = current2, "function" === typeof current2)
shouldConstruct(current2) ? (returnFiber = resolveClassComponentProps(
current2,
returnFiber
), workInProgress2.tag = 1, workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateClassComponent(
null,
workInProgress2,
current2,
returnFiber,
renderLanes2
)) : (workInProgress2.tag = 0, validateFunctionComponentInDev(workInProgress2, current2), workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateFunctionComponent(
null,
workInProgress2,
current2,
returnFiber,
renderLanes2
));
else {
if (void 0 !== current2 && null !== current2) {
if (prevSibling = current2.$$typeof, prevSibling === REACT_FORWARD_REF_TYPE) {
workInProgress2.tag = 11;
workInProgress2.type = current2 = resolveForwardRefForHotReloading(current2);
workInProgress2 = updateForwardRef(
null,
workInProgress2,
current2,
returnFiber,
renderLanes2
);
break a;
} else if (prevSibling === REACT_MEMO_TYPE) {
workInProgress2.tag = 14;
workInProgress2 = updateMemoComponent(
null,
workInProgress2,
current2,
returnFiber,
renderLanes2
);
break a;
}
}
workInProgress2 = "";
null !== current2 && "object" === typeof current2 && current2.$$typeof === REACT_LAZY_TYPE && (workInProgress2 = " Did you wrap a component in React.lazy() more than once?");
current2 = getComponentNameFromType(current2) || current2;
throw Error(
"Element type is invalid. Received a promise that resolves to: " + current2 + ". Lazy element type must resolve to a class or function." + workInProgress2
);
}
return workInProgress2;
case 0:
return updateFunctionComponent(
current2,
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps,
renderLanes2
);
case 1:
return returnFiber = workInProgress2.type, prevSibling = resolveClassComponentProps(
returnFiber,
workInProgress2.pendingProps
), updateClassComponent(
current2,
workInProgress2,
returnFiber,
prevSibling,
renderLanes2
);
case 3:
a: {
pushHostContainer(
workInProgress2,
workInProgress2.stateNode.containerInfo
);
if (null === current2)
throw Error(
"Should have a current fiber. This is a bug in React."
);
var nextProps = workInProgress2.pendingProps;
prevSibling = workInProgress2.memoizedState;
returnFiber = prevSibling.element;
cloneUpdateQueue(current2, workInProgress2);
processUpdateQueue(workInProgress2, nextProps, null, renderLanes2);
var nextState = workInProgress2.memoizedState;
nextProps = nextState.cache;
pushProvider(workInProgress2, CacheContext, nextProps);
nextProps !== prevSibling.cache && propagateContextChanges(
workInProgress2,
[CacheContext],
renderLanes2,
true
);
suspendIfUpdateReadFromEntangledAsyncAction();
nextProps = nextState.element;
if (supportsHydration && prevSibling.isDehydrated)
if (prevSibling = {
element: nextProps,
isDehydrated: false,
cache: nextState.cache
}, workInProgress2.updateQueue.baseState = prevSibling, workInProgress2.memoizedState = prevSibling, workInProgress2.flags & 256) {
workInProgress2 = mountHostRootWithoutHydrating(
current2,
workInProgress2,
nextProps,
renderLanes2
);
break a;
} else if (nextProps !== returnFiber) {
returnFiber = createCapturedValueAtFiber(
Error(
"This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."
),
workInProgress2
);
queueHydrationError(returnFiber);
workInProgress2 = mountHostRootWithoutHydrating(
current2,
workInProgress2,
nextProps,
renderLanes2
);
break a;
} else
for (supportsHydration && (nextHydratableInstance = getFirstHydratableChildWithinContainer(
workInProgress2.stateNode.containerInfo
), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = true), current2 = mountChildFibers(
workInProgress2,
null,
nextProps,
renderLanes2
), workInProgress2.child = current2; current2; )
current2.flags = current2.flags & -3 | 4096, current2 = current2.sibling;
else {
resetHydrationState();
if (nextProps === returnFiber) {
workInProgress2 = bailoutOnAlreadyFinishedWork(
current2,
workInProgress2,
renderLanes2
);
break a;
}
reconcileChildren(
current2,
workInProgress2,
nextProps,
renderLanes2
);
}
workInProgress2 = workInProgress2.child;
}
return workInProgress2;
case 26:
if (supportsResources)
return markRef(current2, workInProgress2), null === current2 ? (current2 = getResource(
workInProgress2.type,
null,
workInProgress2.pendingProps,
null
)) ? workInProgress2.memoizedState = current2 : isHydrating || (workInProgress2.stateNode = createHoistableInstance(
workInProgress2.type,
workInProgress2.pendingProps,
requiredContext(rootInstanceStackCursor.current),
workInProgress2
)) : workInProgress2.memoizedState = getResource(
workInProgress2.type,
current2.memoizedProps,
workInProgress2.pendingProps,
current2.memoizedState
), null;
case 27:
if (supportsSingletons)
return pushHostContext(workInProgress2), null === current2 && supportsSingletons && isHydrating && (prevSibling = requiredContext(
rootInstanceStackCursor.current
), returnFiber = getHostContext(), prevSibling = workInProgress2.stateNode = resolveSingletonInstance(
workInProgress2.type,
workInProgress2.pendingProps,
prevSibling,
returnFiber,
false
), didSuspendOrErrorDEV || (returnFiber = diffHydratedPropsForDevWarnings(
prevSibling,
workInProgress2.type,
workInProgress2.pendingProps,
returnFiber
), null !== returnFiber && (buildHydrationDiffNode(workInProgress2, 0).serverProps = returnFiber)), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, nextHydratableInstance = getFirstHydratableChildWithinSingleton(
workInProgress2.type,
prevSibling,
nextHydratableInstance
)), reconcileChildren(
current2,
workInProgress2,
workInProgress2.pendingProps.children,
renderLanes2
), markRef(current2, workInProgress2), null === current2 && (workInProgress2.flags |= 4194304), workInProgress2.child;
case 5:
return null === current2 && isHydrating && (nextProps = getHostContext(), returnFiber = validateHydratableInstance(
workInProgress2.type,
workInProgress2.pendingProps,
nextProps
), prevSibling = nextHydratableInstance, (nextState = !prevSibling) || (nextState = canHydrateInstance(
prevSibling,
workInProgress2.type,
workInProgress2.pendingProps,
rootOrSingletonContext
), null !== nextState ? (workInProgress2.stateNode = nextState, didSuspendOrErrorDEV || (nextProps = diffHydratedPropsForDevWarnings(
nextState,
workInProgress2.type,
workInProgress2.pendingProps,
nextProps
), null !== nextProps && (buildHydrationDiffNode(workInProgress2, 0).serverProps = nextProps)), hydrationParentFiber = workInProgress2, nextHydratableInstance = getFirstHydratableChild(nextState), rootOrSingletonContext = false, nextProps = true) : nextProps = false, nextState = !nextProps), nextState && (returnFiber && warnNonHydratedInstance(workInProgress2, prevSibling), throwOnHydrationMismatch(workInProgress2))), pushHostContext(workInProgress2), prevSibling = workInProgress2.type, nextProps = workInProgress2.pendingProps, nextState = null !== current2 ? current2.memoizedProps : null, returnFiber = nextProps.children, shouldSetTextContent(prevSibling, nextProps) ? returnFiber = null : null !== nextState && shouldSetTextContent(prevSibling, nextState) && (workInProgress2.flags |= 32), null !== workInProgress2.memoizedState && (prevSibling = renderWithHooks(
current2,
workInProgress2,
TransitionAwareHostComponent,
null,
null,
renderLanes2
), isPrimaryRenderer ? HostTransitionContext._currentValue = prevSibling : HostTransitionContext._currentValue2 = prevSibling), markRef(current2, workInProgress2), reconcileChildren(
current2,
workInProgress2,
returnFiber,
renderLanes2
), workInProgress2.child;
case 6:
return null === current2 && isHydrating && (current2 = workInProgress2.pendingProps, renderLanes2 = getHostContext(), current2 = validateHydratableTextInstance(current2, renderLanes2), renderLanes2 = nextHydratableInstance, (returnFiber = !renderLanes2) || (returnFiber = canHydrateTextInstance(
renderLanes2,
workInProgress2.pendingProps,
rootOrSingletonContext
), null !== returnFiber ? (workInProgress2.stateNode = returnFiber, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, returnFiber = true) : returnFiber = false, returnFiber = !returnFiber), returnFiber && (current2 && warnNonHydratedInstance(workInProgress2, renderLanes2), throwOnHydrationMismatch(workInProgress2))), null;
case 13:
return updateSuspenseComponent(current2, workInProgress2, renderLanes2);
case 4:
return pushHostContainer(
workInProgress2,
workInProgress2.stateNode.containerInfo
), returnFiber = workInProgress2.pendingProps, null === current2 ? workInProgress2.child = reconcileChildFibers(
workInProgress2,
null,
returnFiber,
renderLanes2
) : reconcileChildren(
current2,
workInProgress2,
returnFiber,
renderLanes2
), workInProgress2.child;
case 11:
return updateForwardRef(
current2,
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps,
renderLanes2
);
case 7:
return reconcileChildren(
current2,
workInProgress2,
workInProgress2.pendingProps,
renderLanes2
), workInProgress2.child;
case 8:
return reconcileChildren(
current2,
workInProgress2,
workInProgress2.pendingProps.children,
renderLanes2
), workInProgress2.child;
case 12:
return workInProgress2.flags |= 4, workInProgress2.flags |= 2048, returnFiber = workInProgress2.stateNode, returnFiber.effectDuration = -0, returnFiber.passiveEffectDuration = -0, reconcileChildren(
current2,
workInProgress2,
workInProgress2.pendingProps.children,
renderLanes2
), workInProgress2.child;
case 10:
return returnFiber = workInProgress2.type, prevSibling = workInProgress2.pendingProps, nextProps = prevSibling.value, "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || (hasWarnedAboutUsingNoValuePropOnContextProvider = true, console.error(
"The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"
)), pushProvider(workInProgress2, returnFiber, nextProps), reconcileChildren(
current2,
workInProgress2,
prevSibling.children,
renderLanes2
), workInProgress2.child;
case 9:
return prevSibling = workInProgress2.type._context, returnFiber = workInProgress2.pendingProps.children, "function" !== typeof returnFiber && console.error(
"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
), prepareToReadContext(workInProgress2), prevSibling = readContext(prevSibling), markComponentRenderStarted(workInProgress2), returnFiber = callComponentInDEV(
returnFiber,
prevSibling,
void 0
), markComponentRenderStopped(), workInProgress2.flags |= 1, reconcileChildren(
current2,
workInProgress2,
returnFiber,
renderLanes2
), workInProgress2.child;
case 14:
return updateMemoComponent(
current2,
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps,
renderLanes2
);
case 15:
return updateSimpleMemoComponent(
current2,
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps,
renderLanes2
);
case 19:
return updateSuspenseListComponent(
current2,
workInProgress2,
renderLanes2
);
case 31:
return returnFiber = workInProgress2.pendingProps, renderLanes2 = workInProgress2.mode, returnFiber = {
mode: returnFiber.mode,
children: returnFiber.children
}, null === current2 ? (current2 = mountWorkInProgressOffscreenFiber(
returnFiber,
renderLanes2
), current2.ref = workInProgress2.ref, workInProgress2.child = current2, current2.return = workInProgress2, workInProgress2 = current2) : (current2 = createWorkInProgress(current2.child, returnFiber), current2.ref = workInProgress2.ref, workInProgress2.child = current2, current2.return = workInProgress2, workInProgress2 = current2), workInProgress2;
case 22:
return updateOffscreenComponent(current2, workInProgress2, renderLanes2);
case 24:
return prepareToReadContext(workInProgress2), returnFiber = readContext(CacheContext), null === current2 ? (prevSibling = peekCacheFromPool(), null === prevSibling && (prevSibling = workInProgressRoot, nextProps = createCache(), prevSibling.pooledCache = nextProps, retainCache(nextProps), null !== nextProps && (prevSibling.pooledCacheLanes |= renderLanes2), prevSibling = nextProps), workInProgress2.memoizedState = {
parent: returnFiber,
cache: prevSibling
}, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, prevSibling)) : (0 !== (current2.lanes & renderLanes2) && (cloneUpdateQueue(current2, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), prevSibling = current2.memoizedState, nextProps = workInProgress2.memoizedState, prevSibling.parent !== returnFiber ? (prevSibling = {
parent: returnFiber,
cache: returnFiber
}, workInProgress2.memoizedState = prevSibling, 0 === workInProgress2.lanes && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = prevSibling), pushProvider(workInProgress2, CacheContext, returnFiber)) : (returnFiber = nextProps.cache, pushProvider(workInProgress2, CacheContext, returnFiber), returnFiber !== prevSibling.cache && propagateContextChanges(
workInProgress2,
[CacheContext],
renderLanes2,
true
))), reconcileChildren(
current2,
workInProgress2,
workInProgress2.pendingProps.children,
renderLanes2
), workInProgress2.child;
case 29:
throw workInProgress2.pendingProps;
}
throw Error(
"Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
);
}
function markUpdate(workInProgress2) {
workInProgress2.flags |= 4;
}
function doesRequireClone(current2, completedWork) {
if (null !== current2 && current2.child === completedWork.child) return false;
if (0 !== (completedWork.flags & 16)) return true;
for (current2 = completedWork.child; null !== current2; ) {
if (0 !== (current2.flags & 13878) || 0 !== (current2.subtreeFlags & 13878))
return true;
current2 = current2.sibling;
}
return false;
}
function appendAllChildren(parent, workInProgress2, needsVisibilityToggle, isHidden2) {
if (supportsMutation)
for (needsVisibilityToggle = workInProgress2.child; null !== needsVisibilityToggle; ) {
if (5 === needsVisibilityToggle.tag || 6 === needsVisibilityToggle.tag)
appendInitialChild(parent, needsVisibilityToggle.stateNode);
else if (!(4 === needsVisibilityToggle.tag || supportsSingletons && 27 === needsVisibilityToggle.tag) && null !== needsVisibilityToggle.child) {
needsVisibilityToggle.child.return = needsVisibilityToggle;
needsVisibilityToggle = needsVisibilityToggle.child;
continue;
}
if (needsVisibilityToggle === workInProgress2) break;
for (; null === needsVisibilityToggle.sibling; ) {
if (null === needsVisibilityToggle.return || needsVisibilityToggle.return === workInProgress2)
return;
needsVisibilityToggle = needsVisibilityToggle.return;
}
needsVisibilityToggle.sibling.return = needsVisibilityToggle.return;
needsVisibilityToggle = needsVisibilityToggle.sibling;
}
else if (supportsPersistence)
for (var _node = workInProgress2.child; null !== _node; ) {
if (5 === _node.tag) {
var instance2 = _node.stateNode;
needsVisibilityToggle && isHidden2 && (instance2 = cloneHiddenInstance(
instance2,
_node.type,
_node.memoizedProps
));
appendInitialChild(parent, instance2);
} else if (6 === _node.tag)
instance2 = _node.stateNode, needsVisibilityToggle && isHidden2 && (instance2 = cloneHiddenTextInstance(
instance2,
_node.memoizedProps
)), appendInitialChild(parent, instance2);
else if (4 !== _node.tag) {
if (22 === _node.tag && null !== _node.memoizedState)
instance2 = _node.child, null !== instance2 && (instance2.return = _node), appendAllChildren(parent, _node, true, true);
else if (null !== _node.child) {
_node.child.return = _node;
_node = _node.child;
continue;
}
}
if (_node === workInProgress2) break;
for (; null === _node.sibling; ) {
if (null === _node.return || _node.return === workInProgress2)
return;
_node = _node.return;
}
_node.sibling.return = _node.return;
_node = _node.sibling;
}
}
function appendAllChildrenToContainer(containerChildSet, workInProgress2, needsVisibilityToggle, isHidden2) {
var hasOffscreenComponentChild = false;
if (supportsPersistence)
for (var node = workInProgress2.child; null !== node; ) {
if (5 === node.tag) {
var instance2 = node.stateNode;
needsVisibilityToggle && isHidden2 && (instance2 = cloneHiddenInstance(
instance2,
node.type,
node.memoizedProps
));
appendChildToContainerChildSet(containerChildSet, instance2);
} else if (6 === node.tag)
instance2 = node.stateNode, needsVisibilityToggle && isHidden2 && (instance2 = cloneHiddenTextInstance(
instance2,
node.memoizedProps
)), appendChildToContainerChildSet(containerChildSet, instance2);
else if (4 !== node.tag) {
if (22 === node.tag && null !== node.memoizedState)
hasOffscreenComponentChild = node.child, null !== hasOffscreenComponentChild && (hasOffscreenComponentChild.return = node), appendAllChildrenToContainer(containerChildSet, node, true, true), hasOffscreenComponentChild = true;
else if (null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
}
if (node === workInProgress2) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === workInProgress2)
return hasOffscreenComponentChild;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
return hasOffscreenComponentChild;
}
function updateHostContainer(current2, workInProgress2) {
if (supportsPersistence && doesRequireClone(current2, workInProgress2)) {
current2 = workInProgress2.stateNode;
var container = current2.containerInfo, newChildSet = createContainerChildSet();
appendAllChildrenToContainer(newChildSet, workInProgress2, false, false);
current2.pendingChildren = newChildSet;
markUpdate(workInProgress2);
finalizeContainerChildren(container, newChildSet);
}
}
function updateHostComponent(current2, workInProgress2, type, newProps) {
if (supportsMutation)
current2.memoizedProps !== newProps && markUpdate(workInProgress2);
else if (supportsPersistence) {
var currentInstance = current2.stateNode, _oldProps = current2.memoizedProps;
if ((current2 = doesRequireClone(current2, workInProgress2)) || _oldProps !== newProps) {
var currentHostContext = getHostContext();
_oldProps = cloneInstance(
currentInstance,
type,
_oldProps,
newProps,
!current2,
null
);
_oldProps === currentInstance ? workInProgress2.stateNode = currentInstance : (finalizeInitialChildren(
_oldProps,
type,
newProps,
currentHostContext
) && markUpdate(workInProgress2), workInProgress2.stateNode = _oldProps, current2 ? appendAllChildren(_oldProps, workInProgress2, false, false) : markUpdate(workInProgress2));
} else workInProgress2.stateNode = currentInstance;
}
}
function preloadInstanceAndSuspendIfNeeded(workInProgress2, type, props) {
if (maySuspendCommit(type, props)) {
if (workInProgress2.flags |= 16777216, !preloadInstance(type, props))
if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
else
throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
} else workInProgress2.flags &= -16777217;
}
function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) {
if (mayResourceSuspendCommit(resource)) {
if (workInProgress2.flags |= 16777216, !preloadResource(resource))
if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
else
throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
} else workInProgress2.flags &= -16777217;
}
function scheduleRetryEffect(workInProgress2, retryQueue) {
null !== retryQueue && (workInProgress2.flags |= 4);
workInProgress2.flags & 16384 && (retryQueue = 22 !== workInProgress2.tag ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue);
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
if (!isHydrating)
switch (renderState.tailMode) {
case "hidden":
hasRenderedATailFallback = renderState.tail;
for (var lastTailNode = null; null !== hasRenderedATailFallback; )
null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling;
null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null;
break;
case "collapsed":
lastTailNode = renderState.tail;
for (var _lastTailNode = null; null !== lastTailNode; )
null !== lastTailNode.alternate && (_lastTailNode = lastTailNode), lastTailNode = lastTailNode.sibling;
null === _lastTailNode ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : _lastTailNode.sibling = null;
}
}
function bubbleProperties(completedWork) {
var didBailout = null !== completedWork.alternate && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0;
if (didBailout)
if ((completedWork.mode & 2) !== NoMode) {
for (var _treeBaseDuration = completedWork.selfBaseDuration, _child2 = completedWork.child; null !== _child2; )
newChildLanes |= _child2.lanes | _child2.childLanes, subtreeFlags |= _child2.subtreeFlags & 65011712, subtreeFlags |= _child2.flags & 65011712, _treeBaseDuration += _child2.treeBaseDuration, _child2 = _child2.sibling;
completedWork.treeBaseDuration = _treeBaseDuration;
} else
for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags & 65011712, subtreeFlags |= _treeBaseDuration.flags & 65011712, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
else if ((completedWork.mode & 2) !== NoMode) {
_treeBaseDuration = completedWork.actualDuration;
_child2 = completedWork.selfBaseDuration;
for (var child = completedWork.child; null !== child; )
newChildLanes |= child.lanes | child.childLanes, subtreeFlags |= child.subtreeFlags, subtreeFlags |= child.flags, _treeBaseDuration += child.actualDuration, _child2 += child.treeBaseDuration, child = child.sibling;
completedWork.actualDuration = _treeBaseDuration;
completedWork.treeBaseDuration = _child2;
} else
for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags, subtreeFlags |= _treeBaseDuration.flags, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
completedWork.subtreeFlags |= subtreeFlags;
completedWork.childLanes = newChildLanes;
return didBailout;
}
function completeWork(current2, workInProgress2, renderLanes2) {
var newProps = workInProgress2.pendingProps;
popTreeContext(workInProgress2);
switch (workInProgress2.tag) {
case 31:
case 16:
case 15:
case 0:
case 11:
case 7:
case 8:
case 12:
case 9:
case 14:
return bubbleProperties(workInProgress2), null;
case 1:
return bubbleProperties(workInProgress2), null;
case 3:
renderLanes2 = workInProgress2.stateNode;
newProps = null;
null !== current2 && (newProps = current2.memoizedState.cache);
workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048);
popProvider(CacheContext, workInProgress2);
popHostContainer(workInProgress2);
renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null);
if (null === current2 || null === current2.child)
popHydrationState(workInProgress2) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress2)) : null === current2 || current2.memoizedState.isDehydrated && 0 === (workInProgress2.flags & 256) || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable());
updateHostContainer(current2, workInProgress2);
bubbleProperties(workInProgress2);
return null;
case 26:
if (supportsResources) {
renderLanes2 = workInProgress2.type;
var nextResource = workInProgress2.memoizedState;
null === current2 ? (markUpdate(workInProgress2), null !== nextResource ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
workInProgress2,
nextResource
)) : (bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
workInProgress2,
renderLanes2,
newProps
))) : nextResource ? nextResource !== current2.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
workInProgress2,
nextResource
)) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (supportsMutation ? current2.memoizedProps !== newProps && markUpdate(workInProgress2) : updateHostComponent(
current2,
workInProgress2,
renderLanes2,
newProps
), bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
workInProgress2,
renderLanes2,
newProps
));
return null;
}
case 27:
if (supportsSingletons) {
popHostContext(workInProgress2);
renderLanes2 = requiredContext(rootInstanceStackCursor.current);
nextResource = workInProgress2.type;
if (null !== current2 && null != workInProgress2.stateNode)
supportsMutation ? current2.memoizedProps !== newProps && markUpdate(workInProgress2) : updateHostComponent(
current2,
workInProgress2,
nextResource,
newProps
);
else {
if (!newProps) {
if (null === workInProgress2.stateNode)
throw Error(
"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
);
bubbleProperties(workInProgress2);
return null;
}
current2 = getHostContext();
popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current2) : (current2 = resolveSingletonInstance(
nextResource,
newProps,
renderLanes2,
current2,
true
), workInProgress2.stateNode = current2, markUpdate(workInProgress2));
}
bubbleProperties(workInProgress2);
return null;
}
case 5:
popHostContext(workInProgress2);
renderLanes2 = workInProgress2.type;
if (null !== current2 && null != workInProgress2.stateNode)
updateHostComponent(current2, workInProgress2, renderLanes2, newProps);
else {
if (!newProps) {
if (null === workInProgress2.stateNode)
throw Error(
"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
);
bubbleProperties(workInProgress2);
return null;
}
current2 = getHostContext();
popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current2) : (nextResource = requiredContext(
rootInstanceStackCursor.current
), nextResource = createInstance2(
renderLanes2,
newProps,
nextResource,
current2,
workInProgress2
), appendAllChildren(nextResource, workInProgress2, false, false), workInProgress2.stateNode = nextResource, finalizeInitialChildren(
nextResource,
renderLanes2,
newProps,
current2
) && markUpdate(workInProgress2));
}
bubbleProperties(workInProgress2);
preloadInstanceAndSuspendIfNeeded(
workInProgress2,
workInProgress2.type,
workInProgress2.pendingProps
);
return null;
case 6:
if (current2 && null != workInProgress2.stateNode)
renderLanes2 = current2.memoizedProps, supportsMutation ? renderLanes2 !== newProps && markUpdate(workInProgress2) : supportsPersistence && (renderLanes2 !== newProps ? (current2 = requiredContext(
rootInstanceStackCursor.current
), renderLanes2 = getHostContext(), workInProgress2.stateNode = createTextInstance(
newProps,
current2,
renderLanes2,
workInProgress2
), markUpdate(workInProgress2)) : workInProgress2.stateNode = current2.stateNode);
else {
if ("string" !== typeof newProps && null === workInProgress2.stateNode)
throw Error(
"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
);
current2 = requiredContext(rootInstanceStackCursor.current);
renderLanes2 = getHostContext();
if (popHydrationState(workInProgress2)) {
if (!supportsHydration)
throw Error(
"Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
);
current2 = workInProgress2.stateNode;
renderLanes2 = workInProgress2.memoizedProps;
nextResource = !didSuspendOrErrorDEV;
newProps = null;
var returnFiber = hydrationParentFiber;
if (null !== returnFiber)
switch (returnFiber.tag) {
case 3:
nextResource && (nextResource = diffHydratedTextForDevWarnings(
current2,
renderLanes2,
newProps
), null !== nextResource && (buildHydrationDiffNode(workInProgress2, 0).serverProps = nextResource));
break;
case 27:
case 5:
newProps = returnFiber.memoizedProps, nextResource && (nextResource = diffHydratedTextForDevWarnings(
current2,
renderLanes2,
newProps
), null !== nextResource && (buildHydrationDiffNode(
workInProgress2,
0
).serverProps = nextResource));
}
hydrateTextInstance(
current2,
renderLanes2,
workInProgress2,
newProps
) || throwOnHydrationMismatch(workInProgress2);
} else
workInProgress2.stateNode = createTextInstance(
newProps,
current2,
renderLanes2,
workInProgress2
);
}
bubbleProperties(workInProgress2);
return null;
case 13:
newProps = workInProgress2.memoizedState;
if (null === current2 || null !== current2.memoizedState && null !== current2.memoizedState.dehydrated) {
nextResource = popHydrationState(workInProgress2);
if (null !== newProps && null !== newProps.dehydrated) {
if (null === current2) {
if (!nextResource)
throw Error(
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
);
if (!supportsHydration)
throw Error(
"Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
);
nextResource = workInProgress2.memoizedState;
nextResource = null !== nextResource ? nextResource.dehydrated : null;
if (!nextResource)
throw Error(
"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
);
hydrateSuspenseInstance(nextResource, workInProgress2);
bubbleProperties(workInProgress2);
(workInProgress2.mode & 2) !== NoMode && null !== newProps && (nextResource = workInProgress2.child, null !== nextResource && (workInProgress2.treeBaseDuration -= nextResource.treeBaseDuration));
} else
emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & 2) !== NoMode && null !== newProps && (nextResource = workInProgress2.child, null !== nextResource && (workInProgress2.treeBaseDuration -= nextResource.treeBaseDuration));
nextResource = false;
} else
nextResource = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = nextResource), nextResource = true;
if (!nextResource) {
if (workInProgress2.flags & 256)
return popSuspenseHandler(workInProgress2), workInProgress2;
popSuspenseHandler(workInProgress2);
return null;
}
}
popSuspenseHandler(workInProgress2);
if (0 !== (workInProgress2.flags & 128))
return workInProgress2.lanes = renderLanes2, (workInProgress2.mode & 2) !== NoMode && transferActualDuration(workInProgress2), workInProgress2;
renderLanes2 = null !== newProps;
current2 = null !== current2 && null !== current2.memoizedState;
renderLanes2 && (newProps = workInProgress2.child, nextResource = null, null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (nextResource = newProps.alternate.memoizedState.cachePool.pool), returnFiber = null, null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && (returnFiber = newProps.memoizedState.cachePool.pool), returnFiber !== nextResource && (newProps.flags |= 2048));
renderLanes2 !== current2 && renderLanes2 && (workInProgress2.child.flags |= 8192);
scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue);
bubbleProperties(workInProgress2);
(workInProgress2.mode & 2) !== NoMode && renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
return null;
case 4:
return popHostContainer(workInProgress2), updateHostContainer(current2, workInProgress2), null === current2 && preparePortalMount(workInProgress2.stateNode.containerInfo), bubbleProperties(workInProgress2), null;
case 10:
return popProvider(workInProgress2.type, workInProgress2), bubbleProperties(workInProgress2), null;
case 19:
pop(suspenseStackCursor, workInProgress2);
nextResource = workInProgress2.memoizedState;
if (null === nextResource)
return bubbleProperties(workInProgress2), null;
newProps = 0 !== (workInProgress2.flags & 128);
returnFiber = nextResource.rendering;
if (null === returnFiber)
if (newProps) cutOffTailIfNeeded(nextResource, false);
else {
if (workInProgressRootExitStatus !== RootInProgress || null !== current2 && 0 !== (current2.flags & 128))
for (current2 = workInProgress2.child; null !== current2; ) {
returnFiber = findFirstSuspended(current2);
if (null !== returnFiber) {
workInProgress2.flags |= 128;
cutOffTailIfNeeded(nextResource, false);
current2 = returnFiber.updateQueue;
workInProgress2.updateQueue = current2;
scheduleRetryEffect(workInProgress2, current2);
workInProgress2.subtreeFlags = 0;
current2 = renderLanes2;
for (renderLanes2 = workInProgress2.child; null !== renderLanes2; )
resetWorkInProgress(renderLanes2, current2), renderLanes2 = renderLanes2.sibling;
push(
suspenseStackCursor,
suspenseStackCursor.current & SubtreeSuspenseContextMask | ForceSuspenseFallback,
workInProgress2
);
return workInProgress2.child;
}
current2 = current2.sibling;
}
null !== nextResource.tail && now$1() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, newProps = true, cutOffTailIfNeeded(nextResource, false), workInProgress2.lanes = 4194304);
}
else {
if (!newProps)
if (current2 = findFirstSuspended(returnFiber), null !== current2) {
if (workInProgress2.flags |= 128, newProps = true, current2 = current2.updateQueue, workInProgress2.updateQueue = current2, scheduleRetryEffect(workInProgress2, current2), cutOffTailIfNeeded(nextResource, true), null === nextResource.tail && "hidden" === nextResource.tailMode && !returnFiber.alternate && !isHydrating)
return bubbleProperties(workInProgress2), null;
} else
2 * now$1() - nextResource.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128, newProps = true, cutOffTailIfNeeded(nextResource, false), workInProgress2.lanes = 4194304);
nextResource.isBackwards ? (returnFiber.sibling = workInProgress2.child, workInProgress2.child = returnFiber) : (current2 = nextResource.last, null !== current2 ? current2.sibling = returnFiber : workInProgress2.child = returnFiber, nextResource.last = returnFiber);
}
if (null !== nextResource.tail)
return current2 = nextResource.tail, nextResource.rendering = current2, nextResource.tail = current2.sibling, nextResource.renderingStartTime = now$1(), current2.sibling = null, renderLanes2 = suspenseStackCursor.current, renderLanes2 = newProps ? renderLanes2 & SubtreeSuspenseContextMask | ForceSuspenseFallback : renderLanes2 & SubtreeSuspenseContextMask, push(suspenseStackCursor, renderLanes2, workInProgress2), current2;
bubbleProperties(workInProgress2);
return null;
case 22:
case 23:
return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), newProps = null !== workInProgress2.memoizedState, null !== current2 ? null !== current2.memoizedState !== newProps && (workInProgress2.flags |= 8192) : newProps && (workInProgress2.flags |= 8192), newProps ? 0 !== (renderLanes2 & 536870912) && 0 === (workInProgress2.flags & 128) && (bubbleProperties(workInProgress2), workInProgress2.subtreeFlags & 6 && (workInProgress2.flags |= 8192)) : bubbleProperties(workInProgress2), renderLanes2 = workInProgress2.updateQueue, null !== renderLanes2 && scheduleRetryEffect(workInProgress2, renderLanes2.retryQueue), renderLanes2 = null, null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (renderLanes2 = current2.memoizedState.cachePool.pool), newProps = null, null !== workInProgress2.memoizedState && null !== workInProgress2.memoizedState.cachePool && (newProps = workInProgress2.memoizedState.cachePool.pool), newProps !== renderLanes2 && (workInProgress2.flags |= 2048), null !== current2 && pop(resumedCache, workInProgress2), null;
case 24:
return renderLanes2 = null, null !== current2 && (renderLanes2 = current2.memoizedState.cache), workInProgress2.memoizedState.cache !== renderLanes2 && (workInProgress2.flags |= 2048), popProvider(CacheContext, workInProgress2), bubbleProperties(workInProgress2), null;
case 25:
return null;
case 30:
return null;
}
throw Error(
"Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
);
}
function unwindWork(current2, workInProgress2) {
popTreeContext(workInProgress2);
switch (workInProgress2.tag) {
case 1:
return current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & 2) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
case 3:
return popProvider(CacheContext, workInProgress2), popHostContainer(workInProgress2), current2 = workInProgress2.flags, 0 !== (current2 & 65536) && 0 === (current2 & 128) ? (workInProgress2.flags = current2 & -65537 | 128, workInProgress2) : null;
case 26:
case 27:
case 5:
return popHostContext(workInProgress2), null;
case 13:
popSuspenseHandler(workInProgress2);
current2 = workInProgress2.memoizedState;
if (null !== current2 && null !== current2.dehydrated) {
if (null === workInProgress2.alternate)
throw Error(
"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
);
resetHydrationState();
}
current2 = workInProgress2.flags;
return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & 2) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
case 19:
return pop(suspenseStackCursor, workInProgress2), null;
case 4:
return popHostContainer(workInProgress2), null;
case 10:
return popProvider(workInProgress2.type, workInProgress2), null;
case 22:
case 23:
return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), null !== current2 && pop(resumedCache, workInProgress2), current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & 2) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
case 24:
return popProvider(CacheContext, workInProgress2), null;
case 25:
return null;
default:
return null;
}
}
function unwindInterruptedWork(current2, interruptedWork) {
popTreeContext(interruptedWork);
switch (interruptedWork.tag) {
case 3:
popProvider(CacheContext, interruptedWork);
popHostContainer(interruptedWork);
break;
case 26:
case 27:
case 5:
popHostContext(interruptedWork);
break;
case 4:
popHostContainer(interruptedWork);
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
case 19:
pop(suspenseStackCursor, interruptedWork);
break;
case 10:
popProvider(interruptedWork.type, interruptedWork);
break;
case 22:
case 23:
popSuspenseHandler(interruptedWork);
popHiddenContext(interruptedWork);
null !== current2 && pop(resumedCache, interruptedWork);
break;
case 24:
popProvider(CacheContext, interruptedWork);
}
}
function shouldProfile(current2) {
return (current2.mode & 2) !== NoMode;
}
function commitHookLayoutEffects(finishedWork, hookFlags) {
shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
}
function commitHookLayoutUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
hookFlags,
finishedWork,
nearestMountedAncestor
), recordEffectDuration()) : commitHookEffectListUnmount(
hookFlags,
finishedWork,
nearestMountedAncestor
);
}
function commitHookEffectListMount(flags, finishedWork) {
try {
var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
if (null !== lastEffect) {
var firstEffect = lastEffect.next;
updateQueue = firstEffect;
do {
if ((updateQueue.tag & flags) === flags && ((flags & Passive) !== NoFlags ? null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted && injectedProfilingHooks.markComponentPassiveEffectMountStarted(
finishedWork
) : (flags & Layout) !== NoFlags && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted && injectedProfilingHooks.markComponentLayoutEffectMountStarted(
finishedWork
), lastEffect = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = runWithFiberInDEV(
finishedWork,
callCreateInDEV,
updateQueue
), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false), (flags & Passive) !== NoFlags ? null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped && injectedProfilingHooks.markComponentPassiveEffectMountStopped() : (flags & Layout) !== NoFlags && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped && injectedProfilingHooks.markComponentLayoutEffectMountStopped(), void 0 !== lastEffect && "function" !== typeof lastEffect)) {
var hookName = void 0;
hookName = 0 !== (updateQueue.tag & Layout) ? "useLayoutEffect" : 0 !== (updateQueue.tag & Insertion) ? "useInsertionEffect" : "useEffect";
var addendum = void 0;
addendum = null === lastEffect ? " You returned null. If your effect does not require clean up, return undefined (or nothing)." : "function" === typeof lastEffect.then ? "\n\nIt looks like you wrote " + hookName + "(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n" + hookName + "(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching" : " You returned: " + lastEffect;
runWithFiberInDEV(
finishedWork,
function(n2, a) {
console.error(
"%s must not return anything besides a function, which is used for clean-up.%s",
n2,
a
);
},
hookName,
addendum
);
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
}
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
try {
var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
if (null !== lastEffect) {
var firstEffect = lastEffect.next;
updateQueue = firstEffect;
do {
if ((updateQueue.tag & flags) === flags) {
var inst = updateQueue.inst, destroy = inst.destroy;
void 0 !== destroy && (inst.destroy = void 0, (flags & Passive) !== NoFlags ? null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted && injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(
finishedWork
) : (flags & Layout) !== NoFlags && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(
finishedWork
), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = finishedWork, runWithFiberInDEV(
lastEffect,
callDestroyInDEV,
lastEffect,
nearestMountedAncestor,
destroy
), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false), (flags & Passive) !== NoFlags ? null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && injectedProfilingHooks.markComponentLayoutEffectUnmountStopped());
}
updateQueue = updateQueue.next;
} while (updateQueue !== firstEffect);
}
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitHookPassiveMountEffects(finishedWork, hookFlags) {
shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
}
function commitHookPassiveUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
hookFlags,
finishedWork,
nearestMountedAncestor
), recordEffectDuration()) : commitHookEffectListUnmount(
hookFlags,
finishedWork,
nearestMountedAncestor
);
}
function commitClassCallbacks(finishedWork) {
var updateQueue = finishedWork.updateQueue;
if (null !== updateQueue) {
var instance2 = finishedWork.stateNode;
finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (instance2.props !== finishedWork.memoizedProps && console.error(
"Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
getComponentNameFromFiber(finishedWork) || "instance"
), instance2.state !== finishedWork.memoizedState && console.error(
"Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
getComponentNameFromFiber(finishedWork) || "instance"
));
try {
runWithFiberInDEV(
finishedWork,
commitCallbacks,
updateQueue,
instance2
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
}
function callGetSnapshotBeforeUpdates(instance2, prevProps, prevState) {
return instance2.getSnapshotBeforeUpdate(prevProps, prevState);
}
function commitClassSnapshot(finishedWork, current2) {
var prevProps = current2.memoizedProps, prevState = current2.memoizedState;
current2 = finishedWork.stateNode;
finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (current2.props !== finishedWork.memoizedProps && console.error(
"Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
getComponentNameFromFiber(finishedWork) || "instance"
), current2.state !== finishedWork.memoizedState && console.error(
"Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
getComponentNameFromFiber(finishedWork) || "instance"
));
try {
var resolvedPrevProps = resolveClassComponentProps(
finishedWork.type,
prevProps,
finishedWork.elementType === finishedWork.type
);
var snapshot = runWithFiberInDEV(
finishedWork,
callGetSnapshotBeforeUpdates,
current2,
resolvedPrevProps,
prevState
);
prevProps = didWarnAboutUndefinedSnapshotBeforeUpdate;
void 0 !== snapshot || prevProps.has(finishedWork.type) || (prevProps.add(finishedWork.type), runWithFiberInDEV(finishedWork, function() {
console.error(
"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",
getComponentNameFromFiber(finishedWork)
);
}));
current2.__reactInternalSnapshotBeforeUpdate = snapshot;
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function safelyCallComponentWillUnmount(current2, nearestMountedAncestor, instance2) {
instance2.props = resolveClassComponentProps(
current2.type,
current2.memoizedProps
);
instance2.state = current2.memoizedState;
shouldProfile(current2) ? (startEffectTimer(), runWithFiberInDEV(
current2,
callComponentWillUnmountInDEV,
current2,
nearestMountedAncestor,
instance2
), recordEffectDuration()) : runWithFiberInDEV(
current2,
callComponentWillUnmountInDEV,
current2,
nearestMountedAncestor,
instance2
);
}
function commitAttachRef(finishedWork) {
var ref = finishedWork.ref;
if (null !== ref) {
switch (finishedWork.tag) {
case 26:
case 27:
case 5:
var instanceToUse = getPublicInstance(finishedWork.stateNode);
break;
case 30:
instanceToUse = finishedWork.stateNode;
break;
default:
instanceToUse = finishedWork.stateNode;
}
if ("function" === typeof ref)
if (shouldProfile(finishedWork))
try {
startEffectTimer(), finishedWork.refCleanup = ref(instanceToUse);
} finally {
recordEffectDuration();
}
else finishedWork.refCleanup = ref(instanceToUse);
else
"string" === typeof ref ? console.error("String refs are no longer supported.") : ref.hasOwnProperty("current") || console.error(
"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",
getComponentNameFromFiber(finishedWork)
), ref.current = instanceToUse;
}
}
function safelyAttachRef(current2, nearestMountedAncestor) {
try {
runWithFiberInDEV(current2, commitAttachRef, current2);
} catch (error) {
captureCommitPhaseError(current2, nearestMountedAncestor, error);
}
}
function safelyDetachRef(current2, nearestMountedAncestor) {
var ref = current2.ref, refCleanup = current2.refCleanup;
if (null !== ref)
if ("function" === typeof refCleanup)
try {
if (shouldProfile(current2))
try {
startEffectTimer(), runWithFiberInDEV(current2, refCleanup);
} finally {
recordEffectDuration(current2);
}
else runWithFiberInDEV(current2, refCleanup);
} catch (error) {
captureCommitPhaseError(current2, nearestMountedAncestor, error);
} finally {
current2.refCleanup = null, current2 = current2.alternate, null != current2 && (current2.refCleanup = null);
}
else if ("function" === typeof ref)
try {
if (shouldProfile(current2))
try {
startEffectTimer(), runWithFiberInDEV(current2, ref, null);
} finally {
recordEffectDuration(current2);
}
else runWithFiberInDEV(current2, ref, null);
} catch (error$3) {
captureCommitPhaseError(current2, nearestMountedAncestor, error$3);
}
else ref.current = null;
}
function commitProfiler(finishedWork, current2, commitStartTime2, effectDuration) {
var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit;
_finishedWork$memoize = _finishedWork$memoize.onRender;
current2 = null === current2 ? "mount" : "update";
currentUpdateIsNested && (current2 = "nested-update");
"function" === typeof _finishedWork$memoize && _finishedWork$memoize(
id,
current2,
finishedWork.actualDuration,
finishedWork.treeBaseDuration,
finishedWork.actualStartTime,
commitStartTime2
);
"function" === typeof onCommit && onCommit(
finishedWork.memoizedProps.id,
current2,
effectDuration,
commitStartTime2
);
}
function commitProfilerPostCommitImpl(finishedWork, current2, commitStartTime2, passiveEffectDuration) {
var _finishedWork$memoize2 = finishedWork.memoizedProps;
finishedWork = _finishedWork$memoize2.id;
_finishedWork$memoize2 = _finishedWork$memoize2.onPostCommit;
current2 = null === current2 ? "mount" : "update";
currentUpdateIsNested && (current2 = "nested-update");
"function" === typeof _finishedWork$memoize2 && _finishedWork$memoize2(
finishedWork,
current2,
passiveEffectDuration,
commitStartTime2
);
}
function commitHostMount(finishedWork) {
var type = finishedWork.type, props = finishedWork.memoizedProps, instance2 = finishedWork.stateNode;
try {
runWithFiberInDEV(
finishedWork,
commitMount,
instance2,
type,
props,
finishedWork
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitHostUpdate(finishedWork, newProps, oldProps) {
try {
runWithFiberInDEV(
finishedWork,
commitUpdate,
finishedWork.stateNode,
finishedWork.type,
oldProps,
newProps,
finishedWork
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || (supportsResources ? 26 === fiber.tag : false) || (supportsSingletons ? 27 === fiber.tag && isSingletonScope(fiber.type) : false) || 4 === fiber.tag;
}
function getHostSibling(fiber) {
a: for (; ; ) {
for (; null === fiber.sibling; ) {
if (null === fiber.return || isHostParent(fiber.return)) return null;
fiber = fiber.return;
}
fiber.sibling.return = fiber.return;
for (fiber = fiber.sibling; 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag; ) {
if (supportsSingletons && 27 === fiber.tag && isSingletonScope(fiber.type))
continue a;
if (fiber.flags & 2) continue a;
if (null === fiber.child || 4 === fiber.tag) continue a;
else fiber.child.return = fiber, fiber = fiber.child;
}
if (!(fiber.flags & 2)) return fiber.stateNode;
}
}
function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
var tag = node.tag;
if (5 === tag || 6 === tag)
node = node.stateNode, before ? insertInContainerBefore(parent, node, before) : appendChildToContainer(parent, node);
else if (4 !== tag && (supportsSingletons && 27 === tag && isSingletonScope(node.type) && (parent = node.stateNode, before = null), node = node.child, null !== node))
for (insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling; null !== node; )
insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling;
}
function insertOrAppendPlacementNode(node, before, parent) {
var tag = node.tag;
if (5 === tag || 6 === tag)
node = node.stateNode, before ? insertBefore(parent, node, before) : appendChild(parent, node);
else if (4 !== tag && (supportsSingletons && 27 === tag && isSingletonScope(node.type) && (parent = node.stateNode), node = node.child, null !== node))
for (insertOrAppendPlacementNode(node, before, parent), node = node.sibling; null !== node; )
insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
}
function commitPlacement(finishedWork) {
if (supportsMutation) {
for (var hostParentFiber, parentFiber = finishedWork.return; null !== parentFiber; ) {
if (isHostParent(parentFiber)) {
hostParentFiber = parentFiber;
break;
}
parentFiber = parentFiber.return;
}
if (null == hostParentFiber)
throw Error(
"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
);
switch (hostParentFiber.tag) {
case 27:
if (supportsSingletons) {
hostParentFiber = hostParentFiber.stateNode;
parentFiber = getHostSibling(finishedWork);
insertOrAppendPlacementNode(
finishedWork,
parentFiber,
hostParentFiber
);
break;
}
case 5:
parentFiber = hostParentFiber.stateNode;
hostParentFiber.flags & 32 && (resetTextContent(parentFiber), hostParentFiber.flags &= -33);
hostParentFiber = getHostSibling(finishedWork);
insertOrAppendPlacementNode(
finishedWork,
hostParentFiber,
parentFiber
);
break;
case 3:
case 4:
hostParentFiber = hostParentFiber.stateNode.containerInfo;
parentFiber = getHostSibling(finishedWork);
insertOrAppendPlacementNodeIntoContainer(
finishedWork,
parentFiber,
hostParentFiber
);
break;
default:
throw Error(
"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
);
}
}
}
function commitHostPortalContainerChildren(portal, finishedWork, pendingChildren) {
portal = portal.containerInfo;
try {
runWithFiberInDEV(
finishedWork,
replaceContainerChildren,
portal,
pendingChildren
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitHostSingletonAcquisition(finishedWork) {
var singleton = finishedWork.stateNode, props = finishedWork.memoizedProps;
try {
runWithFiberInDEV(
finishedWork,
acquireSingletonInstance,
finishedWork.type,
props,
singleton,
finishedWork
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function commitBeforeMutationEffects(root, firstChild) {
prepareForCommit(root.containerInfo);
for (nextEffect = firstChild; null !== nextEffect; )
if (root = nextEffect, firstChild = root.child, 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
firstChild.return = root, nextEffect = firstChild;
else
for (; null !== nextEffect; ) {
firstChild = root = nextEffect;
var current2 = firstChild.alternate, flags = firstChild.flags;
switch (firstChild.tag) {
case 0:
break;
case 11:
case 15:
break;
case 1:
0 !== (flags & 1024) && null !== current2 && commitClassSnapshot(firstChild, current2);
break;
case 3:
0 !== (flags & 1024) && supportsMutation && clearContainer(firstChild.stateNode.containerInfo);
break;
case 5:
case 26:
case 27:
case 6:
case 4:
case 17:
break;
default:
if (0 !== (flags & 1024))
throw Error(
"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
);
}
firstChild = root.sibling;
if (null !== firstChild) {
firstChild.return = root.return;
nextEffect = firstChild;
break;
}
nextEffect = root.return;
}
}
function commitLayoutEffectOnFiber(finishedRoot, current2, finishedWork) {
var flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 4 && commitHookLayoutEffects(finishedWork, Layout | HasEffect);
break;
case 1:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
if (flags & 4)
if (finishedRoot = finishedWork.stateNode, null === current2)
finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
"Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
getComponentNameFromFiber(finishedWork) || "instance"
), finishedRoot.state !== finishedWork.memoizedState && console.error(
"Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
getComponentNameFromFiber(finishedWork) || "instance"
)), shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
finishedWork,
callComponentDidMountInDEV,
finishedWork,
finishedRoot
), recordEffectDuration()) : runWithFiberInDEV(
finishedWork,
callComponentDidMountInDEV,
finishedWork,
finishedRoot
);
else {
var prevProps = resolveClassComponentProps(
finishedWork.type,
current2.memoizedProps
);
current2 = current2.memoizedState;
finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
"Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
getComponentNameFromFiber(finishedWork) || "instance"
), finishedRoot.state !== finishedWork.memoizedState && console.error(
"Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
getComponentNameFromFiber(finishedWork) || "instance"
));
shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
finishedWork,
callComponentDidUpdateInDEV,
finishedWork,
finishedRoot,
prevProps,
current2,
finishedRoot.__reactInternalSnapshotBeforeUpdate
), recordEffectDuration()) : runWithFiberInDEV(
finishedWork,
callComponentDidUpdateInDEV,
finishedWork,
finishedRoot,
prevProps,
current2,
finishedRoot.__reactInternalSnapshotBeforeUpdate
);
}
flags & 64 && commitClassCallbacks(finishedWork);
flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
break;
case 3:
current2 = pushNestedEffectDurations();
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
if (flags & 64 && (flags = finishedWork.updateQueue, null !== flags)) {
prevProps = null;
if (null !== finishedWork.child)
switch (finishedWork.child.tag) {
case 27:
case 5:
prevProps = getPublicInstance(finishedWork.child.stateNode);
break;
case 1:
prevProps = finishedWork.child.stateNode;
}
try {
runWithFiberInDEV(
finishedWork,
commitCallbacks,
flags,
prevProps
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
finishedRoot.effectDuration += popNestedEffectDurations(current2);
break;
case 27:
supportsSingletons && null === current2 && flags & 4 && commitHostSingletonAcquisition(finishedWork);
case 26:
case 5:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
null === current2 && flags & 4 && commitHostMount(finishedWork);
flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
break;
case 12:
if (flags & 4) {
flags = pushNestedEffectDurations();
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
finishedRoot = finishedWork.stateNode;
finishedRoot.effectDuration += bubbleNestedEffectDurations(flags);
try {
runWithFiberInDEV(
finishedWork,
commitProfiler,
finishedWork,
current2,
commitStartTime,
finishedRoot.effectDuration
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
} else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
flags & 64 && (finishedRoot = finishedWork.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot && (finishedWork = retryDehydratedSuspenseBoundary.bind(
null,
finishedWork
), registerSuspenseInstanceRetry(finishedRoot, finishedWork))));
break;
case 22:
flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
if (!flags) {
current2 = null !== current2 && null !== current2.memoizedState || offscreenSubtreeWasHidden;
prevProps = offscreenSubtreeIsHidden;
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
offscreenSubtreeIsHidden = flags;
(offscreenSubtreeWasHidden = current2) && !prevOffscreenSubtreeWasHidden ? recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
0 !== (finishedWork.subtreeFlags & 8772)
) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
offscreenSubtreeIsHidden = prevProps;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
}
break;
case 30:
break;
default:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
}
}
function detachFiberAfterEffects(fiber) {
var alternate = fiber.alternate;
null !== alternate && (fiber.alternate = null, detachFiberAfterEffects(alternate));
fiber.child = null;
fiber.deletions = null;
fiber.sibling = null;
5 === fiber.tag && (alternate = fiber.stateNode, null !== alternate && detachDeletedInstance(alternate));
fiber.stateNode = null;
fiber._debugOwner = null;
fiber.return = null;
fiber.dependencies = null;
fiber.memoizedProps = null;
fiber.memoizedState = null;
fiber.pendingProps = null;
fiber.stateNode = null;
fiber.updateQueue = null;
}
function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
for (parent = parent.child; null !== parent; )
commitDeletionEffectsOnFiber(
finishedRoot,
nearestMountedAncestor,
parent
), parent = parent.sibling;
}
function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
try {
injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
} catch (err) {
hasLoggedError || (hasLoggedError = true, console.error(
"React instrumentation encountered an error: %s",
err
));
}
switch (deletedFiber.tag) {
case 26:
if (supportsResources) {
offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
deletedFiber.memoizedState ? releaseResource(deletedFiber.memoizedState) : deletedFiber.stateNode && unmountHoistable(deletedFiber.stateNode);
break;
}
case 27:
if (supportsSingletons) {
offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
var prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer;
isSingletonScope(deletedFiber.type) && (hostParent = deletedFiber.stateNode, hostParentIsContainer = false);
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
runWithFiberInDEV(
deletedFiber,
releaseSingletonInstance,
deletedFiber.stateNode
);
hostParent = prevHostParent;
hostParentIsContainer = prevHostParentIsContainer;
break;
}
case 5:
offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
case 6:
if (supportsMutation) {
if (prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer, hostParent = null, recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
), hostParent = prevHostParent, hostParentIsContainer = prevHostParentIsContainer, null !== hostParent)
if (hostParentIsContainer)
try {
runWithFiberInDEV(
deletedFiber,
removeChildFromContainer,
hostParent,
deletedFiber.stateNode
);
} catch (error) {
captureCommitPhaseError(
deletedFiber,
nearestMountedAncestor,
error
);
}
else
try {
runWithFiberInDEV(
deletedFiber,
removeChild,
hostParent,
deletedFiber.stateNode
);
} catch (error) {
captureCommitPhaseError(
deletedFiber,
nearestMountedAncestor,
error
);
}
} else
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
break;
case 18:
supportsMutation && null !== hostParent && (hostParentIsContainer ? clearSuspenseBoundaryFromContainer(
hostParent,
deletedFiber.stateNode
) : clearSuspenseBoundary(hostParent, deletedFiber.stateNode));
break;
case 4:
supportsMutation ? (prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer, hostParent = deletedFiber.stateNode.containerInfo, hostParentIsContainer = true, recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
), hostParent = prevHostParent, hostParentIsContainer = prevHostParentIsContainer) : (supportsPersistence && commitHostPortalContainerChildren(
deletedFiber.stateNode,
deletedFiber,
createContainerChildSet()
), recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
));
break;
case 0:
case 11:
case 14:
case 15:
offscreenSubtreeWasHidden || commitHookEffectListUnmount(
Insertion,
deletedFiber,
nearestMountedAncestor
);
offscreenSubtreeWasHidden || commitHookLayoutUnmountEffects(
deletedFiber,
nearestMountedAncestor,
Layout
);
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
break;
case 1:
offscreenSubtreeWasHidden || (safelyDetachRef(deletedFiber, nearestMountedAncestor), prevHostParent = deletedFiber.stateNode, "function" === typeof prevHostParent.componentWillUnmount && safelyCallComponentWillUnmount(
deletedFiber,
nearestMountedAncestor,
prevHostParent
));
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
break;
case 21:
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
break;
case 22:
offscreenSubtreeWasHidden = (prevHostParent = offscreenSubtreeWasHidden) || null !== deletedFiber.memoizedState;
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
offscreenSubtreeWasHidden = prevHostParent;
break;
default:
recursivelyTraverseDeletionEffects(
finishedRoot,
nearestMountedAncestor,
deletedFiber
);
}
}
function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
if (supportsHydration && null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot))))
try {
runWithFiberInDEV(
finishedWork,
commitHydratedSuspenseInstance,
finishedRoot
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 13:
case 19:
var retryCache = finishedWork.stateNode;
null === retryCache && (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
return retryCache;
case 22:
return finishedWork = finishedWork.stateNode, retryCache = finishedWork._retryCache, null === retryCache && (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache;
default:
throw Error(
"Unexpected Suspense handler tag (" + finishedWork.tag + "). This is a bug in React."
);
}
}
function attachSuspenseRetryListeners(finishedWork, wakeables) {
var retryCache = getRetryCache(finishedWork);
wakeables.forEach(function(wakeable) {
var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
if (!retryCache.has(wakeable)) {
retryCache.add(wakeable);
if (isDevToolsPresent)
if (null !== inProgressLanes && null !== inProgressRoot)
restorePendingUpdaters(inProgressRoot, inProgressLanes);
else
throw Error(
"Expected finished root and lanes to be set. This is a bug in React."
);
wakeable.then(retry, retry);
}
});
}
function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
for (var i2 = 0; i2 < deletions.length; i2++) {
var root = root$jscomp$0, returnFiber = parentFiber, deletedFiber = deletions[i2];
if (supportsMutation) {
var parent = returnFiber;
a: for (; null !== parent; ) {
switch (parent.tag) {
case 27:
if (supportsSingletons) {
if (isSingletonScope(parent.type)) {
hostParent = parent.stateNode;
hostParentIsContainer = false;
break a;
}
break;
}
case 5:
hostParent = parent.stateNode;
hostParentIsContainer = false;
break a;
case 3:
case 4:
hostParent = parent.stateNode.containerInfo;
hostParentIsContainer = true;
break a;
}
parent = parent.return;
}
if (null === hostParent)
throw Error(
"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
);
commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);
hostParent = null;
hostParentIsContainer = false;
} else commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);
root = deletedFiber;
returnFiber = root.alternate;
null !== returnFiber && (returnFiber.return = null);
root.return = null;
}
if (parentFiber.subtreeFlags & 13878)
for (parentFiber = parentFiber.child; null !== parentFiber; )
commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), parentFiber = parentFiber.sibling;
}
function commitMutationEffectsOnFiber(finishedWork, root) {
var current2 = finishedWork.alternate, flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 14:
case 15:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 4 && (commitHookEffectListUnmount(
Insertion | HasEffect,
finishedWork,
finishedWork.return
), commitHookEffectListMount(Insertion | HasEffect, finishedWork), commitHookLayoutUnmountEffects(
finishedWork,
finishedWork.return,
Layout | HasEffect
));
break;
case 1:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
flags & 64 && offscreenSubtreeIsHidden && (finishedWork = finishedWork.updateQueue, null !== finishedWork && (flags = finishedWork.callbacks, null !== flags && (current2 = finishedWork.shared.hiddenCallbacks, finishedWork.shared.hiddenCallbacks = null === current2 ? flags : current2.concat(flags))));
break;
case 26:
if (supportsResources) {
var hoistableRoot = currentHoistableRoot;
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
flags & 4 && (flags = null !== current2 ? current2.memoizedState : null, root = finishedWork.memoizedState, null === current2 ? null === root ? null === finishedWork.stateNode ? finishedWork.stateNode = hydrateHoistable(
hoistableRoot,
finishedWork.type,
finishedWork.memoizedProps,
finishedWork
) : mountHoistable(
hoistableRoot,
finishedWork.type,
finishedWork.stateNode
) : finishedWork.stateNode = acquireResource(
hoistableRoot,
root,
finishedWork.memoizedProps
) : flags !== root ? (null === flags ? null !== current2.stateNode && unmountHoistable(current2.stateNode) : releaseResource(flags), null === root ? mountHoistable(
hoistableRoot,
finishedWork.type,
finishedWork.stateNode
) : acquireResource(
hoistableRoot,
root,
finishedWork.memoizedProps
)) : null === root && null !== finishedWork.stateNode && commitHostUpdate(
finishedWork,
finishedWork.memoizedProps,
current2.memoizedProps
));
break;
}
case 27:
if (supportsSingletons) {
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
null !== current2 && flags & 4 && commitHostUpdate(
finishedWork,
finishedWork.memoizedProps,
current2.memoizedProps
);
break;
}
case 5:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
if (supportsMutation) {
if (finishedWork.flags & 32) {
root = finishedWork.stateNode;
try {
runWithFiberInDEV(finishedWork, resetTextContent, root);
} catch (error) {
captureCommitPhaseError(
finishedWork,
finishedWork.return,
error
);
}
}
flags & 4 && null != finishedWork.stateNode && (root = finishedWork.memoizedProps, commitHostUpdate(
finishedWork,
root,
null !== current2 ? current2.memoizedProps : root
));
flags & 1024 && (needsFormReset = true, "form" !== finishedWork.type && console.error(
"Unexpected host component type. Expected a form. This is a bug in React."
));
}
break;
case 6:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & 4 && supportsMutation) {
if (null === finishedWork.stateNode)
throw Error(
"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
);
flags = finishedWork.memoizedProps;
current2 = null !== current2 ? current2.memoizedProps : flags;
root = finishedWork.stateNode;
try {
runWithFiberInDEV(
finishedWork,
commitTextUpdate,
root,
current2,
flags
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
break;
case 3:
hoistableRoot = pushNestedEffectDurations();
if (supportsResources) {
prepareToCommitHoistables();
var previousHoistableRoot = currentHoistableRoot;
currentHoistableRoot = getHoistableRoot(root.containerInfo);
recursivelyTraverseMutationEffects(root, finishedWork);
currentHoistableRoot = previousHoistableRoot;
} else recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & 4) {
if (supportsMutation && supportsHydration && null !== current2 && current2.memoizedState.isDehydrated)
try {
runWithFiberInDEV(
finishedWork,
commitHydratedContainer,
root.containerInfo
);
} catch (error) {
captureCommitPhaseError(
finishedWork,
finishedWork.return,
error
);
}
if (supportsPersistence) {
flags = root.containerInfo;
current2 = root.pendingChildren;
try {
runWithFiberInDEV(
finishedWork,
replaceContainerChildren,
flags,
current2
);
} catch (error) {
captureCommitPhaseError(
finishedWork,
finishedWork.return,
error
);
}
}
}
needsFormReset && (needsFormReset = false, recursivelyResetForms(finishedWork));
root.effectDuration += popNestedEffectDurations(hoistableRoot);
break;
case 4:
supportsResources ? (current2 = currentHoistableRoot, currentHoistableRoot = getHoistableRoot(
finishedWork.stateNode.containerInfo
), recursivelyTraverseMutationEffects(root, finishedWork), commitReconciliationEffects(finishedWork), currentHoistableRoot = current2) : (recursivelyTraverseMutationEffects(root, finishedWork), commitReconciliationEffects(finishedWork));
flags & 4 && supportsPersistence && commitHostPortalContainerChildren(
finishedWork.stateNode,
finishedWork,
finishedWork.stateNode.pendingChildren
);
break;
case 12:
flags = pushNestedEffectDurations();
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags);
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
finishedWork.child.flags & 8192 && null !== finishedWork.memoizedState !== (null !== current2 && null !== current2.memoizedState) && (globalMostRecentFallbackTime = now$1());
flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 22:
hoistableRoot = null !== finishedWork.memoizedState;
var wasHidden = null !== current2 && null !== current2.memoizedState, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;
recursivelyTraverseMutationEffects(root, finishedWork);
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
commitReconciliationEffects(finishedWork);
if (flags & 8192 && (root = finishedWork.stateNode, root._visibility = hoistableRoot ? root._visibility & -2 : root._visibility | 1, hoistableRoot && (null === current2 || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || recursivelyTraverseDisappearLayoutEffects(finishedWork)), supportsMutation)) {
a: if (current2 = null, supportsMutation)
for (root = finishedWork; ; ) {
if (5 === root.tag || supportsResources && 26 === root.tag) {
if (null === current2) {
wasHidden = current2 = root;
try {
previousHoistableRoot = wasHidden.stateNode, hoistableRoot ? runWithFiberInDEV(
wasHidden,
hideInstance,
previousHoistableRoot
) : runWithFiberInDEV(
wasHidden,
unhideInstance,
wasHidden.stateNode,
wasHidden.memoizedProps
);
} catch (error) {
captureCommitPhaseError(
wasHidden,
wasHidden.return,
error
);
}
}
} else if (6 === root.tag) {
if (null === current2) {
wasHidden = root;
try {
var instance2 = wasHidden.stateNode;
hoistableRoot ? runWithFiberInDEV(
wasHidden,
hideTextInstance,
instance2
) : runWithFiberInDEV(
wasHidden,
unhideTextInstance,
instance2,
wasHidden.memoizedProps
);
} catch (error) {
captureCommitPhaseError(
wasHidden,
wasHidden.return,
error
);
}
}
} else if ((22 !== root.tag && 23 !== root.tag || null === root.memoizedState || root === finishedWork) && null !== root.child) {
root.child.return = root;
root = root.child;
continue;
}
if (root === finishedWork) break a;
for (; null === root.sibling; ) {
if (null === root.return || root.return === finishedWork)
break a;
current2 === root && (current2 = null);
root = root.return;
}
current2 === root && (current2 = null);
root.sibling.return = root.return;
root = root.sibling;
}
}
flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.retryQueue, null !== current2 && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current2))));
break;
case 19:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 30:
break;
case 21:
break;
default:
recursivelyTraverseMutationEffects(root, finishedWork), commitReconciliationEffects(finishedWork);
}
}
function commitReconciliationEffects(finishedWork) {
var flags = finishedWork.flags;
if (flags & 2) {
try {
runWithFiberInDEV(finishedWork, commitPlacement, finishedWork);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
finishedWork.flags &= -3;
}
flags & 4096 && (finishedWork.flags &= -4097);
}
function recursivelyResetForms(parentFiber) {
if (parentFiber.subtreeFlags & 1024)
for (parentFiber = parentFiber.child; null !== parentFiber; ) {
var fiber = parentFiber;
recursivelyResetForms(fiber);
5 === fiber.tag && fiber.flags & 1024 && resetFormInstance(fiber.stateNode);
parentFiber = parentFiber.sibling;
}
}
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber), parentFiber = parentFiber.sibling;
}
function disappearLayoutEffects(finishedWork) {
switch (finishedWork.tag) {
case 0:
case 11:
case 14:
case 15:
commitHookLayoutUnmountEffects(
finishedWork,
finishedWork.return,
Layout
);
recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
case 1:
safelyDetachRef(finishedWork, finishedWork.return);
var instance2 = finishedWork.stateNode;
"function" === typeof instance2.componentWillUnmount && safelyCallComponentWillUnmount(
finishedWork,
finishedWork.return,
instance2
);
recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
case 27:
supportsSingletons && runWithFiberInDEV(
finishedWork,
releaseSingletonInstance,
finishedWork.stateNode
);
case 26:
case 5:
safelyDetachRef(finishedWork, finishedWork.return);
recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
case 22:
null === finishedWork.memoizedState && recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
case 30:
recursivelyTraverseDisappearLayoutEffects(finishedWork);
break;
default:
recursivelyTraverseDisappearLayoutEffects(finishedWork);
}
}
function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
for (parentFiber = parentFiber.child; null !== parentFiber; )
disappearLayoutEffects(parentFiber), parentFiber = parentFiber.sibling;
}
function reappearLayoutEffects(finishedRoot, current2, finishedWork, includeWorkInProgressEffects) {
var flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
commitHookLayoutEffects(finishedWork, Layout);
break;
case 1:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
current2 = finishedWork.stateNode;
"function" === typeof current2.componentDidMount && runWithFiberInDEV(
finishedWork,
callComponentDidMountInDEV,
finishedWork,
current2
);
current2 = finishedWork.updateQueue;
if (null !== current2) {
finishedRoot = finishedWork.stateNode;
try {
runWithFiberInDEV(
finishedWork,
commitHiddenCallbacks,
current2,
finishedRoot
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
includeWorkInProgressEffects && flags & 64 && commitClassCallbacks(finishedWork);
safelyAttachRef(finishedWork, finishedWork.return);
break;
case 27:
supportsSingletons && commitHostSingletonAcquisition(finishedWork);
case 26:
case 5:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
includeWorkInProgressEffects && null === current2 && flags & 4 && commitHostMount(finishedWork);
safelyAttachRef(finishedWork, finishedWork.return);
break;
case 12:
if (includeWorkInProgressEffects && flags & 4) {
flags = pushNestedEffectDurations();
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
includeWorkInProgressEffects = finishedWork.stateNode;
includeWorkInProgressEffects.effectDuration += bubbleNestedEffectDurations(flags);
try {
runWithFiberInDEV(
finishedWork,
commitProfiler,
finishedWork,
current2,
commitStartTime,
includeWorkInProgressEffects.effectDuration
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
} else
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
includeWorkInProgressEffects && flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
break;
case 22:
null === finishedWork.memoizedState && recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
safelyAttachRef(finishedWork, finishedWork.return);
break;
case 30:
break;
default:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
}
}
function recursivelyTraverseReappearLayoutEffects(finishedRoot, parentFiber, includeWorkInProgressEffects) {
includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
for (parentFiber = parentFiber.child; null !== parentFiber; )
reappearLayoutEffects(
finishedRoot,
parentFiber.alternate,
parentFiber,
includeWorkInProgressEffects
), parentFiber = parentFiber.sibling;
}
function commitOffscreenPassiveMountEffects(current2, finishedWork) {
var previousCache = null;
null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (previousCache = current2.memoizedState.cachePool.pool);
current2 = null;
null !== finishedWork.memoizedState && null !== finishedWork.memoizedState.cachePool && (current2 = finishedWork.memoizedState.cachePool.pool);
current2 !== previousCache && (null != current2 && retainCache(current2), null != previousCache && releaseCache(previousCache));
}
function commitCachePassiveMountEffect(current2, finishedWork) {
current2 = null;
null !== finishedWork.alternate && (current2 = finishedWork.alternate.memoizedState.cache);
finishedWork = finishedWork.memoizedState.cache;
finishedWork !== current2 && (retainCache(finishedWork), null != current2 && releaseCache(current2));
}
function recursivelyTraversePassiveMountEffects(root, parentFiber, committedLanes, committedTransitions) {
if (parentFiber.subtreeFlags & 10256)
for (parentFiber = parentFiber.child; null !== parentFiber; )
commitPassiveMountOnFiber(
root,
parentFiber,
committedLanes,
committedTransitions
), parentFiber = parentFiber.sibling;
}
function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {
var flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
flags & 2048 && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
break;
case 1:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
flags & 2048 && (committedLanes = null, null !== finishedWork.alternate && (committedLanes = finishedWork.alternate.memoizedState.cache), finishedWork = finishedWork.memoizedState.cache, finishedWork !== committedLanes && (retainCache(finishedWork), null != committedLanes && releaseCache(committedLanes)));
finishedRoot.passiveEffectDuration += popNestedEffectDurations(prevEffectDuration);
break;
case 12:
if (flags & 2048) {
flags = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
finishedRoot = finishedWork.stateNode;
finishedRoot.passiveEffectDuration += bubbleNestedEffectDurations(flags);
try {
runWithFiberInDEV(
finishedWork,
commitProfilerPostCommitImpl,
finishedWork,
finishedWork.alternate,
commitStartTime,
finishedRoot.passiveEffectDuration
);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
} else
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 13:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 23:
break;
case 22:
prevEffectDuration = finishedWork.stateNode;
var _current = finishedWork.alternate;
null !== finishedWork.memoizedState ? prevEffectDuration._visibility & 2 ? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
) : recursivelyTraverseAtomicPassiveEffects(
finishedRoot,
finishedWork
) : prevEffectDuration._visibility & 2 ? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
) : (prevEffectDuration._visibility |= 2, recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
0 !== (finishedWork.subtreeFlags & 10256)
));
flags & 2048 && commitOffscreenPassiveMountEffects(_current, finishedWork);
break;
case 24:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
break;
default:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
}
}
function recursivelyTraverseReconnectPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions, includeWorkInProgressEffects) {
includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 10256);
for (parentFiber = parentFiber.child; null !== parentFiber; )
reconnectPassiveEffects(
finishedRoot,
parentFiber,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
), parentFiber = parentFiber.sibling;
}
function reconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects) {
var flags = finishedWork.flags;
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
);
commitHookPassiveMountEffects(finishedWork, Passive);
break;
case 23:
break;
case 22:
var _instance2 = finishedWork.stateNode;
null !== finishedWork.memoizedState ? _instance2._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
) : recursivelyTraverseAtomicPassiveEffects(
finishedRoot,
finishedWork
) : (_instance2._visibility |= 2, recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
));
includeWorkInProgressEffects && flags & 2048 && commitOffscreenPassiveMountEffects(
finishedWork.alternate,
finishedWork
);
break;
case 24:
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
);
includeWorkInProgressEffects && flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
break;
default:
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
includeWorkInProgressEffects
);
}
}
function recursivelyTraverseAtomicPassiveEffects(finishedRoot$jscomp$0, parentFiber) {
if (parentFiber.subtreeFlags & 10256)
for (parentFiber = parentFiber.child; null !== parentFiber; ) {
var finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags;
switch (finishedWork.tag) {
case 22:
recursivelyTraverseAtomicPassiveEffects(
finishedRoot,
finishedWork
);
flags & 2048 && commitOffscreenPassiveMountEffects(
finishedWork.alternate,
finishedWork
);
break;
case 24:
recursivelyTraverseAtomicPassiveEffects(
finishedRoot,
finishedWork
);
flags & 2048 && commitCachePassiveMountEffect(
finishedWork.alternate,
finishedWork
);
break;
default:
recursivelyTraverseAtomicPassiveEffects(
finishedRoot,
finishedWork
);
}
parentFiber = parentFiber.sibling;
}
}
function recursivelyAccumulateSuspenseyCommit(parentFiber) {
if (parentFiber.subtreeFlags & suspenseyCommitFlag)
for (parentFiber = parentFiber.child; null !== parentFiber; )
accumulateSuspenseyCommitOnFiber(parentFiber), parentFiber = parentFiber.sibling;
}
function accumulateSuspenseyCommitOnFiber(fiber) {
switch (fiber.tag) {
case 26:
recursivelyAccumulateSuspenseyCommit(fiber);
fiber.flags & suspenseyCommitFlag && (null !== fiber.memoizedState ? suspendResource(
currentHoistableRoot,
fiber.memoizedState,
fiber.memoizedProps
) : suspendInstance(fiber.type, fiber.memoizedProps));
break;
case 5:
recursivelyAccumulateSuspenseyCommit(fiber);
fiber.flags & suspenseyCommitFlag && suspendInstance(fiber.type, fiber.memoizedProps);
break;
case 3:
case 4:
if (supportsResources) {
var previousHoistableRoot = currentHoistableRoot;
currentHoistableRoot = getHoistableRoot(
fiber.stateNode.containerInfo
);
recursivelyAccumulateSuspenseyCommit(fiber);
currentHoistableRoot = previousHoistableRoot;
} else recursivelyAccumulateSuspenseyCommit(fiber);
break;
case 22:
null === fiber.memoizedState && (previousHoistableRoot = fiber.alternate, null !== previousHoistableRoot && null !== previousHoistableRoot.memoizedState ? (previousHoistableRoot = suspenseyCommitFlag, suspenseyCommitFlag = 16777216, recursivelyAccumulateSuspenseyCommit(fiber), suspenseyCommitFlag = previousHoistableRoot) : recursivelyAccumulateSuspenseyCommit(fiber));
break;
default:
recursivelyAccumulateSuspenseyCommit(fiber);
}
}
function detachAlternateSiblings(parentFiber) {
var previousFiber = parentFiber.alternate;
if (null !== previousFiber && (parentFiber = previousFiber.child, null !== parentFiber)) {
previousFiber.child = null;
do
previousFiber = parentFiber.sibling, parentFiber.sibling = null, parentFiber = previousFiber;
while (null !== parentFiber);
}
}
function recursivelyTraversePassiveUnmountEffects(parentFiber) {
var deletions = parentFiber.deletions;
if (0 !== (parentFiber.flags & 16)) {
if (null !== deletions)
for (var i2 = 0; i2 < deletions.length; i2++) {
var childToDelete = deletions[i2];
nextEffect = childToDelete;
commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
childToDelete,
parentFiber
);
}
detachAlternateSiblings(parentFiber);
}
if (parentFiber.subtreeFlags & 10256)
for (parentFiber = parentFiber.child; null !== parentFiber; )
commitPassiveUnmountOnFiber(parentFiber), parentFiber = parentFiber.sibling;
}
function commitPassiveUnmountOnFiber(finishedWork) {
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
recursivelyTraversePassiveUnmountEffects(finishedWork);
finishedWork.flags & 2048 && commitHookPassiveUnmountEffects(
finishedWork,
finishedWork.return,
Passive | HasEffect
);
break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveUnmountEffects(finishedWork);
finishedWork.stateNode.passiveEffectDuration += popNestedEffectDurations(prevEffectDuration);
break;
case 12:
prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveUnmountEffects(finishedWork);
finishedWork.stateNode.passiveEffectDuration += bubbleNestedEffectDurations(prevEffectDuration);
break;
case 22:
prevEffectDuration = finishedWork.stateNode;
null !== finishedWork.memoizedState && prevEffectDuration._visibility & 2 && (null === finishedWork.return || 13 !== finishedWork.return.tag) ? (prevEffectDuration._visibility &= -3, recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork);
break;
default:
recursivelyTraversePassiveUnmountEffects(finishedWork);
}
}
function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
var deletions = parentFiber.deletions;
if (0 !== (parentFiber.flags & 16)) {
if (null !== deletions)
for (var i2 = 0; i2 < deletions.length; i2++) {
var childToDelete = deletions[i2];
nextEffect = childToDelete;
commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
childToDelete,
parentFiber
);
}
detachAlternateSiblings(parentFiber);
}
for (parentFiber = parentFiber.child; null !== parentFiber; )
disconnectPassiveEffect(parentFiber), parentFiber = parentFiber.sibling;
}
function disconnectPassiveEffect(finishedWork) {
switch (finishedWork.tag) {
case 0:
case 11:
case 15:
commitHookPassiveUnmountEffects(
finishedWork,
finishedWork.return,
Passive
);
recursivelyTraverseDisconnectPassiveEffects(finishedWork);
break;
case 22:
var instance2 = finishedWork.stateNode;
instance2._visibility & 2 && (instance2._visibility &= -3, recursivelyTraverseDisconnectPassiveEffects(finishedWork));
break;
default:
recursivelyTraverseDisconnectPassiveEffects(finishedWork);
}
}
function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {
for (; null !== nextEffect; ) {
var fiber = nextEffect, current2 = fiber;
switch (current2.tag) {
case 0:
case 11:
case 15:
commitHookPassiveUnmountEffects(
current2,
nearestMountedAncestor,
Passive
);
break;
case 23:
case 22:
null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (current2 = current2.memoizedState.cachePool.pool, null != current2 && retainCache(current2));
break;
case 24:
releaseCache(current2.memoizedState.cache);
}
current2 = fiber.child;
if (null !== current2) current2.return = fiber, nextEffect = current2;
else
a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
current2 = nextEffect;
var sibling = current2.sibling, returnFiber = current2.return;
detachFiberAfterEffects(current2);
if (current2 === fiber) {
nextEffect = null;
break a;
}
if (null !== sibling) {
sibling.return = returnFiber;
nextEffect = sibling;
break a;
}
nextEffect = returnFiber;
}
}
}
function findFiberRootForHostRoot(hostRoot) {
var maybeFiber = getInstanceFromNode(hostRoot);
if (null != maybeFiber) {
if ("string" !== typeof maybeFiber.memoizedProps["data-testname"])
throw Error(
"Invalid host root specified. Should be either a React container or a node with a testname attribute."
);
return maybeFiber;
}
hostRoot = findFiberRoot(hostRoot);
if (null === hostRoot)
throw Error(
"Could not find React container within specified host subtree."
);
return hostRoot.stateNode.current;
}
function matchSelector(fiber$jscomp$0, selector) {
var tag = fiber$jscomp$0.tag;
switch (selector.$$typeof) {
case COMPONENT_TYPE:
if (fiber$jscomp$0.type === selector.value) return true;
break;
case HAS_PSEUDO_CLASS_TYPE:
a: {
selector = selector.value;
fiber$jscomp$0 = [fiber$jscomp$0, 0];
for (tag = 0; tag < fiber$jscomp$0.length; ) {
var fiber = fiber$jscomp$0[tag++], tag$jscomp$0 = fiber.tag, selectorIndex = fiber$jscomp$0[tag++], selector$jscomp$0 = selector[selectorIndex];
if (5 !== tag$jscomp$0 && 26 !== tag$jscomp$0 && 27 !== tag$jscomp$0 || !isHiddenSubtree(fiber)) {
for (; null != selector$jscomp$0 && matchSelector(fiber, selector$jscomp$0); )
selectorIndex++, selector$jscomp$0 = selector[selectorIndex];
if (selectorIndex === selector.length) {
selector = true;
break a;
} else
for (fiber = fiber.child; null !== fiber; )
fiber$jscomp$0.push(fiber, selectorIndex), fiber = fiber.sibling;
}
}
selector = false;
}
return selector;
case ROLE_TYPE:
if ((5 === tag || 26 === tag || 27 === tag) && matchAccessibilityRole(fiber$jscomp$0.stateNode, selector.value))
return true;
break;
case TEXT_TYPE:
if (5 === tag || 6 === tag || 26 === tag || 27 === tag) {
if (fiber$jscomp$0 = getTextContent(fiber$jscomp$0), null !== fiber$jscomp$0 && 0 <= fiber$jscomp$0.indexOf(selector.value))
return true;
}
break;
case TEST_NAME_TYPE:
if (5 === tag || 26 === tag || 27 === tag) {
if (fiber$jscomp$0 = fiber$jscomp$0.memoizedProps["data-testname"], "string" === typeof fiber$jscomp$0 && fiber$jscomp$0.toLowerCase() === selector.value.toLowerCase())
return true;
}
break;
default:
throw Error("Invalid selector type specified.");
}
return false;
}
function selectorToString(selector) {
switch (selector.$$typeof) {
case COMPONENT_TYPE:
return "<" + (getComponentNameFromType(selector.value) || "Unknown") + ">";
case HAS_PSEUDO_CLASS_TYPE:
return ":has(" + (selectorToString(selector) || "") + ")";
case ROLE_TYPE:
return '[role="' + selector.value + '"]';
case TEXT_TYPE:
return '"' + selector.value + '"';
case TEST_NAME_TYPE:
return '[data-testname="' + selector.value + '"]';
default:
throw Error("Invalid selector type specified.");
}
}
function findPaths(root, selectors) {
var matchingFibers = [];
root = [root, 0];
for (var index = 0; index < root.length; ) {
var fiber = root[index++], tag = fiber.tag, selectorIndex = root[index++], selector = selectors[selectorIndex];
if (5 !== tag && 26 !== tag && 27 !== tag || !isHiddenSubtree(fiber)) {
for (; null != selector && matchSelector(fiber, selector); )
selectorIndex++, selector = selectors[selectorIndex];
if (selectorIndex === selectors.length) matchingFibers.push(fiber);
else
for (fiber = fiber.child; null !== fiber; )
root.push(fiber, selectorIndex), fiber = fiber.sibling;
}
}
return matchingFibers;
}
function findAllNodes(hostRoot, selectors) {
if (!supportsTestSelectors)
throw Error("Test selector API is not supported by this renderer.");
hostRoot = findFiberRootForHostRoot(hostRoot);
hostRoot = findPaths(hostRoot, selectors);
selectors = [];
hostRoot = Array.from(hostRoot);
for (var index = 0; index < hostRoot.length; ) {
var node = hostRoot[index++], tag = node.tag;
if (5 === tag || 26 === tag || 27 === tag)
isHiddenSubtree(node) || selectors.push(node.stateNode);
else
for (node = node.child; null !== node; )
hostRoot.push(node), node = node.sibling;
}
return selectors;
}
function onCommitRoot() {
supportsTestSelectors && commitHooks.forEach(function(commitHook) {
return commitHook();
});
}
function isConcurrentActEnvironment() {
var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT ? IS_REACT_ACT_ENVIRONMENT : void 0;
isReactActEnvironmentGlobal || null === ReactSharedInternals.actQueue || console.error(
"The current testing environment is not configured to support act(...)"
);
return isReactActEnvironmentGlobal;
}
function requestUpdateLane(fiber) {
if ((executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes)
return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
var transition = ReactSharedInternals.T;
return null !== transition ? (transition._updatedFibers || (transition._updatedFibers = /* @__PURE__ */ new Set()), transition._updatedFibers.add(fiber), fiber = currentEntangledLane, 0 !== fiber ? fiber : requestTransitionLane()) : resolveUpdatePriority();
}
function requestDeferredLane() {
0 === workInProgressDeferredLane && (workInProgressDeferredLane = 0 === (workInProgressRootRenderLanes & 536870912) || isHydrating ? claimNextTransitionLane() : 536870912);
var suspenseHandler = suspenseHandlerStackCursor.current;
null !== suspenseHandler && (suspenseHandler.flags |= 32);
return workInProgressDeferredLane;
}
function scheduleUpdateOnFiber(root, fiber, lane) {
isRunningInsertionEffect && console.error("useInsertionEffect must not schedule updates.");
isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = true);
if (root === workInProgressRoot && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root.cancelPendingCommit)
prepareFreshStack(root, 0), markRootSuspended(
root,
workInProgressRootRenderLanes,
workInProgressDeferredLane,
false
);
markRootUpdated$1(root, lane);
if (0 !== (executionContext & RenderContext) && root === workInProgressRoot) {
if (isRendering)
switch (fiber.tag) {
case 0:
case 11:
case 15:
root = workInProgress && getComponentNameFromFiber(workInProgress) || "Unknown";
didWarnAboutUpdateInRenderForAnotherComponent.has(root) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root), fiber = getComponentNameFromFiber(fiber) || "Unknown", console.error(
"Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",
fiber,
root,
root
));
break;
case 1:
didWarnAboutUpdateInRender || (console.error(
"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."
), didWarnAboutUpdateInRender = true);
}
} else
isDevToolsPresent && addFiberToLanesMap(root, fiber, lane), warnIfUpdatesNotWrappedWithActDEV(fiber), root === workInProgressRoot && ((executionContext & RenderContext) === NoContext && (workInProgressRootInterleavedUpdatedLanes |= lane), workInProgressRootExitStatus === RootSuspendedWithDelay && markRootSuspended(
root,
workInProgressRootRenderLanes,
workInProgressDeferredLane,
false
)), ensureRootIsScheduled(root);
}
function performWorkOnRoot(root, lanes, forceSync) {
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw Error("Should not already be working.");
var shouldTimeSlice = !forceSync && 0 === (lanes & 124) && 0 === (lanes & root.expiredLanes) || checkIfRootIsPrerendering(root, lanes), exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes, true), renderWasConcurrent = shouldTimeSlice;
do {
if (exitStatus === RootInProgress) {
workInProgressRootIsPrerendering && !shouldTimeSlice && markRootSuspended(root, lanes, 0, false);
break;
} else {
forceSync = root.current.alternate;
if (renderWasConcurrent && !isRenderConsistentWithExternalStores(forceSync)) {
exitStatus = renderRootSync(root, lanes, false);
renderWasConcurrent = false;
continue;
}
if (exitStatus === RootErrored) {
renderWasConcurrent = lanes;
if (root.errorRecoveryDisabledLanes & renderWasConcurrent)
var errorRetryLanes = 0;
else
errorRetryLanes = root.pendingLanes & -536870913, errorRetryLanes = 0 !== errorRetryLanes ? errorRetryLanes : errorRetryLanes & 536870912 ? 536870912 : 0;
if (0 !== errorRetryLanes) {
lanes = errorRetryLanes;
a: {
exitStatus = root;
var errorRetryLanes$jscomp$0 = errorRetryLanes;
errorRetryLanes = workInProgressRootConcurrentErrors;
var wasRootDehydrated = supportsHydration && exitStatus.current.memoizedState.isDehydrated;
wasRootDehydrated && (prepareFreshStack(
exitStatus,
errorRetryLanes$jscomp$0
).flags |= 256);
errorRetryLanes$jscomp$0 = renderRootSync(
exitStatus,
errorRetryLanes$jscomp$0,
false
);
if (errorRetryLanes$jscomp$0 !== RootErrored) {
if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {
exitStatus.errorRecoveryDisabledLanes |= renderWasConcurrent;
workInProgressRootInterleavedUpdatedLanes |= renderWasConcurrent;
exitStatus = RootSuspendedWithDelay;
break a;
}
exitStatus = workInProgressRootRecoverableErrors;
workInProgressRootRecoverableErrors = errorRetryLanes;
null !== exitStatus && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = exitStatus : workInProgressRootRecoverableErrors.push.apply(
workInProgressRootRecoverableErrors,
exitStatus
));
}
exitStatus = errorRetryLanes$jscomp$0;
}
renderWasConcurrent = false;
if (exitStatus !== RootErrored) continue;
}
}
if (exitStatus === RootFatalErrored) {
prepareFreshStack(root, 0);
markRootSuspended(root, lanes, 0, true);
break;
}
a: {
shouldTimeSlice = root;
switch (exitStatus) {
case RootInProgress:
case RootFatalErrored:
throw Error("Root did not complete. This is a bug in React.");
case RootSuspendedWithDelay:
if ((lanes & 4194048) !== lanes) break;
case RootSuspendedAtTheShell:
markRootSuspended(
shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
break a;
case RootErrored:
workInProgressRootRecoverableErrors = null;
break;
case RootSuspended:
case RootCompleted:
break;
default:
throw Error("Unknown root exit status.");
}
if (null !== ReactSharedInternals.actQueue)
commitRoot(
shouldTimeSlice,
forceSync,
lanes,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
workInProgressRootDidIncludeRecursiveRenderUpdate,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes
);
else {
if ((lanes & 62914560) === lanes && (renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1(), 10 < renderWasConcurrent)) {
markRootSuspended(
shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
if (0 !== getNextLanes(shouldTimeSlice, 0, true)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
shouldTimeSlice,
forceSync,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
workInProgressRootDidIncludeRecursiveRenderUpdate,
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
exitStatus,
THROTTLED_COMMIT,
-0,
0
),
renderWasConcurrent
);
break a;
}
commitRootWhenReady(
shouldTimeSlice,
forceSync,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
workInProgressRootDidIncludeRecursiveRenderUpdate,
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
exitStatus,
IMMEDIATE_COMMIT,
-0,
0
);
}
}
}
break;
} while (1);
ensureRootIsScheduled(root);
}
function commitRootWhenReady(root, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane, updatedLanes, suspendedRetryLanes, didSkipSuspendedSiblings, exitStatus, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
root.timeoutHandle = noTimeout;
suspendedCommitReason = finishedWork.subtreeFlags;
if (suspendedCommitReason & 8192 || 16785408 === (suspendedCommitReason & 16785408)) {
if (startSuspendingCommit(), accumulateSuspenseyCommitOnFiber(finishedWork), suspendedCommitReason = waitForCommitToBeReady(), null !== suspendedCommitReason) {
root.cancelPendingCommit = suspendedCommitReason(
commitRoot.bind(
null,
root,
finishedWork,
lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
SUSPENDED_COMMIT,
completedRenderStartTime,
completedRenderEndTime
)
);
markRootSuspended(
root,
lanes,
spawnedLane,
!didSkipSuspendedSiblings
);
return;
}
}
commitRoot(
root,
finishedWork,
lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
suspendedRetryLanes
);
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
var tag = node.tag;
if ((0 === tag || 11 === tag || 15 === tag) && node.flags & 16384 && (tag = node.updateQueue, null !== tag && (tag = tag.stores, null !== tag)))
for (var i2 = 0; i2 < tag.length; i2++) {
var check = tag[i2], getSnapshot = check.getSnapshot;
check = check.value;
try {
if (!objectIs(getSnapshot(), check)) return false;
} catch (error) {
return false;
}
}
tag = node.child;
if (node.subtreeFlags & 16384 && null !== tag)
tag.return = node, node = tag;
else {
if (node === finishedWork) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === finishedWork) return true;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
return true;
}
function markRootSuspended(root, suspendedLanes, spawnedLane, didAttemptEntireTree) {
suspendedLanes &= ~workInProgressRootPingedLanes;
suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
root.suspendedLanes |= suspendedLanes;
root.pingedLanes &= ~suspendedLanes;
didAttemptEntireTree && (root.warmLanes |= suspendedLanes);
didAttemptEntireTree = root.expirationTimes;
for (var lanes = suspendedLanes; 0 < lanes; ) {
var index = 31 - clz32(lanes), lane = 1 << index;
didAttemptEntireTree[index] = -1;
lanes &= ~lane;
}
0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
}
function flushSyncWork() {
return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, false), false) : true;
}
function resetWorkInProgressStack() {
if (null !== workInProgress) {
if (workInProgressSuspendedReason === NotSuspended)
var interruptedWork = workInProgress.return;
else
interruptedWork = workInProgress, resetContextDependencies(), resetHooksOnUnwind(interruptedWork), thenableState = null, thenableIndexCounter = 0, interruptedWork = workInProgress;
for (; null !== interruptedWork; )
unwindInterruptedWork(interruptedWork.alternate, interruptedWork), interruptedWork = interruptedWork.return;
workInProgress = null;
}
}
function prepareFreshStack(root, lanes) {
var timeoutHandle = root.timeoutHandle;
timeoutHandle !== noTimeout && (root.timeoutHandle = noTimeout, cancelTimeout(timeoutHandle));
timeoutHandle = root.cancelPendingCommit;
null !== timeoutHandle && (root.cancelPendingCommit = null, timeoutHandle());
resetWorkInProgressStack();
workInProgressRoot = root;
workInProgress = timeoutHandle = createWorkInProgress(root.current, null);
workInProgressRootRenderLanes = lanes;
workInProgressSuspendedReason = NotSuspended;
workInProgressThrownValue = null;
workInProgressRootDidSkipSuspendedSiblings = false;
workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);
workInProgressRootDidAttachPingListener = false;
workInProgressRootExitStatus = RootInProgress;
workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0;
workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null;
workInProgressRootDidIncludeRecursiveRenderUpdate = false;
0 !== (lanes & 8) && (lanes |= lanes & 32);
var allEntangledLanes = root.entangledLanes;
if (0 !== allEntangledLanes)
for (root = root.entanglements, allEntangledLanes &= lanes; 0 < allEntangledLanes; ) {
var index = 31 - clz32(allEntangledLanes), lane = 1 << index;
lanes |= root[index];
allEntangledLanes &= ~lane;
}
entangledRenderLanes = lanes;
finishQueueingConcurrentUpdates();
lanes = getCurrentTime();
1e3 < lanes - lastResetTime && (ReactSharedInternals.recentlyCreatedOwnerStacks = 0, lastResetTime = lanes);
ReactStrictModeWarnings.discardPendingWarnings();
return timeoutHandle;
}
function handleThrow(root, thrownValue) {
currentlyRenderingFiber = null;
ReactSharedInternals.H = ContextOnlyDispatcher;
ReactSharedInternals.getCurrentStack = null;
isRendering = false;
current = null;
thrownValue === SuspenseException || thrownValue === SuspenseActionException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnImmediate) : thrownValue === SuspenseyCommitException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnInstance) : workInProgressSuspendedReason = thrownValue === SelectiveHydrationException ? SuspendedOnHydration : null !== thrownValue && "object" === typeof thrownValue && "function" === typeof thrownValue.then ? SuspendedOnDeprecatedThrowPromise : SuspendedOnError;
workInProgressThrownValue = thrownValue;
var erroredWork = workInProgress;
if (null === erroredWork)
workInProgressRootExitStatus = RootFatalErrored, logUncaughtError(
root,
createCapturedValueAtFiber(thrownValue, root.current)
);
else
switch (erroredWork.mode & 2 && stopProfilerTimerIfRunningAndRecordDuration(erroredWork), markComponentRenderStopped(), workInP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment