Noop unstable_batchedUpdates (#28120)

## Overview

`unstable_batchedUpdates` is effectively a no-op outside of legacy mode,
this PR makes it an actual no-op outside legacy mode.

DiffTrain build for [63651c49e0](https://github.com/facebook/react/commit/63651c49e068a04cdc6ee1e2fa9c6125167987d2)
This commit is contained in:
rickhanlonii
2024-03-28 18:20:41 +00:00
parent 9d23ab1211
commit 69b2f2deb2
13 changed files with 316 additions and 255 deletions
+1 -1
View File
@@ -1 +1 @@
78328c0c4d70c9b9ee4ad2d6a2319c95e628dd2d
63651c49e068a04cdc6ee1e2fa9c6125167987d2
+24 -15
View File
@@ -32491,21 +32491,23 @@ if (__DEV__) {
return executionContext;
}
function batchedUpdates$1(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
{
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
}
}
}
}
@@ -36349,7 +36351,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-classic-1e457a42";
var ReactVersion = "19.0.0-www-classic-31c745b2";
function createPortal$1(
children,
@@ -49617,6 +49619,13 @@ if (__DEV__) {
} // Expose findDOMNode on internals
Internals.findDOMNode = findDOMNode;
function unstable_batchedUpdates(fn, a) {
// batchedUpdates was a legacy mode feature that is a no-op outside of
// legacy mode. In 19, we made it an actual no-op, but we're keeping it
// for now since there may be libraries that still include it.
return fn(a);
}
// This is an array for better minification.
Internals.Events = [
@@ -49625,7 +49634,7 @@ if (__DEV__) {
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
unstable_batchedUpdates
];
var foundDevTools = injectIntoDevTools({
findFiberByHostInstance: getClosestInstanceFromNode,
+25 -16
View File
@@ -32348,21 +32348,23 @@ if (__DEV__) {
return executionContext;
}
function batchedUpdates$1(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
{
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
}
}
}
}
@@ -36197,7 +36199,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-modern-44db9222";
var ReactVersion = "19.0.0-www-modern-c752b0b8";
function createPortal$1(
children,
@@ -48843,6 +48845,13 @@ if (__DEV__) {
} // Expose findDOMNode on internals
Internals.findDOMNode = findDOMNode;
function unstable_batchedUpdates(fn, a) {
// batchedUpdates was a legacy mode feature that is a no-op outside of
// legacy mode. In 19, we made it an actual no-op, but we're keeping it
// for now since there may be libraries that still include it.
return fn(a);
}
// This is an array for better minification.
Internals.Events = [
@@ -48851,7 +48860,7 @@ if (__DEV__) {
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
unstable_batchedUpdates
];
var foundDevTools = injectIntoDevTools({
findFiberByHostInstance: getClosestInstanceFromNode,
@@ -48967,7 +48976,7 @@ if (__DEV__) {
exports.preinitModule = preinitModule;
exports.preload = preload;
exports.preloadModule = preloadModule;
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_batchedUpdates = unstable_batchedUpdates;
exports.unstable_createEventHandle = createEventHandle;
exports.unstable_runWithPriority = runWithPriority;
exports.useFormState = useFormState;
@@ -17104,12 +17104,14 @@ Internals.Events = [
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
function (fn, a) {
return fn(a);
}
];
var devToolsConfig$jscomp$inline_1732 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-49cd2ee2",
version: "19.0.0-www-classic-9df81848",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2160 = {
@@ -17139,7 +17141,7 @@ var internals$jscomp$inline_2160 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-49cd2ee2"
reconcilerVersion: "19.0.0-www-classic-9df81848"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2161 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17589,4 +17591,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-49cd2ee2";
exports.version = "19.0.0-www-classic-9df81848";
+58 -53
View File
@@ -10978,18 +10978,6 @@ function performSyncWorkOnRoot(root, lanes) {
ensureRootIsScheduled(root);
return null;
}
function batchedUpdates$1(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= 1;
try {
return fn(a);
} finally {
(executionContext = prevExecutionContext),
0 === executionContext &&
((workInProgressRootRenderTargetTime = now() + 500),
flushSyncWorkAcrossRoots_impl(!0));
}
}
function flushSync$1(fn) {
null !== rootWithPendingPassiveEffects &&
0 === rootWithPendingPassiveEffects.tag &&
@@ -12257,7 +12245,21 @@ function batchedUpdates(fn, a, b) {
if (isInsideEventHandler) return fn(a, b);
isInsideEventHandler = !0;
try {
return batchedUpdates$1(fn, a, b);
a: {
b = executionContext;
executionContext |= 1;
try {
var JSCompiler_inline_result = fn(a);
break a;
} finally {
(executionContext = b),
0 === executionContext &&
((workInProgressRootRenderTargetTime = now() + 500),
flushSyncWorkAcrossRoots_impl(!0));
}
JSCompiler_inline_result = void 0;
}
return JSCompiler_inline_result;
} finally {
if (
((isInsideEventHandler = !1),
@@ -13429,19 +13431,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) {
}
var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$341;
var JSCompiler_inline_result$jscomp$342;
if (canUseDOM) {
var isSupported$jscomp$inline_1490 = "oninput" in document;
if (!isSupported$jscomp$inline_1490) {
var element$jscomp$inline_1491 = document.createElement("div");
element$jscomp$inline_1491.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1490 =
"function" === typeof element$jscomp$inline_1491.oninput;
var isSupported$jscomp$inline_1494 = "oninput" in document;
if (!isSupported$jscomp$inline_1494) {
var element$jscomp$inline_1495 = document.createElement("div");
element$jscomp$inline_1495.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1494 =
"function" === typeof element$jscomp$inline_1495.oninput;
}
JSCompiler_inline_result$jscomp$341 = isSupported$jscomp$inline_1490;
} else JSCompiler_inline_result$jscomp$341 = !1;
JSCompiler_inline_result$jscomp$342 = isSupported$jscomp$inline_1494;
} else JSCompiler_inline_result$jscomp$342 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$341 &&
JSCompiler_inline_result$jscomp$342 &&
(!document.documentMode || 9 < document.documentMode);
}
function stopWatchingForValueChange() {
@@ -13750,20 +13752,20 @@ function registerSimpleEvent(domEventName, reactName) {
registerTwoPhaseEvent(reactName, [domEventName]);
}
for (
var i$jscomp$inline_1531 = 0;
i$jscomp$inline_1531 < simpleEventPluginEvents.length;
i$jscomp$inline_1531++
var i$jscomp$inline_1535 = 0;
i$jscomp$inline_1535 < simpleEventPluginEvents.length;
i$jscomp$inline_1535++
) {
var eventName$jscomp$inline_1532 =
simpleEventPluginEvents[i$jscomp$inline_1531],
domEventName$jscomp$inline_1533 =
eventName$jscomp$inline_1532.toLowerCase(),
capitalizedEvent$jscomp$inline_1534 =
eventName$jscomp$inline_1532[0].toUpperCase() +
eventName$jscomp$inline_1532.slice(1);
var eventName$jscomp$inline_1536 =
simpleEventPluginEvents[i$jscomp$inline_1535],
domEventName$jscomp$inline_1537 =
eventName$jscomp$inline_1536.toLowerCase(),
capitalizedEvent$jscomp$inline_1538 =
eventName$jscomp$inline_1536[0].toUpperCase() +
eventName$jscomp$inline_1536.slice(1);
registerSimpleEvent(
domEventName$jscomp$inline_1533,
"on" + capitalizedEvent$jscomp$inline_1534
domEventName$jscomp$inline_1537,
"on" + capitalizedEvent$jscomp$inline_1538
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -16609,25 +16611,28 @@ Internals.findDOMNode = function (componentOrElement) {
null === componentOrElement ? null : componentOrElement.stateNode;
return componentOrElement;
};
function unstable_batchedUpdates(fn, a) {
return fn(a);
}
Internals.Events = [
getInstanceFromNode$1,
getNodeFromInstance,
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
unstable_batchedUpdates
];
var devToolsConfig$jscomp$inline_1689 = {
var devToolsConfig$jscomp$inline_1693 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-8192012c",
version: "19.0.0-www-modern-8e569007",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2116 = {
bundleType: devToolsConfig$jscomp$inline_1689.bundleType,
version: devToolsConfig$jscomp$inline_1689.version,
rendererPackageName: devToolsConfig$jscomp$inline_1689.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1689.rendererConfig,
var internals$jscomp$inline_2122 = {
bundleType: devToolsConfig$jscomp$inline_1693.bundleType,
version: devToolsConfig$jscomp$inline_1693.version,
rendererPackageName: devToolsConfig$jscomp$inline_1693.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1693.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -16643,26 +16648,26 @@ var internals$jscomp$inline_2116 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1689.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1693.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-8192012c"
reconcilerVersion: "19.0.0-www-modern-8e569007"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2117 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2123 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2117.isDisabled &&
hook$jscomp$inline_2117.supportsFiber
!hook$jscomp$inline_2123.isDisabled &&
hook$jscomp$inline_2123.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2117.inject(
internals$jscomp$inline_2116
(rendererID = hook$jscomp$inline_2123.inject(
internals$jscomp$inline_2122
)),
(injectedHook = hook$jscomp$inline_2117);
(injectedHook = hook$jscomp$inline_2123);
} catch (err) {}
}
var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog");
@@ -16912,7 +16917,7 @@ exports.preloadModule = function (href, options) {
});
} else ReactDOMCurrentDispatcher.current.preloadModule(href);
};
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_batchedUpdates = unstable_batchedUpdates;
exports.unstable_createEventHandle = function (type, options) {
function eventHandle(target, callback) {
if ("function" !== typeof callback)
@@ -16953,4 +16958,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-8192012c";
exports.version = "19.0.0-www-modern-8e569007";
@@ -17854,12 +17854,14 @@ Internals.Events = [
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
function (fn, a) {
return fn(a);
}
];
var devToolsConfig$jscomp$inline_1818 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-837a1523",
version: "19.0.0-www-classic-e6369628",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -17903,7 +17905,7 @@ var devToolsConfig$jscomp$inline_1818 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-837a1523"
reconcilerVersion: "19.0.0-www-classic-e6369628"
});
var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog");
if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog)
@@ -18340,7 +18342,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-837a1523";
exports.version = "19.0.0-www-classic-e6369628";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -11569,18 +11569,6 @@ function performSyncWorkOnRoot(root, lanes) {
ensureRootIsScheduled(root);
return null;
}
function batchedUpdates$1(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= 1;
try {
return fn(a);
} finally {
(executionContext = prevExecutionContext),
0 === executionContext &&
((workInProgressRootRenderTargetTime = now$1() + 500),
flushSyncWorkAcrossRoots_impl(!0));
}
}
function flushSync$1(fn) {
null !== rootWithPendingPassiveEffects &&
0 === rootWithPendingPassiveEffects.tag &&
@@ -13001,7 +12989,21 @@ function batchedUpdates(fn, a, b) {
if (isInsideEventHandler) return fn(a, b);
isInsideEventHandler = !0;
try {
return batchedUpdates$1(fn, a, b);
a: {
b = executionContext;
executionContext |= 1;
try {
var JSCompiler_inline_result = fn(a);
break a;
} finally {
(executionContext = b),
0 === executionContext &&
((workInProgressRootRenderTargetTime = now$1() + 500),
flushSyncWorkAcrossRoots_impl(!0));
}
JSCompiler_inline_result = void 0;
}
return JSCompiler_inline_result;
} finally {
if (
((isInsideEventHandler = !1),
@@ -14173,19 +14175,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) {
}
var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$362;
var JSCompiler_inline_result$jscomp$363;
if (canUseDOM) {
var isSupported$jscomp$inline_1576 = "oninput" in document;
if (!isSupported$jscomp$inline_1576) {
var element$jscomp$inline_1577 = document.createElement("div");
element$jscomp$inline_1577.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1576 =
"function" === typeof element$jscomp$inline_1577.oninput;
var isSupported$jscomp$inline_1580 = "oninput" in document;
if (!isSupported$jscomp$inline_1580) {
var element$jscomp$inline_1581 = document.createElement("div");
element$jscomp$inline_1581.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1580 =
"function" === typeof element$jscomp$inline_1581.oninput;
}
JSCompiler_inline_result$jscomp$362 = isSupported$jscomp$inline_1576;
} else JSCompiler_inline_result$jscomp$362 = !1;
JSCompiler_inline_result$jscomp$363 = isSupported$jscomp$inline_1580;
} else JSCompiler_inline_result$jscomp$363 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$362 &&
JSCompiler_inline_result$jscomp$363 &&
(!document.documentMode || 9 < document.documentMode);
}
function stopWatchingForValueChange() {
@@ -14494,20 +14496,20 @@ function registerSimpleEvent(domEventName, reactName) {
registerTwoPhaseEvent(reactName, [domEventName]);
}
for (
var i$jscomp$inline_1617 = 0;
i$jscomp$inline_1617 < simpleEventPluginEvents.length;
i$jscomp$inline_1617++
var i$jscomp$inline_1621 = 0;
i$jscomp$inline_1621 < simpleEventPluginEvents.length;
i$jscomp$inline_1621++
) {
var eventName$jscomp$inline_1618 =
simpleEventPluginEvents[i$jscomp$inline_1617],
domEventName$jscomp$inline_1619 =
eventName$jscomp$inline_1618.toLowerCase(),
capitalizedEvent$jscomp$inline_1620 =
eventName$jscomp$inline_1618[0].toUpperCase() +
eventName$jscomp$inline_1618.slice(1);
var eventName$jscomp$inline_1622 =
simpleEventPluginEvents[i$jscomp$inline_1621],
domEventName$jscomp$inline_1623 =
eventName$jscomp$inline_1622.toLowerCase(),
capitalizedEvent$jscomp$inline_1624 =
eventName$jscomp$inline_1622[0].toUpperCase() +
eventName$jscomp$inline_1622.slice(1);
registerSimpleEvent(
domEventName$jscomp$inline_1619,
"on" + capitalizedEvent$jscomp$inline_1620
domEventName$jscomp$inline_1623,
"on" + capitalizedEvent$jscomp$inline_1624
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -17353,18 +17355,21 @@ Internals.findDOMNode = function (componentOrElement) {
null === componentOrElement ? null : componentOrElement.stateNode;
return componentOrElement;
};
function unstable_batchedUpdates(fn, a) {
return fn(a);
}
Internals.Events = [
getInstanceFromNode$1,
getNodeFromInstance,
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
unstable_batchedUpdates
];
var devToolsConfig$jscomp$inline_1775 = {
var devToolsConfig$jscomp$inline_1779 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-88a914d1",
version: "19.0.0-www-modern-6ec98dbb",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -17382,10 +17387,10 @@ var devToolsConfig$jscomp$inline_1775 = {
} catch (err) {}
return hook.checkDCE ? !0 : !1;
})({
bundleType: devToolsConfig$jscomp$inline_1775.bundleType,
version: devToolsConfig$jscomp$inline_1775.version,
rendererPackageName: devToolsConfig$jscomp$inline_1775.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1775.rendererConfig,
bundleType: devToolsConfig$jscomp$inline_1779.bundleType,
version: devToolsConfig$jscomp$inline_1779.version,
rendererPackageName: devToolsConfig$jscomp$inline_1779.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1779.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -17401,14 +17406,14 @@ var devToolsConfig$jscomp$inline_1775 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1775.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1779.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-88a914d1"
reconcilerVersion: "19.0.0-www-modern-6ec98dbb"
});
var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog");
if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog)
@@ -17657,7 +17662,7 @@ exports.preloadModule = function (href, options) {
});
} else ReactDOMCurrentDispatcher.current.preloadModule(href);
};
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_batchedUpdates = unstable_batchedUpdates;
exports.unstable_createEventHandle = function (type, options) {
function eventHandle(target, callback) {
if ("function" !== typeof callback)
@@ -17698,7 +17703,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-88a914d1";
exports.version = "19.0.0-www-modern-6ec98dbb";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -33115,21 +33115,23 @@ if (__DEV__) {
return executionContext;
}
function batchedUpdates$1(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
{
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
}
}
}
}
@@ -36973,7 +36975,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-classic-8f03a493";
var ReactVersion = "19.0.0-www-classic-f2c3cec0";
function createPortal$1(
children,
@@ -50399,6 +50401,13 @@ if (__DEV__) {
} // Expose findDOMNode on internals
Internals.findDOMNode = findDOMNode;
function unstable_batchedUpdates(fn, a) {
// batchedUpdates was a legacy mode feature that is a no-op outside of
// legacy mode. In 19, we made it an actual no-op, but we're keeping it
// for now since there may be libraries that still include it.
return fn(a);
}
// This is an array for better minification.
Internals.Events = [
@@ -50407,7 +50416,7 @@ if (__DEV__) {
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
unstable_batchedUpdates
];
var foundDevTools = injectIntoDevTools({
findFiberByHostInstance: getClosestInstanceFromNode,
@@ -32972,21 +32972,23 @@ if (__DEV__) {
return executionContext;
}
function batchedUpdates$1(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
{
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
}
}
}
}
@@ -36821,7 +36823,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-modern-e638378b";
var ReactVersion = "19.0.0-www-modern-eccc0e12";
function createPortal$1(
children,
@@ -49625,6 +49627,13 @@ if (__DEV__) {
} // Expose findDOMNode on internals
Internals.findDOMNode = findDOMNode;
function unstable_batchedUpdates(fn, a) {
// batchedUpdates was a legacy mode feature that is a no-op outside of
// legacy mode. In 19, we made it an actual no-op, but we're keeping it
// for now since there may be libraries that still include it.
return fn(a);
}
// This is an array for better minification.
Internals.Events = [
@@ -49633,7 +49642,7 @@ if (__DEV__) {
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
unstable_batchedUpdates
];
var foundDevTools = injectIntoDevTools({
findFiberByHostInstance: getClosestInstanceFromNode,
@@ -49726,7 +49735,7 @@ if (__DEV__) {
exports.preinitModule = preinitModule;
exports.preload = preload;
exports.preloadModule = preloadModule;
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_batchedUpdates = unstable_batchedUpdates;
exports.unstable_createEventHandle = createEventHandle;
exports.useFormState = useFormState;
exports.useFormStatus = useFormStatus;
@@ -17433,12 +17433,14 @@ Internals.Events = [
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
function (fn, a) {
return fn(a);
}
];
var devToolsConfig$jscomp$inline_1759 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-5470479f",
version: "19.0.0-www-classic-d76ce55c",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2168 = {
@@ -17468,7 +17470,7 @@ var internals$jscomp$inline_2168 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-5470479f"
reconcilerVersion: "19.0.0-www-classic-d76ce55c"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2169 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -18061,4 +18063,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-5470479f";
exports.version = "19.0.0-www-classic-d76ce55c";
@@ -11311,18 +11311,6 @@ function performSyncWorkOnRoot(root, lanes) {
ensureRootIsScheduled(root);
return null;
}
function batchedUpdates$1(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= 1;
try {
return fn(a);
} finally {
(executionContext = prevExecutionContext),
0 === executionContext &&
((workInProgressRootRenderTargetTime = now() + 500),
flushSyncWorkAcrossRoots_impl(!0));
}
}
function flushSync$1(fn) {
null !== rootWithPendingPassiveEffects &&
0 === rootWithPendingPassiveEffects.tag &&
@@ -12590,7 +12578,21 @@ function batchedUpdates(fn, a, b) {
if (isInsideEventHandler) return fn(a, b);
isInsideEventHandler = !0;
try {
return batchedUpdates$1(fn, a, b);
a: {
b = executionContext;
executionContext |= 1;
try {
var JSCompiler_inline_result = fn(a);
break a;
} finally {
(executionContext = b),
0 === executionContext &&
((workInProgressRootRenderTargetTime = now() + 500),
flushSyncWorkAcrossRoots_impl(!0));
}
JSCompiler_inline_result = void 0;
}
return JSCompiler_inline_result;
} finally {
if (
((isInsideEventHandler = !1),
@@ -13762,19 +13764,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) {
}
var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$343;
var JSCompiler_inline_result$jscomp$344;
if (canUseDOM) {
var isSupported$jscomp$inline_1517 = "oninput" in document;
if (!isSupported$jscomp$inline_1517) {
var element$jscomp$inline_1518 = document.createElement("div");
element$jscomp$inline_1518.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1517 =
"function" === typeof element$jscomp$inline_1518.oninput;
var isSupported$jscomp$inline_1521 = "oninput" in document;
if (!isSupported$jscomp$inline_1521) {
var element$jscomp$inline_1522 = document.createElement("div");
element$jscomp$inline_1522.setAttribute("oninput", "return;");
isSupported$jscomp$inline_1521 =
"function" === typeof element$jscomp$inline_1522.oninput;
}
JSCompiler_inline_result$jscomp$343 = isSupported$jscomp$inline_1517;
} else JSCompiler_inline_result$jscomp$343 = !1;
JSCompiler_inline_result$jscomp$344 = isSupported$jscomp$inline_1521;
} else JSCompiler_inline_result$jscomp$344 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$343 &&
JSCompiler_inline_result$jscomp$344 &&
(!document.documentMode || 9 < document.documentMode);
}
function stopWatchingForValueChange() {
@@ -14083,20 +14085,20 @@ function registerSimpleEvent(domEventName, reactName) {
registerTwoPhaseEvent(reactName, [domEventName]);
}
for (
var i$jscomp$inline_1558 = 0;
i$jscomp$inline_1558 < simpleEventPluginEvents.length;
i$jscomp$inline_1558++
var i$jscomp$inline_1562 = 0;
i$jscomp$inline_1562 < simpleEventPluginEvents.length;
i$jscomp$inline_1562++
) {
var eventName$jscomp$inline_1559 =
simpleEventPluginEvents[i$jscomp$inline_1558],
domEventName$jscomp$inline_1560 =
eventName$jscomp$inline_1559.toLowerCase(),
capitalizedEvent$jscomp$inline_1561 =
eventName$jscomp$inline_1559[0].toUpperCase() +
eventName$jscomp$inline_1559.slice(1);
var eventName$jscomp$inline_1563 =
simpleEventPluginEvents[i$jscomp$inline_1562],
domEventName$jscomp$inline_1564 =
eventName$jscomp$inline_1563.toLowerCase(),
capitalizedEvent$jscomp$inline_1565 =
eventName$jscomp$inline_1563[0].toUpperCase() +
eventName$jscomp$inline_1563.slice(1);
registerSimpleEvent(
domEventName$jscomp$inline_1560,
"on" + capitalizedEvent$jscomp$inline_1561
domEventName$jscomp$inline_1564,
"on" + capitalizedEvent$jscomp$inline_1565
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -16999,25 +17001,28 @@ Internals.findDOMNode = function (componentOrElement) {
null === componentOrElement ? null : componentOrElement.stateNode;
return componentOrElement;
};
function unstable_batchedUpdates(fn, a) {
return fn(a);
}
Internals.Events = [
getInstanceFromNode$1,
getNodeFromInstance,
getFiberCurrentPropsFromNode,
enqueueStateRestore,
restoreStateIfNeeded,
batchedUpdates$1
unstable_batchedUpdates
];
var devToolsConfig$jscomp$inline_1716 = {
var devToolsConfig$jscomp$inline_1720 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-943bd092",
version: "19.0.0-www-modern-3f526f79",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2120 = {
bundleType: devToolsConfig$jscomp$inline_1716.bundleType,
version: devToolsConfig$jscomp$inline_1716.version,
rendererPackageName: devToolsConfig$jscomp$inline_1716.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1716.rendererConfig,
var internals$jscomp$inline_2126 = {
bundleType: devToolsConfig$jscomp$inline_1720.bundleType,
version: devToolsConfig$jscomp$inline_1720.version,
rendererPackageName: devToolsConfig$jscomp$inline_1720.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1720.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -17033,26 +17038,26 @@ var internals$jscomp$inline_2120 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1716.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1720.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-943bd092"
reconcilerVersion: "19.0.0-www-modern-3f526f79"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2121 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_2127 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_2121.isDisabled &&
hook$jscomp$inline_2121.supportsFiber
!hook$jscomp$inline_2127.isDisabled &&
hook$jscomp$inline_2127.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_2121.inject(
internals$jscomp$inline_2120
(rendererID = hook$jscomp$inline_2127.inject(
internals$jscomp$inline_2126
)),
(injectedHook = hook$jscomp$inline_2121);
(injectedHook = hook$jscomp$inline_2127);
} catch (err) {}
}
if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog)
@@ -17426,7 +17431,7 @@ exports.preloadModule = function (href, options) {
});
} else ReactDOMCurrentDispatcher.current.preloadModule(href);
};
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_batchedUpdates = unstable_batchedUpdates;
exports.unstable_createEventHandle = function (type, options) {
function eventHandle(target, callback) {
if ("function" !== typeof callback)
@@ -17466,4 +17471,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-943bd092";
exports.version = "19.0.0-www-modern-3f526f79";
@@ -23488,21 +23488,23 @@ if (__DEV__) {
return executionContext;
}
function batchedUpdates(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
{
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
}
}
}
}
@@ -26837,7 +26839,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-classic-49672ef7";
var ReactVersion = "19.0.0-www-classic-22c1f956";
// Might add PROFILE later.
@@ -23488,21 +23488,23 @@ if (__DEV__) {
return executionContext;
}
function batchedUpdates(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
{
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
if (
executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue.isBatchingLegacy
) {
resetRenderTimer();
flushSyncWorkOnLegacyRootsOnly();
}
}
}
}
@@ -26837,7 +26839,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-modern-49672ef7";
var ReactVersion = "19.0.0-www-modern-22c1f956";
// Might add PROFILE later.