diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js index 2d08a1c..5b0dea9 100644 --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js @@ -13,6 +13,8 @@ "use strict"; +import defrost from '@d11/de-frost' + if (__DEV__) { (function () { "use strict"; @@ -21,11 +23,16 @@ if (__DEV__) { if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === - "function" + "function" ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var React = require("react"); + var updatedComponents = []; + var updatedComponentForProfiler = null; + function insertUpdateComponents(componentName, flags, key) { + updatedComponents.push({ componentName, flags, key }); + } require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore"); var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"); var Scheduler = require("scheduler"); @@ -43,8 +50,8 @@ if (__DEV__) { { for ( var _len = arguments.length, - args = new Array(_len > 1 ? _len - 1 : 0), - _key = 1; + args = new Array(_len > 1 ? _len - 1 : 0), + _key = 1; _key < _len; _key++ ) { @@ -60,8 +67,8 @@ if (__DEV__) { { for ( var _len2 = arguments.length, - args = new Array(_len2 > 1 ? _len2 - 1 : 0), - _key2 = 1; + args = new Array(_len2 > 1 ? _len2 - 1 : 0), + _key2 = 1; _key2 < _len2; _key2++ ) { @@ -239,20 +246,20 @@ if (__DEV__) { // eslint-disable-next-line react-internal/prod-error-codes error = new Error( "An error was thrown inside one of your components, but React " + - "doesn't know what it was. This is likely due to browser " + - 'flakiness. React does its best to preserve the "Pause on ' + - 'exceptions" behavior of the DevTools, which requires some ' + - "DEV-mode only tricks. It's possible that these don't work in " + - "your browser. Try triggering the error in production mode, " + - "or switching to a modern browser. If you suspect that this is " + - "actually an issue with React, please file an issue." + "doesn't know what it was. This is likely due to browser " + + 'flakiness. React does its best to preserve the "Pause on ' + + 'exceptions" behavior of the DevTools, which requires some ' + + "DEV-mode only tricks. It's possible that these don't work in " + + "your browser. Try triggering the error in production mode, " + + "or switching to a modern browser. If you suspect that this is " + + "actually an issue with React, please file an issue." ); } else if (isCrossOriginError) { // eslint-disable-next-line react-internal/prod-error-codes error = new Error( "A cross-origin error was thrown. React doesn't have access to " + - "the actual error object in development. " + - "See https://reactjs.org/link/crossorigin-error for more information." + "the actual error object in development. " + + "See https://reactjs.org/link/crossorigin-error for more information." ); } @@ -373,7 +380,7 @@ if (__DEV__) { } else { throw new Error( "clearCaughtError was called but no error was captured. This error " + - "is likely caused by a bug in React. Please file an issue." + "is likely caused by a bug in React. Please file an issue." ); } } @@ -400,7 +407,7 @@ if (__DEV__) { if (!getNodeFromInstance$1 || !getInstanceFromNode$1) { error( "EventPluginUtils.setComponentTree(...): Injected " + - "module is missing getNodeFromInstance or getInstanceFromNode." + "module is missing getNodeFromInstance or getInstanceFromNode." ); } } @@ -414,14 +421,14 @@ if (__DEV__) { var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners - ? 1 - : 0; + ? 1 + : 0; var instancesIsArr = isArray(dispatchInstances); var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances - ? 1 - : 0; + ? 1 + : 0; if ( instancesIsArr !== listenersIsArr || @@ -768,14 +775,14 @@ if (__DEV__) { Object.defineProperty( this, "preventDefault", - getPooledWarningPropertyDefinition("preventDefault", function () {}) + getPooledWarningPropertyDefinition("preventDefault", function () { }) ); Object.defineProperty( this, "stopPropagation", getPooledWarningPropertyDefinition( "stopPropagation", - function () {} + function () { } ) ); } @@ -789,7 +796,7 @@ if (__DEV__) { SyntheticEvent.extend = function (Interface) { var Super = this; - var E = function () {}; + var E = function () { }; E.prototype = Super.prototype; var prototype = new E(); @@ -838,9 +845,9 @@ if (__DEV__) { { error( "This synthetic event is reused for performance reasons. If you're seeing this, " + - "you're %s `%s` on a released/nullified synthetic event. %s. " + - "If you must keep the original synthetic event around, use event.persist(). " + - "See https://reactjs.org/link/event-pooling for more information.", + "you're %s `%s` on a released/nullified synthetic event. %s. " + + "If you must keep the original synthetic event around, use event.persist(). " + + "See https://reactjs.org/link/event-pooling for more information.", action, propName, result @@ -1007,7 +1014,7 @@ if (__DEV__) { if (identifier > MAX_TOUCH_BANK) { error( "Touch identifier %s is greater than maximum supported %s which causes " + - "performance issues backfilling array locations for all of the indices.", + "performance issues backfilling array locations for all of the indices.", identifier, MAX_TOUCH_BANK ); @@ -1046,8 +1053,8 @@ if (__DEV__) { { warn( "Cannot record touch move without a touch start.\n" + - "Touch Move: %s\n" + - "Touch Bank: %s", + "Touch Move: %s\n" + + "Touch Bank: %s", printTouch(touch), printTouchBank() ); @@ -1071,8 +1078,8 @@ if (__DEV__) { { warn( "Cannot record touch end without a touch start.\n" + - "Touch End: %s\n" + - "Touch Bank: %s", + "Touch End: %s\n" + + "Touch Bank: %s", printTouch(touch), printTouchBank() ); @@ -1489,7 +1496,7 @@ if (__DEV__) { var i; - for (i = path.length; i-- > 0; ) { + for (i = path.length; i-- > 0;) { fn(path[i], "captured", arg); } @@ -1518,10 +1525,10 @@ if (__DEV__) { if (listener && typeof listener !== "function") { throw new Error( "Expected `" + - registrationName + - "` listener to be a function, instead got a value of `" + - typeof listener + - "` type." + registrationName + + "` listener to be a function, instead got a value of `" + + typeof listener + + "` type." ); } @@ -1822,10 +1829,10 @@ to return true:wantsResponderID| | var shouldSetEventType = isStartish(topLevelType) ? eventTypes.startShouldSetResponder : isMoveish(topLevelType) - ? eventTypes.moveShouldSetResponder - : topLevelType === TOP_SELECTION_CHANGE - ? eventTypes.selectionChangeShouldSetResponder - : eventTypes.scrollShouldSetResponder; // TODO: stop one short of the current responder. + ? eventTypes.moveShouldSetResponder + : topLevelType === TOP_SELECTION_CHANGE + ? eventTypes.selectionChangeShouldSetResponder + : eventTypes.scrollShouldSetResponder; // TODO: stop one short of the current responder. var bubbleShouldSetFrom = !responderInst ? targetInst @@ -2012,11 +2019,11 @@ to return true:wantsResponderID| | nativeEvent ) ? setResponderAndExtractTransfer( - topLevelType, - targetInst, - nativeEvent, - nativeEventTarget - ) + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ) : null; // Responder may or may not have transferred on a new touch start/move. // Regardless, whoever is the responder after any potential transfer, we // direct all touch start/move/ends to them in the form of @@ -2034,10 +2041,10 @@ to return true:wantsResponderID| | var incrementalTouch = isResponderTouchStart ? eventTypes.responderStart : isResponderTouchMove - ? eventTypes.responderMove - : isResponderTouchEnd - ? eventTypes.responderEnd - : null; + ? eventTypes.responderMove + : isResponderTouchEnd + ? eventTypes.responderEnd + : null; if (incrementalTouch) { var gesture = ResponderSyntheticEvent.getPooled( @@ -2061,8 +2068,8 @@ to return true:wantsResponderID| | var finalTouch = isResponderTerminate ? eventTypes.responderTerminate : isResponderRelease - ? eventTypes.responderRelease - : null; + ? eventTypes.responderRelease + : null; if (finalTouch) { var finalEvent = ResponderSyntheticEvent.getPooled( @@ -2121,7 +2128,7 @@ to return true:wantsResponderID| | if (pluginIndex <= -1) { throw new Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in " + - ("the plugin ordering, `" + pluginName + "`.") + ("the plugin ordering, `" + pluginName + "`.") ); } @@ -2132,7 +2139,7 @@ to return true:wantsResponderID| | if (!pluginModule.extractEvents) { throw new Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` " + - ("method, but `" + pluginName + "` does not.") + ("method, but `" + pluginName + "` does not.") ); } @@ -2149,10 +2156,10 @@ to return true:wantsResponderID| | ) { throw new Error( "EventPluginRegistry: Failed to publish event `" + - eventName + - "` for plugin `" + - pluginName + - "`." + eventName + + "` for plugin `" + + pluginName + + "`." ); } } @@ -2171,7 +2178,7 @@ to return true:wantsResponderID| | if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { throw new Error( "EventPluginRegistry: More than one plugin attempted to publish the same " + - ("event name, `" + eventName + "`.") + ("event name, `" + eventName + "`.") ); } @@ -2210,7 +2217,7 @@ to return true:wantsResponderID| | if (registrationNameModules[registrationName]) { throw new Error( "EventPluginRegistry: More than one plugin attempted to publish the same " + - ("registration name, `" + registrationName + "`.") + ("registration name, `" + registrationName + "`.") ); } @@ -2253,7 +2260,7 @@ to return true:wantsResponderID| | if (eventPluginOrder) { throw new Error( "EventPluginRegistry: Cannot inject event plugin ordering more than " + - "once. You are likely trying to load more than one copy of React." + "once. You are likely trying to load more than one copy of React." ); } // Clone the ordering so it cannot be dynamically mutated. // $FlowFixMe[method-unbinding] found when upgrading Flow @@ -2288,7 +2295,7 @@ to return true:wantsResponderID| | if (namesToPlugins[pluginName]) { throw new Error( "EventPluginRegistry: Cannot inject two different event plugins " + - ("using the same name, `" + pluginName + "`.") + ("using the same name, `" + pluginName + "`.") ); } @@ -2322,10 +2329,10 @@ to return true:wantsResponderID| | if (listener && typeof listener !== "function") { throw new Error( "Expected `" + - registrationName + - "` listener to be a function, instead got a value of `" + - typeof listener + - "` type." + registrationName + + "` listener to be a function, instead got a value of `" + + typeof listener + + "` type." ); } @@ -2333,8 +2340,8 @@ to return true:wantsResponderID| | } var customBubblingEventTypes = - ReactNativePrivateInterface.ReactNativeViewConfigRegistry - .customBubblingEventTypes, + ReactNativePrivateInterface.ReactNativeViewConfigRegistry + .customBubblingEventTypes, customDirectEventTypes = ReactNativePrivateInterface.ReactNativeViewConfigRegistry .customDirectEventTypes; // Start of inline: the below functions were inlined from @@ -2398,7 +2405,7 @@ to return true:wantsResponderID| | var i; - for (i = path.length; i-- > 0; ) { + for (i = path.length; i-- > 0;) { fn(path[i], "captured", arg); } @@ -3115,7 +3122,7 @@ to return true:wantsResponderID| | if (eventQueue) { throw new Error( "processEventQueue(): Additional events were enqueued while processing " + - "an event queue. Support for this has not yet been implemented." + "an event queue. Support for this has not yet been implemented." ); } // This would be a good time to rethrow if any of the event handlers threw. @@ -3390,7 +3397,7 @@ to return true:wantsResponderID| | var prevGroupCollapsed; var prevGroupEnd; - function disabledLog() {} + function disabledLog() { } disabledLog.__reactDisabledLog = true; function disableLogs() { @@ -3468,7 +3475,7 @@ to return true:wantsResponderID| | if (disabledDepth < 0) { error( "disabledDepth fell below zero. " + - "This is a bug in React. Please file an issue." + "This is a bug in React. Please file an issue." ); } } @@ -3498,8 +3505,8 @@ to return true:wantsResponderID| | { 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://reactjs.org/link/react-devtools" + "with the current version of React. Please update React DevTools. " + + "https://reactjs.org/link/react-devtools" ); } // DevTools exists, even though it doesn't support Fiber. @@ -3642,7 +3649,7 @@ to return true:wantsResponderID| | } } // Profiler API hooks - function injectProfilingHooks(profilingHooks) {} + function injectProfilingHooks(profilingHooks) { } function getLaneLabelMap() { { @@ -4561,8 +4568,8 @@ to return true:wantsResponderID| | function shim$2() { throw new Error( "The current renderer does not support mutation. " + - "This error is likely caused by a bug in React. " + - "Please file an issue." + "This error is likely caused by a bug in React. " + + "Please file an issue." ); } // Mutation (when unsupported) var commitMount = shim$2; @@ -4572,8 +4579,8 @@ to return true:wantsResponderID| | function shim$1() { throw new Error( "The current renderer does not support hydration. " + - "This error is likely caused by a bug in React. " + - "Please file an issue." + "This error is likely caused by a bug in React. " + + "Please file an issue." ); } // Hydration (when unsupported) var isSuspenseInstancePending = shim$1; @@ -4587,8 +4594,8 @@ to return true:wantsResponderID| | function shim() { throw new Error( "The current renderer does not support Resources. " + - "This error is likely caused by a bug in React. " + - "Please file an issue." + "This error is likely caused by a bug in React. " + + "Please file an issue." ); } // Resources (when unsupported) var suspendResource = shim; @@ -5076,7 +5083,7 @@ to return true:wantsResponderID| | if (typeof type.tag === "number") { error( "Received an unexpected object in getComponentNameFromType(). " + - "This is likely a bug in React. Please file an issue." + "This is likely a bug in React. Please file an issue." ); } } @@ -5275,10 +5282,10 @@ to return true:wantsResponderID| | if (!instance._warnedAboutRefsInRender) { error( "%s is accessing isMounted inside its render() function. " + - "render() should be a pure function of props and state. It should " + - "never access something that requires stale data from the previous " + - "render, such as refs. Move this logic to componentDidMount and " + - "componentDidUpdate instead.", + "render() should be a pure function of props and state. It should " + + "never access something that requires stale data from the previous " + + "render, such as refs. Move this logic to componentDidMount and " + + "componentDidUpdate instead.", getComponentNameFromFiber(ownerFiber) || "A component" ); } @@ -5434,7 +5441,7 @@ to return true:wantsResponderID| | if (!didFindChild) { throw new Error( "Child was not found in either parent set. This indicates a bug " + - "in React related to the return pointer. Please file an issue." + "in React related to the return pointer. Please file an issue." ); } } @@ -5443,7 +5450,7 @@ to return true:wantsResponderID| | if (a.alternate !== b) { throw new Error( "Return fibers should always be each others' alternates. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } // If the root is not a host container, we're in a disconnected tree. I.e. @@ -5601,7 +5608,7 @@ to return true:wantsResponderID| | init(payload), ownerFn ); - } catch (x) {} + } catch (x) { } } } } @@ -5654,15 +5661,15 @@ to return true:wantsResponderID| | // eslint-disable-next-line react-internal/prod-error-codes var err = Error( (componentName || "React class") + - ": " + - location + - " type `" + - typeSpecName + - "` is invalid; " + - "it must be a function, usually from the `prop-types` package, but received `" + - typeof typeSpecs[typeSpecName] + - "`." + - "This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." + ": " + + location + + " type `" + + typeSpecName + + "` is invalid; " + + "it must be a function, usually from the `prop-types` package, but received `" + + typeof typeSpecs[typeSpecName] + + "`." + + "This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); err.name = "Invariant Violation"; throw err; @@ -5685,11 +5692,11 @@ to return true:wantsResponderID| | error( "%s: type specification of %s" + - " `%s` is invalid; the type checker " + - "function must return `null` or an `Error` but returned a %s. " + - "You may have forgotten to pass an argument to the type checker " + - "creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and " + - "shape all require an argument).", + " `%s` is invalid; the type checker " + + "function must return `null` or an `Error` but returned a %s. " + + "You may have forgotten to pass an argument to the type checker " + + "creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and " + + "shape all require an argument).", componentName || "React class", location, typeSpecName, @@ -5830,7 +5837,7 @@ to return true:wantsResponderID| | if ( instance && instance.__reactInternalMemoizedUnmaskedChildContext === - unmaskedContext + unmaskedContext ) { return instance.__reactInternalMemoizedMaskedChildContext; } @@ -5887,7 +5894,7 @@ to return true:wantsResponderID| | if (contextStackCursor$1.current !== emptyContextObject) { throw new Error( "Unexpected context found on stack. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } @@ -5911,8 +5918,8 @@ to return true:wantsResponderID| | error( "%s.childContextTypes is specified but there is no getChildContext() method " + - "on the instance. You can either define getChildContext() on %s or remove " + - "childContextTypes from it.", + "on the instance. You can either define getChildContext() on %s or remove " + + "childContextTypes from it.", componentName, componentName ); @@ -5928,9 +5935,9 @@ to return true:wantsResponderID| | if (!(contextKey in childContextTypes)) { throw new Error( (getComponentNameFromFiber(fiber) || "Unknown") + - '.getChildContext(): key "' + - contextKey + - '" is not defined in childContextTypes.' + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.' ); } } @@ -5978,7 +5985,7 @@ to return true:wantsResponderID| | if (!instance) { throw new Error( "Expected to have an instance by this point. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } @@ -6013,7 +6020,7 @@ to return true:wantsResponderID| | if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) { throw new Error( "Expected subtree parent to be a mounted class component. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } @@ -6040,7 +6047,7 @@ to return true:wantsResponderID| | throw new Error( "Found unexpected detached subtree parent. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -6095,7 +6102,7 @@ to return true:wantsResponderID| | if (c === null) { error( "Expected host context to exist. This error is likely caused by a bug " + - "in React. Please file an issue." + "in React. Please file an issue." ); } } @@ -6175,7 +6182,7 @@ to return true:wantsResponderID| | { throw new Error( "Expected prepareToHydrateHostInstance() to never be called. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -6184,7 +6191,7 @@ to return true:wantsResponderID| | { throw new Error( "Expected prepareToHydrateHostTextInstance() to never be called. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -6193,7 +6200,7 @@ to return true:wantsResponderID| | { throw new Error( "Expected prepareToHydrateHostSuspenseInstance() to never be called. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -6988,9 +6995,9 @@ to return true:wantsResponderID| | 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", + "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", componentName ); @@ -7454,7 +7461,7 @@ to return true:wantsResponderID| | if (typeof callback !== "function") { throw new Error( "Invalid argument passed as callback. Expected a function. Instead " + - ("received: " + callback) + ("received: " + callback) ); } @@ -7660,11 +7667,11 @@ to return true:wantsResponderID| | } var ReactStrictModeWarnings = { - recordUnsafeLifecycleWarnings: function (fiber, instance) {}, - flushPendingUnsafeLifecycleWarnings: function () {}, - recordLegacyContextWarning: function (fiber, instance) {}, - flushLegacyContextWarning: function () {}, - discardPendingWarnings: function () {} + recordUnsafeLifecycleWarnings: function (fiber, instance) { }, + flushPendingUnsafeLifecycleWarnings: function () { }, + recordLegacyContextWarning: function (fiber, instance) { }, + flushLegacyContextWarning: function () { }, + discardPendingWarnings: function () { } }; { @@ -7726,7 +7733,7 @@ to return true:wantsResponderID| | if ( typeof instance.componentWillReceiveProps === "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== - true + true ) { pendingComponentWillReceivePropsWarnings.push(fiber); } @@ -7838,9 +7845,9 @@ to return true:wantsResponderID| | error( "Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" + - "\nPlease update the following components: %s", + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" + + "\nPlease update the following components: %s", sortedNames ); } @@ -7852,13 +7859,13 @@ to return true:wantsResponderID| | error( "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended " + - "and may indicate bugs in your code. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move data fetching code or side effects to componentDidUpdate.\n" + - "* If you're updating state whenever props change, " + - "refactor your code to use memoization techniques or move it to " + - "static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n" + - "\nPlease update the following components: %s", + "and may indicate bugs in your code. " + + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move data fetching code or side effects to componentDidUpdate.\n" + + "* If you're updating state whenever props change, " + + "refactor your code to use memoization techniques or move it to " + + "static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n" + + "\nPlease update the following components: %s", _sortedNames ); } @@ -7870,10 +7877,10 @@ to return true:wantsResponderID| | error( "Using UNSAFE_componentWillUpdate in strict mode is not recommended " + - "and may indicate bugs in your code. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move data fetching code or side effects to componentDidUpdate.\n" + - "\nPlease update the following components: %s", + "and may indicate bugs in your code. " + + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move data fetching code or side effects to componentDidUpdate.\n" + + "\nPlease update the following components: %s", _sortedNames2 ); } @@ -7885,13 +7892,13 @@ to return true:wantsResponderID| | warn( "componentWillMount has been renamed, and is not recommended for use. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" + - "* Rename componentWillMount to UNSAFE_componentWillMount to suppress " + - "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + - "To rename all deprecated lifecycles to their new names, you can run " + - "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + - "\nPlease update the following components: %s", + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" + + "* Rename componentWillMount to UNSAFE_componentWillMount to suppress " + + "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + + "To rename all deprecated lifecycles to their new names, you can run " + + "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + + "\nPlease update the following components: %s", _sortedNames3 ); } @@ -7903,16 +7910,16 @@ to return true:wantsResponderID| | warn( "componentWillReceiveProps has been renamed, and is not recommended for use. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move data fetching code or side effects to componentDidUpdate.\n" + - "* If you're updating state whenever props change, refactor your " + - "code to use memoization techniques or move it to " + - "static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n" + - "* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress " + - "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + - "To rename all deprecated lifecycles to their new names, you can run " + - "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + - "\nPlease update the following components: %s", + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move data fetching code or side effects to componentDidUpdate.\n" + + "* If you're updating state whenever props change, refactor your " + + "code to use memoization techniques or move it to " + + "static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n" + + "* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress " + + "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + + "To rename all deprecated lifecycles to their new names, you can run " + + "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + + "\nPlease update the following components: %s", _sortedNames4 ); } @@ -7924,13 +7931,13 @@ to return true:wantsResponderID| | warn( "componentWillUpdate has been renamed, and is not recommended for use. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move data fetching code or side effects to componentDidUpdate.\n" + - "* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress " + - "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + - "To rename all deprecated lifecycles to their new names, you can run " + - "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + - "\nPlease update the following components: %s", + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move data fetching code or side effects to componentDidUpdate.\n" + + "* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress " + + "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + + "To rename all deprecated lifecycles to their new names, you can run " + + "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + + "\nPlease update the following components: %s", _sortedNames5 ); } @@ -7949,7 +7956,7 @@ to return true:wantsResponderID| | if (strictRoot === null) { error( "Expected to find a StrictMode component in a strict mode tree. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); return; @@ -7994,10 +8001,10 @@ to return true:wantsResponderID| | error( "Legacy context API has been detected within a strict-mode tree." + - "\n\nThe old API will be supported in all 16.x releases, but applications " + - "using it should migrate to the new version." + - "\n\nPlease update the following components: %s" + - "\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context", + "\n\nThe old API will be supported in all 16.x releases, but applications " + + "using it should migrate to the new version." + + "\n\nPlease update the following components: %s" + + "\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context", sortedNames ); } finally { @@ -8082,7 +8089,7 @@ to return true:wantsResponderID| | if (willCoercionThrow(value)) { error( "The provided key is an unsupported type %s." + - " This value must be coerced to a string before using it here.", + " This value must be coerced to a string before using it here.", typeName(value) ); @@ -8095,7 +8102,7 @@ to return true:wantsResponderID| | if (willCoercionThrow(value)) { error( "The provided `%s` prop is an unsupported type %s." + - " This value must be coerced to a string before using it here.", + " This value must be coerced to a string before using it here.", propName, typeName(value) ); @@ -8117,16 +8124,16 @@ to return true:wantsResponderID| | var SuspenseException = new Error( "Suspense Exception: This is not a real error! It's an implementation " + - "detail of `use` to interrupt the current render. You must either " + - "rethrow it immediately, or move the `use` call outside of the " + - "`try/catch` block. Capturing without rethrowing will lead to " + - "unexpected behavior.\n\n" + - "To handle async errors, wrap your component in an error boundary, or " + - "call the promise's `.catch` method and pass the result to `use`" + "detail of `use` to interrupt the current render. You must either " + + "rethrow it immediately, or move the `use` call outside of the " + + "`try/catch` block. Capturing without rethrowing will lead to " + + "unexpected behavior.\n\n" + + "To handle async errors, wrap your component in an error boundary, or " + + "call the promise's `.catch` method and pass the result to `use`" ); var SuspenseyCommitException = new Error( "Suspense Exception: This is not a real error, and should not leak into " + - "userspace. If you're seeing this, it's likely a bug in React." + "userspace. If you're seeing this, it's likely a bug in React." ); // This is a noop thenable that we use to trigger a fallback in throwException. // TODO: It would be better to refactor throwException into multiple functions // so we can trigger a fallback directly without having to check the type. But @@ -8137,7 +8144,7 @@ to return true:wantsResponderID| | { error( "Internal React error: A listener was unexpectedly attached to a " + - '"noop" thenable. This is a bug in React. Please file an issue.' + '"noop" thenable. This is a bug in React. Please file an issue.' ); } } @@ -8157,7 +8164,7 @@ to return true:wantsResponderID| | return status === "fulfilled" || status === "rejected"; } - function noop() {} + function noop() { } function trackUsedThenable(thenableState, thenable, index) { if (ReactCurrentActQueue$2.current !== null) { @@ -8196,8 +8203,8 @@ to return true:wantsResponderID| | 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." + "promises inside a Client Component or hook is not yet " + + "supported, except via a Suspense-compatible library or framework." ); } } // Avoid an unhandled rejection errors for the Promises that we'll @@ -8254,9 +8261,9 @@ to return true:wantsResponderID| | // root into offscreen mode. throw new Error( "async/await is not yet supported in Client Components, only " + - "Server Components. This error is often caused by accidentally " + - "adding `'use client'` to a module that was originally written " + - "for the server." + "Server Components. This error is often caused by accidentally " + + "adding `'use client'` to a module that was originally written " + + "for the server." ); } @@ -8323,7 +8330,7 @@ to return true:wantsResponderID| | if (suspendedThenable === null) { throw new Error( "Expected a suspended thenable. This is a bug in React. Please file " + - "an issue." + "an issue." ); } @@ -8360,8 +8367,8 @@ to return true:wantsResponderID| | if (rejectedReason === SuspenseException) { throw new 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." + "error is often caused by accidentally adding `'use client'` " + + "to a module that was originally written for the server." ); } } @@ -8374,7 +8381,7 @@ to return true:wantsResponderID| | var ownerHasKeyUseWarning; var ownerHasFunctionTypeWarning; - var warnForMissingKey = function (child, returnFiber) {}; + var warnForMissingKey = function (child, returnFiber) { }; { didWarnAboutMaps = false; @@ -8401,7 +8408,7 @@ to return true:wantsResponderID| | if (typeof child._store !== "object") { throw new Error( "React Component in warnForMissingKey should have a _store. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } // $FlowFixMe[cannot-write] unable to narrow type from mixed to writable object @@ -8417,8 +8424,8 @@ to return true:wantsResponderID| | error( "Each child in a list should have a unique " + - '"key" prop. See https://reactjs.org/link/warning-keys for ' + - "more information." + '"key" prop. See https://reactjs.org/link/warning-keys for ' + + "more information." ); }; } @@ -8461,10 +8468,10 @@ to return true:wantsResponderID| | if (!didWarnAboutStringRefs[componentName]) { error( 'Component "%s" contains the string ref "%s". Support for string refs ' + - "will be removed in a future major release. We recommend using " + - "useRef() or createRef() instead. " + - "Learn more about using refs safely here: " + - "https://reactjs.org/link/strict-mode-string-ref", + "will be removed in a future major release. We recommend using " + + "useRef() or createRef() instead. " + + "Learn more about using refs safely here: " + + "https://reactjs.org/link/strict-mode-string-ref", componentName, mixedRef ); @@ -8484,9 +8491,9 @@ to return true:wantsResponderID| | if (ownerFiber.tag !== ClassComponent) { throw new Error( "Function components cannot have string refs. " + - "We recommend using useRef() instead. " + - "Learn more about using refs safely here: " + - "https://reactjs.org/link/strict-mode-string-ref" + "We recommend using useRef() instead. " + + "Learn more about using refs safely here: " + + "https://reactjs.org/link/strict-mode-string-ref" ); } @@ -8496,9 +8503,9 @@ to return true:wantsResponderID| | if (!inst) { throw new Error( "Missing owner for string ref " + - mixedRef + - ". This error is likely caused by a " + - "bug in React. Please file an issue." + mixedRef + + ". This error is likely caused by a " + + "bug in React. Please file an issue." ); } // Assigning this to a const so Flow knows it won't change in the closure @@ -8541,13 +8548,13 @@ to return true:wantsResponderID| | if (!element._owner) { throw new Error( "Element ref was specified as a string (" + - mixedRef + - ") but no owner was set. This could happen for one of" + - " the following reasons:\n" + - "1. You may be adding a ref to a function component\n" + - "2. You may be adding a ref to a component that was not created inside a component's render method\n" + - "3. You have multiple copies of React loaded\n" + - "See https://reactjs.org/link/refs-must-have-owner for more information." + mixedRef + + ") but no owner was set. This could happen for one of" + + " the following reasons:\n" + + "1. You may be adding a ref to a function component\n" + + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + + "3. You have multiple copies of React loaded\n" + + "See https://reactjs.org/link/refs-must-have-owner for more information." ); } } @@ -8561,12 +8568,12 @@ to return true:wantsResponderID| | var childString = Object.prototype.toString.call(newChild); throw new Error( "Objects are not valid as a React child (found: " + - (childString === "[object Object]" - ? "object with keys {" + Object.keys(newChild).join(", ") + "}" - : childString) + - "). " + - "If you meant to render a collection of children, use an array " + - "instead." + (childString === "[object Object]" + ? "object with keys {" + Object.keys(newChild).join(", ") + "}" + : childString) + + "). " + + "If you meant to render a collection of children, use an array " + + "instead." ); } @@ -8583,8 +8590,8 @@ to return true:wantsResponderID| | error( "Functions are not valid as a React child. This may happen if " + - "you return a Component instead of from render. " + - "Or maybe you meant to call this function rather than return it." + "you return a Component instead of from render. " + + "Or maybe you meant to call this function rather than return it." ); } } @@ -9109,10 +9116,10 @@ to return true:wantsResponderID| | 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 — the behavior is unsupported and " + - "could change in a future version.", + "Keys should be unique so that components maintain their identity " + + "across updates. Non-unique keys may cause children to be " + + "duplicated and/or omitted — the behavior is unsupported and " + + "could change in a future version.", key ); @@ -9315,7 +9322,7 @@ to return true:wantsResponderID| | if (typeof iteratorFn !== "function") { throw new Error( "An object is not an iterable. This error is likely caused by a bug in " + - "React. Please file an issue." + "React. Please file an issue." ); } @@ -9329,10 +9336,10 @@ to return true:wantsResponderID| | if (!didWarnAboutGenerators) { error( "Using Generators 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. Keep in mind " + - "you might need to polyfill these features for older browsers." + "unexpected results because enumerating a generator mutates it. " + + "You may convert it to an array with `Array.from()` or the " + + "`[...spread]` operator before rendering. Keep in mind " + + "you might need to polyfill these features for older browsers." ); } @@ -9343,7 +9350,7 @@ to return true:wantsResponderID| | if (!didWarnAboutMaps) { error( "Using Maps as children is not supported. " + - "Use an array of keyed ReactElements instead." + "Use an array of keyed ReactElements instead." ); } @@ -10205,7 +10212,7 @@ to return true:wantsResponderID| | // It's unlikely their type would change as usually you define them inline. error( "%s received a final argument that is not an array (instead, received `%s`). When " + - "specified, the final argument must be an array.", + "specified, the final argument must be an array.", currentHookNameInDev, typeof deps ); @@ -10243,12 +10250,12 @@ to return true:wantsResponderID| | 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://reactjs.org/link/rules-of-hooks\n\n" + - " Previous render Next render\n" + - " ------------------------------------------------------\n" + - "%s" + - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "This will lead to bugs and errors if not fixed. " + + "For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n" + + " Previous render Next render\n" + + " ------------------------------------------------------\n" + + "%s" + + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", componentName, table ); @@ -10279,9 +10286,9 @@ to return true:wantsResponderID| | error( "async/await is not yet supported in Client Components, only " + - "Server Components. This error is often caused by accidentally " + - "adding `'use client'` to a module that was originally written " + - "for the server." + "Server Components. This error is often caused by accidentally " + + "adding `'use client'` to a module that was originally written " + + "for the server." ); } } @@ -10291,11 +10298,11 @@ to return true:wantsResponderID| | function throwInvalidHookError() { throw new 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:\n" + - "1. You might have mismatching versions of React and the renderer (such as React DOM)\n" + - "2. You might be breaking the Rules of Hooks\n" + - "3. You might have more than one copy of React in the same app\n" + - "See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." + " one of the following reasons:\n" + + "1. You might have mismatching versions of React and the renderer (such as React DOM)\n" + + "2. You might be breaking the Rules of Hooks\n" + + "3. You might have more than one copy of React in the same app\n" + + "See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." ); } @@ -10311,8 +10318,8 @@ to return true:wantsResponderID| | { 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.", + "the previous render. Even though the final argument is optional, " + + "its type cannot change between renders.", currentHookNameInDev ); } @@ -10326,9 +10333,9 @@ to return true:wantsResponderID| | if (nextDeps.length !== prevDeps.length) { error( "The final argument passed to %s changed size between renders. The " + - "order and size of this array must remain constant.\n\n" + - "Previous: %s\n" + - "Incoming: %s", + "order and size of this array must remain constant.\n\n" + + "Previous: %s\n" + + "Incoming: %s", currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + nextDeps.join(", ") + "]" @@ -10489,7 +10496,7 @@ to return true:wantsResponderID| | if ( current !== null && (current.flags & StaticMask) !== - (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird + (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird // and creates false positives. To make this work in legacy mode, we'd // need to mark fibers that commit in an incomplete state, somehow. For // now I'll disable the warning that most of the bugs that would trigger @@ -10498,7 +10505,7 @@ to return true:wantsResponderID| | ) { error( "Internal React error: Expected static flag was missing. Please " + - "notify the React team." + "notify the React team." ); } } @@ -10512,7 +10519,7 @@ to return true:wantsResponderID| | if (didRenderTooFewHooks) { throw new Error( "Rendered fewer hooks than expected. This may be caused by an accidental " + - "early return statement." + "early return statement." ); } @@ -10531,8 +10538,8 @@ to return true:wantsResponderID| | 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." + "and can lead to unexpected behavior. To handle errors triggered " + + "by `use`, wrap your component in a error boundary." ); } } @@ -10598,7 +10605,7 @@ to return true:wantsResponderID| | if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( "Too many re-renders. React limits the number of renders to prevent " + - "an infinite loop." + "an infinite loop." ); } @@ -10924,7 +10931,7 @@ to return true:wantsResponderID| | // the future if we implement resuming, or some form of that. error( "Internal error: Expected work-in-progress queue to be a clone. " + - "This is a bug in React." + "This is a bug in React." ); } } @@ -11556,7 +11563,7 @@ to return true:wantsResponderID| | if (!refObject.hasOwnProperty("current")) { error( "Expected useImperativeHandle() first argument to either be a " + - "ref callback or React.createRef() object. Instead received: %s.", + "ref callback or React.createRef() object. Instead received: %s.", "an object with keys {" + Object.keys(refObject).join(", ") + "}" ); } @@ -11576,7 +11583,7 @@ to return true:wantsResponderID| | if (typeof create !== "function") { error( "Expected useImperativeHandle() second argument to be a function " + - "that creates a handle. Instead received: %s.", + "that creates a handle. Instead received: %s.", create !== null ? typeof create : "null" ); } @@ -11603,7 +11610,7 @@ to return true:wantsResponderID| | if (typeof create !== "function") { error( "Expected useImperativeHandle() second argument to be a function " + - "that creates a handle. Instead received: %s.", + "that creates a handle. Instead received: %s.", create !== null ? typeof create : "null" ); } @@ -11842,8 +11849,8 @@ to return true:wantsResponderID| | if (updatedFibersCount > 10) { 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." + "If this is due to a subscription please re-write it to use React provided hooks. " + + "Otherwise concurrent mode guarantees are off the table." ); } } @@ -11924,8 +11931,8 @@ to return true:wantsResponderID| | if (typeof arguments[3] === "function") { 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()." + "second callback argument. To execute a side effect after " + + "rendering, declare it in the component body with useEffect()." ); } } @@ -11957,8 +11964,8 @@ to return true:wantsResponderID| | if (typeof arguments[3] === "function") { 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()." + "second callback argument. To execute a side effect after " + + "rendering, declare it in the component body with useEffect()." ); } } @@ -12116,18 +12123,18 @@ to return true:wantsResponderID| | var warnInvalidContextAccess = function () { 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()." + "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()." ); }; var warnInvalidHookAccess = function () { 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://reactjs.org/link/rules-of-hooks" + "You can only call Hooks at the top level of your React function. " + + "For more information, see " + + "https://reactjs.org/link/rules-of-hooks" ); }; @@ -13180,11 +13187,11 @@ to return true:wantsResponderID| | value: function () { throw new Error( "_processChildContext is not available in React 16+. This likely " + - "means you have multiple copies of React and are attempting to nest " + - "a React 15 tree inside a React 16 tree using " + - "unstable_renderSubtreeIntoContainer, which isn't supported. Try " + - "to make sure you have only one copy of React (and ideally, switch " + - "to ReactDOM.createPortal)." + "means you have multiple copies of React and are attempting to nest " + + "a React 15 tree inside a React 16 tree using " + + "unstable_renderSubtreeIntoContainer, which isn't supported. Try " + + "to make sure you have only one copy of React (and ideally, switch " + + "to ReactDOM.createPortal)." ); } }); @@ -13204,7 +13211,7 @@ to return true:wantsResponderID| | error( "%s(...): Expected the last optional `callback` argument to be a " + - "function. Instead received: %s.", + "function. Instead received: %s.", callerName, callback ); @@ -13222,7 +13229,7 @@ to return true:wantsResponderID| | error( "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. " + - "You have returned undefined.", + "You have returned undefined.", componentName ); } @@ -13375,7 +13382,7 @@ to return true:wantsResponderID| | if (shouldUpdate === undefined) { error( "%s.shouldComponentUpdate(): Returned undefined instead of a " + - "boolean value. Make sure to return true or false.", + "boolean value. Make sure to return true or false.", getComponentNameFromType(ctor) || "Component" ); } @@ -13404,13 +13411,13 @@ to return true:wantsResponderID| | if (ctor.prototype && typeof ctor.prototype.render === "function") { error( "%s(...): No `render` method found on the returned component " + - "instance: did you accidentally return an object from the constructor?", + "instance: did you accidentally return an object from the constructor?", name ); } else { error( "%s(...): No `render` method found on the returned component " + - "instance: you may have forgotten to define `render`.", + "instance: you may have forgotten to define `render`.", name ); } @@ -13423,8 +13430,8 @@ to return true:wantsResponderID| | ) { 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?", + "This is only supported for classes created using React.createClass. " + + "Did you mean to define a state property instead?", name ); } @@ -13435,8 +13442,8 @@ to return true:wantsResponderID| | ) { 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.", + "This is only supported for classes created using React.createClass. " + + "Use a static property to define defaultProps instead.", name ); } @@ -13444,7 +13451,7 @@ to return true:wantsResponderID| | if (instance.propTypes) { error( "propTypes was defined as an instance property on %s. Use a static " + - "property to define propTypes instead.", + "property to define propTypes instead.", name ); } @@ -13452,7 +13459,7 @@ to return true:wantsResponderID| | if (instance.contextType) { error( "contextType was defined as an instance property on %s. Use a static " + - "property to define contextType instead.", + "property to define contextType instead.", name ); } @@ -13461,7 +13468,7 @@ to return true:wantsResponderID| | if (instance.contextTypes) { error( "contextTypes was defined as an instance property on %s. Use a static " + - "property to define contextTypes instead.", + "property to define contextTypes instead.", name ); } @@ -13475,7 +13482,7 @@ to return true:wantsResponderID| | error( "%s declares both contextTypes and contextType static properties. " + - "The legacy contextTypes property will be ignored.", + "The legacy contextTypes property will be ignored.", name ); } @@ -13484,9 +13491,9 @@ to return true:wantsResponderID| | if (typeof instance.componentShouldUpdate === "function") { 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.", + "componentShouldUpdate(). Did you mean shouldComponentUpdate()? " + + "The name is phrased as a question because the function is " + + "expected to return a value.", name ); } @@ -13498,8 +13505,8 @@ to return true:wantsResponderID| | ) { error( "%s has a method called shouldComponentUpdate(). " + - "shouldComponentUpdate should not be used when extending React.PureComponent. " + - "Please extend React.Component if shouldComponentUpdate is used.", + "shouldComponentUpdate should not be used when extending React.PureComponent. " + + "Please extend React.Component if shouldComponentUpdate is used.", getComponentNameFromType(ctor) || "A pure component" ); } @@ -13507,8 +13514,8 @@ to return true:wantsResponderID| | if (typeof instance.componentDidUnmount === "function") { error( "%s has a method called " + - "componentDidUnmount(). But there is no such lifecycle method. " + - "Did you mean componentWillUnmount()?", + "componentDidUnmount(). But there is no such lifecycle method. " + + "Did you mean componentWillUnmount()?", name ); } @@ -13516,10 +13523,10 @@ to return true:wantsResponderID| | if (typeof instance.componentDidReceiveProps === "function") { 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().", + "componentDidReceiveProps(). But there is no such lifecycle method. " + + "If you meant to update the state in response to changing props, " + + "use componentWillReceiveProps(). If you meant to fetch data or " + + "run side-effects or mutations after React has updated the UI, use componentDidUpdate().", name ); } @@ -13527,7 +13534,7 @@ to return true:wantsResponderID| | if (typeof instance.componentWillRecieveProps === "function") { error( "%s has a method called " + - "componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", + "componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", name ); } @@ -13535,7 +13542,7 @@ to return true:wantsResponderID| | if (typeof instance.UNSAFE_componentWillRecieveProps === "function") { error( "%s has a method called " + - "UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", + "UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", name ); } @@ -13545,7 +13552,7 @@ to return true:wantsResponderID| | if (instance.props !== undefined && hasMutatedProps) { error( "%s(...): When calling super() in `%s`, make sure to pass " + - "up the same props that your component's constructor was passed.", + "up the same props that your component's constructor was passed.", name, name ); @@ -13554,7 +13561,7 @@ to return true:wantsResponderID| | if (instance.defaultProps) { 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.", + " Instead, define defaultProps as a static property on %s.", name, name ); @@ -13569,7 +13576,7 @@ to return true:wantsResponderID| | error( "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). " + - "This component defines getSnapshotBeforeUpdate() only.", + "This component defines getSnapshotBeforeUpdate() only.", getComponentNameFromType(ctor) ); } @@ -13577,7 +13584,7 @@ to return true:wantsResponderID| | if (typeof instance.getDerivedStateFromProps === "function") { error( "%s: getDerivedStateFromProps() is defined as an instance method " + - "and will be ignored. Instead, declare it as a static method.", + "and will be ignored. Instead, declare it as a static method.", name ); } @@ -13585,7 +13592,7 @@ to return true:wantsResponderID| | if (typeof instance.getDerivedStateFromError === "function") { error( "%s: getDerivedStateFromError() is defined as an instance method " + - "and will be ignored. Instead, declare it as a static method.", + "and will be ignored. Instead, declare it as a static method.", name ); } @@ -13593,7 +13600,7 @@ to return true:wantsResponderID| | if (typeof ctor.getSnapshotBeforeUpdate === "function") { error( "%s: getSnapshotBeforeUpdate() is defined as a static method " + - "and will be ignored. Instead, declare it as an instance method.", + "and will be ignored. Instead, declare it as an instance method.", name ); } @@ -13610,7 +13617,7 @@ to return true:wantsResponderID| | ) { error( "%s.getChildContext(): childContextTypes must be defined in order to " + - "use getChildContext().", + "use getChildContext().", name ); } @@ -13670,7 +13677,7 @@ to return true:wantsResponderID| | error( "%s defines an invalid contextType. " + - "contextType should point to the Context object returned by React.createContext().%s", + "contextType should point to the Context object returned by React.createContext().%s", getComponentNameFromType(ctor) || "Component", addendum ); @@ -13722,9 +13729,9 @@ to return true:wantsResponderID| | 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.", + "%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.", componentName, instance.state === null ? "null" : "undefined", componentName @@ -13754,7 +13761,7 @@ to return true:wantsResponderID| | if ( typeof instance.componentWillReceiveProps === "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== - true + true ) { foundWillReceivePropsName = "componentWillReceiveProps"; } else if ( @@ -13793,9 +13800,9 @@ to return true:wantsResponderID| | 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\n" + - "The above lifecycles should be removed. Learn more about this warning here:\n" + - "https://reactjs.org/link/unsafe-component-lifecycles", + "%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n" + + "The above lifecycles should be removed. Learn more about this warning here:\n" + + "https://reactjs.org/link/unsafe-component-lifecycles", _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : "", @@ -13832,8 +13839,8 @@ to return true:wantsResponderID| | { error( "%s.componentWillMount(): Assigning directly to this.state is " + - "deprecated (except inside a component's " + - "constructor). Use setState instead.", + "deprecated (except inside a component's " + + "constructor). Use setState instead.", getComponentNameFromFiber(workInProgress) || "Component" ); } @@ -13872,8 +13879,8 @@ to return true:wantsResponderID| | error( "%s.componentWillReceiveProps(): Assigning directly to " + - "this.state is deprecated (except inside a component's " + - "constructor). Use setState instead.", + "this.state is deprecated (except inside a component's " + + "constructor). Use setState instead.", componentName ); } @@ -13915,8 +13922,8 @@ to return true:wantsResponderID| | 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.", + "because updates to props won't be reflected in state. " + + "In most cases, it is better to use props directly.", componentName ); } @@ -14379,8 +14386,8 @@ to return true:wantsResponderID| | var componentName = source ? getComponentNameFromFiber(source) : null; var componentNameMessage = componentName ? "The above error occurred in the <" + - componentName + - "> component:" + componentName + + "> component:" : "The above error occurred in one of your React components:"; var errorBoundaryMessage; @@ -14495,7 +14502,7 @@ to return true:wantsResponderID| | if (!includesSomeLane(fiber.lanes, SyncLane)) { error( "%s: Error boundaries should implement getDerivedStateFromError(). " + - "In that method, return a state update to display an error message or fallback UI.", + "In that method, return a state update to display an error message or fallback UI.", getComponentNameFromFiber(fiber) || "Unknown" ); } @@ -14796,9 +14803,9 @@ to return true:wantsResponderID| | throw new Error( "Unexpected Suspense handler tag (" + - suspenseBoundary.tag + - "). This " + - "is a bug in React." + suspenseBoundary.tag + + "). This " + + "is a bug in React." ); } else { // No boundary was found. Unless this is a sync update, this is OK. @@ -14817,9 +14824,9 @@ to return true:wantsResponderID| | // In a legacy root, suspending without a boundary is always an error. var uncaughtSuspenseError = new Error( "A component suspended while responding to synchronous input. This " + - "will cause the UI to be replaced with a loading indicator. To " + - "fix, updates that suspend should be wrapped " + - "with startTransition." + "will cause the UI to be replaced with a loading indicator. To " + + "fix, updates that suspend should be wrapped " + + "with startTransition." ); value = uncaughtSuspenseError; } @@ -14899,8 +14906,8 @@ to return true:wantsResponderID| | var SelectiveHydrationException = new Error( "This is not a real error. It's an implementation detail of React's " + - "selective hydration feature. If this leaks into userspace, it's a bug in " + - "React. Please file an issue." + "selective hydration feature. If this leaks into userspace, it's a bug in " + + "React. Please file an issue." ); var didReceiveUpdate = false; var didWarnAboutBadClass; @@ -15109,7 +15116,7 @@ to return true:wantsResponderID| | if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) { error( "%s: Support for defaultProps will be removed from memo components " + - "in a future major release. Use JavaScript default parameters instead.", + "in a future major release. Use JavaScript default parameters instead.", componentName ); @@ -15693,7 +15700,7 @@ to return true:wantsResponderID| | if (!didWarnAboutReassigningProps) { error( "It looks like %s is reassigning its own `this.props` while rendering. " + - "This is not supported and can lead to confusing bugs.", + "This is not supported and can lead to confusing bugs.", getComponentNameFromFiber(workInProgress) || "a component" ); } @@ -15983,9 +15990,9 @@ to return true:wantsResponderID| | throw new Error( "Element type is invalid. Received a promise that resolves to: " + - Component + - ". " + - ("Lazy element type must resolve to a class or function." + hint) + Component + + ". " + + ("Lazy element type must resolve to a class or function." + hint) ); } @@ -16057,7 +16064,7 @@ to return true:wantsResponderID| | if (!didWarnAboutBadClass[componentName]) { error( "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", + "This is likely to cause errors. Change %s to extend React.Component instead.", componentName, componentName ); @@ -16102,10 +16109,10 @@ to return true:wantsResponderID| | if (!didWarnAboutModulePatternComponent[_componentName]) { error( "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", + "Change %s to a class that extends React.Component instead. " + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + "cannot be called with `new` by React.", _componentName, _componentName, _componentName @@ -16131,10 +16138,10 @@ to return true:wantsResponderID| | if (!didWarnAboutModulePatternComponent[_componentName2]) { error( "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", + "Change %s to a class that extends React.Component instead. " + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + "cannot be called with `new` by React.", _componentName2, _componentName2, _componentName2 @@ -16216,8 +16223,8 @@ to return true:wantsResponderID| | error( "Function components cannot be given refs. " + - "Attempts to access this ref will fail. " + - "Did you mean to use React.forwardRef()?%s", + "Attempts to access this ref will fail. " + + "Did you mean to use React.forwardRef()?%s", info ); } @@ -16230,7 +16237,7 @@ to return true:wantsResponderID| | if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName3]) { error( "%s: Support for defaultProps will be removed from function components " + - "in a future major release. Use JavaScript default parameters instead.", + "in a future major release. Use JavaScript default parameters instead.", _componentName3 ); @@ -16822,8 +16829,8 @@ to return true:wantsResponderID| | } else { error = new Error( "The server could not finish this Suspense boundary, likely " + - "due to an error during server rendering. Switched to " + - "client rendering." + "due to an error during server rendering. Switched to " + + "client rendering." ); } @@ -16941,7 +16948,7 @@ to return true:wantsResponderID| | var _capturedValue = createCapturedValue( new Error( "There was an error while hydrating this Suspense boundary. " + - "Switched to client rendering." + "Switched to client rendering." ) ); @@ -17094,7 +17101,7 @@ to return true:wantsResponderID| | case "backwards": { error( '"%s" is not a valid value for revealOrder on . ' + - 'Use lowercase "%s" instead.', + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase() ); @@ -17106,7 +17113,7 @@ to return true:wantsResponderID| | case "backward": { error( '"%s" is not a valid value for revealOrder on . ' + - 'React uses the -s suffix in the spelling. Use "%ss" instead.', + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase() ); @@ -17117,7 +17124,7 @@ to return true:wantsResponderID| | default: error( '"%s" is not a supported revealOrder on . ' + - 'Did you mean "together", "forwards" or "backwards"?', + 'Did you mean "together", "forwards" or "backwards"?', revealOrder ); @@ -17126,7 +17133,7 @@ to return true:wantsResponderID| | } else { error( "%s is not a supported value for revealOrder on . " + - 'Did you mean "together", "forwards" or "backwards"?', + 'Did you mean "together", "forwards" or "backwards"?', revealOrder ); } @@ -17142,7 +17149,7 @@ to return true:wantsResponderID| | error( '"%s" is not a supported value for tail on . ' + - 'Did you mean "collapsed" or "hidden"?', + 'Did you mean "collapsed" or "hidden"?', tailMode ); } else if ( @@ -17153,8 +17160,8 @@ to return true:wantsResponderID| | error( ' is only valid if revealOrder is ' + - '"forwards" or "backwards". ' + - 'Did you mean to specify revealOrder="forwards"?', + '"forwards" or "backwards". ' + + 'Did you mean to specify revealOrder="forwards"?', tailMode ); } @@ -17173,10 +17180,10 @@ to return true:wantsResponderID| | error( "A nested %s was passed to row #%s in . Wrap it in " + - "an additional SuspenseList to configure its revealOrder: " + - " ... " + - "{%s} ... " + - "", + "an additional SuspenseList to configure its revealOrder: " + + " ... " + + "{%s} ... " + + "", type, index, type @@ -17224,8 +17231,8 @@ to return true:wantsResponderID| | } else { error( 'A single row was passed to a . ' + - "This is not useful since it needs multiple rows. " + - "Did you mean to pass multiple children or an array?", + "This is not useful since it needs multiple rows. " + + "Did you mean to pass multiple children or an array?", revealOrder ); } @@ -17509,7 +17516,7 @@ to return true:wantsResponderID| | error( "Rendering directly is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" + "a future major release. Did you mean to render instead?" ); } } @@ -17525,9 +17532,9 @@ to return true:wantsResponderID| | if (typeof render !== "function") { 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." + "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." ); } } @@ -18126,9 +18133,9 @@ to return true:wantsResponderID| | throw new Error( "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in " + - "React. Please file an issue." + workInProgress.tag + + "). This error is likely caused by a bug in " + + "React. Please file an issue." ); } @@ -18187,7 +18194,7 @@ to return true:wantsResponderID| | ) { error( "Detected multiple renderers concurrently rendering the " + - "same context provider. This is currently unsupported." + "same context provider. This is currently unsupported." ); } @@ -18248,7 +18255,7 @@ to return true:wantsResponderID| | if (node !== propagationRoot) { 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." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -18428,9 +18435,9 @@ to return true:wantsResponderID| | if (isDisallowedContextReadInDEV) { 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()." + "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()." ); } } @@ -18460,9 +18467,9 @@ to return true:wantsResponderID| | if (consumer === null) { throw new 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()." + "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()." ); } // This is the first dependency for this component. Create a new list. @@ -18494,7 +18501,7 @@ to return true:wantsResponderID| | return transition; } - function handleAsyncAction(transition, thenable) {} + function handleAsyncAction(transition, thenable) { } function notifyTransitionCallbacks(transition, returnValue) { var callbacks = transition._callbacks; @@ -19073,7 +19080,7 @@ to return true:wantsResponderID| | if (!wasHydrated) { throw new Error( "A dehydrated suspense component was completed without a hydrated node. " + - "This is probably a bug in React." + "This is probably a bug in React." ); } @@ -19143,7 +19150,12 @@ to return true:wantsResponderID| | function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing - + if (workInProgress.flags & 1 && (workInProgress.type?.displayName || workInProgress.type?.name) !== "View") + insertUpdateComponents( + getComponentNameFromFiber(workInProgress), + workInProgress.flags, + workInProgress.key, + ); switch (workInProgress.tag) { case IndeterminateComponent: case LazyComponent: @@ -19238,7 +19250,7 @@ to return true:wantsResponderID| | if (workInProgress.stateNode === null) { throw new Error( "We must have new props for new mounts. This error is likely " + - "caused by a bug in React. Please file an issue." + "caused by a bug in React. Please file an issue." ); } // This can happen when we abort work. @@ -19301,7 +19313,7 @@ to return true:wantsResponderID| | if (workInProgress.stateNode === null) { throw new Error( "We must have new props for new mounts. This error is likely " + - "caused by a bug in React. Please file an issue." + "caused by a bug in React. Please file an issue." ); } // This can happen when we abort work. } @@ -19580,7 +19592,7 @@ to return true:wantsResponderID| | // time we have to render. So rendering one more row would likely // exceed it. now$1() * 2 - renderState.renderingStartTime > - getRenderTargetTime() && + getRenderTargetTime() && renderLanes !== OffscreenLane ) { // We have now passed our CPU deadline and we'll just give up further @@ -19725,9 +19737,9 @@ to return true:wantsResponderID| | throw new Error( "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in " + - "React. Please file an issue." + workInProgress.tag + + "). This error is likely caused by a bug in " + + "React. Please file an issue." ); } @@ -19789,7 +19801,7 @@ to return true:wantsResponderID| | if (workInProgress.alternate === null) { throw new Error( "Threw in newly mounted dehydrated component. This is likely a bug in " + - "React. Please file an issue." + "React. Please file an issue." ); } } @@ -20027,7 +20039,7 @@ to return true:wantsResponderID| | if (typeof retVal === "function") { error( "Unexpected return value from a callback ref in %s. " + - "A callback ref should not return a function.", + "A callback ref should not return a function.", getComponentNameFromFiber(current) ); } @@ -20133,10 +20145,10 @@ to return true:wantsResponderID| | if (instance.props !== finishedWork.memoizedProps) { 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.", + "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" ); } @@ -20144,10 +20156,10 @@ to return true:wantsResponderID| | if (instance.state !== finishedWork.memoizedState) { 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.", + "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" ); } @@ -20172,7 +20184,7 @@ to return true:wantsResponderID| | error( "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) " + - "must be returned. You have returned undefined.", + "must be returned. You have returned undefined.", getComponentNameFromFiber(finishedWork) ); } @@ -20202,7 +20214,7 @@ to return true:wantsResponderID| | if ((flags & Snapshot) !== NoFlags$1) { throw new 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." + "likely caused by a bug in React. Please file an issue." ); } } @@ -20324,7 +20336,7 @@ to return true:wantsResponderID| | error( "%s must not return anything besides a function, " + - "which is used for clean-up.%s", + "which is used for clean-up.%s", hookName, addendum ); @@ -20428,10 +20440,10 @@ to return true:wantsResponderID| | if (instance.props !== finishedWork.memoizedProps) { 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.", + "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" ); } @@ -20439,10 +20451,10 @@ to return true:wantsResponderID| | if (instance.state !== finishedWork.memoizedState) { 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.", + "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" ); } @@ -20482,10 +20494,10 @@ to return true:wantsResponderID| | if (instance.props !== finishedWork.memoizedProps) { 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.", + "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" ); } @@ -20493,10 +20505,10 @@ to return true:wantsResponderID| | if (instance.state !== finishedWork.memoizedState) { 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.", + "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" ); } @@ -20546,10 +20558,10 @@ to return true:wantsResponderID| | if (instance.props !== finishedWork.memoizedProps) { 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.", + "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" ); } @@ -20557,10 +20569,10 @@ to return true:wantsResponderID| | if (instance.state !== finishedWork.memoizedState) { 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.", + "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" ); } @@ -20869,7 +20881,7 @@ to return true:wantsResponderID| | if (!ref.hasOwnProperty("current")) { error( "Unexpected ref object provided for %s. " + - "Use either a ref-setter function or React.createRef().", + "Use either a ref-setter function or React.createRef().", getComponentNameFromFiber(finishedWork) ); } @@ -21168,7 +21180,7 @@ to return true:wantsResponderID| | } } - function commitSuspenseCallback(finishedWork) {} + function commitSuspenseCallback(finishedWork) { } function getRetryCache(finishedWork) { // TODO: Unify the interface for the retry cache so we don't have to switch @@ -21199,9 +21211,9 @@ to return true:wantsResponderID| | default: { throw new Error( "Unexpected Suspense handler tag (" + - finishedWork.tag + - "). This is a " + - "bug in React." + finishedWork.tag + + "). This is a " + + "bug in React." ); } } @@ -22721,7 +22733,7 @@ to return true:wantsResponderID| | // TODO: Include link to relevant documentation page. error( "The current testing environment is not configured to support " + - "act(...)" + "act(...)" ); } @@ -22893,8 +22905,8 @@ to return true:wantsResponderID| | return actionScopeLane !== NoLane // We're inside an async action scope. Reuse the same lane. ? actionScopeLane // We may or may not be inside an async action scope. If we are, this : // is the first update in that scope. Either way, we need to get a - // fresh transition lane. - requestTransitionLane(); + // fresh transition lane. + requestTransitionLane(); } // Updates originating inside certain React methods, like flushSync, have // their priority set by tracking it with a context variable. // @@ -22984,7 +22996,10 @@ to return true:wantsResponderID| | } } // Check if the work loop is currently suspended and waiting for data to // finish loading. - + updatedComponentForProfiler = { + name: getComponentNameFromFiber(fiber), + key: fiber.key, + }; if ( // Suspended render phase (root === workInProgressRoot && @@ -23757,16 +23772,16 @@ to return true:wantsResponderID| | thrownValue = getSuspendedThenable(); workInProgressSuspendedReason = shouldRemainOnPreviousScreen() && // Check if there are other pending updates that might possibly unblock this - // component from suspending. This mirrors the check in - // renderDidSuspendDelayIfPossible. We should attempt to unify them somehow. - // TODO: Consider unwinding immediately, using the - // SuspendedOnHydration mechanism. - !includesNonIdleWork(workInProgressRootSkippedLanes) && - !includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes) // Suspend work loop until data resolves + // component from suspending. This mirrors the check in + // renderDidSuspendDelayIfPossible. We should attempt to unify them somehow. + // TODO: Consider unwinding immediately, using the + // SuspendedOnHydration mechanism. + !includesNonIdleWork(workInProgressRootSkippedLanes) && + !includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes) // Suspend work loop until data resolves ? SuspendedOnData // Don't suspend work loop, except to check if the data has : // immediately resolved (i.e. in a microtask). Otherwise, trigger the - // nearest Suspense fallback. - SuspendedOnImmediate; + // nearest Suspense fallback. + SuspendedOnImmediate; } else if (thrownValue === SuspenseyCommitException) { thrownValue = getSuspendedThenable(); workInProgressSuspendedReason = SuspendedOnInstance; @@ -23789,9 +23804,9 @@ to return true:wantsResponderID| | typeof thrownValue.then === "function"; workInProgressSuspendedReason = isWakeable // A wakeable object was thrown by a legacy Suspense implementation. ? // This has slightly different behavior than suspending with `use`. - SuspendedOnDeprecatedThrowPromise // This is a regular error. If something earlier in the component already + SuspendedOnDeprecatedThrowPromise // This is a regular error. If something earlier in the component already : // suspended, we must clear the thenable state to unblock the work loop. - SuspendedOnError; + SuspendedOnError; } workInProgressThrownValue = thrownValue; @@ -24044,7 +24059,7 @@ to return true:wantsResponderID| | // This is a sync render, so we should have finished the whole tree. throw new Error( "Cannot commit an incomplete root. This error is likely caused by a " + - "bug in React. Please file an issue." + "bug in React. Please file an issue." ); } @@ -24231,7 +24246,7 @@ to return true:wantsResponderID| | if (true) { error( "Unexpected type of fiber triggered a suspensey commit. " + - "This is a bug in React." + "This is a bug in React." ); } @@ -24553,7 +24568,7 @@ to return true:wantsResponderID| | // is where we would switch to the unwinding path. error( "Internal React error: Expected this fiber to be complete, but " + - "it isn't. It should have been unwound. This is a bug in React." + "it isn't. It should have been unwound. This is a bug in React." ); } } // The current, flushed, state of this fiber is the alternate. Ideally @@ -24673,7 +24688,9 @@ to return true:wantsResponderID| | // layout phases. Should be able to remove. var previousUpdateLanePriority = getCurrentUpdatePriority(); var prevTransition = ReactCurrentBatchConfig.transition; - + defrost.writeInLogFiles(Date.now() + "", { list: updatedComponents, change: updatedComponentForProfiler }) + updatedComponents = [] + updatedComponentForProfiler = null try { ReactCurrentBatchConfig.transition = null; setCurrentUpdatePriority(DiscreteEventPriority); @@ -24725,7 +24742,7 @@ to return true:wantsResponderID| | if (lanes === NoLanes) { error( "root.finishedLanes should not be empty during a commit. This is a " + - "bug in React." + "bug in React." ); } } @@ -24737,7 +24754,7 @@ to return true:wantsResponderID| | if (finishedWork === root.current) { throw new Error( "Cannot commit the same tree as before. This error is likely caused by " + - "a bug in React. Please file an issue." + "a bug in React. Please file an issue." ); } // commitRoot never returns a continuation; it always finishes synchronously. // So we can clear these now to allow a new callback to be scheduled. @@ -24973,8 +24990,8 @@ to return true:wantsResponderID| | get: function () { error( 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + - " This property is deprecated and will be removed in a future version of React." + - " To access the digest of an Error look for this property on the Error instance itself." + " This property is deprecated and will be removed in a future version of React." + + " To access the digest of an Error look for this property on the Error instance itself." ); return digest; @@ -25181,10 +25198,10 @@ to return true:wantsResponderID| | { error( "Internal React error: Attempted to capture a commit phase error " + - "inside a detached tree. This indicates a bug in React. Potential " + - "causes include deleting the same fiber more than once, committing an " + - "already-finished tree, or an inconsistent return pointer.\n\n" + - "Error message:\n\n%s", + "inside a detached tree. This indicates a bug in React. Potential " + + "causes include deleting the same fiber more than once, committing an " + + "already-finished tree, or an inconsistent return pointer.\n\n" + + "Error message:\n\n%s", error$1 ); } @@ -25340,7 +25357,7 @@ to return true:wantsResponderID| | default: throw new Error( "Pinged unknown suspense boundary type. " + - "This is probably a bug in React." + "This is probably a bug in React." ); } @@ -25360,9 +25377,9 @@ to return true:wantsResponderID| | rootWithPassiveNestedUpdates = null; throw new 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." + "repeatedly calls setState inside componentWillUpdate or " + + "componentDidUpdate. React limits the number of nested updates to " + + "prevent infinite loops." ); } @@ -25373,9 +25390,9 @@ to return true:wantsResponderID| | 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." + "calls setState inside useEffect, but useEffect either doesn't " + + "have a dependency array, or one of the dependencies changes on " + + "every render." ); } } @@ -25501,9 +25518,9 @@ to return true:wantsResponderID| | error( "Can't perform a React state update on a component that hasn't mounted yet. " + - "This indicates that you have a side-effect in your render function that " + - "asynchronously later calls tries to update the component. Move this work to " + - "useEffect instead." + "This indicates that you have a side-effect in your render function that " + + "asynchronously later calls tries to update the component. Move this work to " + + "useEffect instead." ); } finally { if (previousFiber) { @@ -25618,8 +25635,8 @@ to return true:wantsResponderID| | 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://reactjs.org/link/setstate-in-render", + "different component (`%s`). To locate the bad setState() call inside `%s`, " + + "follow the stack trace as described in https://reactjs.org/link/setstate-in-render", setStateComponentName, renderingComponentName, renderingComponentName @@ -25633,8 +25650,8 @@ to return true:wantsResponderID| | if (!didWarnAboutUpdateInRender) { error( "Cannot update during an existing state transition (such as " + - "within `render`). Render methods should be a pure " + - "function of props and state." + "within `render`). Render methods should be a pure " + + "function of props and state." ); didWarnAboutUpdateInRender = true; @@ -25720,15 +25737,15 @@ to return true:wantsResponderID| | error( "An update to %s inside a test was not wrapped in act(...).\n\n" + - "When testing, code that causes React state updates should be " + - "wrapped into act(...):\n\n" + - "act(() => {\n" + - " /* fire events that update state */\n" + - "});\n" + - "/* assert on the output */\n\n" + - "This ensures that you're testing the behavior the user would see " + - "in the browser." + - " Learn more at https://reactjs.org/link/wrap-tests-with-act", + "When testing, code that causes React state updates should be " + + "wrapped into act(...):\n\n" + + "act(() => {\n" + + " /* fire events that update state */\n" + + "});\n" + + "/* assert on the output */\n\n" + + "This ensures that you're testing the behavior the user would see " + + "in the browser." + + " Learn more at https://reactjs.org/link/wrap-tests-with-act", getComponentNameFromFiber(fiber) ); } finally { @@ -25751,16 +25768,16 @@ to return true:wantsResponderID| | ) { error( "A suspended resource finished loading inside a test, but the event " + - "was not wrapped in act(...).\n\n" + - "When testing, code that resolves suspended data should be wrapped " + - "into act(...):\n\n" + - "act(() => {\n" + - " /* finish loading suspended data */\n" + - "});\n" + - "/* assert on the output */\n\n" + - "This ensures that you're testing the behavior the user would see " + - "in the browser." + - " Learn more at https://reactjs.org/link/wrap-tests-with-act" + "was not wrapped in act(...).\n\n" + + "When testing, code that resolves suspended data should be wrapped " + + "into act(...):\n\n" + + "act(() => {\n" + + " /* finish loading suspended data */\n" + + "});\n" + + "/* assert on the output */\n\n" + + "This ensures that you're testing the behavior the user would see " + + "in the browser." + + " Learn more at https://reactjs.org/link/wrap-tests-with-act" ); } } @@ -26420,9 +26437,9 @@ to return true:wantsResponderID| | currentDependencies === null ? null : { - lanes: currentDependencies.lanes, - firstContext: currentDependencies.firstContext - }; // These will be overridden during the parent's reconciliation + lanes: currentDependencies.lanes, + firstContext: currentDependencies.firstContext + }; // These will be overridden during the parent's reconciliation workInProgress.sibling = current.sibling; workInProgress.index = current.index; @@ -26509,9 +26526,9 @@ to return true:wantsResponderID| | currentDependencies === null ? null : { - lanes: currentDependencies.lanes, - firstContext: currentDependencies.firstContext - }; + lanes: currentDependencies.lanes, + firstContext: currentDependencies.firstContext + }; { // Note: We don't reset the actualTime counts. It's useful to accumulate @@ -26687,8 +26704,8 @@ to return true:wantsResponderID| | throw new Error( "Element type is invalid: expected a string (for built-in " + - "components) or a class/function (for composite components) " + - ("but got: " + (type == null ? type : typeof type) + "." + info) + "components) or a class/function (for composite components) " + + ("but got: " + (type == null ? type : typeof type) + "." + info) ); } } @@ -27057,10 +27074,10 @@ to return true:wantsResponderID| | if (fiber.mode & StrictLegacyMode) { error( "%s is deprecated in StrictMode. " + - "%s was passed an instance of %s which is inside StrictMode. " + - "Instead, add a ref directly to the element you want to reference. " + - "Learn more about using refs safely here: " + - "https://reactjs.org/link/strict-mode-find-node", + "%s was passed an instance of %s which is inside StrictMode. " + + "Instead, add a ref directly to the element you want to reference. " + + "Learn more about using refs safely here: " + + "https://reactjs.org/link/strict-mode-find-node", methodName, methodName, componentName @@ -27068,10 +27085,10 @@ to return true:wantsResponderID| | } else { error( "%s is deprecated in StrictMode. " + - "%s was passed an instance of %s which renders StrictMode children. " + - "Instead, add a ref directly to the element you want to reference. " + - "Learn more about using refs safely here: " + - "https://reactjs.org/link/strict-mode-find-node", + "%s was passed an instance of %s which renders StrictMode children. " + + "Instead, add a ref directly to the element you want to reference. " + + "Learn more about using refs safely here: " + + "https://reactjs.org/link/strict-mode-find-node", methodName, methodName, componentName @@ -27141,9 +27158,9 @@ to return true:wantsResponderID| | error( "Render methods should be a pure function of props and state; " + - "triggering nested component updates from render is not allowed. " + - "If necessary, trigger nested updates in componentDidUpdate.\n\n" + - "Check the render method of %s.", + "triggering nested component updates from render is not allowed. " + + "If necessary, trigger nested updates in componentDidUpdate.\n\n" + + "Check the render method of %s.", getComponentNameFromFiber(current) || "Unknown" ); } @@ -27162,7 +27179,7 @@ to return true:wantsResponderID| | if (typeof callback !== "function") { error( "render(...): Expected the last optional `callback` argument to be a " + - "function. Instead received: %s.", + "function. Instead received: %s.", callback ); } @@ -27515,10 +27532,10 @@ to return true:wantsResponderID| | if (!owner.stateNode._warnedAboutRefsInRender) { error( "%s is accessing findNodeHandle inside its render(). " + - "render() should be a pure function of props and state. It should " + - "never access something that requires stale data from the previous " + - "render, such as refs. Move this logic to componentDidMount and " + - "componentDidUpdate instead.", + "render() should be a pure function of props and state. It should " + + "never access something that requires stale data from the previous " + + "render, such as refs. Move this logic to componentDidMount and " + + "componentDidUpdate instead.", getComponentNameFromType(owner.type) || "A component" ); } @@ -27566,10 +27583,10 @@ to return true:wantsResponderID| | if (!owner.stateNode._warnedAboutRefsInRender) { error( "%s is accessing findNodeHandle inside its render(). " + - "render() should be a pure function of props and state. It should " + - "never access something that requires stale data from the previous " + - "render, such as refs. Move this logic to componentDidMount and " + - "componentDidUpdate instead.", + "render() should be a pure function of props and state. It should " + + "never access something that requires stale data from the previous " + + "render, such as refs. Move this logic to componentDidMount and " + + "componentDidUpdate instead.", getComponentNameFromType(owner.type) || "A component" ); } @@ -27640,7 +27657,7 @@ to return true:wantsResponderID| | { error( "dispatchCommand was called with a ref that isn't a " + - "native component. Use React.forwardRef to get access to the underlying native component" + "native component. Use React.forwardRef to get access to the underlying native component" ); } @@ -27669,7 +27686,7 @@ to return true:wantsResponderID| | { error( "sendAccessibilityEvent was called with a ref that isn't a " + - "native component. Use React.forwardRef to get access to the underlying native component" + "native component. Use React.forwardRef to get access to the underlying native component" ); } @@ -28059,7 +28076,7 @@ to return true:wantsResponderID| | if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === - "function" + "function" ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js index 6753ca0..327f68a 100644 --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js @@ -12,7 +12,13 @@ */ "use strict"; +import defrost from '@d11/de-frost' require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore"); +var updatedComponents = []; +var updatedComponentForProfiler = null; +function insertUpdateComponents(componentName, flags, key) { + updatedComponents.push({ componentName, flags, key }); +} var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"), React = require("react"), Scheduler = require("scheduler"); @@ -110,8 +116,8 @@ function SyntheticEvent( ((targetInst = dispatchConfig[propName]) ? (this[propName] = targetInst(nativeEvent)) : "target" === propName - ? (this.target = nativeEventTarget) - : (this[propName] = nativeEvent[propName])); + ? (this.target = nativeEventTarget) + : (this[propName] = nativeEvent[propName])); this.isDefaultPrevented = ( null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented @@ -130,7 +136,7 @@ assign(SyntheticEvent.prototype, { (event.preventDefault ? event.preventDefault() : "unknown" !== typeof event.returnValue && (event.returnValue = !1), - (this.isDefaultPrevented = functionThatReturnsTrue)); + (this.isDefaultPrevented = functionThatReturnsTrue)); }, stopPropagation: function () { var event = this.nativeEvent; @@ -138,7 +144,7 @@ assign(SyntheticEvent.prototype, { (event.stopPropagation ? event.stopPropagation() : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = !0), - (this.isPropagationStopped = functionThatReturnsTrue)); + (this.isPropagationStopped = functionThatReturnsTrue)); }, persist: function () { this.isPersistent = functionThatReturnsTrue; @@ -170,7 +176,7 @@ SyntheticEvent.Interface = { isTrusted: null }; SyntheticEvent.extend = function (Interface) { - function E() {} + function E() { } function Class() { return Super.apply(this, arguments); } @@ -256,17 +262,17 @@ function recordTouchStart(touch) { (touchRecord.previousPageY = touch.pageY), (touchRecord.previousTimeStamp = timestampForTouch(touch))) : ((touchRecord = { - touchActive: !0, - startPageX: touch.pageX, - startPageY: touch.pageY, - startTimeStamp: timestampForTouch(touch), - currentPageX: touch.pageX, - currentPageY: touch.pageY, - currentTimeStamp: timestampForTouch(touch), - previousPageX: touch.pageX, - previousPageY: touch.pageY, - previousTimeStamp: timestampForTouch(touch) - }), + touchActive: !0, + startPageX: touch.pageX, + startPageY: touch.pageY, + startTimeStamp: timestampForTouch(touch), + currentPageX: touch.pageX, + currentPageY: touch.pageY, + currentTimeStamp: timestampForTouch(touch), + previousPageX: touch.pageX, + previousPageY: touch.pageY, + previousTimeStamp: timestampForTouch(touch) + }), (touchBank[identifier] = touchRecord)); touchHistory.mostRecentTimeStamp = timestampForTouch(touch); } @@ -274,25 +280,25 @@ function recordTouchMove(touch) { var touchRecord = touchBank[getTouchIdentifier(touch)]; touchRecord && ((touchRecord.touchActive = !0), - (touchRecord.previousPageX = touchRecord.currentPageX), - (touchRecord.previousPageY = touchRecord.currentPageY), - (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp), - (touchRecord.currentPageX = touch.pageX), - (touchRecord.currentPageY = touch.pageY), - (touchRecord.currentTimeStamp = timestampForTouch(touch)), - (touchHistory.mostRecentTimeStamp = timestampForTouch(touch))); + (touchRecord.previousPageX = touchRecord.currentPageX), + (touchRecord.previousPageY = touchRecord.currentPageY), + (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp), + (touchRecord.currentPageX = touch.pageX), + (touchRecord.currentPageY = touch.pageY), + (touchRecord.currentTimeStamp = timestampForTouch(touch)), + (touchHistory.mostRecentTimeStamp = timestampForTouch(touch))); } function recordTouchEnd(touch) { var touchRecord = touchBank[getTouchIdentifier(touch)]; touchRecord && ((touchRecord.touchActive = !1), - (touchRecord.previousPageX = touchRecord.currentPageX), - (touchRecord.previousPageY = touchRecord.currentPageY), - (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp), - (touchRecord.currentPageX = touch.pageX), - (touchRecord.currentPageY = touch.pageY), - (touchRecord.currentTimeStamp = timestampForTouch(touch)), - (touchHistory.mostRecentTimeStamp = timestampForTouch(touch))); + (touchRecord.previousPageX = touchRecord.currentPageX), + (touchRecord.previousPageY = touchRecord.currentPageY), + (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp), + (touchRecord.currentPageX = touch.pageX), + (touchRecord.currentPageY = touch.pageY), + (touchRecord.currentTimeStamp = timestampForTouch(touch)), + (touchHistory.mostRecentTimeStamp = timestampForTouch(touch))); } var instrumentationCallback, ResponderTouchHistoryStore = { @@ -308,16 +314,16 @@ var instrumentationCallback, nativeEvent.changedTouches.forEach(recordTouchStart), (touchHistory.numberActiveTouches = nativeEvent.touches.length), 1 === touchHistory.numberActiveTouches && - (touchHistory.indexOfSingleActiveTouch = - nativeEvent.touches[0].identifier); + (touchHistory.indexOfSingleActiveTouch = + nativeEvent.touches[0].identifier); else if ( "topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType ) if ( (nativeEvent.changedTouches.forEach(recordTouchEnd), - (touchHistory.numberActiveTouches = nativeEvent.touches.length), - 1 === touchHistory.numberActiveTouches) + (touchHistory.numberActiveTouches = nativeEvent.touches.length), + 1 === touchHistory.numberActiveTouches) ) for ( topLevelType = 0; @@ -326,7 +332,7 @@ var instrumentationCallback, ) if ( ((nativeEvent = touchBank[topLevelType]), - null != nativeEvent && nativeEvent.touchActive) + null != nativeEvent && nativeEvent.touchActive) ) { touchHistory.indexOfSingleActiveTouch = topLevelType; break; @@ -342,10 +348,10 @@ function accumulate(current, next) { return null == current ? next : isArrayImpl(current) - ? current.concat(next) - : isArrayImpl(next) - ? [current].concat(next) - : [current, next]; + ? current.concat(next) + : isArrayImpl(next) + ? [current].concat(next) + : [current, next]; } function accumulateInto(current, next) { if (null == next) @@ -437,8 +443,8 @@ function getParent$1(inst) { return inst ? inst : null; } function traverseTwoPhase$1(inst, fn, arg) { - for (var path = []; inst; ) path.push(inst), (inst = getParent$1(inst)); - for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg); + for (var path = []; inst;) path.push(inst), (inst = getParent$1(inst)); + for (inst = path.length; 0 < inst--;) fn(path[inst], "captured", arg); for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg); } function getListener$1(inst, registrationName) { @@ -449,10 +455,10 @@ function getListener$1(inst, registrationName) { if ((inst = inst[registrationName]) && "function" !== typeof inst) throw Error( "Expected `" + - registrationName + - "` listener to be a function, instead got a value of `" + - typeof inst + - "` type." + registrationName + + "` listener to be a function, instead got a value of `" + + typeof inst + + "` type." ); return inst; } @@ -482,10 +488,10 @@ function accumulateDirectDispatchesSingle$1(event) { event._dispatchListeners, listener )), - (event._dispatchInstances = accumulateInto( - event._dispatchInstances, - inst - ))); + (event._dispatchInstances = accumulateInto( + event._dispatchInstances, + inst + ))); } } } @@ -506,123 +512,123 @@ function accumulateTwoPhaseDispatchesSingle$1(event) { ); } var ResponderEventPlugin = { - _getResponder: function () { - return responderInst; - }, - eventTypes: eventTypes, - extractEvents: function ( - topLevelType, - targetInst, - nativeEvent, - nativeEventTarget + _getResponder: function () { + return responderInst; + }, + eventTypes: eventTypes, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ) { + if (isStartish(topLevelType)) trackedTouchCount += 1; + else if ( + "topTouchEnd" === topLevelType || + "topTouchCancel" === topLevelType + ) + if (0 <= trackedTouchCount) --trackedTouchCount; + else return null; + ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent); + if ( + targetInst && + (("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll) || + (0 < trackedTouchCount && "topSelectionChange" === topLevelType) || + isStartish(topLevelType) || + isMoveish(topLevelType)) ) { - if (isStartish(topLevelType)) trackedTouchCount += 1; - else if ( - "topTouchEnd" === topLevelType || - "topTouchCancel" === topLevelType - ) - if (0 <= trackedTouchCount) --trackedTouchCount; - else return null; - ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent); - if ( - targetInst && - (("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll) || - (0 < trackedTouchCount && "topSelectionChange" === topLevelType) || - isStartish(topLevelType) || - isMoveish(topLevelType)) - ) { - var shouldSetEventType = isStartish(topLevelType) - ? eventTypes.startShouldSetResponder - : isMoveish(topLevelType) + var shouldSetEventType = isStartish(topLevelType) + ? eventTypes.startShouldSetResponder + : isMoveish(topLevelType) ? eventTypes.moveShouldSetResponder : "topSelectionChange" === topLevelType - ? eventTypes.selectionChangeShouldSetResponder - : eventTypes.scrollShouldSetResponder; - if (responderInst) - b: { - var JSCompiler_temp = responderInst; - for ( - var depthA = 0, tempA = JSCompiler_temp; - tempA; - tempA = getParent$1(tempA) + ? eventTypes.selectionChangeShouldSetResponder + : eventTypes.scrollShouldSetResponder; + if (responderInst) + b: { + var JSCompiler_temp = responderInst; + for ( + var depthA = 0, tempA = JSCompiler_temp; + tempA; + tempA = getParent$1(tempA) + ) + depthA++; + tempA = 0; + for (var tempB = targetInst; tempB; tempB = getParent$1(tempB)) + tempA++; + for (; 0 < depthA - tempA;) + (JSCompiler_temp = getParent$1(JSCompiler_temp)), depthA--; + for (; 0 < tempA - depthA;) + (targetInst = getParent$1(targetInst)), tempA--; + for (; depthA--;) { + if ( + JSCompiler_temp === targetInst || + JSCompiler_temp === targetInst.alternate ) - depthA++; - tempA = 0; - for (var tempB = targetInst; tempB; tempB = getParent$1(tempB)) - tempA++; - for (; 0 < depthA - tempA; ) - (JSCompiler_temp = getParent$1(JSCompiler_temp)), depthA--; - for (; 0 < tempA - depthA; ) - (targetInst = getParent$1(targetInst)), tempA--; - for (; depthA--; ) { - if ( - JSCompiler_temp === targetInst || - JSCompiler_temp === targetInst.alternate - ) - break b; - JSCompiler_temp = getParent$1(JSCompiler_temp); - targetInst = getParent$1(targetInst); - } - JSCompiler_temp = null; + break b; + JSCompiler_temp = getParent$1(JSCompiler_temp); + targetInst = getParent$1(targetInst); } - else JSCompiler_temp = targetInst; - targetInst = JSCompiler_temp; - JSCompiler_temp = targetInst === responderInst; - shouldSetEventType = ResponderSyntheticEvent.getPooled( + JSCompiler_temp = null; + } + else JSCompiler_temp = targetInst; + targetInst = JSCompiler_temp; + JSCompiler_temp = targetInst === responderInst; + shouldSetEventType = ResponderSyntheticEvent.getPooled( + shouldSetEventType, + targetInst, + nativeEvent, + nativeEventTarget + ); + shouldSetEventType.touchHistory = + ResponderTouchHistoryStore.touchHistory; + JSCompiler_temp + ? forEachAccumulated( shouldSetEventType, - targetInst, - nativeEvent, - nativeEventTarget + accumulateTwoPhaseDispatchesSingleSkipTarget + ) + : forEachAccumulated( + shouldSetEventType, + accumulateTwoPhaseDispatchesSingle$1 ); - shouldSetEventType.touchHistory = - ResponderTouchHistoryStore.touchHistory; - JSCompiler_temp - ? forEachAccumulated( - shouldSetEventType, - accumulateTwoPhaseDispatchesSingleSkipTarget - ) - : forEachAccumulated( - shouldSetEventType, - accumulateTwoPhaseDispatchesSingle$1 - ); - b: { - JSCompiler_temp = shouldSetEventType._dispatchListeners; - targetInst = shouldSetEventType._dispatchInstances; - if (isArrayImpl(JSCompiler_temp)) - for ( - depthA = 0; - depthA < JSCompiler_temp.length && - !shouldSetEventType.isPropagationStopped(); - depthA++ + b: { + JSCompiler_temp = shouldSetEventType._dispatchListeners; + targetInst = shouldSetEventType._dispatchInstances; + if (isArrayImpl(JSCompiler_temp)) + for ( + depthA = 0; + depthA < JSCompiler_temp.length && + !shouldSetEventType.isPropagationStopped(); + depthA++ + ) { + if ( + JSCompiler_temp[depthA](shouldSetEventType, targetInst[depthA]) ) { - if ( - JSCompiler_temp[depthA](shouldSetEventType, targetInst[depthA]) - ) { - JSCompiler_temp = targetInst[depthA]; - break b; - } + JSCompiler_temp = targetInst[depthA]; + break b; } - else if ( - JSCompiler_temp && - JSCompiler_temp(shouldSetEventType, targetInst) - ) { - JSCompiler_temp = targetInst; - break b; } - JSCompiler_temp = null; + else if ( + JSCompiler_temp && + JSCompiler_temp(shouldSetEventType, targetInst) + ) { + JSCompiler_temp = targetInst; + break b; } - shouldSetEventType._dispatchInstances = null; - shouldSetEventType._dispatchListeners = null; - shouldSetEventType.isPersistent() || - shouldSetEventType.constructor.release(shouldSetEventType); - if (JSCompiler_temp && JSCompiler_temp !== responderInst) - if ( - ((shouldSetEventType = ResponderSyntheticEvent.getPooled( - eventTypes.responderGrant, - JSCompiler_temp, - nativeEvent, - nativeEventTarget - )), + JSCompiler_temp = null; + } + shouldSetEventType._dispatchInstances = null; + shouldSetEventType._dispatchListeners = null; + shouldSetEventType.isPersistent() || + shouldSetEventType.constructor.release(shouldSetEventType); + if (JSCompiler_temp && JSCompiler_temp !== responderInst) + if ( + ((shouldSetEventType = ResponderSyntheticEvent.getPooled( + eventTypes.responderGrant, + JSCompiler_temp, + nativeEvent, + nativeEventTarget + )), (shouldSetEventType.touchHistory = ResponderTouchHistoryStore.touchHistory), forEachAccumulated( @@ -631,159 +637,159 @@ var ResponderEventPlugin = { ), (targetInst = !0 === executeDirectDispatch(shouldSetEventType)), responderInst) - ) - if ( - ((depthA = ResponderSyntheticEvent.getPooled( - eventTypes.responderTerminationRequest, - responderInst, - nativeEvent, - nativeEventTarget - )), + ) + if ( + ((depthA = ResponderSyntheticEvent.getPooled( + eventTypes.responderTerminationRequest, + responderInst, + nativeEvent, + nativeEventTarget + )), (depthA.touchHistory = ResponderTouchHistoryStore.touchHistory), forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1), (tempA = !depthA._dispatchListeners || executeDirectDispatch(depthA)), depthA.isPersistent() || depthA.constructor.release(depthA), tempA) - ) { - depthA = ResponderSyntheticEvent.getPooled( - eventTypes.responderTerminate, - responderInst, - nativeEvent, - nativeEventTarget - ); - depthA.touchHistory = ResponderTouchHistoryStore.touchHistory; - forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1); - var JSCompiler_temp$jscomp$0 = accumulate( - JSCompiler_temp$jscomp$0, - [shouldSetEventType, depthA] - ); - changeResponder(JSCompiler_temp, targetInst); - } else - (shouldSetEventType = ResponderSyntheticEvent.getPooled( - eventTypes.responderReject, - JSCompiler_temp, - nativeEvent, - nativeEventTarget - )), - (shouldSetEventType.touchHistory = - ResponderTouchHistoryStore.touchHistory), - forEachAccumulated( - shouldSetEventType, - accumulateDirectDispatchesSingle$1 - ), - (JSCompiler_temp$jscomp$0 = accumulate( - JSCompiler_temp$jscomp$0, - shouldSetEventType - )); - else - (JSCompiler_temp$jscomp$0 = accumulate( + ) { + depthA = ResponderSyntheticEvent.getPooled( + eventTypes.responderTerminate, + responderInst, + nativeEvent, + nativeEventTarget + ); + depthA.touchHistory = ResponderTouchHistoryStore.touchHistory; + forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1); + var JSCompiler_temp$jscomp$0 = accumulate( JSCompiler_temp$jscomp$0, - shouldSetEventType + [shouldSetEventType, depthA] + ); + changeResponder(JSCompiler_temp, targetInst); + } else + (shouldSetEventType = ResponderSyntheticEvent.getPooled( + eventTypes.responderReject, + JSCompiler_temp, + nativeEvent, + nativeEventTarget )), - changeResponder(JSCompiler_temp, targetInst); - else JSCompiler_temp$jscomp$0 = null; - } else JSCompiler_temp$jscomp$0 = null; - shouldSetEventType = responderInst && isStartish(topLevelType); - JSCompiler_temp = responderInst && isMoveish(topLevelType); - targetInst = - responderInst && - ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType); - if ( - (shouldSetEventType = shouldSetEventType - ? eventTypes.responderStart - : JSCompiler_temp - ? eventTypes.responderMove - : targetInst - ? eventTypes.responderEnd - : null) - ) - (shouldSetEventType = ResponderSyntheticEvent.getPooled( - shouldSetEventType, - responderInst, - nativeEvent, - nativeEventTarget - )), - (shouldSetEventType.touchHistory = - ResponderTouchHistoryStore.touchHistory), - forEachAccumulated( - shouldSetEventType, - accumulateDirectDispatchesSingle$1 - ), + (shouldSetEventType.touchHistory = + ResponderTouchHistoryStore.touchHistory), + forEachAccumulated( + shouldSetEventType, + accumulateDirectDispatchesSingle$1 + ), + (JSCompiler_temp$jscomp$0 = accumulate( + JSCompiler_temp$jscomp$0, + shouldSetEventType + )); + else (JSCompiler_temp$jscomp$0 = accumulate( JSCompiler_temp$jscomp$0, shouldSetEventType - )); - shouldSetEventType = responderInst && "topTouchCancel" === topLevelType; - if ( - (topLevelType = - responderInst && - !shouldSetEventType && - ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType)) - ) - a: { - if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length) - for ( - JSCompiler_temp = 0; - JSCompiler_temp < topLevelType.length; - JSCompiler_temp++ - ) - if ( - ((targetInst = topLevelType[JSCompiler_temp].target), + )), + changeResponder(JSCompiler_temp, targetInst); + else JSCompiler_temp$jscomp$0 = null; + } else JSCompiler_temp$jscomp$0 = null; + shouldSetEventType = responderInst && isStartish(topLevelType); + JSCompiler_temp = responderInst && isMoveish(topLevelType); + targetInst = + responderInst && + ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType); + if ( + (shouldSetEventType = shouldSetEventType + ? eventTypes.responderStart + : JSCompiler_temp + ? eventTypes.responderMove + : targetInst + ? eventTypes.responderEnd + : null) + ) + (shouldSetEventType = ResponderSyntheticEvent.getPooled( + shouldSetEventType, + responderInst, + nativeEvent, + nativeEventTarget + )), + (shouldSetEventType.touchHistory = + ResponderTouchHistoryStore.touchHistory), + forEachAccumulated( + shouldSetEventType, + accumulateDirectDispatchesSingle$1 + ), + (JSCompiler_temp$jscomp$0 = accumulate( + JSCompiler_temp$jscomp$0, + shouldSetEventType + )); + shouldSetEventType = responderInst && "topTouchCancel" === topLevelType; + if ( + (topLevelType = + responderInst && + !shouldSetEventType && + ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType)) + ) + a: { + if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length) + for ( + JSCompiler_temp = 0; + JSCompiler_temp < topLevelType.length; + JSCompiler_temp++ + ) + if ( + ((targetInst = topLevelType[JSCompiler_temp].target), null !== targetInst && - void 0 !== targetInst && - 0 !== targetInst) - ) { - depthA = getInstanceFromNode$1(targetInst); - b: { - for (targetInst = responderInst; depthA; ) { - if ( - targetInst === depthA || - targetInst === depthA.alternate - ) { - targetInst = !0; - break b; - } - depthA = getParent$1(depthA); + void 0 !== targetInst && + 0 !== targetInst) + ) { + depthA = getInstanceFromNode$1(targetInst); + b: { + for (targetInst = responderInst; depthA;) { + if ( + targetInst === depthA || + targetInst === depthA.alternate + ) { + targetInst = !0; + break b; } - targetInst = !1; - } - if (targetInst) { - topLevelType = !1; - break a; + depthA = getParent$1(depthA); } + targetInst = !1; } - topLevelType = !0; - } - if ( - (topLevelType = shouldSetEventType - ? eventTypes.responderTerminate - : topLevelType + if (targetInst) { + topLevelType = !1; + break a; + } + } + topLevelType = !0; + } + if ( + (topLevelType = shouldSetEventType + ? eventTypes.responderTerminate + : topLevelType ? eventTypes.responderRelease : null) - ) - (nativeEvent = ResponderSyntheticEvent.getPooled( - topLevelType, - responderInst, - nativeEvent, - nativeEventTarget + ) + (nativeEvent = ResponderSyntheticEvent.getPooled( + topLevelType, + responderInst, + nativeEvent, + nativeEventTarget + )), + (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory), + forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle$1), + (JSCompiler_temp$jscomp$0 = accumulate( + JSCompiler_temp$jscomp$0, + nativeEvent )), - (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory), - forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle$1), - (JSCompiler_temp$jscomp$0 = accumulate( - JSCompiler_temp$jscomp$0, - nativeEvent - )), - changeResponder(null); - return JSCompiler_temp$jscomp$0; - }, - GlobalResponderHandler: null, - injection: { - injectGlobalResponderHandler: function (GlobalResponderHandler) { - ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler; - } - } + changeResponder(null); + return JSCompiler_temp$jscomp$0; }, + GlobalResponderHandler: null, + injection: { + injectGlobalResponderHandler: function (GlobalResponderHandler) { + ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler; + } + } +}, eventPluginOrder = null, namesToPlugins = {}; function recomputePluginOrdering() { @@ -794,13 +800,13 @@ function recomputePluginOrdering() { if (-1 >= pluginIndex) throw Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + - (pluginName + "`.") + (pluginName + "`.") ); if (!plugins[pluginIndex]) { if (!pluginModule.extractEvents) throw Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + - (pluginName + "` does not.") + (pluginName + "` does not.") ); plugins[pluginIndex] = pluginModule; pluginIndex = pluginModule.eventTypes; @@ -810,7 +816,7 @@ function recomputePluginOrdering() { if (eventNameDispatchConfigs.hasOwnProperty(eventName)) throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" + - (eventName + "`.") + (eventName + "`.") ); eventNameDispatchConfigs[eventName] = dispatchConfig; var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; @@ -827,18 +833,18 @@ function recomputePluginOrdering() { } else dispatchConfig.registrationName ? (publishRegistrationName( - dispatchConfig.registrationName, - pluginModule - ), + dispatchConfig.registrationName, + pluginModule + ), (JSCompiler_inline_result = !0)) : (JSCompiler_inline_result = !1); if (!JSCompiler_inline_result) throw Error( "EventPluginRegistry: Failed to publish event `" + - eventName + - "` for plugin `" + - pluginName + - "`." + eventName + + "` for plugin `" + + pluginName + + "`." ); } } @@ -848,7 +854,7 @@ function publishRegistrationName(registrationName, pluginModule) { if (registrationNameModules[registrationName]) throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" + - (registrationName + "`.") + (registrationName + "`.") ); registrationNameModules[registrationName] = pluginModule; } @@ -863,16 +869,16 @@ function getListener(inst, registrationName) { if ((inst = inst[registrationName]) && "function" !== typeof inst) throw Error( "Expected `" + - registrationName + - "` listener to be a function, instead got a value of `" + - typeof inst + - "` type." + registrationName + + "` listener to be a function, instead got a value of `" + + typeof inst + + "` type." ); return inst; } var customBubblingEventTypes = - ReactNativePrivateInterface.ReactNativeViewConfigRegistry - .customBubblingEventTypes, + ReactNativePrivateInterface.ReactNativeViewConfigRegistry + .customBubblingEventTypes, customDirectEventTypes = ReactNativePrivateInterface.ReactNativeViewConfigRegistry .customDirectEventTypes; @@ -893,13 +899,13 @@ function accumulateDirectionalDispatches(inst, phase, event) { )); } function traverseTwoPhase(inst, fn, arg, skipBubbling) { - for (var path = []; inst; ) { + for (var path = []; inst;) { path.push(inst); do inst = inst.return; while (inst && 5 !== inst.tag); inst = inst ? inst : null; } - for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg); + for (inst = path.length; 0 < inst--;) fn(path[inst], "captured", arg); if (skipBubbling) fn(path[0], "bubbled", arg); else for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg); @@ -924,10 +930,10 @@ function accumulateDirectDispatchesSingle(event) { event._dispatchListeners, listener )), - (event._dispatchInstances = accumulateInto( - event._dispatchInstances, - inst - ))); + (event._dispatchInstances = accumulateInto( + event._dispatchInstances, + inst + ))); } } } @@ -941,51 +947,51 @@ eventPluginOrder = Array.prototype.slice.call([ ]); recomputePluginOrdering(); var injectedNamesToPlugins$jscomp$inline_232 = { - ResponderEventPlugin: ResponderEventPlugin, - ReactNativeBridgeEventPlugin: { - eventTypes: {}, - extractEvents: function ( - topLevelType, + ResponderEventPlugin: ResponderEventPlugin, + ReactNativeBridgeEventPlugin: { + eventTypes: {}, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ) { + if (null == targetInst) return null; + var bubbleDispatchConfig = customBubblingEventTypes[topLevelType], + directDispatchConfig = customDirectEventTypes[topLevelType]; + if (!bubbleDispatchConfig && !directDispatchConfig) + throw Error( + 'Unsupported top level event type "' + topLevelType + '" dispatched' + ); + topLevelType = SyntheticEvent.getPooled( + bubbleDispatchConfig || directDispatchConfig, targetInst, nativeEvent, nativeEventTarget - ) { - if (null == targetInst) return null; - var bubbleDispatchConfig = customBubblingEventTypes[topLevelType], - directDispatchConfig = customDirectEventTypes[topLevelType]; - if (!bubbleDispatchConfig && !directDispatchConfig) - throw Error( - 'Unsupported top level event type "' + topLevelType + '" dispatched' - ); - topLevelType = SyntheticEvent.getPooled( - bubbleDispatchConfig || directDispatchConfig, - targetInst, - nativeEvent, - nativeEventTarget - ); - if (bubbleDispatchConfig) - null != topLevelType && + ); + if (bubbleDispatchConfig) + null != topLevelType && null != topLevelType.dispatchConfig.phasedRegistrationNames && topLevelType.dispatchConfig.phasedRegistrationNames.skipBubbling - ? topLevelType && - topLevelType.dispatchConfig.phasedRegistrationNames && - traverseTwoPhase( - topLevelType._targetInst, - accumulateDirectionalDispatches, - topLevelType, - !0 - ) - : forEachAccumulated( - topLevelType, - accumulateTwoPhaseDispatchesSingle - ); - else if (directDispatchConfig) - forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle); - else return null; - return topLevelType; - } + ? topLevelType && + topLevelType.dispatchConfig.phasedRegistrationNames && + traverseTwoPhase( + topLevelType._targetInst, + accumulateDirectionalDispatches, + topLevelType, + !0 + ) + : forEachAccumulated( + topLevelType, + accumulateTwoPhaseDispatchesSingle + ); + else if (directDispatchConfig) + forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle); + else return null; + return topLevelType; } - }, + } +}, isOrderingDirty$jscomp$inline_233 = !1, pluginName$jscomp$inline_234; for (pluginName$jscomp$inline_234 in injectedNamesToPlugins$jscomp$inline_232) @@ -999,12 +1005,12 @@ for (pluginName$jscomp$inline_234 in injectedNamesToPlugins$jscomp$inline_232) if ( !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_234) || namesToPlugins[pluginName$jscomp$inline_234] !== - pluginModule$jscomp$inline_235 + pluginModule$jscomp$inline_235 ) { if (namesToPlugins[pluginName$jscomp$inline_234]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_234 + "`.") + (pluginName$jscomp$inline_234 + "`.") ); namesToPlugins[pluginName$jscomp$inline_234] = pluginModule$jscomp$inline_235; @@ -1020,10 +1026,10 @@ function defaultDiffer(prevProp, nextProp) { return "object" !== typeof nextProp || null === nextProp ? !0 : ReactNativePrivateInterface.deepDiffer( - prevProp, - nextProp, - deepDifferOptions - ); + prevProp, + nextProp, + deepDifferOptions + ); } function restoreDeletedValuesInNestedArray( updatePayload, @@ -1031,7 +1037,7 @@ function restoreDeletedValuesInNestedArray( validAttributes ) { if (isArrayImpl(node)) - for (var i = node.length; i-- && 0 < removedKeyCount; ) + for (var i = node.length; i-- && 0 < removedKeyCount;) restoreDeletedValuesInNestedArray( updatePayload, node[i], @@ -1074,13 +1080,13 @@ function diffNestedProperty( return nextProp ? addNestedProperty(updatePayload, nextProp, validAttributes) : prevProp - ? clearNestedProperty(updatePayload, prevProp, validAttributes) - : updatePayload; + ? clearNestedProperty(updatePayload, prevProp, validAttributes) + : updatePayload; if (!isArrayImpl(prevProp) && !isArrayImpl(nextProp)) return diffProperties(updatePayload, prevProp, nextProp, validAttributes); if (isArrayImpl(prevProp) && isArrayImpl(nextProp)) { var minLength = - prevProp.length < nextProp.length ? prevProp.length : nextProp.length, + prevProp.length < nextProp.length ? prevProp.length : nextProp.length, i; for (i = 0; i < minLength; i++) updatePayload = diffNestedProperty( @@ -1105,17 +1111,17 @@ function diffNestedProperty( } return isArrayImpl(prevProp) ? diffProperties( - updatePayload, - ReactNativePrivateInterface.flattenStyle(prevProp), - nextProp, - validAttributes - ) + updatePayload, + ReactNativePrivateInterface.flattenStyle(prevProp), + nextProp, + validAttributes + ) : diffProperties( - updatePayload, - prevProp, - ReactNativePrivateInterface.flattenStyle(nextProp), - validAttributes - ); + updatePayload, + prevProp, + ReactNativePrivateInterface.flattenStyle(nextProp), + validAttributes + ); } function addNestedProperty(updatePayload, nextProp, validAttributes) { if (!nextProp) return updatePayload; @@ -1161,7 +1167,7 @@ function diffProperties(updatePayload, prevProps, nextProps, validAttributes) { ((nextProp = !0), "function" === typeof prevProp && (prevProp = !0)); "undefined" === typeof nextProp && ((nextProp = null), - "undefined" === typeof prevProp && (prevProp = null)); + "undefined" === typeof prevProp && (prevProp = null)); removedKeys && (removedKeys[propKey] = !1); if (updatePayload && void 0 !== updatePayload[propKey]) if ("object" !== typeof attributeConfig) @@ -1207,12 +1213,12 @@ function diffProperties(updatePayload, prevProps, nextProps, validAttributes) { attributeConfig )), 0 < removedKeyCount && - updatePayload && - (restoreDeletedValuesInNestedArray( - updatePayload, - nextProp, - attributeConfig - ), + updatePayload && + (restoreDeletedValuesInNestedArray( + updatePayload, + nextProp, + attributeConfig + ), (removedKeys = null)); } for (var propKey$1 in prevProps) @@ -1220,19 +1226,19 @@ function diffProperties(updatePayload, prevProps, nextProps, validAttributes) { (!(attributeConfig = validAttributes[propKey$1]) || (updatePayload && void 0 !== updatePayload[propKey$1]) || ((prevProp = prevProps[propKey$1]), - void 0 !== prevProp && + void 0 !== prevProp && ("object" !== typeof attributeConfig || - "function" === typeof attributeConfig.diff || - "function" === typeof attributeConfig.process + "function" === typeof attributeConfig.diff || + "function" === typeof attributeConfig.process ? (((updatePayload || (updatePayload = {}))[propKey$1] = null), removedKeys || (removedKeys = {}), removedKeys[propKey$1] || - ((removedKeys[propKey$1] = !0), removedKeyCount++)) + ((removedKeys[propKey$1] = !0), removedKeyCount++)) : (updatePayload = clearNestedProperty( - updatePayload, - prevProp, - attributeConfig - ))))); + updatePayload, + prevProp, + attributeConfig + ))))); return updatePayload; } function batchedUpdatesImpl(fn, bookkeeping) { @@ -1307,9 +1313,9 @@ function dispatchEvent(target, topLevelType, nativeEvent) { if (hasRethrowError) throw ( ((event = rethrowError), - (hasRethrowError = !1), - (rethrowError = null), - event) + (hasRethrowError = !1), + (rethrowError = null), + event) ); } }); @@ -1336,7 +1342,7 @@ function onCommitRoot(root) { void 0, 128 === (root.current.flags & 128) ); - } catch (err) {} + } catch (err) { } } var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, @@ -1423,11 +1429,11 @@ function getNextLanes(root, wipLanes) { wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || + (root = wipLanes & -wipLanes), + suspendedLanes >= root || (32 === suspendedLanes && 0 !== (root & 4194176))) - ? wipLanes - : nextLanes; + ? wipLanes + : nextLanes; } function computeExpirationTime(lane, currentTime) { switch (lane) { @@ -1508,7 +1514,7 @@ function markRootFinished(root, remainingLanes, spawnedLane) { remainingLanes = root.entanglements; for ( var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; + hiddenUpdates = root.hiddenUpdates; 0 < noLongerPendingLanes; ) { @@ -1542,7 +1548,7 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { } function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); - for (root = root.entanglements; rootEntangledLanes; ) { + for (root = root.entanglements; rootEntangledLanes;) { var index$6 = 31 - clz32(rootEntangledLanes), lane = 1 << index$6; (lane & entangledLanes) | (root[index$6] & entangledLanes) && @@ -1606,8 +1612,8 @@ function getPublicInstance(instance) { return null != instance.canonical && null != instance.canonical.publicInstance ? instance.canonical.publicInstance : null != instance._nativeTag - ? instance - : null; + ? instance + : null; } var scheduleTimeout = setTimeout, cancelTimeout = clearTimeout; @@ -1715,7 +1721,7 @@ function getComponentNameFromType(type) { type = type.displayName; type || ((type = innerType.displayName || innerType.name || ""), - (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); return type; case REACT_MEMO_TYPE: return ( @@ -1729,7 +1735,7 @@ function getComponentNameFromType(type) { type = type._init; try { return getComponentNameFromType(type(innerType)); - } catch (x) {} + } catch (x) { } } return null; } @@ -1749,7 +1755,7 @@ function getComponentNameFromFiber(fiber) { (fiber = type.render), (fiber = fiber.displayName || fiber.name || ""), type.displayName || - ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef") + ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef") ); case 7: return "Fragment"; @@ -1794,7 +1800,7 @@ function getComponentNameFromFiber(fiber) { function getNearestMountedFiber(fiber) { var node = fiber, nearestMounted = fiber; - if (fiber.alternate) for (; node.return; ) node = node.return; + if (fiber.alternate) for (; node.return;) node = node.return; else { fiber = node; do @@ -1817,7 +1823,7 @@ function findCurrentFiberUsingSlowPath(fiber) { throw Error("Unable to find node on an unmounted component."); return alternate !== fiber ? null : fiber; } - for (var a = fiber, b = alternate; ; ) { + for (var a = fiber, b = alternate; ;) { var parentA = a.return; if (null === parentA) break; var parentB = parentA.alternate; @@ -1830,7 +1836,7 @@ function findCurrentFiberUsingSlowPath(fiber) { break; } if (parentA.child === parentB.child) { - for (parentB = parentA.child; parentB; ) { + for (parentB = parentA.child; parentB;) { if (parentB === a) return assertIsMounted(parentA), fiber; if (parentB === b) return assertIsMounted(parentA), alternate; parentB = parentB.sibling; @@ -1839,7 +1845,7 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$7 = parentA.child; child$7; ) { + for (var didFindChild = !1, child$7 = parentA.child; child$7;) { if (child$7 === a) { didFindChild = !0; a = parentA; @@ -1855,7 +1861,7 @@ function findCurrentFiberUsingSlowPath(fiber) { child$7 = child$7.sibling; } if (!didFindChild) { - for (child$7 = parentB.child; child$7; ) { + for (child$7 = parentB.child; child$7;) { if (child$7 === a) { didFindChild = !0; a = parentB; @@ -1892,7 +1898,7 @@ function findCurrentHostFiber(parent) { function findCurrentHostFiberImpl(node) { var tag = node.tag; if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node; - for (node = node.child; null !== node; ) { + for (node = node.child; null !== node;) { tag = findCurrentHostFiberImpl(node); if (null !== tag) return tag; node = node.sibling; @@ -1942,9 +1948,9 @@ function getMaskedContext(workInProgress, unmaskedContext) { for (key in contextTypes) context[key] = unmaskedContext[key]; instance && ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); + (workInProgress.__reactInternalMemoizedUnmaskedChildContext = + unmaskedContext), + (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); return context; } function isContextProvider(type) { @@ -1972,9 +1978,9 @@ function processChildContext(fiber, type, parentContext) { if (!(contextKey in type)) throw Error( (getComponentNameFromFiber(fiber) || "Unknown") + - '.getChildContext(): key "' + - contextKey + - '" is not defined in childContextTypes.' + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.' ); return assign({}, parentContext, instance); } @@ -1996,10 +2002,10 @@ function invalidateContextProvider(workInProgress, type, didChange) { ); didChange ? ((workInProgress = processChildContext( - workInProgress, - type, - previousContext - )), + workInProgress, + type, + previousContext + )), (instance.__reactInternalMemoizedMergedChildContext = workInProgress), pop(didPerformWorkStackCursor), pop(contextStackCursor$1), @@ -2041,7 +2047,7 @@ function pushHostContext(fiber) { : context; context !== JSCompiler_inline_result && (push(contextFiberStackCursor, fiber), - push(contextStackCursor, JSCompiler_inline_result)); + push(contextStackCursor, JSCompiler_inline_result)); } function popHostContext(fiber) { contextFiberStackCursor.current === fiber && @@ -2054,7 +2060,7 @@ var hydrationErrors = null, function finishQueueingConcurrentUpdates() { for ( var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); i < endIndex; ) { @@ -2094,12 +2100,12 @@ function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { sourceFiber.lanes |= lane; var alternate = sourceFiber.alternate; null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + for (var isHidden = !1, parent = sourceFiber.return; null !== parent;) (parent.childLanes |= lane), (alternate = parent.alternate), null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && - ((sourceFiber = parent.stateNode), + ((sourceFiber = parent.stateNode), null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), (sourceFiber = parent), (parent = parent.return); @@ -2107,24 +2113,24 @@ function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { null !== update && 3 === sourceFiber.tag && ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } function getRootForUpdatedFiber(sourceFiber) { if (50 < nestedUpdateCount) throw ( ((nestedUpdateCount = 0), - (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." - )) + (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." + )) ); - for (var parent = sourceFiber.return; null !== parent; ) + for (var parent = sourceFiber.return; null !== parent;) (sourceFiber = parent), (parent = sourceFiber.return); return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; } @@ -2143,7 +2149,7 @@ function ensureRootIsScheduled(root) { mightHavePendingSyncWork = !0; didScheduleMicrotask || ((didScheduleMicrotask = !0), - scheduleCallback$2(ImmediatePriority, processRootScheduleInMicrotask)); + scheduleCallback$2(ImmediatePriority, processRootScheduleInMicrotask)); scheduleTaskForRootDuringMicrotask(root, now()); } function flushSyncWorkAcrossRoots_impl(onlyLegacy) { @@ -2152,7 +2158,7 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root = firstScheduledRoot; null !== root; ) { + for (var root = firstScheduledRoot; null !== root;) { if (!onlyLegacy || 0 === root.tag) { var workInProgressRootRenderLanes$9 = workInProgressRootRenderLanes, nextLanes = getNextLanes( @@ -2181,32 +2187,32 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$9, - originallyAttemptedLanes, - errorRetryLanes - ))); + (exitStatus = recoverFromConcurrentError( + workInProgressRootRenderLanes$9, + originallyAttemptedLanes, + errorRetryLanes + ))); } if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$9, 0), - markRootSuspended( - workInProgressRootRenderLanes$9, - nextLanes, - 0 - ), - ensureRootIsScheduled(workInProgressRootRenderLanes$9), - originallyAttemptedLanes) + prepareFreshStack(workInProgressRootRenderLanes$9, 0), + markRootSuspended( + workInProgressRootRenderLanes$9, + nextLanes, + 0 + ), + ensureRootIsScheduled(workInProgressRootRenderLanes$9), + originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$9, - nextLanes, - workInProgressDeferredLane - ) + workInProgressRootRenderLanes$9, + nextLanes, + workInProgressDeferredLane + ) : ((workInProgressRootRenderLanes$9.finishedWork = - workInProgressRootRenderLanes$9.current.alternate), + workInProgressRootRenderLanes$9.current.alternate), (workInProgressRootRenderLanes$9.finishedLanes = nextLanes), commitRoot( workInProgressRootRenderLanes$9, @@ -2262,9 +2268,9 @@ function processRootScheduleInMicrotask() { function scheduleTaskForRootDuringMicrotask(root, currentTime) { for ( var suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - expirationTimes = root.expirationTimes, - lanes = root.pendingLanes & -62914561; + pingedLanes = root.pingedLanes, + expirationTimes = root.expirationTimes, + lanes = root.pendingLanes & -62914561; 0 < lanes; ) { @@ -2291,16 +2297,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { ) return ( null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), + null !== pingedLanes && + cancelCallback$1(pingedLanes), (root.callbackNode = null), (root.callbackPriority = 0) ); if (0 !== (suspendedLanes & 3)) return ( null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), + null !== pingedLanes && + cancelCallback$1(pingedLanes), (root.callbackPriority = 2), (root.callbackNode = null), 2 @@ -2448,12 +2454,12 @@ function processUpdateQueue( var current = workInProgress$jscomp$0.alternate; null !== current && ((current = current.updateQueue), - (pendingQueue = current.lastBaseUpdate), - pendingQueue !== lastBaseUpdate && + (pendingQueue = current.lastBaseUpdate), + pendingQueue !== lastBaseUpdate && (null === pendingQueue ? (current.firstBaseUpdate = firstPendingUpdate) : (pendingQueue.next = firstPendingUpdate), - (current.lastBaseUpdate = lastPendingUpdate))); + (current.lastBaseUpdate = lastPendingUpdate))); } if (null !== firstBaseUpdate) { var newState = queue.baseState; @@ -2470,13 +2476,13 @@ function processUpdateQueue( ) { null !== current && (current = current.next = - { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); + { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); a: { var workInProgress = workInProgress$jscomp$0, update = pendingQueue; @@ -2509,11 +2515,11 @@ function processUpdateQueue( 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)); + isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), + (isHiddenUpdate = queue.callbacks), + null === isHiddenUpdate + ? (queue.callbacks = [updateLane]) + : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { lane: updateLane, @@ -2552,7 +2558,7 @@ function callCallback(callback, context) { if ("function" !== typeof callback) throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + - callback + callback ); callback.call(context); } @@ -2613,17 +2619,17 @@ function describeFiber(fiber) { } } var SuspenseException = Error( - "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" - ), + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" +), SuspenseyCommitException = Error( "Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React." ), - noopSuspenseyCommitThenable = { then: function () {} }; + noopSuspenseyCommitThenable = { then: function () { } }; function isThenableResolved(thenable) { thenable = thenable.status; return "fulfilled" === thenable || "rejected" === thenable; } -function noop() {} +function noop() { } function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index @@ -2635,8 +2641,8 @@ function trackUsedThenable(thenableState, thenable, index) { case "rejected": throw ( ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) ); default: if ("string" === typeof thenable.status) thenable.then(noop, noop); @@ -2670,8 +2676,8 @@ function trackUsedThenable(thenableState, thenable, index) { case "rejected": throw ( ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) ); } } @@ -2722,8 +2728,8 @@ function coerceRef(returnFiber, current, element) { if (!inst) throw Error( "Missing owner for string ref " + - returnFiber + - ". This error is likely caused by a bug in React. Please file an issue." + returnFiber + + ". This error is likely caused by a bug in React. Please file an issue." ); var resolvedInst = inst, stringRef = "" + returnFiber; @@ -2748,8 +2754,8 @@ function coerceRef(returnFiber, current, element) { if (!element._owner) throw Error( "Element ref was specified as a string (" + - returnFiber + - ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." + returnFiber + + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." ); } return returnFiber; @@ -2758,10 +2764,10 @@ function throwOnInvalidObjectType(returnFiber, newChild) { 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." + ("[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 resolveLazy(lazyType) { @@ -2779,13 +2785,13 @@ function createChildReconciler(shouldTrackSideEffects) { } function deleteRemainingChildren(returnFiber, currentFirstChild) { if (!shouldTrackSideEffects) return null; - for (; null !== currentFirstChild; ) + for (; null !== currentFirstChild;) deleteChild(returnFiber, currentFirstChild), (currentFirstChild = currentFirstChild.sibling); return null; } function mapRemainingChildren(returnFiber, currentFirstChild) { - for (returnFiber = new Map(); null !== currentFirstChild; ) + for (returnFiber = new Map(); null !== currentFirstChild;) null !== currentFirstChild.key ? returnFiber.set(currentFirstChild.key, currentFirstChild) : returnFiber.set(currentFirstChild.index, currentFirstChild), @@ -3088,10 +3094,10 @@ function createChildReconciler(shouldTrackSideEffects) { ) { for ( var resultingFirstChild = null, - previousNewFiber = null, - oldFiber = currentFirstChild, - newIdx = (currentFirstChild = 0), - nextOldFiber = null; + previousNewFiber = null, + oldFiber = currentFirstChild, + newIdx = (currentFirstChild = 0), + nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++ ) { @@ -3127,11 +3133,11 @@ function createChildReconciler(shouldTrackSideEffects) { for (; newIdx < newChildren.length; newIdx++) (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)), null !== oldFiber && - ((currentFirstChild = placeChild( - oldFiber, - currentFirstChild, - newIdx - )), + ((currentFirstChild = placeChild( + oldFiber, + currentFirstChild, + newIdx + )), null === previousNewFiber ? (resultingFirstChild = oldFiber) : (previousNewFiber.sibling = oldFiber), @@ -3151,11 +3157,11 @@ function createChildReconciler(shouldTrackSideEffects) { lanes )), null !== nextOldFiber && - (shouldTrackSideEffects && - null !== nextOldFiber.alternate && - oldFiber.delete( - null === nextOldFiber.key ? newIdx : nextOldFiber.key - ), + (shouldTrackSideEffects && + null !== nextOldFiber.alternate && + oldFiber.delete( + null === nextOldFiber.key ? newIdx : nextOldFiber.key + ), (currentFirstChild = placeChild( nextOldFiber, currentFirstChild, @@ -3187,10 +3193,10 @@ function createChildReconciler(shouldTrackSideEffects) { throw Error("An iterable object provided no iterator."); for ( var previousNewFiber = (iteratorFn = null), - oldFiber = currentFirstChild, - newIdx = (currentFirstChild = 0), - nextOldFiber = null, - step = newChildrenIterable.next(); + oldFiber = currentFirstChild, + newIdx = (currentFirstChild = 0), + nextOldFiber = null, + step = newChildrenIterable.next(); null !== oldFiber && !step.done; newIdx++, step = newChildrenIterable.next() ) { @@ -3219,7 +3225,7 @@ function createChildReconciler(shouldTrackSideEffects) { for (; !step.done; newIdx++, step = newChildrenIterable.next()) (step = createChild(returnFiber, step.value, lanes)), null !== step && - ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), + ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber ? (iteratorFn = step) : (previousNewFiber.sibling = step), @@ -3233,9 +3239,9 @@ function createChildReconciler(shouldTrackSideEffects) { ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && - (shouldTrackSideEffects && - null !== step.alternate && - oldFiber.delete(null === step.key ? newIdx : step.key), + (shouldTrackSideEffects && + null !== step.alternate && + oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber ? (iteratorFn = step) @@ -3305,21 +3311,21 @@ function createChildReconciler(shouldTrackSideEffects) { } newChild.type === REACT_FRAGMENT_TYPE ? ((currentFirstChild = createFiberFromFragment( - newChild.props.children, - returnFiber.mode, - lanes, - newChild.key - )), + newChild.props.children, + returnFiber.mode, + lanes, + newChild.key + )), (currentFirstChild.return = returnFiber), (returnFiber = currentFirstChild)) : ((lanes = createFiberFromTypeAndProps( - newChild.type, - newChild.key, - newChild.props, - null, - returnFiber.mode, - lanes - )), + newChild.type, + newChild.key, + newChild.props, + null, + returnFiber.mode, + lanes + )), (lanes.ref = coerceRef( returnFiber, currentFirstChild, @@ -3331,14 +3337,14 @@ function createChildReconciler(shouldTrackSideEffects) { return placeSingleChild(returnFiber); case REACT_PORTAL_TYPE: a: { - for (child = newChild.key; null !== currentFirstChild; ) { + for (child = newChild.key; null !== currentFirstChild;) { if (currentFirstChild.key === child) if ( 4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === - newChild.containerInfo && + newChild.containerInfo && currentFirstChild.stateNode.implementation === - newChild.implementation + newChild.implementation ) { deleteRemainingChildren( returnFiber, @@ -3479,8 +3485,8 @@ function pushOffscreenSuspenseHandler(fiber) { if (22 === fiber.tag) { if ( (push(suspenseStackCursor, suspenseStackCursor.current), - push(suspenseHandlerStackCursor, fiber), - null === shellBoundary) + push(suspenseHandlerStackCursor, fiber), + null === shellBoundary) ) { var current = fiber.alternate; null !== current && @@ -3500,7 +3506,7 @@ function popSuspenseHandler(fiber) { } var suspenseStackCursor = createCursor(0); function findFirstSuspended(row) { - for (var node = row; null !== node; ) { + for (var node = row; null !== node;) { if (13 === node.tag) { var state = node.memoizedState; if (null !== state && (null === state.dehydrated || shim$1() || shim$1())) @@ -3513,7 +3519,7 @@ function findFirstSuspended(row) { continue; } if (node === row) break; - for (; null === node.sibling; ) { + for (; null === node.sibling;) { if (null === node.return || node.return === row) return null; node = node.return; } @@ -3675,7 +3681,7 @@ function updateWorkInProgressHook() { }; null === workInProgressHook ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = - nextCurrentHook) + nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } return workInProgressHook; @@ -3742,17 +3748,17 @@ function updateReducer(reducer) { ) null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = - { - lane: 0, - revertLane: 0, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), + { + lane: 0, + revertLane: 0, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), (updateLane = update.action), shouldDoubleInvokeUserFnsInHooksDEV && - reducer(pendingQueue, updateLane), + reducer(pendingQueue, updateLane), (pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane)); @@ -3932,8 +3938,8 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { deps = void 0 === deps ? null : deps; var inst = hook.memoizedState.inst; null !== currentHook && - null !== deps && - areHookInputsEqual(deps, currentHook.memoizedState.deps) + null !== deps && + areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushEffect(hookFlags, create, inst, deps)) : ((currentlyRenderingFiber$1.flags |= fiberFlags), (hook.memoizedState = pushEffect(1 | hookFlags, create, inst, deps))); @@ -3972,7 +3978,7 @@ function updateImperativeHandle(ref, create, deps) { deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps); } -function mountDebugValue() {} +function mountDebugValue() { } function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; @@ -4053,7 +4059,7 @@ function dispatchReducerAction(fiber, queue, action) { : (enqueueUpdate$1(fiber, queue, action, lane), (action = getRootForUpdatedFiber(fiber)), null !== action && - (scheduleUpdateOnFiber(action, fiber, lane), + (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { @@ -4091,7 +4097,7 @@ function dispatchSetState(fiber, queue, action) { action = getRootForUpdatedFiber(fiber); null !== action && (scheduleUpdateOnFiber(action, fiber, lane), - entangleTransitionUpdate(action, queue, lane)); + entangleTransitionUpdate(action, queue, lane)); } } function isRenderPhaseUpdate(fiber) { @@ -4120,24 +4126,24 @@ function entangleTransitionUpdate(root, queue, lane) { } } var ContextOnlyDispatcher = { - readContext: readContext, - use: use, - useCallback: throwInvalidHookError, - useContext: throwInvalidHookError, - useEffect: throwInvalidHookError, - useImperativeHandle: throwInvalidHookError, - useInsertionEffect: throwInvalidHookError, - useLayoutEffect: throwInvalidHookError, - useMemo: throwInvalidHookError, - useReducer: throwInvalidHookError, - useRef: throwInvalidHookError, - useState: throwInvalidHookError, - useDebugValue: throwInvalidHookError, - useDeferredValue: throwInvalidHookError, - useTransition: throwInvalidHookError, - useSyncExternalStore: throwInvalidHookError, - useId: throwInvalidHookError - }, + readContext: readContext, + use: use, + useCallback: throwInvalidHookError, + useContext: throwInvalidHookError, + useEffect: throwInvalidHookError, + useImperativeHandle: throwInvalidHookError, + useInsertionEffect: throwInvalidHookError, + useLayoutEffect: throwInvalidHookError, + useMemo: throwInvalidHookError, + useReducer: throwInvalidHookError, + useRef: throwInvalidHookError, + useState: throwInvalidHookError, + useDebugValue: throwInvalidHookError, + useDeferredValue: throwInvalidHookError, + useTransition: throwInvalidHookError, + useSyncExternalStore: throwInvalidHookError, + useId: throwInvalidHookError +}, HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -4321,11 +4327,11 @@ var ContextOnlyDispatcher = { return null === currentHook ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl( - hook, - currentHook.memoizedState, - value, - initialValue - ); + hook, + currentHook.memoizedState, + value, + initialValue + ); }, useTransition: function () { var booleanOrThenable = rerenderReducer(basicStateReducer)[0], @@ -4382,7 +4388,7 @@ var classComponentUpdater = { payload = enqueueUpdate(inst, update, lane); null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), - entangleTransitions(payload, inst, lane)); + entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; @@ -4394,7 +4400,7 @@ var classComponentUpdater = { payload = enqueueUpdate(inst, update, lane); null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), - entangleTransitions(payload, inst, lane)); + entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; @@ -4405,7 +4411,7 @@ var classComponentUpdater = { callback = enqueueUpdate(inst, update, lane); null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), - entangleTransitions(callback, inst, lane)); + entangleTransitions(callback, inst, lane)); } }; function checkShouldComponentUpdate( @@ -4421,8 +4427,8 @@ function checkShouldComponentUpdate( return "function" === typeof workInProgress.shouldComponentUpdate ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext) : ctor.prototype && ctor.prototype.isPureReactComponent - ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) - : !0; + ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) + : !0; } function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = !1, @@ -4431,8 +4437,8 @@ function constructClassInstance(workInProgress, ctor, props) { "object" === typeof context && null !== context ? (context = readContext(context)) : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), + ? previousContext + : contextStackCursor$1.current), (isLegacyContextConsumer = ctor.contextTypes), (context = (isLegacyContextConsumer = null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer) @@ -4446,9 +4452,9 @@ function constructClassInstance(workInProgress, ctor, props) { ctor._reactInternals = workInProgress; isLegacyContextConsumer && ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); + (workInProgress.__reactInternalMemoizedUnmaskedChildContext = + unmaskedContext), + (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); return ctor; } function callComponentWillReceiveProps( @@ -4475,27 +4481,27 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { "object" === typeof contextType && null !== contextType ? (instance.context = readContext(contextType)) : ((contextType = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), + ? previousContext + : contextStackCursor$1.current), (instance.context = getMaskedContext(workInProgress, contextType))); instance.state = workInProgress.memoizedState; contextType = ctor.getDerivedStateFromProps; "function" === typeof contextType && (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps), - (instance.state = workInProgress.memoizedState)); + (instance.state = workInProgress.memoizedState)); "function" === typeof ctor.getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate || ("function" !== typeof instance.UNSAFE_componentWillMount && "function" !== typeof instance.componentWillMount) || ((ctor = instance.state), - "function" === typeof instance.componentWillMount && + "function" === typeof instance.componentWillMount && instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && + "function" === typeof instance.UNSAFE_componentWillMount && instance.UNSAFE_componentWillMount(), - ctor !== instance.state && + ctor !== instance.state && classComponentUpdater.enqueueReplaceState(instance, instance.state, null), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - (instance.state = workInProgress.memoizedState)); + processUpdateQueue(workInProgress, newProps, instance, renderLanes), + (instance.state = workInProgress.memoizedState)); "function" === typeof instance.componentDidMount && (workInProgress.flags |= 4194308); } @@ -4607,11 +4613,11 @@ function throwException( case 13: return ( sourceFiber.mode & 1 && - (null === shellBoundary - ? renderDidSuspendDelayIfPossible() - : null === tag.alternate && - 0 === workInProgressRootExitStatus && - (workInProgressRootExitStatus = 3)), + (null === shellBoundary + ? renderDidSuspendDelayIfPossible() + : null === tag.alternate && + 0 === workInProgressRootExitStatus && + (workInProgressRootExitStatus = 3)), (tag.flags &= -257), 0 === (tag.mode & 1) ? tag === returnFiber @@ -4620,11 +4626,11 @@ function throwException( (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), 1 === sourceFiber.tag && - (null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + (null === sourceFiber.alternate + ? (sourceFiber.tag = 17) + : ((returnFiber = createUpdate(2)), + (returnFiber.tag = 2), + enqueueUpdate(sourceFiber, returnFiber, 2))), (sourceFiber.lanes |= 2)) : ((tag.flags |= 65536), (tag.lanes = rootRenderLanes)), value === noopSuspenseyCommitThenable @@ -4634,7 +4640,7 @@ function throwException( ? (tag.updateQueue = new Set([value])) : returnFiber.add(value), tag.mode & 1 && - attachPingListener(root, value, rootRenderLanes)), + attachPingListener(root, value, rootRenderLanes)), !1 ); case 22: @@ -4646,10 +4652,10 @@ function throwException( : ((returnFiber = tag.updateQueue), null === returnFiber ? ((returnFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), (tag.updateQueue = returnFiber)) : ((sourceFiber = returnFiber.retryQueue), null === sourceFiber @@ -4661,8 +4667,8 @@ function throwException( } throw Error( "Unexpected Suspense handler tag (" + - tag.tag + - "). This is a bug in React." + tag.tag + + "). This is a bug in React." ); } if (1 === root.tag) @@ -4700,9 +4706,9 @@ function throwException( case 1: if ( ((returnFiber = value), - (sourceFiber = root.type), - (tag = root.stateNode), - 0 === (root.flags & 128) && + (sourceFiber = root.type), + (tag = root.stateNode), + 0 === (root.flags & 128) && ("function" === typeof sourceFiber.getDerivedStateFromError || (null !== tag && "function" === typeof tag.componentDidCatch && @@ -4736,11 +4742,11 @@ function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { null === current ? mountChildFibers(workInProgress, null, nextChildren, renderLanes) : reconcileChildFibers( - workInProgress, - current.child, - nextChildren, - renderLanes - ); + workInProgress, + current.child, + nextChildren, + renderLanes + ); } function updateForwardRef( current, @@ -4837,8 +4843,8 @@ function updateSimpleMemoComponent( ) if ( ((didReceiveUpdate = !1), - (workInProgress.pendingProps = nextProps = prevProps), - 0 !== (current.lanes & renderLanes)) + (workInProgress.pendingProps = nextProps = prevProps), + 0 !== (current.lanes & renderLanes)) ) 0 !== (current.flags & 131072) && (didReceiveUpdate = !0); else @@ -4867,7 +4873,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { null !== prevState ? prevState.baseLanes | renderLanes : renderLanes; if (null !== current) { nextProps = workInProgress.child = current.child; - for (nextChildren = 0; null !== nextProps; ) + for (nextChildren = 0; null !== nextProps;) (nextChildren = nextChildren | nextProps.lanes | nextProps.childLanes), (nextProps = nextProps.sibling); @@ -5002,8 +5008,8 @@ function updateClassComponent( "object" === typeof contextType && null !== contextType ? (contextType = readContext(contextType)) : ((contextType = isContextProvider(Component) - ? previousContext - : contextStackCursor$1.current), + ? previousContext + : contextStackCursor$1.current), (contextType = getMaskedContext(workInProgress, contextType))); var getDerivedStateFromProps = Component.getDerivedStateFromProps, hasNewLifecycles = @@ -5025,16 +5031,16 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); oldContext = workInProgress.memoizedState; oldProps !== nextProps || - oldState !== oldContext || - didPerformWorkStackCursor.current || - hasForceUpdate + oldState !== oldContext || + didPerformWorkStackCursor.current || + hasForceUpdate ? ("function" === typeof getDerivedStateFromProps && - (applyDerivedStateFromProps( - workInProgress, - Component, - getDerivedStateFromProps, - nextProps - ), + (applyDerivedStateFromProps( + workInProgress, + Component, + getDerivedStateFromProps, + nextProps + ), (oldContext = workInProgress.memoizedState)), (oldProps = hasForceUpdate || @@ -5048,16 +5054,16 @@ function updateClassComponent( contextType )) ? (hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ("function" === typeof instance.componentWillMount && - instance.componentWillMount(), + ("function" !== typeof instance.UNSAFE_componentWillMount && + "function" !== typeof instance.componentWillMount) || + ("function" === typeof instance.componentWillMount && + instance.componentWillMount(), "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount()), + instance.UNSAFE_componentWillMount()), "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308)) + (workInProgress.flags |= 4194308)) : ("function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308), + (workInProgress.flags |= 4194308), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = oldContext)), (instance.props = nextProps), @@ -5065,7 +5071,7 @@ function updateClassComponent( (instance.context = contextType), (nextProps = oldProps)) : ("function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308), + (workInProgress.flags |= 4194308), (nextProps = !1)); } else { instance = workInProgress.stateNode; @@ -5082,8 +5088,8 @@ function updateClassComponent( "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) : ((oldContext = isContextProvider(Component) - ? previousContext - : contextStackCursor$1.current), + ? previousContext + : contextStackCursor$1.current), (oldContext = getMaskedContext(workInProgress, oldContext))); var getDerivedStateFromProps$jscomp$0 = Component.getDerivedStateFromProps; (getDerivedStateFromProps = @@ -5104,16 +5110,16 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); var newState = workInProgress.memoizedState; oldProps !== hasNewLifecycles || - oldState !== newState || - didPerformWorkStackCursor.current || - hasForceUpdate + oldState !== newState || + didPerformWorkStackCursor.current || + hasForceUpdate ? ("function" === typeof getDerivedStateFromProps$jscomp$0 && - (applyDerivedStateFromProps( - workInProgress, - Component, - getDerivedStateFromProps$jscomp$0, - nextProps - ), + (applyDerivedStateFromProps( + workInProgress, + Component, + getDerivedStateFromProps$jscomp$0, + nextProps + ), (newState = workInProgress.memoizedState)), (contextType = hasForceUpdate || @@ -5128,28 +5134,28 @@ function updateClassComponent( ) || !1) ? (getDerivedStateFromProps || - ("function" !== typeof instance.UNSAFE_componentWillUpdate && - "function" !== typeof instance.componentWillUpdate) || - ("function" === typeof instance.componentWillUpdate && - instance.componentWillUpdate(nextProps, newState, oldContext), + ("function" !== typeof instance.UNSAFE_componentWillUpdate && + "function" !== typeof instance.componentWillUpdate) || + ("function" === typeof instance.componentWillUpdate && + instance.componentWillUpdate(nextProps, newState, oldContext), "function" === typeof instance.UNSAFE_componentWillUpdate && - instance.UNSAFE_componentWillUpdate( - nextProps, - newState, - oldContext - )), + instance.UNSAFE_componentWillUpdate( + nextProps, + newState, + oldContext + )), "function" === typeof instance.componentDidUpdate && - (workInProgress.flags |= 4), + (workInProgress.flags |= 4), "function" === typeof instance.getSnapshotBeforeUpdate && - (workInProgress.flags |= 1024)) + (workInProgress.flags |= 1024)) : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 4), + (oldProps === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 1024), + (oldProps === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), (instance.props = nextProps), @@ -5157,13 +5163,13 @@ function updateClassComponent( (instance.context = oldContext), (nextProps = contextType)) : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 4), + (oldProps === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 1024), + (oldProps === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 1024), (nextProps = !1)); } return finishClassComponent( @@ -5199,11 +5205,11 @@ function finishClassComponent( workInProgress.flags |= 1; null !== current && didCaptureError ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - )), + workInProgress, + current.child, + null, + renderLanes + )), (workInProgress.child = reconcileChildFibers( workInProgress, null, @@ -5219,12 +5225,12 @@ function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; root.pendingContext ? pushTopLevelContextObject( - workInProgress, - root.pendingContext, - root.pendingContext !== root.context - ) + workInProgress, + root.pendingContext, + root.pendingContext !== root.context + ) : root.context && - pushTopLevelContextObject(workInProgress, root.context, !1); + pushTopLevelContextObject(workInProgress, root.context, !1); pushHostContainer(workInProgress, root.containerInfo); } var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; @@ -5265,11 +5271,11 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? ((progressedPrimaryFragment.childLanes = 0), (progressedPrimaryFragment.pendingProps = didSuspend)) : (progressedPrimaryFragment = createFiberFromOffscreen( - didSuspend, - showFallback, - 0, - null - )); + didSuspend, + showFallback, + 0, + null + )); nextProps = createFiberFromFragment( nextProps, showFallback, @@ -5321,19 +5327,19 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (nextProps.pendingProps = primaryChildProps), (workInProgress.deletions = null)) : ((nextProps = createWorkInProgress( - progressedPrimaryFragment, - primaryChildProps - )), + progressedPrimaryFragment, + primaryChildProps + )), (nextProps.subtreeFlags = progressedPrimaryFragment.subtreeFlags & 31457280)); null !== dehydrated ? (showFallback = createWorkInProgress(dehydrated, showFallback)) : ((showFallback = createFiberFromFragment( - showFallback, - didSuspend, - renderLanes, - null - )), + showFallback, + didSuspend, + renderLanes, + null + )), (showFallback.flags |= 2)); showFallback.return = workInProgress; nextProps.return = workInProgress; @@ -5367,9 +5373,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), - null === renderLanes - ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); + null === renderLanes + ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) + : renderLanes.push(current)); workInProgress.child = JSCompiler_temp; workInProgress.memoizedState = null; return JSCompiler_temp; @@ -5545,15 +5551,15 @@ function updateDehydratedSuspenseComponent( } nextProps = 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) + (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) ? 0 : nextProps; if (0 !== nextProps && nextProps !== suspenseState.retryLane) throw ( ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), + SelectiveHydrationException) ); } shim$1() || renderDidSuspendDelayIfPossible(); @@ -5592,13 +5598,13 @@ function initSuspenseListRenderState( var renderState = workInProgress.memoizedState; null === renderState ? (workInProgress.memoizedState = { - isBackwards: isBackwards, - rendering: null, - renderingStartTime: 0, - last: lastContentRow, - tail: tail, - tailMode: tailMode - }) + isBackwards: isBackwards, + rendering: null, + renderingStartTime: 0, + last: lastContentRow, + tail: tail, + tailMode: tailMode + }) : ((renderState.isBackwards = isBackwards), (renderState.rendering = null), (renderState.renderingStartTime = 0), @@ -5616,7 +5622,7 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { (nextProps = (nextProps & 1) | 2), (workInProgress.flags |= 128); else { if (null !== current && 0 !== (current.flags & 128)) - a: for (current = workInProgress.child; null !== current; ) { + a: for (current = workInProgress.child; null !== current;) { if (13 === current.tag) null !== current.memoizedState && scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); @@ -5628,7 +5634,7 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { continue; } if (current === workInProgress) break a; - for (; null === current.sibling; ) { + for (; null === current.sibling;) { if (null === current.return || current.return === workInProgress) break a; current = current.return; @@ -5644,11 +5650,11 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { switch (revealOrder) { case "forwards": renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) + for (revealOrder = null; null !== renderLanes;) (current = renderLanes.alternate), null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), + null === findFirstSuspended(current) && + (revealOrder = renderLanes), (renderLanes = renderLanes.sibling); renderLanes = revealOrder; null === renderLanes @@ -5666,7 +5672,7 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { case "backwards": renderLanes = null; revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { + for (workInProgress.child = null; null !== revealOrder;) { current = revealOrder.alternate; if (null !== current && null === findFirstSuspended(current)) { workInProgress.child = revealOrder; @@ -5697,8 +5703,8 @@ function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { 0 === (workInProgress.mode & 1) && null !== current && ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); + (workInProgress.alternate = null), + (workInProgress.flags |= 2)); } function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); @@ -5710,7 +5716,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { current = workInProgress.child; renderLanes = createWorkInProgress(current, current.pendingProps); workInProgress.child = renderLanes; - for (renderLanes.return = workInProgress; null !== current.sibling; ) + for (renderLanes.return = workInProgress; null !== current.sibling;) (current = current.sibling), (renderLanes = renderLanes.sibling = createWorkInProgress(current, current.pendingProps)), @@ -5780,8 +5786,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( nextValue = workInProgress.memoizedState; null !== nextValue && ((nextValue.rendering = null), - (nextValue.tail = null), - (nextValue.lastEffect = null)); + (nextValue.tail = null), + (nextValue.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); if (context) break; else return null; @@ -5802,21 +5808,21 @@ function resetContextDependencies() { lastFullyObservedContext = lastContextDependency = currentlyRenderingFiber = - null; + null; } function popProvider(context) { context._currentValue2 = valueCursor.current; pop(valueCursor); } function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { + for (; null !== parent;) { var alternate = parent.alternate; (parent.childLanes & renderLanes) !== renderLanes ? ((parent.childLanes |= renderLanes), null !== alternate && (alternate.childLanes |= renderLanes)) : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); if (parent === propagationRoot) break; parent = parent.return; } @@ -5828,7 +5834,7 @@ function prepareToReadContext(workInProgress, renderLanes) { null !== workInProgress && null !== workInProgress.firstContext && (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null)); + (workInProgress.firstContext = null)); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); @@ -5843,7 +5849,7 @@ function readContextForConsumer(consumer, context) { if (lastFullyObservedContext !== context) if ( ((context = { context: context, memoizedValue: value, next: null }), - null === lastContextDependency) + null === lastContextDependency) ) { if (null === consumer) throw Error( @@ -5855,11 +5861,11 @@ function readContextForConsumer(consumer, context) { return value; } var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; -function handleAsyncAction() {} +function handleAsyncAction() { } function doesRequireClone(current, completedWork) { if (null !== current && current.child === completedWork.child) return !1; if (0 !== (completedWork.flags & 16)) return !0; - for (current = completedWork.child; null !== current; ) { + for (current = completedWork.child; null !== current;) { if (0 !== (current.flags & 12854) || 0 !== (current.subtreeFlags & 12854)) return !0; current = current.sibling; @@ -5872,7 +5878,7 @@ function appendAllChildren( needsVisibilityToggle, isHidden ) { - for (var node = workInProgress.child; null !== node; ) { + for (var node = workInProgress.child; null !== node;) { if (5 === node.tag) { var instance = node.stateNode; needsVisibilityToggle && @@ -5895,7 +5901,7 @@ function appendAllChildren( continue; } if (node === workInProgress) break; - for (; null === node.sibling; ) { + for (; null === node.sibling;) { if (null === node.return || node.return === workInProgress) return; node = node.return; } @@ -5909,7 +5915,7 @@ function appendAllChildrenToContainer( needsVisibilityToggle, isHidden ) { - for (var node = workInProgress.child; null !== node; ) { + for (var node = workInProgress.child; null !== node;) { if (5 === node.tag) { var instance = node.stateNode; needsVisibilityToggle && @@ -5940,7 +5946,7 @@ function appendAllChildrenToContainer( continue; } if (node === workInProgress) break; - for (; null === node.sibling; ) { + for (; null === node.sibling;) { if (null === node.return || node.return === workInProgress) return; node = node.return; } @@ -5963,15 +5969,15 @@ function scheduleRetryEffect(workInProgress, retryQueue) { null !== retryQueue ? (workInProgress.flags |= 4) : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { case "hidden": hasRenderedATailFallback = renderState.tail; - for (var lastTailNode = null; null !== hasRenderedATailFallback; ) + for (var lastTailNode = null; null !== hasRenderedATailFallback;) null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), (hasRenderedATailFallback = hasRenderedATailFallback.sibling); @@ -5981,7 +5987,7 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$61 = null; null !== lastTailNode; ) + for (var lastTailNode$61 = null; null !== lastTailNode;) null !== lastTailNode.alternate && (lastTailNode$61 = lastTailNode), (lastTailNode = lastTailNode.sibling); null === lastTailNode$61 @@ -5993,19 +5999,19 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { } function bubbleProperties(completedWork) { var didBailout = - null !== completedWork.alternate && - completedWork.alternate.child === completedWork.child, + null !== completedWork.alternate && + completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$62 = completedWork.child; null !== child$62; ) + for (var child$62 = completedWork.child; null !== child$62;) (newChildLanes |= child$62.lanes | child$62.childLanes), (subtreeFlags |= child$62.subtreeFlags & 31457280), (subtreeFlags |= child$62.flags & 31457280), (child$62.return = completedWork), (child$62 = child$62.sibling); else - for (child$62 = completedWork.child; null !== child$62; ) + for (child$62 = completedWork.child; null !== child$62;) (newChildLanes |= child$62.lanes | child$62.childLanes), (subtreeFlags |= child$62.subtreeFlags), (subtreeFlags |= child$62.flags), @@ -6017,6 +6023,12 @@ function bubbleProperties(completedWork) { } function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; + if (workInProgress.flags & 1 && (workInProgress.type?.displayName || workInProgress.type?.name) !== "View") + insertUpdateComponents( + getComponentNameFromFiber(workInProgress), + workInProgress.flags, + workInProgress.key, + ); switch (workInProgress.tag) { case 2: case 16: @@ -6042,15 +6054,15 @@ function completeWork(current, workInProgress, renderLanes) { pop(didPerformWorkStackCursor), pop(contextStackCursor$1), newProps.pendingContext && - ((newProps.context = newProps.pendingContext), + ((newProps.context = newProps.pendingContext), (newProps.pendingContext = null)), (null !== current && null !== current.child) || - null === current || - (current.memoizedState.isDehydrated && - 0 === (workInProgress.flags & 256)) || - ((workInProgress.flags |= 1024), + null === current || + (current.memoizedState.isDehydrated && + 0 === (workInProgress.flags & 256)) || + ((workInProgress.flags |= 1024), null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), + (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null))), updateHostContainer(current, workInProgress), bubbleProperties(workInProgress), @@ -6148,11 +6160,11 @@ function completeWork(current, workInProgress, renderLanes) { if (current && null != workInProgress.stateNode) current.memoizedProps !== newProps ? ((workInProgress.stateNode = createTextInstance( - newProps, - rootInstanceStackCursor.current, - contextStackCursor.current, - workInProgress - )), + newProps, + rootInstanceStackCursor.current, + contextStackCursor.current, + workInProgress + )), (workInProgress.flags |= 4)) : (workInProgress.stateNode = current.stateNode); else { @@ -6239,7 +6251,7 @@ function completeWork(current, workInProgress, renderLanes) { 0 !== workInProgressRootExitStatus || (null !== current && 0 !== (current.flags & 128)) ) - for (current = workInProgress.child; null !== current; ) { + for (current = workInProgress.child; null !== current;) { oldProps = findFirstSuspended(current); if (null !== oldProps) { workInProgress.flags |= 128; @@ -6249,7 +6261,7 @@ function completeWork(current, workInProgress, renderLanes) { scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; current = renderLanes; - for (newProps = workInProgress.child; null !== newProps; ) + for (newProps = workInProgress.child; null !== newProps;) resetWorkInProgress(newProps, current), (newProps = newProps.sibling); push( @@ -6263,21 +6275,21 @@ function completeWork(current, workInProgress, renderLanes) { null !== requiresClone.tail && now() > workInProgressRootRenderTargetTime && ((workInProgress.flags |= 128), - (newProps = !0), - cutOffTailIfNeeded(requiresClone, !1), - (workInProgress.lanes = 4194304)); + (newProps = !0), + cutOffTailIfNeeded(requiresClone, !1), + (workInProgress.lanes = 4194304)); } else { if (!newProps) if (((current = findFirstSuspended(oldProps)), null !== current)) { if ( ((workInProgress.flags |= 128), - (newProps = !0), - (current = current.updateQueue), - (workInProgress.updateQueue = current), - scheduleRetryEffect(workInProgress, current), - cutOffTailIfNeeded(requiresClone, !0), - null === requiresClone.tail && + (newProps = !0), + (current = current.updateQueue), + (workInProgress.updateQueue = current), + scheduleRetryEffect(workInProgress, current), + cutOffTailIfNeeded(requiresClone, !0), + null === requiresClone.tail && "hidden" === requiresClone.tailMode && !oldProps.alternate) ) @@ -6287,9 +6299,9 @@ function completeWork(current, workInProgress, renderLanes) { workInProgressRootRenderTargetTime && 536870912 !== renderLanes && ((workInProgress.flags |= 128), - (newProps = !0), - cutOffTailIfNeeded(requiresClone, !1), - (workInProgress.lanes = 4194304)); + (newProps = !0), + cutOffTailIfNeeded(requiresClone, !1), + (workInProgress.lanes = 4194304)); requiresClone.isBackwards ? ((oldProps.sibling = workInProgress.child), (workInProgress.child = oldProps)) @@ -6320,17 +6332,17 @@ function completeWork(current, workInProgress, renderLanes) { (newProps = null !== workInProgress.memoizedState), null !== current ? (null !== current.memoizedState) !== newProps && - (workInProgress.flags |= 8192) + (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192), newProps && 0 !== (workInProgress.mode & 1) ? 0 !== (renderLanes & 536870912) && - 0 === (workInProgress.flags & 128) && - (bubbleProperties(workInProgress), + 0 === (workInProgress.flags & 128) && + (bubbleProperties(workInProgress), workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192)) : bubbleProperties(workInProgress), (current = workInProgress.updateQueue), null !== current && - scheduleRetryEffect(workInProgress, current.retryQueue), + scheduleRetryEffect(workInProgress, current.retryQueue), null ); case 24: @@ -6340,8 +6352,8 @@ function completeWork(current, workInProgress, renderLanes) { } throw Error( "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." ); } function unwindWork(current, workInProgress) { @@ -6497,15 +6509,15 @@ function safelyCallDestroy(current, nearestMountedAncestor, destroy) { } var shouldFireAfterActiveInstanceBlur = !1; function commitBeforeMutationEffects(root, firstChild) { - for (nextEffect = firstChild; null !== nextEffect; ) + for (nextEffect = firstChild; null !== nextEffect;) if ( ((root = nextEffect), - (firstChild = root.child), - 0 !== (root.subtreeFlags & 1028) && null !== firstChild) + (firstChild = root.child), + 0 !== (root.subtreeFlags & 1028) && null !== firstChild) ) (firstChild.return = root), (nextEffect = firstChild); else - for (; null !== nextEffect; ) { + for (; null !== nextEffect;) { root = nextEffect; try { var current = root.alternate, @@ -6575,7 +6587,7 @@ function commitHookEffectListUnmount( destroy = inst.destroy; void 0 !== destroy && ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); } effect = effect.next; } while (effect !== updateQueue); @@ -6703,7 +6715,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { if ( ((prevProps = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden), - !prevProps) + !prevProps) ) { current = (null !== current && null !== current.memoizedState) || @@ -6712,12 +6724,12 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; offscreenSubtreeIsHidden = prevProps; (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden + !prevOffscreenSubtreeWasHidden ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; @@ -6753,7 +6765,7 @@ function recursivelyTraverseDeletionEffects( nearestMountedAncestor, parent ) { - for (parent = parent.child; null !== parent; ) + for (parent = parent.child; null !== parent;) commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent), (parent = parent.sibling); } @@ -6765,7 +6777,7 @@ function commitDeletionEffectsOnFiber( if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount) try { injectedHook.onCommitFiberUnmount(rendererID, deletedFiber); - } catch (err) {} + } catch (err) { } switch (deletedFiber.tag) { case 26: case 27: @@ -6813,7 +6825,7 @@ function commitDeletionEffectsOnFiber( destroy )) : 0 !== (tag & 4) && - ((inst.destroy = void 0), + ((inst.destroy = void 0), safelyCallDestroy( deletedFiber, nearestMountedAncestor, @@ -6833,8 +6845,8 @@ function commitDeletionEffectsOnFiber( if ( !offscreenSubtreeWasHidden && (safelyDetachRef(deletedFiber, nearestMountedAncestor), - (updateQueue = deletedFiber.stateNode), - "function" === typeof updateQueue.componentWillUnmount) + (updateQueue = deletedFiber.stateNode), + "function" === typeof updateQueue.componentWillUnmount) ) try { (updateQueue.props = deletedFiber.memoizedProps), @@ -6860,8 +6872,8 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); deletedFiber.mode & 1 ? ((offscreenSubtreeWasHidden = - (updateQueue = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), + (updateQueue = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState), recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -6869,10 +6881,10 @@ function commitDeletionEffectsOnFiber( ), (offscreenSubtreeWasHidden = updateQueue)) : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); break; default: recursivelyTraverseDeletionEffects( @@ -6895,14 +6907,14 @@ function getRetryCache(finishedWork) { (finishedWork = finishedWork.stateNode), (retryCache = finishedWork._retryCache), null === retryCache && - (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), + (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache ); default: throw Error( "Unexpected Suspense handler tag (" + - finishedWork.tag + - "). This is a bug in React." + finishedWork.tag + + "). This is a bug in React." ); } } @@ -6929,7 +6941,7 @@ function recursivelyTraverseMutationEffects(root, parentFiber) { } } if (parentFiber.subtreeFlags & 12854) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) commitMutationEffectsOnFiber(parentFiber, root), (parentFiber = parentFiber.sibling); } @@ -6966,12 +6978,12 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags & 64 && offscreenSubtreeIsHidden && ((finishedWork = finishedWork.updateQueue), - null !== finishedWork && + null !== finishedWork && ((flags = finishedWork.callbacks), - null !== flags && + null !== flags && ((current = finishedWork.shared.hiddenCallbacks), - (finishedWork.shared.hiddenCallbacks = - null === current ? flags : current.concat(flags))))); + (finishedWork.shared.hiddenCallbacks = + null === current ? flags : current.concat(flags))))); break; case 26: case 27: @@ -6999,14 +7011,14 @@ function commitMutationEffectsOnFiber(finishedWork, root) { commitReconciliationEffects(finishedWork); finishedWork.child.flags & 8192 && ((current = null !== current && null !== current.memoizedState), - null === finishedWork.memoizedState || + null === finishedWork.memoizedState || current || (globalMostRecentFallbackTime = now())); flags & 4 && ((flags = finishedWork.updateQueue), - null !== flags && + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, flags))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 22: flags & 512 && @@ -7032,29 +7044,29 @@ function commitMutationEffectsOnFiber(finishedWork, root) { ((root._visibility = isHidden ? root._visibility & -2 : root._visibility | 1), - isHidden && + isHidden && ((isHidden = offscreenSubtreeIsHidden || offscreenSubtreeWasHidden), - null === current || + null === current || wasHidden || isHidden || (0 !== (finishedWork.mode & 1) && recursivelyTraverseDisappearLayoutEffects(finishedWork)))); flags & 4 && ((flags = finishedWork.updateQueue), - null !== flags && + null !== flags && ((current = flags.retryQueue), - null !== current && + null !== current && ((flags.retryQueue = null), - attachSuspenseRetryListeners(finishedWork, current)))); + attachSuspenseRetryListeners(finishedWork, current)))); break; case 19: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); flags & 4 && ((flags = finishedWork.updateQueue), - null !== flags && + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, flags))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 21: break; @@ -7070,12 +7082,12 @@ function commitReconciliationEffects(finishedWork) { } function recursivelyTraverseLayoutEffects(root, parentFiber) { if (parentFiber.subtreeFlags & 8772) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber), (parentFiber = parentFiber.sibling); } function recursivelyTraverseDisappearLayoutEffects(parentFiber) { - for (parentFiber = parentFiber.child; null !== parentFiber; ) { + for (parentFiber = parentFiber.child; null !== parentFiber;) { var finishedWork = parentFiber; switch (finishedWork.tag) { case 0: @@ -7126,7 +7138,7 @@ function recursivelyTraverseReappearLayoutEffects( ) { includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); - for (parentFiber = parentFiber.child; null !== parentFiber; ) { + for (parentFiber = parentFiber.child; null !== parentFiber;) { var current = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, @@ -7227,7 +7239,7 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } function recursivelyTraversePassiveMountEffects(root, parentFiber) { if (parentFiber.subtreeFlags & 10256) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) commitPassiveMountOnFiber(root, parentFiber), (parentFiber = parentFiber.sibling); } @@ -7251,15 +7263,15 @@ function commitPassiveMountOnFiber(finishedRoot, finishedWork) { ? flags._visibility & 4 ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork) : finishedWork.mode & 1 || - ((flags._visibility |= 4), + ((flags._visibility |= 4), recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork)) : flags._visibility & 4 - ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork) - : ((flags._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork - )); + ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork) + : ((flags._visibility |= 4), + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork + )); break; case 24: recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork); @@ -7272,7 +7284,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot$jscomp$0, parentFiber ) { - for (parentFiber = parentFiber.child; null !== parentFiber; ) { + for (parentFiber = parentFiber.child; null !== parentFiber;) { var finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber; switch (finishedWork.tag) { @@ -7289,11 +7301,11 @@ function recursivelyTraverseReconnectPassiveEffects( null !== finishedWork.memoizedState ? instance._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork - ) + finishedRoot, + finishedWork + ) : finishedWork.mode & 1 || - ((instance._visibility |= 4), + ((instance._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork @@ -7316,7 +7328,7 @@ function recursivelyTraverseReconnectPassiveEffects( var suspenseyCommitFlag = 8192; function recursivelyAccumulateSuspenseyCommit(parentFiber) { if (parentFiber.subtreeFlags & suspenseyCommitFlag) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) accumulateSuspenseyCommitOnFiber(parentFiber), (parentFiber = parentFiber.sibling); } @@ -7380,7 +7392,7 @@ function recursivelyTraversePassiveUnmountEffects(parentFiber) { detachAlternateSiblings(parentFiber); } if (parentFiber.subtreeFlags & 10256) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) commitPassiveUnmountOnFiber(parentFiber), (parentFiber = parentFiber.sibling); } @@ -7396,8 +7408,8 @@ function commitPassiveUnmountOnFiber(finishedWork) { case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && - (null === finishedWork.return || 13 !== finishedWork.return.tag) + instance._visibility & 4 && + (null === finishedWork.return || 13 !== finishedWork.return.tag) ? ((instance._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); @@ -7420,7 +7432,7 @@ function recursivelyTraverseDisconnectPassiveEffects(parentFiber) { } detachAlternateSiblings(parentFiber); } - for (parentFiber = parentFiber.child; null !== parentFiber; ) { + for (parentFiber = parentFiber.child; null !== parentFiber;) { deletions = parentFiber; switch (deletions.tag) { case 0: @@ -7433,7 +7445,7 @@ function recursivelyTraverseDisconnectPassiveEffects(parentFiber) { i = deletions.stateNode; i._visibility & 4 && ((i._visibility &= -5), - recursivelyTraverseDisconnectPassiveEffects(deletions)); + recursivelyTraverseDisconnectPassiveEffects(deletions)); break; default: recursivelyTraverseDisconnectPassiveEffects(deletions); @@ -7445,7 +7457,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( deletedSubtreeRoot, nearestMountedAncestor ) { - for (; null !== nextEffect; ) { + for (; null !== nextEffect;) { var fiber = nextEffect; switch (fiber.tag) { case 0: @@ -7456,7 +7468,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( var child = fiber.child; if (null !== child) (child.return = fiber), (nextEffect = child); else - a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) { + a: for (fiber = deletedSubtreeRoot; null !== nextEffect;) { child = nextEffect; var sibling = child.sibling, returnFiber = child.return; @@ -7514,7 +7526,7 @@ function requestUpdateLane(fiber) { if (null !== fiber) return ( 0 === currentEventTransitionLane && - (currentEventTransitionLane = claimNextTransitionLane()), + (currentEventTransitionLane = claimNextTransitionLane()), currentEventTransitionLane ); fiber = currentUpdatePriority; @@ -7559,7 +7571,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root === workInProgressRoot && (0 === (executionContext & 2) && (workInProgressRootInterleavedUpdatedLanes |= lane), - 4 === workInProgressRootExitStatus && + 4 === workInProgressRootExitStatus && markRootSuspended( root, workInProgressRootRenderLanes, @@ -7567,9 +7579,9 @@ function scheduleUpdateOnFiber(root, fiber, lane) { )), ensureRootIsScheduled(root), 2 === lane && - 0 === executionContext && - 0 === (fiber.mode & 1) && - ((workInProgressRootRenderTargetTime = now() + 500), + 0 === executionContext && + 0 === (fiber.mode & 1) && + ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!0)); } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -7609,19 +7621,19 @@ function performConcurrentWorkOnRoot(root, didTimeout) { ); 0 !== errorRetryLanes && ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - renderWasConcurrent, - errorRetryLanes - ))); + (exitStatus = recoverFromConcurrentError( + root, + renderWasConcurrent, + errorRetryLanes + ))); } if (1 === exitStatus) throw ( ((originalCallbackNode = workInProgressRootFatalError), - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), - ensureRootIsScheduled(root), - originalCallbackNode) + prepareFreshStack(root, 0), + markRootSuspended(root, lanes, 0), + ensureRootIsScheduled(root), + originalCallbackNode) ); root.finishedWork = didTimeout; root.finishedLanes = lanes; @@ -7652,7 +7664,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { (lanes & 62914560) === lanes && 3 === exitStatus && ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) + 10 < exitStatus) ) { markRootSuspended( renderWasConcurrent, @@ -7722,9 +7734,9 @@ function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors ? (workInProgressRootRecoverableErrors = errors) : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); + workInProgressRootRecoverableErrors, + errors + ); } function commitRootWhenReady( root, @@ -7738,7 +7750,7 @@ function commitRootWhenReady( commitRoot(root, recoverableErrors, transitions, spawnedLane); } function isRenderConsistentWithExternalStores(finishedWork) { - for (var node = finishedWork; ; ) { + for (var node = finishedWork; ;) { if (node.flags & 16384) { var updateQueue = node.updateQueue; if ( @@ -7761,7 +7773,7 @@ function isRenderConsistentWithExternalStores(finishedWork) { (updateQueue.return = node), (node = updateQueue); else { if (node === finishedWork) break; - for (; null === node.sibling; ) { + for (; null === node.sibling;) { if (null === node.return || node.return === finishedWork) return !0; node = node.return; } @@ -7800,7 +7812,7 @@ function resetWorkInProgressStack() { (thenableState$1 = null), (thenableIndexCounter$1 = 0), (interruptedWork = workInProgress); - for (; null !== interruptedWork; ) + for (; null !== interruptedWork;) unwindInterruptedWork(interruptedWork.alternate, interruptedWork), (interruptedWork = interruptedWork.return); workInProgress = null; @@ -7828,7 +7840,7 @@ function prepareFreshStack(root, lanes) { workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = - 0; + 0; workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null; 0 !== (lanes & 8) && (lanes |= lanes & 32); @@ -7858,31 +7870,31 @@ function handleThrow(root, thrownValue) { (workInProgressSuspendedReason = (null !== root && ((workInProgressRootRenderLanes & 4194176) === - workInProgressRootRenderLanes + workInProgressRootRenderLanes ? null !== shellBoundary : ((workInProgressRootRenderLanes & 62914560) !== - workInProgressRootRenderLanes && - 0 === (workInProgressRootRenderLanes & 536870912)) || - root !== shellBoundary)) || - 0 !== (workInProgressRootSkippedLanes & 134217727) || - 0 !== (workInProgressRootInterleavedUpdatedLanes & 134217727) + workInProgressRootRenderLanes && + 0 === (workInProgressRootRenderLanes & 536870912)) || + root !== shellBoundary)) || + 0 !== (workInProgressRootSkippedLanes & 134217727) || + 0 !== (workInProgressRootInterleavedUpdatedLanes & 134217727) ? 3 : 2)) : thrownValue === SuspenseyCommitException - ? ((thrownValue = getSuspendedThenable()), - (workInProgressSuspendedReason = 4)) - : (workInProgressSuspendedReason = + ? ((thrownValue = getSuspendedThenable()), + (workInProgressSuspendedReason = 4)) + : (workInProgressSuspendedReason = thrownValue === SelectiveHydrationException ? 8 : null !== thrownValue && "object" === typeof thrownValue && "function" === typeof thrownValue.then - ? 6 - : 1); + ? 6 + : 1); workInProgressThrownValue = thrownValue; null === workInProgress && ((workInProgressRootExitStatus = 1), - (workInProgressRootFatalError = thrownValue)); + (workInProgressRootFatalError = thrownValue)); } function pushDispatcher() { var prevDispatcher = ReactCurrentDispatcher.current; @@ -7948,7 +7960,7 @@ function renderRootSync(root, lanes) { return workInProgressRootExitStatus; } function workLoopSync() { - for (; null !== workInProgress; ) performUnitOfWork(workInProgress); + for (; null !== workInProgress;) performUnitOfWork(workInProgress); } function renderRootConcurrent(root, lanes) { var prevExecutionContext = executionContext; @@ -8051,7 +8063,7 @@ function renderRootConcurrent(root, lanes) { return workInProgressRootExitStatus; } function workLoopConcurrent() { - for (; null !== workInProgress && !shouldYield(); ) + for (; null !== workInProgress && !shouldYield();) performUnitOfWork(workInProgress); } function performUnitOfWork(unitOfWork) { @@ -8157,8 +8169,8 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { root = root.return; null !== root && ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); + (root.subtreeFlags = 0), + (root.deletions = null)); workInProgress = root; } while (null !== root); workInProgressRootExitStatus = 6; @@ -8191,6 +8203,9 @@ function completeUnitOfWork(unitOfWork) { function commitRoot(root, recoverableErrors, transitions, spawnedLane) { var previousUpdateLanePriority = currentUpdatePriority, prevTransition = ReactCurrentBatchConfig.transition; + defrost.writeInLogFiles(Date.now() + "", { list: updatedComponents, change: updatedComponentForProfiler }) + updatedComponents = [] + updatedComponentForProfiler = null try { (ReactCurrentBatchConfig.transition = null), (currentUpdatePriority = 2), @@ -8235,15 +8250,15 @@ function commitRootImpl( markRootFinished(root, remainingLanes, spawnedLane); root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); + (workInProgressRootRenderLanes = 0)); (0 === (finishedWork.subtreeFlags & 10256) && 0 === (finishedWork.flags & 10256)) || rootDoesHavePassiveEffects || ((rootDoesHavePassiveEffects = !0), - scheduleCallback(NormalPriority, function () { - flushPassiveEffects(); - return null; - })); + scheduleCallback(NormalPriority, function () { + flushPassiveEffects(); + return null; + })); spawnedLane = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || spawnedLane) { spawnedLane = ReactCurrentBatchConfig.transition; @@ -8264,8 +8279,8 @@ function commitRootImpl( } else root.current = finishedWork; rootDoesHavePassiveEffects && ((rootDoesHavePassiveEffects = !1), - (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = transitions)); + (rootWithPendingPassiveEffects = root), + (pendingPassiveEffectsLanes = transitions)); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); @@ -8285,9 +8300,9 @@ function commitRootImpl( if (hasUncaughtError) throw ( ((hasUncaughtError = !1), - (root = firstUncaughtError), - (firstUncaughtError = null), - root) + (root = firstUncaughtError), + (firstUncaughtError = null), + root) ); 0 !== (pendingPassiveEffectsLanes & 3) && 0 !== root.tag && @@ -8329,7 +8344,7 @@ function flushPassiveEffects() { ) try { injectedHook.onPostCommitFiberRoot(rendererID, renderPriority); - } catch (err) {} + } catch (err) { } JSCompiler_inline_result = !0; } return JSCompiler_inline_result; @@ -8351,7 +8366,7 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { if (3 === sourceFiber.tag) captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error); else - for (; null !== nearestMountedAncestor; ) { + for (; null !== nearestMountedAncestor;) { if (3 === nearestMountedAncestor.tag) { captureCommitPhaseErrorOnRoot( nearestMountedAncestor, @@ -8363,7 +8378,7 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { var instance = nearestMountedAncestor.stateNode; if ( "function" === - typeof nearestMountedAncestor.type.getDerivedStateFromError || + typeof nearestMountedAncestor.type.getDerivedStateFromError || ("function" === typeof instance.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) @@ -8381,7 +8396,7 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { ); null !== nearestMountedAncestor && (markRootUpdated(nearestMountedAncestor, 2), - ensureRootIsScheduled(nearestMountedAncestor)); + ensureRootIsScheduled(nearestMountedAncestor)); break; } } @@ -8397,12 +8412,12 @@ function attachPingListener(root, wakeable, lanes) { } else (threadIDs = pingCache.get(wakeable)), void 0 === threadIDs && - ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs)); + ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs)); threadIDs.has(lanes) || ((workInProgressRootDidAttachPingListener = !0), - threadIDs.add(lanes), - (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)), - wakeable.then(root, root)); + threadIDs.add(lanes), + (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)), + wakeable.then(root, root)); } function pingSuspendedRoot(root, wakeable, pingedLanes) { var pingCache = root.pingCache; @@ -8411,10 +8426,10 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { workInProgressRoot === root && (workInProgressRootRenderLanes & pingedLanes) === pingedLanes && (4 === workInProgressRootExitStatus || - (3 === workInProgressRootExitStatus && - (workInProgressRootRenderLanes & 62914560) === + (3 === workInProgressRootExitStatus && + (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes && - 300 > now() - globalMostRecentFallbackTime) + 300 > now() - globalMostRecentFallbackTime) ? 0 === (executionContext & 2) && prepareFreshStack(root, 0) : (workInProgressRootPingedLanes |= pingedLanes)); ensureRootIsScheduled(root); @@ -8425,7 +8440,7 @@ function retryTimedOutBoundary(boundaryFiber, retryLane) { boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), - ensureRootIsScheduled(boundaryFiber)); + ensureRootIsScheduled(boundaryFiber)); } function retryDehydratedSuspenseBoundary(boundaryFiber) { var suspenseState = boundaryFiber.memoizedState, @@ -8584,8 +8599,8 @@ beginWork = function (current, workInProgress, renderLanes) { } throw Error( "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." + Component + + ". Lazy element type must resolve to a class or function." ); } return workInProgress; @@ -8632,10 +8647,10 @@ beginWork = function (current, workInProgress, renderLanes) { context = workInProgress.memoizedState.element; context === Component ? (workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - )) + current, + workInProgress, + renderLanes + )) : (reconcileChildren(current, workInProgress, context, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; @@ -8662,11 +8677,11 @@ beginWork = function (current, workInProgress, renderLanes) { (Component = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - Component, - renderLanes - )) + workInProgress, + null, + Component, + renderLanes + )) : reconcileChildren(current, workInProgress, Component, renderLanes), workInProgress.child ); @@ -8740,7 +8755,7 @@ beginWork = function (current, workInProgress, renderLanes) { } else for ( hasContext = workInProgress.child, - null !== hasContext && (hasContext.return = workInProgress); + null !== hasContext && (hasContext.return = workInProgress); null !== hasContext; ) { @@ -8803,7 +8818,7 @@ beginWork = function (current, workInProgress, renderLanes) { } else newValue = hasContext.child; if (null !== newValue) newValue.return = hasContext; else - for (newValue = hasContext; null !== newValue; ) { + for (newValue = hasContext; null !== newValue;) { if (newValue === workInProgress) { newValue = null; break; @@ -8891,8 +8906,8 @@ beginWork = function (current, workInProgress, renderLanes) { } throw Error( "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." ); }; function scheduleCallback(priorityLevel, callback) { @@ -8907,7 +8922,7 @@ function FiberNode(tag, pendingProps, key, mode) { this.stateNode = this.type = this.elementType = - null; + null; this.index = 0; this.refCleanup = this.ref = null; this.pendingProps = pendingProps; @@ -8915,7 +8930,7 @@ function FiberNode(tag, pendingProps, key, mode) { this.memoizedState = this.updateQueue = this.memoizedProps = - null; + null; this.mode = mode; this.subtreeFlags = this.flags = 0; this.deletions = null; @@ -8943,11 +8958,11 @@ function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress ? ((workInProgress = createFiber( - current.tag, - pendingProps, - current.key, - current.mode - )), + current.tag, + pendingProps, + current.key, + current.mode + )), (workInProgress.elementType = current.elementType), (workInProgress.type = current.type), (workInProgress.stateNode = current.stateNode), @@ -9003,9 +9018,9 @@ function resetWorkInProgress(workInProgress, renderLanes) { null === renderLanes ? null : { - lanes: renderLanes.lanes, - firstContext: renderLanes.firstContext - })); + lanes: renderLanes.lanes, + firstContext: renderLanes.firstContext + })); return workInProgress; } function createFiberFromTypeAndProps( @@ -9074,7 +9089,7 @@ function createFiberFromTypeAndProps( } throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + - ((null == type ? type : typeof type) + ".") + ((null == type ? type : typeof type) + ".") ); } key = createFiber(fiberTag, pendingProps, key, mode); @@ -9109,7 +9124,7 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((primaryChildInstance._pendingVisibility |= 2), - scheduleUpdateOnFiber(root, fiber, 2)); + scheduleUpdateOnFiber(root, fiber, 2)); } }, attach: function () { @@ -9122,7 +9137,7 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((primaryChildInstance._pendingVisibility &= -3), - scheduleUpdateOnFiber(root, fiber, 2)); + scheduleUpdateOnFiber(root, fiber, 2)); } } }; @@ -9163,14 +9178,14 @@ function FiberRootNode( this.pingCache = this.current = this.pendingChildren = - null; + null; this.timeoutHandle = -1; this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = - null; + null; this.callbackPriority = 0; this.expirationTimes = createLaneMap(-1); this.entangledLanes = @@ -9181,7 +9196,7 @@ function FiberRootNode( this.pingedLanes = this.suspendedLanes = this.pendingLanes = - 0; + 0; this.entanglements = createLaneMap(0); this.hiddenUpdates = createLaneMap(null); this.identifierPrefix = identifierPrefix; @@ -9270,7 +9285,7 @@ function updateContainer(element, container, parentComponent, callback) { element = enqueueUpdate(current, container, lane); null !== element && (scheduleUpdateOnFiber(element, current, lane), - entangleTransitions(element, current, lane)); + entangleTransitions(element, current, lane)); return lane; } function emptyFindFiberByHostInstance() { @@ -9294,8 +9309,8 @@ function findNodeHandle(componentOrHandle) { return null == componentOrHandle ? componentOrHandle : null != componentOrHandle._nativeTag - ? componentOrHandle._nativeTag - : ReactNativePrivateInterface.getNativeTagFromPublicInstance( + ? componentOrHandle._nativeTag + : ReactNativePrivateInterface.getNativeTagFromPublicInstance( componentOrHandle ); } @@ -9313,7 +9328,7 @@ batchedUpdatesImpl = function (fn, a) { } finally { (executionContext = prevExecutionContext), 0 === executionContext && - ((workInProgressRootRenderTargetTime = now() + 500), + ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!0)); } }; @@ -9377,7 +9392,7 @@ if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { internals$jscomp$inline_1280 )), (injectedHook = hook$jscomp$inline_1281); - } catch (err) {} + } catch (err) { } } exports.createPortal = function (children, containerTag) { return createPortal$1( @@ -9394,9 +9409,9 @@ exports.dispatchCommand = function (handle, command, args) { : ReactNativePrivateInterface.getNativeTagFromPublicInstance(handle); null != nativeTag && ((handle = ReactNativePrivateInterface.getNodeFromPublicInstance(handle)), - null != handle - ? nativeFabricUIManager.dispatchCommand(handle, command, args) - : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand( + null != handle + ? nativeFabricUIManager.dispatchCommand(handle, command, args) + : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand( nativeTag, command, args @@ -9406,10 +9421,10 @@ exports.findHostInstance_DEPRECATED = function (componentOrHandle) { return null == componentOrHandle ? null : componentOrHandle.canonical && componentOrHandle.canonical.publicInstance - ? componentOrHandle.canonical.publicInstance - : componentOrHandle._nativeTag - ? componentOrHandle - : findHostInstance(componentOrHandle); + ? componentOrHandle.canonical.publicInstance + : componentOrHandle._nativeTag + ? componentOrHandle + : findHostInstance(componentOrHandle); }; exports.findNodeHandle = findNodeHandle; exports.getInspectorDataForInstance = getInspectorDataForInstance; @@ -9427,13 +9442,13 @@ exports.getPublicInstanceFromInternalInstanceHandle = function ( return null == instance ? null : 6 === internalInstanceHandle.tag - ? (null == instance.publicInstance && + ? (null == instance.publicInstance && (instance.publicInstance = ReactNativePrivateInterface.createPublicTextInstance( internalInstanceHandle )), - instance.publicInstance) - : getPublicInstance(internalInstanceHandle.stateNode); + instance.publicInstance) + : getPublicInstance(internalInstanceHandle.stateNode); }; exports.isChildPublicInstance = function () { throw Error("isChildPublicInstance() is not available in production."); @@ -9442,21 +9457,21 @@ exports.render = function (element, containerTag, callback, concurrentRoot) { var root = roots.get(containerTag); root || ((root = concurrentRoot ? 1 : 0), - (concurrentRoot = new FiberRootNode( - containerTag, - root, - !1, - "", - onRecoverableError, - null - )), - (root = createFiber(3, null, null, 1 === root ? 1 : 0)), - (concurrentRoot.current = root), - (root.stateNode = concurrentRoot), - (root.memoizedState = { element: null, isDehydrated: !1, cache: null }), - initializeUpdateQueue(root), - (root = concurrentRoot), - roots.set(containerTag, root)); + (concurrentRoot = new FiberRootNode( + containerTag, + root, + !1, + "", + onRecoverableError, + null + )), + (root = createFiber(3, null, null, 1 === root ? 1 : 0)), + (concurrentRoot.current = root), + (root.stateNode = concurrentRoot), + (root.memoizedState = { element: null, isDehydrated: !1, cache: null }), + initializeUpdateQueue(root), + (root = concurrentRoot), + roots.set(containerTag, root)); updateContainer(element, root, null, callback); a: if (((element = root.current), element.child)) switch (element.child.tag) { @@ -9477,9 +9492,9 @@ exports.sendAccessibilityEvent = function (handle, eventType) { : ReactNativePrivateInterface.getNativeTagFromPublicInstance(handle); null != nativeTag && ((handle = ReactNativePrivateInterface.getNodeFromPublicInstance(handle)), - null != handle - ? nativeFabricUIManager.sendAccessibilityEvent(handle, eventType) - : ReactNativePrivateInterface.legacySendAccessibilityEvent( + null != handle + ? nativeFabricUIManager.sendAccessibilityEvent(handle, eventType) + : ReactNativePrivateInterface.legacySendAccessibilityEvent( nativeTag, eventType )); diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js index d993f42..17bd999 100644 --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js @@ -13,6 +13,8 @@ "use strict"; +import defrost from '@d11/de-frost' + if (__DEV__) { (function () { "use strict"; @@ -21,12 +23,17 @@ if (__DEV__) { if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === - "function" + "function" ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var React = require("react"); require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore"); + var updatedComponents = []; + var updatedComponentForProfiler = null; + function insertUpdateComponents(componentName, flags, key) { + updatedComponents.push({ componentName, flags, key }); + } var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"); var Scheduler = require("scheduler"); @@ -43,8 +50,8 @@ if (__DEV__) { { for ( var _len = arguments.length, - args = new Array(_len > 1 ? _len - 1 : 0), - _key = 1; + args = new Array(_len > 1 ? _len - 1 : 0), + _key = 1; _key < _len; _key++ ) { @@ -60,8 +67,8 @@ if (__DEV__) { { for ( var _len2 = arguments.length, - args = new Array(_len2 > 1 ? _len2 - 1 : 0), - _key2 = 1; + args = new Array(_len2 > 1 ? _len2 - 1 : 0), + _key2 = 1; _key2 < _len2; _key2++ ) { @@ -239,20 +246,20 @@ if (__DEV__) { // eslint-disable-next-line react-internal/prod-error-codes error = new Error( "An error was thrown inside one of your components, but React " + - "doesn't know what it was. This is likely due to browser " + - 'flakiness. React does its best to preserve the "Pause on ' + - 'exceptions" behavior of the DevTools, which requires some ' + - "DEV-mode only tricks. It's possible that these don't work in " + - "your browser. Try triggering the error in production mode, " + - "or switching to a modern browser. If you suspect that this is " + - "actually an issue with React, please file an issue." + "doesn't know what it was. This is likely due to browser " + + 'flakiness. React does its best to preserve the "Pause on ' + + 'exceptions" behavior of the DevTools, which requires some ' + + "DEV-mode only tricks. It's possible that these don't work in " + + "your browser. Try triggering the error in production mode, " + + "or switching to a modern browser. If you suspect that this is " + + "actually an issue with React, please file an issue." ); } else if (isCrossOriginError) { // eslint-disable-next-line react-internal/prod-error-codes error = new Error( "A cross-origin error was thrown. React doesn't have access to " + - "the actual error object in development. " + - "See https://reactjs.org/link/crossorigin-error for more information." + "the actual error object in development. " + + "See https://reactjs.org/link/crossorigin-error for more information." ); } @@ -373,7 +380,7 @@ if (__DEV__) { } else { throw new Error( "clearCaughtError was called but no error was captured. This error " + - "is likely caused by a bug in React. Please file an issue." + "is likely caused by a bug in React. Please file an issue." ); } } @@ -400,7 +407,7 @@ if (__DEV__) { if (!getNodeFromInstance || !getInstanceFromNode) { error( "EventPluginUtils.setComponentTree(...): Injected " + - "module is missing getNodeFromInstance or getInstanceFromNode." + "module is missing getNodeFromInstance or getInstanceFromNode." ); } } @@ -414,14 +421,14 @@ if (__DEV__) { var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners - ? 1 - : 0; + ? 1 + : 0; var instancesIsArr = isArray(dispatchInstances); var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances - ? 1 - : 0; + ? 1 + : 0; if ( instancesIsArr !== listenersIsArr || @@ -768,14 +775,14 @@ if (__DEV__) { Object.defineProperty( this, "preventDefault", - getPooledWarningPropertyDefinition("preventDefault", function () {}) + getPooledWarningPropertyDefinition("preventDefault", function () { }) ); Object.defineProperty( this, "stopPropagation", getPooledWarningPropertyDefinition( "stopPropagation", - function () {} + function () { } ) ); } @@ -789,7 +796,7 @@ if (__DEV__) { SyntheticEvent.extend = function (Interface) { var Super = this; - var E = function () {}; + var E = function () { }; E.prototype = Super.prototype; var prototype = new E(); @@ -838,9 +845,9 @@ if (__DEV__) { { error( "This synthetic event is reused for performance reasons. If you're seeing this, " + - "you're %s `%s` on a released/nullified synthetic event. %s. " + - "If you must keep the original synthetic event around, use event.persist(). " + - "See https://reactjs.org/link/event-pooling for more information.", + "you're %s `%s` on a released/nullified synthetic event. %s. " + + "If you must keep the original synthetic event around, use event.persist(). " + + "See https://reactjs.org/link/event-pooling for more information.", action, propName, result @@ -1007,7 +1014,7 @@ if (__DEV__) { if (identifier > MAX_TOUCH_BANK) { error( "Touch identifier %s is greater than maximum supported %s which causes " + - "performance issues backfilling array locations for all of the indices.", + "performance issues backfilling array locations for all of the indices.", identifier, MAX_TOUCH_BANK ); @@ -1046,8 +1053,8 @@ if (__DEV__) { { warn( "Cannot record touch move without a touch start.\n" + - "Touch Move: %s\n" + - "Touch Bank: %s", + "Touch Move: %s\n" + + "Touch Bank: %s", printTouch(touch), printTouchBank() ); @@ -1071,8 +1078,8 @@ if (__DEV__) { { warn( "Cannot record touch end without a touch start.\n" + - "Touch End: %s\n" + - "Touch Bank: %s", + "Touch End: %s\n" + + "Touch Bank: %s", printTouch(touch), printTouchBank() ); @@ -1489,7 +1496,7 @@ if (__DEV__) { var i; - for (i = path.length; i-- > 0; ) { + for (i = path.length; i-- > 0;) { fn(path[i], "captured", arg); } @@ -1518,10 +1525,10 @@ if (__DEV__) { if (listener && typeof listener !== "function") { throw new Error( "Expected `" + - registrationName + - "` listener to be a function, instead got a value of `" + - typeof listener + - "` type." + registrationName + + "` listener to be a function, instead got a value of `" + + typeof listener + + "` type." ); } @@ -1822,10 +1829,10 @@ to return true:wantsResponderID| | var shouldSetEventType = isStartish(topLevelType) ? eventTypes.startShouldSetResponder : isMoveish(topLevelType) - ? eventTypes.moveShouldSetResponder - : topLevelType === TOP_SELECTION_CHANGE - ? eventTypes.selectionChangeShouldSetResponder - : eventTypes.scrollShouldSetResponder; // TODO: stop one short of the current responder. + ? eventTypes.moveShouldSetResponder + : topLevelType === TOP_SELECTION_CHANGE + ? eventTypes.selectionChangeShouldSetResponder + : eventTypes.scrollShouldSetResponder; // TODO: stop one short of the current responder. var bubbleShouldSetFrom = !responderInst ? targetInst @@ -2012,11 +2019,11 @@ to return true:wantsResponderID| | nativeEvent ) ? setResponderAndExtractTransfer( - topLevelType, - targetInst, - nativeEvent, - nativeEventTarget - ) + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ) : null; // Responder may or may not have transferred on a new touch start/move. // Regardless, whoever is the responder after any potential transfer, we // direct all touch start/move/ends to them in the form of @@ -2034,10 +2041,10 @@ to return true:wantsResponderID| | var incrementalTouch = isResponderTouchStart ? eventTypes.responderStart : isResponderTouchMove - ? eventTypes.responderMove - : isResponderTouchEnd - ? eventTypes.responderEnd - : null; + ? eventTypes.responderMove + : isResponderTouchEnd + ? eventTypes.responderEnd + : null; if (incrementalTouch) { var gesture = ResponderSyntheticEvent.getPooled( @@ -2061,8 +2068,8 @@ to return true:wantsResponderID| | var finalTouch = isResponderTerminate ? eventTypes.responderTerminate : isResponderRelease - ? eventTypes.responderRelease - : null; + ? eventTypes.responderRelease + : null; if (finalTouch) { var finalEvent = ResponderSyntheticEvent.getPooled( @@ -2121,7 +2128,7 @@ to return true:wantsResponderID| | if (pluginIndex <= -1) { throw new Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in " + - ("the plugin ordering, `" + pluginName + "`.") + ("the plugin ordering, `" + pluginName + "`.") ); } @@ -2132,7 +2139,7 @@ to return true:wantsResponderID| | if (!pluginModule.extractEvents) { throw new Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` " + - ("method, but `" + pluginName + "` does not.") + ("method, but `" + pluginName + "` does not.") ); } @@ -2149,10 +2156,10 @@ to return true:wantsResponderID| | ) { throw new Error( "EventPluginRegistry: Failed to publish event `" + - eventName + - "` for plugin `" + - pluginName + - "`." + eventName + + "` for plugin `" + + pluginName + + "`." ); } } @@ -2171,7 +2178,7 @@ to return true:wantsResponderID| | if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { throw new Error( "EventPluginRegistry: More than one plugin attempted to publish the same " + - ("event name, `" + eventName + "`.") + ("event name, `" + eventName + "`.") ); } @@ -2210,7 +2217,7 @@ to return true:wantsResponderID| | if (registrationNameModules[registrationName]) { throw new Error( "EventPluginRegistry: More than one plugin attempted to publish the same " + - ("registration name, `" + registrationName + "`.") + ("registration name, `" + registrationName + "`.") ); } @@ -2253,7 +2260,7 @@ to return true:wantsResponderID| | if (eventPluginOrder) { throw new Error( "EventPluginRegistry: Cannot inject event plugin ordering more than " + - "once. You are likely trying to load more than one copy of React." + "once. You are likely trying to load more than one copy of React." ); } // Clone the ordering so it cannot be dynamically mutated. // $FlowFixMe[method-unbinding] found when upgrading Flow @@ -2288,7 +2295,7 @@ to return true:wantsResponderID| | if (namesToPlugins[pluginName]) { throw new Error( "EventPluginRegistry: Cannot inject two different event plugins " + - ("using the same name, `" + pluginName + "`.") + ("using the same name, `" + pluginName + "`.") ); } @@ -2322,10 +2329,10 @@ to return true:wantsResponderID| | if (listener && typeof listener !== "function") { throw new Error( "Expected `" + - registrationName + - "` listener to be a function, instead got a value of `" + - typeof listener + - "` type." + registrationName + + "` listener to be a function, instead got a value of `" + + typeof listener + + "` type." ); } @@ -2333,8 +2340,8 @@ to return true:wantsResponderID| | } var customBubblingEventTypes = - ReactNativePrivateInterface.ReactNativeViewConfigRegistry - .customBubblingEventTypes, + ReactNativePrivateInterface.ReactNativeViewConfigRegistry + .customBubblingEventTypes, customDirectEventTypes = ReactNativePrivateInterface.ReactNativeViewConfigRegistry .customDirectEventTypes; // Start of inline: the below functions were inlined from @@ -2398,7 +2405,7 @@ to return true:wantsResponderID| | var i; - for (i = path.length; i-- > 0; ) { + for (i = path.length; i-- > 0;) { fn(path[i], "captured", arg); } @@ -2670,7 +2677,7 @@ to return true:wantsResponderID| | if (eventQueue) { throw new Error( "processEventQueue(): Additional events were enqueued while processing " + - "an event queue. Support for this has not yet been implemented." + "an event queue. Support for this has not yet been implemented." ); } // This would be a good time to rethrow if any of the event handlers threw. @@ -2864,7 +2871,7 @@ to return true:wantsResponderID| | function receiveTouches(eventTopLevelType, touches, changedIndices) { var changedTouches = eventTopLevelType === "topTouchEnd" || - eventTopLevelType === "topTouchCancel" + eventTopLevelType === "topTouchCancel" ? removeTouchesAtIndices(touches, changedIndices) : touchSubsequence(touches, changedIndices); @@ -3053,7 +3060,7 @@ to return true:wantsResponderID| | if (typeof type.tag === "number") { error( "Received an unexpected object in getComponentNameFromType(). " + - "This is likely a bug in React. Please file an issue." + "This is likely a bug in React. Please file an issue." ); } } @@ -3378,10 +3385,10 @@ to return true:wantsResponderID| | if (!instance._warnedAboutRefsInRender) { error( "%s is accessing isMounted inside its render() function. " + - "render() should be a pure function of props and state. It should " + - "never access something that requires stale data from the previous " + - "render, such as refs. Move this logic to componentDidMount and " + - "componentDidUpdate instead.", + "render() should be a pure function of props and state. It should " + + "never access something that requires stale data from the previous " + + "render, such as refs. Move this logic to componentDidMount and " + + "componentDidUpdate instead.", getComponentNameFromFiber(ownerFiber) || "A component" ); } @@ -3537,7 +3544,7 @@ to return true:wantsResponderID| | if (!didFindChild) { throw new Error( "Child was not found in either parent set. This indicates a bug " + - "in React related to the return pointer. Please file an issue." + "in React related to the return pointer. Please file an issue." ); } } @@ -3546,7 +3553,7 @@ to return true:wantsResponderID| | if (a.alternate !== b) { throw new Error( "Return fibers should always be each others' alternates. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } // If the root is not a host container, we're in a disconnected tree. I.e. @@ -4130,10 +4137,10 @@ to return true:wantsResponderID| | if (!(validAttributes[key] || props[key] === undefined)) { error( "You are setting the style `{ %s" + - ": ... }` as a prop. You " + - "should nest it in a style object. " + - "E.g. `{ style: { %s" + - ": ... } }`", + ": ... }` as a prop. You " + + "should nest it in a style object. " + + "E.g. `{ style: { %s" + + ": ... } }`", key, key ); @@ -4270,7 +4277,7 @@ to return true:wantsResponderID| | var prevGroupCollapsed; var prevGroupEnd; - function disabledLog() {} + function disabledLog() { } disabledLog.__reactDisabledLog = true; function disableLogs() { @@ -4348,7 +4355,7 @@ to return true:wantsResponderID| | if (disabledDepth < 0) { error( "disabledDepth fell below zero. " + - "This is a bug in React. Please file an issue." + "This is a bug in React. Please file an issue." ); } } @@ -4378,8 +4385,8 @@ to return true:wantsResponderID| | { 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://reactjs.org/link/react-devtools" + "with the current version of React. Please update React DevTools. " + + "https://reactjs.org/link/react-devtools" ); } // DevTools exists, even though it doesn't support Fiber. @@ -4522,7 +4529,7 @@ to return true:wantsResponderID| | } } // Profiler API hooks - function injectProfilingHooks(profilingHooks) {} + function injectProfilingHooks(profilingHooks) { } function getLaneLabelMap() { { @@ -5441,8 +5448,8 @@ to return true:wantsResponderID| | function shim$1() { throw new Error( "The current renderer does not support hydration. " + - "This error is likely caused by a bug in React. " + - "Please file an issue." + "This error is likely caused by a bug in React. " + + "Please file an issue." ); } // Hydration (when unsupported) var isSuspenseInstancePending = shim$1; @@ -5458,8 +5465,8 @@ to return true:wantsResponderID| | function shim() { throw new Error( "The current renderer does not support Resources. " + - "This error is likely caused by a bug in React. " + - "Please file an issue." + "This error is likely caused by a bug in React. " + + "Please file an issue." ); } // Resources (when unsupported) var suspendResource = shim; @@ -5909,7 +5916,7 @@ to return true:wantsResponderID| | init(payload), ownerFn ); - } catch (x) {} + } catch (x) { } } } } @@ -5962,15 +5969,15 @@ to return true:wantsResponderID| | // eslint-disable-next-line react-internal/prod-error-codes var err = Error( (componentName || "React class") + - ": " + - location + - " type `" + - typeSpecName + - "` is invalid; " + - "it must be a function, usually from the `prop-types` package, but received `" + - typeof typeSpecs[typeSpecName] + - "`." + - "This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." + ": " + + location + + " type `" + + typeSpecName + + "` is invalid; " + + "it must be a function, usually from the `prop-types` package, but received `" + + typeof typeSpecs[typeSpecName] + + "`." + + "This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); err.name = "Invariant Violation"; throw err; @@ -5993,11 +6000,11 @@ to return true:wantsResponderID| | error( "%s: type specification of %s" + - " `%s` is invalid; the type checker " + - "function must return `null` or an `Error` but returned a %s. " + - "You may have forgotten to pass an argument to the type checker " + - "creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and " + - "shape all require an argument).", + " `%s` is invalid; the type checker " + + "function must return `null` or an `Error` but returned a %s. " + + "You may have forgotten to pass an argument to the type checker " + + "creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and " + + "shape all require an argument).", componentName || "React class", location, typeSpecName, @@ -6138,7 +6145,7 @@ to return true:wantsResponderID| | if ( instance && instance.__reactInternalMemoizedUnmaskedChildContext === - unmaskedContext + unmaskedContext ) { return instance.__reactInternalMemoizedMaskedChildContext; } @@ -6195,7 +6202,7 @@ to return true:wantsResponderID| | if (contextStackCursor$1.current !== emptyContextObject) { throw new Error( "Unexpected context found on stack. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } @@ -6219,8 +6226,8 @@ to return true:wantsResponderID| | error( "%s.childContextTypes is specified but there is no getChildContext() method " + - "on the instance. You can either define getChildContext() on %s or remove " + - "childContextTypes from it.", + "on the instance. You can either define getChildContext() on %s or remove " + + "childContextTypes from it.", componentName, componentName ); @@ -6236,9 +6243,9 @@ to return true:wantsResponderID| | if (!(contextKey in childContextTypes)) { throw new Error( (getComponentNameFromFiber(fiber) || "Unknown") + - '.getChildContext(): key "' + - contextKey + - '" is not defined in childContextTypes.' + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.' ); } } @@ -6286,7 +6293,7 @@ to return true:wantsResponderID| | if (!instance) { throw new Error( "Expected to have an instance by this point. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } @@ -6321,7 +6328,7 @@ to return true:wantsResponderID| | if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) { throw new Error( "Expected subtree parent to be a mounted class component. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } @@ -6348,7 +6355,7 @@ to return true:wantsResponderID| | throw new Error( "Found unexpected detached subtree parent. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -6403,7 +6410,7 @@ to return true:wantsResponderID| | if (c === null) { error( "Expected host context to exist. This error is likely caused by a bug " + - "in React. Please file an issue." + "in React. Please file an issue." ); } } @@ -6483,7 +6490,7 @@ to return true:wantsResponderID| | { throw new Error( "Expected prepareToHydrateHostInstance() to never be called. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -6492,7 +6499,7 @@ to return true:wantsResponderID| | { throw new Error( "Expected prepareToHydrateHostTextInstance() to never be called. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -6501,7 +6508,7 @@ to return true:wantsResponderID| | { throw new Error( "Expected prepareToHydrateHostSuspenseInstance() to never be called. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -7296,9 +7303,9 @@ to return true:wantsResponderID| | 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", + "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", componentName ); @@ -7762,7 +7769,7 @@ to return true:wantsResponderID| | if (typeof callback !== "function") { throw new Error( "Invalid argument passed as callback. Expected a function. Instead " + - ("received: " + callback) + ("received: " + callback) ); } @@ -7968,11 +7975,11 @@ to return true:wantsResponderID| | } var ReactStrictModeWarnings = { - recordUnsafeLifecycleWarnings: function (fiber, instance) {}, - flushPendingUnsafeLifecycleWarnings: function () {}, - recordLegacyContextWarning: function (fiber, instance) {}, - flushLegacyContextWarning: function () {}, - discardPendingWarnings: function () {} + recordUnsafeLifecycleWarnings: function (fiber, instance) { }, + flushPendingUnsafeLifecycleWarnings: function () { }, + recordLegacyContextWarning: function (fiber, instance) { }, + flushLegacyContextWarning: function () { }, + discardPendingWarnings: function () { } }; { @@ -8034,7 +8041,7 @@ to return true:wantsResponderID| | if ( typeof instance.componentWillReceiveProps === "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== - true + true ) { pendingComponentWillReceivePropsWarnings.push(fiber); } @@ -8146,9 +8153,9 @@ to return true:wantsResponderID| | error( "Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" + - "\nPlease update the following components: %s", + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" + + "\nPlease update the following components: %s", sortedNames ); } @@ -8160,13 +8167,13 @@ to return true:wantsResponderID| | error( "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended " + - "and may indicate bugs in your code. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move data fetching code or side effects to componentDidUpdate.\n" + - "* If you're updating state whenever props change, " + - "refactor your code to use memoization techniques or move it to " + - "static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n" + - "\nPlease update the following components: %s", + "and may indicate bugs in your code. " + + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move data fetching code or side effects to componentDidUpdate.\n" + + "* If you're updating state whenever props change, " + + "refactor your code to use memoization techniques or move it to " + + "static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n" + + "\nPlease update the following components: %s", _sortedNames ); } @@ -8178,10 +8185,10 @@ to return true:wantsResponderID| | error( "Using UNSAFE_componentWillUpdate in strict mode is not recommended " + - "and may indicate bugs in your code. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move data fetching code or side effects to componentDidUpdate.\n" + - "\nPlease update the following components: %s", + "and may indicate bugs in your code. " + + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move data fetching code or side effects to componentDidUpdate.\n" + + "\nPlease update the following components: %s", _sortedNames2 ); } @@ -8193,13 +8200,13 @@ to return true:wantsResponderID| | warn( "componentWillMount has been renamed, and is not recommended for use. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" + - "* Rename componentWillMount to UNSAFE_componentWillMount to suppress " + - "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + - "To rename all deprecated lifecycles to their new names, you can run " + - "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + - "\nPlease update the following components: %s", + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" + + "* Rename componentWillMount to UNSAFE_componentWillMount to suppress " + + "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + + "To rename all deprecated lifecycles to their new names, you can run " + + "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + + "\nPlease update the following components: %s", _sortedNames3 ); } @@ -8211,16 +8218,16 @@ to return true:wantsResponderID| | warn( "componentWillReceiveProps has been renamed, and is not recommended for use. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move data fetching code or side effects to componentDidUpdate.\n" + - "* If you're updating state whenever props change, refactor your " + - "code to use memoization techniques or move it to " + - "static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n" + - "* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress " + - "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + - "To rename all deprecated lifecycles to their new names, you can run " + - "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + - "\nPlease update the following components: %s", + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move data fetching code or side effects to componentDidUpdate.\n" + + "* If you're updating state whenever props change, refactor your " + + "code to use memoization techniques or move it to " + + "static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n" + + "* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress " + + "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + + "To rename all deprecated lifecycles to their new names, you can run " + + "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + + "\nPlease update the following components: %s", _sortedNames4 ); } @@ -8232,13 +8239,13 @@ to return true:wantsResponderID| | warn( "componentWillUpdate has been renamed, and is not recommended for use. " + - "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + - "* Move data fetching code or side effects to componentDidUpdate.\n" + - "* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress " + - "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + - "To rename all deprecated lifecycles to their new names, you can run " + - "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + - "\nPlease update the following components: %s", + "See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" + + "* Move data fetching code or side effects to componentDidUpdate.\n" + + "* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress " + + "this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " + + "To rename all deprecated lifecycles to their new names, you can run " + + "`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n" + + "\nPlease update the following components: %s", _sortedNames5 ); } @@ -8257,7 +8264,7 @@ to return true:wantsResponderID| | if (strictRoot === null) { error( "Expected to find a StrictMode component in a strict mode tree. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); return; @@ -8302,10 +8309,10 @@ to return true:wantsResponderID| | error( "Legacy context API has been detected within a strict-mode tree." + - "\n\nThe old API will be supported in all 16.x releases, but applications " + - "using it should migrate to the new version." + - "\n\nPlease update the following components: %s" + - "\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context", + "\n\nThe old API will be supported in all 16.x releases, but applications " + + "using it should migrate to the new version." + + "\n\nPlease update the following components: %s" + + "\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context", sortedNames ); } finally { @@ -8390,7 +8397,7 @@ to return true:wantsResponderID| | if (willCoercionThrow(value)) { error( "The provided key is an unsupported type %s." + - " This value must be coerced to a string before using it here.", + " This value must be coerced to a string before using it here.", typeName(value) ); @@ -8403,7 +8410,7 @@ to return true:wantsResponderID| | if (willCoercionThrow(value)) { error( "The provided `%s` prop is an unsupported type %s." + - " This value must be coerced to a string before using it here.", + " This value must be coerced to a string before using it here.", propName, typeName(value) ); @@ -8425,16 +8432,16 @@ to return true:wantsResponderID| | var SuspenseException = new Error( "Suspense Exception: This is not a real error! It's an implementation " + - "detail of `use` to interrupt the current render. You must either " + - "rethrow it immediately, or move the `use` call outside of the " + - "`try/catch` block. Capturing without rethrowing will lead to " + - "unexpected behavior.\n\n" + - "To handle async errors, wrap your component in an error boundary, or " + - "call the promise's `.catch` method and pass the result to `use`" + "detail of `use` to interrupt the current render. You must either " + + "rethrow it immediately, or move the `use` call outside of the " + + "`try/catch` block. Capturing without rethrowing will lead to " + + "unexpected behavior.\n\n" + + "To handle async errors, wrap your component in an error boundary, or " + + "call the promise's `.catch` method and pass the result to `use`" ); var SuspenseyCommitException = new Error( "Suspense Exception: This is not a real error, and should not leak into " + - "userspace. If you're seeing this, it's likely a bug in React." + "userspace. If you're seeing this, it's likely a bug in React." ); // This is a noop thenable that we use to trigger a fallback in throwException. // TODO: It would be better to refactor throwException into multiple functions // so we can trigger a fallback directly without having to check the type. But @@ -8445,7 +8452,7 @@ to return true:wantsResponderID| | { error( "Internal React error: A listener was unexpectedly attached to a " + - '"noop" thenable. This is a bug in React. Please file an issue.' + '"noop" thenable. This is a bug in React. Please file an issue.' ); } } @@ -8465,7 +8472,7 @@ to return true:wantsResponderID| | return status === "fulfilled" || status === "rejected"; } - function noop() {} + function noop() { } function trackUsedThenable(thenableState, thenable, index) { if (ReactCurrentActQueue$2.current !== null) { @@ -8504,8 +8511,8 @@ to return true:wantsResponderID| | 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." + "promises inside a Client Component or hook is not yet " + + "supported, except via a Suspense-compatible library or framework." ); } } // Avoid an unhandled rejection errors for the Promises that we'll @@ -8562,9 +8569,9 @@ to return true:wantsResponderID| | // root into offscreen mode. throw new Error( "async/await is not yet supported in Client Components, only " + - "Server Components. This error is often caused by accidentally " + - "adding `'use client'` to a module that was originally written " + - "for the server." + "Server Components. This error is often caused by accidentally " + + "adding `'use client'` to a module that was originally written " + + "for the server." ); } @@ -8631,7 +8638,7 @@ to return true:wantsResponderID| | if (suspendedThenable === null) { throw new Error( "Expected a suspended thenable. This is a bug in React. Please file " + - "an issue." + "an issue." ); } @@ -8668,8 +8675,8 @@ to return true:wantsResponderID| | if (rejectedReason === SuspenseException) { throw new 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." + "error is often caused by accidentally adding `'use client'` " + + "to a module that was originally written for the server." ); } } @@ -8682,7 +8689,7 @@ to return true:wantsResponderID| | var ownerHasKeyUseWarning; var ownerHasFunctionTypeWarning; - var warnForMissingKey = function (child, returnFiber) {}; + var warnForMissingKey = function (child, returnFiber) { }; { didWarnAboutMaps = false; @@ -8709,7 +8716,7 @@ to return true:wantsResponderID| | if (typeof child._store !== "object") { throw new Error( "React Component in warnForMissingKey should have a _store. " + - "This error is likely caused by a bug in React. Please file an issue." + "This error is likely caused by a bug in React. Please file an issue." ); } // $FlowFixMe[cannot-write] unable to narrow type from mixed to writable object @@ -8725,8 +8732,8 @@ to return true:wantsResponderID| | error( "Each child in a list should have a unique " + - '"key" prop. See https://reactjs.org/link/warning-keys for ' + - "more information." + '"key" prop. See https://reactjs.org/link/warning-keys for ' + + "more information." ); }; } @@ -8769,10 +8776,10 @@ to return true:wantsResponderID| | if (!didWarnAboutStringRefs[componentName]) { error( 'Component "%s" contains the string ref "%s". Support for string refs ' + - "will be removed in a future major release. We recommend using " + - "useRef() or createRef() instead. " + - "Learn more about using refs safely here: " + - "https://reactjs.org/link/strict-mode-string-ref", + "will be removed in a future major release. We recommend using " + + "useRef() or createRef() instead. " + + "Learn more about using refs safely here: " + + "https://reactjs.org/link/strict-mode-string-ref", componentName, mixedRef ); @@ -8792,9 +8799,9 @@ to return true:wantsResponderID| | if (ownerFiber.tag !== ClassComponent) { throw new Error( "Function components cannot have string refs. " + - "We recommend using useRef() instead. " + - "Learn more about using refs safely here: " + - "https://reactjs.org/link/strict-mode-string-ref" + "We recommend using useRef() instead. " + + "Learn more about using refs safely here: " + + "https://reactjs.org/link/strict-mode-string-ref" ); } @@ -8804,9 +8811,9 @@ to return true:wantsResponderID| | if (!inst) { throw new Error( "Missing owner for string ref " + - mixedRef + - ". This error is likely caused by a " + - "bug in React. Please file an issue." + mixedRef + + ". This error is likely caused by a " + + "bug in React. Please file an issue." ); } // Assigning this to a const so Flow knows it won't change in the closure @@ -8849,13 +8856,13 @@ to return true:wantsResponderID| | if (!element._owner) { throw new Error( "Element ref was specified as a string (" + - mixedRef + - ") but no owner was set. This could happen for one of" + - " the following reasons:\n" + - "1. You may be adding a ref to a function component\n" + - "2. You may be adding a ref to a component that was not created inside a component's render method\n" + - "3. You have multiple copies of React loaded\n" + - "See https://reactjs.org/link/refs-must-have-owner for more information." + mixedRef + + ") but no owner was set. This could happen for one of" + + " the following reasons:\n" + + "1. You may be adding a ref to a function component\n" + + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + + "3. You have multiple copies of React loaded\n" + + "See https://reactjs.org/link/refs-must-have-owner for more information." ); } } @@ -8869,12 +8876,12 @@ to return true:wantsResponderID| | var childString = Object.prototype.toString.call(newChild); throw new Error( "Objects are not valid as a React child (found: " + - (childString === "[object Object]" - ? "object with keys {" + Object.keys(newChild).join(", ") + "}" - : childString) + - "). " + - "If you meant to render a collection of children, use an array " + - "instead." + (childString === "[object Object]" + ? "object with keys {" + Object.keys(newChild).join(", ") + "}" + : childString) + + "). " + + "If you meant to render a collection of children, use an array " + + "instead." ); } @@ -8891,8 +8898,8 @@ to return true:wantsResponderID| | error( "Functions are not valid as a React child. This may happen if " + - "you return a Component instead of from render. " + - "Or maybe you meant to call this function rather than return it." + "you return a Component instead of from render. " + + "Or maybe you meant to call this function rather than return it." ); } } @@ -9417,10 +9424,10 @@ to return true:wantsResponderID| | 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 — the behavior is unsupported and " + - "could change in a future version.", + "Keys should be unique so that components maintain their identity " + + "across updates. Non-unique keys may cause children to be " + + "duplicated and/or omitted — the behavior is unsupported and " + + "could change in a future version.", key ); @@ -9623,7 +9630,7 @@ to return true:wantsResponderID| | if (typeof iteratorFn !== "function") { throw new Error( "An object is not an iterable. This error is likely caused by a bug in " + - "React. Please file an issue." + "React. Please file an issue." ); } @@ -9637,10 +9644,10 @@ to return true:wantsResponderID| | if (!didWarnAboutGenerators) { error( "Using Generators 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. Keep in mind " + - "you might need to polyfill these features for older browsers." + "unexpected results because enumerating a generator mutates it. " + + "You may convert it to an array with `Array.from()` or the " + + "`[...spread]` operator before rendering. Keep in mind " + + "you might need to polyfill these features for older browsers." ); } @@ -9651,7 +9658,7 @@ to return true:wantsResponderID| | if (!didWarnAboutMaps) { error( "Using Maps as children is not supported. " + - "Use an array of keyed ReactElements instead." + "Use an array of keyed ReactElements instead." ); } @@ -10513,7 +10520,7 @@ to return true:wantsResponderID| | // It's unlikely their type would change as usually you define them inline. error( "%s received a final argument that is not an array (instead, received `%s`). When " + - "specified, the final argument must be an array.", + "specified, the final argument must be an array.", currentHookNameInDev, typeof deps ); @@ -10551,12 +10558,12 @@ to return true:wantsResponderID| | 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://reactjs.org/link/rules-of-hooks\n\n" + - " Previous render Next render\n" + - " ------------------------------------------------------\n" + - "%s" + - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "This will lead to bugs and errors if not fixed. " + + "For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n" + + " Previous render Next render\n" + + " ------------------------------------------------------\n" + + "%s" + + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", componentName, table ); @@ -10587,9 +10594,9 @@ to return true:wantsResponderID| | error( "async/await is not yet supported in Client Components, only " + - "Server Components. This error is often caused by accidentally " + - "adding `'use client'` to a module that was originally written " + - "for the server." + "Server Components. This error is often caused by accidentally " + + "adding `'use client'` to a module that was originally written " + + "for the server." ); } } @@ -10599,11 +10606,11 @@ to return true:wantsResponderID| | function throwInvalidHookError() { throw new 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:\n" + - "1. You might have mismatching versions of React and the renderer (such as React DOM)\n" + - "2. You might be breaking the Rules of Hooks\n" + - "3. You might have more than one copy of React in the same app\n" + - "See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." + " one of the following reasons:\n" + + "1. You might have mismatching versions of React and the renderer (such as React DOM)\n" + + "2. You might be breaking the Rules of Hooks\n" + + "3. You might have more than one copy of React in the same app\n" + + "See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." ); } @@ -10619,8 +10626,8 @@ to return true:wantsResponderID| | { 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.", + "the previous render. Even though the final argument is optional, " + + "its type cannot change between renders.", currentHookNameInDev ); } @@ -10634,9 +10641,9 @@ to return true:wantsResponderID| | if (nextDeps.length !== prevDeps.length) { error( "The final argument passed to %s changed size between renders. The " + - "order and size of this array must remain constant.\n\n" + - "Previous: %s\n" + - "Incoming: %s", + "order and size of this array must remain constant.\n\n" + + "Previous: %s\n" + + "Incoming: %s", currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + nextDeps.join(", ") + "]" @@ -10797,7 +10804,7 @@ to return true:wantsResponderID| | if ( current !== null && (current.flags & StaticMask) !== - (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird + (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird // and creates false positives. To make this work in legacy mode, we'd // need to mark fibers that commit in an incomplete state, somehow. For // now I'll disable the warning that most of the bugs that would trigger @@ -10806,7 +10813,7 @@ to return true:wantsResponderID| | ) { error( "Internal React error: Expected static flag was missing. Please " + - "notify the React team." + "notify the React team." ); } } @@ -10820,7 +10827,7 @@ to return true:wantsResponderID| | if (didRenderTooFewHooks) { throw new Error( "Rendered fewer hooks than expected. This may be caused by an accidental " + - "early return statement." + "early return statement." ); } @@ -10839,8 +10846,8 @@ to return true:wantsResponderID| | 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." + "and can lead to unexpected behavior. To handle errors triggered " + + "by `use`, wrap your component in a error boundary." ); } } @@ -10906,7 +10913,7 @@ to return true:wantsResponderID| | if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( "Too many re-renders. React limits the number of renders to prevent " + - "an infinite loop." + "an infinite loop." ); } @@ -11232,7 +11239,7 @@ to return true:wantsResponderID| | // the future if we implement resuming, or some form of that. error( "Internal error: Expected work-in-progress queue to be a clone. " + - "This is a bug in React." + "This is a bug in React." ); } } @@ -11864,7 +11871,7 @@ to return true:wantsResponderID| | if (!refObject.hasOwnProperty("current")) { error( "Expected useImperativeHandle() first argument to either be a " + - "ref callback or React.createRef() object. Instead received: %s.", + "ref callback or React.createRef() object. Instead received: %s.", "an object with keys {" + Object.keys(refObject).join(", ") + "}" ); } @@ -11884,7 +11891,7 @@ to return true:wantsResponderID| | if (typeof create !== "function") { error( "Expected useImperativeHandle() second argument to be a function " + - "that creates a handle. Instead received: %s.", + "that creates a handle. Instead received: %s.", create !== null ? typeof create : "null" ); } @@ -11911,7 +11918,7 @@ to return true:wantsResponderID| | if (typeof create !== "function") { error( "Expected useImperativeHandle() second argument to be a function " + - "that creates a handle. Instead received: %s.", + "that creates a handle. Instead received: %s.", create !== null ? typeof create : "null" ); } @@ -12150,8 +12157,8 @@ to return true:wantsResponderID| | if (updatedFibersCount > 10) { 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." + "If this is due to a subscription please re-write it to use React provided hooks. " + + "Otherwise concurrent mode guarantees are off the table." ); } } @@ -12232,8 +12239,8 @@ to return true:wantsResponderID| | if (typeof arguments[3] === "function") { 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()." + "second callback argument. To execute a side effect after " + + "rendering, declare it in the component body with useEffect()." ); } } @@ -12265,8 +12272,8 @@ to return true:wantsResponderID| | if (typeof arguments[3] === "function") { 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()." + "second callback argument. To execute a side effect after " + + "rendering, declare it in the component body with useEffect()." ); } } @@ -12424,18 +12431,18 @@ to return true:wantsResponderID| | var warnInvalidContextAccess = function () { 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()." + "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()." ); }; var warnInvalidHookAccess = function () { 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://reactjs.org/link/rules-of-hooks" + "You can only call Hooks at the top level of your React function. " + + "For more information, see " + + "https://reactjs.org/link/rules-of-hooks" ); }; @@ -13488,11 +13495,11 @@ to return true:wantsResponderID| | value: function () { throw new Error( "_processChildContext is not available in React 16+. This likely " + - "means you have multiple copies of React and are attempting to nest " + - "a React 15 tree inside a React 16 tree using " + - "unstable_renderSubtreeIntoContainer, which isn't supported. Try " + - "to make sure you have only one copy of React (and ideally, switch " + - "to ReactDOM.createPortal)." + "means you have multiple copies of React and are attempting to nest " + + "a React 15 tree inside a React 16 tree using " + + "unstable_renderSubtreeIntoContainer, which isn't supported. Try " + + "to make sure you have only one copy of React (and ideally, switch " + + "to ReactDOM.createPortal)." ); } }); @@ -13512,7 +13519,7 @@ to return true:wantsResponderID| | error( "%s(...): Expected the last optional `callback` argument to be a " + - "function. Instead received: %s.", + "function. Instead received: %s.", callerName, callback ); @@ -13530,7 +13537,7 @@ to return true:wantsResponderID| | error( "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. " + - "You have returned undefined.", + "You have returned undefined.", componentName ); } @@ -13683,7 +13690,7 @@ to return true:wantsResponderID| | if (shouldUpdate === undefined) { error( "%s.shouldComponentUpdate(): Returned undefined instead of a " + - "boolean value. Make sure to return true or false.", + "boolean value. Make sure to return true or false.", getComponentNameFromType(ctor) || "Component" ); } @@ -13712,13 +13719,13 @@ to return true:wantsResponderID| | if (ctor.prototype && typeof ctor.prototype.render === "function") { error( "%s(...): No `render` method found on the returned component " + - "instance: did you accidentally return an object from the constructor?", + "instance: did you accidentally return an object from the constructor?", name ); } else { error( "%s(...): No `render` method found on the returned component " + - "instance: you may have forgotten to define `render`.", + "instance: you may have forgotten to define `render`.", name ); } @@ -13731,8 +13738,8 @@ to return true:wantsResponderID| | ) { 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?", + "This is only supported for classes created using React.createClass. " + + "Did you mean to define a state property instead?", name ); } @@ -13743,8 +13750,8 @@ to return true:wantsResponderID| | ) { 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.", + "This is only supported for classes created using React.createClass. " + + "Use a static property to define defaultProps instead.", name ); } @@ -13752,7 +13759,7 @@ to return true:wantsResponderID| | if (instance.propTypes) { error( "propTypes was defined as an instance property on %s. Use a static " + - "property to define propTypes instead.", + "property to define propTypes instead.", name ); } @@ -13760,7 +13767,7 @@ to return true:wantsResponderID| | if (instance.contextType) { error( "contextType was defined as an instance property on %s. Use a static " + - "property to define contextType instead.", + "property to define contextType instead.", name ); } @@ -13769,7 +13776,7 @@ to return true:wantsResponderID| | if (instance.contextTypes) { error( "contextTypes was defined as an instance property on %s. Use a static " + - "property to define contextTypes instead.", + "property to define contextTypes instead.", name ); } @@ -13783,7 +13790,7 @@ to return true:wantsResponderID| | error( "%s declares both contextTypes and contextType static properties. " + - "The legacy contextTypes property will be ignored.", + "The legacy contextTypes property will be ignored.", name ); } @@ -13792,9 +13799,9 @@ to return true:wantsResponderID| | if (typeof instance.componentShouldUpdate === "function") { 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.", + "componentShouldUpdate(). Did you mean shouldComponentUpdate()? " + + "The name is phrased as a question because the function is " + + "expected to return a value.", name ); } @@ -13806,8 +13813,8 @@ to return true:wantsResponderID| | ) { error( "%s has a method called shouldComponentUpdate(). " + - "shouldComponentUpdate should not be used when extending React.PureComponent. " + - "Please extend React.Component if shouldComponentUpdate is used.", + "shouldComponentUpdate should not be used when extending React.PureComponent. " + + "Please extend React.Component if shouldComponentUpdate is used.", getComponentNameFromType(ctor) || "A pure component" ); } @@ -13815,8 +13822,8 @@ to return true:wantsResponderID| | if (typeof instance.componentDidUnmount === "function") { error( "%s has a method called " + - "componentDidUnmount(). But there is no such lifecycle method. " + - "Did you mean componentWillUnmount()?", + "componentDidUnmount(). But there is no such lifecycle method. " + + "Did you mean componentWillUnmount()?", name ); } @@ -13824,10 +13831,10 @@ to return true:wantsResponderID| | if (typeof instance.componentDidReceiveProps === "function") { 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().", + "componentDidReceiveProps(). But there is no such lifecycle method. " + + "If you meant to update the state in response to changing props, " + + "use componentWillReceiveProps(). If you meant to fetch data or " + + "run side-effects or mutations after React has updated the UI, use componentDidUpdate().", name ); } @@ -13835,7 +13842,7 @@ to return true:wantsResponderID| | if (typeof instance.componentWillRecieveProps === "function") { error( "%s has a method called " + - "componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", + "componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", name ); } @@ -13843,7 +13850,7 @@ to return true:wantsResponderID| | if (typeof instance.UNSAFE_componentWillRecieveProps === "function") { error( "%s has a method called " + - "UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", + "UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", name ); } @@ -13853,7 +13860,7 @@ to return true:wantsResponderID| | if (instance.props !== undefined && hasMutatedProps) { error( "%s(...): When calling super() in `%s`, make sure to pass " + - "up the same props that your component's constructor was passed.", + "up the same props that your component's constructor was passed.", name, name ); @@ -13862,7 +13869,7 @@ to return true:wantsResponderID| | if (instance.defaultProps) { 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.", + " Instead, define defaultProps as a static property on %s.", name, name ); @@ -13877,7 +13884,7 @@ to return true:wantsResponderID| | error( "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). " + - "This component defines getSnapshotBeforeUpdate() only.", + "This component defines getSnapshotBeforeUpdate() only.", getComponentNameFromType(ctor) ); } @@ -13885,7 +13892,7 @@ to return true:wantsResponderID| | if (typeof instance.getDerivedStateFromProps === "function") { error( "%s: getDerivedStateFromProps() is defined as an instance method " + - "and will be ignored. Instead, declare it as a static method.", + "and will be ignored. Instead, declare it as a static method.", name ); } @@ -13893,7 +13900,7 @@ to return true:wantsResponderID| | if (typeof instance.getDerivedStateFromError === "function") { error( "%s: getDerivedStateFromError() is defined as an instance method " + - "and will be ignored. Instead, declare it as a static method.", + "and will be ignored. Instead, declare it as a static method.", name ); } @@ -13901,7 +13908,7 @@ to return true:wantsResponderID| | if (typeof ctor.getSnapshotBeforeUpdate === "function") { error( "%s: getSnapshotBeforeUpdate() is defined as a static method " + - "and will be ignored. Instead, declare it as an instance method.", + "and will be ignored. Instead, declare it as an instance method.", name ); } @@ -13918,7 +13925,7 @@ to return true:wantsResponderID| | ) { error( "%s.getChildContext(): childContextTypes must be defined in order to " + - "use getChildContext().", + "use getChildContext().", name ); } @@ -13978,7 +13985,7 @@ to return true:wantsResponderID| | error( "%s defines an invalid contextType. " + - "contextType should point to the Context object returned by React.createContext().%s", + "contextType should point to the Context object returned by React.createContext().%s", getComponentNameFromType(ctor) || "Component", addendum ); @@ -14030,9 +14037,9 @@ to return true:wantsResponderID| | 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.", + "%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.", componentName, instance.state === null ? "null" : "undefined", componentName @@ -14062,7 +14069,7 @@ to return true:wantsResponderID| | if ( typeof instance.componentWillReceiveProps === "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== - true + true ) { foundWillReceivePropsName = "componentWillReceiveProps"; } else if ( @@ -14101,9 +14108,9 @@ to return true:wantsResponderID| | 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\n" + - "The above lifecycles should be removed. Learn more about this warning here:\n" + - "https://reactjs.org/link/unsafe-component-lifecycles", + "%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n" + + "The above lifecycles should be removed. Learn more about this warning here:\n" + + "https://reactjs.org/link/unsafe-component-lifecycles", _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : "", @@ -14140,8 +14147,8 @@ to return true:wantsResponderID| | { error( "%s.componentWillMount(): Assigning directly to this.state is " + - "deprecated (except inside a component's " + - "constructor). Use setState instead.", + "deprecated (except inside a component's " + + "constructor). Use setState instead.", getComponentNameFromFiber(workInProgress) || "Component" ); } @@ -14180,8 +14187,8 @@ to return true:wantsResponderID| | error( "%s.componentWillReceiveProps(): Assigning directly to " + - "this.state is deprecated (except inside a component's " + - "constructor). Use setState instead.", + "this.state is deprecated (except inside a component's " + + "constructor). Use setState instead.", componentName ); } @@ -14223,8 +14230,8 @@ to return true:wantsResponderID| | 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.", + "because updates to props won't be reflected in state. " + + "In most cases, it is better to use props directly.", componentName ); } @@ -14687,8 +14694,8 @@ to return true:wantsResponderID| | var componentName = source ? getComponentNameFromFiber(source) : null; var componentNameMessage = componentName ? "The above error occurred in the <" + - componentName + - "> component:" + componentName + + "> component:" : "The above error occurred in one of your React components:"; var errorBoundaryMessage; @@ -14803,7 +14810,7 @@ to return true:wantsResponderID| | if (!includesSomeLane(fiber.lanes, SyncLane)) { error( "%s: Error boundaries should implement getDerivedStateFromError(). " + - "In that method, return a state update to display an error message or fallback UI.", + "In that method, return a state update to display an error message or fallback UI.", getComponentNameFromFiber(fiber) || "Unknown" ); } @@ -15104,9 +15111,9 @@ to return true:wantsResponderID| | throw new Error( "Unexpected Suspense handler tag (" + - suspenseBoundary.tag + - "). This " + - "is a bug in React." + suspenseBoundary.tag + + "). This " + + "is a bug in React." ); } else { // No boundary was found. Unless this is a sync update, this is OK. @@ -15125,9 +15132,9 @@ to return true:wantsResponderID| | // In a legacy root, suspending without a boundary is always an error. var uncaughtSuspenseError = new Error( "A component suspended while responding to synchronous input. This " + - "will cause the UI to be replaced with a loading indicator. To " + - "fix, updates that suspend should be wrapped " + - "with startTransition." + "will cause the UI to be replaced with a loading indicator. To " + + "fix, updates that suspend should be wrapped " + + "with startTransition." ); value = uncaughtSuspenseError; } @@ -15207,8 +15214,8 @@ to return true:wantsResponderID| | var SelectiveHydrationException = new Error( "This is not a real error. It's an implementation detail of React's " + - "selective hydration feature. If this leaks into userspace, it's a bug in " + - "React. Please file an issue." + "selective hydration feature. If this leaks into userspace, it's a bug in " + + "React. Please file an issue." ); var didReceiveUpdate = false; var didWarnAboutBadClass; @@ -15417,7 +15424,7 @@ to return true:wantsResponderID| | if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) { error( "%s: Support for defaultProps will be removed from memo components " + - "in a future major release. Use JavaScript default parameters instead.", + "in a future major release. Use JavaScript default parameters instead.", componentName ); @@ -16001,7 +16008,7 @@ to return true:wantsResponderID| | if (!didWarnAboutReassigningProps) { error( "It looks like %s is reassigning its own `this.props` while rendering. " + - "This is not supported and can lead to confusing bugs.", + "This is not supported and can lead to confusing bugs.", getComponentNameFromFiber(workInProgress) || "a component" ); } @@ -16291,9 +16298,9 @@ to return true:wantsResponderID| | throw new Error( "Element type is invalid. Received a promise that resolves to: " + - Component + - ". " + - ("Lazy element type must resolve to a class or function." + hint) + Component + + ". " + + ("Lazy element type must resolve to a class or function." + hint) ); } @@ -16365,7 +16372,7 @@ to return true:wantsResponderID| | if (!didWarnAboutBadClass[componentName]) { error( "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", + "This is likely to cause errors. Change %s to extend React.Component instead.", componentName, componentName ); @@ -16410,10 +16417,10 @@ to return true:wantsResponderID| | if (!didWarnAboutModulePatternComponent[_componentName]) { error( "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", + "Change %s to a class that extends React.Component instead. " + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + "cannot be called with `new` by React.", _componentName, _componentName, _componentName @@ -16439,10 +16446,10 @@ to return true:wantsResponderID| | if (!didWarnAboutModulePatternComponent[_componentName2]) { error( "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", + "Change %s to a class that extends React.Component instead. " + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + "cannot be called with `new` by React.", _componentName2, _componentName2, _componentName2 @@ -16524,8 +16531,8 @@ to return true:wantsResponderID| | error( "Function components cannot be given refs. " + - "Attempts to access this ref will fail. " + - "Did you mean to use React.forwardRef()?%s", + "Attempts to access this ref will fail. " + + "Did you mean to use React.forwardRef()?%s", info ); } @@ -16538,7 +16545,7 @@ to return true:wantsResponderID| | if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName3]) { error( "%s: Support for defaultProps will be removed from function components " + - "in a future major release. Use JavaScript default parameters instead.", + "in a future major release. Use JavaScript default parameters instead.", _componentName3 ); @@ -17130,8 +17137,8 @@ to return true:wantsResponderID| | } else { error = new Error( "The server could not finish this Suspense boundary, likely " + - "due to an error during server rendering. Switched to " + - "client rendering." + "due to an error during server rendering. Switched to " + + "client rendering." ); } @@ -17249,7 +17256,7 @@ to return true:wantsResponderID| | var _capturedValue = createCapturedValue( new Error( "There was an error while hydrating this Suspense boundary. " + - "Switched to client rendering." + "Switched to client rendering." ) ); @@ -17402,7 +17409,7 @@ to return true:wantsResponderID| | case "backwards": { error( '"%s" is not a valid value for revealOrder on . ' + - 'Use lowercase "%s" instead.', + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase() ); @@ -17414,7 +17421,7 @@ to return true:wantsResponderID| | case "backward": { error( '"%s" is not a valid value for revealOrder on . ' + - 'React uses the -s suffix in the spelling. Use "%ss" instead.', + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase() ); @@ -17425,7 +17432,7 @@ to return true:wantsResponderID| | default: error( '"%s" is not a supported revealOrder on . ' + - 'Did you mean "together", "forwards" or "backwards"?', + 'Did you mean "together", "forwards" or "backwards"?', revealOrder ); @@ -17434,7 +17441,7 @@ to return true:wantsResponderID| | } else { error( "%s is not a supported value for revealOrder on . " + - 'Did you mean "together", "forwards" or "backwards"?', + 'Did you mean "together", "forwards" or "backwards"?', revealOrder ); } @@ -17450,7 +17457,7 @@ to return true:wantsResponderID| | error( '"%s" is not a supported value for tail on . ' + - 'Did you mean "collapsed" or "hidden"?', + 'Did you mean "collapsed" or "hidden"?', tailMode ); } else if ( @@ -17461,8 +17468,8 @@ to return true:wantsResponderID| | error( ' is only valid if revealOrder is ' + - '"forwards" or "backwards". ' + - 'Did you mean to specify revealOrder="forwards"?', + '"forwards" or "backwards". ' + + 'Did you mean to specify revealOrder="forwards"?', tailMode ); } @@ -17481,10 +17488,10 @@ to return true:wantsResponderID| | error( "A nested %s was passed to row #%s in . Wrap it in " + - "an additional SuspenseList to configure its revealOrder: " + - " ... " + - "{%s} ... " + - "", + "an additional SuspenseList to configure its revealOrder: " + + " ... " + + "{%s} ... " + + "", type, index, type @@ -17532,8 +17539,8 @@ to return true:wantsResponderID| | } else { error( 'A single row was passed to a . ' + - "This is not useful since it needs multiple rows. " + - "Did you mean to pass multiple children or an array?", + "This is not useful since it needs multiple rows. " + + "Did you mean to pass multiple children or an array?", revealOrder ); } @@ -17817,7 +17824,7 @@ to return true:wantsResponderID| | error( "Rendering directly is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" + "a future major release. Did you mean to render instead?" ); } } @@ -17833,9 +17840,9 @@ to return true:wantsResponderID| | if (typeof render !== "function") { 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." + "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." ); } } @@ -18434,9 +18441,9 @@ to return true:wantsResponderID| | throw new Error( "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in " + - "React. Please file an issue." + workInProgress.tag + + "). This error is likely caused by a bug in " + + "React. Please file an issue." ); } @@ -18494,7 +18501,7 @@ to return true:wantsResponderID| | ) { error( "Detected multiple renderers concurrently rendering the " + - "same context provider. This is currently unsupported." + "same context provider. This is currently unsupported." ); } @@ -18555,7 +18562,7 @@ to return true:wantsResponderID| | if (node !== propagationRoot) { 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." + "This error is likely caused by a bug in React. Please file an issue." ); } } @@ -18735,9 +18742,9 @@ to return true:wantsResponderID| | if (isDisallowedContextReadInDEV) { 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()." + "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()." ); } } @@ -18767,9 +18774,9 @@ to return true:wantsResponderID| | if (consumer === null) { throw new 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()." + "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()." ); } // This is the first dependency for this component. Create a new list. @@ -18801,7 +18808,7 @@ to return true:wantsResponderID| | return transition; } - function handleAsyncAction(transition, thenable) {} + function handleAsyncAction(transition, thenable) { } function notifyTransitionCallbacks(transition, returnValue) { var callbacks = transition._callbacks; @@ -19148,7 +19155,7 @@ to return true:wantsResponderID| | if (!wasHydrated) { throw new Error( "A dehydrated suspense component was completed without a hydrated node. " + - "This is probably a bug in React." + "This is probably a bug in React." ); } @@ -19218,7 +19225,12 @@ to return true:wantsResponderID| | function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing - + if (workInProgress.flags & 1 && (workInProgress.type?.displayName || workInProgress.type?.name) !== "View") + insertUpdateComponents( + getComponentNameFromFiber(workInProgress), + workInProgress.flags, + workInProgress.key, + ); switch (workInProgress.tag) { case IndeterminateComponent: case LazyComponent: @@ -19311,7 +19323,7 @@ to return true:wantsResponderID| | if (workInProgress.stateNode === null) { throw new Error( "We must have new props for new mounts. This error is likely " + - "caused by a bug in React. Please file an issue." + "caused by a bug in React. Please file an issue." ); } // This can happen when we abort work. @@ -19380,7 +19392,7 @@ to return true:wantsResponderID| | if (workInProgress.stateNode === null) { throw new Error( "We must have new props for new mounts. This error is likely " + - "caused by a bug in React. Please file an issue." + "caused by a bug in React. Please file an issue." ); } // This can happen when we abort work. } @@ -19658,7 +19670,7 @@ to return true:wantsResponderID| | // time we have to render. So rendering one more row would likely // exceed it. now$1() * 2 - renderState.renderingStartTime > - getRenderTargetTime() && + getRenderTargetTime() && renderLanes !== OffscreenLane ) { // We have now passed our CPU deadline and we'll just give up further @@ -19803,9 +19815,9 @@ to return true:wantsResponderID| | throw new Error( "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in " + - "React. Please file an issue." + workInProgress.tag + + "). This error is likely caused by a bug in " + + "React. Please file an issue." ); } @@ -19867,7 +19879,7 @@ to return true:wantsResponderID| | if (workInProgress.alternate === null) { throw new Error( "Threw in newly mounted dehydrated component. This is likely a bug in " + - "React. Please file an issue." + "React. Please file an issue." ); } } @@ -20105,7 +20117,7 @@ to return true:wantsResponderID| | if (typeof retVal === "function") { error( "Unexpected return value from a callback ref in %s. " + - "A callback ref should not return a function.", + "A callback ref should not return a function.", getComponentNameFromFiber(current) ); } @@ -20211,10 +20223,10 @@ to return true:wantsResponderID| | if (instance.props !== finishedWork.memoizedProps) { 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.", + "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" ); } @@ -20222,10 +20234,10 @@ to return true:wantsResponderID| | if (instance.state !== finishedWork.memoizedState) { 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.", + "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" ); } @@ -20250,7 +20262,7 @@ to return true:wantsResponderID| | error( "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) " + - "must be returned. You have returned undefined.", + "must be returned. You have returned undefined.", getComponentNameFromFiber(finishedWork) ); } @@ -20280,7 +20292,7 @@ to return true:wantsResponderID| | if ((flags & Snapshot) !== NoFlags$1) { throw new 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." + "likely caused by a bug in React. Please file an issue." ); } } @@ -20402,7 +20414,7 @@ to return true:wantsResponderID| | error( "%s must not return anything besides a function, " + - "which is used for clean-up.%s", + "which is used for clean-up.%s", hookName, addendum ); @@ -20506,10 +20518,10 @@ to return true:wantsResponderID| | if (instance.props !== finishedWork.memoizedProps) { 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.", + "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" ); } @@ -20517,10 +20529,10 @@ to return true:wantsResponderID| | if (instance.state !== finishedWork.memoizedState) { 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.", + "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" ); } @@ -20560,10 +20572,10 @@ to return true:wantsResponderID| | if (instance.props !== finishedWork.memoizedProps) { 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.", + "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" ); } @@ -20571,10 +20583,10 @@ to return true:wantsResponderID| | if (instance.state !== finishedWork.memoizedState) { 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.", + "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" ); } @@ -20624,10 +20636,10 @@ to return true:wantsResponderID| | if (instance.props !== finishedWork.memoizedProps) { 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.", + "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" ); } @@ -20635,10 +20647,10 @@ to return true:wantsResponderID| | if (instance.state !== finishedWork.memoizedState) { 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.", + "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" ); } @@ -21033,7 +21045,7 @@ to return true:wantsResponderID| | if (!ref.hasOwnProperty("current")) { error( "Unexpected ref object provided for %s. " + - "Use either a ref-setter function or React.createRef().", + "Use either a ref-setter function or React.createRef().", getComponentNameFromFiber(finishedWork) ); } @@ -21118,7 +21130,7 @@ to return true:wantsResponderID| | throw new Error( "Expected to find a host parent. This error is likely caused by a bug " + - "in React. Please file an issue." + "in React. Please file an issue." ); } @@ -21220,7 +21232,7 @@ to return true:wantsResponderID| | default: throw new Error( "Invalid host parent fiber. This error is likely caused by a bug " + - "in React. Please file an issue." + "in React. Please file an issue." ); } } @@ -21334,7 +21346,7 @@ to return true:wantsResponderID| | if (hostParent === null) { throw new Error( "Expected to find a host parent. This error is likely caused by " + - "a bug in React. Please file an issue." + "a bug in React. Please file an issue." ); } @@ -21587,7 +21599,7 @@ to return true:wantsResponderID| | } } - function commitSuspenseCallback(finishedWork) {} + function commitSuspenseCallback(finishedWork) { } function getRetryCache(finishedWork) { // TODO: Unify the interface for the retry cache so we don't have to switch @@ -21618,9 +21630,9 @@ to return true:wantsResponderID| | default: { throw new Error( "Unexpected Suspense handler tag (" + - finishedWork.tag + - "). This is a " + - "bug in React." + finishedWork.tag + + "). This is a " + + "bug in React." ); } } @@ -21912,7 +21924,7 @@ to return true:wantsResponderID| | if (finishedWork.stateNode === null) { throw new Error( "This should have a text node initialized. This error is likely " + - "caused by a bug in React. Please file an issue." + "caused by a bug in React. Please file an issue." ); } @@ -23198,7 +23210,7 @@ to return true:wantsResponderID| | // TODO: Include link to relevant documentation page. error( "The current testing environment is not configured to support " + - "act(...)" + "act(...)" ); } @@ -23370,8 +23382,8 @@ to return true:wantsResponderID| | return actionScopeLane !== NoLane // We're inside an async action scope. Reuse the same lane. ? actionScopeLane // We may or may not be inside an async action scope. If we are, this : // is the first update in that scope. Either way, we need to get a - // fresh transition lane. - requestTransitionLane(); + // fresh transition lane. + requestTransitionLane(); } // Updates originating inside certain React methods, like flushSync, have // their priority set by tracking it with a context variable. // @@ -23461,7 +23473,10 @@ to return true:wantsResponderID| | } } // Check if the work loop is currently suspended and waiting for data to // finish loading. - + updatedComponentForProfiler = { + name: getComponentNameFromFiber(fiber), + key: fiber.key, + }; if ( // Suspended render phase (root === workInProgressRoot && @@ -24234,16 +24249,16 @@ to return true:wantsResponderID| | thrownValue = getSuspendedThenable(); workInProgressSuspendedReason = shouldRemainOnPreviousScreen() && // Check if there are other pending updates that might possibly unblock this - // component from suspending. This mirrors the check in - // renderDidSuspendDelayIfPossible. We should attempt to unify them somehow. - // TODO: Consider unwinding immediately, using the - // SuspendedOnHydration mechanism. - !includesNonIdleWork(workInProgressRootSkippedLanes) && - !includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes) // Suspend work loop until data resolves + // component from suspending. This mirrors the check in + // renderDidSuspendDelayIfPossible. We should attempt to unify them somehow. + // TODO: Consider unwinding immediately, using the + // SuspendedOnHydration mechanism. + !includesNonIdleWork(workInProgressRootSkippedLanes) && + !includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes) // Suspend work loop until data resolves ? SuspendedOnData // Don't suspend work loop, except to check if the data has : // immediately resolved (i.e. in a microtask). Otherwise, trigger the - // nearest Suspense fallback. - SuspendedOnImmediate; + // nearest Suspense fallback. + SuspendedOnImmediate; } else if (thrownValue === SuspenseyCommitException) { thrownValue = getSuspendedThenable(); workInProgressSuspendedReason = SuspendedOnInstance; @@ -24266,9 +24281,9 @@ to return true:wantsResponderID| | typeof thrownValue.then === "function"; workInProgressSuspendedReason = isWakeable // A wakeable object was thrown by a legacy Suspense implementation. ? // This has slightly different behavior than suspending with `use`. - SuspendedOnDeprecatedThrowPromise // This is a regular error. If something earlier in the component already + SuspendedOnDeprecatedThrowPromise // This is a regular error. If something earlier in the component already : // suspended, we must clear the thenable state to unblock the work loop. - SuspendedOnError; + SuspendedOnError; } workInProgressThrownValue = thrownValue; @@ -24521,7 +24536,7 @@ to return true:wantsResponderID| | // This is a sync render, so we should have finished the whole tree. throw new Error( "Cannot commit an incomplete root. This error is likely caused by a " + - "bug in React. Please file an issue." + "bug in React. Please file an issue." ); } @@ -24708,7 +24723,7 @@ to return true:wantsResponderID| | if (true) { error( "Unexpected type of fiber triggered a suspensey commit. " + - "This is a bug in React." + "This is a bug in React." ); } @@ -25030,7 +25045,7 @@ to return true:wantsResponderID| | // is where we would switch to the unwinding path. error( "Internal React error: Expected this fiber to be complete, but " + - "it isn't. It should have been unwound. This is a bug in React." + "it isn't. It should have been unwound. This is a bug in React." ); } } // The current, flushed, state of this fiber is the alternate. Ideally @@ -25150,7 +25165,9 @@ to return true:wantsResponderID| | // layout phases. Should be able to remove. var previousUpdateLanePriority = getCurrentUpdatePriority(); var prevTransition = ReactCurrentBatchConfig.transition; - + defrost.writeInLogFiles(Date.now() + "", { list: updatedComponents, change: updatedComponentForProfiler }) + updatedComponents = [] + updatedComponentForProfiler = null try { ReactCurrentBatchConfig.transition = null; setCurrentUpdatePriority(DiscreteEventPriority); @@ -25202,7 +25219,7 @@ to return true:wantsResponderID| | if (lanes === NoLanes) { error( "root.finishedLanes should not be empty during a commit. This is a " + - "bug in React." + "bug in React." ); } } @@ -25214,7 +25231,7 @@ to return true:wantsResponderID| | if (finishedWork === root.current) { throw new Error( "Cannot commit the same tree as before. This error is likely caused by " + - "a bug in React. Please file an issue." + "a bug in React. Please file an issue." ); } // commitRoot never returns a continuation; it always finishes synchronously. // So we can clear these now to allow a new callback to be scheduled. @@ -25450,8 +25467,8 @@ to return true:wantsResponderID| | get: function () { error( 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + - " This property is deprecated and will be removed in a future version of React." + - " To access the digest of an Error look for this property on the Error instance itself." + " This property is deprecated and will be removed in a future version of React." + + " To access the digest of an Error look for this property on the Error instance itself." ); return digest; @@ -25658,10 +25675,10 @@ to return true:wantsResponderID| | { error( "Internal React error: Attempted to capture a commit phase error " + - "inside a detached tree. This indicates a bug in React. Potential " + - "causes include deleting the same fiber more than once, committing an " + - "already-finished tree, or an inconsistent return pointer.\n\n" + - "Error message:\n\n%s", + "inside a detached tree. This indicates a bug in React. Potential " + + "causes include deleting the same fiber more than once, committing an " + + "already-finished tree, or an inconsistent return pointer.\n\n" + + "Error message:\n\n%s", error$1 ); } @@ -25817,7 +25834,7 @@ to return true:wantsResponderID| | default: throw new Error( "Pinged unknown suspense boundary type. " + - "This is probably a bug in React." + "This is probably a bug in React." ); } @@ -25837,9 +25854,9 @@ to return true:wantsResponderID| | rootWithPassiveNestedUpdates = null; throw new 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." + "repeatedly calls setState inside componentWillUpdate or " + + "componentDidUpdate. React limits the number of nested updates to " + + "prevent infinite loops." ); } @@ -25850,9 +25867,9 @@ to return true:wantsResponderID| | 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." + "calls setState inside useEffect, but useEffect either doesn't " + + "have a dependency array, or one of the dependencies changes on " + + "every render." ); } } @@ -25978,9 +25995,9 @@ to return true:wantsResponderID| | error( "Can't perform a React state update on a component that hasn't mounted yet. " + - "This indicates that you have a side-effect in your render function that " + - "asynchronously later calls tries to update the component. Move this work to " + - "useEffect instead." + "This indicates that you have a side-effect in your render function that " + + "asynchronously later calls tries to update the component. Move this work to " + + "useEffect instead." ); } finally { if (previousFiber) { @@ -26095,8 +26112,8 @@ to return true:wantsResponderID| | 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://reactjs.org/link/setstate-in-render", + "different component (`%s`). To locate the bad setState() call inside `%s`, " + + "follow the stack trace as described in https://reactjs.org/link/setstate-in-render", setStateComponentName, renderingComponentName, renderingComponentName @@ -26110,8 +26127,8 @@ to return true:wantsResponderID| | if (!didWarnAboutUpdateInRender) { error( "Cannot update during an existing state transition (such as " + - "within `render`). Render methods should be a pure " + - "function of props and state." + "within `render`). Render methods should be a pure " + + "function of props and state." ); didWarnAboutUpdateInRender = true; @@ -26197,15 +26214,15 @@ to return true:wantsResponderID| | error( "An update to %s inside a test was not wrapped in act(...).\n\n" + - "When testing, code that causes React state updates should be " + - "wrapped into act(...):\n\n" + - "act(() => {\n" + - " /* fire events that update state */\n" + - "});\n" + - "/* assert on the output */\n\n" + - "This ensures that you're testing the behavior the user would see " + - "in the browser." + - " Learn more at https://reactjs.org/link/wrap-tests-with-act", + "When testing, code that causes React state updates should be " + + "wrapped into act(...):\n\n" + + "act(() => {\n" + + " /* fire events that update state */\n" + + "});\n" + + "/* assert on the output */\n\n" + + "This ensures that you're testing the behavior the user would see " + + "in the browser." + + " Learn more at https://reactjs.org/link/wrap-tests-with-act", getComponentNameFromFiber(fiber) ); } finally { @@ -26228,16 +26245,16 @@ to return true:wantsResponderID| | ) { error( "A suspended resource finished loading inside a test, but the event " + - "was not wrapped in act(...).\n\n" + - "When testing, code that resolves suspended data should be wrapped " + - "into act(...):\n\n" + - "act(() => {\n" + - " /* finish loading suspended data */\n" + - "});\n" + - "/* assert on the output */\n\n" + - "This ensures that you're testing the behavior the user would see " + - "in the browser." + - " Learn more at https://reactjs.org/link/wrap-tests-with-act" + "was not wrapped in act(...).\n\n" + + "When testing, code that resolves suspended data should be wrapped " + + "into act(...):\n\n" + + "act(() => {\n" + + " /* finish loading suspended data */\n" + + "});\n" + + "/* assert on the output */\n\n" + + "This ensures that you're testing the behavior the user would see " + + "in the browser." + + " Learn more at https://reactjs.org/link/wrap-tests-with-act" ); } } @@ -26897,9 +26914,9 @@ to return true:wantsResponderID| | currentDependencies === null ? null : { - lanes: currentDependencies.lanes, - firstContext: currentDependencies.firstContext - }; // These will be overridden during the parent's reconciliation + lanes: currentDependencies.lanes, + firstContext: currentDependencies.firstContext + }; // These will be overridden during the parent's reconciliation workInProgress.sibling = current.sibling; workInProgress.index = current.index; @@ -26986,9 +27003,9 @@ to return true:wantsResponderID| | currentDependencies === null ? null : { - lanes: currentDependencies.lanes, - firstContext: currentDependencies.firstContext - }; + lanes: currentDependencies.lanes, + firstContext: currentDependencies.firstContext + }; { // Note: We don't reset the actualTime counts. It's useful to accumulate @@ -27164,8 +27181,8 @@ to return true:wantsResponderID| | throw new Error( "Element type is invalid: expected a string (for built-in " + - "components) or a class/function (for composite components) " + - ("but got: " + (type == null ? type : typeof type) + "." + info) + "components) or a class/function (for composite components) " + + ("but got: " + (type == null ? type : typeof type) + "." + info) ); } } @@ -27534,10 +27551,10 @@ to return true:wantsResponderID| | if (fiber.mode & StrictLegacyMode) { error( "%s is deprecated in StrictMode. " + - "%s was passed an instance of %s which is inside StrictMode. " + - "Instead, add a ref directly to the element you want to reference. " + - "Learn more about using refs safely here: " + - "https://reactjs.org/link/strict-mode-find-node", + "%s was passed an instance of %s which is inside StrictMode. " + + "Instead, add a ref directly to the element you want to reference. " + + "Learn more about using refs safely here: " + + "https://reactjs.org/link/strict-mode-find-node", methodName, methodName, componentName @@ -27545,10 +27562,10 @@ to return true:wantsResponderID| | } else { error( "%s is deprecated in StrictMode. " + - "%s was passed an instance of %s which renders StrictMode children. " + - "Instead, add a ref directly to the element you want to reference. " + - "Learn more about using refs safely here: " + - "https://reactjs.org/link/strict-mode-find-node", + "%s was passed an instance of %s which renders StrictMode children. " + + "Instead, add a ref directly to the element you want to reference. " + + "Learn more about using refs safely here: " + + "https://reactjs.org/link/strict-mode-find-node", methodName, methodName, componentName @@ -27618,9 +27635,9 @@ to return true:wantsResponderID| | error( "Render methods should be a pure function of props and state; " + - "triggering nested component updates from render is not allowed. " + - "If necessary, trigger nested updates in componentDidUpdate.\n\n" + - "Check the render method of %s.", + "triggering nested component updates from render is not allowed. " + + "If necessary, trigger nested updates in componentDidUpdate.\n\n" + + "Check the render method of %s.", getComponentNameFromFiber(current) || "Unknown" ); } @@ -27639,7 +27656,7 @@ to return true:wantsResponderID| | if (typeof callback !== "function") { error( "render(...): Expected the last optional `callback` argument to be a " + - "function. Instead received: %s.", + "function. Instead received: %s.", callback ); } @@ -27986,10 +28003,10 @@ to return true:wantsResponderID| | if (!owner.stateNode._warnedAboutRefsInRender) { error( "%s is accessing findNodeHandle inside its render(). " + - "render() should be a pure function of props and state. It should " + - "never access something that requires stale data from the previous " + - "render, such as refs. Move this logic to componentDidMount and " + - "componentDidUpdate instead.", + "render() should be a pure function of props and state. It should " + + "never access something that requires stale data from the previous " + + "render, such as refs. Move this logic to componentDidMount and " + + "componentDidUpdate instead.", getComponentNameFromType(owner.type) || "A component" ); } @@ -28037,10 +28054,10 @@ to return true:wantsResponderID| | if (!owner.stateNode._warnedAboutRefsInRender) { error( "%s is accessing findNodeHandle inside its render(). " + - "render() should be a pure function of props and state. It should " + - "never access something that requires stale data from the previous " + - "render, such as refs. Move this logic to componentDidMount and " + - "componentDidUpdate instead.", + "render() should be a pure function of props and state. It should " + + "never access something that requires stale data from the previous " + + "render, such as refs. Move this logic to componentDidMount and " + + "componentDidUpdate instead.", getComponentNameFromType(owner.type) || "A component" ); } @@ -28111,7 +28128,7 @@ to return true:wantsResponderID| | { error( "dispatchCommand was called with a ref that isn't a " + - "native component. Use React.forwardRef to get access to the underlying native component" + "native component. Use React.forwardRef to get access to the underlying native component" ); } @@ -28140,7 +28157,7 @@ to return true:wantsResponderID| | { error( "sendAccessibilityEvent was called with a ref that isn't a " + - "native component. Use React.forwardRef to get access to the underlying native component" + "native component. Use React.forwardRef to get access to the underlying native component" ); } @@ -28545,7 +28562,7 @@ to return true:wantsResponderID| | if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === - "function" + "function" ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } diff --git a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js index 7f6b01a..ea7b878 100644 --- a/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +++ b/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js @@ -12,7 +12,15 @@ */ "use strict"; + +import defrost from '@d11/de-frost' + require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore"); +var updatedComponents = []; +var updatedComponentForProfiler = null; +function insertUpdateComponents(componentName, flags, key) { + updatedComponents.push({ componentName, flags, key }); +} var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"), React = require("react"), Scheduler = require("scheduler"); @@ -110,8 +118,8 @@ function SyntheticEvent( ((targetInst = dispatchConfig[propName]) ? (this[propName] = targetInst(nativeEvent)) : "target" === propName - ? (this.target = nativeEventTarget) - : (this[propName] = nativeEvent[propName])); + ? (this.target = nativeEventTarget) + : (this[propName] = nativeEvent[propName])); this.isDefaultPrevented = ( null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented @@ -130,7 +138,7 @@ assign(SyntheticEvent.prototype, { (event.preventDefault ? event.preventDefault() : "unknown" !== typeof event.returnValue && (event.returnValue = !1), - (this.isDefaultPrevented = functionThatReturnsTrue)); + (this.isDefaultPrevented = functionThatReturnsTrue)); }, stopPropagation: function () { var event = this.nativeEvent; @@ -138,7 +146,7 @@ assign(SyntheticEvent.prototype, { (event.stopPropagation ? event.stopPropagation() : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = !0), - (this.isPropagationStopped = functionThatReturnsTrue)); + (this.isPropagationStopped = functionThatReturnsTrue)); }, persist: function () { this.isPersistent = functionThatReturnsTrue; @@ -170,7 +178,7 @@ SyntheticEvent.Interface = { isTrusted: null }; SyntheticEvent.extend = function (Interface) { - function E() {} + function E() { } function Class() { return Super.apply(this, arguments); } @@ -256,17 +264,17 @@ function recordTouchStart(touch) { (touchRecord.previousPageY = touch.pageY), (touchRecord.previousTimeStamp = timestampForTouch(touch))) : ((touchRecord = { - touchActive: !0, - startPageX: touch.pageX, - startPageY: touch.pageY, - startTimeStamp: timestampForTouch(touch), - currentPageX: touch.pageX, - currentPageY: touch.pageY, - currentTimeStamp: timestampForTouch(touch), - previousPageX: touch.pageX, - previousPageY: touch.pageY, - previousTimeStamp: timestampForTouch(touch) - }), + touchActive: !0, + startPageX: touch.pageX, + startPageY: touch.pageY, + startTimeStamp: timestampForTouch(touch), + currentPageX: touch.pageX, + currentPageY: touch.pageY, + currentTimeStamp: timestampForTouch(touch), + previousPageX: touch.pageX, + previousPageY: touch.pageY, + previousTimeStamp: timestampForTouch(touch) + }), (touchBank[identifier] = touchRecord)); touchHistory.mostRecentTimeStamp = timestampForTouch(touch); } @@ -274,25 +282,25 @@ function recordTouchMove(touch) { var touchRecord = touchBank[getTouchIdentifier(touch)]; touchRecord && ((touchRecord.touchActive = !0), - (touchRecord.previousPageX = touchRecord.currentPageX), - (touchRecord.previousPageY = touchRecord.currentPageY), - (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp), - (touchRecord.currentPageX = touch.pageX), - (touchRecord.currentPageY = touch.pageY), - (touchRecord.currentTimeStamp = timestampForTouch(touch)), - (touchHistory.mostRecentTimeStamp = timestampForTouch(touch))); + (touchRecord.previousPageX = touchRecord.currentPageX), + (touchRecord.previousPageY = touchRecord.currentPageY), + (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp), + (touchRecord.currentPageX = touch.pageX), + (touchRecord.currentPageY = touch.pageY), + (touchRecord.currentTimeStamp = timestampForTouch(touch)), + (touchHistory.mostRecentTimeStamp = timestampForTouch(touch))); } function recordTouchEnd(touch) { var touchRecord = touchBank[getTouchIdentifier(touch)]; touchRecord && ((touchRecord.touchActive = !1), - (touchRecord.previousPageX = touchRecord.currentPageX), - (touchRecord.previousPageY = touchRecord.currentPageY), - (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp), - (touchRecord.currentPageX = touch.pageX), - (touchRecord.currentPageY = touch.pageY), - (touchRecord.currentTimeStamp = timestampForTouch(touch)), - (touchHistory.mostRecentTimeStamp = timestampForTouch(touch))); + (touchRecord.previousPageX = touchRecord.currentPageX), + (touchRecord.previousPageY = touchRecord.currentPageY), + (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp), + (touchRecord.currentPageX = touch.pageX), + (touchRecord.currentPageY = touch.pageY), + (touchRecord.currentTimeStamp = timestampForTouch(touch)), + (touchHistory.mostRecentTimeStamp = timestampForTouch(touch))); } var instrumentationCallback, ResponderTouchHistoryStore = { @@ -308,16 +316,16 @@ var instrumentationCallback, nativeEvent.changedTouches.forEach(recordTouchStart), (touchHistory.numberActiveTouches = nativeEvent.touches.length), 1 === touchHistory.numberActiveTouches && - (touchHistory.indexOfSingleActiveTouch = - nativeEvent.touches[0].identifier); + (touchHistory.indexOfSingleActiveTouch = + nativeEvent.touches[0].identifier); else if ( "topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType ) if ( (nativeEvent.changedTouches.forEach(recordTouchEnd), - (touchHistory.numberActiveTouches = nativeEvent.touches.length), - 1 === touchHistory.numberActiveTouches) + (touchHistory.numberActiveTouches = nativeEvent.touches.length), + 1 === touchHistory.numberActiveTouches) ) for ( topLevelType = 0; @@ -326,7 +334,7 @@ var instrumentationCallback, ) if ( ((nativeEvent = touchBank[topLevelType]), - null != nativeEvent && nativeEvent.touchActive) + null != nativeEvent && nativeEvent.touchActive) ) { touchHistory.indexOfSingleActiveTouch = topLevelType; break; @@ -342,10 +350,10 @@ function accumulate(current, next) { return null == current ? next : isArrayImpl(current) - ? current.concat(next) - : isArrayImpl(next) - ? [current].concat(next) - : [current, next]; + ? current.concat(next) + : isArrayImpl(next) + ? [current].concat(next) + : [current, next]; } function accumulateInto(current, next) { if (null == next) @@ -437,8 +445,8 @@ function getParent$1(inst) { return inst ? inst : null; } function traverseTwoPhase$1(inst, fn, arg) { - for (var path = []; inst; ) path.push(inst), (inst = getParent$1(inst)); - for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg); + for (var path = []; inst;) path.push(inst), (inst = getParent$1(inst)); + for (inst = path.length; 0 < inst--;) fn(path[inst], "captured", arg); for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg); } function getListener$1(inst, registrationName) { @@ -449,10 +457,10 @@ function getListener$1(inst, registrationName) { if ((inst = inst[registrationName]) && "function" !== typeof inst) throw Error( "Expected `" + - registrationName + - "` listener to be a function, instead got a value of `" + - typeof inst + - "` type." + registrationName + + "` listener to be a function, instead got a value of `" + + typeof inst + + "` type." ); return inst; } @@ -482,10 +490,10 @@ function accumulateDirectDispatchesSingle$1(event) { event._dispatchListeners, listener )), - (event._dispatchInstances = accumulateInto( - event._dispatchInstances, - inst - ))); + (event._dispatchInstances = accumulateInto( + event._dispatchInstances, + inst + ))); } } } @@ -506,123 +514,123 @@ function accumulateTwoPhaseDispatchesSingle$1(event) { ); } var ResponderEventPlugin = { - _getResponder: function () { - return responderInst; - }, - eventTypes: eventTypes, - extractEvents: function ( - topLevelType, - targetInst, - nativeEvent, - nativeEventTarget + _getResponder: function () { + return responderInst; + }, + eventTypes: eventTypes, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ) { + if (isStartish(topLevelType)) trackedTouchCount += 1; + else if ( + "topTouchEnd" === topLevelType || + "topTouchCancel" === topLevelType + ) + if (0 <= trackedTouchCount) --trackedTouchCount; + else return null; + ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent); + if ( + targetInst && + (("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll) || + (0 < trackedTouchCount && "topSelectionChange" === topLevelType) || + isStartish(topLevelType) || + isMoveish(topLevelType)) ) { - if (isStartish(topLevelType)) trackedTouchCount += 1; - else if ( - "topTouchEnd" === topLevelType || - "topTouchCancel" === topLevelType - ) - if (0 <= trackedTouchCount) --trackedTouchCount; - else return null; - ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent); - if ( - targetInst && - (("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll) || - (0 < trackedTouchCount && "topSelectionChange" === topLevelType) || - isStartish(topLevelType) || - isMoveish(topLevelType)) - ) { - var shouldSetEventType = isStartish(topLevelType) - ? eventTypes.startShouldSetResponder - : isMoveish(topLevelType) + var shouldSetEventType = isStartish(topLevelType) + ? eventTypes.startShouldSetResponder + : isMoveish(topLevelType) ? eventTypes.moveShouldSetResponder : "topSelectionChange" === topLevelType - ? eventTypes.selectionChangeShouldSetResponder - : eventTypes.scrollShouldSetResponder; - if (responderInst) - b: { - var JSCompiler_temp = responderInst; - for ( - var depthA = 0, tempA = JSCompiler_temp; - tempA; - tempA = getParent$1(tempA) + ? eventTypes.selectionChangeShouldSetResponder + : eventTypes.scrollShouldSetResponder; + if (responderInst) + b: { + var JSCompiler_temp = responderInst; + for ( + var depthA = 0, tempA = JSCompiler_temp; + tempA; + tempA = getParent$1(tempA) + ) + depthA++; + tempA = 0; + for (var tempB = targetInst; tempB; tempB = getParent$1(tempB)) + tempA++; + for (; 0 < depthA - tempA;) + (JSCompiler_temp = getParent$1(JSCompiler_temp)), depthA--; + for (; 0 < tempA - depthA;) + (targetInst = getParent$1(targetInst)), tempA--; + for (; depthA--;) { + if ( + JSCompiler_temp === targetInst || + JSCompiler_temp === targetInst.alternate ) - depthA++; - tempA = 0; - for (var tempB = targetInst; tempB; tempB = getParent$1(tempB)) - tempA++; - for (; 0 < depthA - tempA; ) - (JSCompiler_temp = getParent$1(JSCompiler_temp)), depthA--; - for (; 0 < tempA - depthA; ) - (targetInst = getParent$1(targetInst)), tempA--; - for (; depthA--; ) { - if ( - JSCompiler_temp === targetInst || - JSCompiler_temp === targetInst.alternate - ) - break b; - JSCompiler_temp = getParent$1(JSCompiler_temp); - targetInst = getParent$1(targetInst); - } - JSCompiler_temp = null; + break b; + JSCompiler_temp = getParent$1(JSCompiler_temp); + targetInst = getParent$1(targetInst); } - else JSCompiler_temp = targetInst; - targetInst = JSCompiler_temp; - JSCompiler_temp = targetInst === responderInst; - shouldSetEventType = ResponderSyntheticEvent.getPooled( + JSCompiler_temp = null; + } + else JSCompiler_temp = targetInst; + targetInst = JSCompiler_temp; + JSCompiler_temp = targetInst === responderInst; + shouldSetEventType = ResponderSyntheticEvent.getPooled( + shouldSetEventType, + targetInst, + nativeEvent, + nativeEventTarget + ); + shouldSetEventType.touchHistory = + ResponderTouchHistoryStore.touchHistory; + JSCompiler_temp + ? forEachAccumulated( shouldSetEventType, - targetInst, - nativeEvent, - nativeEventTarget + accumulateTwoPhaseDispatchesSingleSkipTarget + ) + : forEachAccumulated( + shouldSetEventType, + accumulateTwoPhaseDispatchesSingle$1 ); - shouldSetEventType.touchHistory = - ResponderTouchHistoryStore.touchHistory; - JSCompiler_temp - ? forEachAccumulated( - shouldSetEventType, - accumulateTwoPhaseDispatchesSingleSkipTarget - ) - : forEachAccumulated( - shouldSetEventType, - accumulateTwoPhaseDispatchesSingle$1 - ); - b: { - JSCompiler_temp = shouldSetEventType._dispatchListeners; - targetInst = shouldSetEventType._dispatchInstances; - if (isArrayImpl(JSCompiler_temp)) - for ( - depthA = 0; - depthA < JSCompiler_temp.length && - !shouldSetEventType.isPropagationStopped(); - depthA++ + b: { + JSCompiler_temp = shouldSetEventType._dispatchListeners; + targetInst = shouldSetEventType._dispatchInstances; + if (isArrayImpl(JSCompiler_temp)) + for ( + depthA = 0; + depthA < JSCompiler_temp.length && + !shouldSetEventType.isPropagationStopped(); + depthA++ + ) { + if ( + JSCompiler_temp[depthA](shouldSetEventType, targetInst[depthA]) ) { - if ( - JSCompiler_temp[depthA](shouldSetEventType, targetInst[depthA]) - ) { - JSCompiler_temp = targetInst[depthA]; - break b; - } + JSCompiler_temp = targetInst[depthA]; + break b; } - else if ( - JSCompiler_temp && - JSCompiler_temp(shouldSetEventType, targetInst) - ) { - JSCompiler_temp = targetInst; - break b; } - JSCompiler_temp = null; + else if ( + JSCompiler_temp && + JSCompiler_temp(shouldSetEventType, targetInst) + ) { + JSCompiler_temp = targetInst; + break b; } - shouldSetEventType._dispatchInstances = null; - shouldSetEventType._dispatchListeners = null; - shouldSetEventType.isPersistent() || - shouldSetEventType.constructor.release(shouldSetEventType); - if (JSCompiler_temp && JSCompiler_temp !== responderInst) - if ( - ((shouldSetEventType = ResponderSyntheticEvent.getPooled( - eventTypes.responderGrant, - JSCompiler_temp, - nativeEvent, - nativeEventTarget - )), + JSCompiler_temp = null; + } + shouldSetEventType._dispatchInstances = null; + shouldSetEventType._dispatchListeners = null; + shouldSetEventType.isPersistent() || + shouldSetEventType.constructor.release(shouldSetEventType); + if (JSCompiler_temp && JSCompiler_temp !== responderInst) + if ( + ((shouldSetEventType = ResponderSyntheticEvent.getPooled( + eventTypes.responderGrant, + JSCompiler_temp, + nativeEvent, + nativeEventTarget + )), (shouldSetEventType.touchHistory = ResponderTouchHistoryStore.touchHistory), forEachAccumulated( @@ -631,159 +639,159 @@ var ResponderEventPlugin = { ), (targetInst = !0 === executeDirectDispatch(shouldSetEventType)), responderInst) - ) - if ( - ((depthA = ResponderSyntheticEvent.getPooled( - eventTypes.responderTerminationRequest, - responderInst, - nativeEvent, - nativeEventTarget - )), + ) + if ( + ((depthA = ResponderSyntheticEvent.getPooled( + eventTypes.responderTerminationRequest, + responderInst, + nativeEvent, + nativeEventTarget + )), (depthA.touchHistory = ResponderTouchHistoryStore.touchHistory), forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1), (tempA = !depthA._dispatchListeners || executeDirectDispatch(depthA)), depthA.isPersistent() || depthA.constructor.release(depthA), tempA) - ) { - depthA = ResponderSyntheticEvent.getPooled( - eventTypes.responderTerminate, - responderInst, - nativeEvent, - nativeEventTarget - ); - depthA.touchHistory = ResponderTouchHistoryStore.touchHistory; - forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1); - var JSCompiler_temp$jscomp$0 = accumulate( - JSCompiler_temp$jscomp$0, - [shouldSetEventType, depthA] - ); - changeResponder(JSCompiler_temp, targetInst); - } else - (shouldSetEventType = ResponderSyntheticEvent.getPooled( - eventTypes.responderReject, - JSCompiler_temp, - nativeEvent, - nativeEventTarget - )), - (shouldSetEventType.touchHistory = - ResponderTouchHistoryStore.touchHistory), - forEachAccumulated( - shouldSetEventType, - accumulateDirectDispatchesSingle$1 - ), - (JSCompiler_temp$jscomp$0 = accumulate( - JSCompiler_temp$jscomp$0, - shouldSetEventType - )); - else - (JSCompiler_temp$jscomp$0 = accumulate( + ) { + depthA = ResponderSyntheticEvent.getPooled( + eventTypes.responderTerminate, + responderInst, + nativeEvent, + nativeEventTarget + ); + depthA.touchHistory = ResponderTouchHistoryStore.touchHistory; + forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1); + var JSCompiler_temp$jscomp$0 = accumulate( JSCompiler_temp$jscomp$0, - shouldSetEventType + [shouldSetEventType, depthA] + ); + changeResponder(JSCompiler_temp, targetInst); + } else + (shouldSetEventType = ResponderSyntheticEvent.getPooled( + eventTypes.responderReject, + JSCompiler_temp, + nativeEvent, + nativeEventTarget )), - changeResponder(JSCompiler_temp, targetInst); - else JSCompiler_temp$jscomp$0 = null; - } else JSCompiler_temp$jscomp$0 = null; - shouldSetEventType = responderInst && isStartish(topLevelType); - JSCompiler_temp = responderInst && isMoveish(topLevelType); - targetInst = - responderInst && - ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType); - if ( - (shouldSetEventType = shouldSetEventType - ? eventTypes.responderStart - : JSCompiler_temp - ? eventTypes.responderMove - : targetInst - ? eventTypes.responderEnd - : null) - ) - (shouldSetEventType = ResponderSyntheticEvent.getPooled( - shouldSetEventType, - responderInst, - nativeEvent, - nativeEventTarget - )), - (shouldSetEventType.touchHistory = - ResponderTouchHistoryStore.touchHistory), - forEachAccumulated( - shouldSetEventType, - accumulateDirectDispatchesSingle$1 - ), + (shouldSetEventType.touchHistory = + ResponderTouchHistoryStore.touchHistory), + forEachAccumulated( + shouldSetEventType, + accumulateDirectDispatchesSingle$1 + ), + (JSCompiler_temp$jscomp$0 = accumulate( + JSCompiler_temp$jscomp$0, + shouldSetEventType + )); + else (JSCompiler_temp$jscomp$0 = accumulate( JSCompiler_temp$jscomp$0, shouldSetEventType - )); - shouldSetEventType = responderInst && "topTouchCancel" === topLevelType; - if ( - (topLevelType = - responderInst && - !shouldSetEventType && - ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType)) - ) - a: { - if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length) - for ( - JSCompiler_temp = 0; - JSCompiler_temp < topLevelType.length; - JSCompiler_temp++ - ) - if ( - ((targetInst = topLevelType[JSCompiler_temp].target), + )), + changeResponder(JSCompiler_temp, targetInst); + else JSCompiler_temp$jscomp$0 = null; + } else JSCompiler_temp$jscomp$0 = null; + shouldSetEventType = responderInst && isStartish(topLevelType); + JSCompiler_temp = responderInst && isMoveish(topLevelType); + targetInst = + responderInst && + ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType); + if ( + (shouldSetEventType = shouldSetEventType + ? eventTypes.responderStart + : JSCompiler_temp + ? eventTypes.responderMove + : targetInst + ? eventTypes.responderEnd + : null) + ) + (shouldSetEventType = ResponderSyntheticEvent.getPooled( + shouldSetEventType, + responderInst, + nativeEvent, + nativeEventTarget + )), + (shouldSetEventType.touchHistory = + ResponderTouchHistoryStore.touchHistory), + forEachAccumulated( + shouldSetEventType, + accumulateDirectDispatchesSingle$1 + ), + (JSCompiler_temp$jscomp$0 = accumulate( + JSCompiler_temp$jscomp$0, + shouldSetEventType + )); + shouldSetEventType = responderInst && "topTouchCancel" === topLevelType; + if ( + (topLevelType = + responderInst && + !shouldSetEventType && + ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType)) + ) + a: { + if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length) + for ( + JSCompiler_temp = 0; + JSCompiler_temp < topLevelType.length; + JSCompiler_temp++ + ) + if ( + ((targetInst = topLevelType[JSCompiler_temp].target), null !== targetInst && - void 0 !== targetInst && - 0 !== targetInst) - ) { - depthA = getInstanceFromNode(targetInst); - b: { - for (targetInst = responderInst; depthA; ) { - if ( - targetInst === depthA || - targetInst === depthA.alternate - ) { - targetInst = !0; - break b; - } - depthA = getParent$1(depthA); + void 0 !== targetInst && + 0 !== targetInst) + ) { + depthA = getInstanceFromNode(targetInst); + b: { + for (targetInst = responderInst; depthA;) { + if ( + targetInst === depthA || + targetInst === depthA.alternate + ) { + targetInst = !0; + break b; } - targetInst = !1; - } - if (targetInst) { - topLevelType = !1; - break a; + depthA = getParent$1(depthA); } + targetInst = !1; } - topLevelType = !0; - } - if ( - (topLevelType = shouldSetEventType - ? eventTypes.responderTerminate - : topLevelType + if (targetInst) { + topLevelType = !1; + break a; + } + } + topLevelType = !0; + } + if ( + (topLevelType = shouldSetEventType + ? eventTypes.responderTerminate + : topLevelType ? eventTypes.responderRelease : null) - ) - (nativeEvent = ResponderSyntheticEvent.getPooled( - topLevelType, - responderInst, - nativeEvent, - nativeEventTarget + ) + (nativeEvent = ResponderSyntheticEvent.getPooled( + topLevelType, + responderInst, + nativeEvent, + nativeEventTarget + )), + (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory), + forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle$1), + (JSCompiler_temp$jscomp$0 = accumulate( + JSCompiler_temp$jscomp$0, + nativeEvent )), - (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory), - forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle$1), - (JSCompiler_temp$jscomp$0 = accumulate( - JSCompiler_temp$jscomp$0, - nativeEvent - )), - changeResponder(null); - return JSCompiler_temp$jscomp$0; - }, - GlobalResponderHandler: null, - injection: { - injectGlobalResponderHandler: function (GlobalResponderHandler) { - ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler; - } - } + changeResponder(null); + return JSCompiler_temp$jscomp$0; }, + GlobalResponderHandler: null, + injection: { + injectGlobalResponderHandler: function (GlobalResponderHandler) { + ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler; + } + } +}, eventPluginOrder = null, namesToPlugins = {}; function recomputePluginOrdering() { @@ -794,13 +802,13 @@ function recomputePluginOrdering() { if (-1 >= pluginIndex) throw Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + - (pluginName + "`.") + (pluginName + "`.") ); if (!plugins[pluginIndex]) { if (!pluginModule.extractEvents) throw Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + - (pluginName + "` does not.") + (pluginName + "` does not.") ); plugins[pluginIndex] = pluginModule; pluginIndex = pluginModule.eventTypes; @@ -810,7 +818,7 @@ function recomputePluginOrdering() { if (eventNameDispatchConfigs.hasOwnProperty(eventName)) throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" + - (eventName + "`.") + (eventName + "`.") ); eventNameDispatchConfigs[eventName] = dispatchConfig; var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; @@ -827,18 +835,18 @@ function recomputePluginOrdering() { } else dispatchConfig.registrationName ? (publishRegistrationName( - dispatchConfig.registrationName, - pluginModule - ), + dispatchConfig.registrationName, + pluginModule + ), (JSCompiler_inline_result = !0)) : (JSCompiler_inline_result = !1); if (!JSCompiler_inline_result) throw Error( "EventPluginRegistry: Failed to publish event `" + - eventName + - "` for plugin `" + - pluginName + - "`." + eventName + + "` for plugin `" + + pluginName + + "`." ); } } @@ -848,7 +856,7 @@ function publishRegistrationName(registrationName, pluginModule) { if (registrationNameModules[registrationName]) throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" + - (registrationName + "`.") + (registrationName + "`.") ); registrationNameModules[registrationName] = pluginModule; } @@ -863,16 +871,16 @@ function getListener(inst, registrationName) { if ((inst = inst[registrationName]) && "function" !== typeof inst) throw Error( "Expected `" + - registrationName + - "` listener to be a function, instead got a value of `" + - typeof inst + - "` type." + registrationName + + "` listener to be a function, instead got a value of `" + + typeof inst + + "` type." ); return inst; } var customBubblingEventTypes = - ReactNativePrivateInterface.ReactNativeViewConfigRegistry - .customBubblingEventTypes, + ReactNativePrivateInterface.ReactNativeViewConfigRegistry + .customBubblingEventTypes, customDirectEventTypes = ReactNativePrivateInterface.ReactNativeViewConfigRegistry .customDirectEventTypes; @@ -893,13 +901,13 @@ function accumulateDirectionalDispatches(inst, phase, event) { )); } function traverseTwoPhase(inst, fn, arg, skipBubbling) { - for (var path = []; inst; ) { + for (var path = []; inst;) { path.push(inst); do inst = inst.return; while (inst && 5 !== inst.tag); inst = inst ? inst : null; } - for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg); + for (inst = path.length; 0 < inst--;) fn(path[inst], "captured", arg); if (skipBubbling) fn(path[0], "bubbled", arg); else for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg); @@ -924,10 +932,10 @@ function accumulateDirectDispatchesSingle(event) { event._dispatchListeners, listener )), - (event._dispatchInstances = accumulateInto( - event._dispatchInstances, - inst - ))); + (event._dispatchInstances = accumulateInto( + event._dispatchInstances, + inst + ))); } } } @@ -941,51 +949,51 @@ eventPluginOrder = Array.prototype.slice.call([ ]); recomputePluginOrdering(); var injectedNamesToPlugins$jscomp$inline_238 = { - ResponderEventPlugin: ResponderEventPlugin, - ReactNativeBridgeEventPlugin: { - eventTypes: {}, - extractEvents: function ( - topLevelType, + ResponderEventPlugin: ResponderEventPlugin, + ReactNativeBridgeEventPlugin: { + eventTypes: {}, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ) { + if (null == targetInst) return null; + var bubbleDispatchConfig = customBubblingEventTypes[topLevelType], + directDispatchConfig = customDirectEventTypes[topLevelType]; + if (!bubbleDispatchConfig && !directDispatchConfig) + throw Error( + 'Unsupported top level event type "' + topLevelType + '" dispatched' + ); + topLevelType = SyntheticEvent.getPooled( + bubbleDispatchConfig || directDispatchConfig, targetInst, nativeEvent, nativeEventTarget - ) { - if (null == targetInst) return null; - var bubbleDispatchConfig = customBubblingEventTypes[topLevelType], - directDispatchConfig = customDirectEventTypes[topLevelType]; - if (!bubbleDispatchConfig && !directDispatchConfig) - throw Error( - 'Unsupported top level event type "' + topLevelType + '" dispatched' - ); - topLevelType = SyntheticEvent.getPooled( - bubbleDispatchConfig || directDispatchConfig, - targetInst, - nativeEvent, - nativeEventTarget - ); - if (bubbleDispatchConfig) - null != topLevelType && + ); + if (bubbleDispatchConfig) + null != topLevelType && null != topLevelType.dispatchConfig.phasedRegistrationNames && topLevelType.dispatchConfig.phasedRegistrationNames.skipBubbling - ? topLevelType && - topLevelType.dispatchConfig.phasedRegistrationNames && - traverseTwoPhase( - topLevelType._targetInst, - accumulateDirectionalDispatches, - topLevelType, - !0 - ) - : forEachAccumulated( - topLevelType, - accumulateTwoPhaseDispatchesSingle - ); - else if (directDispatchConfig) - forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle); - else return null; - return topLevelType; - } + ? topLevelType && + topLevelType.dispatchConfig.phasedRegistrationNames && + traverseTwoPhase( + topLevelType._targetInst, + accumulateDirectionalDispatches, + topLevelType, + !0 + ) + : forEachAccumulated( + topLevelType, + accumulateTwoPhaseDispatchesSingle + ); + else if (directDispatchConfig) + forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle); + else return null; + return topLevelType; } - }, + } +}, isOrderingDirty$jscomp$inline_239 = !1, pluginName$jscomp$inline_240; for (pluginName$jscomp$inline_240 in injectedNamesToPlugins$jscomp$inline_238) @@ -999,12 +1007,12 @@ for (pluginName$jscomp$inline_240 in injectedNamesToPlugins$jscomp$inline_238) if ( !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_240) || namesToPlugins[pluginName$jscomp$inline_240] !== - pluginModule$jscomp$inline_241 + pluginModule$jscomp$inline_241 ) { if (namesToPlugins[pluginName$jscomp$inline_240]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_240 + "`.") + (pluginName$jscomp$inline_240 + "`.") ); namesToPlugins[pluginName$jscomp$inline_240] = pluginModule$jscomp$inline_241; @@ -1090,9 +1098,9 @@ function _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam) { if (hasRethrowError) throw ( ((JSCompiler_inline_result = rethrowError), - (hasRethrowError = !1), - (rethrowError = null), - JSCompiler_inline_result) + (hasRethrowError = !1), + (rethrowError = null), + JSCompiler_inline_result) ); } }); @@ -1151,14 +1159,14 @@ ResponderEventPlugin.injection.injectGlobalResponderHandler({ onChange: function (from, to, blockNativeResponder) { null !== to ? ReactNativePrivateInterface.UIManager.setJSResponder( - to.stateNode._nativeTag, - blockNativeResponder - ) + to.stateNode._nativeTag, + blockNativeResponder + ) : ReactNativePrivateInterface.UIManager.clearJSResponder(); } }); var ReactSharedInternals = - React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -1218,7 +1226,7 @@ function getComponentNameFromType(type) { type = type.displayName; type || ((type = innerType.displayName || innerType.name || ""), - (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); return type; case REACT_MEMO_TYPE: return ( @@ -1232,7 +1240,7 @@ function getComponentNameFromType(type) { type = type._init; try { return getComponentNameFromType(type(innerType)); - } catch (x) {} + } catch (x) { } } return null; } @@ -1252,7 +1260,7 @@ function getComponentNameFromFiber(fiber) { (fiber = type.render), (fiber = fiber.displayName || fiber.name || ""), type.displayName || - ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef") + ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef") ); case 7: return "Fragment"; @@ -1297,7 +1305,7 @@ function getComponentNameFromFiber(fiber) { function getNearestMountedFiber(fiber) { var node = fiber, nearestMounted = fiber; - if (fiber.alternate) for (; node.return; ) node = node.return; + if (fiber.alternate) for (; node.return;) node = node.return; else { fiber = node; do @@ -1320,7 +1328,7 @@ function findCurrentFiberUsingSlowPath(fiber) { throw Error("Unable to find node on an unmounted component."); return alternate !== fiber ? null : fiber; } - for (var a = fiber, b = alternate; ; ) { + for (var a = fiber, b = alternate; ;) { var parentA = a.return; if (null === parentA) break; var parentB = parentA.alternate; @@ -1333,7 +1341,7 @@ function findCurrentFiberUsingSlowPath(fiber) { break; } if (parentA.child === parentB.child) { - for (parentB = parentA.child; parentB; ) { + for (parentB = parentA.child; parentB;) { if (parentB === a) return assertIsMounted(parentA), fiber; if (parentB === b) return assertIsMounted(parentA), alternate; parentB = parentB.sibling; @@ -1342,7 +1350,7 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$1 = parentA.child; child$1; ) { + for (var didFindChild = !1, child$1 = parentA.child; child$1;) { if (child$1 === a) { didFindChild = !0; a = parentA; @@ -1358,7 +1366,7 @@ function findCurrentFiberUsingSlowPath(fiber) { child$1 = child$1.sibling; } if (!didFindChild) { - for (child$1 = parentB.child; child$1; ) { + for (child$1 = parentB.child; child$1;) { if (child$1 === a) { didFindChild = !0; a = parentB; @@ -1395,7 +1403,7 @@ function findCurrentHostFiber(parent) { function findCurrentHostFiberImpl(node) { var tag = node.tag; if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node; - for (node = node.child; null !== node; ) { + for (node = node.child; null !== node;) { tag = findCurrentHostFiberImpl(node); if (null !== tag) return tag; node = node.sibling; @@ -1410,10 +1418,10 @@ function defaultDiffer(prevProp, nextProp) { return "object" !== typeof nextProp || null === nextProp ? !0 : ReactNativePrivateInterface.deepDiffer( - prevProp, - nextProp, - deepDifferOptions - ); + prevProp, + nextProp, + deepDifferOptions + ); } function restoreDeletedValuesInNestedArray( updatePayload, @@ -1421,7 +1429,7 @@ function restoreDeletedValuesInNestedArray( validAttributes ) { if (isArrayImpl(node)) - for (var i = node.length; i-- && 0 < removedKeyCount; ) + for (var i = node.length; i-- && 0 < removedKeyCount;) restoreDeletedValuesInNestedArray( updatePayload, node[i], @@ -1464,13 +1472,13 @@ function diffNestedProperty( return nextProp ? addNestedProperty(updatePayload, nextProp, validAttributes) : prevProp - ? clearNestedProperty(updatePayload, prevProp, validAttributes) - : updatePayload; + ? clearNestedProperty(updatePayload, prevProp, validAttributes) + : updatePayload; if (!isArrayImpl(prevProp) && !isArrayImpl(nextProp)) return diffProperties(updatePayload, prevProp, nextProp, validAttributes); if (isArrayImpl(prevProp) && isArrayImpl(nextProp)) { var minLength = - prevProp.length < nextProp.length ? prevProp.length : nextProp.length, + prevProp.length < nextProp.length ? prevProp.length : nextProp.length, i; for (i = 0; i < minLength; i++) updatePayload = diffNestedProperty( @@ -1495,17 +1503,17 @@ function diffNestedProperty( } return isArrayImpl(prevProp) ? diffProperties( - updatePayload, - ReactNativePrivateInterface.flattenStyle(prevProp), - nextProp, - validAttributes - ) + updatePayload, + ReactNativePrivateInterface.flattenStyle(prevProp), + nextProp, + validAttributes + ) : diffProperties( - updatePayload, - prevProp, - ReactNativePrivateInterface.flattenStyle(nextProp), - validAttributes - ); + updatePayload, + prevProp, + ReactNativePrivateInterface.flattenStyle(nextProp), + validAttributes + ); } function addNestedProperty(updatePayload, nextProp, validAttributes) { if (!nextProp) return updatePayload; @@ -1551,7 +1559,7 @@ function diffProperties(updatePayload, prevProps, nextProps, validAttributes) { ((nextProp = !0), "function" === typeof prevProp && (prevProp = !0)); "undefined" === typeof nextProp && ((nextProp = null), - "undefined" === typeof prevProp && (prevProp = null)); + "undefined" === typeof prevProp && (prevProp = null)); removedKeys && (removedKeys[propKey] = !1); if (updatePayload && void 0 !== updatePayload[propKey]) if ("object" !== typeof attributeConfig) @@ -1597,12 +1605,12 @@ function diffProperties(updatePayload, prevProps, nextProps, validAttributes) { attributeConfig )), 0 < removedKeyCount && - updatePayload && - (restoreDeletedValuesInNestedArray( - updatePayload, - nextProp, - attributeConfig - ), + updatePayload && + (restoreDeletedValuesInNestedArray( + updatePayload, + nextProp, + attributeConfig + ), (removedKeys = null)); } for (var propKey$3 in prevProps) @@ -1610,19 +1618,19 @@ function diffProperties(updatePayload, prevProps, nextProps, validAttributes) { (!(attributeConfig = validAttributes[propKey$3]) || (updatePayload && void 0 !== updatePayload[propKey$3]) || ((prevProp = prevProps[propKey$3]), - void 0 !== prevProp && + void 0 !== prevProp && ("object" !== typeof attributeConfig || - "function" === typeof attributeConfig.diff || - "function" === typeof attributeConfig.process + "function" === typeof attributeConfig.diff || + "function" === typeof attributeConfig.process ? (((updatePayload || (updatePayload = {}))[propKey$3] = null), removedKeys || (removedKeys = {}), removedKeys[propKey$3] || - ((removedKeys[propKey$3] = !0), removedKeyCount++)) + ((removedKeys[propKey$3] = !0), removedKeyCount++)) : (updatePayload = clearNestedProperty( - updatePayload, - prevProp, - attributeConfig - ))))); + updatePayload, + prevProp, + attributeConfig + ))))); return updatePayload; } function mountSafeCallback_NOT_REALLY_SAFE(context, callback) { @@ -1635,61 +1643,61 @@ function mountSafeCallback_NOT_REALLY_SAFE(context, callback) { }; } var ReactNativeFiberHostComponent = (function () { - function ReactNativeFiberHostComponent(tag, viewConfig) { - this.viewConfig = this._internalFiberInstanceHandleDEV = void 0; - this._nativeTag = tag; - this._children = []; - this.viewConfig = viewConfig; - } - var _proto = ReactNativeFiberHostComponent.prototype; - _proto.blur = function () { - ReactNativePrivateInterface.TextInputState.blurTextInput(this); - }; - _proto.focus = function () { - ReactNativePrivateInterface.TextInputState.focusTextInput(this); - }; - _proto.measure = function (callback) { - ReactNativePrivateInterface.UIManager.measure( + function ReactNativeFiberHostComponent(tag, viewConfig) { + this.viewConfig = this._internalFiberInstanceHandleDEV = void 0; + this._nativeTag = tag; + this._children = []; + this.viewConfig = viewConfig; + } + var _proto = ReactNativeFiberHostComponent.prototype; + _proto.blur = function () { + ReactNativePrivateInterface.TextInputState.blurTextInput(this); + }; + _proto.focus = function () { + ReactNativePrivateInterface.TextInputState.focusTextInput(this); + }; + _proto.measure = function (callback) { + ReactNativePrivateInterface.UIManager.measure( + this._nativeTag, + mountSafeCallback_NOT_REALLY_SAFE(this, callback) + ); + }; + _proto.measureInWindow = function (callback) { + ReactNativePrivateInterface.UIManager.measureInWindow( + this._nativeTag, + mountSafeCallback_NOT_REALLY_SAFE(this, callback) + ); + }; + _proto.measureLayout = function (relativeToNativeNode, onSuccess, onFail) { + if ("number" === typeof relativeToNativeNode) + var relativeNode = relativeToNativeNode; + else + relativeToNativeNode._nativeTag && + (relativeNode = relativeToNativeNode._nativeTag); + null != relativeNode && + ReactNativePrivateInterface.UIManager.measureLayout( this._nativeTag, - mountSafeCallback_NOT_REALLY_SAFE(this, callback) + relativeNode, + mountSafeCallback_NOT_REALLY_SAFE(this, onFail), + mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess) ); - }; - _proto.measureInWindow = function (callback) { - ReactNativePrivateInterface.UIManager.measureInWindow( + }; + _proto.setNativeProps = function (nativeProps) { + nativeProps = diffProperties( + null, + emptyObject, + nativeProps, + this.viewConfig.validAttributes + ); + null != nativeProps && + ReactNativePrivateInterface.UIManager.updateView( this._nativeTag, - mountSafeCallback_NOT_REALLY_SAFE(this, callback) - ); - }; - _proto.measureLayout = function (relativeToNativeNode, onSuccess, onFail) { - if ("number" === typeof relativeToNativeNode) - var relativeNode = relativeToNativeNode; - else - relativeToNativeNode._nativeTag && - (relativeNode = relativeToNativeNode._nativeTag); - null != relativeNode && - ReactNativePrivateInterface.UIManager.measureLayout( - this._nativeTag, - relativeNode, - mountSafeCallback_NOT_REALLY_SAFE(this, onFail), - mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess) - ); - }; - _proto.setNativeProps = function (nativeProps) { - nativeProps = diffProperties( - null, - emptyObject, - nativeProps, - this.viewConfig.validAttributes + this.viewConfig.uiViewClassName, + nativeProps ); - null != nativeProps && - ReactNativePrivateInterface.UIManager.updateView( - this._nativeTag, - this.viewConfig.uiViewClassName, - nativeProps - ); - }; - return ReactNativeFiberHostComponent; - })(), + }; + return ReactNativeFiberHostComponent; +})(), scheduleCallback$2 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, @@ -1710,7 +1718,7 @@ function onCommitRoot(root) { void 0, 128 === (root.current.flags & 128) ); - } catch (err) {} + } catch (err) { } } var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, @@ -1797,11 +1805,11 @@ function getNextLanes(root, wipLanes) { wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (root = wipLanes & -wipLanes), - suspendedLanes >= root || + (root = wipLanes & -wipLanes), + suspendedLanes >= root || (32 === suspendedLanes && 0 !== (root & 4194176))) - ? wipLanes - : nextLanes; + ? wipLanes + : nextLanes; } function computeExpirationTime(lane, currentTime) { switch (lane) { @@ -1882,7 +1890,7 @@ function markRootFinished(root, remainingLanes, spawnedLane) { remainingLanes = root.entanglements; for ( var expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; + hiddenUpdates = root.hiddenUpdates; 0 < noLongerPendingLanes; ) { @@ -1916,7 +1924,7 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { } function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); - for (root = root.entanglements; rootEntangledLanes; ) { + for (root = root.entanglements; rootEntangledLanes;) { var index$8 = 31 - clz32(rootEntangledLanes), lane = 1 << index$8; (lane & entangledLanes) | (root[index$8] & entangledLanes) && @@ -1941,7 +1949,7 @@ function shim$1() { ); } var getViewConfigForType = - ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get, + ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get, nextReactTag = 3; function allocateTag() { var tag = nextReactTag; @@ -2020,9 +2028,9 @@ function getMaskedContext(workInProgress, unmaskedContext) { for (key in contextTypes) context[key] = unmaskedContext[key]; instance && ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); + (workInProgress.__reactInternalMemoizedUnmaskedChildContext = + unmaskedContext), + (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); return context; } function isContextProvider(type) { @@ -2050,9 +2058,9 @@ function processChildContext(fiber, type, parentContext) { if (!(contextKey in type)) throw Error( (getComponentNameFromFiber(fiber) || "Unknown") + - '.getChildContext(): key "' + - contextKey + - '" is not defined in childContextTypes.' + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.' ); return assign({}, parentContext, instance); } @@ -2074,10 +2082,10 @@ function invalidateContextProvider(workInProgress, type, didChange) { ); didChange ? ((workInProgress = processChildContext( - workInProgress, - type, - previousContext - )), + workInProgress, + type, + previousContext + )), (instance.__reactInternalMemoizedMergedChildContext = workInProgress), pop(didPerformWorkStackCursor), pop(contextStackCursor$1), @@ -2119,7 +2127,7 @@ function pushHostContext(fiber) { : context; context !== JSCompiler_inline_result && (push(contextFiberStackCursor, fiber), - push(contextStackCursor, JSCompiler_inline_result)); + push(contextStackCursor, JSCompiler_inline_result)); } function popHostContext(fiber) { contextFiberStackCursor.current === fiber && @@ -2132,7 +2140,7 @@ var hydrationErrors = null, function finishQueueingConcurrentUpdates() { for ( var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); i < endIndex; ) { @@ -2172,12 +2180,12 @@ function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { sourceFiber.lanes |= lane; var alternate = sourceFiber.alternate; null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + for (var isHidden = !1, parent = sourceFiber.return; null !== parent;) (parent.childLanes |= lane), (alternate = parent.alternate), null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && - ((sourceFiber = parent.stateNode), + ((sourceFiber = parent.stateNode), null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), (sourceFiber = parent), (parent = parent.return); @@ -2185,24 +2193,24 @@ function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { null !== update && 3 === sourceFiber.tag && ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } function getRootForUpdatedFiber(sourceFiber) { if (50 < nestedUpdateCount) throw ( ((nestedUpdateCount = 0), - (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." - )) + (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." + )) ); - for (var parent = sourceFiber.return; null !== parent; ) + for (var parent = sourceFiber.return; null !== parent;) (sourceFiber = parent), (parent = sourceFiber.return); return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; } @@ -2221,7 +2229,7 @@ function ensureRootIsScheduled(root) { mightHavePendingSyncWork = !0; didScheduleMicrotask || ((didScheduleMicrotask = !0), - scheduleCallback$2(ImmediatePriority, processRootScheduleInMicrotask)); + scheduleCallback$2(ImmediatePriority, processRootScheduleInMicrotask)); scheduleTaskForRootDuringMicrotask(root, now()); } function flushSyncWorkAcrossRoots_impl(onlyLegacy) { @@ -2230,7 +2238,7 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root = firstScheduledRoot; null !== root; ) { + for (var root = firstScheduledRoot; null !== root;) { if (!onlyLegacy || 0 === root.tag) { var workInProgressRootRenderLanes$11 = workInProgressRootRenderLanes, nextLanes = getNextLanes( @@ -2259,32 +2267,32 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$11, - originallyAttemptedLanes, - errorRetryLanes - ))); + (exitStatus = recoverFromConcurrentError( + workInProgressRootRenderLanes$11, + originallyAttemptedLanes, + errorRetryLanes + ))); } if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$11, 0), - markRootSuspended( - workInProgressRootRenderLanes$11, - nextLanes, - 0 - ), - ensureRootIsScheduled(workInProgressRootRenderLanes$11), - originallyAttemptedLanes) + prepareFreshStack(workInProgressRootRenderLanes$11, 0), + markRootSuspended( + workInProgressRootRenderLanes$11, + nextLanes, + 0 + ), + ensureRootIsScheduled(workInProgressRootRenderLanes$11), + originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$11, - nextLanes, - workInProgressDeferredLane - ) + workInProgressRootRenderLanes$11, + nextLanes, + workInProgressDeferredLane + ) : ((workInProgressRootRenderLanes$11.finishedWork = - workInProgressRootRenderLanes$11.current.alternate), + workInProgressRootRenderLanes$11.current.alternate), (workInProgressRootRenderLanes$11.finishedLanes = nextLanes), commitRoot( @@ -2341,9 +2349,9 @@ function processRootScheduleInMicrotask() { function scheduleTaskForRootDuringMicrotask(root, currentTime) { for ( var suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - expirationTimes = root.expirationTimes, - lanes = root.pendingLanes & -62914561; + pingedLanes = root.pingedLanes, + expirationTimes = root.expirationTimes, + lanes = root.pendingLanes & -62914561; 0 < lanes; ) { @@ -2370,16 +2378,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { ) return ( null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), + null !== pingedLanes && + cancelCallback$1(pingedLanes), (root.callbackNode = null), (root.callbackPriority = 0) ); if (0 !== (suspendedLanes & 3)) return ( null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), + null !== pingedLanes && + cancelCallback$1(pingedLanes), (root.callbackPriority = 2), (root.callbackNode = null), 2 @@ -2527,12 +2535,12 @@ function processUpdateQueue( var current = workInProgress$jscomp$0.alternate; null !== current && ((current = current.updateQueue), - (pendingQueue = current.lastBaseUpdate), - pendingQueue !== lastBaseUpdate && + (pendingQueue = current.lastBaseUpdate), + pendingQueue !== lastBaseUpdate && (null === pendingQueue ? (current.firstBaseUpdate = firstPendingUpdate) : (pendingQueue.next = firstPendingUpdate), - (current.lastBaseUpdate = lastPendingUpdate))); + (current.lastBaseUpdate = lastPendingUpdate))); } if (null !== firstBaseUpdate) { var newState = queue.baseState; @@ -2549,13 +2557,13 @@ function processUpdateQueue( ) { null !== current && (current = current.next = - { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); + { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); a: { var workInProgress = workInProgress$jscomp$0, update = pendingQueue; @@ -2588,11 +2596,11 @@ function processUpdateQueue( 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)); + isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), + (isHiddenUpdate = queue.callbacks), + null === isHiddenUpdate + ? (queue.callbacks = [updateLane]) + : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { lane: updateLane, @@ -2631,7 +2639,7 @@ function callCallback(callback, context) { if ("function" !== typeof callback) throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + - callback + callback ); callback.call(context); } @@ -2704,17 +2712,17 @@ function getStackByFiberInDevAndProd(workInProgress) { } } var SuspenseException = Error( - "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" - ), + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" +), SuspenseyCommitException = Error( "Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React." ), - noopSuspenseyCommitThenable = { then: function () {} }; + noopSuspenseyCommitThenable = { then: function () { } }; function isThenableResolved(thenable) { thenable = thenable.status; return "fulfilled" === thenable || "rejected" === thenable; } -function noop() {} +function noop() { } function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index @@ -2726,8 +2734,8 @@ function trackUsedThenable(thenableState, thenable, index) { case "rejected": throw ( ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) ); default: if ("string" === typeof thenable.status) thenable.then(noop, noop); @@ -2761,8 +2769,8 @@ function trackUsedThenable(thenableState, thenable, index) { case "rejected": throw ( ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) ); } } @@ -2813,8 +2821,8 @@ function coerceRef(returnFiber, current, element) { if (!inst) throw Error( "Missing owner for string ref " + - returnFiber + - ". This error is likely caused by a bug in React. Please file an issue." + returnFiber + + ". This error is likely caused by a bug in React. Please file an issue." ); var resolvedInst = inst, stringRef = "" + returnFiber; @@ -2839,8 +2847,8 @@ function coerceRef(returnFiber, current, element) { if (!element._owner) throw Error( "Element ref was specified as a string (" + - returnFiber + - ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." + returnFiber + + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." ); } return returnFiber; @@ -2849,10 +2857,10 @@ function throwOnInvalidObjectType(returnFiber, newChild) { 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." + ("[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 resolveLazy(lazyType) { @@ -2870,13 +2878,13 @@ function createChildReconciler(shouldTrackSideEffects) { } function deleteRemainingChildren(returnFiber, currentFirstChild) { if (!shouldTrackSideEffects) return null; - for (; null !== currentFirstChild; ) + for (; null !== currentFirstChild;) deleteChild(returnFiber, currentFirstChild), (currentFirstChild = currentFirstChild.sibling); return null; } function mapRemainingChildren(returnFiber, currentFirstChild) { - for (returnFiber = new Map(); null !== currentFirstChild; ) + for (returnFiber = new Map(); null !== currentFirstChild;) null !== currentFirstChild.key ? returnFiber.set(currentFirstChild.key, currentFirstChild) : returnFiber.set(currentFirstChild.index, currentFirstChild), @@ -3179,10 +3187,10 @@ function createChildReconciler(shouldTrackSideEffects) { ) { for ( var resultingFirstChild = null, - previousNewFiber = null, - oldFiber = currentFirstChild, - newIdx = (currentFirstChild = 0), - nextOldFiber = null; + previousNewFiber = null, + oldFiber = currentFirstChild, + newIdx = (currentFirstChild = 0), + nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++ ) { @@ -3218,11 +3226,11 @@ function createChildReconciler(shouldTrackSideEffects) { for (; newIdx < newChildren.length; newIdx++) (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)), null !== oldFiber && - ((currentFirstChild = placeChild( - oldFiber, - currentFirstChild, - newIdx - )), + ((currentFirstChild = placeChild( + oldFiber, + currentFirstChild, + newIdx + )), null === previousNewFiber ? (resultingFirstChild = oldFiber) : (previousNewFiber.sibling = oldFiber), @@ -3242,11 +3250,11 @@ function createChildReconciler(shouldTrackSideEffects) { lanes )), null !== nextOldFiber && - (shouldTrackSideEffects && - null !== nextOldFiber.alternate && - oldFiber.delete( - null === nextOldFiber.key ? newIdx : nextOldFiber.key - ), + (shouldTrackSideEffects && + null !== nextOldFiber.alternate && + oldFiber.delete( + null === nextOldFiber.key ? newIdx : nextOldFiber.key + ), (currentFirstChild = placeChild( nextOldFiber, currentFirstChild, @@ -3278,10 +3286,10 @@ function createChildReconciler(shouldTrackSideEffects) { throw Error("An iterable object provided no iterator."); for ( var previousNewFiber = (iteratorFn = null), - oldFiber = currentFirstChild, - newIdx = (currentFirstChild = 0), - nextOldFiber = null, - step = newChildrenIterable.next(); + oldFiber = currentFirstChild, + newIdx = (currentFirstChild = 0), + nextOldFiber = null, + step = newChildrenIterable.next(); null !== oldFiber && !step.done; newIdx++, step = newChildrenIterable.next() ) { @@ -3310,7 +3318,7 @@ function createChildReconciler(shouldTrackSideEffects) { for (; !step.done; newIdx++, step = newChildrenIterable.next()) (step = createChild(returnFiber, step.value, lanes)), null !== step && - ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), + ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber ? (iteratorFn = step) : (previousNewFiber.sibling = step), @@ -3324,9 +3332,9 @@ function createChildReconciler(shouldTrackSideEffects) { ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && - (shouldTrackSideEffects && - null !== step.alternate && - oldFiber.delete(null === step.key ? newIdx : step.key), + (shouldTrackSideEffects && + null !== step.alternate && + oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber ? (iteratorFn = step) @@ -3396,21 +3404,21 @@ function createChildReconciler(shouldTrackSideEffects) { } newChild.type === REACT_FRAGMENT_TYPE ? ((currentFirstChild = createFiberFromFragment( - newChild.props.children, - returnFiber.mode, - lanes, - newChild.key - )), + newChild.props.children, + returnFiber.mode, + lanes, + newChild.key + )), (currentFirstChild.return = returnFiber), (returnFiber = currentFirstChild)) : ((lanes = createFiberFromTypeAndProps( - newChild.type, - newChild.key, - newChild.props, - null, - returnFiber.mode, - lanes - )), + newChild.type, + newChild.key, + newChild.props, + null, + returnFiber.mode, + lanes + )), (lanes.ref = coerceRef( returnFiber, currentFirstChild, @@ -3422,14 +3430,14 @@ function createChildReconciler(shouldTrackSideEffects) { return placeSingleChild(returnFiber); case REACT_PORTAL_TYPE: a: { - for (child = newChild.key; null !== currentFirstChild; ) { + for (child = newChild.key; null !== currentFirstChild;) { if (currentFirstChild.key === child) if ( 4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === - newChild.containerInfo && + newChild.containerInfo && currentFirstChild.stateNode.implementation === - newChild.implementation + newChild.implementation ) { deleteRemainingChildren( returnFiber, @@ -3570,8 +3578,8 @@ function pushOffscreenSuspenseHandler(fiber) { if (22 === fiber.tag) { if ( (push(suspenseStackCursor, suspenseStackCursor.current), - push(suspenseHandlerStackCursor, fiber), - null === shellBoundary) + push(suspenseHandlerStackCursor, fiber), + null === shellBoundary) ) { var current = fiber.alternate; null !== current && @@ -3591,7 +3599,7 @@ function popSuspenseHandler(fiber) { } var suspenseStackCursor = createCursor(0); function findFirstSuspended(row) { - for (var node = row; null !== node; ) { + for (var node = row; null !== node;) { if (13 === node.tag) { var state = node.memoizedState; if (null !== state && (null === state.dehydrated || shim$1() || shim$1())) @@ -3604,7 +3612,7 @@ function findFirstSuspended(row) { continue; } if (node === row) break; - for (; null === node.sibling; ) { + for (; null === node.sibling;) { if (null === node.return || node.return === row) return null; node = node.return; } @@ -3766,7 +3774,7 @@ function updateWorkInProgressHook() { }; null === workInProgressHook ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = - nextCurrentHook) + nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } return workInProgressHook; @@ -3833,17 +3841,17 @@ function updateReducer(reducer) { ) null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = - { - lane: 0, - revertLane: 0, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), + { + lane: 0, + revertLane: 0, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), (updateLane = update.action), shouldDoubleInvokeUserFnsInHooksDEV && - reducer(pendingQueue, updateLane), + reducer(pendingQueue, updateLane), (pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane)); @@ -4023,8 +4031,8 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { deps = void 0 === deps ? null : deps; var inst = hook.memoizedState.inst; null !== currentHook && - null !== deps && - areHookInputsEqual(deps, currentHook.memoizedState.deps) + null !== deps && + areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushEffect(hookFlags, create, inst, deps)) : ((currentlyRenderingFiber$1.flags |= fiberFlags), (hook.memoizedState = pushEffect(1 | hookFlags, create, inst, deps))); @@ -4063,7 +4071,7 @@ function updateImperativeHandle(ref, create, deps) { deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps); } -function mountDebugValue() {} +function mountDebugValue() { } function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; @@ -4144,7 +4152,7 @@ function dispatchReducerAction(fiber, queue, action) { : (enqueueUpdate$1(fiber, queue, action, lane), (action = getRootForUpdatedFiber(fiber)), null !== action && - (scheduleUpdateOnFiber(action, fiber, lane), + (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { @@ -4182,7 +4190,7 @@ function dispatchSetState(fiber, queue, action) { action = getRootForUpdatedFiber(fiber); null !== action && (scheduleUpdateOnFiber(action, fiber, lane), - entangleTransitionUpdate(action, queue, lane)); + entangleTransitionUpdate(action, queue, lane)); } } function isRenderPhaseUpdate(fiber) { @@ -4211,24 +4219,24 @@ function entangleTransitionUpdate(root, queue, lane) { } } var ContextOnlyDispatcher = { - readContext: readContext, - use: use, - useCallback: throwInvalidHookError, - useContext: throwInvalidHookError, - useEffect: throwInvalidHookError, - useImperativeHandle: throwInvalidHookError, - useInsertionEffect: throwInvalidHookError, - useLayoutEffect: throwInvalidHookError, - useMemo: throwInvalidHookError, - useReducer: throwInvalidHookError, - useRef: throwInvalidHookError, - useState: throwInvalidHookError, - useDebugValue: throwInvalidHookError, - useDeferredValue: throwInvalidHookError, - useTransition: throwInvalidHookError, - useSyncExternalStore: throwInvalidHookError, - useId: throwInvalidHookError - }, + readContext: readContext, + use: use, + useCallback: throwInvalidHookError, + useContext: throwInvalidHookError, + useEffect: throwInvalidHookError, + useImperativeHandle: throwInvalidHookError, + useInsertionEffect: throwInvalidHookError, + useLayoutEffect: throwInvalidHookError, + useMemo: throwInvalidHookError, + useReducer: throwInvalidHookError, + useRef: throwInvalidHookError, + useState: throwInvalidHookError, + useDebugValue: throwInvalidHookError, + useDeferredValue: throwInvalidHookError, + useTransition: throwInvalidHookError, + useSyncExternalStore: throwInvalidHookError, + useId: throwInvalidHookError +}, HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -4412,11 +4420,11 @@ var ContextOnlyDispatcher = { return null === currentHook ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl( - hook, - currentHook.memoizedState, - value, - initialValue - ); + hook, + currentHook.memoizedState, + value, + initialValue + ); }, useTransition: function () { var booleanOrThenable = rerenderReducer(basicStateReducer)[0], @@ -4473,7 +4481,7 @@ var classComponentUpdater = { payload = enqueueUpdate(inst, update, lane); null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), - entangleTransitions(payload, inst, lane)); + entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; @@ -4485,7 +4493,7 @@ var classComponentUpdater = { payload = enqueueUpdate(inst, update, lane); null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), - entangleTransitions(payload, inst, lane)); + entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; @@ -4496,7 +4504,7 @@ var classComponentUpdater = { callback = enqueueUpdate(inst, update, lane); null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), - entangleTransitions(callback, inst, lane)); + entangleTransitions(callback, inst, lane)); } }; function checkShouldComponentUpdate( @@ -4512,8 +4520,8 @@ function checkShouldComponentUpdate( return "function" === typeof workInProgress.shouldComponentUpdate ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext) : ctor.prototype && ctor.prototype.isPureReactComponent - ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) - : !0; + ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) + : !0; } function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = !1, @@ -4522,8 +4530,8 @@ function constructClassInstance(workInProgress, ctor, props) { "object" === typeof context && null !== context ? (context = readContext(context)) : ((unmaskedContext = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), + ? previousContext + : contextStackCursor$1.current), (isLegacyContextConsumer = ctor.contextTypes), (context = (isLegacyContextConsumer = null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer) @@ -4537,9 +4545,9 @@ function constructClassInstance(workInProgress, ctor, props) { ctor._reactInternals = workInProgress; isLegacyContextConsumer && ((workInProgress = workInProgress.stateNode), - (workInProgress.__reactInternalMemoizedUnmaskedChildContext = - unmaskedContext), - (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); + (workInProgress.__reactInternalMemoizedUnmaskedChildContext = + unmaskedContext), + (workInProgress.__reactInternalMemoizedMaskedChildContext = context)); return ctor; } function callComponentWillReceiveProps( @@ -4566,27 +4574,27 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { "object" === typeof contextType && null !== contextType ? (instance.context = readContext(contextType)) : ((contextType = isContextProvider(ctor) - ? previousContext - : contextStackCursor$1.current), + ? previousContext + : contextStackCursor$1.current), (instance.context = getMaskedContext(workInProgress, contextType))); instance.state = workInProgress.memoizedState; contextType = ctor.getDerivedStateFromProps; "function" === typeof contextType && (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps), - (instance.state = workInProgress.memoizedState)); + (instance.state = workInProgress.memoizedState)); "function" === typeof ctor.getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate || ("function" !== typeof instance.UNSAFE_componentWillMount && "function" !== typeof instance.componentWillMount) || ((ctor = instance.state), - "function" === typeof instance.componentWillMount && + "function" === typeof instance.componentWillMount && instance.componentWillMount(), - "function" === typeof instance.UNSAFE_componentWillMount && + "function" === typeof instance.UNSAFE_componentWillMount && instance.UNSAFE_componentWillMount(), - ctor !== instance.state && + ctor !== instance.state && classComponentUpdater.enqueueReplaceState(instance, instance.state, null), - processUpdateQueue(workInProgress, newProps, instance, renderLanes), - (instance.state = workInProgress.memoizedState)); + processUpdateQueue(workInProgress, newProps, instance, renderLanes), + (instance.state = workInProgress.memoizedState)); "function" === typeof instance.componentDidMount && (workInProgress.flags |= 4194308); } @@ -4688,11 +4696,11 @@ function throwException( case 13: return ( sourceFiber.mode & 1 && - (null === shellBoundary - ? renderDidSuspendDelayIfPossible() - : null === tag.alternate && - 0 === workInProgressRootExitStatus && - (workInProgressRootExitStatus = 3)), + (null === shellBoundary + ? renderDidSuspendDelayIfPossible() + : null === tag.alternate && + 0 === workInProgressRootExitStatus && + (workInProgressRootExitStatus = 3)), (tag.flags &= -257), 0 === (tag.mode & 1) ? tag === returnFiber @@ -4701,11 +4709,11 @@ function throwException( (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), 1 === sourceFiber.tag && - (null === sourceFiber.alternate - ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(2)), - (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + (null === sourceFiber.alternate + ? (sourceFiber.tag = 17) + : ((returnFiber = createUpdate(2)), + (returnFiber.tag = 2), + enqueueUpdate(sourceFiber, returnFiber, 2))), (sourceFiber.lanes |= 2)) : ((tag.flags |= 65536), (tag.lanes = rootRenderLanes)), value === noopSuspenseyCommitThenable @@ -4715,7 +4723,7 @@ function throwException( ? (tag.updateQueue = new Set([value])) : returnFiber.add(value), tag.mode & 1 && - attachPingListener(root, value, rootRenderLanes)), + attachPingListener(root, value, rootRenderLanes)), !1 ); case 22: @@ -4727,10 +4735,10 @@ function throwException( : ((returnFiber = tag.updateQueue), null === returnFiber ? ((returnFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), (tag.updateQueue = returnFiber)) : ((sourceFiber = returnFiber.retryQueue), null === sourceFiber @@ -4742,8 +4750,8 @@ function throwException( } throw Error( "Unexpected Suspense handler tag (" + - tag.tag + - "). This is a bug in React." + tag.tag + + "). This is a bug in React." ); } if (1 === root.tag) @@ -4781,9 +4789,9 @@ function throwException( case 1: if ( ((returnFiber = value), - (sourceFiber = root.type), - (tag = root.stateNode), - 0 === (root.flags & 128) && + (sourceFiber = root.type), + (tag = root.stateNode), + 0 === (root.flags & 128) && ("function" === typeof sourceFiber.getDerivedStateFromError || (null !== tag && "function" === typeof tag.componentDidCatch && @@ -4817,11 +4825,11 @@ function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { null === current ? mountChildFibers(workInProgress, null, nextChildren, renderLanes) : reconcileChildFibers( - workInProgress, - current.child, - nextChildren, - renderLanes - ); + workInProgress, + current.child, + nextChildren, + renderLanes + ); } function updateForwardRef( current, @@ -4918,8 +4926,8 @@ function updateSimpleMemoComponent( ) if ( ((didReceiveUpdate = !1), - (workInProgress.pendingProps = nextProps = prevProps), - 0 !== (current.lanes & renderLanes)) + (workInProgress.pendingProps = nextProps = prevProps), + 0 !== (current.lanes & renderLanes)) ) 0 !== (current.flags & 131072) && (didReceiveUpdate = !0); else @@ -4948,7 +4956,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { null !== prevState ? prevState.baseLanes | renderLanes : renderLanes; if (null !== current) { nextProps = workInProgress.child = current.child; - for (nextChildren = 0; null !== nextProps; ) + for (nextChildren = 0; null !== nextProps;) (nextChildren = nextChildren | nextProps.lanes | nextProps.childLanes), (nextProps = nextProps.sibling); @@ -5083,8 +5091,8 @@ function updateClassComponent( "object" === typeof contextType && null !== contextType ? (contextType = readContext(contextType)) : ((contextType = isContextProvider(Component) - ? previousContext - : contextStackCursor$1.current), + ? previousContext + : contextStackCursor$1.current), (contextType = getMaskedContext(workInProgress, contextType))); var getDerivedStateFromProps = Component.getDerivedStateFromProps, hasNewLifecycles = @@ -5106,16 +5114,16 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); oldContext = workInProgress.memoizedState; oldProps !== nextProps || - oldState !== oldContext || - didPerformWorkStackCursor.current || - hasForceUpdate + oldState !== oldContext || + didPerformWorkStackCursor.current || + hasForceUpdate ? ("function" === typeof getDerivedStateFromProps && - (applyDerivedStateFromProps( - workInProgress, - Component, - getDerivedStateFromProps, - nextProps - ), + (applyDerivedStateFromProps( + workInProgress, + Component, + getDerivedStateFromProps, + nextProps + ), (oldContext = workInProgress.memoizedState)), (oldProps = hasForceUpdate || @@ -5129,16 +5137,16 @@ function updateClassComponent( contextType )) ? (hasNewLifecycles || - ("function" !== typeof instance.UNSAFE_componentWillMount && - "function" !== typeof instance.componentWillMount) || - ("function" === typeof instance.componentWillMount && - instance.componentWillMount(), + ("function" !== typeof instance.UNSAFE_componentWillMount && + "function" !== typeof instance.componentWillMount) || + ("function" === typeof instance.componentWillMount && + instance.componentWillMount(), "function" === typeof instance.UNSAFE_componentWillMount && - instance.UNSAFE_componentWillMount()), + instance.UNSAFE_componentWillMount()), "function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308)) + (workInProgress.flags |= 4194308)) : ("function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308), + (workInProgress.flags |= 4194308), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = oldContext)), (instance.props = nextProps), @@ -5146,7 +5154,7 @@ function updateClassComponent( (instance.context = contextType), (nextProps = oldProps)) : ("function" === typeof instance.componentDidMount && - (workInProgress.flags |= 4194308), + (workInProgress.flags |= 4194308), (nextProps = !1)); } else { instance = workInProgress.stateNode; @@ -5163,8 +5171,8 @@ function updateClassComponent( "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) : ((oldContext = isContextProvider(Component) - ? previousContext - : contextStackCursor$1.current), + ? previousContext + : contextStackCursor$1.current), (oldContext = getMaskedContext(workInProgress, oldContext))); var getDerivedStateFromProps$jscomp$0 = Component.getDerivedStateFromProps; (getDerivedStateFromProps = @@ -5185,16 +5193,16 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); var newState = workInProgress.memoizedState; oldProps !== hasNewLifecycles || - oldState !== newState || - didPerformWorkStackCursor.current || - hasForceUpdate + oldState !== newState || + didPerformWorkStackCursor.current || + hasForceUpdate ? ("function" === typeof getDerivedStateFromProps$jscomp$0 && - (applyDerivedStateFromProps( - workInProgress, - Component, - getDerivedStateFromProps$jscomp$0, - nextProps - ), + (applyDerivedStateFromProps( + workInProgress, + Component, + getDerivedStateFromProps$jscomp$0, + nextProps + ), (newState = workInProgress.memoizedState)), (contextType = hasForceUpdate || @@ -5209,28 +5217,28 @@ function updateClassComponent( ) || !1) ? (getDerivedStateFromProps || - ("function" !== typeof instance.UNSAFE_componentWillUpdate && - "function" !== typeof instance.componentWillUpdate) || - ("function" === typeof instance.componentWillUpdate && - instance.componentWillUpdate(nextProps, newState, oldContext), + ("function" !== typeof instance.UNSAFE_componentWillUpdate && + "function" !== typeof instance.componentWillUpdate) || + ("function" === typeof instance.componentWillUpdate && + instance.componentWillUpdate(nextProps, newState, oldContext), "function" === typeof instance.UNSAFE_componentWillUpdate && - instance.UNSAFE_componentWillUpdate( - nextProps, - newState, - oldContext - )), + instance.UNSAFE_componentWillUpdate( + nextProps, + newState, + oldContext + )), "function" === typeof instance.componentDidUpdate && - (workInProgress.flags |= 4), + (workInProgress.flags |= 4), "function" === typeof instance.getSnapshotBeforeUpdate && - (workInProgress.flags |= 1024)) + (workInProgress.flags |= 1024)) : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 4), + (oldProps === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 1024), + (oldProps === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), (instance.props = nextProps), @@ -5238,13 +5246,13 @@ function updateClassComponent( (instance.context = oldContext), (nextProps = contextType)) : ("function" !== typeof instance.componentDidUpdate || - (oldProps === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 4), + (oldProps === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || - (oldProps === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 1024), + (oldProps === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 1024), (nextProps = !1)); } return finishClassComponent( @@ -5280,11 +5288,11 @@ function finishClassComponent( workInProgress.flags |= 1; null !== current && didCaptureError ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - )), + workInProgress, + current.child, + null, + renderLanes + )), (workInProgress.child = reconcileChildFibers( workInProgress, null, @@ -5300,12 +5308,12 @@ function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; root.pendingContext ? pushTopLevelContextObject( - workInProgress, - root.pendingContext, - root.pendingContext !== root.context - ) + workInProgress, + root.pendingContext, + root.pendingContext !== root.context + ) : root.context && - pushTopLevelContextObject(workInProgress, root.context, !1); + pushTopLevelContextObject(workInProgress, root.context, !1); pushHostContainer(workInProgress, root.containerInfo); } var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; @@ -5346,11 +5354,11 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? ((progressedPrimaryFragment.childLanes = 0), (progressedPrimaryFragment.pendingProps = didSuspend)) : (progressedPrimaryFragment = createFiberFromOffscreen( - didSuspend, - showFallback, - 0, - null - )); + didSuspend, + showFallback, + 0, + null + )); nextProps = createFiberFromFragment( nextProps, showFallback, @@ -5402,19 +5410,19 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (nextProps.pendingProps = primaryChildProps), (workInProgress.deletions = null)) : ((nextProps = createWorkInProgress( - progressedPrimaryFragment, - primaryChildProps - )), + progressedPrimaryFragment, + primaryChildProps + )), (nextProps.subtreeFlags = progressedPrimaryFragment.subtreeFlags & 31457280)); null !== dehydrated ? (showFallback = createWorkInProgress(dehydrated, showFallback)) : ((showFallback = createFiberFromFragment( - showFallback, - didSuspend, - renderLanes, - null - )), + showFallback, + didSuspend, + renderLanes, + null + )), (showFallback.flags |= 2)); showFallback.return = workInProgress; nextProps.return = workInProgress; @@ -5448,9 +5456,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), - null === renderLanes - ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : renderLanes.push(current)); + null === renderLanes + ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) + : renderLanes.push(current)); workInProgress.child = JSCompiler_temp; workInProgress.memoizedState = null; return JSCompiler_temp; @@ -5626,15 +5634,15 @@ function updateDehydratedSuspenseComponent( } nextProps = 0 !== - (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) + (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes)) ? 0 : nextProps; if (0 !== nextProps && nextProps !== suspenseState.retryLane) throw ( ((suspenseState.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), - SelectiveHydrationException) + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps), + SelectiveHydrationException) ); } shim$1() || renderDidSuspendDelayIfPossible(); @@ -5673,13 +5681,13 @@ function initSuspenseListRenderState( var renderState = workInProgress.memoizedState; null === renderState ? (workInProgress.memoizedState = { - isBackwards: isBackwards, - rendering: null, - renderingStartTime: 0, - last: lastContentRow, - tail: tail, - tailMode: tailMode - }) + isBackwards: isBackwards, + rendering: null, + renderingStartTime: 0, + last: lastContentRow, + tail: tail, + tailMode: tailMode + }) : ((renderState.isBackwards = isBackwards), (renderState.rendering = null), (renderState.renderingStartTime = 0), @@ -5697,7 +5705,7 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { (nextProps = (nextProps & 1) | 2), (workInProgress.flags |= 128); else { if (null !== current && 0 !== (current.flags & 128)) - a: for (current = workInProgress.child; null !== current; ) { + a: for (current = workInProgress.child; null !== current;) { if (13 === current.tag) null !== current.memoizedState && scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); @@ -5709,7 +5717,7 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { continue; } if (current === workInProgress) break a; - for (; null === current.sibling; ) { + for (; null === current.sibling;) { if (null === current.return || current.return === workInProgress) break a; current = current.return; @@ -5725,11 +5733,11 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { switch (revealOrder) { case "forwards": renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) + for (revealOrder = null; null !== renderLanes;) (current = renderLanes.alternate), null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), + null === findFirstSuspended(current) && + (revealOrder = renderLanes), (renderLanes = renderLanes.sibling); renderLanes = revealOrder; null === renderLanes @@ -5747,7 +5755,7 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { case "backwards": renderLanes = null; revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { + for (workInProgress.child = null; null !== revealOrder;) { current = revealOrder.alternate; if (null !== current && null === findFirstSuspended(current)) { workInProgress.child = revealOrder; @@ -5778,8 +5786,8 @@ function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { 0 === (workInProgress.mode & 1) && null !== current && ((current.alternate = null), - (workInProgress.alternate = null), - (workInProgress.flags |= 2)); + (workInProgress.alternate = null), + (workInProgress.flags |= 2)); } function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); @@ -5791,7 +5799,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { current = workInProgress.child; renderLanes = createWorkInProgress(current, current.pendingProps); workInProgress.child = renderLanes; - for (renderLanes.return = workInProgress; null !== current.sibling; ) + for (renderLanes.return = workInProgress; null !== current.sibling;) (current = current.sibling), (renderLanes = renderLanes.sibling = createWorkInProgress(current, current.pendingProps)), @@ -5861,8 +5869,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( nextValue = workInProgress.memoizedState; null !== nextValue && ((nextValue.rendering = null), - (nextValue.tail = null), - (nextValue.lastEffect = null)); + (nextValue.tail = null), + (nextValue.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); if (context) break; else return null; @@ -5883,21 +5891,21 @@ function resetContextDependencies() { lastFullyObservedContext = lastContextDependency = currentlyRenderingFiber = - null; + null; } function popProvider(context) { context._currentValue = valueCursor.current; pop(valueCursor); } function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { + for (; null !== parent;) { var alternate = parent.alternate; (parent.childLanes & renderLanes) !== renderLanes ? ((parent.childLanes |= renderLanes), null !== alternate && (alternate.childLanes |= renderLanes)) : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); if (parent === propagationRoot) break; parent = parent.return; } @@ -5909,7 +5917,7 @@ function prepareToReadContext(workInProgress, renderLanes) { null !== workInProgress && null !== workInProgress.firstContext && (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null)); + (workInProgress.firstContext = null)); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); @@ -5924,7 +5932,7 @@ function readContextForConsumer(consumer, context) { if (lastFullyObservedContext !== context) if ( ((context = { context: context, memoizedValue: value, next: null }), - null === lastContextDependency) + null === lastContextDependency) ) { if (null === consumer) throw Error( @@ -5936,20 +5944,20 @@ function readContextForConsumer(consumer, context) { return value; } var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; -function handleAsyncAction() {} +function handleAsyncAction() { } function scheduleRetryEffect(workInProgress, retryQueue) { null !== retryQueue ? (workInProgress.flags |= 4) : workInProgress.flags & 16384 && - ((retryQueue = - 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { case "hidden": hasRenderedATailFallback = renderState.tail; - for (var lastTailNode = null; null !== hasRenderedATailFallback; ) + for (var lastTailNode = null; null !== hasRenderedATailFallback;) null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), (hasRenderedATailFallback = hasRenderedATailFallback.sibling); @@ -5959,7 +5967,7 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$61 = null; null !== lastTailNode; ) + for (var lastTailNode$61 = null; null !== lastTailNode;) null !== lastTailNode.alternate && (lastTailNode$61 = lastTailNode), (lastTailNode = lastTailNode.sibling); null === lastTailNode$61 @@ -5971,19 +5979,19 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { } function bubbleProperties(completedWork) { var didBailout = - null !== completedWork.alternate && - completedWork.alternate.child === completedWork.child, + null !== completedWork.alternate && + completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$62 = completedWork.child; null !== child$62; ) + for (var child$62 = completedWork.child; null !== child$62;) (newChildLanes |= child$62.lanes | child$62.childLanes), (subtreeFlags |= child$62.subtreeFlags & 31457280), (subtreeFlags |= child$62.flags & 31457280), (child$62.return = completedWork), (child$62 = child$62.sibling); else - for (child$62 = completedWork.child; null !== child$62; ) + for (child$62 = completedWork.child; null !== child$62;) (newChildLanes |= child$62.lanes | child$62.childLanes), (subtreeFlags |= child$62.subtreeFlags), (subtreeFlags |= child$62.flags), @@ -5995,6 +6003,12 @@ function bubbleProperties(completedWork) { } function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; + if (workInProgress.flags & 1 && (workInProgress.type?.displayName || workInProgress.type?.name) !== "View") + insertUpdateComponents( + getComponentNameFromFiber(workInProgress), + workInProgress.flags, + workInProgress.key, + ); switch (workInProgress.tag) { case 2: case 16: @@ -6020,15 +6034,15 @@ function completeWork(current, workInProgress, renderLanes) { pop(didPerformWorkStackCursor), pop(contextStackCursor$1), renderLanes.pendingContext && - ((renderLanes.context = renderLanes.pendingContext), + ((renderLanes.context = renderLanes.pendingContext), (renderLanes.pendingContext = null)), (null !== current && null !== current.child) || - null === current || - (current.memoizedState.isDehydrated && - 0 === (workInProgress.flags & 256)) || - ((workInProgress.flags |= 1024), + null === current || + (current.memoizedState.isDehydrated && + 0 === (workInProgress.flags & 256)) || + ((workInProgress.flags |= 1024), null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), + (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null))), bubbleProperties(workInProgress), null @@ -6041,7 +6055,7 @@ function completeWork(current, workInProgress, renderLanes) { if (null !== current && null != workInProgress.stateNode) current.memoizedProps !== newProps && (workInProgress.flags |= 4), current.ref !== workInProgress.ref && - (workInProgress.flags |= 2097664); + (workInProgress.flags |= 2097664); else { if (!newProps) { if (null === workInProgress.stateNode) @@ -6073,7 +6087,7 @@ function completeWork(current, workInProgress, renderLanes) { ); instanceCache.set(renderLanes, workInProgress); instanceProps.set(renderLanes, newProps); - a: for (renderLanes = workInProgress.child; null !== renderLanes; ) { + a: for (renderLanes = workInProgress.child; null !== renderLanes;) { if (5 === renderLanes.tag || 6 === renderLanes.tag) current._children.push(renderLanes.stateNode); else if (4 !== renderLanes.tag && null !== renderLanes.child) { @@ -6082,7 +6096,7 @@ function completeWork(current, workInProgress, renderLanes) { continue; } if (renderLanes === workInProgress) break a; - for (; null === renderLanes.sibling; ) { + for (; null === renderLanes.sibling;) { if ( null === renderLanes.return || renderLanes.return === workInProgress @@ -6189,7 +6203,7 @@ function completeWork(current, workInProgress, renderLanes) { 0 !== workInProgressRootExitStatus || (null !== current && 0 !== (current.flags & 128)) ) - for (current = workInProgress.child; null !== current; ) { + for (current = workInProgress.child; null !== current;) { updatePayload = findFirstSuspended(current); if (null !== updatePayload) { workInProgress.flags |= 128; @@ -6198,7 +6212,7 @@ function completeWork(current, workInProgress, renderLanes) { workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; - for (current = workInProgress.child; null !== current; ) + for (current = workInProgress.child; null !== current;) resetWorkInProgress(current, renderLanes), (current = current.sibling); push( @@ -6212,9 +6226,9 @@ function completeWork(current, workInProgress, renderLanes) { null !== type.tail && now() > workInProgressRootRenderTargetTime && ((workInProgress.flags |= 128), - (newProps = !0), - cutOffTailIfNeeded(type, !1), - (workInProgress.lanes = 4194304)); + (newProps = !0), + cutOffTailIfNeeded(type, !1), + (workInProgress.lanes = 4194304)); } else { if (!newProps) @@ -6223,12 +6237,12 @@ function completeWork(current, workInProgress, renderLanes) { ) { if ( ((workInProgress.flags |= 128), - (newProps = !0), - (renderLanes = current.updateQueue), - (workInProgress.updateQueue = renderLanes), - scheduleRetryEffect(workInProgress, renderLanes), - cutOffTailIfNeeded(type, !0), - null === type.tail && + (newProps = !0), + (renderLanes = current.updateQueue), + (workInProgress.updateQueue = renderLanes), + scheduleRetryEffect(workInProgress, renderLanes), + cutOffTailIfNeeded(type, !0), + null === type.tail && "hidden" === type.tailMode && !updatePayload.alternate) ) @@ -6238,9 +6252,9 @@ function completeWork(current, workInProgress, renderLanes) { workInProgressRootRenderTargetTime && 536870912 !== renderLanes && ((workInProgress.flags |= 128), - (newProps = !0), - cutOffTailIfNeeded(type, !1), - (workInProgress.lanes = 4194304)); + (newProps = !0), + cutOffTailIfNeeded(type, !1), + (workInProgress.lanes = 4194304)); type.isBackwards ? ((updatePayload.sibling = workInProgress.child), (workInProgress.child = updatePayload)) @@ -6274,17 +6288,17 @@ function completeWork(current, workInProgress, renderLanes) { (newProps = null !== workInProgress.memoizedState), null !== current ? (null !== current.memoizedState) !== newProps && - (workInProgress.flags |= 8192) + (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192), newProps && 0 !== (workInProgress.mode & 1) ? 0 !== (renderLanes & 536870912) && - 0 === (workInProgress.flags & 128) && - (bubbleProperties(workInProgress), + 0 === (workInProgress.flags & 128) && + (bubbleProperties(workInProgress), workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192)) : bubbleProperties(workInProgress), (renderLanes = workInProgress.updateQueue), null !== renderLanes && - scheduleRetryEffect(workInProgress, renderLanes.retryQueue), + scheduleRetryEffect(workInProgress, renderLanes.retryQueue), null ); case 24: @@ -6294,8 +6308,8 @@ function completeWork(current, workInProgress, renderLanes) { } throw Error( "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." ); } function unwindWork(current, workInProgress) { @@ -6451,15 +6465,15 @@ function safelyCallDestroy(current, nearestMountedAncestor, destroy) { } var shouldFireAfterActiveInstanceBlur = !1; function commitBeforeMutationEffects(root, firstChild) { - for (nextEffect = firstChild; null !== nextEffect; ) + for (nextEffect = firstChild; null !== nextEffect;) if ( ((root = nextEffect), - (firstChild = root.child), - 0 !== (root.subtreeFlags & 1028) && null !== firstChild) + (firstChild = root.child), + 0 !== (root.subtreeFlags & 1028) && null !== firstChild) ) (firstChild.return = root), (nextEffect = firstChild); else - for (; null !== nextEffect; ) { + for (; null !== nextEffect;) { root = nextEffect; try { var current = root.alternate, @@ -6529,7 +6543,7 @@ function commitHookEffectListUnmount( destroy = inst.destroy; void 0 !== destroy && ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); } effect = effect.next; } while (effect !== updateQueue); @@ -6647,7 +6661,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { if ( ((prevProps = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden), - !prevProps) + !prevProps) ) { current = (null !== current && null !== current.memoizedState) || @@ -6656,12 +6670,12 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; offscreenSubtreeIsHidden = prevProps; (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden + !prevOffscreenSubtreeWasHidden ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) + finishedRoot, + finishedWork, + 0 !== (finishedWork.subtreeFlags & 8772) + ) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; @@ -6696,8 +6710,8 @@ function isHostParent(fiber) { return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag; } function getHostSibling(fiber) { - a: for (;;) { - for (; null === fiber.sibling; ) { + a: for (; ;) { + for (; null === fiber.sibling;) { if (null === fiber.return || isHostParent(fiber.return)) return null; fiber = fiber.return; } @@ -6727,7 +6741,7 @@ function insertOrAppendPlacementNodeIntoContainer(node, before, parent) { else if (4 !== tag && ((node = node.child), null !== node)) for ( insertOrAppendPlacementNodeIntoContainer(node, before, parent), - node = node.sibling; + node = node.sibling; null !== node; ) @@ -6801,7 +6815,7 @@ function recursivelyTraverseDeletionEffects( nearestMountedAncestor, parent ) { - for (parent = parent.child; null !== parent; ) + for (parent = parent.child; null !== parent;) commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent), (parent = parent.sibling); } @@ -6813,7 +6827,7 @@ function commitDeletionEffectsOnFiber( if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount) try { injectedHook.onCommitFiberUnmount(rendererID, deletedFiber); - } catch (err) {} + } catch (err) { } switch (deletedFiber.tag) { case 26: case 27: @@ -6883,9 +6897,9 @@ function commitDeletionEffectsOnFiber( if ( !offscreenSubtreeWasHidden && ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && + null !== prevHostParent && ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) + null !== prevHostParent)) ) { prevHostParentIsContainer = prevHostParent = prevHostParent.next; do { @@ -6901,7 +6915,7 @@ function commitDeletionEffectsOnFiber( destroy )) : 0 !== (tag & 4) && - ((inst.destroy = void 0), + ((inst.destroy = void 0), safelyCallDestroy( deletedFiber, nearestMountedAncestor, @@ -6920,8 +6934,8 @@ function commitDeletionEffectsOnFiber( if ( !offscreenSubtreeWasHidden && (safelyDetachRef(deletedFiber, nearestMountedAncestor), - (prevHostParent = deletedFiber.stateNode), - "function" === typeof prevHostParent.componentWillUnmount) + (prevHostParent = deletedFiber.stateNode), + "function" === typeof prevHostParent.componentWillUnmount) ) try { (prevHostParent.props = deletedFiber.memoizedProps), @@ -6947,8 +6961,8 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); deletedFiber.mode & 1 ? ((offscreenSubtreeWasHidden = - (prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState), + (prevHostParent = offscreenSubtreeWasHidden) || + null !== deletedFiber.memoizedState), recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -6956,10 +6970,10 @@ function commitDeletionEffectsOnFiber( ), (offscreenSubtreeWasHidden = prevHostParent)) : recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + finishedRoot, + nearestMountedAncestor, + deletedFiber + ); break; default: recursivelyTraverseDeletionEffects( @@ -6982,14 +6996,14 @@ function getRetryCache(finishedWork) { (finishedWork = finishedWork.stateNode), (retryCache = finishedWork._retryCache), null === retryCache && - (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), + (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache ); default: throw Error( "Unexpected Suspense handler tag (" + - finishedWork.tag + - "). This is a bug in React." + finishedWork.tag + + "). This is a bug in React." ); } } @@ -7010,7 +7024,7 @@ function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var root = root$jscomp$0, returnFiber = parentFiber, parent = returnFiber; - a: for (; null !== parent; ) { + a: for (; null !== parent;) { switch (parent.tag) { case 27: case 5: @@ -7043,7 +7057,7 @@ function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { } } if (parentFiber.subtreeFlags & 12854) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), (parentFiber = parentFiber.sibling); } @@ -7080,12 +7094,12 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags & 64 && offscreenSubtreeIsHidden && ((finishedWork = finishedWork.updateQueue), - null !== finishedWork && + null !== finishedWork && ((flags = finishedWork.callbacks), - null !== flags && + null !== flags && ((current = finishedWork.shared.hiddenCallbacks), - (finishedWork.shared.hiddenCallbacks = - null === current ? flags : current.concat(flags))))); + (finishedWork.shared.hiddenCallbacks = + null === current ? flags : current.concat(flags))))); break; case 26: case 27: @@ -7153,14 +7167,14 @@ function commitMutationEffectsOnFiber(finishedWork, root) { commitReconciliationEffects(finishedWork); finishedWork.child.flags & 8192 && ((current = null !== current && null !== current.memoizedState), - null === finishedWork.memoizedState || + null === finishedWork.memoizedState || current || (globalMostRecentFallbackTime = now())); flags & 4 && ((flags = finishedWork.updateQueue), - null !== flags && + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, flags))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 22: flags & 512 && @@ -7188,17 +7202,17 @@ function commitMutationEffectsOnFiber(finishedWork, root) { ((root._visibility = viewConfig ? root._visibility & -2 : root._visibility | 1), - viewConfig && + viewConfig && ((root = offscreenSubtreeIsHidden || offscreenSubtreeWasHidden), - null === current || + null === current || updatePayload || root || (0 !== (finishedWork.mode & 1) && recursivelyTraverseDisappearLayoutEffects(finishedWork))), - null === finishedWork.memoizedProps || + null === finishedWork.memoizedProps || "manual" !== finishedWork.memoizedProps.mode) ) - a: for (current = null, root = finishedWork; ; ) { + a: for (current = null, root = finishedWork; ;) { if (5 === root.tag) { if (null === current) { current = root; @@ -7265,7 +7279,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { continue; } if (root === finishedWork) break a; - for (; null === root.sibling; ) { + for (; null === root.sibling;) { if (null === root.return || root.return === finishedWork) break a; current === root && (current = null); root = root.return; @@ -7276,20 +7290,20 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } flags & 4 && ((flags = finishedWork.updateQueue), - null !== flags && + null !== flags && ((current = flags.retryQueue), - null !== current && + null !== current && ((flags.retryQueue = null), - attachSuspenseRetryListeners(finishedWork, current)))); + attachSuspenseRetryListeners(finishedWork, current)))); break; case 19: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); flags & 4 && ((flags = finishedWork.updateQueue), - null !== flags && + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, flags))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 21: break; @@ -7303,7 +7317,7 @@ function commitReconciliationEffects(finishedWork) { if (flags & 2) { try { a: { - for (var parent = finishedWork.return; null !== parent; ) { + for (var parent = finishedWork.return; null !== parent;) { if (isHostParent(parent)) { var JSCompiler_inline_result = parent; break a; @@ -7347,12 +7361,12 @@ function commitReconciliationEffects(finishedWork) { } function recursivelyTraverseLayoutEffects(root, parentFiber) { if (parentFiber.subtreeFlags & 8772) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber), (parentFiber = parentFiber.sibling); } function recursivelyTraverseDisappearLayoutEffects(parentFiber) { - for (parentFiber = parentFiber.child; null !== parentFiber; ) { + for (parentFiber = parentFiber.child; null !== parentFiber;) { var finishedWork = parentFiber; switch (finishedWork.tag) { case 0: @@ -7403,7 +7417,7 @@ function recursivelyTraverseReappearLayoutEffects( ) { includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); - for (parentFiber = parentFiber.child; null !== parentFiber; ) { + for (parentFiber = parentFiber.child; null !== parentFiber;) { var finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -7499,7 +7513,7 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } function recursivelyTraversePassiveMountEffects(root, parentFiber) { if (parentFiber.subtreeFlags & 10256) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) commitPassiveMountOnFiber(root, parentFiber), (parentFiber = parentFiber.sibling); } @@ -7523,15 +7537,15 @@ function commitPassiveMountOnFiber(finishedRoot, finishedWork) { ? flags._visibility & 4 ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork) : finishedWork.mode & 1 || - ((flags._visibility |= 4), + ((flags._visibility |= 4), recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork)) : flags._visibility & 4 - ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork) - : ((flags._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork - )); + ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork) + : ((flags._visibility |= 4), + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork + )); break; case 24: recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork); @@ -7544,7 +7558,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot$jscomp$0, parentFiber ) { - for (parentFiber = parentFiber.child; null !== parentFiber; ) { + for (parentFiber = parentFiber.child; null !== parentFiber;) { var finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber; switch (finishedWork.tag) { @@ -7561,11 +7575,11 @@ function recursivelyTraverseReconnectPassiveEffects( null !== finishedWork.memoizedState ? instance._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork - ) + finishedRoot, + finishedWork + ) : finishedWork.mode & 1 || - ((instance._visibility |= 4), + ((instance._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork @@ -7588,7 +7602,7 @@ function recursivelyTraverseReconnectPassiveEffects( var suspenseyCommitFlag = 8192; function recursivelyAccumulateSuspenseyCommit(parentFiber) { if (parentFiber.subtreeFlags & suspenseyCommitFlag) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) accumulateSuspenseyCommitOnFiber(parentFiber), (parentFiber = parentFiber.sibling); } @@ -7652,7 +7666,7 @@ function recursivelyTraversePassiveUnmountEffects(parentFiber) { detachAlternateSiblings(parentFiber); } if (parentFiber.subtreeFlags & 10256) - for (parentFiber = parentFiber.child; null !== parentFiber; ) + for (parentFiber = parentFiber.child; null !== parentFiber;) commitPassiveUnmountOnFiber(parentFiber), (parentFiber = parentFiber.sibling); } @@ -7668,8 +7682,8 @@ function commitPassiveUnmountOnFiber(finishedWork) { case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && - (null === finishedWork.return || 13 !== finishedWork.return.tag) + instance._visibility & 4 && + (null === finishedWork.return || 13 !== finishedWork.return.tag) ? ((instance._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); @@ -7692,7 +7706,7 @@ function recursivelyTraverseDisconnectPassiveEffects(parentFiber) { } detachAlternateSiblings(parentFiber); } - for (parentFiber = parentFiber.child; null !== parentFiber; ) { + for (parentFiber = parentFiber.child; null !== parentFiber;) { deletions = parentFiber; switch (deletions.tag) { case 0: @@ -7705,7 +7719,7 @@ function recursivelyTraverseDisconnectPassiveEffects(parentFiber) { i = deletions.stateNode; i._visibility & 4 && ((i._visibility &= -5), - recursivelyTraverseDisconnectPassiveEffects(deletions)); + recursivelyTraverseDisconnectPassiveEffects(deletions)); break; default: recursivelyTraverseDisconnectPassiveEffects(deletions); @@ -7717,7 +7731,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( deletedSubtreeRoot, nearestMountedAncestor ) { - for (; null !== nextEffect; ) { + for (; null !== nextEffect;) { var fiber = nextEffect; switch (fiber.tag) { case 0: @@ -7728,7 +7742,7 @@ function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( var child = fiber.child; if (null !== child) (child.return = fiber), (nextEffect = child); else - a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) { + a: for (fiber = deletedSubtreeRoot; null !== nextEffect;) { child = nextEffect; var sibling = child.sibling, returnFiber = child.return; @@ -7786,7 +7800,7 @@ function requestUpdateLane(fiber) { if (null !== fiber) return ( 0 === currentEventTransitionLane && - (currentEventTransitionLane = claimNextTransitionLane()), + (currentEventTransitionLane = claimNextTransitionLane()), currentEventTransitionLane ); fiber = currentUpdatePriority; @@ -7803,6 +7817,10 @@ function requestDeferredLane() { return workInProgressDeferredLane; } function scheduleUpdateOnFiber(root, fiber, lane) { + updatedComponentForProfiler = { + name: getComponentNameFromFiber(fiber), + key: fiber.key, + }; if ( (root === workInProgressRoot && 2 === workInProgressSuspendedReason) || null !== root.cancelPendingCommit @@ -7818,7 +7836,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root === workInProgressRoot && (0 === (executionContext & 2) && (workInProgressRootInterleavedUpdatedLanes |= lane), - 4 === workInProgressRootExitStatus && + 4 === workInProgressRootExitStatus && markRootSuspended( root, workInProgressRootRenderLanes, @@ -7826,9 +7844,9 @@ function scheduleUpdateOnFiber(root, fiber, lane) { )), ensureRootIsScheduled(root), 2 === lane && - 0 === executionContext && - 0 === (fiber.mode & 1) && - ((workInProgressRootRenderTargetTime = now() + 500), + 0 === executionContext && + 0 === (fiber.mode & 1) && + ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!0)); } function performConcurrentWorkOnRoot(root, didTimeout) { @@ -7868,19 +7886,19 @@ function performConcurrentWorkOnRoot(root, didTimeout) { ); 0 !== errorRetryLanes && ((lanes = errorRetryLanes), - (exitStatus = recoverFromConcurrentError( - root, - renderWasConcurrent, - errorRetryLanes - ))); + (exitStatus = recoverFromConcurrentError( + root, + renderWasConcurrent, + errorRetryLanes + ))); } if (1 === exitStatus) throw ( ((originalCallbackNode = workInProgressRootFatalError), - prepareFreshStack(root, 0), - markRootSuspended(root, lanes, 0), - ensureRootIsScheduled(root), - originalCallbackNode) + prepareFreshStack(root, 0), + markRootSuspended(root, lanes, 0), + ensureRootIsScheduled(root), + originalCallbackNode) ); root.finishedWork = didTimeout; root.finishedLanes = lanes; @@ -7911,7 +7929,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { (lanes & 62914560) === lanes && 3 === exitStatus && ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) + 10 < exitStatus) ) { markRootSuspended( renderWasConcurrent, @@ -7981,9 +7999,9 @@ function queueRecoverableErrors(errors) { null === workInProgressRootRecoverableErrors ? (workInProgressRootRecoverableErrors = errors) : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); + workInProgressRootRecoverableErrors, + errors + ); } function commitRootWhenReady( root, @@ -7997,7 +8015,7 @@ function commitRootWhenReady( commitRoot(root, recoverableErrors, transitions, spawnedLane); } function isRenderConsistentWithExternalStores(finishedWork) { - for (var node = finishedWork; ; ) { + for (var node = finishedWork; ;) { if (node.flags & 16384) { var updateQueue = node.updateQueue; if ( @@ -8020,7 +8038,7 @@ function isRenderConsistentWithExternalStores(finishedWork) { (updateQueue.return = node), (node = updateQueue); else { if (node === finishedWork) break; - for (; null === node.sibling; ) { + for (; null === node.sibling;) { if (null === node.return || node.return === finishedWork) return !0; node = node.return; } @@ -8059,7 +8077,7 @@ function resetWorkInProgressStack() { (thenableState$1 = null), (thenableIndexCounter$1 = 0), (interruptedWork = workInProgress); - for (; null !== interruptedWork; ) + for (; null !== interruptedWork;) unwindInterruptedWork(interruptedWork.alternate, interruptedWork), (interruptedWork = interruptedWork.return); workInProgress = null; @@ -8087,7 +8105,7 @@ function prepareFreshStack(root, lanes) { workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = - 0; + 0; workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null; 0 !== (lanes & 8) && (lanes |= lanes & 32); @@ -8117,31 +8135,31 @@ function handleThrow(root, thrownValue) { (workInProgressSuspendedReason = (null !== root && ((workInProgressRootRenderLanes & 4194176) === - workInProgressRootRenderLanes + workInProgressRootRenderLanes ? null !== shellBoundary : ((workInProgressRootRenderLanes & 62914560) !== - workInProgressRootRenderLanes && - 0 === (workInProgressRootRenderLanes & 536870912)) || - root !== shellBoundary)) || - 0 !== (workInProgressRootSkippedLanes & 134217727) || - 0 !== (workInProgressRootInterleavedUpdatedLanes & 134217727) + workInProgressRootRenderLanes && + 0 === (workInProgressRootRenderLanes & 536870912)) || + root !== shellBoundary)) || + 0 !== (workInProgressRootSkippedLanes & 134217727) || + 0 !== (workInProgressRootInterleavedUpdatedLanes & 134217727) ? 3 : 2)) : thrownValue === SuspenseyCommitException - ? ((thrownValue = getSuspendedThenable()), - (workInProgressSuspendedReason = 4)) - : (workInProgressSuspendedReason = + ? ((thrownValue = getSuspendedThenable()), + (workInProgressSuspendedReason = 4)) + : (workInProgressSuspendedReason = thrownValue === SelectiveHydrationException ? 8 : null !== thrownValue && "object" === typeof thrownValue && "function" === typeof thrownValue.then - ? 6 - : 1); + ? 6 + : 1); workInProgressThrownValue = thrownValue; null === workInProgress && ((workInProgressRootExitStatus = 1), - (workInProgressRootFatalError = thrownValue)); + (workInProgressRootFatalError = thrownValue)); } function pushDispatcher() { var prevDispatcher = ReactCurrentDispatcher.current; @@ -8207,7 +8225,7 @@ function renderRootSync(root, lanes) { return workInProgressRootExitStatus; } function workLoopSync() { - for (; null !== workInProgress; ) performUnitOfWork(workInProgress); + for (; null !== workInProgress;) performUnitOfWork(workInProgress); } function renderRootConcurrent(root, lanes) { var prevExecutionContext = executionContext; @@ -8310,7 +8328,7 @@ function renderRootConcurrent(root, lanes) { return workInProgressRootExitStatus; } function workLoopConcurrent() { - for (; null !== workInProgress && !shouldYield(); ) + for (; null !== workInProgress && !shouldYield();) performUnitOfWork(workInProgress); } function performUnitOfWork(unitOfWork) { @@ -8416,8 +8434,8 @@ function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { root = root.return; null !== root && ((root.flags |= 32768), - (root.subtreeFlags = 0), - (root.deletions = null)); + (root.subtreeFlags = 0), + (root.deletions = null)); workInProgress = root; } while (null !== root); workInProgressRootExitStatus = 6; @@ -8450,6 +8468,9 @@ function completeUnitOfWork(unitOfWork) { function commitRoot(root, recoverableErrors, transitions, spawnedLane) { var previousUpdateLanePriority = currentUpdatePriority, prevTransition = ReactCurrentBatchConfig.transition; + defrost.writeInLogFiles(Date.now() + "", { list: updatedComponents, change: updatedComponentForProfiler }) + updatedComponents = [] + updatedComponentForProfiler = null try { (ReactCurrentBatchConfig.transition = null), (currentUpdatePriority = 2), @@ -8494,15 +8515,15 @@ function commitRootImpl( markRootFinished(root, remainingLanes, spawnedLane); root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); + (workInProgressRootRenderLanes = 0)); (0 === (finishedWork.subtreeFlags & 10256) && 0 === (finishedWork.flags & 10256)) || rootDoesHavePassiveEffects || ((rootDoesHavePassiveEffects = !0), - scheduleCallback(NormalPriority, function () { - flushPassiveEffects(); - return null; - })); + scheduleCallback(NormalPriority, function () { + flushPassiveEffects(); + return null; + })); spawnedLane = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || spawnedLane) { spawnedLane = ReactCurrentBatchConfig.transition; @@ -8523,8 +8544,8 @@ function commitRootImpl( } else root.current = finishedWork; rootDoesHavePassiveEffects && ((rootDoesHavePassiveEffects = !1), - (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = transitions)); + (rootWithPendingPassiveEffects = root), + (pendingPassiveEffectsLanes = transitions)); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); @@ -8544,9 +8565,9 @@ function commitRootImpl( if (hasUncaughtError) throw ( ((hasUncaughtError = !1), - (root = firstUncaughtError), - (firstUncaughtError = null), - root) + (root = firstUncaughtError), + (firstUncaughtError = null), + root) ); 0 !== (pendingPassiveEffectsLanes & 3) && 0 !== root.tag && @@ -8588,7 +8609,7 @@ function flushPassiveEffects() { ) try { injectedHook.onPostCommitFiberRoot(rendererID, renderPriority); - } catch (err) {} + } catch (err) { } JSCompiler_inline_result = !0; } return JSCompiler_inline_result; @@ -8610,7 +8631,7 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { if (3 === sourceFiber.tag) captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error); else - for (; null !== nearestMountedAncestor; ) { + for (; null !== nearestMountedAncestor;) { if (3 === nearestMountedAncestor.tag) { captureCommitPhaseErrorOnRoot( nearestMountedAncestor, @@ -8622,7 +8643,7 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { var instance = nearestMountedAncestor.stateNode; if ( "function" === - typeof nearestMountedAncestor.type.getDerivedStateFromError || + typeof nearestMountedAncestor.type.getDerivedStateFromError || ("function" === typeof instance.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) @@ -8640,7 +8661,7 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { ); null !== nearestMountedAncestor && (markRootUpdated(nearestMountedAncestor, 2), - ensureRootIsScheduled(nearestMountedAncestor)); + ensureRootIsScheduled(nearestMountedAncestor)); break; } } @@ -8656,12 +8677,12 @@ function attachPingListener(root, wakeable, lanes) { } else (threadIDs = pingCache.get(wakeable)), void 0 === threadIDs && - ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs)); + ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs)); threadIDs.has(lanes) || ((workInProgressRootDidAttachPingListener = !0), - threadIDs.add(lanes), - (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)), - wakeable.then(root, root)); + threadIDs.add(lanes), + (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)), + wakeable.then(root, root)); } function pingSuspendedRoot(root, wakeable, pingedLanes) { var pingCache = root.pingCache; @@ -8670,10 +8691,10 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { workInProgressRoot === root && (workInProgressRootRenderLanes & pingedLanes) === pingedLanes && (4 === workInProgressRootExitStatus || - (3 === workInProgressRootExitStatus && - (workInProgressRootRenderLanes & 62914560) === + (3 === workInProgressRootExitStatus && + (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes && - 300 > now() - globalMostRecentFallbackTime) + 300 > now() - globalMostRecentFallbackTime) ? 0 === (executionContext & 2) && prepareFreshStack(root, 0) : (workInProgressRootPingedLanes |= pingedLanes)); ensureRootIsScheduled(root); @@ -8684,7 +8705,7 @@ function retryTimedOutBoundary(boundaryFiber, retryLane) { boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && (markRootUpdated(boundaryFiber, retryLane), - ensureRootIsScheduled(boundaryFiber)); + ensureRootIsScheduled(boundaryFiber)); } function retryDehydratedSuspenseBoundary(boundaryFiber) { var suspenseState = boundaryFiber.memoizedState, @@ -8843,8 +8864,8 @@ beginWork = function (current, workInProgress, renderLanes) { } throw Error( "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." + Component + + ". Lazy element type must resolve to a class or function." ); } return workInProgress; @@ -8891,10 +8912,10 @@ beginWork = function (current, workInProgress, renderLanes) { context = workInProgress.memoizedState.element; context === Component ? (workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - )) + current, + workInProgress, + renderLanes + )) : (reconcileChildren(current, workInProgress, context, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; @@ -8921,11 +8942,11 @@ beginWork = function (current, workInProgress, renderLanes) { (Component = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - Component, - renderLanes - )) + workInProgress, + null, + Component, + renderLanes + )) : reconcileChildren(current, workInProgress, Component, renderLanes), workInProgress.child ); @@ -8999,7 +9020,7 @@ beginWork = function (current, workInProgress, renderLanes) { } else for ( hasContext = workInProgress.child, - null !== hasContext && (hasContext.return = workInProgress); + null !== hasContext && (hasContext.return = workInProgress); null !== hasContext; ) { @@ -9062,7 +9083,7 @@ beginWork = function (current, workInProgress, renderLanes) { } else newValue = hasContext.child; if (null !== newValue) newValue.return = hasContext; else - for (newValue = hasContext; null !== newValue; ) { + for (newValue = hasContext; null !== newValue;) { if (newValue === workInProgress) { newValue = null; break; @@ -9150,8 +9171,8 @@ beginWork = function (current, workInProgress, renderLanes) { } throw Error( "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." ); }; function scheduleCallback(priorityLevel, callback) { @@ -9166,7 +9187,7 @@ function FiberNode(tag, pendingProps, key, mode) { this.stateNode = this.type = this.elementType = - null; + null; this.index = 0; this.refCleanup = this.ref = null; this.pendingProps = pendingProps; @@ -9174,7 +9195,7 @@ function FiberNode(tag, pendingProps, key, mode) { this.memoizedState = this.updateQueue = this.memoizedProps = - null; + null; this.mode = mode; this.subtreeFlags = this.flags = 0; this.deletions = null; @@ -9202,11 +9223,11 @@ function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress ? ((workInProgress = createFiber( - current.tag, - pendingProps, - current.key, - current.mode - )), + current.tag, + pendingProps, + current.key, + current.mode + )), (workInProgress.elementType = current.elementType), (workInProgress.type = current.type), (workInProgress.stateNode = current.stateNode), @@ -9262,9 +9283,9 @@ function resetWorkInProgress(workInProgress, renderLanes) { null === renderLanes ? null : { - lanes: renderLanes.lanes, - firstContext: renderLanes.firstContext - })); + lanes: renderLanes.lanes, + firstContext: renderLanes.firstContext + })); return workInProgress; } function createFiberFromTypeAndProps( @@ -9333,7 +9354,7 @@ function createFiberFromTypeAndProps( } throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + - ((null == type ? type : typeof type) + ".") + ((null == type ? type : typeof type) + ".") ); } key = createFiber(fiberTag, pendingProps, key, mode); @@ -9368,7 +9389,7 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((primaryChildInstance._pendingVisibility |= 2), - scheduleUpdateOnFiber(root, fiber, 2)); + scheduleUpdateOnFiber(root, fiber, 2)); } }, attach: function () { @@ -9381,7 +9402,7 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((primaryChildInstance._pendingVisibility &= -3), - scheduleUpdateOnFiber(root, fiber, 2)); + scheduleUpdateOnFiber(root, fiber, 2)); } } }; @@ -9422,14 +9443,14 @@ function FiberRootNode( this.pingCache = this.current = this.pendingChildren = - null; + null; this.timeoutHandle = -1; this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = - null; + null; this.callbackPriority = 0; this.expirationTimes = createLaneMap(-1); this.entangledLanes = @@ -9440,7 +9461,7 @@ function FiberRootNode( this.pingedLanes = this.suspendedLanes = this.pendingLanes = - 0; + 0; this.entanglements = createLaneMap(0); this.hiddenUpdates = createLaneMap(null); this.identifierPrefix = identifierPrefix; @@ -9529,7 +9550,7 @@ function updateContainer(element, container, parentComponent, callback) { element = enqueueUpdate(current, container, lane); null !== element && (scheduleUpdateOnFiber(element, current, lane), - entangleTransitions(element, current, lane)); + entangleTransitions(element, current, lane)); return lane; } function emptyFindFiberByHostInstance() { @@ -9553,8 +9574,8 @@ function findNodeHandle(componentOrHandle) { return null == componentOrHandle ? componentOrHandle : null != componentOrHandle._nativeTag - ? componentOrHandle._nativeTag - : ReactNativePrivateInterface.getNativeTagFromPublicInstance( + ? componentOrHandle._nativeTag + : ReactNativePrivateInterface.getNativeTagFromPublicInstance( componentOrHandle ); } @@ -9579,7 +9600,7 @@ batchedUpdatesImpl = function (fn, a) { } finally { (executionContext = prevExecutionContext), 0 === executionContext && - ((workInProgressRootRenderTargetTime = now() + 500), + ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!0)); } }; @@ -9643,7 +9664,7 @@ if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { internals$jscomp$inline_1353 )), (injectedHook = hook$jscomp$inline_1354); - } catch (err) {} + } catch (err) { } } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) { @@ -9667,9 +9688,9 @@ exports.dispatchCommand = function (handle, command, args) { : ReactNativePrivateInterface.getNativeTagFromPublicInstance(handle); null != nativeTag && ((handle = ReactNativePrivateInterface.getNodeFromPublicInstance(handle)), - null != handle - ? nativeFabricUIManager.dispatchCommand(handle, command, args) - : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand( + null != handle + ? nativeFabricUIManager.dispatchCommand(handle, command, args) + : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand( nativeTag, command, args @@ -9679,10 +9700,10 @@ exports.findHostInstance_DEPRECATED = function (componentOrHandle) { return null == componentOrHandle ? null : componentOrHandle.canonical && componentOrHandle.canonical.publicInstance - ? componentOrHandle.canonical.publicInstance - : componentOrHandle._nativeTag - ? componentOrHandle - : findHostInstance(componentOrHandle); + ? componentOrHandle.canonical.publicInstance + : componentOrHandle._nativeTag + ? componentOrHandle + : findHostInstance(componentOrHandle); }; exports.findNodeHandle = findNodeHandle; exports.getInspectorDataForInstance = getInspectorDataForInstance; @@ -9724,9 +9745,9 @@ exports.sendAccessibilityEvent = function (handle, eventType) { : ReactNativePrivateInterface.getNativeTagFromPublicInstance(handle); null != nativeTag && ((handle = ReactNativePrivateInterface.getNodeFromPublicInstance(handle)), - null != handle - ? nativeFabricUIManager.sendAccessibilityEvent(handle, eventType) - : ReactNativePrivateInterface.legacySendAccessibilityEvent( + null != handle + ? nativeFabricUIManager.sendAccessibilityEvent(handle, eventType) + : ReactNativePrivateInterface.legacySendAccessibilityEvent( nativeTag, eventType ));