Move Mutation/Persistence fork inline into the functions (#26206)

We should never use any logic beyond declarations in the module scope,
including conditions, because in a cycle that can lead to problems.

More importantly, the compiler can't safely reorder statements between
these points which limits the optimizations we can do.

DiffTrain build for commit 62e6c4612e.
This commit is contained in:
sebmarkbage
2023-02-20 20:10:11 +00:00
parent ac6f055db6
commit 3484cc280c
34 changed files with 31308 additions and 829 deletions
+1 -1
View File
@@ -1 +1 @@
80cf4a099e99bbd4ed13e02d30136f669f2868b9
62e6c4612ec704cf07c99b318bc8f26d3ec3f588
+1 -1
View File
@@ -1 +1 @@
80cf4a099e99bbd4ed13e02d30136f669f2868b9
62e6c4612ec704cf07c99b318bc8f26d3ec3f588
+1 -1
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-classic-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-classic-62e6c4612-20230220";
// ATTENTION
// When adding new symbols to this file,
+1 -1
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-modern-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-modern-62e6c4612-20230220";
// ATTENTION
// When adding new symbols to this file,
+1 -1
View File
@@ -646,4 +646,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-80cf4a099-20230220";
exports.version = "18.3.0-www-classic-62e6c4612-20230220";
+1 -1
View File
@@ -638,4 +638,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-80cf4a099-20230220";
exports.version = "18.3.0-www-modern-62e6c4612-20230220";
@@ -657,7 +657,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-80cf4a099-20230220";
exports.version = "18.3.0-www-classic-62e6c4612-20230220";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -649,7 +649,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-80cf4a099-20230220";
exports.version = "18.3.0-www-modern-62e6c4612-20230220";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
+18 -27
View File
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-classic-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-classic-62e6c4612-20230220";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -17350,19 +17350,13 @@ function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent;
var updateHostText;
{
// Mutation mode
appendAllChildren = function (
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
function appendAllChildren(
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
{
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
@@ -17393,13 +17387,11 @@ var updateHostText;
node.sibling.return = node.return;
node = node.sibling;
}
};
}
} // An unfortunate fork of appendAllChildren because we have two different parent types.
updateHostContainer = function (current, workInProgress) {
// Noop
};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
{
// If we have an alternate, that means this is an update and we need to
// schedule a side-effect to do the updates.
var oldProps = current.memoizedProps;
@@ -17421,14 +17413,16 @@ var updateHostText;
if (updatePayload) {
markUpdate(workInProgress);
}
};
}
}
updateHostText = function (current, workInProgress, oldText, newText) {
function updateHostText(current, workInProgress, oldText, newText) {
{
// If the text differs, mark it as an update. All the work in done in commitWork.
if (oldText !== newText) {
markUpdate(workInProgress);
}
};
}
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
@@ -17800,8 +17794,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
}
}
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
if (enableTransitionTracing) {
@@ -17864,7 +17856,7 @@ function completeWork(current, workInProgress, renderLanes) {
getRootHostContainer();
var instance = createInstance(_type, newProps);
appendAllChildren(instance, workInProgress, false, false);
appendAllChildren(instance, workInProgress);
workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
}
@@ -18052,7 +18044,6 @@ function completeWork(current, workInProgress, renderLanes) {
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
+18 -27
View File
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-modern-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-modern-62e6c4612-20230220";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -17039,19 +17039,13 @@ function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent;
var updateHostText;
{
// Mutation mode
appendAllChildren = function (
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
function appendAllChildren(
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
{
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
@@ -17082,13 +17076,11 @@ var updateHostText;
node.sibling.return = node.return;
node = node.sibling;
}
};
}
} // An unfortunate fork of appendAllChildren because we have two different parent types.
updateHostContainer = function (current, workInProgress) {
// Noop
};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
{
// If we have an alternate, that means this is an update and we need to
// schedule a side-effect to do the updates.
var oldProps = current.memoizedProps;
@@ -17110,14 +17102,16 @@ var updateHostText;
if (updatePayload) {
markUpdate(workInProgress);
}
};
}
}
updateHostText = function (current, workInProgress, oldText, newText) {
function updateHostText(current, workInProgress, oldText, newText) {
{
// If the text differs, mark it as an update. All the work in done in commitWork.
if (oldText !== newText) {
markUpdate(workInProgress);
}
};
}
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
@@ -17482,8 +17476,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
}
}
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
if (enableTransitionTracing) {
@@ -17546,7 +17538,7 @@ function completeWork(current, workInProgress, renderLanes) {
getRootHostContainer();
var instance = createInstance(_type, newProps);
appendAllChildren(instance, workInProgress, false, false);
appendAllChildren(instance, workInProgress);
workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
}
@@ -17734,7 +17726,6 @@ function completeWork(current, workInProgress, renderLanes) {
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
File diff suppressed because it is too large Load Diff
+44 -61
View File
@@ -4940,37 +4940,6 @@ function getChildContextValues(context) {
collectNearestChildContextValues(currentFiber, context, childContextValues);
return childContextValues;
}
var appendAllChildren, updateHostContainer, updateHostComponent, updateHostText;
appendAllChildren = function (parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) {
var parentInstance = parent,
child = node.stateNode;
if ("string" === typeof child) throw Error(formatProdErrorMessage(216));
child.inject(parentInstance);
} else if (4 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === workInProgress) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function () {};
updateHostComponent = function (current, workInProgress, type, newProps) {
current.memoizedProps !== newProps &&
(workInProgress.updateQueue = UPDATE_SIGNAL) &&
(workInProgress.flags |= 4);
};
updateHostText = function (current, workInProgress, oldText, newText) {
oldText !== newText && (workInProgress.flags |= 4);
};
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
switch (renderState.tailMode) {
case "hidden":
@@ -5063,7 +5032,6 @@ function completeWork(current, workInProgress, renderLanes) {
null !== hydrationErrors &&
(queueRecoverableErrors(hydrationErrors),
(hydrationErrors = null))),
updateHostContainer(current, workInProgress),
bubbleProperties(workInProgress),
enableTransitionTracing &&
0 !== (workInProgress.subtreeFlags & 8192) &&
@@ -5076,7 +5044,9 @@ function completeWork(current, workInProgress, renderLanes) {
popHostContext(workInProgress);
renderLanes = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
updateHostComponent(current, workInProgress, renderLanes, newProps),
current.memoizedProps !== newProps &&
(workInProgress.updateQueue = UPDATE_SIGNAL) &&
(workInProgress.flags |= 4),
current.ref !== workInProgress.ref &&
(workInProgress.flags |= 2097664);
else {
@@ -5111,7 +5081,30 @@ function completeWork(current, workInProgress, renderLanes) {
if (!instance) throw Error(formatProdErrorMessage(217, renderLanes));
instance._applyProps(instance, newProps);
current = instance;
appendAllChildren(current, workInProgress, !1, !1);
a: for (renderLanes = workInProgress.child; null !== renderLanes; ) {
if (5 === renderLanes.tag || 6 === renderLanes.tag) {
newProps = current;
instance = renderLanes.stateNode;
if ("string" === typeof instance)
throw Error(formatProdErrorMessage(216));
instance.inject(newProps);
} else if (4 !== renderLanes.tag && null !== renderLanes.child) {
renderLanes.child.return = renderLanes;
renderLanes = renderLanes.child;
continue;
}
if (renderLanes === workInProgress) break a;
for (; null === renderLanes.sibling; ) {
if (
null === renderLanes.return ||
renderLanes.return === workInProgress
)
break a;
renderLanes = renderLanes.return;
}
renderLanes.sibling.return = renderLanes.return;
renderLanes = renderLanes.sibling;
}
workInProgress.stateNode = current;
null !== workInProgress.ref && (workInProgress.flags |= 2097664);
}
@@ -5119,12 +5112,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 6:
if (current && null != workInProgress.stateNode)
updateHostText(
current,
workInProgress,
current.memoizedProps,
newProps
);
current.memoizedProps !== newProps && (workInProgress.flags |= 4);
else {
if ("string" !== typeof newProps && null === workInProgress.stateNode)
throw Error(formatProdErrorMessage(166));
@@ -5184,12 +5172,7 @@ function completeWork(current, workInProgress, renderLanes) {
bubbleProperties(workInProgress);
return null;
case 4:
return (
popHostContainer(),
updateHostContainer(current, workInProgress),
bubbleProperties(workInProgress),
null
);
return popHostContainer(), bubbleProperties(workInProgress), null;
case 10:
return (
popProvider(workInProgress.type._context),
@@ -9477,19 +9460,19 @@ var slice = Array.prototype.slice,
};
return Text;
})(React.Component),
devToolsConfig$jscomp$inline_1107 = {
devToolsConfig$jscomp$inline_1108 = {
findFiberByHostInstance: function () {
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-80cf4a099-20230220",
version: "18.3.0-www-modern-62e6c4612-20230220",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1277 = {
bundleType: devToolsConfig$jscomp$inline_1107.bundleType,
version: devToolsConfig$jscomp$inline_1107.version,
rendererPackageName: devToolsConfig$jscomp$inline_1107.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1107.rendererConfig,
var internals$jscomp$inline_1281 = {
bundleType: devToolsConfig$jscomp$inline_1108.bundleType,
version: devToolsConfig$jscomp$inline_1108.version,
rendererPackageName: devToolsConfig$jscomp$inline_1108.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1108.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -9506,26 +9489,26 @@ var internals$jscomp$inline_1277 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1107.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1108.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-80cf4a099-20230220"
reconcilerVersion: "18.3.0-next-62e6c4612-20230220"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1278 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1282 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1278.isDisabled &&
hook$jscomp$inline_1278.supportsFiber
!hook$jscomp$inline_1282.isDisabled &&
hook$jscomp$inline_1282.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1278.inject(
internals$jscomp$inline_1277
(rendererID = hook$jscomp$inline_1282.inject(
internals$jscomp$inline_1281
)),
(injectedHook = hook$jscomp$inline_1278);
(injectedHook = hook$jscomp$inline_1282);
} catch (err) {}
}
var Path = Mode$1.Path;
+23 -32
View File
@@ -31295,19 +31295,13 @@ function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent;
var updateHostText;
{
// Mutation mode
appendAllChildren = function (
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
function appendAllChildren(
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
{
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
@@ -31338,13 +31332,11 @@ var updateHostText;
node.sibling.return = node.return;
node = node.sibling;
}
};
}
} // An unfortunate fork of appendAllChildren because we have two different parent types.
updateHostContainer = function (current, workInProgress) {
// Noop
};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
{
// If we have an alternate, that means this is an update and we need to
// schedule a side-effect to do the updates.
var oldProps = current.memoizedProps;
@@ -31377,14 +31369,16 @@ var updateHostText;
if (updatePayload) {
markUpdate(workInProgress);
}
};
}
}
updateHostText = function (current, workInProgress, oldText, newText) {
function updateHostText(current, workInProgress, oldText, newText) {
{
// If the text differs, mark it as an update. All the work in done in commitWork.
if (oldText !== newText) {
markUpdate(workInProgress);
}
};
}
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
@@ -31782,8 +31776,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
}
}
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
if (enableTransitionTracing) {
@@ -31911,7 +31903,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
}
var _currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
var _currentHostContext2 = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
// "stack" as the parent. Then append children as we go in beginWork
// or completeWork depending on whether we want to add them top->down or
// bottom->up. Top->down is faster in IE11.
@@ -31922,7 +31914,7 @@ function completeWork(current, workInProgress, renderLanes) {
// TODO: Move this and createInstance step into the beginPhase
// to consolidate.
if (
prepareToHydrateHostInstance(workInProgress, _currentHostContext)
prepareToHydrateHostInstance(workInProgress, _currentHostContext2)
) {
// If changes to the hydrated node need to be applied at the
// commit-phase we mark this as such.
@@ -31935,10 +31927,10 @@ function completeWork(current, workInProgress, renderLanes) {
_type,
newProps,
_rootContainerInstance,
_currentHostContext,
_currentHostContext2,
workInProgress
);
appendAllChildren(instance, workInProgress, false, false);
appendAllChildren(instance, workInProgress);
workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
// (eg DOM renderer supports auto-focus for certain elements).
// Make sure such renderers get scheduled for later work.
@@ -31978,7 +31970,7 @@ function completeWork(current, workInProgress, renderLanes) {
var _rootContainerInstance2 = getRootHostContainer();
var _currentHostContext2 = getHostContext();
var _currentHostContext3 = getHostContext();
var _wasHydrated3 = popHydrationState(workInProgress);
@@ -31990,7 +31982,7 @@ function completeWork(current, workInProgress, renderLanes) {
workInProgress.stateNode = createTextInstance(
newText,
_rootContainerInstance2,
_currentHostContext2,
_currentHostContext3,
workInProgress
);
}
@@ -32137,7 +32129,6 @@ function completeWork(current, workInProgress, renderLanes) {
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(current, workInProgress);
if (current === null) {
preparePortalMount(workInProgress.stateNode.containerInfo);
@@ -42005,7 +41996,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-classic-62e6c4612-20230220";
function createPortal$1(
children,
+23 -32
View File
@@ -30928,19 +30928,13 @@ function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent;
var updateHostText;
{
// Mutation mode
appendAllChildren = function (
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
function appendAllChildren(
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
{
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
@@ -30971,13 +30965,11 @@ var updateHostText;
node.sibling.return = node.return;
node = node.sibling;
}
};
}
} // An unfortunate fork of appendAllChildren because we have two different parent types.
updateHostContainer = function (current, workInProgress) {
// Noop
};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
{
// If we have an alternate, that means this is an update and we need to
// schedule a side-effect to do the updates.
var oldProps = current.memoizedProps;
@@ -31010,14 +31002,16 @@ var updateHostText;
if (updatePayload) {
markUpdate(workInProgress);
}
};
}
}
updateHostText = function (current, workInProgress, oldText, newText) {
function updateHostText(current, workInProgress, oldText, newText) {
{
// If the text differs, mark it as an update. All the work in done in commitWork.
if (oldText !== newText) {
markUpdate(workInProgress);
}
};
}
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
@@ -31408,8 +31402,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
}
}
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
if (enableTransitionTracing) {
@@ -31537,7 +31529,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
}
var _currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
var _currentHostContext2 = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
// "stack" as the parent. Then append children as we go in beginWork
// or completeWork depending on whether we want to add them top->down or
// bottom->up. Top->down is faster in IE11.
@@ -31548,7 +31540,7 @@ function completeWork(current, workInProgress, renderLanes) {
// TODO: Move this and createInstance step into the beginPhase
// to consolidate.
if (
prepareToHydrateHostInstance(workInProgress, _currentHostContext)
prepareToHydrateHostInstance(workInProgress, _currentHostContext2)
) {
// If changes to the hydrated node need to be applied at the
// commit-phase we mark this as such.
@@ -31561,10 +31553,10 @@ function completeWork(current, workInProgress, renderLanes) {
_type,
newProps,
_rootContainerInstance,
_currentHostContext,
_currentHostContext2,
workInProgress
);
appendAllChildren(instance, workInProgress, false, false);
appendAllChildren(instance, workInProgress);
workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
// (eg DOM renderer supports auto-focus for certain elements).
// Make sure such renderers get scheduled for later work.
@@ -31604,7 +31596,7 @@ function completeWork(current, workInProgress, renderLanes) {
var _rootContainerInstance2 = getRootHostContainer();
var _currentHostContext2 = getHostContext();
var _currentHostContext3 = getHostContext();
var _wasHydrated3 = popHydrationState(workInProgress);
@@ -31616,7 +31608,7 @@ function completeWork(current, workInProgress, renderLanes) {
workInProgress.stateNode = createTextInstance(
newText,
_rootContainerInstance2,
_currentHostContext2,
_currentHostContext3,
workInProgress
);
}
@@ -31763,7 +31755,6 @@ function completeWork(current, workInProgress, renderLanes) {
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(current, workInProgress);
if (current === null) {
preparePortalMount(workInProgress.stateNode.containerInfo);
@@ -41609,7 +41600,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-modern-62e6c4612-20230220";
function createPortal$1(
children,
+36 -49
View File
@@ -9717,26 +9717,7 @@ function markUpdate(workInProgress) {
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
var appendAllChildren, updateHostContainer, updateHostComponent, updateHostText;
appendAllChildren = function (parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) parent.appendChild(node.stateNode);
else if (4 !== node.tag && 27 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === workInProgress) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function () {};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
var oldProps = current.memoizedProps;
if (oldProps !== newProps) {
current = workInProgress.stateNode;
@@ -9851,10 +9832,7 @@ updateHostComponent = function (current, workInProgress, type, newProps) {
(workInProgress.updateQueue = JSCompiler_inline_result) &&
markUpdate(workInProgress);
}
};
updateHostText = function (current, workInProgress, oldText, newText) {
oldText !== newText && markUpdate(workInProgress);
};
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
if (!isHydrating)
switch (renderState.tailMode) {
@@ -9956,7 +9934,6 @@ function completeWork(current, workInProgress, renderLanes) {
null !== hydrationErrors &&
(queueRecoverableErrors(hydrationErrors),
(hydrationErrors = null)));
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
enableTransitionTracing &&
0 !== (workInProgress.subtreeFlags & 8192) &&
@@ -10032,7 +10009,23 @@ function completeWork(current, workInProgress, renderLanes) {
);
current[internalInstanceKey] = workInProgress;
current[internalPropsKey] = newProps;
appendAllChildren(current, workInProgress, !1, !1);
a: for (type = workInProgress.child; null !== type; ) {
if (5 === type.tag || 6 === type.tag)
current.appendChild(type.stateNode);
else if (4 !== type.tag && 27 !== type.tag && null !== type.child) {
type.child.return = type;
type = type.child;
continue;
}
if (type === workInProgress) break a;
for (; null === type.sibling; ) {
if (null === type.return || type.return === workInProgress)
break a;
type = type.return;
}
type.sibling.return = type.return;
type = type.sibling;
}
workInProgress.stateNode = current;
a: switch (
(setInitialProperties(current, renderLanes, newProps), renderLanes)
@@ -10057,12 +10050,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 6:
if (current && null != workInProgress.stateNode)
updateHostText(
current,
workInProgress,
current.memoizedProps,
newProps
);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if ("string" !== typeof newProps && null === workInProgress.stateNode)
throw Error(formatProdErrorMessage(166));
@@ -10166,7 +10154,6 @@ function completeWork(current, workInProgress, renderLanes) {
case 4:
return (
popHostContainer(),
updateHostContainer(current, workInProgress),
null === current &&
listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),
bubbleProperties(workInProgress),
@@ -15479,17 +15466,17 @@ Internals.Events = [
restoreStateIfNeeded,
batchedUpdates
];
var devToolsConfig$jscomp$inline_1731 = {
var devToolsConfig$jscomp$inline_1742 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-80cf4a099-20230220",
version: "18.3.0-www-classic-62e6c4612-20230220",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2095 = {
bundleType: devToolsConfig$jscomp$inline_1731.bundleType,
version: devToolsConfig$jscomp$inline_1731.version,
rendererPackageName: devToolsConfig$jscomp$inline_1731.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1731.rendererConfig,
var internals$jscomp$inline_2109 = {
bundleType: devToolsConfig$jscomp$inline_1742.bundleType,
version: devToolsConfig$jscomp$inline_1742.version,
rendererPackageName: devToolsConfig$jscomp$inline_1742.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1742.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -15505,26 +15492,26 @@ var internals$jscomp$inline_2095 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1731.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1742.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-80cf4a099-20230220"
reconcilerVersion: "18.3.0-next-62e6c4612-20230220"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2096 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2110 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2096.isDisabled &&
hook$jscomp$inline_2096.supportsFiber
!hook$jscomp$inline_2110.isDisabled &&
hook$jscomp$inline_2110.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2096.inject(
internals$jscomp$inline_2095
(rendererID = hook$jscomp$inline_2110.inject(
internals$jscomp$inline_2109
)),
(injectedHook = hook$jscomp$inline_2096);
(injectedHook = hook$jscomp$inline_2110);
} catch (err) {}
}
assign(Internals, {
@@ -15760,4 +15747,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-80cf4a099-20230220";
exports.version = "18.3.0-next-62e6c4612-20230220";
+36 -49
View File
@@ -9468,26 +9468,7 @@ function markUpdate(workInProgress) {
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
var appendAllChildren, updateHostContainer, updateHostComponent, updateHostText;
appendAllChildren = function (parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) parent.appendChild(node.stateNode);
else if (4 !== node.tag && 27 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === workInProgress) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function () {};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
var oldProps = current.memoizedProps;
if (oldProps !== newProps) {
current = workInProgress.stateNode;
@@ -9602,10 +9583,7 @@ updateHostComponent = function (current, workInProgress, type, newProps) {
(workInProgress.updateQueue = JSCompiler_inline_result) &&
markUpdate(workInProgress);
}
};
updateHostText = function (current, workInProgress, oldText, newText) {
oldText !== newText && markUpdate(workInProgress);
};
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
if (!isHydrating)
switch (renderState.tailMode) {
@@ -9701,7 +9679,6 @@ function completeWork(current, workInProgress, renderLanes) {
null !== hydrationErrors &&
(queueRecoverableErrors(hydrationErrors),
(hydrationErrors = null)));
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
enableTransitionTracing &&
0 !== (workInProgress.subtreeFlags & 8192) &&
@@ -9777,7 +9754,23 @@ function completeWork(current, workInProgress, renderLanes) {
);
current[internalInstanceKey] = workInProgress;
current[internalPropsKey] = newProps;
appendAllChildren(current, workInProgress, !1, !1);
a: for (type = workInProgress.child; null !== type; ) {
if (5 === type.tag || 6 === type.tag)
current.appendChild(type.stateNode);
else if (4 !== type.tag && 27 !== type.tag && null !== type.child) {
type.child.return = type;
type = type.child;
continue;
}
if (type === workInProgress) break a;
for (; null === type.sibling; ) {
if (null === type.return || type.return === workInProgress)
break a;
type = type.return;
}
type.sibling.return = type.return;
type = type.sibling;
}
workInProgress.stateNode = current;
a: switch (
(setInitialProperties(current, renderLanes, newProps), renderLanes)
@@ -9802,12 +9795,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 6:
if (current && null != workInProgress.stateNode)
updateHostText(
current,
workInProgress,
current.memoizedProps,
newProps
);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if ("string" !== typeof newProps && null === workInProgress.stateNode)
throw Error(formatProdErrorMessage(166));
@@ -9911,7 +9899,6 @@ function completeWork(current, workInProgress, renderLanes) {
case 4:
return (
popHostContainer(),
updateHostContainer(current, workInProgress),
null === current &&
listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),
bubbleProperties(workInProgress),
@@ -15008,17 +14995,17 @@ Internals.Events = [
restoreStateIfNeeded,
batchedUpdates
];
var devToolsConfig$jscomp$inline_1690 = {
var devToolsConfig$jscomp$inline_1701 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-80cf4a099-20230220",
version: "18.3.0-www-modern-62e6c4612-20230220",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2059 = {
bundleType: devToolsConfig$jscomp$inline_1690.bundleType,
version: devToolsConfig$jscomp$inline_1690.version,
rendererPackageName: devToolsConfig$jscomp$inline_1690.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1690.rendererConfig,
var internals$jscomp$inline_2073 = {
bundleType: devToolsConfig$jscomp$inline_1701.bundleType,
version: devToolsConfig$jscomp$inline_1701.version,
rendererPackageName: devToolsConfig$jscomp$inline_1701.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1701.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -15035,26 +15022,26 @@ var internals$jscomp$inline_2059 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1690.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1701.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-80cf4a099-20230220"
reconcilerVersion: "18.3.0-next-62e6c4612-20230220"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2060 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2074 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2060.isDisabled &&
hook$jscomp$inline_2060.supportsFiber
!hook$jscomp$inline_2074.isDisabled &&
hook$jscomp$inline_2074.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2060.inject(
internals$jscomp$inline_2059
(rendererID = hook$jscomp$inline_2074.inject(
internals$jscomp$inline_2073
)),
(injectedHook = hook$jscomp$inline_2060);
(injectedHook = hook$jscomp$inline_2074);
} catch (err) {}
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
@@ -15226,4 +15213,4 @@ exports.unstable_flushControlled = function (fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-80cf4a099-20230220";
exports.version = "18.3.0-next-62e6c4612-20230220";
@@ -9967,26 +9967,7 @@ function markUpdate(workInProgress) {
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
var appendAllChildren, updateHostContainer, updateHostComponent, updateHostText;
appendAllChildren = function (parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) parent.appendChild(node.stateNode);
else if (4 !== node.tag && 27 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === workInProgress) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function () {};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
var oldProps = current.memoizedProps;
if (oldProps !== newProps) {
current = workInProgress.stateNode;
@@ -10101,10 +10082,7 @@ updateHostComponent = function (current, workInProgress, type, newProps) {
(workInProgress.updateQueue = JSCompiler_inline_result) &&
markUpdate(workInProgress);
}
};
updateHostText = function (current, workInProgress, oldText, newText) {
oldText !== newText && markUpdate(workInProgress);
};
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
if (!isHydrating)
switch (renderState.tailMode) {
@@ -10242,7 +10220,6 @@ function completeWork(current, workInProgress, renderLanes) {
null !== hydrationErrors &&
(queueRecoverableErrors(hydrationErrors),
(hydrationErrors = null)));
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
enableTransitionTracing &&
0 !== (workInProgress.subtreeFlags & 8192) &&
@@ -10318,7 +10295,23 @@ function completeWork(current, workInProgress, renderLanes) {
);
current[internalInstanceKey] = workInProgress;
current[internalPropsKey] = newProps;
appendAllChildren(current, workInProgress, !1, !1);
a: for (type = workInProgress.child; null !== type; ) {
if (5 === type.tag || 6 === type.tag)
current.appendChild(type.stateNode);
else if (4 !== type.tag && 27 !== type.tag && null !== type.child) {
type.child.return = type;
type = type.child;
continue;
}
if (type === workInProgress) break a;
for (; null === type.sibling; ) {
if (null === type.return || type.return === workInProgress)
break a;
type = type.return;
}
type.sibling.return = type.return;
type = type.sibling;
}
workInProgress.stateNode = current;
a: switch (
(setInitialProperties(current, renderLanes, newProps), renderLanes)
@@ -10343,12 +10336,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 6:
if (current && null != workInProgress.stateNode)
updateHostText(
current,
workInProgress,
current.memoizedProps,
newProps
);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if ("string" !== typeof newProps && null === workInProgress.stateNode)
throw Error(formatProdErrorMessage(166));
@@ -10473,7 +10461,6 @@ function completeWork(current, workInProgress, renderLanes) {
case 4:
return (
popHostContainer(),
updateHostContainer(current, workInProgress),
null === current &&
listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),
bubbleProperties(workInProgress),
@@ -16249,10 +16236,10 @@ Internals.Events = [
restoreStateIfNeeded,
batchedUpdates
];
var devToolsConfig$jscomp$inline_1811 = {
var devToolsConfig$jscomp$inline_1822 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-80cf4a099-20230220",
version: "18.3.0-www-classic-62e6c4612-20230220",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -16270,10 +16257,10 @@ var devToolsConfig$jscomp$inline_1811 = {
} catch (err) {}
return hook.checkDCE ? !0 : !1;
})({
bundleType: devToolsConfig$jscomp$inline_1811.bundleType,
version: devToolsConfig$jscomp$inline_1811.version,
rendererPackageName: devToolsConfig$jscomp$inline_1811.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1811.rendererConfig,
bundleType: devToolsConfig$jscomp$inline_1822.bundleType,
version: devToolsConfig$jscomp$inline_1822.version,
rendererPackageName: devToolsConfig$jscomp$inline_1822.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1822.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -16289,14 +16276,14 @@ var devToolsConfig$jscomp$inline_1811 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1811.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1822.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-80cf4a099-20230220"
reconcilerVersion: "18.3.0-next-62e6c4612-20230220"
});
assign(Internals, {
ReactBrowserEventEmitter: {
@@ -16531,7 +16518,7 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-80cf4a099-20230220";
exports.version = "18.3.0-next-62e6c4612-20230220";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -9708,26 +9708,7 @@ function markUpdate(workInProgress) {
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
var appendAllChildren, updateHostContainer, updateHostComponent, updateHostText;
appendAllChildren = function (parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) parent.appendChild(node.stateNode);
else if (4 !== node.tag && 27 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === workInProgress) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function () {};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
var oldProps = current.memoizedProps;
if (oldProps !== newProps) {
current = workInProgress.stateNode;
@@ -9842,10 +9823,7 @@ updateHostComponent = function (current, workInProgress, type, newProps) {
(workInProgress.updateQueue = JSCompiler_inline_result) &&
markUpdate(workInProgress);
}
};
updateHostText = function (current, workInProgress, oldText, newText) {
oldText !== newText && markUpdate(workInProgress);
};
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
if (!isHydrating)
switch (renderState.tailMode) {
@@ -9977,7 +9955,6 @@ function completeWork(current, workInProgress, renderLanes) {
null !== hydrationErrors &&
(queueRecoverableErrors(hydrationErrors),
(hydrationErrors = null)));
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
enableTransitionTracing &&
0 !== (workInProgress.subtreeFlags & 8192) &&
@@ -10053,7 +10030,23 @@ function completeWork(current, workInProgress, renderLanes) {
);
current[internalInstanceKey] = workInProgress;
current[internalPropsKey] = newProps;
appendAllChildren(current, workInProgress, !1, !1);
a: for (type = workInProgress.child; null !== type; ) {
if (5 === type.tag || 6 === type.tag)
current.appendChild(type.stateNode);
else if (4 !== type.tag && 27 !== type.tag && null !== type.child) {
type.child.return = type;
type = type.child;
continue;
}
if (type === workInProgress) break a;
for (; null === type.sibling; ) {
if (null === type.return || type.return === workInProgress)
break a;
type = type.return;
}
type.sibling.return = type.return;
type = type.sibling;
}
workInProgress.stateNode = current;
a: switch (
(setInitialProperties(current, renderLanes, newProps), renderLanes)
@@ -10078,12 +10071,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 6:
if (current && null != workInProgress.stateNode)
updateHostText(
current,
workInProgress,
current.memoizedProps,
newProps
);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if ("string" !== typeof newProps && null === workInProgress.stateNode)
throw Error(formatProdErrorMessage(166));
@@ -10208,7 +10196,6 @@ function completeWork(current, workInProgress, renderLanes) {
case 4:
return (
popHostContainer(),
updateHostContainer(current, workInProgress),
null === current &&
listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),
bubbleProperties(workInProgress),
@@ -15768,10 +15755,10 @@ Internals.Events = [
restoreStateIfNeeded,
batchedUpdates
];
var devToolsConfig$jscomp$inline_1770 = {
var devToolsConfig$jscomp$inline_1781 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-80cf4a099-20230220",
version: "18.3.0-www-modern-62e6c4612-20230220",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -15789,10 +15776,10 @@ var devToolsConfig$jscomp$inline_1770 = {
} catch (err) {}
return hook.checkDCE ? !0 : !1;
})({
bundleType: devToolsConfig$jscomp$inline_1770.bundleType,
version: devToolsConfig$jscomp$inline_1770.version,
rendererPackageName: devToolsConfig$jscomp$inline_1770.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1770.rendererConfig,
bundleType: devToolsConfig$jscomp$inline_1781.bundleType,
version: devToolsConfig$jscomp$inline_1781.version,
rendererPackageName: devToolsConfig$jscomp$inline_1781.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1781.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -15809,14 +15796,14 @@ var devToolsConfig$jscomp$inline_1770 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1770.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1781.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-80cf4a099-20230220"
reconcilerVersion: "18.3.0-next-62e6c4612-20230220"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function (children, container) {
@@ -15987,7 +15974,7 @@ exports.unstable_flushControlled = function (fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-80cf4a099-20230220";
exports.version = "18.3.0-next-62e6c4612-20230220";
/* 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-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-classic-62e6c4612-20230220";
// This refers to a WWW module.
var warningWWW = require("warning");
@@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");
var ReactVersion = "18.3.0-www-modern-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-modern-62e6c4612-20230220";
// This refers to a WWW module.
var warningWWW = require("warning");
File diff suppressed because it is too large Load Diff
@@ -3568,4 +3568,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-80cf4a099-20230220";
exports.version = "18.3.0-www-modern-62e6c4612-20230220";
@@ -21799,47 +21799,13 @@ function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
function hadNoMutationsEffects(current, completedWork) {
var didBailout = current !== null && current.child === completedWork.child;
if (didBailout) {
return true;
}
if ((completedWork.flags & ChildDeletion) !== NoFlags$1) {
return false;
} // TODO: If we move the `hadNoMutationsEffects` call after `bubbleProperties`
// then we only have to check the `completedWork.subtreeFlags`.
var child = completedWork.child;
while (child !== null) {
if (
(child.flags & MutationMask) !== NoFlags$1 ||
(child.subtreeFlags & MutationMask) !== NoFlags$1
) {
return false;
}
child = child.sibling;
}
return true;
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent;
var updateHostText;
if (supportsMutation) {
// Mutation mode
appendAllChildren = function (
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
function appendAllChildren(
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
{
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
@@ -21870,13 +21836,11 @@ if (supportsMutation) {
node.sibling.return = node.return;
node = node.sibling;
}
};
}
} // An unfortunate fork of appendAllChildren because we have two different parent types.
updateHostContainer = function (current, workInProgress) {
// Noop
};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
{
// If we have an alternate, that means this is an update and we need to
// schedule a side-effect to do the updates.
var oldProps = current.memoizedProps;
@@ -21909,250 +21873,16 @@ if (supportsMutation) {
if (updatePayload) {
markUpdate(workInProgress);
}
};
}
}
updateHostText = function (current, workInProgress, oldText, newText) {
function updateHostText(current, workInProgress, oldText, newText) {
{
// If the text differs, mark it as an update. All the work in done in commitWork.
if (oldText !== newText) {
markUpdate(workInProgress);
}
};
} else if (supportsPersistence) {
// Persistent host tree mode
appendAllChildren = function (
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
while (node !== null) {
// eslint-disable-next-line no-labels
if (node.tag === HostComponent) {
var instance = node.stateNode;
if (needsVisibilityToggle && isHidden) {
instance = cloneHiddenInstance();
}
appendInitialChild(parent, instance);
} else if (node.tag === HostText) {
var _instance = node.stateNode;
if (needsVisibilityToggle && isHidden) {
_instance = cloneHiddenTextInstance();
}
appendInitialChild(parent, _instance);
} else if (node.tag === HostPortal);
else if (node.tag === OffscreenComponent && node.memoizedState !== null) {
// The children in this boundary are hidden. Toggle their visibility
// before appending.
var child = node.child;
if (child !== null) {
child.return = node;
}
appendAllChildren(parent, node, true, true);
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
node = node;
if (node === workInProgress) {
return;
} // $FlowFixMe[incompatible-use] found when upgrading Flow
while (node.sibling === null) {
// $FlowFixMe[incompatible-use] found when upgrading Flow
if (node.return === null || node.return === workInProgress) {
return;
}
node = node.return;
} // $FlowFixMe[incompatible-use] found when upgrading Flow
node.sibling.return = node.return;
node = node.sibling;
}
}; // An unfortunate fork of appendAllChildren because we have two different parent types.
var appendAllChildrenToContainer = function (
containerChildSet,
workInProgress,
needsVisibilityToggle,
isHidden
) {
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
while (node !== null) {
// eslint-disable-next-line no-labels
if (node.tag === HostComponent) {
if (needsVisibilityToggle && isHidden) {
cloneHiddenInstance();
}
appendChildToContainerChildSet();
} else if (node.tag === HostText) {
if (needsVisibilityToggle && isHidden) {
cloneHiddenTextInstance();
}
appendChildToContainerChildSet();
} else if (node.tag === HostPortal);
else if (node.tag === OffscreenComponent && node.memoizedState !== null) {
// The children in this boundary are hidden. Toggle their visibility
// before appending.
var child = node.child;
if (child !== null) {
child.return = node;
} // If Offscreen is not in manual mode, detached tree is hidden from user space.
var _needsVisibilityToggle = !isOffscreenManual(node);
appendAllChildrenToContainer(
containerChildSet,
node,
_needsVisibilityToggle,
true
);
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
node = node;
if (node === workInProgress) {
return;
} // $FlowFixMe[incompatible-use] found when upgrading Flow
while (node.sibling === null) {
// $FlowFixMe[incompatible-use] found when upgrading Flow
if (node.return === null || node.return === workInProgress) {
return;
}
node = node.return;
} // $FlowFixMe[incompatible-use] found when upgrading Flow
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function (current, workInProgress) {
var portalOrRoot = workInProgress.stateNode;
var childrenUnchanged = hadNoMutationsEffects(current, workInProgress);
if (childrenUnchanged);
else {
var newChildSet = createContainerChildSet(); // If children might have changed, we have to add them all to the set.
appendAllChildrenToContainer(newChildSet, workInProgress, false, false);
portalOrRoot.pendingChildren = newChildSet; // Schedule an update on the container to swap out the container.
markUpdate(workInProgress);
finalizeContainerChildren();
}
};
updateHostComponent = function (current, workInProgress, type, newProps) {
var currentInstance = current.stateNode;
var oldProps = current.memoizedProps; // If there are no effects associated with this node, then none of our children had any updates.
// This guarantees that we can reuse all of them.
var childrenUnchanged = hadNoMutationsEffects(current, workInProgress);
if (childrenUnchanged && oldProps === newProps) {
// No changes, just reuse the existing instance.
// Note that this might release a previous clone.
workInProgress.stateNode = currentInstance;
return;
}
var recyclableInstance = workInProgress.stateNode;
var currentHostContext = getHostContext();
var updatePayload = null;
if (oldProps !== newProps) {
updatePayload = prepareUpdate(
recyclableInstance,
type,
oldProps,
newProps,
currentHostContext
);
}
if (childrenUnchanged && updatePayload === null) {
// No changes, just reuse the existing instance.
// Note that this might release a previous clone.
workInProgress.stateNode = currentInstance;
return;
}
var newInstance = cloneInstance();
if (finalizeInitialChildren(newInstance, type, newProps)) {
markUpdate(workInProgress);
}
workInProgress.stateNode = newInstance;
if (childrenUnchanged) {
// If there are no other effects in this tree, we need to flag this node as having one.
// Even though we're not going to use it for anything.
// Otherwise parents won't know that there are new children to propagate upwards.
markUpdate(workInProgress);
} else {
// If children might have changed, we have to add them all to the set.
appendAllChildren(newInstance, workInProgress, false, false);
}
};
updateHostText = function (current, workInProgress, oldText, newText) {
if (oldText !== newText) {
// If the text content differs, we'll create a new text instance for it.
var rootContainerInstance = getRootHostContainer();
var currentHostContext = getHostContext();
workInProgress.stateNode = createTextInstance(
newText,
rootContainerInstance,
currentHostContext,
workInProgress
); // We'll have to mark it as having an effect, even though we won't use the effect for anything.
// This lets the parents know that at least one of their children has changed.
markUpdate(workInProgress);
} else {
workInProgress.stateNode = current.stateNode;
}
};
} else {
// No host operations
updateHostContainer = function (current, workInProgress) {
// Noop
};
updateHostComponent = function (current, workInProgress, type, newProps) {
// Noop
};
updateHostText = function (current, workInProgress, oldText, newText) {
// Noop
};
}
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
@@ -22447,8 +22177,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
}
}
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
@@ -22567,7 +22295,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
}
var _currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
var _currentHostContext2 = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
// "stack" as the parent. Then append children as we go in beginWork
// or completeWork depending on whether we want to add them top->down or
// bottom->up. Top->down is faster in IE11.
@@ -22578,7 +22306,7 @@ function completeWork(current, workInProgress, renderLanes) {
// TODO: Move this and createInstance step into the beginPhase
// to consolidate.
if (
prepareToHydrateHostInstance(workInProgress, _currentHostContext)
prepareToHydrateHostInstance(workInProgress, _currentHostContext2)
) {
// If changes to the hydrated node need to be applied at the
// commit-phase we mark this as such.
@@ -22591,10 +22319,10 @@ function completeWork(current, workInProgress, renderLanes) {
_type,
newProps,
_rootContainerInstance,
_currentHostContext,
_currentHostContext2,
workInProgress
);
appendAllChildren(instance, workInProgress, false, false);
appendAllChildren(instance, workInProgress);
workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
// (eg DOM renderer supports auto-focus for certain elements).
// Make sure such renderers get scheduled for later work.
@@ -22634,7 +22362,7 @@ function completeWork(current, workInProgress, renderLanes) {
var _rootContainerInstance2 = getRootHostContainer();
var _currentHostContext2 = getHostContext();
var _currentHostContext3 = getHostContext();
var _wasHydrated3 = popHydrationState(workInProgress);
@@ -22646,7 +22374,7 @@ function completeWork(current, workInProgress, renderLanes) {
workInProgress.stateNode = createTextInstance(
newText,
_rootContainerInstance2,
_currentHostContext2,
_currentHostContext3,
workInProgress
);
}
@@ -22770,7 +22498,6 @@ function completeWork(current, workInProgress, renderLanes) {
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(current, workInProgress);
if (current === null) {
preparePortalMount(workInProgress.stateNode.containerInfo);
@@ -31506,7 +31233,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-classic-62e6c4612-20230220";
function createPortal$1(
children,
@@ -34336,24 +34063,6 @@ function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
);
}
// Renderers that don't support persistence
// can re-export everything from this module.
function shim() {
throw new Error(
"The current renderer does not support persistence. " +
"This error is likely caused by a bug in React. " +
"Please file an issue."
);
} // Persistence (when unsupported)
var supportsPersistence = false;
var cloneInstance = shim;
var createContainerChildSet = shim;
var appendChildToContainerChildSet = shim;
var finalizeContainerChildren = shim;
var cloneHiddenInstance = shim;
var cloneHiddenTextInstance = shim;
var SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning";
var SUSPENSE_START_DATA = "$";
var SUSPENSE_END_DATA = "/$";
@@ -34627,10 +34336,6 @@ function handleErrorInNextTick(error) {
throw error;
});
} // -------------------
// Mutation
// -------------------
var supportsMutation = true;
function commitMount(domElement, type, newProps, internalInstanceHandle) {
// Despite the naming that might imply otherwise, this method only
// fires if there is an `Update` effect scheduled during mounting.
@@ -28333,19 +28333,13 @@ function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent;
var updateHostText;
{
// Mutation mode
appendAllChildren = function (
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
function appendAllChildren(
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
{
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
@@ -28376,13 +28370,11 @@ var updateHostText;
node.sibling.return = node.return;
node = node.sibling;
}
};
}
} // An unfortunate fork of appendAllChildren because we have two different parent types.
updateHostContainer = function (current, workInProgress) {
// Noop
};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
{
// If we have an alternate, that means this is an update and we need to
// schedule a side-effect to do the updates.
var oldProps = current.memoizedProps;
@@ -28415,14 +28407,16 @@ var updateHostText;
if (updatePayload) {
markUpdate(workInProgress);
}
};
}
}
updateHostText = function (current, workInProgress, oldText, newText) {
function updateHostText(current, workInProgress, oldText, newText) {
{
// If the text differs, mark it as an update. All the work in done in commitWork.
if (oldText !== newText) {
markUpdate(workInProgress);
}
};
}
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
@@ -28710,8 +28704,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
}
}
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
@@ -28830,7 +28822,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
}
var _currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
var _currentHostContext2 = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
// "stack" as the parent. Then append children as we go in beginWork
// or completeWork depending on whether we want to add them top->down or
// bottom->up. Top->down is faster in IE11.
@@ -28841,7 +28833,7 @@ function completeWork(current, workInProgress, renderLanes) {
// TODO: Move this and createInstance step into the beginPhase
// to consolidate.
if (
prepareToHydrateHostInstance(workInProgress, _currentHostContext)
prepareToHydrateHostInstance(workInProgress, _currentHostContext2)
) {
// If changes to the hydrated node need to be applied at the
// commit-phase we mark this as such.
@@ -28854,10 +28846,10 @@ function completeWork(current, workInProgress, renderLanes) {
_type,
newProps,
_rootContainerInstance,
_currentHostContext,
_currentHostContext2,
workInProgress
);
appendAllChildren(instance, workInProgress, false, false);
appendAllChildren(instance, workInProgress);
workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
// (eg DOM renderer supports auto-focus for certain elements).
// Make sure such renderers get scheduled for later work.
@@ -28897,7 +28889,7 @@ function completeWork(current, workInProgress, renderLanes) {
var _rootContainerInstance2 = getRootHostContainer();
var _currentHostContext2 = getHostContext();
var _currentHostContext3 = getHostContext();
var _wasHydrated3 = popHydrationState(workInProgress);
@@ -28909,7 +28901,7 @@ function completeWork(current, workInProgress, renderLanes) {
workInProgress.stateNode = createTextInstance(
newText,
_rootContainerInstance2,
_currentHostContext2,
_currentHostContext3,
workInProgress
);
}
@@ -29033,7 +29025,6 @@ function completeWork(current, workInProgress, renderLanes) {
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(current, workInProgress);
if (current === null) {
preparePortalMount(workInProgress.stateNode.containerInfo);
@@ -37633,7 +37624,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-modern-62e6c4612-20230220";
function createPortal$1(
children,
File diff suppressed because it is too large Load Diff
@@ -8831,26 +8831,7 @@ function markUpdate(workInProgress) {
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
var appendAllChildren, updateHostContainer, updateHostComponent, updateHostText;
appendAllChildren = function (parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) parent.appendChild(node.stateNode);
else if (4 !== node.tag && 27 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === workInProgress) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function () {};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
var oldProps = current.memoizedProps;
if (oldProps !== newProps) {
current = workInProgress.stateNode;
@@ -8965,10 +8946,7 @@ updateHostComponent = function (current, workInProgress, type, newProps) {
(workInProgress.updateQueue = JSCompiler_inline_result) &&
markUpdate(workInProgress);
}
};
updateHostText = function (current, workInProgress, oldText, newText) {
oldText !== newText && markUpdate(workInProgress);
};
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
if (!isHydrating)
switch (renderState.tailMode) {
@@ -9057,7 +9035,6 @@ function completeWork(current, workInProgress, renderLanes) {
null !== hydrationErrors &&
(queueRecoverableErrors(hydrationErrors),
(hydrationErrors = null)));
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
case 26:
@@ -9130,7 +9107,23 @@ function completeWork(current, workInProgress, renderLanes) {
);
current[internalInstanceKey] = workInProgress;
current[internalPropsKey] = newProps;
appendAllChildren(current, workInProgress, !1, !1);
a: for (type = workInProgress.child; null !== type; ) {
if (5 === type.tag || 6 === type.tag)
current.appendChild(type.stateNode);
else if (4 !== type.tag && 27 !== type.tag && null !== type.child) {
type.child.return = type;
type = type.child;
continue;
}
if (type === workInProgress) break a;
for (; null === type.sibling; ) {
if (null === type.return || type.return === workInProgress)
break a;
type = type.return;
}
type.sibling.return = type.return;
type = type.sibling;
}
workInProgress.stateNode = current;
a: switch (
(setInitialProperties(current, renderLanes, newProps), renderLanes)
@@ -9155,12 +9148,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 6:
if (current && null != workInProgress.stateNode)
updateHostText(
current,
workInProgress,
current.memoizedProps,
newProps
);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if ("string" !== typeof newProps && null === workInProgress.stateNode)
throw Error(formatProdErrorMessage(166));
@@ -9268,7 +9256,6 @@ function completeWork(current, workInProgress, renderLanes) {
case 4:
return (
popHostContainer(),
updateHostContainer(current, workInProgress),
null === current &&
listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),
bubbleProperties(workInProgress),
@@ -13866,17 +13853,17 @@ Internals.Events = [
restoreStateIfNeeded,
batchedUpdates
];
var devToolsConfig$jscomp$inline_1642 = {
var devToolsConfig$jscomp$inline_1653 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-80cf4a099-20230220",
version: "18.3.0-www-modern-62e6c4612-20230220",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2019 = {
bundleType: devToolsConfig$jscomp$inline_1642.bundleType,
version: devToolsConfig$jscomp$inline_1642.version,
rendererPackageName: devToolsConfig$jscomp$inline_1642.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1642.rendererConfig,
var internals$jscomp$inline_2033 = {
bundleType: devToolsConfig$jscomp$inline_1653.bundleType,
version: devToolsConfig$jscomp$inline_1653.version,
rendererPackageName: devToolsConfig$jscomp$inline_1653.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1653.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -13893,26 +13880,26 @@ var internals$jscomp$inline_2019 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1642.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1653.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-80cf4a099-20230220"
reconcilerVersion: "18.3.0-next-62e6c4612-20230220"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2020 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2034 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2020.isDisabled &&
hook$jscomp$inline_2020.supportsFiber
!hook$jscomp$inline_2034.isDisabled &&
hook$jscomp$inline_2034.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2020.inject(
internals$jscomp$inline_2019
(rendererID = hook$jscomp$inline_2034.inject(
internals$jscomp$inline_2033
)),
(injectedHook = hook$jscomp$inline_2020);
(injectedHook = hook$jscomp$inline_2034);
} catch (err) {}
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
@@ -14227,4 +14214,4 @@ exports.unstable_flushControlled = function (fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-80cf4a099-20230220";
exports.version = "18.3.0-next-62e6c4612-20230220";
@@ -0,0 +1,389 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @nolint
* @preventMunge
* @preserve-invariant-messages
*/
"use strict";
var ReactFlightDOMRelayClientIntegration = require("ReactFlightDOMRelayClientIntegration"),
React = require("react");
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
return (
"Minified React error #" +
code +
"; visit " +
url +
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
);
}
var isArrayImpl = Array.isArray;
function parseModelRecursively(response, parentObj, key, value) {
if ("string" === typeof value)
return parseModelString(response, parentObj, key, value);
if ("object" === typeof value && null !== value) {
if (isArrayImpl(value)) {
var parsedValue = [];
for (parentObj = 0; parentObj < value.length; parentObj++)
parsedValue[parentObj] = parseModelRecursively(
response,
value,
"" + parentObj,
value[parentObj]
);
response =
parsedValue[0] === REACT_ELEMENT_TYPE
? {
$$typeof: REACT_ELEMENT_TYPE,
type: parsedValue[1],
key: parsedValue[2],
ref: null,
props: parsedValue[3],
_owner: null
}
: parsedValue;
return response;
}
parentObj = {};
for (parsedValue in value)
parentObj[parsedValue] = parseModelRecursively(
response,
value,
parsedValue,
value[parsedValue]
);
return parentObj;
}
return value;
}
var dummy = {},
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for(
"react.default_value"
),
ContextRegistry =
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;
function Chunk(status, value, reason, response) {
this.status = status;
this.value = value;
this.reason = reason;
this._response = response;
}
Chunk.prototype = Object.create(Promise.prototype);
Chunk.prototype.then = function (resolve, reject) {
switch (this.status) {
case "resolved_model":
initializeModelChunk(this);
break;
case "resolved_module":
initializeModuleChunk(this);
}
switch (this.status) {
case "fulfilled":
resolve(this.value);
break;
case "pending":
case "blocked":
resolve &&
(null === this.value && (this.value = []), this.value.push(resolve));
reject &&
(null === this.reason && (this.reason = []), this.reason.push(reject));
break;
default:
reject(this.reason);
}
};
function readChunk(chunk) {
switch (chunk.status) {
case "resolved_model":
initializeModelChunk(chunk);
break;
case "resolved_module":
initializeModuleChunk(chunk);
}
switch (chunk.status) {
case "fulfilled":
return chunk.value;
case "pending":
case "blocked":
throw chunk;
default:
throw chunk.reason;
}
}
function wakeChunk(listeners, value) {
for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value);
}
function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) {
switch (chunk.status) {
case "fulfilled":
wakeChunk(resolveListeners, chunk.value);
break;
case "pending":
case "blocked":
chunk.value = resolveListeners;
chunk.reason = rejectListeners;
break;
case "rejected":
rejectListeners && wakeChunk(rejectListeners, chunk.reason);
}
}
function triggerErrorOnChunk(chunk, error) {
if ("pending" === chunk.status || "blocked" === chunk.status) {
var listeners = chunk.reason;
chunk.status = "rejected";
chunk.reason = error;
null !== listeners && wakeChunk(listeners, error);
}
}
function resolveModuleChunk(chunk, value) {
if ("pending" === chunk.status || "blocked" === chunk.status) {
var resolveListeners = chunk.value,
rejectListeners = chunk.reason;
chunk.status = "resolved_module";
chunk.value = value;
null !== resolveListeners &&
(initializeModuleChunk(chunk),
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
}
}
var initializingChunk = null,
initializingChunkBlockedModel = null;
function initializeModelChunk(chunk) {
var prevChunk = initializingChunk,
prevBlocked = initializingChunkBlockedModel;
initializingChunk = chunk;
initializingChunkBlockedModel = null;
try {
var value = parseModelRecursively(chunk._response, dummy, "", chunk.value);
null !== initializingChunkBlockedModel &&
0 < initializingChunkBlockedModel.deps
? ((initializingChunkBlockedModel.value = value),
(chunk.status = "blocked"),
(chunk.value = null),
(chunk.reason = null))
: ((chunk.status = "fulfilled"), (chunk.value = value));
} catch (error) {
(chunk.status = "rejected"), (chunk.reason = error);
} finally {
(initializingChunk = prevChunk),
(initializingChunkBlockedModel = prevBlocked);
}
}
function initializeModuleChunk(chunk) {
try {
var value = ReactFlightDOMRelayClientIntegration.requireModule(chunk.value);
chunk.status = "fulfilled";
chunk.value = value;
} catch (error) {
(chunk.status = "rejected"), (chunk.reason = error);
}
}
function reportGlobalError(response, error) {
response._chunks.forEach(function (chunk) {
"pending" === chunk.status && triggerErrorOnChunk(chunk, error);
});
}
function getChunk(response, id) {
var chunks = response._chunks,
chunk = chunks.get(id);
chunk ||
((chunk = new Chunk("pending", null, null, response)),
chunks.set(id, chunk));
return chunk;
}
function createModelResolver(chunk, parentObject, key) {
if (initializingChunkBlockedModel) {
var blocked = initializingChunkBlockedModel;
blocked.deps++;
} else blocked = initializingChunkBlockedModel = { deps: 1, value: null };
return function (value) {
parentObject[key] = value;
blocked.deps--;
0 === blocked.deps &&
"blocked" === chunk.status &&
((value = chunk.value),
(chunk.status = "fulfilled"),
(chunk.value = blocked.value),
null !== value && wakeChunk(value, blocked.value));
};
}
function createModelReject(chunk) {
return function (error) {
return triggerErrorOnChunk(chunk, error);
};
}
function createServerReferenceProxy(response, metaData) {
var callServer = response._callServer;
return function () {
var args = Array.prototype.slice.call(arguments),
p = metaData.bound;
return "fulfilled" === p.status
? callServer(metaData, p.value.concat(args))
: Promise.resolve(p).then(function (bound) {
return callServer(metaData, bound.concat(args));
});
};
}
function parseModelString(response, parentObject, key, value) {
if ("$" === value[0]) {
if ("$" === value) return REACT_ELEMENT_TYPE;
switch (value[1]) {
case "$":
return value.substring(1);
case "L":
return (
(parentObject = parseInt(value.substring(2), 16)),
(response = getChunk(response, parentObject)),
{ $$typeof: REACT_LAZY_TYPE, _payload: response, _init: readChunk }
);
case "@":
return (
(parentObject = parseInt(value.substring(2), 16)),
getChunk(response, parentObject)
);
case "S":
return Symbol.for(value.substring(2));
case "P":
return (
(response = value.substring(2)),
ContextRegistry[response] ||
(ContextRegistry[response] = React.createServerContext(
response,
REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED
)),
ContextRegistry[response].Provider
);
case "F":
parentObject = parseInt(value.substring(2), 16);
parentObject = getChunk(response, parentObject);
switch (parentObject.status) {
case "resolved_model":
initializeModelChunk(parentObject);
}
switch (parentObject.status) {
case "fulfilled":
return createServerReferenceProxy(response, parentObject.value);
default:
throw parentObject.reason;
}
default:
value = parseInt(value.substring(1), 16);
response = getChunk(response, value);
switch (response.status) {
case "resolved_model":
initializeModelChunk(response);
break;
case "resolved_module":
initializeModuleChunk(response);
}
switch (response.status) {
case "fulfilled":
return response.value;
case "pending":
case "blocked":
return (
(value = initializingChunk),
response.then(
createModelResolver(value, parentObject, key),
createModelReject(value)
),
null
);
default:
throw response.reason;
}
}
}
return value;
}
function missingCall() {
throw Error(formatProdErrorMessage(466));
}
function resolveModule(response, id, model) {
var chunks = response._chunks,
chunk = chunks.get(id);
model = parseModelRecursively(response, dummy, "", model);
var clientReference =
ReactFlightDOMRelayClientIntegration.resolveClientReference(model);
if (
(model =
ReactFlightDOMRelayClientIntegration.preloadModule(clientReference))
) {
if (chunk) {
var blockedChunk = chunk;
blockedChunk.status = "blocked";
} else
(blockedChunk = new Chunk("blocked", null, null, response)),
chunks.set(id, blockedChunk);
model.then(
function () {
return resolveModuleChunk(blockedChunk, clientReference);
},
function (error) {
return triggerErrorOnChunk(blockedChunk, error);
}
);
} else
chunk
? resolveModuleChunk(chunk, clientReference)
: chunks.set(
id,
new Chunk("resolved_module", clientReference, null, response)
);
}
exports.close = function (response) {
reportGlobalError(response, Error(formatProdErrorMessage(412)));
};
exports.createResponse = function (bundlerConfig, callServer) {
var chunks = new Map();
return {
_bundlerConfig: bundlerConfig,
_callServer: void 0 !== callServer ? callServer : missingCall,
_chunks: chunks
};
};
exports.getRoot = function (response) {
return getChunk(response, 0);
};
exports.resolveRow = function (response, chunk) {
if ("O" === chunk[0]) {
var id = chunk[1],
model = chunk[2],
chunks = response._chunks;
(chunk = chunks.get(id))
? "pending" === chunk.status &&
((response = chunk.value),
(id = chunk.reason),
(chunk.status = "resolved_model"),
(chunk.value = model),
null !== response &&
(initializeModelChunk(chunk),
wakeChunkIfInitialized(chunk, response, id)))
: chunks.set(id, new Chunk("resolved_model", model, null, response));
} else
"I" === chunk[0]
? resolveModule(response, chunk[1], chunk[2])
: ((model = chunk[1]),
(id = chunk[2].digest),
(chunk = Error(formatProdErrorMessage(441))),
(chunk.stack = "Error: " + chunk.message),
(chunk.digest = id),
(id = response._chunks),
(chunks = id.get(model))
? triggerErrorOnChunk(chunks, chunk)
: id.set(model, new Chunk("rejected", null, chunk, response)));
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,151 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @nolint
* @preventMunge
* @preserve-invariant-messages
*/
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_SCOPE_TYPE = Symbol.for("react.scope"),
REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode"),
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
REACT_CACHE_TYPE = Symbol.for("react.cache"),
REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker"),
dynamicFeatureFlags = require("ReactFeatureFlags"),
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
function typeOf(object) {
if ("object" === typeof object && null !== object) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
switch (((object = object.type), object)) {
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
return object;
default:
switch (((object = object && object.$$typeof), object)) {
case REACT_SERVER_CONTEXT_TYPE:
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
case REACT_PROVIDER_TYPE:
return object;
default:
return $$typeof;
}
}
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
}
exports.ContextConsumer = REACT_CONTEXT_TYPE;
exports.ContextProvider = REACT_PROVIDER_TYPE;
exports.Element = REACT_ELEMENT_TYPE;
exports.ForwardRef = REACT_FORWARD_REF_TYPE;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Lazy = REACT_LAZY_TYPE;
exports.Memo = REACT_MEMO_TYPE;
exports.Portal = REACT_PORTAL_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
exports.isAsyncMode = function () {
return !1;
};
exports.isConcurrentMode = function () {
return !1;
};
exports.isContextConsumer = function (object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
};
exports.isContextProvider = function (object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
};
exports.isElement = function (object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
};
exports.isForwardRef = function (object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
};
exports.isFragment = function (object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
};
exports.isLazy = function (object) {
return typeOf(object) === REACT_LAZY_TYPE;
};
exports.isMemo = function (object) {
return typeOf(object) === REACT_MEMO_TYPE;
};
exports.isPortal = function (object) {
return typeOf(object) === REACT_PORTAL_TYPE;
};
exports.isProfiler = function (object) {
return typeOf(object) === REACT_PROFILER_TYPE;
};
exports.isStrictMode = function (object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
};
exports.isSuspense = function (object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
};
exports.isSuspenseList = function (object) {
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
};
exports.isValidElementType = function (type) {
return "string" === typeof type ||
"function" === typeof type ||
type === REACT_FRAGMENT_TYPE ||
type === REACT_PROFILER_TYPE ||
(enableDebugTracing && type === REACT_DEBUG_TRACING_MODE_TYPE) ||
type === REACT_STRICT_MODE_TYPE ||
type === REACT_SUSPENSE_TYPE ||
type === REACT_SUSPENSE_LIST_TYPE ||
type === REACT_LEGACY_HIDDEN_TYPE ||
type === REACT_OFFSCREEN_TYPE ||
type === REACT_SCOPE_TYPE ||
type === REACT_CACHE_TYPE ||
(enableTransitionTracing && type === REACT_TRACING_MARKER_TYPE) ||
("object" === typeof type &&
null !== type &&
(type.$$typeof === REACT_LAZY_TYPE ||
type.$$typeof === REACT_MEMO_TYPE ||
type.$$typeof === REACT_PROVIDER_TYPE ||
type.$$typeof === REACT_CONTEXT_TYPE ||
type.$$typeof === REACT_FORWARD_REF_TYPE ||
type.$$typeof === REACT_CLIENT_REFERENCE ||
void 0 !== type.getModuleId))
? !0
: !1;
};
exports.typeOf = typeOf;
@@ -14956,19 +14956,13 @@ function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent;
var updateHostText;
{
// Mutation mode
appendAllChildren = function (
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
function appendAllChildren(
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
{
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
@@ -14999,13 +14993,11 @@ var updateHostText;
node.sibling.return = node.return;
node = node.sibling;
}
};
}
} // An unfortunate fork of appendAllChildren because we have two different parent types.
updateHostContainer = function (current, workInProgress) {
// Noop
};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
{
// If we have an alternate, that means this is an update and we need to
// schedule a side-effect to do the updates.
var oldProps = current.memoizedProps;
@@ -15027,14 +15019,16 @@ var updateHostText;
if (updatePayload) {
markUpdate(workInProgress);
}
};
}
}
updateHostText = function (current, workInProgress, oldText, newText) {
function updateHostText(current, workInProgress, oldText, newText) {
{
// If the text differs, mark it as an update. All the work in done in commitWork.
if (oldText !== newText) {
markUpdate(workInProgress);
}
};
}
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
@@ -15390,8 +15384,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
}
}
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
@@ -15426,7 +15418,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
}
var _currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
var _currentHostContext2 = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
// "stack" as the parent. Then append children as we go in beginWork
// or completeWork depending on whether we want to add them top->down or
// bottom->up. Top->down is faster in IE11.
@@ -15448,10 +15440,10 @@ function completeWork(current, workInProgress, renderLanes) {
_type,
newProps,
_rootContainerInstance,
_currentHostContext,
_currentHostContext2,
workInProgress
);
appendAllChildren(instance, workInProgress, false, false);
appendAllChildren(instance, workInProgress);
workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
}
@@ -15635,7 +15627,6 @@ function completeWork(current, workInProgress, renderLanes) {
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
@@ -23758,7 +23749,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-classic-62e6c4612-20230220";
// Might add PROFILE later.
@@ -14956,19 +14956,13 @@ function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent;
var updateHostText;
{
// Mutation mode
appendAllChildren = function (
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
function appendAllChildren(
parent,
workInProgress,
needsVisibilityToggle,
isHidden
) {
{
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
@@ -14999,13 +14993,11 @@ var updateHostText;
node.sibling.return = node.return;
node = node.sibling;
}
};
}
} // An unfortunate fork of appendAllChildren because we have two different parent types.
updateHostContainer = function (current, workInProgress) {
// Noop
};
updateHostComponent = function (current, workInProgress, type, newProps) {
function updateHostComponent(current, workInProgress, type, newProps) {
{
// If we have an alternate, that means this is an update and we need to
// schedule a side-effect to do the updates.
var oldProps = current.memoizedProps;
@@ -15027,14 +15019,16 @@ var updateHostText;
if (updatePayload) {
markUpdate(workInProgress);
}
};
}
}
updateHostText = function (current, workInProgress, oldText, newText) {
function updateHostText(current, workInProgress, oldText, newText) {
{
// If the text differs, mark it as an update. All the work in done in commitWork.
if (oldText !== newText) {
markUpdate(workInProgress);
}
};
}
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
@@ -15390,8 +15384,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
}
}
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
@@ -15426,7 +15418,7 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
}
var _currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
var _currentHostContext2 = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
// "stack" as the parent. Then append children as we go in beginWork
// or completeWork depending on whether we want to add them top->down or
// bottom->up. Top->down is faster in IE11.
@@ -15448,10 +15440,10 @@ function completeWork(current, workInProgress, renderLanes) {
_type,
newProps,
_rootContainerInstance,
_currentHostContext,
_currentHostContext2,
workInProgress
);
appendAllChildren(instance, workInProgress, false, false);
appendAllChildren(instance, workInProgress);
workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
}
@@ -15635,7 +15627,6 @@ function completeWork(current, workInProgress, renderLanes) {
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
@@ -23758,7 +23749,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-80cf4a099-20230220";
var ReactVersion = "18.3.0-www-modern-62e6c4612-20230220";
// Might add PROFILE later.
@@ -0,0 +1,380 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @nolint
* @preventMunge
* @preserve-invariant-messages
*/
"use strict";
var dynamicFeatureFlags = require("SchedulerFeatureFlags"),
enableIsInputPending = dynamicFeatureFlags.enableIsInputPending,
enableSchedulerDebugging = dynamicFeatureFlags.enableSchedulerDebugging,
enableIsInputPendingContinuous =
dynamicFeatureFlags.enableIsInputPendingContinuous,
frameYieldMs = dynamicFeatureFlags.frameYieldMs,
continuousYieldMs = dynamicFeatureFlags.continuousYieldMs,
maxYieldMs = dynamicFeatureFlags.maxYieldMs;
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
exports.unstable_now = void 0;
if ("object" === typeof performance && "function" === typeof performance.now) {
var localPerformance = performance;
exports.unstable_now = function () {
return localPerformance.now();
};
} else {
var localDate = Date,
initialTime = localDate.now();
exports.unstable_now = function () {
return localDate.now() - initialTime;
};
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
isSchedulerPaused = !1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null,
isInputPending =
"undefined" !== typeof navigator &&
void 0 !== navigator.scheduling &&
void 0 !== navigator.scheduling.isInputPending
? navigator.scheduling.isInputPending.bind(navigator.scheduling)
: null,
continuousOptions = { includeContinuous: enableIsInputPendingContinuous };
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0), requestHostCallback(flushWork);
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
}
function flushWork(hasTimeRemaining, initialTime) {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
localClearTimeout(taskTimeoutID),
(taskTimeoutID = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
a: {
advanceTimers(initialTime);
for (
currentTask = peek(taskQueue);
!(
null === currentTask ||
(enableSchedulerDebugging && isSchedulerPaused) ||
(currentTask.expirationTime > initialTime &&
(!hasTimeRemaining || shouldYieldToHost()))
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= initialTime
);
initialTime = exports.unstable_now();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(initialTime);
var JSCompiler_inline_result = !0;
break a;
} else
currentTask === peek(taskQueue) && pop(taskQueue),
advanceTimers(initialTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) JSCompiler_inline_result = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(handleTimeout, firstTimer.startTime - initialTime);
JSCompiler_inline_result = !1;
}
}
return JSCompiler_inline_result;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
}
var isMessageLoopRunning = !1,
scheduledHostCallback = null,
taskTimeoutID = -1,
frameInterval = frameYieldMs,
startTime = -1,
needsPaint = !1;
function shouldYieldToHost() {
var timeElapsed = exports.unstable_now() - startTime;
if (timeElapsed < frameInterval) return !1;
if (enableIsInputPending) {
if (needsPaint) return !0;
if (timeElapsed < continuousYieldMs) {
if (null !== isInputPending) return isInputPending();
} else if (timeElapsed < maxYieldMs && null !== isInputPending)
return isInputPending(continuousOptions);
}
return !0;
}
function performWorkUntilDeadline() {
if (null !== scheduledHostCallback) {
var currentTime = exports.unstable_now();
startTime = currentTime;
var hasMoreWork = !0;
try {
hasMoreWork = scheduledHostCallback(!0, currentTime);
} finally {
hasMoreWork
? schedulePerformWorkUntilDeadline()
: ((isMessageLoopRunning = !1), (scheduledHostCallback = null));
}
} else isMessageLoopRunning = !1;
needsPaint = !1;
}
var schedulePerformWorkUntilDeadline;
if ("function" === typeof localSetImmediate)
schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(),
port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
function requestHostCallback(callback) {
scheduledHostCallback = callback;
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
}
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function () {
callback(exports.unstable_now());
}, ms);
}
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_continueExecution = function () {
isSchedulerPaused = !1;
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), requestHostCallback(flushWork));
};
exports.unstable_forceFrameRate = function (fps) {
0 > fps || 125 < fps
? console.error(
"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
)
: (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : frameYieldMs);
};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_getFirstCallbackNode = function () {
return peek(taskQueue);
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_pauseExecution = function () {
isSchedulerPaused = !0;
};
exports.unstable_requestPaint = function () {
enableIsInputPending &&
void 0 !== navigator &&
void 0 !== navigator.scheduling &&
void 0 !== navigator.scheduling.isInputPending &&
(needsPaint = !0);
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = exports.unstable_now();
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
: (isHostTimeoutScheduled = !0),
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), requestHostCallback(flushWork)));
return priorityLevel;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
@@ -0,0 +1,426 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @nolint
* @preventMunge
* @preserve-invariant-messages
*/
"use strict";
var enableSchedulerDebugging =
require("SchedulerFeatureFlags").enableSchedulerDebugging;
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
isSchedulerPaused = !1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
currentMockTime = 0,
scheduledCallback = null,
scheduledTimeout = null,
timeoutTime = -1,
yieldedValues = null,
expectedNumberOfYields = -1,
didStop = !1,
isFlushing = !1,
needsPaint = !1,
shouldYieldForPaint = !1,
disableYieldValue = !1;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0), (scheduledCallback = flushWork);
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
((currentTime = firstTimer.startTime - currentTime),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + currentTime));
}
}
function flushWork(hasTimeRemaining, initialTime) {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
(scheduledTimeout = null),
(timeoutTime = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
a: {
advanceTimers(initialTime);
for (
currentTask = peek(taskQueue);
!(
null === currentTask ||
(enableSchedulerDebugging && isSchedulerPaused) ||
(currentTask.expirationTime > initialTime &&
(!hasTimeRemaining || shouldYieldToHost()))
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= initialTime
);
initialTime = currentMockTime;
if ("function" === typeof continuationCallback) {
if (
((currentTask.callback = continuationCallback),
advanceTimers(initialTime),
shouldYieldForPaint)
) {
var JSCompiler_inline_result = (needsPaint = !0);
break a;
}
} else
currentTask === peek(taskQueue) && pop(taskQueue),
advanceTimers(initialTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) JSCompiler_inline_result = !0;
else {
var firstTimer = peek(timerQueue);
if (null !== firstTimer) {
var ms = firstTimer.startTime - initialTime;
scheduledTimeout = handleTimeout;
timeoutTime = currentMockTime + ms;
}
JSCompiler_inline_result = !1;
}
}
return JSCompiler_inline_result;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
}
function shouldYieldToHost() {
return (0 === expectedNumberOfYields && null === yieldedValues) ||
(-1 !== expectedNumberOfYields &&
null !== yieldedValues &&
yieldedValues.length >= expectedNumberOfYields) ||
(shouldYieldForPaint && needsPaint)
? (didStop = !0)
: !1;
}
function unstable_flushAllWithoutAsserting() {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork);
hasMoreWork || (scheduledCallback = null);
return !0;
} finally {
isFlushing = !1;
}
} else return !1;
}
exports.reset = function () {
if (isFlushing) throw Error("Cannot reset while already flushing work.");
currentMockTime = 0;
scheduledTimeout = scheduledCallback = null;
timeoutTime = -1;
yieldedValues = null;
expectedNumberOfYields = -1;
needsPaint = isFlushing = didStop = !1;
};
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_advanceTime = function (ms) {
"disabledLog" === console.log.name ||
disableYieldValue ||
((currentMockTime += ms),
null !== scheduledTimeout &&
timeoutTime <= currentMockTime &&
(scheduledTimeout(currentMockTime),
(timeoutTime = -1),
(scheduledTimeout = null)));
};
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_clearYields = function () {
if (null === yieldedValues) return [];
var values = yieldedValues;
yieldedValues = null;
return values;
};
exports.unstable_continueExecution = function () {
isSchedulerPaused = !1;
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork));
};
exports.unstable_flushAll = function () {
if (null !== yieldedValues)
throw Error(
"Log is not empty. Assert on the log of yielded values before flushing additional work."
);
unstable_flushAllWithoutAsserting();
if (null !== yieldedValues)
throw Error(
"While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])"
);
};
exports.unstable_flushAllWithoutAsserting = unstable_flushAllWithoutAsserting;
exports.unstable_flushExpired = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
isFlushing = !0;
try {
scheduledCallback(!1, currentMockTime) || (scheduledCallback = null);
} finally {
isFlushing = !1;
}
}
};
exports.unstable_flushNumberOfYields = function (count) {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
expectedNumberOfYields = count;
isFlushing = !0;
try {
count = !0;
do count = cb(!0, currentMockTime);
while (count && !didStop);
count || (scheduledCallback = null);
} finally {
(expectedNumberOfYields = -1), (isFlushing = didStop = !1);
}
}
};
exports.unstable_flushUntilNextPaint = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
shouldYieldForPaint = !0;
needsPaint = !1;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork && !didStop);
hasMoreWork || (scheduledCallback = null);
} finally {
isFlushing = didStop = shouldYieldForPaint = !1;
}
}
return !1;
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_getFirstCallbackNode = function () {
return peek(taskQueue);
};
exports.unstable_hasPendingWork = function () {
return null !== scheduledCallback;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_now = function () {
return currentMockTime;
};
exports.unstable_pauseExecution = function () {
isSchedulerPaused = !0;
};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = currentMockTime;
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? ((scheduledTimeout = null), (timeoutTime = -1))
: (isHostTimeoutScheduled = !0),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + (options - currentTime))))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)));
return priorityLevel;
};
exports.unstable_setDisableYieldValue = function (newValue) {
disableYieldValue = newValue;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
exports.unstable_yieldValue = function (value) {
"disabledLog" === console.log.name ||
disableYieldValue ||
(null === yieldedValues
? (yieldedValues = [value])
: yieldedValues.push(value));
};
@@ -0,0 +1,144 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @nolint
* @preventMunge
* @preserve-invariant-messages
*/
"use strict";
var perf = window.performance,
setTimeout = window.setTimeout,
scheduler = global.scheduler,
getCurrentTime = perf.now.bind(perf),
deadline = 0,
currentPriorityLevel_DEPRECATED = 3;
function runTask(priorityLevel, postTaskPriority, node, callback) {
deadline = getCurrentTime() + 5;
try {
currentPriorityLevel_DEPRECATED = priorityLevel;
var result = callback(!1);
if ("function" === typeof result) {
var continuationController = new TaskController(),
continuationOptions = {
priority: postTaskPriority,
signal: continuationController.signal
};
node._controller = continuationController;
scheduler
.postTask(
runTask.bind(null, priorityLevel, postTaskPriority, node, result),
continuationOptions
)
.catch(handleAbortError);
}
} catch (error) {
setTimeout(function () {
throw error;
});
} finally {
currentPriorityLevel_DEPRECATED = 3;
}
}
function handleAbortError() {}
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (node) {
node._controller.abort();
};
exports.unstable_continueExecution = function () {};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel_DEPRECATED;
};
exports.unstable_getFirstCallbackNode = function () {
return null;
};
exports.unstable_next = function (callback) {
switch (currentPriorityLevel_DEPRECATED) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel_DEPRECATED;
}
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_now = getCurrentTime;
exports.unstable_pauseExecution = function () {};
exports.unstable_requestPaint = function () {};
exports.unstable_runWithPriority = function (priorityLevel, callback) {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
switch (priorityLevel) {
case 1:
case 2:
var postTaskPriority = "user-blocking";
break;
case 4:
case 3:
postTaskPriority = "user-visible";
break;
case 5:
postTaskPriority = "background";
break;
default:
postTaskPriority = "user-visible";
}
var controller = new TaskController();
options = {
priority: postTaskPriority,
delay: "object" === typeof options && null !== options ? options.delay : 0,
signal: controller.signal
};
controller = { _controller: controller };
scheduler
.postTask(
runTask.bind(null, priorityLevel, postTaskPriority, controller, callback),
options
)
.catch(handleAbortError);
return controller;
};
exports.unstable_shouldYield = function () {
return getCurrentTime() >= deadline;
};
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
return function () {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = parentPriorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
};