[Fizz] Allow aborting during render (#30488)

Currently if you abort a Fizz render during rendering the render will
not complete correctly because there are inconsistencies with task
counting. This change updates the abort implementation to allow you to
abort from within a render itself. We already landed a similar change
for Flight in #29764

DiffTrain build for [a451de014c](https://github.com/facebook/react/commit/a451de014ca71718aee924bb57d5b4a1d87e20f2)
This commit is contained in:
gnoff
2024-07-29 13:32:12 -07:00
parent 1cde450e4e
commit 05ad6512c1
36 changed files with 1369 additions and 1167 deletions
+1 -1
View File
@@ -1 +1 @@
9938e248feecc6410738cc905744836d6f78c7f8
a451de014ca71718aee924bb57d5b4a1d87e20f2
+1 -1
View File
@@ -1 +1 @@
9938e248feecc6410738cc905744836d6f78c7f8
a451de014ca71718aee924bb57d5b4a1d87e20f2
+1 -1
View File
@@ -2004,7 +2004,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+1 -1
View File
@@ -1984,7 +1984,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+1 -1
View File
@@ -668,4 +668,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
+1 -1
View File
@@ -668,4 +668,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
@@ -672,7 +672,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -672,7 +672,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -17183,14 +17183,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
+2 -2
View File
@@ -16591,14 +16591,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
@@ -10820,7 +10820,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1385 = {
@@ -10851,7 +10851,7 @@ var internals$jscomp$inline_1385 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1386 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10323,7 +10323,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1371 = {
@@ -10354,7 +10354,7 @@ var internals$jscomp$inline_1371 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1372 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -27805,11 +27805,11 @@ __DEV__ &&
: flushSyncErrorInBuildsThatSupportLegacyMode;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-9938e248-20240729" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-a451de01-20240729" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-classic-9938e248-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-a451de01-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -27875,12 +27875,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
@@ -28516,7 +28516,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+5 -5
View File
@@ -26907,11 +26907,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-9938e248-20240729" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-a451de01-20240729" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-modern-9938e248-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-a451de01-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -26976,12 +26976,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
@@ -27569,7 +27569,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -17294,14 +17294,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1776 = React.version;
if (
"19.0.0-www-classic-9938e248-20240729" !==
"19.0.0-www-classic-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1776
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1776,
"19.0.0-www-classic-9938e248-20240729"
"19.0.0-www-classic-a451de01-20240729"
)
);
function flushSyncFromReconciler(fn) {
@@ -17347,7 +17347,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1783 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2221 = {
@@ -17377,7 +17377,7 @@ var internals$jscomp$inline_2221 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2222 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17833,4 +17833,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
@@ -16659,14 +16659,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1747 = React.version;
if (
"19.0.0-www-modern-9938e248-20240729" !==
"19.0.0-www-modern-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1747
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1747,
"19.0.0-www-modern-9938e248-20240729"
"19.0.0-www-modern-a451de01-20240729"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -16685,7 +16685,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1749 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2212 = {
@@ -16715,7 +16715,7 @@ var internals$jscomp$inline_2212 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2213 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17078,4 +17078,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
@@ -18069,14 +18069,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1864 = React.version;
if (
"19.0.0-www-classic-9938e248-20240729" !==
"19.0.0-www-classic-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1864
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1864,
"19.0.0-www-classic-9938e248-20240729"
"19.0.0-www-classic-a451de01-20240729"
)
);
function flushSyncFromReconciler(fn) {
@@ -18122,7 +18122,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1871 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -18166,7 +18166,7 @@ var devToolsConfig$jscomp$inline_1871 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
});
function ReactDOMRoot(internalRoot) {
this._internalRoot = internalRoot;
@@ -18609,7 +18609,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -17417,14 +17417,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1835 = React.version;
if (
"19.0.0-www-modern-9938e248-20240729" !==
"19.0.0-www-modern-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1835
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1835,
"19.0.0-www-modern-9938e248-20240729"
"19.0.0-www-modern-a451de01-20240729"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17443,7 +17443,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1837 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -17487,7 +17487,7 @@ var devToolsConfig$jscomp$inline_1837 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
});
function ReactDOMRoot(internalRoot) {
this._internalRoot = internalRoot;
@@ -17837,7 +17837,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -4664,8 +4664,8 @@ __DEV__ &&
onShellError(error);
onFatalError(error);
null !== request.destination
? ((request.status = 2), request.destination.destroy(error))
: ((request.status = 1), (request.fatalError = error));
? ((request.status = CLOSED), request.destination.destroy(error))
: ((request.status = 2), (request.fatalError = error));
}
function renderWithHooks(
request,
@@ -5187,6 +5187,7 @@ __DEV__ &&
} else internalInstance.queue = null;
}
var nextChildren = callRenderInDEV(instance);
if (1 === request.status) throw AbortSigil;
instance.props !== resolvedProps &&
(didWarnAboutReassigningProps ||
error$jscomp$2(
@@ -5247,14 +5248,15 @@ __DEV__ &&
(didWarnAboutBadClass[componentName$jscomp$4] = !0));
}
var value = renderWithHooks(
request,
task,
keyPath,
type,
props,
legacyContext
),
hasId = 0 !== localIdCounter,
request,
task,
keyPath,
type,
props,
legacyContext
);
if (1 === request.status) throw AbortSigil;
var hasId = 0 !== localIdCounter,
actionStateCount = actionStateCounter,
actionStateMatchingIndex$jscomp$0 = actionStateMatchingIndex;
if (type.contextTypes) {
@@ -5484,6 +5486,7 @@ __DEV__ &&
newBoundary.trackedFallbackNode = fallbackReplayNode;
task.blockedSegment = boundarySegment;
task.keyPath = fallbackKeyPath;
boundarySegment.status = 6;
try {
renderNode(request, task, fallback, -1),
pushSegmentFinale(
@@ -5493,6 +5496,12 @@ __DEV__ &&
boundarySegment.textEmbedded
),
(boundarySegment.status = COMPLETED);
} catch (thrownValue) {
throw (
((boundarySegment.status =
thrownValue === AbortSigil ? 3 : 4),
thrownValue)
);
} finally {
(task.blockedSegment = parentSegment),
(task.keyPath = prevKeyPath$jscomp$3);
@@ -5521,6 +5530,7 @@ __DEV__ &&
task.hoistableState = newBoundary.contentState;
task.blockedSegment = contentRootSegment;
task.keyPath = keyPath;
contentRootSegment.status = 6;
try {
if (
(renderNode(request, task, content, -1),
@@ -5538,19 +5548,23 @@ __DEV__ &&
newBoundary.status = COMPLETED;
break a;
}
} catch (error$2) {
contentRootSegment.status = 4;
} catch (thrownValue$2) {
newBoundary.status = CLIENT_RENDERED;
if (thrownValue$2 === AbortSigil) {
contentRootSegment.status = 3;
var error = request.fatalError;
} else
(contentRootSegment.status = 4), (error = thrownValue$2);
var thrownInfo = getThrownInfo(task.componentStack);
var errorDigest = logRecoverableError(
request,
error$2,
error,
thrownInfo
);
encodeErrorForBoundary(
newBoundary,
errorDigest,
error$2,
error,
thrownInfo,
!1
);
@@ -5659,6 +5673,7 @@ __DEV__ &&
}
case REACT_LAZY_TYPE:
var Component = callLazyInitInDEV(type);
if (1 === request.status) throw AbortSigil;
var resolvedProps$jscomp$1 =
resolveDefaultPropsOnNonClassComponent(Component, props);
renderElement(
@@ -5902,6 +5917,7 @@ __DEV__ &&
);
case REACT_LAZY_TYPE:
node = callLazyInitInDEV(node);
if (1 === request.status) throw AbortSigil;
renderNodeDestructive(request, task, node, childIndex);
return;
}
@@ -6307,6 +6323,20 @@ __DEV__ &&
!1
);
}
function erroredTask(request, boundary, error, errorInfo) {
var errorDigest = logRecoverableError(request, error, errorInfo);
null === boundary
? fatalError(request, error)
: (boundary.pendingTasks--,
boundary.status !== CLIENT_RENDERED &&
((boundary.status = CLIENT_RENDERED),
encodeErrorForBoundary(boundary, errorDigest, error, errorInfo, !1),
untrackBoundary(request, boundary),
boundary.parentFlushed &&
request.clientRenderedBoundaries.push(boundary)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function abortTaskSoft(task) {
var boundary = task.blockedBoundary;
task = task.blockedSegment;
@@ -6381,9 +6411,14 @@ __DEV__ &&
function abortTask(task, request, error) {
var boundary = task.blockedBoundary,
segment = task.blockedSegment;
null !== segment && (segment.status = 3);
if (null !== segment) {
if (6 === segment.status) return;
segment.status = 3;
}
if (null === boundary) {
if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
if (
((boundary = {}), 2 !== request.status && request.status !== CLOSED)
) {
task = task.replay;
if (null === task) {
logRecoverableError(request, error, boundary);
@@ -6558,54 +6593,53 @@ __DEV__ &&
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function performWork(request$jscomp$1) {
if (2 !== request$jscomp$1.status && 1 !== request$jscomp$1.status) {
function performWork(request$jscomp$0) {
if (request$jscomp$0.status !== CLOSED && 2 !== request$jscomp$0.status) {
var prevContext = currentActiveSnapshot,
prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = HooksDispatcher;
var prevAsyncDispatcher = ReactSharedInternals.A;
ReactSharedInternals.A = DefaultAsyncDispatcher;
var prevRequest = currentRequest;
currentRequest = request$jscomp$1;
currentRequest = request$jscomp$0;
var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
var prevResumableState = currentResumableState;
currentResumableState = request$jscomp$1.resumableState;
currentResumableState = request$jscomp$0.resumableState;
try {
var pingedTasks = request$jscomp$1.pingedTasks,
var pingedTasks = request$jscomp$0.pingedTasks,
i;
for (i = 0; i < pingedTasks.length; i++) {
var request = request$jscomp$1,
var request = request$jscomp$0,
task = pingedTasks[i],
segment = task.blockedSegment;
if (null === segment) {
var prevTaskInDEV = void 0,
request$jscomp$0 = request;
request = task;
if (0 !== request.replay.pendingTasks) {
switchContext(request.context);
task$jscomp$0 = task;
if (0 !== task$jscomp$0.replay.pendingTasks) {
switchContext(task$jscomp$0.context);
prevTaskInDEV = currentTaskInDEV;
currentTaskInDEV = request;
currentTaskInDEV = task$jscomp$0;
try {
"number" === typeof request.replay.slots
"number" === typeof task$jscomp$0.replay.slots
? resumeNode(
request$jscomp$0,
request,
request.replay.slots,
request.node,
request.childIndex
task$jscomp$0,
task$jscomp$0.replay.slots,
task$jscomp$0.node,
task$jscomp$0.childIndex
)
: retryNode(request$jscomp$0, request);
: retryNode(request, task$jscomp$0);
if (
1 === request.replay.pendingTasks &&
0 < request.replay.nodes.length
1 === task$jscomp$0.replay.pendingTasks &&
0 < task$jscomp$0.replay.nodes.length
)
throw Error(
"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
);
request.replay.pendingTasks--;
request.abortSet.delete(request);
finishedTask(request$jscomp$0, request.blockedBoundary, null);
task$jscomp$0.replay.pendingTasks--;
task$jscomp$0.abortSet.delete(task$jscomp$0);
finishedTask(request, task$jscomp$0.blockedBoundary, null);
} catch (thrownValue) {
resetHooksState();
var x =
@@ -6617,39 +6651,39 @@ __DEV__ &&
null !== x &&
"function" === typeof x.then
) {
var ping = request.ping;
var ping = task$jscomp$0.ping;
x.then(ping, ping);
request.thenableState = getThenableStateAfterSuspending();
task$jscomp$0.thenableState =
getThenableStateAfterSuspending();
} else {
request.replay.pendingTasks--;
request.abortSet.delete(request);
var errorInfo = getThrownInfo(request.componentStack);
task$jscomp$0.replay.pendingTasks--;
task$jscomp$0.abortSet.delete(task$jscomp$0);
var errorInfo = getThrownInfo(task$jscomp$0.componentStack);
erroredReplay(
request$jscomp$0,
request.blockedBoundary,
x,
request,
task$jscomp$0.blockedBoundary,
x === AbortSigil ? request.fatalError : x,
errorInfo,
request.replay.nodes,
request.replay.slots
task$jscomp$0.replay.nodes,
task$jscomp$0.replay.slots
);
request$jscomp$0.pendingRootTasks--;
0 === request$jscomp$0.pendingRootTasks &&
completeShell(request$jscomp$0);
request$jscomp$0.allPendingTasks--;
0 === request$jscomp$0.allPendingTasks &&
completeAll(request$jscomp$0);
request.pendingRootTasks--;
0 === request.pendingRootTasks && completeShell(request);
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
} finally {
currentTaskInDEV = prevTaskInDEV;
}
}
} else {
request$jscomp$0 = prevTaskInDEV = void 0;
var task$jscomp$0 = task,
segment$jscomp$0 = segment;
prevTaskInDEV = void 0;
task$jscomp$0 = task;
var segment$jscomp$0 = segment;
if (segment$jscomp$0.status === PENDING) {
segment$jscomp$0.status = 6;
switchContext(task$jscomp$0.context);
request$jscomp$0 = currentTaskInDEV;
prevTaskInDEV = currentTaskInDEV;
currentTaskInDEV = task$jscomp$0;
var childrenLength = segment$jscomp$0.children.length,
chunkLength = segment$jscomp$0.chunks.length;
@@ -6681,55 +6715,47 @@ __DEV__ &&
null !== x$jscomp$0 &&
"function" === typeof x$jscomp$0.then
) {
var ping$jscomp$0 = task$jscomp$0.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
segment$jscomp$0.status = PENDING;
task$jscomp$0.thenableState =
getThenableStateAfterSuspending();
var ping$jscomp$0 = task$jscomp$0.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
} else {
var errorInfo$jscomp$0 = getThrownInfo(
task$jscomp$0.componentStack
);
task$jscomp$0.abortSet.delete(task$jscomp$0);
segment$jscomp$0.status = 4;
var boundary = task$jscomp$0.blockedBoundary;
prevTaskInDEV = logRecoverableError(
request,
x$jscomp$0,
errorInfo$jscomp$0
);
null === boundary
? fatalError(request, x$jscomp$0)
: (boundary.pendingTasks--,
boundary.status !== CLIENT_RENDERED &&
((boundary.status = CLIENT_RENDERED),
encodeErrorForBoundary(
boundary,
prevTaskInDEV,
x$jscomp$0,
errorInfo$jscomp$0,
!1
),
untrackBoundary(request, boundary),
boundary.parentFlushed &&
request.clientRenderedBoundaries.push(boundary)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
x$jscomp$0 === AbortSigil
? ((segment$jscomp$0.status = 3),
erroredTask(
request,
task$jscomp$0.blockedBoundary,
request.fatalError,
errorInfo$jscomp$0
))
: ((segment$jscomp$0.status = 4),
erroredTask(
request,
task$jscomp$0.blockedBoundary,
x$jscomp$0,
errorInfo$jscomp$0
));
}
} finally {
currentTaskInDEV = request$jscomp$0;
currentTaskInDEV = prevTaskInDEV;
}
}
}
}
pingedTasks.splice(0, i);
null !== request$jscomp$1.destination &&
null !== request$jscomp$0.destination &&
flushCompletedQueues(
request$jscomp$1,
request$jscomp$1.destination
request$jscomp$0,
request$jscomp$0.destination
);
} catch (error$6) {
logRecoverableError(request$jscomp$1, error$6, {}),
fatalError(request$jscomp$1, error$6);
logRecoverableError(request$jscomp$0, error$6, {}),
fatalError(request$jscomp$0, error$6);
} finally {
(currentResumableState = prevResumableState),
(ReactSharedInternals.H = prevDispatcher),
@@ -7331,6 +7357,7 @@ __DEV__ &&
error$jscomp$2(
"There was still abortable task at the root when we closed. This is a bug in React."
),
(request.status = CLOSED),
destination.push(null),
(request.destination = null));
}
@@ -7355,9 +7382,9 @@ __DEV__ &&
}
}
function startFlowing(request, destination) {
if (1 === request.status)
(request.status = 2), destination.destroy(request.fatalError);
else if (2 !== request.status && null === request.destination) {
if (2 === request.status)
(request.status = CLOSED), destination.destroy(request.fatalError);
else if (request.status !== CLOSED && null === request.destination) {
request.destination = destination;
try {
flushCompletedQueues(request, destination);
@@ -7368,13 +7395,19 @@ __DEV__ &&
}
}
function abort(request, reason) {
0 === request.status && (request.status = 1);
try {
var abortableTasks = request.abortableTasks;
if (0 < abortableTasks.size) {
var error =
void 0 === reason
? Error("The render was aborted by the server without a reason.")
: reason;
: "object" === typeof reason &&
null !== reason &&
"function" === typeof reason.then
? Error("The render was aborted by the server with a promise.")
: reason;
request.fatalError = error;
abortableTasks.forEach(function (task) {
return abortTask(task, request, error);
});
@@ -8892,6 +8925,8 @@ __DEV__ &&
COMPLETED = 1,
FLUSHED = 2,
POSTPONED = 5,
CLOSED = 3,
AbortSigil = {},
currentRequest = null,
didWarnAboutBadClass = {},
didWarnAboutContextTypes = {},
@@ -8917,5 +8952,5 @@ __DEV__ &&
'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 = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
})();
+281 -251
View File
@@ -4651,8 +4651,8 @@ __DEV__ &&
onShellError(error);
onFatalError(error);
null !== request.destination
? ((request.status = 2), request.destination.destroy(error))
: ((request.status = 1), (request.fatalError = error));
? ((request.status = CLOSED), request.destination.destroy(error))
: ((request.status = 2), (request.fatalError = error));
}
function renderWithHooks(
request,
@@ -4814,13 +4814,15 @@ __DEV__ &&
props = newProps;
newProps = emptyContextObject;
defaultProps = type.contextType;
"contextType" in type &&
if (
"contextType" in type &&
null !== defaultProps &&
(void 0 === defaultProps ||
defaultProps.$$typeof !== REACT_CONTEXT_TYPE) &&
!didWarnAboutInvalidateContextType.has(type) &&
(didWarnAboutInvalidateContextType.add(type),
(ref =
!didWarnAboutInvalidateContextType.has(type)
) {
didWarnAboutInvalidateContextType.add(type);
var addendum =
void 0 === defaultProps
? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file."
: "object" !== typeof defaultProps
@@ -4829,12 +4831,13 @@ __DEV__ &&
? " Did you accidentally pass the Context.Consumer instead?"
: " However, it is set to an object with keys {" +
Object.keys(defaultProps).join(", ") +
"}."),
"}.";
error$jscomp$2(
"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
getComponentNameFromType(type) || "Component",
ref
));
addendum
);
}
"object" === typeof defaultProps &&
null !== defaultProps &&
(newProps = defaultProps._currentValue2);
@@ -4855,7 +4858,7 @@ __DEV__ &&
"function" === typeof newProps.getSnapshotBeforeUpdate
)
if (
((_propName = ref = defaultProps = null),
((ref = addendum = defaultProps = null),
"function" === typeof newProps.componentWillMount &&
!0 !== newProps.componentWillMount.__suppressDeprecationWarning
? (defaultProps = "componentWillMount")
@@ -4864,33 +4867,32 @@ __DEV__ &&
"function" === typeof newProps.componentWillReceiveProps &&
!0 !==
newProps.componentWillReceiveProps.__suppressDeprecationWarning
? (ref = "componentWillReceiveProps")
? (addendum = "componentWillReceiveProps")
: "function" ===
typeof newProps.UNSAFE_componentWillReceiveProps &&
(ref = "UNSAFE_componentWillReceiveProps"),
(addendum = "UNSAFE_componentWillReceiveProps"),
"function" === typeof newProps.componentWillUpdate &&
!0 !== newProps.componentWillUpdate.__suppressDeprecationWarning
? (_propName = "componentWillUpdate")
? (ref = "componentWillUpdate")
: "function" === typeof newProps.UNSAFE_componentWillUpdate &&
(_propName = "UNSAFE_componentWillUpdate"),
null !== defaultProps || null !== ref || null !== _propName)
) {
propName = getComponentNameFromType(type) || "Component";
var newApiName =
"function" === typeof type.getDerivedStateFromProps
? "getDerivedStateFromProps()"
: "getSnapshotBeforeUpdate()";
didWarnAboutLegacyLifecyclesAndDerivedState.has(propName) ||
(didWarnAboutLegacyLifecyclesAndDerivedState.add(propName),
error$jscomp$2(
"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
propName,
newApiName,
null !== defaultProps ? "\n " + defaultProps : "",
null !== ref ? "\n " + ref : "",
null !== _propName ? "\n " + _propName : ""
));
}
(ref = "UNSAFE_componentWillUpdate"),
null !== defaultProps || null !== addendum || null !== ref)
)
(_propName = getComponentNameFromType(type) || "Component"),
(propName =
"function" === typeof type.getDerivedStateFromProps
? "getDerivedStateFromProps()"
: "getSnapshotBeforeUpdate()"),
didWarnAboutLegacyLifecyclesAndDerivedState.has(_propName) ||
(didWarnAboutLegacyLifecyclesAndDerivedState.add(_propName),
error$jscomp$2(
"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
_propName,
propName,
null !== defaultProps ? "\n " + defaultProps : "",
null !== addendum ? "\n " + addendum : "",
null !== ref ? "\n " + ref : ""
));
defaultProps = getComponentNameFromType(type) || "Component";
newProps.render ||
(type.prototype && "function" === typeof type.prototype.render
@@ -4966,9 +4968,9 @@ __DEV__ &&
"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
defaultProps
);
ref = newProps.props !== props;
addendum = newProps.props !== props;
void 0 !== newProps.props &&
ref &&
addendum &&
error$jscomp$2(
"When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
defaultProps
@@ -5002,8 +5004,8 @@ __DEV__ &&
"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
defaultProps
);
(ref = newProps.state) &&
("object" !== typeof ref || isArrayImpl(ref)) &&
(addendum = newProps.state) &&
("object" !== typeof addendum || isArrayImpl(addendum)) &&
error$jscomp$2(
"%s.state: must be set to an object or null",
defaultProps
@@ -5014,41 +5016,41 @@ __DEV__ &&
"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
defaultProps
);
ref = void 0 !== newProps.state ? newProps.state : null;
addendum = void 0 !== newProps.state ? newProps.state : null;
newProps.updater = classComponentUpdater;
newProps.props = props;
newProps.state = ref;
newProps.state = addendum;
defaultProps = { queue: [], replace: !1 };
newProps._reactInternals = defaultProps;
_propName = type.contextType;
ref = type.contextType;
newProps.context =
"object" === typeof _propName && null !== _propName
? _propName._currentValue2
"object" === typeof ref && null !== ref
? ref._currentValue2
: emptyContextObject;
newProps.state === props &&
((_propName = getComponentNameFromType(type) || "Component"),
didWarnAboutDirectlyAssigningPropsToState.has(_propName) ||
(didWarnAboutDirectlyAssigningPropsToState.add(_propName),
((ref = getComponentNameFromType(type) || "Component"),
didWarnAboutDirectlyAssigningPropsToState.has(ref) ||
(didWarnAboutDirectlyAssigningPropsToState.add(ref),
error$jscomp$2(
"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",
_propName
ref
)));
_propName = type.getDerivedStateFromProps;
"function" === typeof _propName &&
((_propName = _propName(props, ref)),
void 0 === _propName &&
((propName = getComponentNameFromType(type) || "Component"),
didWarnAboutUndefinedDerivedState.has(propName) ||
(didWarnAboutUndefinedDerivedState.add(propName),
ref = type.getDerivedStateFromProps;
"function" === typeof ref &&
((ref = ref(props, addendum)),
void 0 === ref &&
((_propName = getComponentNameFromType(type) || "Component"),
didWarnAboutUndefinedDerivedState.has(_propName) ||
(didWarnAboutUndefinedDerivedState.add(_propName),
error$jscomp$2(
"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
propName
_propName
))),
(ref =
null === _propName || void 0 === _propName
? ref
: assign({}, ref, _propName)),
(newProps.state = ref));
(addendum =
null === ref || void 0 === ref
? addendum
: assign({}, addendum, ref)),
(newProps.state = addendum));
if (
"function" !== typeof type.getDerivedStateFromProps &&
"function" !== typeof newProps.getSnapshotBeforeUpdate &&
@@ -5056,21 +5058,21 @@ __DEV__ &&
"function" === typeof newProps.componentWillMount)
)
if (
((ref = newProps.state),
((addendum = newProps.state),
"function" === typeof newProps.componentWillMount &&
(!0 !==
newProps.componentWillMount.__suppressDeprecationWarning &&
((_propName = getComponentNameFromType(type) || "Unknown"),
didWarnAboutDeprecatedWillMount[_propName] ||
((ref = getComponentNameFromType(type) || "Unknown"),
didWarnAboutDeprecatedWillMount[ref] ||
(warn(
"componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\n\nPlease update the following components: %s",
_propName
ref
),
(didWarnAboutDeprecatedWillMount[_propName] = !0))),
(didWarnAboutDeprecatedWillMount[ref] = !0))),
newProps.componentWillMount()),
"function" === typeof newProps.UNSAFE_componentWillMount &&
newProps.UNSAFE_componentWillMount(),
ref !== newProps.state &&
addendum !== newProps.state &&
(error$jscomp$2(
"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
getComponentNameFromType(type) || "Component"
@@ -5083,35 +5085,36 @@ __DEV__ &&
null !== defaultProps.queue && 0 < defaultProps.queue.length)
)
if (
((ref = defaultProps.queue),
(propName = defaultProps.replace),
((addendum = defaultProps.queue),
(_propName = defaultProps.replace),
(defaultProps.queue = null),
(defaultProps.replace = !1),
propName && 1 === ref.length)
_propName && 1 === addendum.length)
)
newProps.state = ref[0];
newProps.state = addendum[0];
else {
defaultProps = propName ? ref[0] : newProps.state;
_propName = !0;
defaultProps = _propName ? addendum[0] : newProps.state;
ref = !0;
for (
propName = propName ? 1 : 0;
propName < ref.length;
propName++
_propName = _propName ? 1 : 0;
_propName < addendum.length;
_propName++
)
(newApiName = ref[propName]),
(newApiName =
"function" === typeof newApiName
? newApiName.call(newProps, defaultProps, props, void 0)
: newApiName),
null != newApiName &&
(_propName
? ((_propName = !1),
(defaultProps = assign({}, defaultProps, newApiName)))
: assign(defaultProps, newApiName));
(propName = addendum[_propName]),
(propName =
"function" === typeof propName
? propName.call(newProps, defaultProps, props, void 0)
: propName),
null != propName &&
(ref
? ((ref = !1),
(defaultProps = assign({}, defaultProps, propName)))
: assign(defaultProps, propName));
newProps.state = defaultProps;
}
else defaultProps.queue = null;
defaultProps = callRenderInDEV(newProps);
if (1 === request.status) throw AbortSigil;
newProps.props !== props &&
(didWarnAboutReassigningProps ||
error$jscomp$2(
@@ -5123,7 +5126,7 @@ __DEV__ &&
task.keyPath = keyPath;
renderNodeDestructive(request, task, defaultProps, -1);
task.keyPath = type;
} else
} else {
type.prototype &&
"function" === typeof type.prototype.render &&
((newProps = getComponentNameFromType(type) || "Unknown"),
@@ -5133,73 +5136,67 @@ __DEV__ &&
newProps,
newProps
),
(didWarnAboutBadClass[newProps] = !0))),
(props = renderWithHooks(
request,
task,
keyPath,
type,
props,
void 0
)),
(newProps = 0 !== localIdCounter),
(defaultProps = actionStateCounter),
(ref = actionStateMatchingIndex),
type.contextTypes &&
((_propName = getComponentNameFromType(type) || "Unknown"),
didWarnAboutContextTypes[_propName] ||
((didWarnAboutContextTypes[_propName] = !0),
error$jscomp$2(
"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
_propName
))),
type &&
type.childContextTypes &&
(didWarnAboutBadClass[newProps] = !0)));
props = renderWithHooks(request, task, keyPath, type, props, void 0);
if (1 === request.status) throw AbortSigil;
newProps = 0 !== localIdCounter;
defaultProps = actionStateCounter;
addendum = actionStateMatchingIndex;
type.contextTypes &&
((ref = getComponentNameFromType(type) || "Unknown"),
didWarnAboutContextTypes[ref] ||
((didWarnAboutContextTypes[ref] = !0),
error$jscomp$2(
"childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
type.displayName || type.name || "Component"
),
disableDefaultPropsExceptForClasses ||
void 0 === type.defaultProps ||
((_propName = getComponentNameFromType(type) || "Unknown"),
didWarnAboutDefaultPropsOnFunctionComponent[_propName] ||
(error$jscomp$2(
"%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",
_propName
),
(didWarnAboutDefaultPropsOnFunctionComponent[_propName] = !0))),
"function" === typeof type.getDerivedStateFromProps &&
((_propName = getComponentNameFromType(type) || "Unknown"),
didWarnAboutGetDerivedStateOnFunctionComponent[_propName] ||
(error$jscomp$2(
"%s: Function components do not support getDerivedStateFromProps.",
_propName
),
(didWarnAboutGetDerivedStateOnFunctionComponent[_propName] =
!0))),
"object" === typeof type.contextType &&
null !== type.contextType &&
((type = getComponentNameFromType(type) || "Unknown"),
didWarnAboutContextTypeOnFunctionComponent[type] ||
(error$jscomp$2(
"%s: Function components do not support contextType.",
type
),
(didWarnAboutContextTypeOnFunctionComponent[type] = !0))),
finishFunctionComponent(
request,
task,
keyPath,
props,
newProps,
defaultProps,
ref
"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
ref
)));
type &&
type.childContextTypes &&
error$jscomp$2(
"childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
type.displayName || type.name || "Component"
);
disableDefaultPropsExceptForClasses ||
void 0 === type.defaultProps ||
((ref = getComponentNameFromType(type) || "Unknown"),
didWarnAboutDefaultPropsOnFunctionComponent[ref] ||
(error$jscomp$2(
"%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",
ref
),
(didWarnAboutDefaultPropsOnFunctionComponent[ref] = !0)));
"function" === typeof type.getDerivedStateFromProps &&
((ref = getComponentNameFromType(type) || "Unknown"),
didWarnAboutGetDerivedStateOnFunctionComponent[ref] ||
(error$jscomp$2(
"%s: Function components do not support getDerivedStateFromProps.",
ref
),
(didWarnAboutGetDerivedStateOnFunctionComponent[ref] = !0)));
"object" === typeof type.contextType &&
null !== type.contextType &&
((type = getComponentNameFromType(type) || "Unknown"),
didWarnAboutContextTypeOnFunctionComponent[type] ||
(error$jscomp$2(
"%s: Function components do not support contextType.",
type
),
(didWarnAboutContextTypeOnFunctionComponent[type] = !0)));
finishFunctionComponent(
request,
task,
keyPath,
props,
newProps,
defaultProps,
addendum
);
}
else if ("string" === typeof type)
if (((newProps = task.blockedSegment), null === newProps))
(newProps = props.children),
(defaultProps = task.formatContext),
(ref = task.keyPath),
(addendum = task.keyPath),
(task.formatContext = getChildFormatContext(
defaultProps,
type,
@@ -5208,9 +5205,9 @@ __DEV__ &&
(task.keyPath = keyPath),
renderNode(request, task, newProps, -1),
(task.formatContext = defaultProps),
(task.keyPath = ref);
(task.keyPath = addendum);
else {
ref = pushStartInstance(
addendum = pushStartInstance(
newProps.chunks,
type,
props,
@@ -5223,12 +5220,12 @@ __DEV__ &&
);
newProps.lastPushedText = !1;
defaultProps = task.formatContext;
_propName = task.keyPath;
ref = task.keyPath;
task.formatContext = getChildFormatContext(defaultProps, type, props);
task.keyPath = keyPath;
renderNode(request, task, ref, -1);
renderNode(request, task, addendum, -1);
task.formatContext = defaultProps;
task.keyPath = _propName;
task.keyPath = ref;
a: {
task = newProps.chunks;
request = request.resumableState;
@@ -5320,7 +5317,7 @@ __DEV__ &&
propName = createSuspenseBoundary(request, fallbackAbortSet);
null !== request.trackedPostpones &&
(propName.trackedContentKeyPath = keyPath);
newApiName = createPendingSegment(
var boundarySegment = createPendingSegment(
request,
ref.chunks.length,
propName,
@@ -5328,7 +5325,7 @@ __DEV__ &&
!1,
!1
);
ref.children.push(newApiName);
ref.children.push(boundarySegment);
ref.lastPushedText = !1;
var contentRootSegment = createPendingSegment(
request,
@@ -5344,17 +5341,24 @@ __DEV__ &&
defaultProps = [newProps[1], newProps[2], [], null];
request.trackedPostpones.workingMap.set(newProps, defaultProps);
propName.trackedFallbackNode = defaultProps;
task.blockedSegment = newApiName;
task.blockedSegment = boundarySegment;
task.keyPath = newProps;
boundarySegment.status = 6;
try {
renderNode(request, task, _propName, -1),
pushSegmentFinale(
newApiName.chunks,
boundarySegment.chunks,
request.renderState,
newApiName.lastPushedText,
newApiName.textEmbedded
boundarySegment.lastPushedText,
boundarySegment.textEmbedded
),
(newApiName.status = COMPLETED);
(boundarySegment.status = COMPLETED);
} catch (thrownValue) {
throw (
((boundarySegment.status =
thrownValue === AbortSigil ? 3 : 4),
thrownValue)
);
} finally {
(task.blockedSegment = ref), (task.keyPath = type);
}
@@ -5381,6 +5385,7 @@ __DEV__ &&
task.hoistableState = propName.contentState;
task.blockedSegment = contentRootSegment;
task.keyPath = keyPath;
contentRootSegment.status = 6;
try {
if (
(renderNode(request, task, props, -1),
@@ -5397,20 +5402,24 @@ __DEV__ &&
propName.status = COMPLETED;
break a;
}
} catch (error$2) {
(contentRootSegment.status = 4),
(propName.status = CLIENT_RENDERED),
(newProps = getThrownInfo(task.componentStack)),
(defaultProps = logRecoverableError(
} catch (thrownValue$2) {
(propName.status = CLIENT_RENDERED),
thrownValue$2 === AbortSigil
? ((contentRootSegment.status = 3),
(newProps = request.fatalError))
: ((contentRootSegment.status = 4),
(newProps = thrownValue$2)),
(defaultProps = getThrownInfo(task.componentStack)),
(addendum = logRecoverableError(
request,
error$2,
newProps
newProps,
defaultProps
)),
encodeErrorForBoundary(
propName,
defaultProps,
error$2,
addendum,
newProps,
defaultProps,
!1
),
untrackBoundary(request, propName);
@@ -5426,7 +5435,7 @@ __DEV__ &&
_propName,
-1,
parentBoundary,
newApiName,
boundarySegment,
propName.fallbackState,
fallbackAbortSet,
[keyPath[0], "Suspense Fallback", keyPath[2]],
@@ -5446,9 +5455,9 @@ __DEV__ &&
switch (type.$$typeof) {
case REACT_FORWARD_REF_TYPE:
if ("ref" in props)
for (newApiName in ((newProps = {}), props))
"ref" !== newApiName &&
(newProps[newApiName] = props[newApiName]);
for (boundarySegment in ((newProps = {}), props))
"ref" !== boundarySegment &&
(newProps[boundarySegment] = props[boundarySegment]);
else newProps = props;
type = renderWithHooks(
request,
@@ -5503,6 +5512,7 @@ __DEV__ &&
}
case REACT_LAZY_TYPE:
type = callLazyInitInDEV(type);
if (1 === request.status) throw AbortSigil;
props = resolveDefaultPropsOnNonClassComponent(type, props);
renderElement(request, task, keyPath, type, props, ref);
return;
@@ -5737,6 +5747,7 @@ __DEV__ &&
);
case REACT_LAZY_TYPE:
node = callLazyInitInDEV(node);
if (1 === request.status) throw AbortSigil;
renderNodeDestructive(request, task, node, childIndex);
return;
}
@@ -6136,6 +6147,20 @@ __DEV__ &&
!1
);
}
function erroredTask(request, boundary, error, errorInfo) {
var errorDigest = logRecoverableError(request, error, errorInfo);
null === boundary
? fatalError(request, error)
: (boundary.pendingTasks--,
boundary.status !== CLIENT_RENDERED &&
((boundary.status = CLIENT_RENDERED),
encodeErrorForBoundary(boundary, errorDigest, error, errorInfo, !1),
untrackBoundary(request, boundary),
boundary.parentFlushed &&
request.clientRenderedBoundaries.push(boundary)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function abortTaskSoft(task) {
var boundary = task.blockedBoundary;
task = task.blockedSegment;
@@ -6210,9 +6235,14 @@ __DEV__ &&
function abortTask(task, request, error) {
var boundary = task.blockedBoundary,
segment = task.blockedSegment;
null !== segment && (segment.status = 3);
if (null !== segment) {
if (6 === segment.status) return;
segment.status = 3;
}
if (null === boundary) {
if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
if (
((boundary = {}), 2 !== request.status && request.status !== CLOSED)
) {
task = task.replay;
if (null === task) {
logRecoverableError(request, error, boundary);
@@ -6387,54 +6417,53 @@ __DEV__ &&
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function performWork(request$jscomp$1) {
if (2 !== request$jscomp$1.status && 1 !== request$jscomp$1.status) {
function performWork(request$jscomp$0) {
if (request$jscomp$0.status !== CLOSED && 2 !== request$jscomp$0.status) {
var prevContext = currentActiveSnapshot,
prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = HooksDispatcher;
var prevAsyncDispatcher = ReactSharedInternals.A;
ReactSharedInternals.A = DefaultAsyncDispatcher;
var prevRequest = currentRequest;
currentRequest = request$jscomp$1;
currentRequest = request$jscomp$0;
var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
var prevResumableState = currentResumableState;
currentResumableState = request$jscomp$1.resumableState;
currentResumableState = request$jscomp$0.resumableState;
try {
var pingedTasks = request$jscomp$1.pingedTasks,
var pingedTasks = request$jscomp$0.pingedTasks,
i;
for (i = 0; i < pingedTasks.length; i++) {
var request = request$jscomp$1,
var request = request$jscomp$0,
task = pingedTasks[i],
segment = task.blockedSegment;
if (null === segment) {
var prevTaskInDEV = void 0,
request$jscomp$0 = request;
request = task;
if (0 !== request.replay.pendingTasks) {
switchContext(request.context);
task$jscomp$0 = task;
if (0 !== task$jscomp$0.replay.pendingTasks) {
switchContext(task$jscomp$0.context);
prevTaskInDEV = currentTaskInDEV;
currentTaskInDEV = request;
currentTaskInDEV = task$jscomp$0;
try {
"number" === typeof request.replay.slots
"number" === typeof task$jscomp$0.replay.slots
? resumeNode(
request$jscomp$0,
request,
request.replay.slots,
request.node,
request.childIndex
task$jscomp$0,
task$jscomp$0.replay.slots,
task$jscomp$0.node,
task$jscomp$0.childIndex
)
: retryNode(request$jscomp$0, request);
: retryNode(request, task$jscomp$0);
if (
1 === request.replay.pendingTasks &&
0 < request.replay.nodes.length
1 === task$jscomp$0.replay.pendingTasks &&
0 < task$jscomp$0.replay.nodes.length
)
throw Error(
"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
);
request.replay.pendingTasks--;
request.abortSet.delete(request);
finishedTask(request$jscomp$0, request.blockedBoundary, null);
task$jscomp$0.replay.pendingTasks--;
task$jscomp$0.abortSet.delete(task$jscomp$0);
finishedTask(request, task$jscomp$0.blockedBoundary, null);
} catch (thrownValue) {
resetHooksState();
var x =
@@ -6446,39 +6475,39 @@ __DEV__ &&
null !== x &&
"function" === typeof x.then
) {
var ping = request.ping;
var ping = task$jscomp$0.ping;
x.then(ping, ping);
request.thenableState = getThenableStateAfterSuspending();
task$jscomp$0.thenableState =
getThenableStateAfterSuspending();
} else {
request.replay.pendingTasks--;
request.abortSet.delete(request);
var errorInfo = getThrownInfo(request.componentStack);
task$jscomp$0.replay.pendingTasks--;
task$jscomp$0.abortSet.delete(task$jscomp$0);
var errorInfo = getThrownInfo(task$jscomp$0.componentStack);
erroredReplay(
request$jscomp$0,
request.blockedBoundary,
x,
request,
task$jscomp$0.blockedBoundary,
x === AbortSigil ? request.fatalError : x,
errorInfo,
request.replay.nodes,
request.replay.slots
task$jscomp$0.replay.nodes,
task$jscomp$0.replay.slots
);
request$jscomp$0.pendingRootTasks--;
0 === request$jscomp$0.pendingRootTasks &&
completeShell(request$jscomp$0);
request$jscomp$0.allPendingTasks--;
0 === request$jscomp$0.allPendingTasks &&
completeAll(request$jscomp$0);
request.pendingRootTasks--;
0 === request.pendingRootTasks && completeShell(request);
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
} finally {
currentTaskInDEV = prevTaskInDEV;
}
}
} else {
request$jscomp$0 = prevTaskInDEV = void 0;
var task$jscomp$0 = task,
segment$jscomp$0 = segment;
prevTaskInDEV = void 0;
task$jscomp$0 = task;
var segment$jscomp$0 = segment;
if (segment$jscomp$0.status === PENDING) {
segment$jscomp$0.status = 6;
switchContext(task$jscomp$0.context);
request$jscomp$0 = currentTaskInDEV;
prevTaskInDEV = currentTaskInDEV;
currentTaskInDEV = task$jscomp$0;
var childrenLength = segment$jscomp$0.children.length,
chunkLength = segment$jscomp$0.chunks.length;
@@ -6510,55 +6539,47 @@ __DEV__ &&
null !== x$jscomp$0 &&
"function" === typeof x$jscomp$0.then
) {
var ping$jscomp$0 = task$jscomp$0.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
segment$jscomp$0.status = PENDING;
task$jscomp$0.thenableState =
getThenableStateAfterSuspending();
var ping$jscomp$0 = task$jscomp$0.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
} else {
var errorInfo$jscomp$0 = getThrownInfo(
task$jscomp$0.componentStack
);
task$jscomp$0.abortSet.delete(task$jscomp$0);
segment$jscomp$0.status = 4;
var boundary = task$jscomp$0.blockedBoundary;
prevTaskInDEV = logRecoverableError(
request,
x$jscomp$0,
errorInfo$jscomp$0
);
null === boundary
? fatalError(request, x$jscomp$0)
: (boundary.pendingTasks--,
boundary.status !== CLIENT_RENDERED &&
((boundary.status = CLIENT_RENDERED),
encodeErrorForBoundary(
boundary,
prevTaskInDEV,
x$jscomp$0,
errorInfo$jscomp$0,
!1
),
untrackBoundary(request, boundary),
boundary.parentFlushed &&
request.clientRenderedBoundaries.push(boundary)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
x$jscomp$0 === AbortSigil
? ((segment$jscomp$0.status = 3),
erroredTask(
request,
task$jscomp$0.blockedBoundary,
request.fatalError,
errorInfo$jscomp$0
))
: ((segment$jscomp$0.status = 4),
erroredTask(
request,
task$jscomp$0.blockedBoundary,
x$jscomp$0,
errorInfo$jscomp$0
));
}
} finally {
currentTaskInDEV = request$jscomp$0;
currentTaskInDEV = prevTaskInDEV;
}
}
}
}
pingedTasks.splice(0, i);
null !== request$jscomp$1.destination &&
null !== request$jscomp$0.destination &&
flushCompletedQueues(
request$jscomp$1,
request$jscomp$1.destination
request$jscomp$0,
request$jscomp$0.destination
);
} catch (error$6) {
logRecoverableError(request$jscomp$1, error$6, {}),
fatalError(request$jscomp$1, error$6);
logRecoverableError(request$jscomp$0, error$6, {}),
fatalError(request$jscomp$0, error$6);
} finally {
(currentResumableState = prevResumableState),
(ReactSharedInternals.H = prevDispatcher),
@@ -7160,6 +7181,7 @@ __DEV__ &&
error$jscomp$2(
"There was still abortable task at the root when we closed. This is a bug in React."
),
(request.status = CLOSED),
destination.push(null),
(request.destination = null));
}
@@ -7184,9 +7206,9 @@ __DEV__ &&
}
}
function startFlowing(request, destination) {
if (1 === request.status)
(request.status = 2), destination.destroy(request.fatalError);
else if (2 !== request.status && null === request.destination) {
if (2 === request.status)
(request.status = CLOSED), destination.destroy(request.fatalError);
else if (request.status !== CLOSED && null === request.destination) {
request.destination = destination;
try {
flushCompletedQueues(request, destination);
@@ -7197,13 +7219,19 @@ __DEV__ &&
}
}
function abort(request, reason) {
0 === request.status && (request.status = 1);
try {
var abortableTasks = request.abortableTasks;
if (0 < abortableTasks.size) {
var error =
void 0 === reason
? Error("The render was aborted by the server without a reason.")
: reason;
: "object" === typeof reason &&
null !== reason &&
"function" === typeof reason.then
? Error("The render was aborted by the server with a promise.")
: reason;
request.fatalError = error;
abortableTasks.forEach(function (task) {
return abortTask(task, request, error);
});
@@ -8717,6 +8745,8 @@ __DEV__ &&
COMPLETED = 1,
FLUSHED = 2,
POSTPONED = 5,
CLOSED = 3,
AbortSigil = {},
currentRequest = null,
didWarnAboutBadClass = {},
didWarnAboutContextTypes = {},
@@ -8742,5 +8772,5 @@ __DEV__ &&
'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 = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
})();
@@ -2682,16 +2682,16 @@ function createRenderState(resumableState, generateStaticMarkup) {
"\x3c/script>"
);
bootstrapScriptContent = idPrefix + "P:";
var JSCompiler_object_inline_segmentPrefix_1639 = idPrefix + "S:";
var JSCompiler_object_inline_segmentPrefix_1627 = idPrefix + "S:";
idPrefix += "B:";
var JSCompiler_object_inline_preconnects_1653 = new Set(),
JSCompiler_object_inline_fontPreloads_1654 = new Set(),
JSCompiler_object_inline_highImagePreloads_1655 = new Set(),
JSCompiler_object_inline_styles_1656 = new Map(),
JSCompiler_object_inline_bootstrapScripts_1657 = new Set(),
JSCompiler_object_inline_scripts_1658 = new Set(),
JSCompiler_object_inline_bulkPreloads_1659 = new Set(),
JSCompiler_object_inline_preloads_1660 = {
var JSCompiler_object_inline_preconnects_1641 = new Set(),
JSCompiler_object_inline_fontPreloads_1642 = new Set(),
JSCompiler_object_inline_highImagePreloads_1643 = new Set(),
JSCompiler_object_inline_styles_1644 = new Map(),
JSCompiler_object_inline_bootstrapScripts_1645 = new Set(),
JSCompiler_object_inline_scripts_1646 = new Set(),
JSCompiler_object_inline_bulkPreloads_1647 = new Set(),
JSCompiler_object_inline_preloads_1648 = {
images: new Map(),
stylesheets: new Map(),
scripts: new Map(),
@@ -2728,7 +2728,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
scriptConfig.moduleScriptResources[href] = null;
scriptConfig = [];
pushLinkImpl(scriptConfig, props);
JSCompiler_object_inline_bootstrapScripts_1657.add(scriptConfig);
JSCompiler_object_inline_bootstrapScripts_1645.add(scriptConfig);
bootstrapChunks.push('<script src="', escapeTextForBrowser(src));
"string" === typeof integrity &&
bootstrapChunks.push('" integrity="', escapeTextForBrowser(integrity));
@@ -2769,7 +2769,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
(props.moduleScriptResources[scriptConfig] = null),
(props = []),
pushLinkImpl(props, integrity),
JSCompiler_object_inline_bootstrapScripts_1657.add(props),
JSCompiler_object_inline_bootstrapScripts_1645.add(props),
bootstrapChunks.push(
'<script type="module" src="',
escapeTextForBrowser(i)
@@ -2784,7 +2784,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
bootstrapChunks.push('" async="">\x3c/script>');
return {
placeholderPrefix: bootstrapScriptContent,
segmentPrefix: JSCompiler_object_inline_segmentPrefix_1639,
segmentPrefix: JSCompiler_object_inline_segmentPrefix_1627,
boundaryPrefix: idPrefix,
startInlineScript: "<script>",
htmlChunks: null,
@@ -2804,14 +2804,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
charsetChunks: [],
viewportChunks: [],
hoistableChunks: [],
preconnects: JSCompiler_object_inline_preconnects_1653,
fontPreloads: JSCompiler_object_inline_fontPreloads_1654,
highImagePreloads: JSCompiler_object_inline_highImagePreloads_1655,
styles: JSCompiler_object_inline_styles_1656,
bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1657,
scripts: JSCompiler_object_inline_scripts_1658,
bulkPreloads: JSCompiler_object_inline_bulkPreloads_1659,
preloads: JSCompiler_object_inline_preloads_1660,
preconnects: JSCompiler_object_inline_preconnects_1641,
fontPreloads: JSCompiler_object_inline_fontPreloads_1642,
highImagePreloads: JSCompiler_object_inline_highImagePreloads_1643,
styles: JSCompiler_object_inline_styles_1644,
bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1645,
scripts: JSCompiler_object_inline_scripts_1646,
bulkPreloads: JSCompiler_object_inline_bulkPreloads_1647,
preloads: JSCompiler_object_inline_preloads_1648,
stylesToHoist: !1,
generateStaticMarkup: generateStaticMarkup
};
@@ -3685,7 +3685,8 @@ function createRequest(
formState
);
}
var currentRequest = null;
var AbortSigil = {},
currentRequest = null;
function pingTask(request, task) {
request.pingedTasks.push(task);
1 === request.pingedTasks.length &&
@@ -3864,8 +3865,8 @@ function fatalError(request, error) {
onShellError(error);
onFatalError(error);
null !== request.destination
? ((request.status = 2), request.destination.destroy(error))
: ((request.status = 1), (request.fatalError = error));
? ((request.status = 3), request.destination.destroy(error))
: ((request.status = 2), (request.fatalError = error));
}
function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
var prevThenableState = task.thenableState;
@@ -3984,9 +3985,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
JSCompiler_inline_result,
props
));
for (var propName$32 in defaultProps)
void 0 === JSCompiler_inline_result[propName$32] &&
(JSCompiler_inline_result[propName$32] = defaultProps[propName$32]);
for (var propName$33 in defaultProps)
void 0 === JSCompiler_inline_result[propName$33] &&
(JSCompiler_inline_result[propName$33] = defaultProps[propName$33]);
}
defaultProps = getMaskedContext(type, task.legacyContext);
props = type.contextType;
@@ -3996,25 +3997,25 @@ function renderElement(request, task, keyPath, type, props, ref) {
? props._currentValue2
: defaultProps
);
propName$32 = void 0 !== props.state ? props.state : null;
ref = void 0 !== props.state ? props.state : null;
props.updater = classComponentUpdater;
props.props = JSCompiler_inline_result;
props.state = propName$32;
ref = { queue: [], replace: !1 };
props._reactInternals = ref;
propName = type.contextType;
props.state = ref;
var internalInstance = { queue: [], replace: !1 };
props._reactInternals = internalInstance;
propName$33 = type.contextType;
props.context =
"object" === typeof propName && null !== propName
? propName._currentValue2
"object" === typeof propName$33 && null !== propName$33
? propName$33._currentValue2
: defaultProps;
propName = type.getDerivedStateFromProps;
"function" === typeof propName &&
((propName = propName(JSCompiler_inline_result, propName$32)),
(propName$32 =
null === propName || void 0 === propName
? propName$32
: assign({}, propName$32, propName)),
(props.state = propName$32));
propName$33 = type.getDerivedStateFromProps;
"function" === typeof propName$33 &&
((propName$33 = propName$33(JSCompiler_inline_result, ref)),
(ref =
null === propName$33 || void 0 === propName$33
? ref
: assign({}, ref, propName$33)),
(props.state = ref));
if (
"function" !== typeof type.getDerivedStateFromProps &&
"function" !== typeof props.getSnapshotBeforeUpdate &&
@@ -4022,48 +4023,52 @@ function renderElement(request, task, keyPath, type, props, ref) {
"function" === typeof props.componentWillMount)
)
if (
((propName$32 = props.state),
((ref = props.state),
"function" === typeof props.componentWillMount &&
props.componentWillMount(),
"function" === typeof props.UNSAFE_componentWillMount &&
props.UNSAFE_componentWillMount(),
propName$32 !== props.state &&
ref !== props.state &&
classComponentUpdater.enqueueReplaceState(props, props.state, null),
null !== ref.queue && 0 < ref.queue.length)
) {
propName$32 = ref.queue;
var oldReplace = ref.replace;
ref.queue = null;
ref.replace = !1;
if (oldReplace && 1 === propName$32.length)
props.state = propName$32[0];
null !== internalInstance.queue && 0 < internalInstance.queue.length)
)
if (
((ref = internalInstance.queue),
(propName = internalInstance.replace),
(internalInstance.queue = null),
(internalInstance.replace = !1),
propName && 1 === ref.length)
)
props.state = ref[0];
else {
ref = oldReplace ? propName$32[0] : props.state;
propName = !0;
internalInstance = propName ? ref[0] : props.state;
propName$33 = !0;
for (
oldReplace = oldReplace ? 1 : 0;
oldReplace < propName$32.length;
oldReplace++
propName = propName ? 1 : 0;
propName < ref.length;
propName++
) {
var partial = propName$32[oldReplace];
var partial = ref[propName];
partial =
"function" === typeof partial
? partial.call(
props,
ref,
internalInstance,
JSCompiler_inline_result,
defaultProps
)
: partial;
null != partial &&
(propName
? ((propName = !1), (ref = assign({}, ref, partial)))
: assign(ref, partial));
(propName$33
? ((propName$33 = !1),
(internalInstance = assign({}, internalInstance, partial)))
: assign(internalInstance, partial));
}
props.state = ref;
props.state = internalInstance;
}
} else ref.queue = null;
else internalInstance.queue = null;
JSCompiler_inline_result = props.render();
if (1 === request.status) throw AbortSigil;
defaultProps = type.childContextTypes;
if (null !== defaultProps && void 0 !== defaultProps) {
keyPath = task.legacyContext;
@@ -4089,19 +4094,29 @@ function renderElement(request, task, keyPath, type, props, ref) {
(task.keyPath = keyPath),
renderNodeDestructive(request, task, JSCompiler_inline_result, -1),
(task.keyPath = type);
} else
} else {
var legacyContext;
disableLegacyContextForFunctionComponents ||
(partial = getMaskedContext(type, task.legacyContext)),
(type = renderWithHooks(request, task, keyPath, type, props, partial)),
finishFunctionComponent(
request,
task,
keyPath,
type,
0 !== localIdCounter,
actionStateCounter,
actionStateMatchingIndex
);
(legacyContext = getMaskedContext(type, task.legacyContext));
type = renderWithHooks(
request,
task,
keyPath,
type,
props,
legacyContext
);
if (1 === request.status) throw AbortSigil;
finishFunctionComponent(
request,
task,
keyPath,
type,
0 !== localIdCounter,
actionStateCounter,
actionStateMatchingIndex
);
}
else if ("string" === typeof type)
if (((contextKey = task.blockedSegment), null === contextKey))
(contextKey = props.children),
@@ -4130,7 +4145,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
);
contextKey.lastPushedText = !1;
JSCompiler_inline_result = task.formatContext;
ref = task.keyPath;
internalInstance = task.keyPath;
task.formatContext = getChildFormatContext(
JSCompiler_inline_result,
type,
@@ -4139,7 +4154,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
task.keyPath = keyPath;
renderNode(request, task, defaultProps, -1);
task.formatContext = JSCompiler_inline_result;
task.keyPath = ref;
task.keyPath = internalInstance;
a: {
task = contextKey.chunks;
request = request.resumableState;
@@ -4222,26 +4237,26 @@ function renderElement(request, task, keyPath, type, props, ref) {
}
} else {
type = task.keyPath;
partial = task.blockedBoundary;
legacyContext = task.blockedBoundary;
var parentHoistableState = task.hoistableState;
contextKey = task.blockedSegment;
ref = props.fallback;
props = props.children;
var fallbackAbortSet = new Set();
propName$32 = createSuspenseBoundary(request, fallbackAbortSet);
propName$33 = createSuspenseBoundary(request, fallbackAbortSet);
null !== request.trackedPostpones &&
(propName$32.trackedContentKeyPath = keyPath);
(propName$33.trackedContentKeyPath = keyPath);
propName = createPendingSegment(
request,
contextKey.chunks.length,
propName$32,
propName$33,
task.formatContext,
!1,
!1
);
contextKey.children.push(propName);
contextKey.lastPushedText = !1;
oldReplace = createPendingSegment(
partial = createPendingSegment(
request,
0,
null,
@@ -4249,7 +4264,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
!1,
!1
);
oldReplace.parentFlushed = !0;
partial.parentFlushed = !0;
if (null !== request.trackedPostpones) {
JSCompiler_inline_result = [
keyPath[0],
@@ -4266,9 +4281,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
JSCompiler_inline_result,
defaultProps
);
propName$32.trackedFallbackNode = defaultProps;
propName$33.trackedFallbackNode = defaultProps;
task.blockedSegment = propName;
task.keyPath = JSCompiler_inline_result;
propName.status = 6;
try {
renderNode(request, task, ref, -1),
pushSegmentFinale(
@@ -4278,6 +4294,11 @@ function renderElement(request, task, keyPath, type, props, ref) {
propName.textEmbedded
),
(propName.status = 1);
} catch (thrownValue) {
throw (
((propName.status = thrownValue === AbortSigil ? 3 : 4),
thrownValue)
);
} finally {
(task.blockedSegment = contextKey), (task.keyPath = type);
}
@@ -4286,9 +4307,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
null,
props,
-1,
propName$32,
oldReplace,
propName$32.contentState,
propName$33,
partial,
propName$33.contentState,
task.abortSet,
keyPath,
task.formatContext,
@@ -4301,39 +4322,44 @@ function renderElement(request, task, keyPath, type, props, ref) {
pushComponentStack(task);
request.pingedTasks.push(task);
} else {
task.blockedBoundary = propName$32;
task.hoistableState = propName$32.contentState;
task.blockedSegment = oldReplace;
task.blockedBoundary = propName$33;
task.hoistableState = propName$33.contentState;
task.blockedSegment = partial;
task.keyPath = keyPath;
partial.status = 6;
try {
if (
(renderNode(request, task, props, -1),
pushSegmentFinale(
oldReplace.chunks,
partial.chunks,
request.renderState,
oldReplace.lastPushedText,
oldReplace.textEmbedded
partial.lastPushedText,
partial.textEmbedded
),
(oldReplace.status = 1),
queueCompletedSegment(propName$32, oldReplace),
0 === propName$32.pendingTasks && 0 === propName$32.status)
(partial.status = 1),
queueCompletedSegment(propName$33, partial),
0 === propName$33.pendingTasks && 0 === propName$33.status)
) {
propName$32.status = 1;
propName$33.status = 1;
break a;
}
} catch (error) {
(oldReplace.status = 4),
(propName$32.status = 4),
(JSCompiler_inline_result = getThrownInfo(task.componentStack)),
(defaultProps = logRecoverableError(
} catch (thrownValue$28) {
(propName$33.status = 4),
thrownValue$28 === AbortSigil
? ((partial.status = 3),
(JSCompiler_inline_result = request.fatalError))
: ((partial.status = 4),
(JSCompiler_inline_result = thrownValue$28)),
(defaultProps = getThrownInfo(task.componentStack)),
(internalInstance = logRecoverableError(
request,
error,
JSCompiler_inline_result
JSCompiler_inline_result,
defaultProps
)),
(propName$32.errorDigest = defaultProps),
untrackBoundary(request, propName$32);
(propName$33.errorDigest = internalInstance),
untrackBoundary(request, propName$33);
} finally {
(task.blockedBoundary = partial),
(task.blockedBoundary = legacyContext),
(task.hoistableState = parentHoistableState),
(task.blockedSegment = contextKey),
(task.keyPath = type);
@@ -4343,9 +4369,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
null,
ref,
-1,
partial,
legacyContext,
propName,
propName$32.fallbackState,
propName$33.fallbackState,
fallbackAbortSet,
[keyPath[0], "Suspense Fallback", keyPath[2]],
task.formatContext,
@@ -4365,9 +4391,8 @@ function renderElement(request, task, keyPath, type, props, ref) {
switch (type.$$typeof) {
case REACT_FORWARD_REF_TYPE:
if ("ref" in props)
for (oldReplace in ((contextKey = {}), props))
"ref" !== oldReplace &&
(contextKey[oldReplace] = props[oldReplace]);
for (partial in ((contextKey = {}), props))
"ref" !== partial && (contextKey[partial] = props[partial]);
else contextKey = props;
type = renderWithHooks(
request,
@@ -4410,6 +4435,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
case REACT_LAZY_TYPE:
contextKey = type._init;
type = contextKey(type._payload);
if (1 === request.status) throw AbortSigil;
contextKey = resolveDefaultPropsOnNonClassComponent(type, props);
renderElement(request, task, keyPath, type, contextKey, ref);
return;
@@ -4636,6 +4662,7 @@ function retryNode(request, task) {
case REACT_LAZY_TYPE:
childNodes = node._init;
node = childNodes(node._payload);
if (1 === request.status) throw AbortSigil;
renderNodeDestructive(request, task, node, childIndex);
return;
}
@@ -4842,15 +4869,15 @@ function renderNode(request, task, node, childIndex) {
chunkLength = segment.chunks.length;
try {
return renderNodeDestructive(request, task, node, childIndex);
} catch (thrownValue$44) {
} catch (thrownValue$45) {
if (
(resetHooksState(),
(segment.children.length = childrenLength),
(segment.chunks.length = chunkLength),
(node =
thrownValue$44 === SuspenseException
thrownValue$45 === SuspenseException
? getSuspendedThenable()
: thrownValue$44),
: thrownValue$45),
"object" === typeof node &&
null !== node &&
"function" === typeof node.then)
@@ -4904,6 +4931,20 @@ function renderNode(request, task, node, childIndex) {
switchContext(previousContext);
throw node;
}
function erroredTask(request, boundary, error, errorInfo) {
errorInfo = logRecoverableError(request, error, errorInfo);
null === boundary
? fatalError(request, error)
: (boundary.pendingTasks--,
4 !== boundary.status &&
((boundary.status = 4),
(boundary.errorDigest = errorInfo),
untrackBoundary(request, boundary),
boundary.parentFlushed &&
request.clientRenderedBoundaries.push(boundary)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function abortTaskSoft(task) {
var boundary = task.blockedBoundary;
task = task.blockedSegment;
@@ -4955,9 +4996,12 @@ function abortRemainingReplayNodes(
function abortTask(task, request, error) {
var boundary = task.blockedBoundary,
segment = task.blockedSegment;
null !== segment && (segment.status = 3);
if (null !== segment) {
if (6 === segment.status) return;
segment.status = 3;
}
if (null === boundary) {
if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
if (((boundary = {}), 2 !== request.status && 3 !== request.status)) {
task = task.replay;
if (null === task) {
logRecoverableError(request, error, boundary);
@@ -5120,38 +5164,37 @@ function finishedTask(request, boundary, segment) {
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function performWork(request$jscomp$2) {
if (2 !== request$jscomp$2.status && 1 !== request$jscomp$2.status) {
function performWork(request$jscomp$1) {
if (3 !== request$jscomp$1.status && 2 !== request$jscomp$1.status) {
var prevContext = currentActiveSnapshot,
prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = HooksDispatcher;
var prevAsyncDispatcher = ReactSharedInternals.A;
ReactSharedInternals.A = DefaultAsyncDispatcher;
var prevRequest = currentRequest;
currentRequest = request$jscomp$2;
currentRequest = request$jscomp$1;
var prevResumableState = currentResumableState;
currentResumableState = request$jscomp$2.resumableState;
currentResumableState = request$jscomp$1.resumableState;
try {
var pingedTasks = request$jscomp$2.pingedTasks,
var pingedTasks = request$jscomp$1.pingedTasks,
i;
for (i = 0; i < pingedTasks.length; i++) {
var task = pingedTasks[i],
request = request$jscomp$2,
request = request$jscomp$1,
segment = task.blockedSegment;
if (null === segment) {
var request$jscomp$0 = request;
if (0 !== task.replay.pendingTasks) {
switchContext(task.context);
try {
"number" === typeof task.replay.slots
? resumeNode(
request$jscomp$0,
request,
task,
task.replay.slots,
task.node,
task.childIndex
)
: retryNode(request$jscomp$0, task);
: retryNode(request, task);
if (
1 === task.replay.pendingTasks &&
0 < task.replay.nodes.length
@@ -5159,7 +5202,7 @@ function performWork(request$jscomp$2) {
throw Error(formatProdErrorMessage(488));
task.replay.pendingTasks--;
task.abortSet.delete(task);
finishedTask(request$jscomp$0, task.blockedBoundary, null);
finishedTask(request, task.blockedBoundary, null);
} catch (thrownValue) {
resetHooksState();
var x =
@@ -5177,59 +5220,54 @@ function performWork(request$jscomp$2) {
} else {
task.replay.pendingTasks--;
task.abortSet.delete(task);
var errorInfo = getThrownInfo(task.componentStack);
request = void 0;
var request$jscomp$1 = request$jscomp$0,
var errorInfo = getThrownInfo(task.componentStack),
errorDigest = void 0,
request$jscomp$0 = request,
boundary = task.blockedBoundary,
error$jscomp$0 = x,
error$jscomp$0 = x === AbortSigil ? request.fatalError : x,
replayNodes = task.replay.nodes,
resumeSlots = task.replay.slots;
request = logRecoverableError(
request$jscomp$1,
errorDigest = logRecoverableError(
request$jscomp$0,
error$jscomp$0,
errorInfo
);
abortRemainingReplayNodes(
request$jscomp$1,
request$jscomp$0,
boundary,
replayNodes,
resumeSlots,
error$jscomp$0,
request
errorDigest
);
request$jscomp$0.pendingRootTasks--;
0 === request$jscomp$0.pendingRootTasks &&
completeShell(request$jscomp$0);
request$jscomp$0.allPendingTasks--;
0 === request$jscomp$0.allPendingTasks &&
completeAll(request$jscomp$0);
request.pendingRootTasks--;
0 === request.pendingRootTasks && completeShell(request);
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
} finally {
}
}
} else if (
((request$jscomp$0 = void 0),
(request$jscomp$1 = segment),
0 === request$jscomp$1.status)
) {
} else if (((errorDigest = segment), 0 === errorDigest.status)) {
errorDigest.status = 6;
switchContext(task.context);
var childrenLength = request$jscomp$1.children.length,
chunkLength = request$jscomp$1.chunks.length;
var childrenLength = errorDigest.children.length,
chunkLength = errorDigest.chunks.length;
try {
retryNode(request, task),
pushSegmentFinale(
request$jscomp$1.chunks,
errorDigest.chunks,
request.renderState,
request$jscomp$1.lastPushedText,
request$jscomp$1.textEmbedded
errorDigest.lastPushedText,
errorDigest.textEmbedded
),
task.abortSet.delete(task),
(request$jscomp$1.status = 1),
finishedTask(request, task.blockedBoundary, request$jscomp$1);
(errorDigest.status = 1),
finishedTask(request, task.blockedBoundary, errorDigest);
} catch (thrownValue) {
resetHooksState();
request$jscomp$1.children.length = childrenLength;
request$jscomp$1.chunks.length = chunkLength;
errorDigest.children.length = childrenLength;
errorDigest.chunks.length = chunkLength;
var x$jscomp$0 =
thrownValue === SuspenseException
? getSuspendedThenable()
@@ -5239,43 +5277,39 @@ function performWork(request$jscomp$2) {
null !== x$jscomp$0 &&
"function" === typeof x$jscomp$0.then
) {
errorDigest.status = 0;
task.thenableState = getThenableStateAfterSuspending();
var ping$jscomp$0 = task.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
task.thenableState = getThenableStateAfterSuspending();
} else {
var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
task.abortSet.delete(task);
request$jscomp$1.status = 4;
var boundary$jscomp$0 = task.blockedBoundary;
request$jscomp$0 = logRecoverableError(
request,
x$jscomp$0,
errorInfo$jscomp$0
);
null === boundary$jscomp$0
? fatalError(request, x$jscomp$0)
: (boundary$jscomp$0.pendingTasks--,
4 !== boundary$jscomp$0.status &&
((boundary$jscomp$0.status = 4),
(boundary$jscomp$0.errorDigest = request$jscomp$0),
untrackBoundary(request, boundary$jscomp$0),
boundary$jscomp$0.parentFlushed &&
request.clientRenderedBoundaries.push(
boundary$jscomp$0
)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
x$jscomp$0 === AbortSigil
? ((errorDigest.status = 3),
erroredTask(
request,
task.blockedBoundary,
request.fatalError,
errorInfo$jscomp$0
))
: ((errorDigest.status = 4),
erroredTask(
request,
task.blockedBoundary,
x$jscomp$0,
errorInfo$jscomp$0
));
}
} finally {
}
}
}
pingedTasks.splice(0, i);
null !== request$jscomp$2.destination &&
flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
null !== request$jscomp$1.destination &&
flushCompletedQueues(request$jscomp$1, request$jscomp$1.destination);
} catch (error) {
logRecoverableError(request$jscomp$2, error, {}),
fatalError(request$jscomp$2, error);
logRecoverableError(request$jscomp$1, error, {}),
fatalError(request$jscomp$1, error);
} finally {
(currentResumableState = prevResumableState),
(ReactSharedInternals.H = prevDispatcher),
@@ -5670,11 +5704,11 @@ function flushCompletedQueues(request, destination) {
completedBoundaries.splice(0, i);
var partialBoundaries = request.partialBoundaries;
for (i = 0; i < partialBoundaries.length; i++) {
var boundary$48 = partialBoundaries[i];
var boundary$49 = partialBoundaries[i];
a: {
clientRenderedBoundaries = request;
boundary = destination;
var completedSegments = boundary$48.completedSegments;
var completedSegments = boundary$49.completedSegments;
for (
JSCompiler_inline_result = 0;
JSCompiler_inline_result < completedSegments.length;
@@ -5684,7 +5718,7 @@ function flushCompletedQueues(request, destination) {
!flushPartiallyCompletedSegment(
clientRenderedBoundaries,
boundary,
boundary$48,
boundary$49,
completedSegments[JSCompiler_inline_result]
)
) {
@@ -5696,7 +5730,7 @@ function flushCompletedQueues(request, destination) {
completedSegments.splice(0, JSCompiler_inline_result);
JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
boundary,
boundary$48.contentState,
boundary$49.contentState,
clientRenderedBoundaries.renderState
);
}
@@ -5729,6 +5763,7 @@ function flushCompletedQueues(request, destination) {
((partialBoundaries = endChunkForTag("body")),
destination.push(partialBoundaries)),
i.hasHtml && ((i = endChunkForTag("html")), destination.push(i)),
(request.status = 3),
destination.push(null),
(request.destination = null));
}
@@ -5747,9 +5782,9 @@ function enqueueFlush(request) {
}
}
function startFlowing(request, destination) {
if (1 === request.status)
(request.status = 2), destination.destroy(request.fatalError);
else if (2 !== request.status && null === request.destination) {
if (2 === request.status)
(request.status = 3), destination.destroy(request.fatalError);
else if (3 !== request.status && null === request.destination) {
request.destination = destination;
try {
flushCompletedQueues(request, destination);
@@ -5759,11 +5794,19 @@ function startFlowing(request, destination) {
}
}
function abort(request, reason) {
0 === request.status && (request.status = 1);
try {
var abortableTasks = request.abortableTasks;
if (0 < abortableTasks.size) {
var error =
void 0 === reason ? Error(formatProdErrorMessage(432)) : reason;
void 0 === reason
? Error(formatProdErrorMessage(432))
: "object" === typeof reason &&
null !== reason &&
"function" === typeof reason.then
? Error(formatProdErrorMessage(530))
: reason;
request.fatalError = error;
abortableTasks.forEach(function (task) {
return abortTask(task, request, error);
});
@@ -5771,8 +5814,8 @@ function abort(request, reason) {
}
null !== request.destination &&
flushCompletedQueues(request, request.destination);
} catch (error$50) {
logRecoverableError(request, error$50, {}), fatalError(request, error$50);
} catch (error$51) {
logRecoverableError(request, error$51, {}), fatalError(request, error$51);
}
}
function onError() {}
@@ -5840,4 +5883,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 = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
@@ -2680,16 +2680,16 @@ function createRenderState(resumableState, generateStaticMarkup) {
"\x3c/script>"
);
bootstrapScriptContent = idPrefix + "P:";
var JSCompiler_object_inline_segmentPrefix_1626 = idPrefix + "S:";
var JSCompiler_object_inline_segmentPrefix_1614 = idPrefix + "S:";
idPrefix += "B:";
var JSCompiler_object_inline_preconnects_1640 = new Set(),
JSCompiler_object_inline_fontPreloads_1641 = new Set(),
JSCompiler_object_inline_highImagePreloads_1642 = new Set(),
JSCompiler_object_inline_styles_1643 = new Map(),
JSCompiler_object_inline_bootstrapScripts_1644 = new Set(),
JSCompiler_object_inline_scripts_1645 = new Set(),
JSCompiler_object_inline_bulkPreloads_1646 = new Set(),
JSCompiler_object_inline_preloads_1647 = {
var JSCompiler_object_inline_preconnects_1628 = new Set(),
JSCompiler_object_inline_fontPreloads_1629 = new Set(),
JSCompiler_object_inline_highImagePreloads_1630 = new Set(),
JSCompiler_object_inline_styles_1631 = new Map(),
JSCompiler_object_inline_bootstrapScripts_1632 = new Set(),
JSCompiler_object_inline_scripts_1633 = new Set(),
JSCompiler_object_inline_bulkPreloads_1634 = new Set(),
JSCompiler_object_inline_preloads_1635 = {
images: new Map(),
stylesheets: new Map(),
scripts: new Map(),
@@ -2726,7 +2726,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
scriptConfig.moduleScriptResources[href] = null;
scriptConfig = [];
pushLinkImpl(scriptConfig, props);
JSCompiler_object_inline_bootstrapScripts_1644.add(scriptConfig);
JSCompiler_object_inline_bootstrapScripts_1632.add(scriptConfig);
bootstrapChunks.push('<script src="', escapeTextForBrowser(src));
"string" === typeof integrity &&
bootstrapChunks.push('" integrity="', escapeTextForBrowser(integrity));
@@ -2767,7 +2767,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
(props.moduleScriptResources[scriptConfig] = null),
(props = []),
pushLinkImpl(props, integrity),
JSCompiler_object_inline_bootstrapScripts_1644.add(props),
JSCompiler_object_inline_bootstrapScripts_1632.add(props),
bootstrapChunks.push(
'<script type="module" src="',
escapeTextForBrowser(i)
@@ -2782,7 +2782,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
bootstrapChunks.push('" async="">\x3c/script>');
return {
placeholderPrefix: bootstrapScriptContent,
segmentPrefix: JSCompiler_object_inline_segmentPrefix_1626,
segmentPrefix: JSCompiler_object_inline_segmentPrefix_1614,
boundaryPrefix: idPrefix,
startInlineScript: "<script>",
htmlChunks: null,
@@ -2802,14 +2802,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
charsetChunks: [],
viewportChunks: [],
hoistableChunks: [],
preconnects: JSCompiler_object_inline_preconnects_1640,
fontPreloads: JSCompiler_object_inline_fontPreloads_1641,
highImagePreloads: JSCompiler_object_inline_highImagePreloads_1642,
styles: JSCompiler_object_inline_styles_1643,
bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1644,
scripts: JSCompiler_object_inline_scripts_1645,
bulkPreloads: JSCompiler_object_inline_bulkPreloads_1646,
preloads: JSCompiler_object_inline_preloads_1647,
preconnects: JSCompiler_object_inline_preconnects_1628,
fontPreloads: JSCompiler_object_inline_fontPreloads_1629,
highImagePreloads: JSCompiler_object_inline_highImagePreloads_1630,
styles: JSCompiler_object_inline_styles_1631,
bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1632,
scripts: JSCompiler_object_inline_scripts_1633,
bulkPreloads: JSCompiler_object_inline_bulkPreloads_1634,
preloads: JSCompiler_object_inline_preloads_1635,
stylesToHoist: !1,
generateStaticMarkup: generateStaticMarkup
};
@@ -3674,7 +3674,8 @@ function createRequest(
formState
);
}
var currentRequest = null;
var AbortSigil = {},
currentRequest = null;
function pingTask(request, task) {
request.pingedTasks.push(task);
1 === request.pingedTasks.length &&
@@ -3849,8 +3850,8 @@ function fatalError(request, error) {
onShellError(error);
onFatalError(error);
null !== request.destination
? ((request.status = 2), request.destination.destroy(error))
: ((request.status = 1), (request.fatalError = error));
? ((request.status = 3), request.destination.destroy(error))
: ((request.status = 2), (request.fatalError = error));
}
function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
var prevThenableState = task.thenableState;
@@ -3963,9 +3964,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
var defaultProps = type.defaultProps;
if (defaultProps && disableDefaultPropsExceptForClasses) {
newProps === props && (newProps = assign({}, newProps, props));
for (var propName$32 in defaultProps)
void 0 === newProps[propName$32] &&
(newProps[propName$32] = defaultProps[propName$32]);
for (var propName$33 in defaultProps)
void 0 === newProps[propName$33] &&
(newProps[propName$33] = defaultProps[propName$33]);
}
props = newProps;
newProps = emptyContextObject;
@@ -3974,25 +3975,25 @@ function renderElement(request, task, keyPath, type, props, ref) {
null !== defaultProps &&
(newProps = defaultProps._currentValue2);
newProps = new type(props, newProps);
ref = void 0 !== newProps.state ? newProps.state : null;
var initialState = void 0 !== newProps.state ? newProps.state : null;
newProps.updater = classComponentUpdater;
newProps.props = props;
newProps.state = ref;
newProps.state = initialState;
defaultProps = { queue: [], replace: !1 };
newProps._reactInternals = defaultProps;
propName$32 = type.contextType;
ref = type.contextType;
newProps.context =
"object" === typeof propName$32 && null !== propName$32
? propName$32._currentValue2
"object" === typeof ref && null !== ref
? ref._currentValue2
: emptyContextObject;
propName$32 = type.getDerivedStateFromProps;
"function" === typeof propName$32 &&
((propName$32 = propName$32(props, ref)),
(ref =
null === propName$32 || void 0 === propName$32
? ref
: assign({}, ref, propName$32)),
(newProps.state = ref));
ref = type.getDerivedStateFromProps;
"function" === typeof ref &&
((ref = ref(props, initialState)),
(initialState =
null === ref || void 0 === ref
? initialState
: assign({}, initialState, ref)),
(newProps.state = initialState));
if (
"function" !== typeof type.getDerivedStateFromProps &&
"function" !== typeof newProps.getSnapshotBeforeUpdate &&
@@ -4015,61 +4016,60 @@ function renderElement(request, task, keyPath, type, props, ref) {
)
if (
((type = defaultProps.queue),
(propName$32 = defaultProps.replace),
(ref = defaultProps.replace),
(defaultProps.queue = null),
(defaultProps.replace = !1),
propName$32 && 1 === type.length)
ref && 1 === type.length)
)
newProps.state = type[0];
else {
defaultProps = propName$32 ? type[0] : newProps.state;
ref = !0;
for (
propName$32 = propName$32 ? 1 : 0;
propName$32 < type.length;
propName$32++
)
(propName = type[propName$32]),
(propName =
"function" === typeof propName
? propName.call(newProps, defaultProps, props, void 0)
: propName),
null != propName &&
(ref
? ((ref = !1),
(defaultProps = assign({}, defaultProps, propName)))
: assign(defaultProps, propName));
defaultProps = ref ? type[0] : newProps.state;
initialState = !0;
for (ref = ref ? 1 : 0; ref < type.length; ref++)
(propName$33 = type[ref]),
(propName$33 =
"function" === typeof propName$33
? propName$33.call(newProps, defaultProps, props, void 0)
: propName$33),
null != propName$33 &&
(initialState
? ((initialState = !1),
(defaultProps = assign({}, defaultProps, propName$33)))
: assign(defaultProps, propName$33));
newProps.state = defaultProps;
}
else defaultProps.queue = null;
type = newProps.render();
if (1 === request.status) throw AbortSigil;
props = task.keyPath;
task.keyPath = keyPath;
renderNodeDestructive(request, task, type, -1);
task.keyPath = props;
} else
(type = renderWithHooks(request, task, keyPath, type, props, void 0)),
finishFunctionComponent(
request,
task,
keyPath,
type,
0 !== localIdCounter,
actionStateCounter,
actionStateMatchingIndex
);
} else {
type = renderWithHooks(request, task, keyPath, type, props, void 0);
if (1 === request.status) throw AbortSigil;
finishFunctionComponent(
request,
task,
keyPath,
type,
0 !== localIdCounter,
actionStateCounter,
actionStateMatchingIndex
);
}
else if ("string" === typeof type)
if (((newProps = task.blockedSegment), null === newProps))
(newProps = props.children),
(defaultProps = task.formatContext),
(ref = task.keyPath),
(initialState = task.keyPath),
(task.formatContext = getChildFormatContext(defaultProps, type, props)),
(task.keyPath = keyPath),
renderNode(request, task, newProps, -1),
(task.formatContext = defaultProps),
(task.keyPath = ref);
(task.keyPath = initialState);
else {
ref = pushStartInstance(
initialState = pushStartInstance(
newProps.chunks,
type,
props,
@@ -4082,12 +4082,12 @@ function renderElement(request, task, keyPath, type, props, ref) {
);
newProps.lastPushedText = !1;
defaultProps = task.formatContext;
propName$32 = task.keyPath;
ref = task.keyPath;
task.formatContext = getChildFormatContext(defaultProps, type, props);
task.keyPath = keyPath;
renderNode(request, task, ref, -1);
renderNode(request, task, initialState, -1);
task.formatContext = defaultProps;
task.keyPath = propName$32;
task.keyPath = ref;
a: {
task = newProps.chunks;
request = request.resumableState;
@@ -4173,7 +4173,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
var parentBoundary = task.blockedBoundary,
parentHoistableState = task.hoistableState;
ref = task.blockedSegment;
propName$32 = props.fallback;
propName$33 = props.fallback;
props = props.children;
var fallbackAbortSet = new Set();
propName = createSuspenseBoundary(request, fallbackAbortSet);
@@ -4205,8 +4205,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
propName.trackedFallbackNode = defaultProps;
task.blockedSegment = boundarySegment;
task.keyPath = newProps;
boundarySegment.status = 6;
try {
renderNode(request, task, propName$32, -1),
renderNode(request, task, propName$33, -1),
pushSegmentFinale(
boundarySegment.chunks,
request.renderState,
@@ -4214,6 +4215,11 @@ function renderElement(request, task, keyPath, type, props, ref) {
boundarySegment.textEmbedded
),
(boundarySegment.status = 1);
} catch (thrownValue) {
throw (
((boundarySegment.status = thrownValue === AbortSigil ? 3 : 4),
thrownValue)
);
} finally {
(task.blockedSegment = ref), (task.keyPath = type);
}
@@ -4240,6 +4246,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
task.hoistableState = propName.contentState;
task.blockedSegment = contentRootSegment;
task.keyPath = keyPath;
contentRootSegment.status = 6;
try {
if (
(renderNode(request, task, props, -1),
@@ -4256,12 +4263,20 @@ function renderElement(request, task, keyPath, type, props, ref) {
propName.status = 1;
break a;
}
} catch (error) {
(contentRootSegment.status = 4),
(propName.status = 4),
(newProps = getThrownInfo(task.componentStack)),
(defaultProps = logRecoverableError(request, error, newProps)),
(propName.errorDigest = defaultProps),
} catch (thrownValue$28) {
(propName.status = 4),
thrownValue$28 === AbortSigil
? ((contentRootSegment.status = 3),
(newProps = request.fatalError))
: ((contentRootSegment.status = 4),
(newProps = thrownValue$28)),
(defaultProps = getThrownInfo(task.componentStack)),
(initialState = logRecoverableError(
request,
newProps,
defaultProps
)),
(propName.errorDigest = initialState),
untrackBoundary(request, propName);
} finally {
(task.blockedBoundary = parentBoundary),
@@ -4272,7 +4287,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
task = createRenderTask(
request,
null,
propName$32,
propName$33,
-1,
parentBoundary,
boundarySegment,
@@ -4340,6 +4355,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
case REACT_LAZY_TYPE:
newProps = type._init;
type = newProps(type._payload);
if (1 === request.status) throw AbortSigil;
props = resolveDefaultPropsOnNonClassComponent(type, props);
renderElement(request, task, keyPath, type, props, ref);
return;
@@ -4565,6 +4581,7 @@ function retryNode(request, task) {
case REACT_LAZY_TYPE:
childNodes = node._init;
node = childNodes(node._payload);
if (1 === request.status) throw AbortSigil;
renderNodeDestructive(request, task, node, childIndex);
return;
}
@@ -4768,15 +4785,15 @@ function renderNode(request, task, node, childIndex) {
chunkLength = segment.chunks.length;
try {
return renderNodeDestructive(request, task, node, childIndex);
} catch (thrownValue$44) {
} catch (thrownValue$45) {
if (
(resetHooksState(),
(segment.children.length = childrenLength),
(segment.chunks.length = chunkLength),
(node =
thrownValue$44 === SuspenseException
thrownValue$45 === SuspenseException
? getSuspendedThenable()
: thrownValue$44),
: thrownValue$45),
"object" === typeof node &&
null !== node &&
"function" === typeof node.then)
@@ -4827,6 +4844,20 @@ function renderNode(request, task, node, childIndex) {
switchContext(previousContext);
throw node;
}
function erroredTask(request, boundary, error, errorInfo) {
errorInfo = logRecoverableError(request, error, errorInfo);
null === boundary
? fatalError(request, error)
: (boundary.pendingTasks--,
4 !== boundary.status &&
((boundary.status = 4),
(boundary.errorDigest = errorInfo),
untrackBoundary(request, boundary),
boundary.parentFlushed &&
request.clientRenderedBoundaries.push(boundary)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function abortTaskSoft(task) {
var boundary = task.blockedBoundary;
task = task.blockedSegment;
@@ -4878,9 +4909,12 @@ function abortRemainingReplayNodes(
function abortTask(task, request, error) {
var boundary = task.blockedBoundary,
segment = task.blockedSegment;
null !== segment && (segment.status = 3);
if (null !== segment) {
if (6 === segment.status) return;
segment.status = 3;
}
if (null === boundary) {
if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
if (((boundary = {}), 2 !== request.status && 3 !== request.status)) {
task = task.replay;
if (null === task) {
logRecoverableError(request, error, boundary);
@@ -5043,38 +5077,37 @@ function finishedTask(request, boundary, segment) {
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function performWork(request$jscomp$2) {
if (2 !== request$jscomp$2.status && 1 !== request$jscomp$2.status) {
function performWork(request$jscomp$1) {
if (3 !== request$jscomp$1.status && 2 !== request$jscomp$1.status) {
var prevContext = currentActiveSnapshot,
prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = HooksDispatcher;
var prevAsyncDispatcher = ReactSharedInternals.A;
ReactSharedInternals.A = DefaultAsyncDispatcher;
var prevRequest = currentRequest;
currentRequest = request$jscomp$2;
currentRequest = request$jscomp$1;
var prevResumableState = currentResumableState;
currentResumableState = request$jscomp$2.resumableState;
currentResumableState = request$jscomp$1.resumableState;
try {
var pingedTasks = request$jscomp$2.pingedTasks,
var pingedTasks = request$jscomp$1.pingedTasks,
i;
for (i = 0; i < pingedTasks.length; i++) {
var task = pingedTasks[i],
request = request$jscomp$2,
request = request$jscomp$1,
segment = task.blockedSegment;
if (null === segment) {
var request$jscomp$0 = request;
if (0 !== task.replay.pendingTasks) {
switchContext(task.context);
try {
"number" === typeof task.replay.slots
? resumeNode(
request$jscomp$0,
request,
task,
task.replay.slots,
task.node,
task.childIndex
)
: retryNode(request$jscomp$0, task);
: retryNode(request, task);
if (
1 === task.replay.pendingTasks &&
0 < task.replay.nodes.length
@@ -5082,7 +5115,7 @@ function performWork(request$jscomp$2) {
throw Error(formatProdErrorMessage(488));
task.replay.pendingTasks--;
task.abortSet.delete(task);
finishedTask(request$jscomp$0, task.blockedBoundary, null);
finishedTask(request, task.blockedBoundary, null);
} catch (thrownValue) {
resetHooksState();
var x =
@@ -5100,59 +5133,54 @@ function performWork(request$jscomp$2) {
} else {
task.replay.pendingTasks--;
task.abortSet.delete(task);
var errorInfo = getThrownInfo(task.componentStack);
request = void 0;
var request$jscomp$1 = request$jscomp$0,
var errorInfo = getThrownInfo(task.componentStack),
errorDigest = void 0,
request$jscomp$0 = request,
boundary = task.blockedBoundary,
error$jscomp$0 = x,
error$jscomp$0 = x === AbortSigil ? request.fatalError : x,
replayNodes = task.replay.nodes,
resumeSlots = task.replay.slots;
request = logRecoverableError(
request$jscomp$1,
errorDigest = logRecoverableError(
request$jscomp$0,
error$jscomp$0,
errorInfo
);
abortRemainingReplayNodes(
request$jscomp$1,
request$jscomp$0,
boundary,
replayNodes,
resumeSlots,
error$jscomp$0,
request
errorDigest
);
request$jscomp$0.pendingRootTasks--;
0 === request$jscomp$0.pendingRootTasks &&
completeShell(request$jscomp$0);
request$jscomp$0.allPendingTasks--;
0 === request$jscomp$0.allPendingTasks &&
completeAll(request$jscomp$0);
request.pendingRootTasks--;
0 === request.pendingRootTasks && completeShell(request);
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
} finally {
}
}
} else if (
((request$jscomp$0 = void 0),
(request$jscomp$1 = segment),
0 === request$jscomp$1.status)
) {
} else if (((errorDigest = segment), 0 === errorDigest.status)) {
errorDigest.status = 6;
switchContext(task.context);
var childrenLength = request$jscomp$1.children.length,
chunkLength = request$jscomp$1.chunks.length;
var childrenLength = errorDigest.children.length,
chunkLength = errorDigest.chunks.length;
try {
retryNode(request, task),
pushSegmentFinale(
request$jscomp$1.chunks,
errorDigest.chunks,
request.renderState,
request$jscomp$1.lastPushedText,
request$jscomp$1.textEmbedded
errorDigest.lastPushedText,
errorDigest.textEmbedded
),
task.abortSet.delete(task),
(request$jscomp$1.status = 1),
finishedTask(request, task.blockedBoundary, request$jscomp$1);
(errorDigest.status = 1),
finishedTask(request, task.blockedBoundary, errorDigest);
} catch (thrownValue) {
resetHooksState();
request$jscomp$1.children.length = childrenLength;
request$jscomp$1.chunks.length = chunkLength;
errorDigest.children.length = childrenLength;
errorDigest.chunks.length = chunkLength;
var x$jscomp$0 =
thrownValue === SuspenseException
? getSuspendedThenable()
@@ -5162,43 +5190,39 @@ function performWork(request$jscomp$2) {
null !== x$jscomp$0 &&
"function" === typeof x$jscomp$0.then
) {
errorDigest.status = 0;
task.thenableState = getThenableStateAfterSuspending();
var ping$jscomp$0 = task.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
task.thenableState = getThenableStateAfterSuspending();
} else {
var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
task.abortSet.delete(task);
request$jscomp$1.status = 4;
var boundary$jscomp$0 = task.blockedBoundary;
request$jscomp$0 = logRecoverableError(
request,
x$jscomp$0,
errorInfo$jscomp$0
);
null === boundary$jscomp$0
? fatalError(request, x$jscomp$0)
: (boundary$jscomp$0.pendingTasks--,
4 !== boundary$jscomp$0.status &&
((boundary$jscomp$0.status = 4),
(boundary$jscomp$0.errorDigest = request$jscomp$0),
untrackBoundary(request, boundary$jscomp$0),
boundary$jscomp$0.parentFlushed &&
request.clientRenderedBoundaries.push(
boundary$jscomp$0
)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
x$jscomp$0 === AbortSigil
? ((errorDigest.status = 3),
erroredTask(
request,
task.blockedBoundary,
request.fatalError,
errorInfo$jscomp$0
))
: ((errorDigest.status = 4),
erroredTask(
request,
task.blockedBoundary,
x$jscomp$0,
errorInfo$jscomp$0
));
}
} finally {
}
}
}
pingedTasks.splice(0, i);
null !== request$jscomp$2.destination &&
flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
null !== request$jscomp$1.destination &&
flushCompletedQueues(request$jscomp$1, request$jscomp$1.destination);
} catch (error) {
logRecoverableError(request$jscomp$2, error, {}),
fatalError(request$jscomp$2, error);
logRecoverableError(request$jscomp$1, error, {}),
fatalError(request$jscomp$1, error);
} finally {
(currentResumableState = prevResumableState),
(ReactSharedInternals.H = prevDispatcher),
@@ -5593,11 +5617,11 @@ function flushCompletedQueues(request, destination) {
completedBoundaries.splice(0, i);
var partialBoundaries = request.partialBoundaries;
for (i = 0; i < partialBoundaries.length; i++) {
var boundary$48 = partialBoundaries[i];
var boundary$49 = partialBoundaries[i];
a: {
clientRenderedBoundaries = request;
boundary = destination;
var completedSegments = boundary$48.completedSegments;
var completedSegments = boundary$49.completedSegments;
for (
JSCompiler_inline_result = 0;
JSCompiler_inline_result < completedSegments.length;
@@ -5607,7 +5631,7 @@ function flushCompletedQueues(request, destination) {
!flushPartiallyCompletedSegment(
clientRenderedBoundaries,
boundary,
boundary$48,
boundary$49,
completedSegments[JSCompiler_inline_result]
)
) {
@@ -5619,7 +5643,7 @@ function flushCompletedQueues(request, destination) {
completedSegments.splice(0, JSCompiler_inline_result);
JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
boundary,
boundary$48.contentState,
boundary$49.contentState,
clientRenderedBoundaries.renderState
);
}
@@ -5652,6 +5676,7 @@ function flushCompletedQueues(request, destination) {
((partialBoundaries = endChunkForTag("body")),
destination.push(partialBoundaries)),
i.hasHtml && ((i = endChunkForTag("html")), destination.push(i)),
(request.status = 3),
destination.push(null),
(request.destination = null));
}
@@ -5670,9 +5695,9 @@ function enqueueFlush(request) {
}
}
function startFlowing(request, destination) {
if (1 === request.status)
(request.status = 2), destination.destroy(request.fatalError);
else if (2 !== request.status && null === request.destination) {
if (2 === request.status)
(request.status = 3), destination.destroy(request.fatalError);
else if (3 !== request.status && null === request.destination) {
request.destination = destination;
try {
flushCompletedQueues(request, destination);
@@ -5682,11 +5707,19 @@ function startFlowing(request, destination) {
}
}
function abort(request, reason) {
0 === request.status && (request.status = 1);
try {
var abortableTasks = request.abortableTasks;
if (0 < abortableTasks.size) {
var error =
void 0 === reason ? Error(formatProdErrorMessage(432)) : reason;
void 0 === reason
? Error(formatProdErrorMessage(432))
: "object" === typeof reason &&
null !== reason &&
"function" === typeof reason.then
? Error(formatProdErrorMessage(530))
: reason;
request.fatalError = error;
abortableTasks.forEach(function (task) {
return abortTask(task, request, error);
});
@@ -5694,8 +5727,8 @@ function abort(request, reason) {
}
null !== request.destination &&
flushCompletedQueues(request, request.destination);
} catch (error$50) {
logRecoverableError(request, error$50, {}), fatalError(request, error$50);
} catch (error$51) {
logRecoverableError(request, error$51, {}), fatalError(request, error$51);
}
}
function onError() {}
@@ -5763,4 +5796,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 = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
@@ -4416,12 +4416,12 @@ __DEV__ &&
onShellError(error);
onFatalError(error);
null !== request.destination
? ((request.status = 2),
? ((request.status = 3),
(request = request.destination),
(request.done = !0),
(request.fatal = !0),
(request.error = error))
: ((request.status = 1), (request.fatalError = error));
: ((request.status = 2), (request.fatalError = error));
}
function renderWithHooks(
request,
@@ -4583,13 +4583,15 @@ __DEV__ &&
props = newProps;
newProps = emptyContextObject;
defaultProps = type.contextType;
"contextType" in type &&
if (
"contextType" in type &&
null !== defaultProps &&
(void 0 === defaultProps ||
defaultProps.$$typeof !== REACT_CONTEXT_TYPE) &&
!didWarnAboutInvalidateContextType.has(type) &&
(didWarnAboutInvalidateContextType.add(type),
(ref =
!didWarnAboutInvalidateContextType.has(type)
) {
didWarnAboutInvalidateContextType.add(type);
var addendum =
void 0 === defaultProps
? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file."
: "object" !== typeof defaultProps
@@ -4598,12 +4600,13 @@ __DEV__ &&
? " Did you accidentally pass the Context.Consumer instead?"
: " However, it is set to an object with keys {" +
Object.keys(defaultProps).join(", ") +
"}."),
"}.";
error$jscomp$2(
"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
getComponentNameFromType(type) || "Component",
ref
));
addendum
);
}
"object" === typeof defaultProps &&
null !== defaultProps &&
(newProps = defaultProps._currentValue);
@@ -4624,7 +4627,7 @@ __DEV__ &&
"function" === typeof newProps.getSnapshotBeforeUpdate
)
if (
((_propName = ref = defaultProps = null),
((ref = addendum = defaultProps = null),
"function" === typeof newProps.componentWillMount &&
!0 !== newProps.componentWillMount.__suppressDeprecationWarning
? (defaultProps = "componentWillMount")
@@ -4633,33 +4636,32 @@ __DEV__ &&
"function" === typeof newProps.componentWillReceiveProps &&
!0 !==
newProps.componentWillReceiveProps.__suppressDeprecationWarning
? (ref = "componentWillReceiveProps")
? (addendum = "componentWillReceiveProps")
: "function" ===
typeof newProps.UNSAFE_componentWillReceiveProps &&
(ref = "UNSAFE_componentWillReceiveProps"),
(addendum = "UNSAFE_componentWillReceiveProps"),
"function" === typeof newProps.componentWillUpdate &&
!0 !== newProps.componentWillUpdate.__suppressDeprecationWarning
? (_propName = "componentWillUpdate")
? (ref = "componentWillUpdate")
: "function" === typeof newProps.UNSAFE_componentWillUpdate &&
(_propName = "UNSAFE_componentWillUpdate"),
null !== defaultProps || null !== ref || null !== _propName)
) {
propName = getComponentNameFromType(type) || "Component";
var newApiName =
"function" === typeof type.getDerivedStateFromProps
? "getDerivedStateFromProps()"
: "getSnapshotBeforeUpdate()";
didWarnAboutLegacyLifecyclesAndDerivedState.has(propName) ||
(didWarnAboutLegacyLifecyclesAndDerivedState.add(propName),
error$jscomp$2(
"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
propName,
newApiName,
null !== defaultProps ? "\n " + defaultProps : "",
null !== ref ? "\n " + ref : "",
null !== _propName ? "\n " + _propName : ""
));
}
(ref = "UNSAFE_componentWillUpdate"),
null !== defaultProps || null !== addendum || null !== ref)
)
(_propName = getComponentNameFromType(type) || "Component"),
(propName =
"function" === typeof type.getDerivedStateFromProps
? "getDerivedStateFromProps()"
: "getSnapshotBeforeUpdate()"),
didWarnAboutLegacyLifecyclesAndDerivedState.has(_propName) ||
(didWarnAboutLegacyLifecyclesAndDerivedState.add(_propName),
error$jscomp$2(
"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
_propName,
propName,
null !== defaultProps ? "\n " + defaultProps : "",
null !== addendum ? "\n " + addendum : "",
null !== ref ? "\n " + ref : ""
));
defaultProps = getComponentNameFromType(type) || "Component";
newProps.render ||
(type.prototype && "function" === typeof type.prototype.render
@@ -4735,9 +4737,9 @@ __DEV__ &&
"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
defaultProps
);
ref = newProps.props !== props;
addendum = newProps.props !== props;
void 0 !== newProps.props &&
ref &&
addendum &&
error$jscomp$2(
"When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
defaultProps
@@ -4771,8 +4773,8 @@ __DEV__ &&
"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
defaultProps
);
(ref = newProps.state) &&
("object" !== typeof ref || isArrayImpl(ref)) &&
(addendum = newProps.state) &&
("object" !== typeof addendum || isArrayImpl(addendum)) &&
error$jscomp$2(
"%s.state: must be set to an object or null",
defaultProps
@@ -4783,41 +4785,41 @@ __DEV__ &&
"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
defaultProps
);
ref = void 0 !== newProps.state ? newProps.state : null;
addendum = void 0 !== newProps.state ? newProps.state : null;
newProps.updater = classComponentUpdater;
newProps.props = props;
newProps.state = ref;
newProps.state = addendum;
defaultProps = { queue: [], replace: !1 };
newProps._reactInternals = defaultProps;
_propName = type.contextType;
ref = type.contextType;
newProps.context =
"object" === typeof _propName && null !== _propName
? _propName._currentValue
"object" === typeof ref && null !== ref
? ref._currentValue
: emptyContextObject;
newProps.state === props &&
((_propName = getComponentNameFromType(type) || "Component"),
didWarnAboutDirectlyAssigningPropsToState.has(_propName) ||
(didWarnAboutDirectlyAssigningPropsToState.add(_propName),
((ref = getComponentNameFromType(type) || "Component"),
didWarnAboutDirectlyAssigningPropsToState.has(ref) ||
(didWarnAboutDirectlyAssigningPropsToState.add(ref),
error$jscomp$2(
"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",
_propName
ref
)));
_propName = type.getDerivedStateFromProps;
"function" === typeof _propName &&
((_propName = _propName(props, ref)),
void 0 === _propName &&
((propName = getComponentNameFromType(type) || "Component"),
didWarnAboutUndefinedDerivedState.has(propName) ||
(didWarnAboutUndefinedDerivedState.add(propName),
ref = type.getDerivedStateFromProps;
"function" === typeof ref &&
((ref = ref(props, addendum)),
void 0 === ref &&
((_propName = getComponentNameFromType(type) || "Component"),
didWarnAboutUndefinedDerivedState.has(_propName) ||
(didWarnAboutUndefinedDerivedState.add(_propName),
error$jscomp$2(
"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
propName
_propName
))),
(ref =
null === _propName || void 0 === _propName
? ref
: assign({}, ref, _propName)),
(newProps.state = ref));
(addendum =
null === ref || void 0 === ref
? addendum
: assign({}, addendum, ref)),
(newProps.state = addendum));
if (
"function" !== typeof type.getDerivedStateFromProps &&
"function" !== typeof newProps.getSnapshotBeforeUpdate &&
@@ -4825,21 +4827,21 @@ __DEV__ &&
"function" === typeof newProps.componentWillMount)
)
if (
((ref = newProps.state),
((addendum = newProps.state),
"function" === typeof newProps.componentWillMount &&
(!0 !==
newProps.componentWillMount.__suppressDeprecationWarning &&
((_propName = getComponentNameFromType(type) || "Unknown"),
didWarnAboutDeprecatedWillMount[_propName] ||
((ref = getComponentNameFromType(type) || "Unknown"),
didWarnAboutDeprecatedWillMount[ref] ||
(warn(
"componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\n\nPlease update the following components: %s",
_propName
ref
),
(didWarnAboutDeprecatedWillMount[_propName] = !0))),
(didWarnAboutDeprecatedWillMount[ref] = !0))),
newProps.componentWillMount()),
"function" === typeof newProps.UNSAFE_componentWillMount &&
newProps.UNSAFE_componentWillMount(),
ref !== newProps.state &&
addendum !== newProps.state &&
(error$jscomp$2(
"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
getComponentNameFromType(type) || "Component"
@@ -4852,35 +4854,36 @@ __DEV__ &&
null !== defaultProps.queue && 0 < defaultProps.queue.length)
)
if (
((ref = defaultProps.queue),
(propName = defaultProps.replace),
((addendum = defaultProps.queue),
(_propName = defaultProps.replace),
(defaultProps.queue = null),
(defaultProps.replace = !1),
propName && 1 === ref.length)
_propName && 1 === addendum.length)
)
newProps.state = ref[0];
newProps.state = addendum[0];
else {
defaultProps = propName ? ref[0] : newProps.state;
_propName = !0;
defaultProps = _propName ? addendum[0] : newProps.state;
ref = !0;
for (
propName = propName ? 1 : 0;
propName < ref.length;
propName++
_propName = _propName ? 1 : 0;
_propName < addendum.length;
_propName++
)
(newApiName = ref[propName]),
(newApiName =
"function" === typeof newApiName
? newApiName.call(newProps, defaultProps, props, void 0)
: newApiName),
null != newApiName &&
(_propName
? ((_propName = !1),
(defaultProps = assign({}, defaultProps, newApiName)))
: assign(defaultProps, newApiName));
(propName = addendum[_propName]),
(propName =
"function" === typeof propName
? propName.call(newProps, defaultProps, props, void 0)
: propName),
null != propName &&
(ref
? ((ref = !1),
(defaultProps = assign({}, defaultProps, propName)))
: assign(defaultProps, propName));
newProps.state = defaultProps;
}
else defaultProps.queue = null;
defaultProps = callRenderInDEV(newProps);
if (1 === request.status) throw AbortSigil;
newProps.props !== props &&
(didWarnAboutReassigningProps ||
error$jscomp$2(
@@ -4892,7 +4895,7 @@ __DEV__ &&
task.keyPath = keyPath;
renderNodeDestructive(request, task, defaultProps, -1);
task.keyPath = type;
} else
} else {
type.prototype &&
"function" === typeof type.prototype.render &&
((newProps = getComponentNameFromType(type) || "Unknown"),
@@ -4902,73 +4905,67 @@ __DEV__ &&
newProps,
newProps
),
(didWarnAboutBadClass[newProps] = !0))),
(props = renderWithHooks(
request,
task,
keyPath,
type,
props,
void 0
)),
(newProps = 0 !== localIdCounter),
(defaultProps = actionStateCounter),
(ref = actionStateMatchingIndex),
type.contextTypes &&
((_propName = getComponentNameFromType(type) || "Unknown"),
didWarnAboutContextTypes[_propName] ||
((didWarnAboutContextTypes[_propName] = !0),
error$jscomp$2(
"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
_propName
))),
type &&
type.childContextTypes &&
(didWarnAboutBadClass[newProps] = !0)));
props = renderWithHooks(request, task, keyPath, type, props, void 0);
if (1 === request.status) throw AbortSigil;
newProps = 0 !== localIdCounter;
defaultProps = actionStateCounter;
addendum = actionStateMatchingIndex;
type.contextTypes &&
((ref = getComponentNameFromType(type) || "Unknown"),
didWarnAboutContextTypes[ref] ||
((didWarnAboutContextTypes[ref] = !0),
error$jscomp$2(
"childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
type.displayName || type.name || "Component"
),
disableDefaultPropsExceptForClasses ||
void 0 === type.defaultProps ||
((_propName = getComponentNameFromType(type) || "Unknown"),
didWarnAboutDefaultPropsOnFunctionComponent[_propName] ||
(error$jscomp$2(
"%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",
_propName
),
(didWarnAboutDefaultPropsOnFunctionComponent[_propName] = !0))),
"function" === typeof type.getDerivedStateFromProps &&
((_propName = getComponentNameFromType(type) || "Unknown"),
didWarnAboutGetDerivedStateOnFunctionComponent[_propName] ||
(error$jscomp$2(
"%s: Function components do not support getDerivedStateFromProps.",
_propName
),
(didWarnAboutGetDerivedStateOnFunctionComponent[_propName] =
!0))),
"object" === typeof type.contextType &&
null !== type.contextType &&
((type = getComponentNameFromType(type) || "Unknown"),
didWarnAboutContextTypeOnFunctionComponent[type] ||
(error$jscomp$2(
"%s: Function components do not support contextType.",
type
),
(didWarnAboutContextTypeOnFunctionComponent[type] = !0))),
finishFunctionComponent(
request,
task,
keyPath,
props,
newProps,
defaultProps,
ref
"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
ref
)));
type &&
type.childContextTypes &&
error$jscomp$2(
"childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
type.displayName || type.name || "Component"
);
disableDefaultPropsExceptForClasses ||
void 0 === type.defaultProps ||
((ref = getComponentNameFromType(type) || "Unknown"),
didWarnAboutDefaultPropsOnFunctionComponent[ref] ||
(error$jscomp$2(
"%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",
ref
),
(didWarnAboutDefaultPropsOnFunctionComponent[ref] = !0)));
"function" === typeof type.getDerivedStateFromProps &&
((ref = getComponentNameFromType(type) || "Unknown"),
didWarnAboutGetDerivedStateOnFunctionComponent[ref] ||
(error$jscomp$2(
"%s: Function components do not support getDerivedStateFromProps.",
ref
),
(didWarnAboutGetDerivedStateOnFunctionComponent[ref] = !0)));
"object" === typeof type.contextType &&
null !== type.contextType &&
((type = getComponentNameFromType(type) || "Unknown"),
didWarnAboutContextTypeOnFunctionComponent[type] ||
(error$jscomp$2(
"%s: Function components do not support contextType.",
type
),
(didWarnAboutContextTypeOnFunctionComponent[type] = !0)));
finishFunctionComponent(
request,
task,
keyPath,
props,
newProps,
defaultProps,
addendum
);
}
else if ("string" === typeof type)
if (((newProps = task.blockedSegment), null === newProps))
(newProps = props.children),
(defaultProps = task.formatContext),
(ref = task.keyPath),
(addendum = task.keyPath),
(task.formatContext = getChildFormatContext(
defaultProps,
type,
@@ -4977,9 +4974,9 @@ __DEV__ &&
(task.keyPath = keyPath),
renderNode(request, task, newProps, -1),
(task.formatContext = defaultProps),
(task.keyPath = ref);
(task.keyPath = addendum);
else {
ref = pushStartInstance(
addendum = pushStartInstance(
newProps.chunks,
type,
props,
@@ -4992,12 +4989,12 @@ __DEV__ &&
);
newProps.lastPushedText = !1;
defaultProps = task.formatContext;
_propName = task.keyPath;
ref = task.keyPath;
task.formatContext = getChildFormatContext(defaultProps, type, props);
task.keyPath = keyPath;
renderNode(request, task, ref, -1);
renderNode(request, task, addendum, -1);
task.formatContext = defaultProps;
task.keyPath = _propName;
task.keyPath = ref;
a: {
task = newProps.chunks;
request = request.resumableState;
@@ -5089,7 +5086,7 @@ __DEV__ &&
propName = createSuspenseBoundary(request, fallbackAbortSet);
null !== request.trackedPostpones &&
(propName.trackedContentKeyPath = keyPath);
newApiName = createPendingSegment(
var boundarySegment = createPendingSegment(
request,
ref.chunks.length,
propName,
@@ -5097,7 +5094,7 @@ __DEV__ &&
!1,
!1
);
ref.children.push(newApiName);
ref.children.push(boundarySegment);
ref.lastPushedText = !1;
var contentRootSegment = createPendingSegment(
request,
@@ -5113,14 +5110,21 @@ __DEV__ &&
defaultProps = [newProps[1], newProps[2], [], null];
request.trackedPostpones.workingMap.set(newProps, defaultProps);
propName.trackedFallbackNode = defaultProps;
task.blockedSegment = newApiName;
task.blockedSegment = boundarySegment;
task.keyPath = newProps;
boundarySegment.status = 6;
try {
renderNode(request, task, _propName, -1),
newApiName.lastPushedText &&
newApiName.textEmbedded &&
newApiName.chunks.push("\x3c!-- --\x3e"),
(newApiName.status = 1);
boundarySegment.lastPushedText &&
boundarySegment.textEmbedded &&
boundarySegment.chunks.push("\x3c!-- --\x3e"),
(boundarySegment.status = 1);
} catch (thrownValue) {
throw (
((boundarySegment.status =
thrownValue === AbortSigil ? 3 : 4),
thrownValue)
);
} finally {
(task.blockedSegment = ref), (task.keyPath = type);
}
@@ -5147,6 +5151,7 @@ __DEV__ &&
task.hoistableState = propName.contentState;
task.blockedSegment = contentRootSegment;
task.keyPath = keyPath;
contentRootSegment.status = 6;
try {
if (
(renderNode(request, task, props, -1),
@@ -5160,20 +5165,24 @@ __DEV__ &&
propName.status = 1;
break a;
}
} catch (error$2) {
(contentRootSegment.status = 4),
(propName.status = 4),
(newProps = getThrownInfo(task.componentStack)),
(defaultProps = logRecoverableError(
} catch (thrownValue$2) {
(propName.status = 4),
thrownValue$2 === AbortSigil
? ((contentRootSegment.status = 3),
(newProps = request.fatalError))
: ((contentRootSegment.status = 4),
(newProps = thrownValue$2)),
(defaultProps = getThrownInfo(task.componentStack)),
(addendum = logRecoverableError(
request,
error$2,
newProps
newProps,
defaultProps
)),
encodeErrorForBoundary(
propName,
defaultProps,
error$2,
addendum,
newProps,
defaultProps,
!1
),
untrackBoundary(request, propName);
@@ -5189,7 +5198,7 @@ __DEV__ &&
_propName,
-1,
parentBoundary,
newApiName,
boundarySegment,
propName.fallbackState,
fallbackAbortSet,
[keyPath[0], "Suspense Fallback", keyPath[2]],
@@ -5209,9 +5218,9 @@ __DEV__ &&
switch (type.$$typeof) {
case REACT_FORWARD_REF_TYPE:
if ("ref" in props)
for (newApiName in ((newProps = {}), props))
"ref" !== newApiName &&
(newProps[newApiName] = props[newApiName]);
for (boundarySegment in ((newProps = {}), props))
"ref" !== boundarySegment &&
(newProps[boundarySegment] = props[boundarySegment]);
else newProps = props;
type = renderWithHooks(
request,
@@ -5266,6 +5275,7 @@ __DEV__ &&
}
case REACT_LAZY_TYPE:
type = callLazyInitInDEV(type);
if (1 === request.status) throw AbortSigil;
props = resolveDefaultPropsOnNonClassComponent(type, props);
renderElement(request, task, keyPath, type, props, ref);
return;
@@ -5500,6 +5510,7 @@ __DEV__ &&
);
case REACT_LAZY_TYPE:
node = callLazyInitInDEV(node);
if (1 === request.status) throw AbortSigil;
renderNodeDestructive(request, task, node, childIndex);
return;
}
@@ -5899,6 +5910,20 @@ __DEV__ &&
!1
);
}
function erroredTask(request, boundary, error, errorInfo) {
var errorDigest = logRecoverableError(request, error, errorInfo);
null === boundary
? fatalError(request, error)
: (boundary.pendingTasks--,
4 !== boundary.status &&
((boundary.status = 4),
encodeErrorForBoundary(boundary, errorDigest, error, errorInfo, !1),
untrackBoundary(request, boundary),
boundary.parentFlushed &&
request.clientRenderedBoundaries.push(boundary)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function abortTaskSoft(task) {
var boundary = task.blockedBoundary;
task = task.blockedSegment;
@@ -5973,9 +5998,12 @@ __DEV__ &&
function abortTask(task, request, error) {
var boundary = task.blockedBoundary,
segment = task.blockedSegment;
null !== segment && (segment.status = 3);
if (null !== segment) {
if (6 === segment.status) return;
segment.status = 3;
}
if (null === boundary) {
if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
if (((boundary = {}), 2 !== request.status && 3 !== request.status)) {
task = task.replay;
if (null === task) {
logRecoverableError(request, error, boundary);
@@ -6705,6 +6733,7 @@ __DEV__ &&
error$jscomp$2(
"There was still abortable task at the root when we closed. This is a bug in React."
),
(request.status = 3),
(destination.done = !0),
(request.destination = null));
}
@@ -6716,13 +6745,19 @@ __DEV__ &&
(request.flushScheduled = !0);
}
function abort(request, reason) {
0 === request.status && (request.status = 1);
try {
var abortableTasks = request.abortableTasks;
if (0 < abortableTasks.size) {
var error =
void 0 === reason
? Error("The render was aborted by the server without a reason.")
: reason;
: "object" === typeof reason &&
null !== reason &&
"function" === typeof reason.then
? Error("The render was aborted by the server with a promise.")
: reason;
request.fatalError = error;
abortableTasks.forEach(function (task) {
return abortTask(task, request, error);
});
@@ -8087,6 +8122,7 @@ __DEV__ &&
},
callLazyInitInDEV =
callLazyInit["react-stack-bottom-frame"].bind(callLazyInit),
AbortSigil = {},
currentRequest = null,
didWarnAboutBadClass = {},
didWarnAboutContextTypes = {},
@@ -8116,7 +8152,7 @@ __DEV__ &&
exports.renderNextChunk = function (stream) {
var request = stream.request;
stream = stream.destination;
if (2 !== request.status && 1 !== request.status) {
if (3 !== request.status && 2 !== request.status) {
var prevContext = currentActiveSnapshot,
prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = HooksDispatcher;
@@ -8137,34 +8173,33 @@ __DEV__ &&
segment = task.blockedSegment;
if (null === segment) {
var prevTaskInDEV = void 0,
request$jscomp$1 = request$jscomp$0;
request$jscomp$0 = task;
if (0 !== request$jscomp$0.replay.pendingTasks) {
switchContext(request$jscomp$0.context);
task$jscomp$0 = task;
if (0 !== task$jscomp$0.replay.pendingTasks) {
switchContext(task$jscomp$0.context);
prevTaskInDEV = currentTaskInDEV;
currentTaskInDEV = request$jscomp$0;
currentTaskInDEV = task$jscomp$0;
try {
"number" === typeof request$jscomp$0.replay.slots
"number" === typeof task$jscomp$0.replay.slots
? resumeNode(
request$jscomp$1,
request$jscomp$0,
request$jscomp$0.replay.slots,
request$jscomp$0.node,
request$jscomp$0.childIndex
task$jscomp$0,
task$jscomp$0.replay.slots,
task$jscomp$0.node,
task$jscomp$0.childIndex
)
: retryNode(request$jscomp$1, request$jscomp$0);
: retryNode(request$jscomp$0, task$jscomp$0);
if (
1 === request$jscomp$0.replay.pendingTasks &&
0 < request$jscomp$0.replay.nodes.length
1 === task$jscomp$0.replay.pendingTasks &&
0 < task$jscomp$0.replay.nodes.length
)
throw Error(
"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
);
request$jscomp$0.replay.pendingTasks--;
request$jscomp$0.abortSet.delete(request$jscomp$0);
task$jscomp$0.replay.pendingTasks--;
task$jscomp$0.abortSet.delete(task$jscomp$0);
finishedTask(
request$jscomp$1,
request$jscomp$0.blockedBoundary,
request$jscomp$0,
task$jscomp$0.blockedBoundary,
null
);
} catch (thrownValue) {
@@ -8178,42 +8213,41 @@ __DEV__ &&
null !== x &&
"function" === typeof x.then
) {
var ping = request$jscomp$0.ping;
var ping = task$jscomp$0.ping;
x.then(ping, ping);
request$jscomp$0.thenableState =
task$jscomp$0.thenableState =
getThenableStateAfterSuspending();
} else {
request$jscomp$0.replay.pendingTasks--;
request$jscomp$0.abortSet.delete(request$jscomp$0);
var errorInfo = getThrownInfo(
request$jscomp$0.componentStack
);
task$jscomp$0.replay.pendingTasks--;
task$jscomp$0.abortSet.delete(task$jscomp$0);
var errorInfo = getThrownInfo(task$jscomp$0.componentStack);
erroredReplay(
request$jscomp$1,
request$jscomp$0.blockedBoundary,
x,
request$jscomp$0,
task$jscomp$0.blockedBoundary,
x === AbortSigil ? request$jscomp$0.fatalError : x,
errorInfo,
request$jscomp$0.replay.nodes,
request$jscomp$0.replay.slots
task$jscomp$0.replay.nodes,
task$jscomp$0.replay.slots
);
request$jscomp$1.pendingRootTasks--;
0 === request$jscomp$1.pendingRootTasks &&
completeShell(request$jscomp$1);
request$jscomp$1.allPendingTasks--;
0 === request$jscomp$1.allPendingTasks &&
completeAll(request$jscomp$1);
request$jscomp$0.pendingRootTasks--;
0 === request$jscomp$0.pendingRootTasks &&
completeShell(request$jscomp$0);
request$jscomp$0.allPendingTasks--;
0 === request$jscomp$0.allPendingTasks &&
completeAll(request$jscomp$0);
}
} finally {
currentTaskInDEV = prevTaskInDEV;
}
}
} else {
request$jscomp$1 = prevTaskInDEV = void 0;
var task$jscomp$0 = task,
segment$jscomp$0 = segment;
prevTaskInDEV = void 0;
task$jscomp$0 = task;
var segment$jscomp$0 = segment;
if (0 === segment$jscomp$0.status) {
segment$jscomp$0.status = 6;
switchContext(task$jscomp$0.context);
request$jscomp$1 = currentTaskInDEV;
prevTaskInDEV = currentTaskInDEV;
currentTaskInDEV = task$jscomp$0;
var childrenLength = segment$jscomp$0.children.length,
chunkLength = segment$jscomp$0.chunks.length;
@@ -8242,45 +8276,34 @@ __DEV__ &&
null !== x$jscomp$0 &&
"function" === typeof x$jscomp$0.then
) {
var ping$jscomp$0 = task$jscomp$0.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
segment$jscomp$0.status = 0;
task$jscomp$0.thenableState =
getThenableStateAfterSuspending();
var ping$jscomp$0 = task$jscomp$0.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
} else {
var errorInfo$jscomp$0 = getThrownInfo(
task$jscomp$0.componentStack
);
task$jscomp$0.abortSet.delete(task$jscomp$0);
segment$jscomp$0.status = 4;
var boundary = task$jscomp$0.blockedBoundary;
prevTaskInDEV = logRecoverableError(
request$jscomp$0,
x$jscomp$0,
errorInfo$jscomp$0
);
null === boundary
? fatalError(request$jscomp$0, x$jscomp$0)
: (boundary.pendingTasks--,
4 !== boundary.status &&
((boundary.status = 4),
encodeErrorForBoundary(
boundary,
prevTaskInDEV,
x$jscomp$0,
errorInfo$jscomp$0,
!1
),
untrackBoundary(request$jscomp$0, boundary),
boundary.parentFlushed &&
request$jscomp$0.clientRenderedBoundaries.push(
boundary
)));
request$jscomp$0.allPendingTasks--;
0 === request$jscomp$0.allPendingTasks &&
completeAll(request$jscomp$0);
x$jscomp$0 === AbortSigil
? ((segment$jscomp$0.status = 3),
erroredTask(
request$jscomp$0,
task$jscomp$0.blockedBoundary,
request$jscomp$0.fatalError,
errorInfo$jscomp$0
))
: ((segment$jscomp$0.status = 4),
erroredTask(
request$jscomp$0,
task$jscomp$0.blockedBoundary,
x$jscomp$0,
errorInfo$jscomp$0
));
}
} finally {
currentTaskInDEV = request$jscomp$1;
currentTaskInDEV = prevTaskInDEV;
}
}
}
@@ -8300,13 +8323,13 @@ __DEV__ &&
(currentRequest = prevRequest);
}
}
if (1 === request.status)
(request.status = 2),
if (2 === request.status)
(request.status = 3),
(request = request.fatalError),
(stream.done = !0),
(stream.fatal = !0),
(stream.error = request);
else if (2 !== request.status && null === request.destination) {
else if (3 !== request.status && null === request.destination) {
request.destination = stream;
try {
flushCompletedQueues(request, stream);
@@ -3541,7 +3541,8 @@ function RequestInstance(
pushComponentStack(children);
pingedTasks.push(children);
}
var currentRequest = null;
var AbortSigil = {},
currentRequest = null;
function pingTask(request, task) {
request.pingedTasks.push(task);
1 === request.pingedTasks.length &&
@@ -3715,12 +3716,12 @@ function fatalError(request, error) {
onShellError(error);
onFatalError(error);
null !== request.destination
? ((request.status = 2),
? ((request.status = 3),
(request = request.destination),
(request.done = !0),
(request.fatal = !0),
(request.error = error))
: ((request.status = 1), (request.fatalError = error));
: ((request.status = 2), (request.fatalError = error));
}
function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
var prevThenableState = task.thenableState;
@@ -3836,9 +3837,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
var defaultProps = type.defaultProps;
if (defaultProps && disableDefaultPropsExceptForClasses) {
newProps === props && (newProps = assign({}, newProps, props));
for (var propName$32 in defaultProps)
void 0 === newProps[propName$32] &&
(newProps[propName$32] = defaultProps[propName$32]);
for (var propName$33 in defaultProps)
void 0 === newProps[propName$33] &&
(newProps[propName$33] = defaultProps[propName$33]);
}
props = newProps;
newProps = emptyContextObject;
@@ -3847,25 +3848,25 @@ function renderElement(request, task, keyPath, type, props, ref) {
null !== defaultProps &&
(newProps = defaultProps._currentValue);
newProps = new type(props, newProps);
ref = void 0 !== newProps.state ? newProps.state : null;
var initialState = void 0 !== newProps.state ? newProps.state : null;
newProps.updater = classComponentUpdater;
newProps.props = props;
newProps.state = ref;
newProps.state = initialState;
defaultProps = { queue: [], replace: !1 };
newProps._reactInternals = defaultProps;
propName$32 = type.contextType;
ref = type.contextType;
newProps.context =
"object" === typeof propName$32 && null !== propName$32
? propName$32._currentValue
"object" === typeof ref && null !== ref
? ref._currentValue
: emptyContextObject;
propName$32 = type.getDerivedStateFromProps;
"function" === typeof propName$32 &&
((propName$32 = propName$32(props, ref)),
(ref =
null === propName$32 || void 0 === propName$32
? ref
: assign({}, ref, propName$32)),
(newProps.state = ref));
ref = type.getDerivedStateFromProps;
"function" === typeof ref &&
((ref = ref(props, initialState)),
(initialState =
null === ref || void 0 === ref
? initialState
: assign({}, initialState, ref)),
(newProps.state = initialState));
if (
"function" !== typeof type.getDerivedStateFromProps &&
"function" !== typeof newProps.getSnapshotBeforeUpdate &&
@@ -3888,61 +3889,60 @@ function renderElement(request, task, keyPath, type, props, ref) {
)
if (
((type = defaultProps.queue),
(propName$32 = defaultProps.replace),
(ref = defaultProps.replace),
(defaultProps.queue = null),
(defaultProps.replace = !1),
propName$32 && 1 === type.length)
ref && 1 === type.length)
)
newProps.state = type[0];
else {
defaultProps = propName$32 ? type[0] : newProps.state;
ref = !0;
for (
propName$32 = propName$32 ? 1 : 0;
propName$32 < type.length;
propName$32++
)
(propName = type[propName$32]),
(propName =
"function" === typeof propName
? propName.call(newProps, defaultProps, props, void 0)
: propName),
null != propName &&
(ref
? ((ref = !1),
(defaultProps = assign({}, defaultProps, propName)))
: assign(defaultProps, propName));
defaultProps = ref ? type[0] : newProps.state;
initialState = !0;
for (ref = ref ? 1 : 0; ref < type.length; ref++)
(propName$33 = type[ref]),
(propName$33 =
"function" === typeof propName$33
? propName$33.call(newProps, defaultProps, props, void 0)
: propName$33),
null != propName$33 &&
(initialState
? ((initialState = !1),
(defaultProps = assign({}, defaultProps, propName$33)))
: assign(defaultProps, propName$33));
newProps.state = defaultProps;
}
else defaultProps.queue = null;
type = newProps.render();
if (1 === request.status) throw AbortSigil;
props = task.keyPath;
task.keyPath = keyPath;
renderNodeDestructive(request, task, type, -1);
task.keyPath = props;
} else
(type = renderWithHooks(request, task, keyPath, type, props, void 0)),
finishFunctionComponent(
request,
task,
keyPath,
type,
0 !== localIdCounter,
actionStateCounter,
actionStateMatchingIndex
);
} else {
type = renderWithHooks(request, task, keyPath, type, props, void 0);
if (1 === request.status) throw AbortSigil;
finishFunctionComponent(
request,
task,
keyPath,
type,
0 !== localIdCounter,
actionStateCounter,
actionStateMatchingIndex
);
}
else if ("string" === typeof type)
if (((newProps = task.blockedSegment), null === newProps))
(newProps = props.children),
(defaultProps = task.formatContext),
(ref = task.keyPath),
(initialState = task.keyPath),
(task.formatContext = getChildFormatContext(defaultProps, type, props)),
(task.keyPath = keyPath),
renderNode(request, task, newProps, -1),
(task.formatContext = defaultProps),
(task.keyPath = ref);
(task.keyPath = initialState);
else {
ref = pushStartInstance(
initialState = pushStartInstance(
newProps.chunks,
type,
props,
@@ -3955,12 +3955,12 @@ function renderElement(request, task, keyPath, type, props, ref) {
);
newProps.lastPushedText = !1;
defaultProps = task.formatContext;
propName$32 = task.keyPath;
ref = task.keyPath;
task.formatContext = getChildFormatContext(defaultProps, type, props);
task.keyPath = keyPath;
renderNode(request, task, ref, -1);
renderNode(request, task, initialState, -1);
task.formatContext = defaultProps;
task.keyPath = propName$32;
task.keyPath = ref;
a: {
task = newProps.chunks;
request = request.resumableState;
@@ -4046,7 +4046,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
var parentBoundary = task.blockedBoundary,
parentHoistableState = task.hoistableState;
ref = task.blockedSegment;
propName$32 = props.fallback;
propName$33 = props.fallback;
props = props.children;
var fallbackAbortSet = new Set();
propName = createSuspenseBoundary(request, fallbackAbortSet);
@@ -4078,12 +4078,18 @@ function renderElement(request, task, keyPath, type, props, ref) {
propName.trackedFallbackNode = defaultProps;
task.blockedSegment = boundarySegment;
task.keyPath = newProps;
boundarySegment.status = 6;
try {
renderNode(request, task, propName$32, -1),
renderNode(request, task, propName$33, -1),
boundarySegment.lastPushedText &&
boundarySegment.textEmbedded &&
boundarySegment.chunks.push("\x3c!-- --\x3e"),
(boundarySegment.status = 1);
} catch (thrownValue) {
throw (
((boundarySegment.status = thrownValue === AbortSigil ? 3 : 4),
thrownValue)
);
} finally {
(task.blockedSegment = ref), (task.keyPath = type);
}
@@ -4110,6 +4116,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
task.hoistableState = propName.contentState;
task.blockedSegment = contentRootSegment;
task.keyPath = keyPath;
contentRootSegment.status = 6;
try {
if (
(renderNode(request, task, props, -1),
@@ -4123,12 +4130,20 @@ function renderElement(request, task, keyPath, type, props, ref) {
propName.status = 1;
break a;
}
} catch (error) {
(contentRootSegment.status = 4),
(propName.status = 4),
(newProps = getThrownInfo(task.componentStack)),
(defaultProps = logRecoverableError(request, error, newProps)),
(propName.errorDigest = defaultProps),
} catch (thrownValue$28) {
(propName.status = 4),
thrownValue$28 === AbortSigil
? ((contentRootSegment.status = 3),
(newProps = request.fatalError))
: ((contentRootSegment.status = 4),
(newProps = thrownValue$28)),
(defaultProps = getThrownInfo(task.componentStack)),
(initialState = logRecoverableError(
request,
newProps,
defaultProps
)),
(propName.errorDigest = initialState),
untrackBoundary(request, propName);
} finally {
(task.blockedBoundary = parentBoundary),
@@ -4139,7 +4154,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
task = createRenderTask(
request,
null,
propName$32,
propName$33,
-1,
parentBoundary,
boundarySegment,
@@ -4207,6 +4222,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
case REACT_LAZY_TYPE:
newProps = type._init;
type = newProps(type._payload);
if (1 === request.status) throw AbortSigil;
props = resolveDefaultPropsOnNonClassComponent(type, props);
renderElement(request, task, keyPath, type, props, ref);
return;
@@ -4441,6 +4457,7 @@ function retryNode(request, task) {
case REACT_LAZY_TYPE:
childNodes = node._init;
node = childNodes(node._payload);
if (1 === request.status) throw AbortSigil;
renderNodeDestructive(request, task, node, childIndex);
return;
}
@@ -4645,15 +4662,15 @@ function renderNode(request, task, node, childIndex) {
chunkLength = segment.chunks.length;
try {
return renderNodeDestructive(request, task, node, childIndex);
} catch (thrownValue$44) {
} catch (thrownValue$45) {
if (
(resetHooksState(),
(segment.children.length = childrenLength),
(segment.chunks.length = chunkLength),
(node =
thrownValue$44 === SuspenseException
thrownValue$45 === SuspenseException
? getSuspendedThenable()
: thrownValue$44),
: thrownValue$45),
"object" === typeof node &&
null !== node &&
"function" === typeof node.then)
@@ -4704,6 +4721,20 @@ function renderNode(request, task, node, childIndex) {
switchContext(previousContext);
throw node;
}
function erroredTask(request, boundary, error, errorInfo) {
errorInfo = logRecoverableError(request, error, errorInfo);
null === boundary
? fatalError(request, error)
: (boundary.pendingTasks--,
4 !== boundary.status &&
((boundary.status = 4),
(boundary.errorDigest = errorInfo),
untrackBoundary(request, boundary),
boundary.parentFlushed &&
request.clientRenderedBoundaries.push(boundary)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
function abortTaskSoft(task) {
var boundary = task.blockedBoundary;
task = task.blockedSegment;
@@ -4758,9 +4789,12 @@ function abortRemainingReplayNodes(
function abortTask(task, request, error) {
var boundary = task.blockedBoundary,
segment = task.blockedSegment;
null !== segment && (segment.status = 3);
if (null !== segment) {
if (6 === segment.status) return;
segment.status = 3;
}
if (null === boundary) {
if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
if (((boundary = {}), 2 !== request.status && 3 !== request.status)) {
task = task.replay;
if (null === task) {
logRecoverableError(request, error, boundary);
@@ -5309,11 +5343,11 @@ function flushCompletedQueues(request, destination) {
completedBoundaries.splice(0, i);
var partialBoundaries = request.partialBoundaries;
for (i = 0; i < partialBoundaries.length; i++) {
var boundary$48 = partialBoundaries[i];
var boundary$49 = partialBoundaries[i];
a: {
clientRenderedBoundaries = request;
boundary = destination;
var completedSegments = boundary$48.completedSegments;
var completedSegments = boundary$49.completedSegments;
for (
JSCompiler_inline_result = 0;
JSCompiler_inline_result < completedSegments.length;
@@ -5323,7 +5357,7 @@ function flushCompletedQueues(request, destination) {
!flushPartiallyCompletedSegment(
clientRenderedBoundaries,
boundary,
boundary$48,
boundary$49,
completedSegments[JSCompiler_inline_result]
)
) {
@@ -5335,7 +5369,7 @@ function flushCompletedQueues(request, destination) {
completedSegments.splice(0, JSCompiler_inline_result);
JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
boundary,
boundary$48.contentState,
boundary$49.contentState,
clientRenderedBoundaries.renderState
);
}
@@ -5366,6 +5400,7 @@ function flushCompletedQueues(request, destination) {
(i = request.resumableState),
i.hasBody && writeChunk(destination, endChunkForTag("body")),
i.hasHtml && writeChunk(destination, endChunkForTag("html")),
(request.status = 3),
(destination.done = !0),
(request.destination = null));
}
@@ -5377,13 +5412,19 @@ function enqueueFlush(request) {
(request.flushScheduled = !0);
}
function abort(request, reason) {
0 === request.status && (request.status = 1);
try {
var abortableTasks = request.abortableTasks;
if (0 < abortableTasks.size) {
var error =
void 0 === reason
? Error("The render was aborted by the server without a reason.")
: reason;
: "object" === typeof reason &&
null !== reason &&
"function" === typeof reason.then
? Error("The render was aborted by the server with a promise.")
: reason;
request.fatalError = error;
abortableTasks.forEach(function (task) {
return abortTask(task, request, error);
});
@@ -5391,8 +5432,8 @@ function abort(request, reason) {
}
null !== request.destination &&
flushCompletedQueues(request, request.destination);
} catch (error$50) {
logRecoverableError(request, error$50, {}), fatalError(request, error$50);
} catch (error$51) {
logRecoverableError(request, error$51, {}), fatalError(request, error$51);
}
}
exports.abortStream = function (stream, reason) {
@@ -5415,7 +5456,7 @@ exports.hasFinished = function (stream) {
exports.renderNextChunk = function (stream) {
var request = stream.request;
stream = stream.destination;
if (2 !== request.status && 1 !== request.status) {
if (3 !== request.status && 2 !== request.status) {
var prevContext = currentActiveSnapshot,
prevDispatcher = ReactSharedInternals.H;
ReactSharedInternals.H = HooksDispatcher;
@@ -5475,15 +5516,20 @@ exports.renderNextChunk = function (stream) {
task$jscomp$0.abortSet.delete(task$jscomp$0);
var errorInfo = getThrownInfo(task$jscomp$0.componentStack),
boundary = task$jscomp$0.blockedBoundary,
error$jscomp$0 = x === AbortSigil ? request.fatalError : x,
replayNodes = task$jscomp$0.replay.nodes,
resumeSlots = task$jscomp$0.replay.slots;
errorDigest = logRecoverableError(request, x, errorInfo);
errorDigest = logRecoverableError(
request,
error$jscomp$0,
errorInfo
);
abortRemainingReplayNodes(
request,
boundary,
replayNodes,
resumeSlots,
x,
error$jscomp$0,
errorDigest
);
request.pendingRootTasks--;
@@ -5494,70 +5540,62 @@ exports.renderNextChunk = function (stream) {
} finally {
}
}
} else {
errorDigest = void 0;
task$jscomp$0 = task;
var segment$jscomp$0 = segment;
if (0 === segment$jscomp$0.status) {
switchContext(task$jscomp$0.context);
var childrenLength = segment$jscomp$0.children.length,
chunkLength = segment$jscomp$0.chunks.length;
try {
retryNode(request, task$jscomp$0),
segment$jscomp$0.lastPushedText &&
segment$jscomp$0.textEmbedded &&
segment$jscomp$0.chunks.push("\x3c!-- --\x3e"),
task$jscomp$0.abortSet.delete(task$jscomp$0),
(segment$jscomp$0.status = 1),
finishedTask(
request,
task$jscomp$0.blockedBoundary,
segment$jscomp$0
);
} catch (thrownValue) {
resetHooksState();
segment$jscomp$0.children.length = childrenLength;
segment$jscomp$0.chunks.length = chunkLength;
var x$jscomp$0 =
thrownValue === SuspenseException
? getSuspendedThenable()
: thrownValue;
if (
"object" === typeof x$jscomp$0 &&
null !== x$jscomp$0 &&
"function" === typeof x$jscomp$0.then
) {
var ping$jscomp$0 = task$jscomp$0.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
task$jscomp$0.thenableState = getThenableStateAfterSuspending();
} else {
var errorInfo$jscomp$0 = getThrownInfo(
task$jscomp$0.componentStack
);
task$jscomp$0.abortSet.delete(task$jscomp$0);
segment$jscomp$0.status = 4;
var boundary$jscomp$0 = task$jscomp$0.blockedBoundary;
errorDigest = logRecoverableError(
request,
x$jscomp$0,
errorInfo$jscomp$0
);
null === boundary$jscomp$0
? fatalError(request, x$jscomp$0)
: (boundary$jscomp$0.pendingTasks--,
4 !== boundary$jscomp$0.status &&
((boundary$jscomp$0.status = 4),
(boundary$jscomp$0.errorDigest = errorDigest),
untrackBoundary(request, boundary$jscomp$0),
boundary$jscomp$0.parentFlushed &&
request.clientRenderedBoundaries.push(
boundary$jscomp$0
)));
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
} finally {
} else if (
((errorDigest = task),
(task$jscomp$0 = segment),
0 === task$jscomp$0.status)
) {
task$jscomp$0.status = 6;
switchContext(errorDigest.context);
var childrenLength = task$jscomp$0.children.length,
chunkLength = task$jscomp$0.chunks.length;
try {
retryNode(request, errorDigest),
task$jscomp$0.lastPushedText &&
task$jscomp$0.textEmbedded &&
task$jscomp$0.chunks.push("\x3c!-- --\x3e"),
errorDigest.abortSet.delete(errorDigest),
(task$jscomp$0.status = 1),
finishedTask(request, errorDigest.blockedBoundary, task$jscomp$0);
} catch (thrownValue) {
resetHooksState();
task$jscomp$0.children.length = childrenLength;
task$jscomp$0.chunks.length = chunkLength;
var x$jscomp$0 =
thrownValue === SuspenseException
? getSuspendedThenable()
: thrownValue;
if (
"object" === typeof x$jscomp$0 &&
null !== x$jscomp$0 &&
"function" === typeof x$jscomp$0.then
) {
task$jscomp$0.status = 0;
errorDigest.thenableState = getThenableStateAfterSuspending();
var ping$jscomp$0 = errorDigest.ping;
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
} else {
var errorInfo$jscomp$0 = getThrownInfo(
errorDigest.componentStack
);
errorDigest.abortSet.delete(errorDigest);
x$jscomp$0 === AbortSigil
? ((task$jscomp$0.status = 3),
erroredTask(
request,
errorDigest.blockedBoundary,
request.fatalError,
errorInfo$jscomp$0
))
: ((task$jscomp$0.status = 4),
erroredTask(
request,
errorDigest.blockedBoundary,
x$jscomp$0,
errorInfo$jscomp$0
));
}
} finally {
}
}
}
@@ -5574,13 +5612,13 @@ exports.renderNextChunk = function (stream) {
(currentRequest = prevRequest);
}
}
if (1 === request.status)
(request.status = 2),
if (2 === request.status)
(request.status = 3),
(request = request.fatalError),
(stream.done = !0),
(stream.fatal = !0),
(stream.error = request);
else if (2 !== request.status && null === request.destination) {
else if (3 !== request.status && null === request.destination) {
request.destination = stream;
try {
flushCompletedQueues(request, stream);
@@ -28139,11 +28139,11 @@ __DEV__ &&
: flushSyncErrorInBuildsThatSupportLegacyMode;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-9938e248-20240729" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-a451de01-20240729" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-classic-9938e248-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-a451de01-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -28209,12 +28209,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
@@ -29016,5 +29016,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
})();
@@ -27241,11 +27241,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-9938e248-20240729" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-a451de01-20240729" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-modern-9938e248-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-a451de01-20240729\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -27310,12 +27310,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
@@ -28069,5 +28069,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
})();
@@ -17623,14 +17623,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1806 = React.version;
if (
"19.0.0-www-classic-9938e248-20240729" !==
"19.0.0-www-classic-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1806
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1806,
"19.0.0-www-classic-9938e248-20240729"
"19.0.0-www-classic-a451de01-20240729"
)
);
function flushSyncFromReconciler(fn) {
@@ -17676,7 +17676,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1813 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2256 = {
@@ -17706,7 +17706,7 @@ var internals$jscomp$inline_2256 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2257 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -18313,4 +18313,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-9938e248-20240729";
exports.version = "19.0.0-www-classic-a451de01-20240729";
@@ -16988,14 +16988,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1777 = React.version;
if (
"19.0.0-www-modern-9938e248-20240729" !==
"19.0.0-www-modern-a451de01-20240729" !==
isomorphicReactPackageVersion$jscomp$inline_1777
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1777,
"19.0.0-www-modern-9938e248-20240729"
"19.0.0-www-modern-a451de01-20240729"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17014,7 +17014,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1779 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2247 = {
@@ -17044,7 +17044,7 @@ var internals$jscomp$inline_2247 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2248 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17558,4 +17558,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-9938e248-20240729";
exports.version = "19.0.0-www-modern-a451de01-20240729";
@@ -19273,7 +19273,7 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
});
};
exports.isAlreadyRendering = function () {
@@ -18631,7 +18631,7 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
});
};
exports.isAlreadyRendering = function () {
@@ -12803,7 +12803,7 @@ module.exports = function ($$$config) {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
};
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
devToolsConfig = !1;
@@ -12292,7 +12292,7 @@ module.exports = function ($$$config) {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
};
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
devToolsConfig = !1;
@@ -14851,14 +14851,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-9938e248-20240729"
reconcilerVersion: "19.0.0-www-classic-a451de01-20240729"
});
})({
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 1,
version: "19.0.0-www-classic-9938e248-20240729",
version: "19.0.0-www-classic-a451de01-20240729",
rendererPackageName: "react-test-renderer"
});
exports._Scheduler = Scheduler;
@@ -14851,14 +14851,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-9938e248-20240729"
reconcilerVersion: "19.0.0-www-modern-a451de01-20240729"
});
})({
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 1,
version: "19.0.0-www-modern-9938e248-20240729",
version: "19.0.0-www-modern-a451de01-20240729",
rendererPackageName: "react-test-renderer"
});
exports._Scheduler = Scheduler;
+1 -1
View File
@@ -1 +1 @@
19.0.0-www-classic-9938e248-20240729
19.0.0-www-classic-a451de01-20240729
+1 -1
View File
@@ -1 +1 @@
19.0.0-www-modern-9938e248-20240729
19.0.0-www-modern-a451de01-20240729