Transform updates to support Flow this annotation syntax (#25918)

Flow introduced a new syntax to annotated the context type of a
function, this tries to update the rest and add 1 example usage.

- 2b1fb91a55 already added the changes
required for eslint.
- Jest transform is updated to use the recommended `hermes-parser` which
can parse current and Flow syntax and will be updated in the future.
- Rollup uses a new plugin to strip the flow types. This isn't ideal as
the npm module is deprecated in favor of using `hermes-parser`, but I
couldn't figure out how to integrate that with Rollup.

DiffTrain build for [b83baf63f7](https://github.com/facebook/react/commit/b83baf63f71669ca7bf222afec305b7a6fd782b7)
[View git log for this commit](https://github.com/facebook/react/commits/b83baf63f71669ca7bf222afec305b7a6fd782b7)
This commit is contained in:
kassens
2023-01-05 20:50:52 +00:00
parent 3d02074c9a
commit f7173f143a
41 changed files with 658 additions and 579 deletions
+1 -1
View File
@@ -1 +1 @@
2619886ac0f1d41c9b361d82f069f9ed682321ff
b83baf63f71669ca7bf222afec305b7a6fd782b7
+1 -1
View File
@@ -1 +1 @@
2619886ac0f1d41c9b361d82f069f9ed682321ff
b83baf63f71669ca7bf222afec305b7a6fd782b7
+3 -3
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-classic-2619886ac-20230105";
var ReactVersion = "18.3.0-www-classic-b83baf63f-20230105";
// ATTENTION
// When adding new symbols to this file,
@@ -1252,7 +1252,6 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
return subtreeCount;
}
/**
* Maps children that are typically specified as `props.children`.
*
@@ -1266,6 +1265,7 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
* @param {*} context Context for mapFunction.
* @return {object} Object containing the ordered map of results.
*/
function mapChildren(children, func, context) {
if (children == null) {
return children;
@@ -1295,7 +1295,6 @@ function countChildren(children) {
});
return n;
}
/**
* Iterates through children that are typically specified as `props.children`.
*
@@ -1308,6 +1307,7 @@ function countChildren(children) {
* @param {function(*, int)} forEachFunc
* @param {*} forEachContext Context for forEachContext.
*/
function forEachChildren(children, forEachFunc, forEachContext) {
mapChildren(
children,
+3 -3
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-modern-2619886ac-20230105";
var ReactVersion = "18.3.0-www-modern-b83baf63f-20230105";
// ATTENTION
// When adding new symbols to this file,
@@ -1252,7 +1252,6 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
return subtreeCount;
}
/**
* Maps children that are typically specified as `props.children`.
*
@@ -1266,6 +1265,7 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
* @param {*} context Context for mapFunction.
* @return {object} Object containing the ordered map of results.
*/
function mapChildren(children, func, context) {
if (children == null) {
return children;
@@ -1295,7 +1295,6 @@ function countChildren(children) {
});
return n;
}
/**
* Iterates through children that are typically specified as `props.children`.
*
@@ -1308,6 +1307,7 @@ function countChildren(children) {
* @param {function(*, int)} forEachFunc
* @param {*} forEachContext Context for forEachContext.
*/
function forEachChildren(children, forEachFunc, forEachContext) {
mapChildren(
children,
+1 -1
View File
@@ -643,4 +643,4 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-2619886ac-20230105";
exports.version = "18.3.0-www-classic-b83baf63f-20230105";
+1 -1
View File
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-2619886ac-20230105";
exports.version = "18.3.0-www-modern-b83baf63f-20230105";
@@ -654,7 +654,7 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-2619886ac-20230105";
exports.version = "18.3.0-www-classic-b83baf63f-20230105";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -646,7 +646,7 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-2619886ac-20230105";
exports.version = "18.3.0-www-modern-b83baf63f-20230105";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
+37 -29
View File
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-classic-2619886ac-20230105";
var ReactVersion = "18.3.0-www-classic-b83baf63f-20230105";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -505,7 +505,6 @@ function getComponentNameFromFiber(fiber) {
return null;
}
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -968,9 +967,9 @@ var now = Scheduler.unstable_now;
var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
var NormalPriority = Scheduler.unstable_NormalPriority;
var IdlePriority = Scheduler.unstable_IdlePriority;
// this doesn't actually exist on the scheduler, but it *does*
var IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*
// on scheduler/unstable_mock, which we'll need for internal testing
var unstable_yieldValue = Scheduler.unstable_yieldValue;
var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;
@@ -3930,10 +3929,10 @@ function isRootDehydrated(root) {
return currentState.isDehydrated;
}
// TODO: Use the unified fiber stack module instead of this local one?
// Intentionally not using it yet to derisk the initial implementation, because
// the way we push/pop these values is a bit unusual. If there's a mistake, I'd
// rather the ids be wrong than crash the whole reconciler.
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
@@ -4121,10 +4120,10 @@ function queueHydrationError(error) {
}
}
// If a render is in progress, and we receive an update from a concurrent event,
// we wait until the current render is over (either finished or interrupted)
// before adding it to the fiber/hook queue. Push to this array so we can
// access the queue, fiber, update, et al later.
var concurrentQueues = [];
var concurrentQueuesIndex = 0;
var concurrentlyUpdatedLanes = NoLanes;
@@ -5700,12 +5699,11 @@ function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
}
// This wrapper function exists because I expect to clone the code in each path
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
@@ -6829,6 +6827,7 @@ function resetChildFibers(workInProgress, lanes) {
// TODO: This isn't being used yet, but it's intended to replace the
// InvisibleParentContext that is currently managed by SuspenseContext.
var currentTreeHiddenStackCursor = createCursor(null);
var prevRenderLanesStackCursor = createCursor(NoLanes);
function pushHiddenContext(fiber, context) {
@@ -6996,6 +6995,13 @@ function popSuspenseListContext(fiber) {
pop(suspenseStackCursor, fiber);
}
// A non-null SuspenseState means that it is blocked for one reason or another.
// - A non-null dehydrated field means it's blocked pending hydration.
// - A non-null dehydrated field can use isSuspenseInstancePending or
// isSuspenseInstanceFallback to query the reason for being dehydrated.
// - A null dehydrated field means it's blocked by something suspending and
// we're currently showing a fallback instead.
function findFirstSuspended(row) {
var node = row;
@@ -7119,9 +7125,9 @@ function warnAboutMultipleRenderersDEV(mutableSource) {
}
} // Eager reads the version of a mutable source and stores it on the root.
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
// An error that is thrown (e.g. by `use`) to trigger Suspense. If we
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we
// detect this is caught by userspace, we'll log a warning in development.
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 " +
@@ -7279,9 +7285,8 @@ var didWarnAboutUseWrappedInTryCatch;
{
didWarnAboutMismatchedHooksForComponent = new Set();
didWarnAboutUseWrappedInTryCatch = new Set();
}
} // These are set right before calling the component.
// These are set right before calling the component.
var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
@@ -9011,10 +9016,8 @@ function updateLayoutEffect(create, deps) {
function imperativeHandleEffect(create, ref) {
if (typeof ref === "function") {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
var inst = create();
refCallback(inst);
return function() {
refCallback(null);
};
@@ -9031,9 +9034,9 @@ function imperativeHandleEffect(create, ref) {
}
}
var _inst2 = create();
var _inst = create();
refObject.current = _inst2;
refObject.current = _inst;
return function() {
refObject.current = null;
};
@@ -11312,9 +11315,9 @@ function checkClassInstance(workInProgress, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -16968,9 +16971,9 @@ var AbortControllerLocal =
return listener();
});
};
};
// Intentionally not named imports because Rollup would
}; // Intentionally not named imports because Rollup would
// use dynamic dispatch for CommonJS interop named imports.
var scheduleCallback$1 = Scheduler.unstable_scheduleCallback,
NormalPriority$1 = Scheduler.unstable_NormalPriority;
var CacheContext = {
@@ -24118,8 +24121,9 @@ function getExecutionContext() {
}
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync(fn) {
// In legacy mode, we flush pending passive effects at the beginning of the
// next event, not at the end of the previous one.
@@ -25534,8 +25538,8 @@ function flushPassiveEffectsImpl() {
pendingPassiveProfilerEffects = [];
for (var i = 0; i < profilerEffects.length; i++) {
var _fiber = profilerEffects[i];
commitPassiveEffectDurations(root, _fiber);
var fiber = profilerEffects[i];
commitPassiveEffectDurations(root, fiber);
}
}
@@ -26314,6 +26318,8 @@ function setIsRunningInsertionEffect(isRunning) {
}
/* eslint-disable react-internal/prod-error-codes */
// Used by React Refresh runtime through DevTools Global Hook.
var resolveFamily = null;
var failedBoundaries = null;
var setRefreshHandler = function(handler) {
@@ -26579,10 +26585,10 @@ function scheduleFibersWithFamiliesRecursively(
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
@@ -27601,6 +27607,8 @@ function createFiberRoot(
return root;
}
// Might add PROFILE later.
var didWarnAboutNestedUpdates;
{
+37 -29
View File
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-modern-2619886ac-20230105";
var ReactVersion = "18.3.0-www-modern-b83baf63f-20230105";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -505,7 +505,6 @@ function getComponentNameFromFiber(fiber) {
return null;
}
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -965,9 +964,9 @@ var now = Scheduler.unstable_now;
var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
var NormalPriority = Scheduler.unstable_NormalPriority;
var IdlePriority = Scheduler.unstable_IdlePriority;
// this doesn't actually exist on the scheduler, but it *does*
var IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*
// on scheduler/unstable_mock, which we'll need for internal testing
var unstable_yieldValue = Scheduler.unstable_yieldValue;
var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;
@@ -3692,10 +3691,10 @@ function isRootDehydrated(root) {
return currentState.isDehydrated;
}
// TODO: Use the unified fiber stack module instead of this local one?
// Intentionally not using it yet to derisk the initial implementation, because
// the way we push/pop these values is a bit unusual. If there's a mistake, I'd
// rather the ids be wrong than crash the whole reconciler.
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
@@ -3883,10 +3882,10 @@ function queueHydrationError(error) {
}
}
// If a render is in progress, and we receive an update from a concurrent event,
// we wait until the current render is over (either finished or interrupted)
// before adding it to the fiber/hook queue. Push to this array so we can
// access the queue, fiber, update, et al later.
var concurrentQueues = [];
var concurrentQueuesIndex = 0;
var concurrentlyUpdatedLanes = NoLanes;
@@ -5462,12 +5461,11 @@ function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
}
// This wrapper function exists because I expect to clone the code in each path
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
@@ -6591,6 +6589,7 @@ function resetChildFibers(workInProgress, lanes) {
// TODO: This isn't being used yet, but it's intended to replace the
// InvisibleParentContext that is currently managed by SuspenseContext.
var currentTreeHiddenStackCursor = createCursor(null);
var prevRenderLanesStackCursor = createCursor(NoLanes);
function pushHiddenContext(fiber, context) {
@@ -6758,6 +6757,13 @@ function popSuspenseListContext(fiber) {
pop(suspenseStackCursor, fiber);
}
// A non-null SuspenseState means that it is blocked for one reason or another.
// - A non-null dehydrated field means it's blocked pending hydration.
// - A non-null dehydrated field can use isSuspenseInstancePending or
// isSuspenseInstanceFallback to query the reason for being dehydrated.
// - A null dehydrated field means it's blocked by something suspending and
// we're currently showing a fallback instead.
function findFirstSuspended(row) {
var node = row;
@@ -6881,9 +6887,9 @@ function warnAboutMultipleRenderersDEV(mutableSource) {
}
} // Eager reads the version of a mutable source and stores it on the root.
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
// An error that is thrown (e.g. by `use`) to trigger Suspense. If we
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we
// detect this is caught by userspace, we'll log a warning in development.
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 " +
@@ -7041,9 +7047,8 @@ var didWarnAboutUseWrappedInTryCatch;
{
didWarnAboutMismatchedHooksForComponent = new Set();
didWarnAboutUseWrappedInTryCatch = new Set();
}
} // These are set right before calling the component.
// These are set right before calling the component.
var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
@@ -8773,10 +8778,8 @@ function updateLayoutEffect(create, deps) {
function imperativeHandleEffect(create, ref) {
if (typeof ref === "function") {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
var inst = create();
refCallback(inst);
return function() {
refCallback(null);
};
@@ -8793,9 +8796,9 @@ function imperativeHandleEffect(create, ref) {
}
}
var _inst2 = create();
var _inst = create();
refObject.current = _inst2;
refObject.current = _inst;
return function() {
refObject.current = null;
};
@@ -11066,9 +11069,9 @@ function checkClassInstance(workInProgress, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -16676,9 +16679,9 @@ var AbortControllerLocal =
return listener();
});
};
};
// Intentionally not named imports because Rollup would
}; // Intentionally not named imports because Rollup would
// use dynamic dispatch for CommonJS interop named imports.
var scheduleCallback$1 = Scheduler.unstable_scheduleCallback,
NormalPriority$1 = Scheduler.unstable_NormalPriority;
var CacheContext = {
@@ -23807,8 +23810,9 @@ function getExecutionContext() {
}
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync(fn) {
// In legacy mode, we flush pending passive effects at the beginning of the
// next event, not at the end of the previous one.
@@ -25223,8 +25227,8 @@ function flushPassiveEffectsImpl() {
pendingPassiveProfilerEffects = [];
for (var i = 0; i < profilerEffects.length; i++) {
var _fiber = profilerEffects[i];
commitPassiveEffectDurations(root, _fiber);
var fiber = profilerEffects[i];
commitPassiveEffectDurations(root, fiber);
}
}
@@ -26003,6 +26007,8 @@ function setIsRunningInsertionEffect(isRunning) {
}
/* eslint-disable react-internal/prod-error-codes */
// Used by React Refresh runtime through DevTools Global Hook.
var resolveFamily = null;
var failedBoundaries = null;
var setRefreshHandler = function(handler) {
@@ -26268,10 +26274,10 @@ function scheduleFibersWithFamiliesRecursively(
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
@@ -27290,6 +27296,8 @@ function createFiberRoot(
return root;
}
// Might add PROFILE later.
var didWarnAboutNestedUpdates;
{
@@ -9796,7 +9796,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-classic-2619886ac-20230105",
version: "18.3.0-www-classic-b83baf63f-20230105",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1319 = {
@@ -9827,7 +9827,7 @@ var internals$jscomp$inline_1319 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-2619886ac-20230105"
reconcilerVersion: "18.3.0-next-b83baf63f-20230105"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1320 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9463,7 +9463,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-2619886ac-20230105",
version: "18.3.0-www-modern-b83baf63f-20230105",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1310 = {
@@ -9494,7 +9494,7 @@ var internals$jscomp$inline_1310 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-2619886ac-20230105"
reconcilerVersion: "18.3.0-next-b83baf63f-20230105"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1311 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+75 -65
View File
@@ -466,7 +466,6 @@ function getComponentNameFromFiber(fiber) {
return null;
}
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -1016,9 +1015,8 @@ function registerDirectEvent(registrationName, dependencies) {
registrationNameDependencies[registrationName] = dependencies;
{
var _lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[_lowerCasedName] = registrationName;
var lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[lowerCasedName] = registrationName;
if (registrationName === "onDoubleClick") {
possibleRegistrationNames.ondblclick = registrationName;
@@ -1228,8 +1226,8 @@ function checkFormFieldValueStringCoercion(value) {
}
}
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
@@ -1254,8 +1252,8 @@ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a pos
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;
/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR =
":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
/* eslint-enable max-len */
@@ -1845,6 +1843,7 @@ function sanitizeURL(url) {
* The "expected" argument is used as a hint of what the expected value is.
* Some properties have multiple equivalent values.
*/
function getValueForProperty(node, name, expected, propertyInfo) {
{
if (propertyInfo.mustUseProperty) {
@@ -2489,9 +2488,9 @@ function setIsRendering(rendering) {
}
}
// Flow does not allow string concatenation of most non-string types. To work
// around this limitation, we use an opaque type that can only be obtained by
// passing the value through getToStringValue first.
function toString(value) {
// The coercion safety check is performed in getToStringValue().
// eslint-disable-next-line react-internal/safe-string-coercion
@@ -3350,7 +3349,6 @@ function restoreControlledState$1(element, props) {
}
var didWarnValDefaultVal = false;
/**
* Implements a <textarea> host component that allows setting `value`, and
* `defaultValue`. This differs from the traditional DOM API because value is
@@ -3366,6 +3364,7 @@ var didWarnValDefaultVal = false;
* The rendered element will be initialized with an empty value, the prop
* `defaultValue` if specified, or the children content (deprecated).
*/
function getHostProps$2(element, props) {
var node = element;
@@ -7477,9 +7476,9 @@ var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
var NormalPriority = Scheduler.unstable_NormalPriority;
var LowPriority = Scheduler.unstable_LowPriority;
var IdlePriority = Scheduler.unstable_IdlePriority;
// this doesn't actually exist on the scheduler, but it *does*
var IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*
// on scheduler/unstable_mock, which we'll need for internal testing
var unstable_yieldValue = Scheduler.unstable_yieldValue;
var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;
@@ -9729,13 +9728,17 @@ function popHostContext(fiber) {
var Dispatcher = Internals.Dispatcher;
// In the future this may need to change, especially when modules / scripts are supported
// Brief on purpose due to insertion by script when streaming late boundaries
// s = Status
// l = loaded
// e = errored
// It is valid to preload even when we aren't actively rendering. For cases where Float functions are
// called when there is no rendering we track the last used document. It is not safe to insert
// arbitrary resources into the lastCurrentDocument b/c it may not actually be the document
// that the resource is meant to apply too (for example stylesheets or scripts). This is only
// appropriate for resources that don't really have a strict tie to the document itself for example
// preloads
var lastCurrentDocument = null;
var previousDispatcher = null;
function prepareToRenderResources(rootContainer) {
@@ -9754,8 +9757,8 @@ function cleanupAfterRenderResources() {
var ReactDOMClientDispatcher = {
preload: preload,
preinit: preinit
};
// global maps of Resources
}; // global maps of Resources
var preloadResources = new Map(); // getRootNode is missing from IE and old jsdom versions
function getRootNode(container) {
@@ -11615,10 +11618,9 @@ function isHydratable(type, props) {
return false;
} else if (type === "script") {
var _ref = props,
async = _ref.async,
onLoad = _ref.onLoad,
onError = _ref.onError;
var async = props.async,
onLoad = props.onLoad,
onError = props.onError;
return !(async && (onLoad || onError));
}
@@ -12638,9 +12640,8 @@ function restoreStateOfTarget(target) {
var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
if (stateNode) {
var _props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
var props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, props);
}
}
@@ -13114,17 +13115,17 @@ function createSyntheticEvent(Interface) {
this.target = nativeEventTarget;
this.currentTarget = null;
for (var _propName in Interface) {
if (!Interface.hasOwnProperty(_propName)) {
for (var propName in Interface) {
if (!Interface.hasOwnProperty(propName)) {
continue;
}
var normalize = Interface[_propName];
var normalize = Interface[propName];
if (normalize) {
this[_propName] = normalize(nativeEvent);
this[propName] = normalize(nativeEvent);
} else {
this[_propName] = nativeEvent[_propName];
this[propName] = nativeEvent[propName];
}
}
@@ -15102,7 +15103,6 @@ function extractEvents$4(
}
}
// TODO: remove top-level side effect.
registerSimpleEvents();
registerEvents$2();
registerEvents$1();
@@ -16138,13 +16138,13 @@ function queueDiscreteEvent(
// If this was the first discrete event, we might be able to
// synchronously unblock it so that preventDefault still works.
while (queuedEvent.blockedOn !== null) {
var _fiber = getInstanceFromNode$1(queuedEvent.blockedOn);
var fiber = getInstanceFromNode$1(queuedEvent.blockedOn);
if (_fiber === null) {
if (fiber === null) {
break;
}
attemptSynchronousHydration(_fiber);
attemptSynchronousHydration(fiber);
if (queuedEvent.blockedOn === null) {
// We got unblocked by hydration. Let's try again.
@@ -16215,11 +16215,11 @@ function accumulateOrCreateContinuousQueuedReplayableEvent(
);
if (blockedOn !== null) {
var _fiber2 = getInstanceFromNode$1(blockedOn);
var fiber = getInstanceFromNode$1(blockedOn);
if (_fiber2 !== null) {
if (fiber !== null) {
// Attempt to increase the priority of this target.
attemptContinuousHydration(_fiber2);
attemptContinuousHydration(fiber);
}
}
@@ -16440,10 +16440,10 @@ function attemptReplayContinuousQueuedEvent(queuedEvent) {
}
} else {
// We're still blocked. Try again later.
var _fiber3 = getInstanceFromNode$1(nextBlockedOn);
var fiber = getInstanceFromNode$1(nextBlockedOn);
if (_fiber3 !== null) {
attemptContinuousHydration(_fiber3);
if (fiber !== null) {
attemptContinuousHydration(fiber);
}
queuedEvent.blockedOn = nextBlockedOn;
@@ -16474,10 +16474,10 @@ function replayUnblockedEvents() {
// We're still blocked.
// Increase the priority of this boundary to unblock
// the next discrete event.
var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);
var fiber = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);
if (_fiber4 !== null) {
attemptDiscreteHydration(_fiber4);
if (fiber !== null) {
attemptDiscreteHydration(fiber);
}
break;
@@ -17766,10 +17766,10 @@ function logStateUpdateScheduled(componentName, lane, payloadOrAction) {
}
}
// TODO: Use the unified fiber stack module instead of this local one?
// Intentionally not using it yet to derisk the initial implementation, because
// the way we push/pop these values is a bit unusual. If there's a mistake, I'd
// rather the ids be wrong than crash the whole reconciler.
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
@@ -18560,10 +18560,10 @@ function queueHydrationError(error) {
}
}
// If a render is in progress, and we receive an update from a concurrent event,
// we wait until the current render is over (either finished or interrupted)
// before adding it to the fiber/hook queue. Push to this array so we can
// access the queue, fiber, update, et al later.
var concurrentQueues = [];
var concurrentQueuesIndex = 0;
var concurrentlyUpdatedLanes = NoLanes;
@@ -19915,12 +19915,11 @@ function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
}
// This wrapper function exists because I expect to clone the code in each path
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
@@ -21074,6 +21073,7 @@ function resetChildFibers(workInProgress, lanes) {
// TODO: This isn't being used yet, but it's intended to replace the
// InvisibleParentContext that is currently managed by SuspenseContext.
var currentTreeHiddenStackCursor = createCursor(null);
var prevRenderLanesStackCursor = createCursor(NoLanes);
function pushHiddenContext(fiber, context) {
@@ -21241,6 +21241,13 @@ function popSuspenseListContext(fiber) {
pop(suspenseStackCursor, fiber);
}
// A non-null SuspenseState means that it is blocked for one reason or another.
// - A non-null dehydrated field means it's blocked pending hydration.
// - A non-null dehydrated field can use isSuspenseInstancePending or
// isSuspenseInstanceFallback to query the reason for being dehydrated.
// - A null dehydrated field means it's blocked by something suspending and
// we're currently showing a fallback instead.
function findFirstSuspended(row) {
var node = row;
@@ -21379,9 +21386,9 @@ function registerMutableSourceForHydration(root, mutableSource) {
}
}
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
// An error that is thrown (e.g. by `use`) to trigger Suspense. If we
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we
// detect this is caught by userspace, we'll log a warning in development.
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 " +
@@ -21539,9 +21546,8 @@ var didWarnAboutUseWrappedInTryCatch;
{
didWarnAboutMismatchedHooksForComponent = new Set();
didWarnAboutUseWrappedInTryCatch = new Set();
}
} // These are set right before calling the component.
// These are set right before calling the component.
var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
@@ -23305,10 +23311,8 @@ function updateLayoutEffect(create, deps) {
function imperativeHandleEffect(create, ref) {
if (typeof ref === "function") {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
var inst = create();
refCallback(inst);
return function() {
refCallback(null);
};
@@ -23325,9 +23329,9 @@ function imperativeHandleEffect(create, ref) {
}
}
var _inst2 = create();
var _inst = create();
refObject.current = _inst2;
refObject.current = _inst;
return function() {
refObject.current = null;
};
@@ -25620,9 +25624,9 @@ function checkClassInstance(workInProgress, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -31590,9 +31594,9 @@ var AbortControllerLocal =
return listener();
});
};
};
// Intentionally not named imports because Rollup would
}; // Intentionally not named imports because Rollup would
// use dynamic dispatch for CommonJS interop named imports.
var scheduleCallback$1 = Scheduler.unstable_scheduleCallback,
NormalPriority$1 = Scheduler.unstable_NormalPriority;
var CacheContext = {
@@ -39102,8 +39106,9 @@ function discreteUpdates(fn, a, b, c, d) {
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync(fn) {
// In legacy mode, we flush pending passive effects at the beginning of the
// next event, not at the end of the previous one.
@@ -40576,8 +40581,8 @@ function flushPassiveEffectsImpl() {
pendingPassiveProfilerEffects = [];
for (var i = 0; i < profilerEffects.length; i++) {
var _fiber = profilerEffects[i];
commitPassiveEffectDurations(root, _fiber);
var fiber = profilerEffects[i];
commitPassiveEffectDurations(root, fiber);
}
}
@@ -41356,6 +41361,8 @@ function setIsRunningInsertionEffect(isRunning) {
}
/* eslint-disable react-internal/prod-error-codes */
// Used by React Refresh runtime through DevTools Global Hook.
var resolveFamily = null;
var failedBoundaries = null;
var setRefreshHandler = function(handler) {
@@ -41621,10 +41628,10 @@ function scheduleFibersWithFamiliesRecursively(
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
@@ -42666,7 +42673,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-2619886ac-20230105";
var ReactVersion = "18.3.0-www-classic-b83baf63f-20230105";
function createPortal(
children,
@@ -42690,6 +42697,8 @@ function createPortal(
};
}
// Might add PROFILE later.
var didWarnAboutNestedUpdates;
var didWarnAboutFindNodeInStrictMode;
@@ -44280,8 +44289,9 @@ function hydrateRoot$1(container, initialChildren, options) {
return hydrateRoot(container, initialChildren, options);
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync$1(fn) {
{
if (isAlreadyRendering()) {
+75 -65
View File
@@ -219,9 +219,8 @@ function registerDirectEvent(registrationName, dependencies) {
registrationNameDependencies[registrationName] = dependencies;
{
var _lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[_lowerCasedName] = registrationName;
var lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[lowerCasedName] = registrationName;
if (registrationName === "onDoubleClick") {
possibleRegistrationNames.ondblclick = registrationName;
@@ -386,8 +385,8 @@ function checkFormFieldValueStringCoercion(value) {
}
}
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
@@ -412,8 +411,8 @@ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a pos
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;
/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR =
":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
/* eslint-enable max-len */
@@ -1013,6 +1012,7 @@ function sanitizeURL(url) {
* The "expected" argument is used as a hint of what the expected value is.
* Some properties have multiple equivalent values.
*/
function getValueForProperty(node, name, expected, propertyInfo) {
{
if (propertyInfo.mustUseProperty) {
@@ -1975,9 +1975,9 @@ function setIsRendering(rendering) {
}
}
// Flow does not allow string concatenation of most non-string types. To work
// around this limitation, we use an opaque type that can only be obtained by
// passing the value through getToStringValue first.
function toString(value) {
// The coercion safety check is performed in getToStringValue().
// eslint-disable-next-line react-internal/safe-string-coercion
@@ -2836,7 +2836,6 @@ function restoreControlledState$1(element, props) {
}
var didWarnValDefaultVal = false;
/**
* Implements a <textarea> host component that allows setting `value`, and
* `defaultValue`. This differs from the traditional DOM API because value is
@@ -2852,6 +2851,7 @@ var didWarnValDefaultVal = false;
* The rendered element will be initialized with an empty value, the prop
* `defaultValue` if specified, or the children content (deprecated).
*/
function getHostProps$2(element, props) {
var node = element;
@@ -4877,9 +4877,8 @@ function restoreStateOfTarget(target) {
var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
if (stateNode) {
var _props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
var props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, props);
}
}
@@ -5194,7 +5193,6 @@ function set(key, value) {
key._reactInternals = value;
}
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -5646,9 +5644,9 @@ var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
var NormalPriority = Scheduler.unstable_NormalPriority;
var LowPriority = Scheduler.unstable_LowPriority;
var IdlePriority = Scheduler.unstable_IdlePriority;
// this doesn't actually exist on the scheduler, but it *does*
var IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*
// on scheduler/unstable_mock, which we'll need for internal testing
var unstable_yieldValue = Scheduler.unstable_yieldValue;
var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;
@@ -7241,13 +7239,13 @@ function queueDiscreteEvent(
// If this was the first discrete event, we might be able to
// synchronously unblock it so that preventDefault still works.
while (queuedEvent.blockedOn !== null) {
var _fiber = getInstanceFromNode$1(queuedEvent.blockedOn);
var fiber = getInstanceFromNode$1(queuedEvent.blockedOn);
if (_fiber === null) {
if (fiber === null) {
break;
}
attemptSynchronousHydration(_fiber);
attemptSynchronousHydration(fiber);
if (queuedEvent.blockedOn === null) {
// We got unblocked by hydration. Let's try again.
@@ -7318,11 +7316,11 @@ function accumulateOrCreateContinuousQueuedReplayableEvent(
);
if (blockedOn !== null) {
var _fiber2 = getInstanceFromNode$1(blockedOn);
var fiber = getInstanceFromNode$1(blockedOn);
if (_fiber2 !== null) {
if (fiber !== null) {
// Attempt to increase the priority of this target.
attemptContinuousHydration(_fiber2);
attemptContinuousHydration(fiber);
}
}
@@ -7543,10 +7541,10 @@ function attemptReplayContinuousQueuedEvent(queuedEvent) {
}
} else {
// We're still blocked. Try again later.
var _fiber3 = getInstanceFromNode$1(nextBlockedOn);
var fiber = getInstanceFromNode$1(nextBlockedOn);
if (_fiber3 !== null) {
attemptContinuousHydration(_fiber3);
if (fiber !== null) {
attemptContinuousHydration(fiber);
}
queuedEvent.blockedOn = nextBlockedOn;
@@ -7577,10 +7575,10 @@ function replayUnblockedEvents() {
// We're still blocked.
// Increase the priority of this boundary to unblock
// the next discrete event.
var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);
var fiber = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);
if (_fiber4 !== null) {
attemptDiscreteHydration(_fiber4);
if (fiber !== null) {
attemptDiscreteHydration(fiber);
}
break;
@@ -8361,17 +8359,17 @@ function createSyntheticEvent(Interface) {
this.target = nativeEventTarget;
this.currentTarget = null;
for (var _propName in Interface) {
if (!Interface.hasOwnProperty(_propName)) {
for (var propName in Interface) {
if (!Interface.hasOwnProperty(propName)) {
continue;
}
var normalize = Interface[_propName];
var normalize = Interface[propName];
if (normalize) {
this[_propName] = normalize(nativeEvent);
this[propName] = normalize(nativeEvent);
} else {
this[_propName] = nativeEvent[_propName];
this[propName] = nativeEvent[propName];
}
}
@@ -10806,7 +10804,6 @@ function extractEvents$4(
}
}
// TODO: remove top-level side effect.
registerSimpleEvents();
registerEvents$2();
registerEvents$1();
@@ -14233,13 +14230,17 @@ function popHostContext(fiber) {
var Dispatcher = Internals.Dispatcher;
// In the future this may need to change, especially when modules / scripts are supported
// Brief on purpose due to insertion by script when streaming late boundaries
// s = Status
// l = loaded
// e = errored
// It is valid to preload even when we aren't actively rendering. For cases where Float functions are
// called when there is no rendering we track the last used document. It is not safe to insert
// arbitrary resources into the lastCurrentDocument b/c it may not actually be the document
// that the resource is meant to apply too (for example stylesheets or scripts). This is only
// appropriate for resources that don't really have a strict tie to the document itself for example
// preloads
var lastCurrentDocument = null;
var previousDispatcher = null;
function prepareToRenderResources(rootContainer) {
@@ -14258,8 +14259,8 @@ function cleanupAfterRenderResources() {
var ReactDOMClientDispatcher = {
preload: preload,
preinit: preinit
};
// global maps of Resources
}; // global maps of Resources
var preloadResources = new Map(); // getRootNode is missing from IE and old jsdom versions
function getRootNode(container) {
@@ -16119,10 +16120,9 @@ function isHydratable(type, props) {
return false;
} else if (type === "script") {
var _ref = props,
async = _ref.async,
onLoad = _ref.onLoad,
onError = _ref.onError;
var async = props.async,
onLoad = props.onLoad,
onError = props.onError;
return !(async && (onLoad || onError));
}
@@ -17563,10 +17563,10 @@ function logStateUpdateScheduled(componentName, lane, payloadOrAction) {
}
}
// TODO: Use the unified fiber stack module instead of this local one?
// Intentionally not using it yet to derisk the initial implementation, because
// the way we push/pop these values is a bit unusual. If there's a mistake, I'd
// rather the ids be wrong than crash the whole reconciler.
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
@@ -18357,10 +18357,10 @@ function queueHydrationError(error) {
}
}
// If a render is in progress, and we receive an update from a concurrent event,
// we wait until the current render is over (either finished or interrupted)
// before adding it to the fiber/hook queue. Push to this array so we can
// access the queue, fiber, update, et al later.
var concurrentQueues = [];
var concurrentQueuesIndex = 0;
var concurrentlyUpdatedLanes = NoLanes;
@@ -19712,12 +19712,11 @@ function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
}
// This wrapper function exists because I expect to clone the code in each path
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
@@ -20871,6 +20870,7 @@ function resetChildFibers(workInProgress, lanes) {
// TODO: This isn't being used yet, but it's intended to replace the
// InvisibleParentContext that is currently managed by SuspenseContext.
var currentTreeHiddenStackCursor = createCursor(null);
var prevRenderLanesStackCursor = createCursor(NoLanes);
function pushHiddenContext(fiber, context) {
@@ -21038,6 +21038,13 @@ function popSuspenseListContext(fiber) {
pop(suspenseStackCursor, fiber);
}
// A non-null SuspenseState means that it is blocked for one reason or another.
// - A non-null dehydrated field means it's blocked pending hydration.
// - A non-null dehydrated field can use isSuspenseInstancePending or
// isSuspenseInstanceFallback to query the reason for being dehydrated.
// - A null dehydrated field means it's blocked by something suspending and
// we're currently showing a fallback instead.
function findFirstSuspended(row) {
var node = row;
@@ -21176,9 +21183,9 @@ function registerMutableSourceForHydration(root, mutableSource) {
}
}
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
// An error that is thrown (e.g. by `use`) to trigger Suspense. If we
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we
// detect this is caught by userspace, we'll log a warning in development.
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 " +
@@ -21336,9 +21343,8 @@ var didWarnAboutUseWrappedInTryCatch;
{
didWarnAboutMismatchedHooksForComponent = new Set();
didWarnAboutUseWrappedInTryCatch = new Set();
}
} // These are set right before calling the component.
// These are set right before calling the component.
var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
@@ -23102,10 +23108,8 @@ function updateLayoutEffect(create, deps) {
function imperativeHandleEffect(create, ref) {
if (typeof ref === "function") {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
var inst = create();
refCallback(inst);
return function() {
refCallback(null);
};
@@ -23122,9 +23126,9 @@ function imperativeHandleEffect(create, ref) {
}
}
var _inst2 = create();
var _inst = create();
refObject.current = _inst2;
refObject.current = _inst;
return function() {
refObject.current = null;
};
@@ -25409,9 +25413,9 @@ function checkClassInstance(workInProgress, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -31333,9 +31337,9 @@ var AbortControllerLocal =
return listener();
});
};
};
// Intentionally not named imports because Rollup would
}; // Intentionally not named imports because Rollup would
// use dynamic dispatch for CommonJS interop named imports.
var scheduleCallback$1 = Scheduler.unstable_scheduleCallback,
NormalPriority$1 = Scheduler.unstable_NormalPriority;
var CacheContext = {
@@ -38826,8 +38830,9 @@ function discreteUpdates(fn, a, b, c, d) {
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync(fn) {
// In legacy mode, we flush pending passive effects at the beginning of the
// next event, not at the end of the previous one.
@@ -40300,8 +40305,8 @@ function flushPassiveEffectsImpl() {
pendingPassiveProfilerEffects = [];
for (var i = 0; i < profilerEffects.length; i++) {
var _fiber = profilerEffects[i];
commitPassiveEffectDurations(root, _fiber);
var fiber = profilerEffects[i];
commitPassiveEffectDurations(root, fiber);
}
}
@@ -41080,6 +41085,8 @@ function setIsRunningInsertionEffect(isRunning) {
}
/* eslint-disable react-internal/prod-error-codes */
// Used by React Refresh runtime through DevTools Global Hook.
var resolveFamily = null;
var failedBoundaries = null;
var setRefreshHandler = function(handler) {
@@ -41345,10 +41352,10 @@ function scheduleFibersWithFamiliesRecursively(
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
@@ -42390,7 +42397,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-2619886ac-20230105";
var ReactVersion = "18.3.0-www-modern-b83baf63f-20230105";
function createPortal(
children,
@@ -42414,6 +42421,8 @@ function createPortal(
};
}
// Might add PROFILE later.
var didWarnAboutNestedUpdates;
{
@@ -43464,8 +43473,9 @@ function hydrateRoot$1(container, initialChildren, options) {
return hydrateRoot(container, initialChildren, options);
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync$1(fn) {
{
if (isAlreadyRendering()) {
+10 -10
View File
@@ -15543,10 +15543,10 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1751 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-2619886ac-20230105",
version: "18.3.0-www-classic-b83baf63f-20230105",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2136 = {
var internals$jscomp$inline_2135 = {
bundleType: devToolsConfig$jscomp$inline_1751.bundleType,
version: devToolsConfig$jscomp$inline_1751.version,
rendererPackageName: devToolsConfig$jscomp$inline_1751.rendererPackageName,
@@ -15573,19 +15573,19 @@ var internals$jscomp$inline_2136 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-2619886ac-20230105"
reconcilerVersion: "18.3.0-next-b83baf63f-20230105"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2137 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2136 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2137.isDisabled &&
hook$jscomp$inline_2137.supportsFiber
!hook$jscomp$inline_2136.isDisabled &&
hook$jscomp$inline_2136.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2137.inject(
internals$jscomp$inline_2136
(rendererID = hook$jscomp$inline_2136.inject(
internals$jscomp$inline_2135
)),
(injectedHook = hook$jscomp$inline_2137);
(injectedHook = hook$jscomp$inline_2136);
} catch (err) {}
}
assign(Internals, {
@@ -15815,4 +15815,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-2619886ac-20230105";
exports.version = "18.3.0-next-b83baf63f-20230105";
+10 -10
View File
@@ -15104,10 +15104,10 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1719 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-2619886ac-20230105",
version: "18.3.0-www-modern-b83baf63f-20230105",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2111 = {
var internals$jscomp$inline_2110 = {
bundleType: devToolsConfig$jscomp$inline_1719.bundleType,
version: devToolsConfig$jscomp$inline_1719.version,
rendererPackageName: devToolsConfig$jscomp$inline_1719.rendererPackageName,
@@ -15135,19 +15135,19 @@ var internals$jscomp$inline_2111 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-2619886ac-20230105"
reconcilerVersion: "18.3.0-next-b83baf63f-20230105"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2112 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2111 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2112.isDisabled &&
hook$jscomp$inline_2112.supportsFiber
!hook$jscomp$inline_2111.isDisabled &&
hook$jscomp$inline_2111.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2112.inject(
internals$jscomp$inline_2111
(rendererID = hook$jscomp$inline_2111.inject(
internals$jscomp$inline_2110
)),
(injectedHook = hook$jscomp$inline_2112);
(injectedHook = hook$jscomp$inline_2111);
} catch (err) {}
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
@@ -15323,4 +15323,4 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-2619886ac-20230105";
exports.version = "18.3.0-next-b83baf63f-20230105";
@@ -16313,7 +16313,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1825 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-2619886ac-20230105",
version: "18.3.0-www-classic-b83baf63f-20230105",
rendererPackageName: "react-dom"
};
(function(internals) {
@@ -16357,7 +16357,7 @@ var devToolsConfig$jscomp$inline_1825 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-2619886ac-20230105"
reconcilerVersion: "18.3.0-next-b83baf63f-20230105"
});
assign(Internals, {
ReactBrowserEventEmitter: {
@@ -16586,7 +16586,7 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-2619886ac-20230105";
exports.version = "18.3.0-next-b83baf63f-20230105";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -15864,7 +15864,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1793 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-2619886ac-20230105",
version: "18.3.0-www-modern-b83baf63f-20230105",
rendererPackageName: "react-dom"
};
(function(internals) {
@@ -15909,7 +15909,7 @@ var devToolsConfig$jscomp$inline_1793 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-2619886ac-20230105"
reconcilerVersion: "18.3.0-next-b83baf63f-20230105"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function(children, container) {
@@ -16084,7 +16084,7 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-2619886ac-20230105";
exports.version = "18.3.0-next-b83baf63f-20230105";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");
var ReactVersion = "18.3.0-www-classic-2619886ac-20230105";
var ReactVersion = "18.3.0-www-classic-b83baf63f-20230105";
// This refers to a WWW module.
var warningWWW = require("warning");
@@ -255,8 +255,8 @@ var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; //
// $FlowFixMe[method-unbinding]
var hasOwnProperty = Object.prototype.hasOwnProperty;
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
@@ -281,8 +281,8 @@ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a pos
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;
/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR =
":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
/* eslint-enable max-len */
@@ -2751,7 +2751,6 @@ function getValueDescriptorExpectingEnumForWarning(thing) {
: 'something with type "' + typeof thing + '"';
}
// @TODO add bootstrap script to implicit preloads
function createResources() {
return {
// persistent
@@ -3659,11 +3658,10 @@ var scriptRegex = /(<\/|<)(s)(cript)/gi;
var scriptReplacer = function(match, prefix, s, suffix) {
return "" + prefix + (s === "s" ? "\\u0073" : "\\u0053") + suffix;
};
// Allows us to keep track of what we've already written so we can refer back to it.
}; // Allows us to keep track of what we've already written so we can refer back to it.
// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag
// is set, the server will send instructions via data attributes (instead of inline scripts)
function createResponseState(
identifierPrefix,
nonce,
@@ -3784,6 +3782,7 @@ var HTML_TABLE_BODY_MODE = 5;
var HTML_TABLE_ROW_MODE = 6;
var HTML_COLGROUP_MODE = 7; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it
// still makes sense
// Lets us keep track of contextual state and pick it back up after suspending.
function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) {
return {
@@ -4043,6 +4042,7 @@ var attributeEnd = stringToPrecomputedChunk('"');
var attributeEmptyString = stringToPrecomputedChunk('=""');
function pushAttribute(target, responseState, name, value) {
// not null or undefined
switch (name) {
case "style": {
pushStyle(target, responseState, value);
@@ -6485,6 +6485,7 @@ function writeStyleResourceDependencyInJS(
}
function writeStyleResourceAttributeInJS(destination, name, value) {
// not null or undefined
var attributeName = name.toLowerCase();
var attributeValue;
@@ -6673,6 +6674,7 @@ function writeStyleResourceDependencyInAttr(
}
function writeStyleResourceAttributeInAttr(destination, name, value) {
// not null or undefined
var attributeName = name.toLowerCase();
var attributeValue;
@@ -7562,6 +7564,8 @@ var rendererSigil;
rendererSigil = {};
} // Used to store the parent path of all context overrides in a shared linked list.
// Forming a reverse tree.
// The structure of a context snapshot is an implementation of this file.
// Currently, it's implemented as tracking the current active node.
var rootContextSnapshot = null; // We assume that this runtime owns the "current" field on all ReactContext instances.
// This global (actually thread local) state represents what state all those "current",
@@ -8301,9 +8305,9 @@ function checkClassInstance(instance, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -9392,8 +9396,7 @@ var ABORTED = 3;
var ERRORED = 4;
var OPEN = 0;
var CLOSING = 1;
var CLOSED = 2;
// This is a default heuristic for how to split up the HTML content into progressive
var CLOSED = 2; // This is a default heuristic for how to split up the HTML content into progressive
// loading. Our goal is to be able to display additional new content about every 500ms.
// Faster than that is unnecessary and should be throttled on the client. It also
// adds unnecessary overhead to do more splits. We don't know if it's a higher or lower
@@ -9408,6 +9411,7 @@ var CLOSED = 2;
// about 12.5kb of content per 500ms. Not counting starting latency for the first
// paint.
// 500 * 1024 / 8 * .8 * 0.5 / 2
var DEFAULT_PROGRESSIVE_CHUNK_SIZE = 12800;
function defaultErrorHandler(error) {
@@ -11486,13 +11490,12 @@ function abort(request, reason) {
var abortableTasks = request.abortableTasks;
if (abortableTasks.size > 0) {
var _error =
var error =
reason === undefined
? new Error("The render was aborted by the server without a reason.")
: reason;
abortableTasks.forEach(function(task) {
return abortTask(task, request, _error);
return abortTask(task, request, error);
});
abortableTasks.clear();
}
@@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");
var ReactVersion = "18.3.0-www-modern-2619886ac-20230105";
var ReactVersion = "18.3.0-www-modern-b83baf63f-20230105";
// This refers to a WWW module.
var warningWWW = require("warning");
@@ -255,8 +255,8 @@ var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; //
// $FlowFixMe[method-unbinding]
var hasOwnProperty = Object.prototype.hasOwnProperty;
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
@@ -281,8 +281,8 @@ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a pos
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;
/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR =
":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
/* eslint-enable max-len */
@@ -2755,7 +2755,6 @@ function getValueDescriptorExpectingEnumForWarning(thing) {
: 'something with type "' + typeof thing + '"';
}
// @TODO add bootstrap script to implicit preloads
function createResources() {
return {
// persistent
@@ -3663,11 +3662,10 @@ var scriptRegex = /(<\/|<)(s)(cript)/gi;
var scriptReplacer = function(match, prefix, s, suffix) {
return "" + prefix + (s === "s" ? "\\u0073" : "\\u0053") + suffix;
};
// Allows us to keep track of what we've already written so we can refer back to it.
}; // Allows us to keep track of what we've already written so we can refer back to it.
// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag
// is set, the server will send instructions via data attributes (instead of inline scripts)
function createResponseState(
identifierPrefix,
nonce,
@@ -3788,6 +3786,7 @@ var HTML_TABLE_BODY_MODE = 5;
var HTML_TABLE_ROW_MODE = 6;
var HTML_COLGROUP_MODE = 7; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it
// still makes sense
// Lets us keep track of contextual state and pick it back up after suspending.
function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) {
return {
@@ -4047,6 +4046,7 @@ var attributeEnd = stringToPrecomputedChunk('"');
var attributeEmptyString = stringToPrecomputedChunk('=""');
function pushAttribute(target, responseState, name, value) {
// not null or undefined
switch (name) {
case "style": {
pushStyle(target, responseState, value);
@@ -6510,6 +6510,7 @@ function writeStyleResourceDependencyInJS(
}
function writeStyleResourceAttributeInJS(destination, name, value) {
// not null or undefined
var attributeName = name.toLowerCase();
var attributeValue;
@@ -6698,6 +6699,7 @@ function writeStyleResourceDependencyInAttr(
}
function writeStyleResourceAttributeInAttr(destination, name, value) {
// not null or undefined
var attributeName = name.toLowerCase();
var attributeValue;
@@ -7358,6 +7360,8 @@ var rendererSigil;
rendererSigil = {};
} // Used to store the parent path of all context overrides in a shared linked list.
// Forming a reverse tree.
// The structure of a context snapshot is an implementation of this file.
// Currently, it's implemented as tracking the current active node.
var rootContextSnapshot = null; // We assume that this runtime owns the "current" field on all ReactContext instances.
// This global (actually thread local) state represents what state all those "current",
@@ -8087,9 +8091,9 @@ function checkClassInstance(instance, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -9178,8 +9182,7 @@ var ABORTED = 3;
var ERRORED = 4;
var OPEN = 0;
var CLOSING = 1;
var CLOSED = 2;
// This is a default heuristic for how to split up the HTML content into progressive
var CLOSED = 2; // This is a default heuristic for how to split up the HTML content into progressive
// loading. Our goal is to be able to display additional new content about every 500ms.
// Faster than that is unnecessary and should be throttled on the client. It also
// adds unnecessary overhead to do more splits. We don't know if it's a higher or lower
@@ -9194,6 +9197,7 @@ var CLOSED = 2;
// about 12.5kb of content per 500ms. Not counting starting latency for the first
// paint.
// 500 * 1024 / 8 * .8 * 0.5 / 2
var DEFAULT_PROGRESSIVE_CHUNK_SIZE = 12800;
function defaultErrorHandler(error) {
@@ -11261,13 +11265,12 @@ function abort(request, reason) {
var abortableTasks = request.abortableTasks;
if (abortableTasks.size > 0) {
var _error =
var error =
reason === undefined
? new Error("The render was aborted by the server without a reason.")
: reason;
abortableTasks.forEach(function(task) {
return abortTask(task, request, _error);
return abortTask(task, request, error);
});
abortableTasks.clear();
}
@@ -3633,4 +3633,4 @@ exports.renderToString = function(children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "18.3.0-www-classic-2619886ac-20230105";
exports.version = "18.3.0-www-classic-b83baf63f-20230105";
@@ -3546,4 +3546,4 @@ exports.renderToString = function(children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "18.3.0-www-modern-2619886ac-20230105";
exports.version = "18.3.0-www-modern-b83baf63f-20230105";
@@ -252,8 +252,8 @@ var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; //
// $FlowFixMe[method-unbinding]
var hasOwnProperty = Object.prototype.hasOwnProperty;
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
@@ -278,8 +278,8 @@ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a pos
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;
/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR =
":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
/* eslint-enable max-len */
@@ -2752,7 +2752,6 @@ function getValueDescriptorExpectingEnumForWarning(thing) {
: 'something with type "' + typeof thing + '"';
}
// @TODO add bootstrap script to implicit preloads
function createResources() {
return {
// persistent
@@ -3660,11 +3659,10 @@ var scriptRegex = /(<\/|<)(s)(cript)/gi;
var scriptReplacer = function(match, prefix, s, suffix) {
return "" + prefix + (s === "s" ? "\\u0073" : "\\u0053") + suffix;
};
// Allows us to keep track of what we've already written so we can refer back to it.
}; // Allows us to keep track of what we've already written so we can refer back to it.
// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag
// is set, the server will send instructions via data attributes (instead of inline scripts)
function createResponseState(
identifierPrefix,
nonce,
@@ -3785,6 +3783,7 @@ var HTML_TABLE_BODY_MODE = 5;
var HTML_TABLE_ROW_MODE = 6;
var HTML_COLGROUP_MODE = 7; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it
// still makes sense
// Lets us keep track of contextual state and pick it back up after suspending.
function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) {
return {
@@ -4054,6 +4053,7 @@ var attributeEnd = stringToPrecomputedChunk('"');
var attributeEmptyString = stringToPrecomputedChunk('=""');
function pushAttribute(target, responseState, name, value) {
// not null or undefined
switch (name) {
case "style": {
pushStyle(target, responseState, value);
@@ -6517,6 +6517,7 @@ function writeStyleResourceDependencyInJS(
}
function writeStyleResourceAttributeInJS(destination, name, value) {
// not null or undefined
var attributeName = name.toLowerCase();
var attributeValue;
@@ -6705,6 +6706,7 @@ function writeStyleResourceDependencyInAttr(
}
function writeStyleResourceAttributeInAttr(destination, name, value) {
// not null or undefined
var attributeName = name.toLowerCase();
var attributeValue;
@@ -7255,6 +7257,8 @@ var rendererSigil;
rendererSigil = {};
} // Used to store the parent path of all context overrides in a shared linked list.
// Forming a reverse tree.
// The structure of a context snapshot is an implementation of this file.
// Currently, it's implemented as tracking the current active node.
var rootContextSnapshot = null; // We assume that this runtime owns the "current" field on all ReactContext instances.
// This global (actually thread local) state represents what state all those "current",
@@ -7984,9 +7988,9 @@ function checkClassInstance(instance, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -9075,8 +9079,7 @@ var ABORTED = 3;
var ERRORED = 4;
var OPEN = 0;
var CLOSING = 1;
var CLOSED = 2;
// This is a default heuristic for how to split up the HTML content into progressive
var CLOSED = 2; // This is a default heuristic for how to split up the HTML content into progressive
// loading. Our goal is to be able to display additional new content about every 500ms.
// Faster than that is unnecessary and should be throttled on the client. It also
// adds unnecessary overhead to do more splits. We don't know if it's a higher or lower
@@ -9091,6 +9094,7 @@ var CLOSED = 2;
// about 12.5kb of content per 500ms. Not counting starting latency for the first
// paint.
// 500 * 1024 / 8 * .8 * 0.5 / 2
var DEFAULT_PROGRESSIVE_CHUNK_SIZE = 12800;
function defaultErrorHandler(error) {
@@ -11148,13 +11152,12 @@ function abort(request, reason) {
var abortableTasks = request.abortableTasks;
if (abortableTasks.size > 0) {
var _error =
var error =
reason === undefined
? new Error("The render was aborted by the server without a reason.")
: reason;
abortableTasks.forEach(function(task) {
return abortTask(task, request, _error);
return abortTask(task, request, error);
});
abortableTasks.clear();
}
@@ -403,7 +403,6 @@ function getComponentNameFromFiber(fiber) {
return null;
}
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -947,9 +946,8 @@ function registerDirectEvent(registrationName, dependencies) {
registrationNameDependencies[registrationName] = dependencies;
{
var _lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[_lowerCasedName] = registrationName;
var lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[lowerCasedName] = registrationName;
if (registrationName === "onDoubleClick") {
possibleRegistrationNames.ondblclick = registrationName;
@@ -1304,8 +1302,8 @@ function checkFormFieldValueStringCoercion(value) {
}
}
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
@@ -1330,8 +1328,8 @@ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a pos
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;
/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR =
":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
/* eslint-enable max-len */
@@ -1894,6 +1892,7 @@ function sanitizeURL(url) {
* The "expected" argument is used as a hint of what the expected value is.
* Some properties have multiple equivalent values.
*/
function getValueForProperty(node, name, expected, propertyInfo) {
{
if (propertyInfo.mustUseProperty) {
@@ -2533,9 +2532,9 @@ function setIsRendering(rendering) {
}
}
// Flow does not allow string concatenation of most non-string types. To work
// around this limitation, we use an opaque type that can only be obtained by
// passing the value through getToStringValue first.
function toString(value) {
// The coercion safety check is performed in getToStringValue().
// eslint-disable-next-line react-internal/safe-string-coercion
@@ -3338,7 +3337,6 @@ function restoreControlledState$1(element, props) {
}
var didWarnValDefaultVal = false;
/**
* Implements a <textarea> host component that allows setting `value`, and
* `defaultValue`. This differs from the traditional DOM API because value is
@@ -3354,6 +3352,7 @@ var didWarnValDefaultVal = false;
* The rendered element will be initialized with an empty value, the prop
* `defaultValue` if specified, or the children content (deprecated).
*/
function getHostProps$2(element, props) {
var node = element;
@@ -7434,7 +7433,7 @@ var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
var NormalPriority = Scheduler.unstable_NormalPriority;
var LowPriority = Scheduler.unstable_LowPriority;
var IdlePriority = Scheduler.unstable_IdlePriority;
var IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*
var rendererID = null;
var injectedHook = null;
@@ -8995,10 +8994,10 @@ function isRootDehydrated(root) {
return currentState.isDehydrated;
}
// TODO: Use the unified fiber stack module instead of this local one?
// Intentionally not using it yet to derisk the initial implementation, because
// the way we push/pop these values is a bit unusual. If there's a mistake, I'd
// rather the ids be wrong than crash the whole reconciler.
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
@@ -9864,10 +9863,10 @@ function queueHydrationError(error) {
}
}
// If a render is in progress, and we receive an update from a concurrent event,
// we wait until the current render is over (either finished or interrupted)
// before adding it to the fiber/hook queue. Push to this array so we can
// access the queue, fiber, update, et al later.
var concurrentQueues = [];
var concurrentQueuesIndex = 0;
var concurrentlyUpdatedLanes = NoLanes;
@@ -11240,12 +11239,11 @@ function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
}
// This wrapper function exists because I expect to clone the code in each path
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
@@ -12399,6 +12397,7 @@ function resetChildFibers(workInProgress, lanes) {
// TODO: This isn't being used yet, but it's intended to replace the
// InvisibleParentContext that is currently managed by SuspenseContext.
var currentTreeHiddenStackCursor = createCursor(null);
var prevRenderLanesStackCursor = createCursor(NoLanes);
function pushHiddenContext(fiber, context) {
@@ -12566,6 +12565,13 @@ function popSuspenseListContext(fiber) {
pop(suspenseStackCursor, fiber);
}
// A non-null SuspenseState means that it is blocked for one reason or another.
// - A non-null dehydrated field means it's blocked pending hydration.
// - A non-null dehydrated field can use isSuspenseInstancePending or
// isSuspenseInstanceFallback to query the reason for being dehydrated.
// - A null dehydrated field means it's blocked by something suspending and
// we're currently showing a fallback instead.
function findFirstSuspended(row) {
var node = row;
@@ -12704,9 +12710,9 @@ function registerMutableSourceForHydration(root, mutableSource) {
}
}
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
// An error that is thrown (e.g. by `use`) to trigger Suspense. If we
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we
// detect this is caught by userspace, we'll log a warning in development.
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 " +
@@ -12864,9 +12870,8 @@ var didWarnAboutUseWrappedInTryCatch;
{
didWarnAboutMismatchedHooksForComponent = new Set();
didWarnAboutUseWrappedInTryCatch = new Set();
}
} // These are set right before calling the component.
// These are set right before calling the component.
var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
@@ -14393,10 +14398,8 @@ function updateLayoutEffect(create, deps) {
function imperativeHandleEffect(create, ref) {
if (typeof ref === "function") {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
var inst = create();
refCallback(inst);
return function() {
refCallback(null);
};
@@ -14413,9 +14416,9 @@ function imperativeHandleEffect(create, ref) {
}
}
var _inst2 = create();
var _inst = create();
refObject.current = _inst2;
refObject.current = _inst;
return function() {
refObject.current = null;
};
@@ -16344,9 +16347,9 @@ function checkClassInstance(workInProgress, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -21410,9 +21413,9 @@ var AbortControllerLocal =
return listener();
});
};
};
// Intentionally not named imports because Rollup would
}; // Intentionally not named imports because Rollup would
// use dynamic dispatch for CommonJS interop named imports.
var scheduleCallback$1 = Scheduler.unstable_scheduleCallback,
NormalPriority$1 = Scheduler.unstable_NormalPriority;
var CacheContext = {
@@ -28230,8 +28233,9 @@ function discreteUpdates(fn, a, b, c, d) {
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync(fn) {
// In legacy mode, we flush pending passive effects at the beginning of the
// next event, not at the end of the previous one.
@@ -30072,6 +30076,8 @@ function setIsRunningInsertionEffect(isRunning) {
}
/* eslint-disable react-internal/prod-error-codes */
// Used by React Refresh runtime through DevTools Global Hook.
var resolveFamily = null;
var failedBoundaries = null;
var setRefreshHandler = function(handler) {
@@ -30337,10 +30343,10 @@ function scheduleFibersWithFamiliesRecursively(
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
@@ -31191,7 +31197,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-2619886ac-20230105";
var ReactVersion = "18.3.0-www-classic-b83baf63f-20230105";
function createPortal(
children,
@@ -31215,6 +31221,8 @@ function createPortal(
};
}
// Might add PROFILE later.
var didWarnAboutNestedUpdates;
var didWarnAboutFindNodeInStrictMode;
@@ -32700,9 +32708,8 @@ function restoreStateOfTarget(target) {
var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
if (stateNode) {
var _props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
var props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, props);
}
}
@@ -32895,8 +32902,9 @@ function hydrateRoot$1(container, initialChildren, options) {
return hydrateRoot(container, initialChildren, options);
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync$1(fn) {
{
if (isAlreadyRendering()) {
@@ -33602,13 +33610,17 @@ function getValueDescriptorExpectingEnumForWarning(thing) {
var Dispatcher$1 = ReactDOMSharedInternals.Dispatcher;
// In the future this may need to change, especially when modules / scripts are supported
// Brief on purpose due to insertion by script when streaming late boundaries
// s = Status
// l = loaded
// e = errored
// It is valid to preload even when we aren't actively rendering. For cases where Float functions are
// called when there is no rendering we track the last used document. It is not safe to insert
// arbitrary resources into the lastCurrentDocument b/c it may not actually be the document
// that the resource is meant to apply too (for example stylesheets or scripts). This is only
// appropriate for resources that don't really have a strict tie to the document itself for example
// preloads
var lastCurrentDocument = null;
var previousDispatcher = null;
function prepareToRenderResources(rootContainer) {
@@ -33627,8 +33639,8 @@ function cleanupAfterRenderResources() {
var ReactDOMClientDispatcher = {
preload: preload$1,
preinit: preinit$1
};
// global maps of Resources
}; // global maps of Resources
var preloadResources = new Map(); // getRootNode is missing from IE and old jsdom versions
function getRootNode(container) {
@@ -35484,10 +35496,9 @@ function isHydratable(type, props) {
return false;
} else if (type === "script") {
var _ref = props,
async = _ref.async,
onLoad = _ref.onLoad,
onError = _ref.onError;
var async = props.async,
onLoad = props.onLoad,
onError = props.onError;
return !(async && (onLoad || onError));
}
@@ -36869,17 +36880,17 @@ function createSyntheticEvent(Interface) {
this.target = nativeEventTarget;
this.currentTarget = null;
for (var _propName in Interface) {
if (!Interface.hasOwnProperty(_propName)) {
for (var propName in Interface) {
if (!Interface.hasOwnProperty(propName)) {
continue;
}
var normalize = Interface[_propName];
var normalize = Interface[propName];
if (normalize) {
this[_propName] = normalize(nativeEvent);
this[propName] = normalize(nativeEvent);
} else {
this[_propName] = nativeEvent[_propName];
this[propName] = nativeEvent[propName];
}
}
@@ -38804,7 +38815,6 @@ function extractEvents$4(
}
}
// TODO: remove top-level side effect.
registerSimpleEvents();
registerEvents$2();
registerEvents$1();
@@ -39854,11 +39864,11 @@ function accumulateOrCreateContinuousQueuedReplayableEvent(
);
if (blockedOn !== null) {
var _fiber2 = getInstanceFromNode$1(blockedOn);
var fiber = getInstanceFromNode$1(blockedOn);
if (_fiber2 !== null) {
if (fiber !== null) {
// Attempt to increase the priority of this target.
attemptContinuousHydration$1(_fiber2);
attemptContinuousHydration$1(fiber);
}
}
@@ -40069,10 +40079,10 @@ function attemptReplayContinuousQueuedEvent(queuedEvent) {
}
} else {
// We're still blocked. Try again later.
var _fiber3 = getInstanceFromNode$1(nextBlockedOn);
var fiber = getInstanceFromNode$1(nextBlockedOn);
if (_fiber3 !== null) {
attemptContinuousHydration$1(_fiber3);
if (fiber !== null) {
attemptContinuousHydration$1(fiber);
}
queuedEvent.blockedOn = nextBlockedOn;
@@ -313,9 +313,8 @@ function registerDirectEvent(registrationName, dependencies) {
registrationNameDependencies[registrationName] = dependencies;
{
var _lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[_lowerCasedName] = registrationName;
var lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[lowerCasedName] = registrationName;
if (registrationName === "onDoubleClick") {
possibleRegistrationNames.ondblclick = registrationName;
@@ -480,8 +479,8 @@ function checkFormFieldValueStringCoercion(value) {
}
}
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
@@ -506,8 +505,8 @@ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a pos
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;
/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR =
":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
/* eslint-enable max-len */
@@ -1070,6 +1069,7 @@ function sanitizeURL(url) {
* The "expected" argument is used as a hint of what the expected value is.
* Some properties have multiple equivalent values.
*/
function getValueForProperty(node, name, expected, propertyInfo) {
{
if (propertyInfo.mustUseProperty) {
@@ -1971,9 +1971,9 @@ function setIsRendering(rendering) {
}
}
// Flow does not allow string concatenation of most non-string types. To work
// around this limitation, we use an opaque type that can only be obtained by
// passing the value through getToStringValue first.
function toString(value) {
// The coercion safety check is performed in getToStringValue().
// eslint-disable-next-line react-internal/safe-string-coercion
@@ -2776,7 +2776,6 @@ function restoreControlledState$1(element, props) {
}
var didWarnValDefaultVal = false;
/**
* Implements a <textarea> host component that allows setting `value`, and
* `defaultValue`. This differs from the traditional DOM API because value is
@@ -2792,6 +2791,7 @@ var didWarnValDefaultVal = false;
* The rendered element will be initialized with an empty value, the prop
* `defaultValue` if specified, or the children content (deprecated).
*/
function getHostProps$2(element, props) {
var node = element;
@@ -4797,9 +4797,8 @@ function restoreStateOfTarget(target) {
var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
if (stateNode) {
var _props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
var props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, props);
}
}
@@ -5111,7 +5110,6 @@ function set(key, value) {
key._reactInternals = value;
}
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -5557,7 +5555,7 @@ var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
var NormalPriority = Scheduler.unstable_NormalPriority;
var LowPriority = Scheduler.unstable_LowPriority;
var IdlePriority = Scheduler.unstable_IdlePriority;
var IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*
var rendererID = null;
var injectedHook = null;
@@ -6727,11 +6725,11 @@ function accumulateOrCreateContinuousQueuedReplayableEvent(
);
if (blockedOn !== null) {
var _fiber2 = getInstanceFromNode$1(blockedOn);
var fiber = getInstanceFromNode$1(blockedOn);
if (_fiber2 !== null) {
if (fiber !== null) {
// Attempt to increase the priority of this target.
attemptContinuousHydration(_fiber2);
attemptContinuousHydration(fiber);
}
}
@@ -6942,10 +6940,10 @@ function attemptReplayContinuousQueuedEvent(queuedEvent) {
}
} else {
// We're still blocked. Try again later.
var _fiber3 = getInstanceFromNode$1(nextBlockedOn);
var fiber = getInstanceFromNode$1(nextBlockedOn);
if (_fiber3 !== null) {
attemptContinuousHydration(_fiber3);
if (fiber !== null) {
attemptContinuousHydration(fiber);
}
queuedEvent.blockedOn = nextBlockedOn;
@@ -7600,17 +7598,17 @@ function createSyntheticEvent(Interface) {
this.target = nativeEventTarget;
this.currentTarget = null;
for (var _propName in Interface) {
if (!Interface.hasOwnProperty(_propName)) {
for (var propName in Interface) {
if (!Interface.hasOwnProperty(propName)) {
continue;
}
var normalize = Interface[_propName];
var normalize = Interface[propName];
if (normalize) {
this[_propName] = normalize(nativeEvent);
this[propName] = normalize(nativeEvent);
} else {
this[_propName] = nativeEvent[_propName];
this[propName] = nativeEvent[propName];
}
}
@@ -10040,7 +10038,6 @@ function extractEvents$4(
}
}
// TODO: remove top-level side effect.
registerSimpleEvents();
registerEvents$2();
registerEvents$1();
@@ -13357,13 +13354,17 @@ function popHostContext(fiber) {
var Dispatcher = ReactDOMSharedInternals.Dispatcher;
// In the future this may need to change, especially when modules / scripts are supported
// Brief on purpose due to insertion by script when streaming late boundaries
// s = Status
// l = loaded
// e = errored
// It is valid to preload even when we aren't actively rendering. For cases where Float functions are
// called when there is no rendering we track the last used document. It is not safe to insert
// arbitrary resources into the lastCurrentDocument b/c it may not actually be the document
// that the resource is meant to apply too (for example stylesheets or scripts). This is only
// appropriate for resources that don't really have a strict tie to the document itself for example
// preloads
var lastCurrentDocument = null;
var previousDispatcher = null;
function prepareToRenderResources(rootContainer) {
@@ -13382,8 +13383,8 @@ function cleanupAfterRenderResources() {
var ReactDOMClientDispatcher = {
preload: preload,
preinit: preinit
};
// global maps of Resources
}; // global maps of Resources
var preloadResources = new Map(); // getRootNode is missing from IE and old jsdom versions
function getRootNode(container) {
@@ -15239,10 +15240,9 @@ function isHydratable(type, props) {
return false;
} else if (type === "script") {
var _ref = props,
async = _ref.async,
onLoad = _ref.onLoad,
onError = _ref.onError;
var async = props.async,
onLoad = props.onLoad,
onError = props.onError;
return !(async && (onLoad || onError));
}
@@ -16591,10 +16591,10 @@ function flushSyncCallbacks() {
return null;
}
// TODO: Use the unified fiber stack module instead of this local one?
// Intentionally not using it yet to derisk the initial implementation, because
// the way we push/pop these values is a bit unusual. If there's a mistake, I'd
// rather the ids be wrong than crash the whole reconciler.
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
@@ -17380,10 +17380,10 @@ function queueHydrationError(error) {
}
}
// If a render is in progress, and we receive an update from a concurrent event,
// we wait until the current render is over (either finished or interrupted)
// before adding it to the fiber/hook queue. Push to this array so we can
// access the queue, fiber, update, et al later.
var concurrentQueues = [];
var concurrentQueuesIndex = 0;
var concurrentlyUpdatedLanes = NoLanes;
@@ -18715,12 +18715,11 @@ function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
}
// This wrapper function exists because I expect to clone the code in each path
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
@@ -19874,6 +19873,7 @@ function resetChildFibers(workInProgress, lanes) {
// TODO: This isn't being used yet, but it's intended to replace the
// InvisibleParentContext that is currently managed by SuspenseContext.
var currentTreeHiddenStackCursor = createCursor(null);
var prevRenderLanesStackCursor = createCursor(NoLanes);
function pushHiddenContext(fiber, context) {
@@ -20041,6 +20041,13 @@ function popSuspenseListContext(fiber) {
pop(suspenseStackCursor, fiber);
}
// A non-null SuspenseState means that it is blocked for one reason or another.
// - A non-null dehydrated field means it's blocked pending hydration.
// - A non-null dehydrated field can use isSuspenseInstancePending or
// isSuspenseInstanceFallback to query the reason for being dehydrated.
// - A null dehydrated field means it's blocked by something suspending and
// we're currently showing a fallback instead.
function findFirstSuspended(row) {
var node = row;
@@ -20179,9 +20186,9 @@ function registerMutableSourceForHydration(root, mutableSource) {
}
}
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
// An error that is thrown (e.g. by `use`) to trigger Suspense. If we
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we
// detect this is caught by userspace, we'll log a warning in development.
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 " +
@@ -20339,9 +20346,8 @@ var didWarnAboutUseWrappedInTryCatch;
{
didWarnAboutMismatchedHooksForComponent = new Set();
didWarnAboutUseWrappedInTryCatch = new Set();
}
} // These are set right before calling the component.
// These are set right before calling the component.
var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
@@ -21868,10 +21874,8 @@ function updateLayoutEffect(create, deps) {
function imperativeHandleEffect(create, ref) {
if (typeof ref === "function") {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
var inst = create();
refCallback(inst);
return function() {
refCallback(null);
};
@@ -21888,9 +21892,9 @@ function imperativeHandleEffect(create, ref) {
}
}
var _inst2 = create();
var _inst = create();
refObject.current = _inst2;
refObject.current = _inst;
return function() {
refObject.current = null;
};
@@ -23811,9 +23815,9 @@ function checkClassInstance(workInProgress, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -28831,9 +28835,9 @@ var AbortControllerLocal =
return listener();
});
};
};
// Intentionally not named imports because Rollup would
}; // Intentionally not named imports because Rollup would
// use dynamic dispatch for CommonJS interop named imports.
var scheduleCallback$1 = Scheduler.unstable_scheduleCallback,
NormalPriority$1 = Scheduler.unstable_NormalPriority;
var CacheContext = {
@@ -35518,8 +35522,9 @@ function discreteUpdates(fn, a, b, c, d) {
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync(fn) {
// In legacy mode, we flush pending passive effects at the beginning of the
// next event, not at the end of the previous one.
@@ -37360,6 +37365,8 @@ function setIsRunningInsertionEffect(isRunning) {
}
/* eslint-disable react-internal/prod-error-codes */
// Used by React Refresh runtime through DevTools Global Hook.
var resolveFamily = null;
var failedBoundaries = null;
var setRefreshHandler = function(handler) {
@@ -37625,10 +37632,10 @@ function scheduleFibersWithFamiliesRecursively(
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
@@ -38479,7 +38486,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-2619886ac-20230105";
var ReactVersion = "18.3.0-www-modern-b83baf63f-20230105";
function createPortal(
children,
@@ -38503,6 +38510,8 @@ function createPortal(
};
}
// Might add PROFILE later.
var didWarnAboutNestedUpdates;
{
@@ -39523,8 +39532,9 @@ function hydrateRoot$1(container, initialChildren, options) {
return hydrateRoot(container, initialChildren, options);
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync$1(fn) {
{
if (isAlreadyRendering()) {
@@ -11328,10 +11328,10 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1519 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-2619886ac-20230105",
version: "18.3.0-www-classic-b83baf63f-20230105",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2049 = {
var internals$jscomp$inline_2048 = {
bundleType: devToolsConfig$jscomp$inline_1519.bundleType,
version: devToolsConfig$jscomp$inline_1519.version,
rendererPackageName: devToolsConfig$jscomp$inline_1519.rendererPackageName,
@@ -11358,19 +11358,19 @@ var internals$jscomp$inline_2049 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-2619886ac-20230105"
reconcilerVersion: "18.3.0-next-b83baf63f-20230105"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2050 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2049 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2050.isDisabled &&
hook$jscomp$inline_2050.supportsFiber
!hook$jscomp$inline_2049.isDisabled &&
hook$jscomp$inline_2049.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2050.inject(
internals$jscomp$inline_2049
(rendererID = hook$jscomp$inline_2049.inject(
internals$jscomp$inline_2048
)),
(injectedHook = hook$jscomp$inline_2050);
(injectedHook = hook$jscomp$inline_2049);
} catch (err) {}
}
var Dispatcher$1 = Internals.Dispatcher,
@@ -14847,4 +14847,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-2619886ac-20230105";
exports.version = "18.3.0-next-b83baf63f-20230105";
@@ -13960,10 +13960,10 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1674 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-2619886ac-20230105",
version: "18.3.0-www-modern-b83baf63f-20230105",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2074 = {
var internals$jscomp$inline_2073 = {
bundleType: devToolsConfig$jscomp$inline_1674.bundleType,
version: devToolsConfig$jscomp$inline_1674.version,
rendererPackageName: devToolsConfig$jscomp$inline_1674.rendererPackageName,
@@ -13991,19 +13991,19 @@ var internals$jscomp$inline_2074 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-2619886ac-20230105"
reconcilerVersion: "18.3.0-next-b83baf63f-20230105"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2075 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2074 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2075.isDisabled &&
hook$jscomp$inline_2075.supportsFiber
!hook$jscomp$inline_2074.isDisabled &&
hook$jscomp$inline_2074.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2075.inject(
internals$jscomp$inline_2074
(rendererID = hook$jscomp$inline_2074.inject(
internals$jscomp$inline_2073
)),
(injectedHook = hook$jscomp$inline_2075);
(injectedHook = hook$jscomp$inline_2074);
} catch (err) {}
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
@@ -14314,4 +14314,4 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-2619886ac-20230105";
exports.version = "18.3.0-next-b83baf63f-20230105";
@@ -303,13 +303,13 @@ function initializeModelChunk(chunk) {
initializingChunkBlockedModel = null;
try {
var _value = parseModel(chunk._response, chunk.value);
var value = parseModel(chunk._response, chunk.value);
if (
initializingChunkBlockedModel !== null &&
initializingChunkBlockedModel.deps > 0
) {
initializingChunkBlockedModel.value = _value; // We discovered new dependencies on modules that are not yet resolved.
initializingChunkBlockedModel.value = value; // We discovered new dependencies on modules that are not yet resolved.
// We have to go the BLOCKED state until they're resolved.
var blockedChunk = chunk;
@@ -319,7 +319,7 @@ function initializeModelChunk(chunk) {
} else {
var initializedChunk = chunk;
initializedChunk.status = INITIALIZED;
initializedChunk.value = _value;
initializedChunk.value = value;
}
} catch (error) {
var erroredChunk = chunk;
@@ -333,13 +333,10 @@ function initializeModelChunk(chunk) {
function initializeModuleChunk(chunk) {
try {
var _value2 = ReactFlightDOMRelayClientIntegration.requireModule(
chunk.value
);
var value = ReactFlightDOMRelayClientIntegration.requireModule(chunk.value);
var initializedChunk = chunk;
initializedChunk.status = INITIALIZED;
initializedChunk.value = _value2;
initializedChunk.value = value;
} catch (error) {
var erroredChunk = chunk;
erroredChunk.status = ERRORED;
@@ -303,13 +303,13 @@ function initializeModelChunk(chunk) {
initializingChunkBlockedModel = null;
try {
var _value = parseModel(chunk._response, chunk.value);
var value = parseModel(chunk._response, chunk.value);
if (
initializingChunkBlockedModel !== null &&
initializingChunkBlockedModel.deps > 0
) {
initializingChunkBlockedModel.value = _value; // We discovered new dependencies on modules that are not yet resolved.
initializingChunkBlockedModel.value = value; // We discovered new dependencies on modules that are not yet resolved.
// We have to go the BLOCKED state until they're resolved.
var blockedChunk = chunk;
@@ -319,7 +319,7 @@ function initializeModelChunk(chunk) {
} else {
var initializedChunk = chunk;
initializedChunk.status = INITIALIZED;
initializedChunk.value = _value;
initializedChunk.value = value;
}
} catch (error) {
var erroredChunk = chunk;
@@ -333,13 +333,10 @@ function initializeModelChunk(chunk) {
function initializeModuleChunk(chunk) {
try {
var _value2 = ReactFlightDOMRelayClientIntegration.requireModule(
chunk.value
);
var value = ReactFlightDOMRelayClientIntegration.requireModule(chunk.value);
var initializedChunk = chunk;
initializedChunk.status = INITIALIZED;
initializedChunk.value = _value2;
initializedChunk.value = value;
} catch (error) {
var erroredChunk = chunk;
erroredChunk.status = ERRORED;
@@ -218,8 +218,8 @@ var enableProfilerNestedUpdateScheduledHook =
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; // Note: we'll want to remove this when we to userland implementation.
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
@@ -733,6 +733,8 @@ var rendererSigil;
rendererSigil = {};
} // Used to store the parent path of all context overrides in a shared linked list.
// Forming a reverse tree.
// The structure of a context snapshot is an implementation of this file.
// Currently, it's implemented as tracking the current active node.
var rootContextSnapshot = null; // We assume that this runtime owns the "current" field on all ReactContext instances.
// This global (actually thread local) state represents what state all those "current",
@@ -1750,16 +1752,16 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) {
var array = objectOrArray;
for (var i = 0; i < array.length; i++) {
var _value = array[i];
var value = array[i];
var substr = void 0;
if (typeof _value === "string") {
substr = _value;
} else if (typeof _value === "object" && _value !== null) {
if (typeof value === "string") {
substr = value;
} else if (typeof value === "object" && value !== null) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
substr = "{" + describeObjectForErrorMessage(_value) + "}";
substr = "{" + describeObjectForErrorMessage(value) + "}";
} else {
substr = "{" + describeValueForErrorMessage(_value) + "}";
substr = "{" + describeValueForErrorMessage(value) + "}";
}
if ("" + i === expandedName) {
@@ -1784,15 +1786,15 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) {
str += ", ";
}
var _value2 = _array[_i];
var _value = _array[_i];
var _substr = void 0;
if (typeof _value2 === "object" && _value2 !== null) {
if (typeof _value === "object" && _value !== null) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
_substr = describeObjectForErrorMessage(_value2);
_substr = describeObjectForErrorMessage(_value);
} else {
_substr = describeValueForErrorMessage(_value2);
_substr = describeValueForErrorMessage(_value);
}
if ("" + _i === expandedName) {
@@ -1823,22 +1825,22 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) {
str += " ";
var name = names[_i2];
str += describeKeyForErrorMessage(name) + "=";
var _value3 = object[name];
var _value2 = object[name];
var _substr2 = void 0;
if (
name === expandedName &&
typeof _value3 === "object" &&
_value3 !== null
typeof _value2 === "object" &&
_value2 !== null
) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
_substr2 = describeObjectForErrorMessage(_value3);
_substr2 = describeObjectForErrorMessage(_value2);
} else {
_substr2 = describeValueForErrorMessage(_value3);
_substr2 = describeValueForErrorMessage(_value2);
}
if (typeof _value3 !== "string") {
if (typeof _value2 !== "string") {
_substr2 = "{" + _substr2 + "}";
}
@@ -1868,15 +1870,15 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) {
var _name = _names[_i3];
str += describeKeyForErrorMessage(_name) + ": ";
var _value4 = _object[_name];
var _value3 = _object[_name];
var _substr3 = void 0;
if (typeof _value4 === "object" && _value4 !== null) {
if (typeof _value3 === "object" && _value3 !== null) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
_substr3 = describeObjectForErrorMessage(_value4);
_substr3 = describeObjectForErrorMessage(_value3);
} else {
_substr3 = describeValueForErrorMessage(_value4);
_substr3 = describeValueForErrorMessage(_value3);
}
if (_name === expandedName) {
@@ -2269,23 +2271,23 @@ function retryTask(request, task) {
switchContext(task.context);
try {
var _value5 = task.model;
var value = task.model;
if (
typeof _value5 === "object" &&
_value5 !== null &&
_value5.$$typeof === REACT_ELEMENT_TYPE
typeof value === "object" &&
value !== null &&
value.$$typeof === REACT_ELEMENT_TYPE
) {
// TODO: Concatenate keys of parents onto children.
var element = _value5; // When retrying a component, reuse the thenableState from the
var element = value; // When retrying a component, reuse the thenableState from the
// previous attempt.
var prevThenableState = task.thenableState; // Attempt to render the Server Component.
// Doing this here lets us reuse this same task if the next component
// also suspends.
task.model = _value5;
_value5 = attemptResolveElement(
task.model = value;
value = attemptResolveElement(
element.type,
element.key,
element.ref,
@@ -2299,14 +2301,14 @@ function retryTask(request, task) {
// until the next time something suspends and retries.
while (
typeof _value5 === "object" &&
_value5 !== null &&
_value5.$$typeof === REACT_ELEMENT_TYPE
typeof value === "object" &&
value !== null &&
value.$$typeof === REACT_ELEMENT_TYPE
) {
// TODO: Concatenate keys of parents onto children.
var nextElement = _value5;
task.model = _value5;
_value5 = attemptResolveElement(
var nextElement = value;
task.model = value;
value = attemptResolveElement(
nextElement.type,
nextElement.key,
nextElement.ref,
@@ -2316,7 +2318,7 @@ function retryTask(request, task) {
}
}
var processedChunk = processModelChunk(request, task.id, _value5);
var processedChunk = processModelChunk(request, task.id, value);
request.completedJSONChunks.push(processedChunk);
request.abortableTasks.delete(task);
task.status = COMPLETED;
@@ -2489,9 +2491,9 @@ function importServerContexts(contexts) {
for (var i = 0; i < contexts.length; i++) {
var _contexts$i = contexts[i],
name = _contexts$i[0],
_value6 = _contexts$i[1];
value = _contexts$i[1];
var context = getOrCreateServerContext(name);
pushProvider(context, _value6);
pushProvider(context, value);
}
var importedContext = getActiveContext();
@@ -218,8 +218,8 @@ var enableProfilerNestedUpdateScheduledHook =
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; // Note: we'll want to remove this when we to userland implementation.
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
@@ -737,6 +737,8 @@ var rendererSigil;
rendererSigil = {};
} // Used to store the parent path of all context overrides in a shared linked list.
// Forming a reverse tree.
// The structure of a context snapshot is an implementation of this file.
// Currently, it's implemented as tracking the current active node.
var rootContextSnapshot = null; // We assume that this runtime owns the "current" field on all ReactContext instances.
// This global (actually thread local) state represents what state all those "current",
@@ -1754,16 +1756,16 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) {
var array = objectOrArray;
for (var i = 0; i < array.length; i++) {
var _value = array[i];
var value = array[i];
var substr = void 0;
if (typeof _value === "string") {
substr = _value;
} else if (typeof _value === "object" && _value !== null) {
if (typeof value === "string") {
substr = value;
} else if (typeof value === "object" && value !== null) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
substr = "{" + describeObjectForErrorMessage(_value) + "}";
substr = "{" + describeObjectForErrorMessage(value) + "}";
} else {
substr = "{" + describeValueForErrorMessage(_value) + "}";
substr = "{" + describeValueForErrorMessage(value) + "}";
}
if ("" + i === expandedName) {
@@ -1788,15 +1790,15 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) {
str += ", ";
}
var _value2 = _array[_i];
var _value = _array[_i];
var _substr = void 0;
if (typeof _value2 === "object" && _value2 !== null) {
if (typeof _value === "object" && _value !== null) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
_substr = describeObjectForErrorMessage(_value2);
_substr = describeObjectForErrorMessage(_value);
} else {
_substr = describeValueForErrorMessage(_value2);
_substr = describeValueForErrorMessage(_value);
}
if ("" + _i === expandedName) {
@@ -1827,22 +1829,22 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) {
str += " ";
var name = names[_i2];
str += describeKeyForErrorMessage(name) + "=";
var _value3 = object[name];
var _value2 = object[name];
var _substr2 = void 0;
if (
name === expandedName &&
typeof _value3 === "object" &&
_value3 !== null
typeof _value2 === "object" &&
_value2 !== null
) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
_substr2 = describeObjectForErrorMessage(_value3);
_substr2 = describeObjectForErrorMessage(_value2);
} else {
_substr2 = describeValueForErrorMessage(_value3);
_substr2 = describeValueForErrorMessage(_value2);
}
if (typeof _value3 !== "string") {
if (typeof _value2 !== "string") {
_substr2 = "{" + _substr2 + "}";
}
@@ -1872,15 +1874,15 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) {
var _name = _names[_i3];
str += describeKeyForErrorMessage(_name) + ": ";
var _value4 = _object[_name];
var _value3 = _object[_name];
var _substr3 = void 0;
if (typeof _value4 === "object" && _value4 !== null) {
if (typeof _value3 === "object" && _value3 !== null) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
_substr3 = describeObjectForErrorMessage(_value4);
_substr3 = describeObjectForErrorMessage(_value3);
} else {
_substr3 = describeValueForErrorMessage(_value4);
_substr3 = describeValueForErrorMessage(_value3);
}
if (_name === expandedName) {
@@ -2273,23 +2275,23 @@ function retryTask(request, task) {
switchContext(task.context);
try {
var _value5 = task.model;
var value = task.model;
if (
typeof _value5 === "object" &&
_value5 !== null &&
_value5.$$typeof === REACT_ELEMENT_TYPE
typeof value === "object" &&
value !== null &&
value.$$typeof === REACT_ELEMENT_TYPE
) {
// TODO: Concatenate keys of parents onto children.
var element = _value5; // When retrying a component, reuse the thenableState from the
var element = value; // When retrying a component, reuse the thenableState from the
// previous attempt.
var prevThenableState = task.thenableState; // Attempt to render the Server Component.
// Doing this here lets us reuse this same task if the next component
// also suspends.
task.model = _value5;
_value5 = attemptResolveElement(
task.model = value;
value = attemptResolveElement(
element.type,
element.key,
element.ref,
@@ -2303,14 +2305,14 @@ function retryTask(request, task) {
// until the next time something suspends and retries.
while (
typeof _value5 === "object" &&
_value5 !== null &&
_value5.$$typeof === REACT_ELEMENT_TYPE
typeof value === "object" &&
value !== null &&
value.$$typeof === REACT_ELEMENT_TYPE
) {
// TODO: Concatenate keys of parents onto children.
var nextElement = _value5;
task.model = _value5;
_value5 = attemptResolveElement(
var nextElement = value;
task.model = value;
value = attemptResolveElement(
nextElement.type,
nextElement.key,
nextElement.ref,
@@ -2320,7 +2322,7 @@ function retryTask(request, task) {
}
}
var processedChunk = processModelChunk(request, task.id, _value5);
var processedChunk = processModelChunk(request, task.id, value);
request.completedJSONChunks.push(processedChunk);
request.abortableTasks.delete(task);
task.status = COMPLETED;
@@ -2493,9 +2495,9 @@ function importServerContexts(contexts) {
for (var i = 0; i < contexts.length; i++) {
var _contexts$i = contexts[i],
name = _contexts$i[0],
_value6 = _contexts$i[1];
value = _contexts$i[1];
var context = getOrCreateServerContext(name);
pushProvider(context, _value6);
pushProvider(context, value);
}
var importedContext = getActiveContext();
@@ -430,7 +430,6 @@ function getComponentNameFromFiber(fiber) {
return null;
}
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -842,7 +841,7 @@ var now = Scheduler$1.unstable_now;
var ImmediatePriority = Scheduler$1.unstable_ImmediatePriority;
var UserBlockingPriority = Scheduler$1.unstable_UserBlockingPriority;
var NormalPriority = Scheduler$1.unstable_NormalPriority;
var IdlePriority = Scheduler$1.unstable_IdlePriority;
var IdlePriority = Scheduler$1.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*
// Helpers to patch console.logs to avoid logging during side-effect free
// replaying on render function. This currently only patches the object
@@ -2935,10 +2934,10 @@ function isRootDehydrated(root) {
return currentState.isDehydrated;
}
// TODO: Use the unified fiber stack module instead of this local one?
// Intentionally not using it yet to derisk the initial implementation, because
// the way we push/pop these values is a bit unusual. If there's a mistake, I'd
// rather the ids be wrong than crash the whole reconciler.
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
@@ -3118,10 +3117,10 @@ function queueHydrationError(error) {
}
}
// If a render is in progress, and we receive an update from a concurrent event,
// we wait until the current render is over (either finished or interrupted)
// before adding it to the fiber/hook queue. Push to this array so we can
// access the queue, fiber, update, et al later.
var concurrentQueues = [];
var concurrentQueuesIndex = 0;
var concurrentlyUpdatedLanes = NoLanes;
@@ -4677,12 +4676,11 @@ function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
}
// This wrapper function exists because I expect to clone the code in each path
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
@@ -5806,6 +5804,7 @@ function resetChildFibers(workInProgress, lanes) {
// TODO: This isn't being used yet, but it's intended to replace the
// InvisibleParentContext that is currently managed by SuspenseContext.
var currentTreeHiddenStackCursor = createCursor(null);
var prevRenderLanesStackCursor = createCursor(NoLanes);
function pushHiddenContext(fiber, context) {
@@ -5973,6 +5972,13 @@ function popSuspenseListContext(fiber) {
pop(suspenseStackCursor, fiber);
}
// A non-null SuspenseState means that it is blocked for one reason or another.
// - A non-null dehydrated field means it's blocked pending hydration.
// - A non-null dehydrated field can use isSuspenseInstancePending or
// isSuspenseInstanceFallback to query the reason for being dehydrated.
// - A null dehydrated field means it's blocked by something suspending and
// we're currently showing a fallback instead.
function findFirstSuspended(row) {
var node = row;
@@ -6096,9 +6102,9 @@ function warnAboutMultipleRenderersDEV(mutableSource) {
}
} // Eager reads the version of a mutable source and stores it on the root.
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
// An error that is thrown (e.g. by `use`) to trigger Suspense. If we
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we
// detect this is caught by userspace, we'll log a warning in development.
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 " +
@@ -6256,9 +6262,8 @@ var didWarnAboutUseWrappedInTryCatch;
{
didWarnAboutMismatchedHooksForComponent = new Set();
didWarnAboutUseWrappedInTryCatch = new Set();
}
} // These are set right before calling the component.
// These are set right before calling the component.
var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
@@ -7751,10 +7756,8 @@ function updateLayoutEffect(create, deps) {
function imperativeHandleEffect(create, ref) {
if (typeof ref === "function") {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
var inst = create();
refCallback(inst);
return function() {
refCallback(null);
};
@@ -7771,9 +7774,9 @@ function imperativeHandleEffect(create, ref) {
}
}
var _inst2 = create();
var _inst = create();
refObject.current = _inst2;
refObject.current = _inst;
return function() {
refObject.current = null;
};
@@ -9843,9 +9846,9 @@ function checkClassInstance(workInProgress, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -14624,9 +14627,9 @@ var AbortControllerLocal =
return listener();
});
};
};
// Intentionally not named imports because Rollup would
}; // Intentionally not named imports because Rollup would
// use dynamic dispatch for CommonJS interop named imports.
var scheduleCallback$1 = Scheduler$1.unstable_scheduleCallback,
NormalPriority$1 = Scheduler$1.unstable_NormalPriority;
var CacheContext = {
@@ -20833,8 +20836,9 @@ function batchedUpdates(fn, a) {
}
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync(fn) {
// In legacy mode, we flush pending passive effects at the beginning of the
// next event, not at the end of the previous one.
@@ -22059,8 +22063,8 @@ function flushPassiveEffectsImpl() {
pendingPassiveProfilerEffects = [];
for (var i = 0; i < profilerEffects.length; i++) {
var _fiber = profilerEffects[i];
commitPassiveEffectDurations(root, _fiber);
var fiber = profilerEffects[i];
commitPassiveEffectDurations(root, fiber);
}
}
@@ -22721,6 +22725,8 @@ function setIsRunningInsertionEffect(isRunning) {
}
/* eslint-disable react-internal/prod-error-codes */
// Used by React Refresh runtime through DevTools Global Hook.
var resolveFamily = null;
var failedBoundaries = null;
var setRefreshHandler = function(handler) {
@@ -22986,10 +22992,10 @@ function scheduleFibersWithFamiliesRecursively(
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
@@ -23890,7 +23896,9 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-2619886ac-20230105";
var ReactVersion = "18.3.0-www-classic-b83baf63f-20230105";
// Might add PROFILE later.
var didWarnAboutNestedUpdates;
@@ -24581,6 +24589,8 @@ var ReactTestInstance = /*#__PURE__*/ (function() {
};
function ReactTestInstance(fiber) {
this._fiber = void 0;
if (!validWrapperTypes.has(fiber.tag)) {
throw new Error(
"Unexpected object passed to ReactTestInstance constructor (tag: " +
@@ -430,7 +430,6 @@ function getComponentNameFromFiber(fiber) {
return null;
}
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -842,7 +841,7 @@ var now = Scheduler$1.unstable_now;
var ImmediatePriority = Scheduler$1.unstable_ImmediatePriority;
var UserBlockingPriority = Scheduler$1.unstable_UserBlockingPriority;
var NormalPriority = Scheduler$1.unstable_NormalPriority;
var IdlePriority = Scheduler$1.unstable_IdlePriority;
var IdlePriority = Scheduler$1.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*
// Helpers to patch console.logs to avoid logging during side-effect free
// replaying on render function. This currently only patches the object
@@ -2935,10 +2934,10 @@ function isRootDehydrated(root) {
return currentState.isDehydrated;
}
// TODO: Use the unified fiber stack module instead of this local one?
// Intentionally not using it yet to derisk the initial implementation, because
// the way we push/pop these values is a bit unusual. If there's a mistake, I'd
// rather the ids be wrong than crash the whole reconciler.
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
@@ -3118,10 +3117,10 @@ function queueHydrationError(error) {
}
}
// If a render is in progress, and we receive an update from a concurrent event,
// we wait until the current render is over (either finished or interrupted)
// before adding it to the fiber/hook queue. Push to this array so we can
// access the queue, fiber, update, et al later.
var concurrentQueues = [];
var concurrentQueuesIndex = 0;
var concurrentlyUpdatedLanes = NoLanes;
@@ -4677,12 +4676,11 @@ function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
}
// This wrapper function exists because I expect to clone the code in each path
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function createChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
@@ -5806,6 +5804,7 @@ function resetChildFibers(workInProgress, lanes) {
// TODO: This isn't being used yet, but it's intended to replace the
// InvisibleParentContext that is currently managed by SuspenseContext.
var currentTreeHiddenStackCursor = createCursor(null);
var prevRenderLanesStackCursor = createCursor(NoLanes);
function pushHiddenContext(fiber, context) {
@@ -5973,6 +5972,13 @@ function popSuspenseListContext(fiber) {
pop(suspenseStackCursor, fiber);
}
// A non-null SuspenseState means that it is blocked for one reason or another.
// - A non-null dehydrated field means it's blocked pending hydration.
// - A non-null dehydrated field can use isSuspenseInstancePending or
// isSuspenseInstanceFallback to query the reason for being dehydrated.
// - A null dehydrated field means it's blocked by something suspending and
// we're currently showing a fallback instead.
function findFirstSuspended(row) {
var node = row;
@@ -6096,9 +6102,9 @@ function warnAboutMultipleRenderersDEV(mutableSource) {
}
} // Eager reads the version of a mutable source and stores it on the root.
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
// An error that is thrown (e.g. by `use`) to trigger Suspense. If we
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we
// detect this is caught by userspace, we'll log a warning in development.
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 " +
@@ -6256,9 +6262,8 @@ var didWarnAboutUseWrappedInTryCatch;
{
didWarnAboutMismatchedHooksForComponent = new Set();
didWarnAboutUseWrappedInTryCatch = new Set();
}
} // These are set right before calling the component.
// These are set right before calling the component.
var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
@@ -7751,10 +7756,8 @@ function updateLayoutEffect(create, deps) {
function imperativeHandleEffect(create, ref) {
if (typeof ref === "function") {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
var inst = create();
refCallback(inst);
return function() {
refCallback(null);
};
@@ -7771,9 +7774,9 @@ function imperativeHandleEffect(create, ref) {
}
}
var _inst2 = create();
var _inst = create();
refObject.current = _inst2;
refObject.current = _inst;
return function() {
refObject.current = null;
};
@@ -9843,9 +9846,9 @@ function checkClassInstance(workInProgress, ctor, newProps) {
);
}
var _state = instance.state;
var state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
if (state && (typeof state !== "object" || isArray(state))) {
error("%s.state: must be set to an object or null", name);
}
@@ -14624,9 +14627,9 @@ var AbortControllerLocal =
return listener();
});
};
};
// Intentionally not named imports because Rollup would
}; // Intentionally not named imports because Rollup would
// use dynamic dispatch for CommonJS interop named imports.
var scheduleCallback$1 = Scheduler$1.unstable_scheduleCallback,
NormalPriority$1 = Scheduler$1.unstable_NormalPriority;
var CacheContext = {
@@ -20833,8 +20836,9 @@ function batchedUpdates(fn, a) {
}
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-redeclare
// eslint-disable-next-line no-redeclare
function flushSync(fn) {
// In legacy mode, we flush pending passive effects at the beginning of the
// next event, not at the end of the previous one.
@@ -22059,8 +22063,8 @@ function flushPassiveEffectsImpl() {
pendingPassiveProfilerEffects = [];
for (var i = 0; i < profilerEffects.length; i++) {
var _fiber = profilerEffects[i];
commitPassiveEffectDurations(root, _fiber);
var fiber = profilerEffects[i];
commitPassiveEffectDurations(root, fiber);
}
}
@@ -22721,6 +22725,8 @@ function setIsRunningInsertionEffect(isRunning) {
}
/* eslint-disable react-internal/prod-error-codes */
// Used by React Refresh runtime through DevTools Global Hook.
var resolveFamily = null;
var failedBoundaries = null;
var setRefreshHandler = function(handler) {
@@ -22986,10 +22992,10 @@ function scheduleFibersWithFamiliesRecursively(
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
@@ -23890,7 +23896,9 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-2619886ac-20230105";
var ReactVersion = "18.3.0-www-modern-b83baf63f-20230105";
// Might add PROFILE later.
var didWarnAboutNestedUpdates;
@@ -24581,6 +24589,8 @@ var ReactTestInstance = /*#__PURE__*/ (function() {
};
function ReactTestInstance(fiber) {
this._fiber = void 0;
if (!validWrapperTypes.has(fiber.tag)) {
throw new Error(
"Unexpected object passed to ReactTestInstance constructor (tag: " +
@@ -144,7 +144,6 @@ var HostText = 6;
var HostResource = 26;
var HostSingleton = 27;
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -435,17 +434,17 @@ function createSyntheticEvent(Interface) {
this.target = nativeEventTarget;
this.currentTarget = null;
for (var _propName in Interface) {
if (!Interface.hasOwnProperty(_propName)) {
for (var propName in Interface) {
if (!Interface.hasOwnProperty(propName)) {
continue;
}
var normalize = Interface[_propName];
var normalize = Interface[propName];
if (normalize) {
this[_propName] = normalize(nativeEvent);
this[propName] = normalize(nativeEvent);
} else {
this[_propName] = nativeEvent[_propName];
this[propName] = nativeEvent[propName];
}
}
@@ -144,7 +144,6 @@ var HostText = 6;
var HostResource = 26;
var HostSingleton = 27;
// Don't change these values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
@@ -435,17 +434,17 @@ function createSyntheticEvent(Interface) {
this.target = nativeEventTarget;
this.currentTarget = null;
for (var _propName in Interface) {
if (!Interface.hasOwnProperty(_propName)) {
for (var propName in Interface) {
if (!Interface.hasOwnProperty(propName)) {
continue;
}
var normalize = Interface[_propName];
var normalize = Interface[propName];
if (normalize) {
this[_propName] = normalize(nativeEvent);
this[propName] = normalize(nativeEvent);
} else {
this[_propName] = nativeEvent[_propName];
this[propName] = nativeEvent[propName];
}
}
@@ -267,11 +267,10 @@ if (hasPerformanceNow) {
};
} else {
var localDate = Date;
var _initialTime = localDate.now();
var initialTime = localDate.now();
exports.unstable_now = function() {
return localDate.now() - _initialTime;
return localDate.now() - initialTime;
};
} // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
@@ -775,7 +774,7 @@ var performWorkUntilDeadline = function() {
// has been blocked.
startTime = currentTime;
var _hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the
var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the
// error can be observed.
//
// Intentionally not using a try-catch, since that makes some debugging
@@ -786,7 +785,7 @@ var performWorkUntilDeadline = function() {
try {
// $FlowFixMe[not-a-function] found when upgrading Flow
hasMoreWork = scheduledHostCallback(_hasTimeRemaining, currentTime);
hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
} finally {
if (hasMoreWork) {
// If there's more work, schedule the next message event at the end
@@ -267,11 +267,10 @@ if (hasPerformanceNow) {
};
} else {
var localDate = Date;
var _initialTime = localDate.now();
var initialTime = localDate.now();
exports.unstable_now = function() {
return localDate.now() - _initialTime;
return localDate.now() - initialTime;
};
} // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
@@ -775,7 +774,7 @@ var performWorkUntilDeadline = function() {
// has been blocked.
startTime = currentTime;
var _hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the
var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the
// error can be observed.
//
// Intentionally not using a try-catch, since that makes some debugging
@@ -786,7 +785,7 @@ var performWorkUntilDeadline = function() {
try {
// $FlowFixMe[not-a-function] found when upgrading Flow
hasMoreWork = scheduledHostCallback(_hasTimeRemaining, currentTime);
hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
} finally {
if (hasMoreWork) {
// If there's more work, schedule the next message event at the end
@@ -244,9 +244,9 @@ function markSchedulerUnsuspended(ms) {
}
/* eslint-disable no-var */
// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
// 0b111111111111111111111111111111
var maxSigned31BitInt = 1073741823; // Times out immediately
var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
@@ -244,9 +244,9 @@ function markSchedulerUnsuspended(ms) {
}
/* eslint-disable no-var */
// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
// 0b111111111111111111111111111111
var maxSigned31BitInt = 1073741823; // Times out immediately
var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
@@ -90,8 +90,8 @@ function runTask(priorityLevel, postTaskPriority, node, callback) {
try {
currentPriorityLevel_DEPRECATED = priorityLevel;
var _didTimeout_DEPRECATED = false;
var result = callback(_didTimeout_DEPRECATED);
var didTimeout_DEPRECATED = false;
var result = callback(didTimeout_DEPRECATED);
if (typeof result === "function") {
// Assume this is a continuation
@@ -90,8 +90,8 @@ function runTask(priorityLevel, postTaskPriority, node, callback) {
try {
currentPriorityLevel_DEPRECATED = priorityLevel;
var _didTimeout_DEPRECATED = false;
var result = callback(_didTimeout_DEPRECATED);
var didTimeout_DEPRECATED = false;
var result = callback(didTimeout_DEPRECATED);
if (typeof result === "function") {
// Assume this is a continuation