diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js
index 6592ba25d1..3df5eee1ad 100644
--- a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js
+++ b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js
@@ -373,6 +373,21 @@ __DEV__ &&
}
return "";
}
+ function getTaskName(type) {
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
+ if (
+ "object" === typeof type &&
+ null !== type &&
+ type.$$typeof === REACT_LAZY_TYPE
+ )
+ return "<...>";
+ try {
+ var name = getComponentNameFromType(type);
+ return name ? "<" + name + ">" : "<...>";
+ } catch (x) {
+ return "<...>";
+ }
+ }
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
@@ -409,7 +424,16 @@ __DEV__ &&
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
- function ReactElement(type, key, self, source, owner, props) {
+ function ReactElement(
+ type,
+ key,
+ self,
+ source,
+ owner,
+ props,
+ debugStack,
+ debugTask
+ ) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
@@ -437,6 +461,19 @@ __DEV__ &&
writable: !0,
value: null
});
+ enableOwnerStacks &&
+ (Object.defineProperty(type, "_debugStack", {
+ configurable: !1,
+ enumerable: !1,
+ writable: !0,
+ value: debugStack
+ }),
+ Object.defineProperty(type, "_debugTask", {
+ configurable: !1,
+ enumerable: !1,
+ writable: !0,
+ value: debugTask
+ }));
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
@@ -446,9 +483,12 @@ __DEV__ &&
maybeKey,
isStaticChildren,
source,
- self
+ self,
+ debugStack,
+ debugTask
) {
if (
+ enableOwnerStacks ||
"string" === typeof type ||
"function" === typeof type ||
type === REACT_FRAGMENT_TYPE ||
@@ -562,10 +602,21 @@ __DEV__ &&
? type.displayName || type.name || "Unknown"
: type
);
- return ReactElement(type, children, self, source, getOwner(), maybeKey);
+ return ReactElement(
+ type,
+ children,
+ self,
+ source,
+ getOwner(),
+ maybeKey,
+ debugStack,
+ debugTask
+ );
}
function validateChildKeys(node, parentType) {
- if (
+ if (enableOwnerStacks)
+ isValidElement(node) && node._store && (node._store.validated = 1);
+ else if (
"object" === typeof node &&
node &&
node.$$typeof !== REACT_CLIENT_REFERENCE
@@ -601,6 +652,7 @@ __DEV__ &&
}
function validateExplicitKey(element, parentType) {
if (
+ !enableOwnerStacks &&
element._store &&
!element._store.validated &&
null == element.key &&
@@ -651,12 +703,13 @@ __DEV__ &&
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
- enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing;
- dynamicFeatureFlags = dynamicFeatureFlags.renameElementSymbol;
- var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
- REACT_ELEMENT_TYPE = dynamicFeatureFlags
+ enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
+ renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks;
+ dynamicFeatureFlags = Symbol.for("react.element");
+ var REACT_ELEMENT_TYPE = renameElementSymbol
? Symbol.for("react.transitional.element")
- : REACT_LEGACY_ELEMENT_TYPE,
+ : dynamicFeatureFlags,
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
@@ -699,6 +752,12 @@ __DEV__ &&
"function" === typeof WeakMap ? WeakMap : Map
)();
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
+ createTask =
+ enableOwnerStacks && console.createTask
+ ? console.createTask
+ : function () {
+ return null;
+ },
specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var didWarnAboutKeySpread = {},
@@ -712,6 +771,15 @@ __DEV__ &&
source,
self
) {
- return jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self);
+ return jsxDEVImpl(
+ type,
+ config,
+ maybeKey,
+ isStaticChildren,
+ source,
+ self,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
})();
diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js
index 6592ba25d1..3df5eee1ad 100644
--- a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js
+++ b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js
@@ -373,6 +373,21 @@ __DEV__ &&
}
return "";
}
+ function getTaskName(type) {
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
+ if (
+ "object" === typeof type &&
+ null !== type &&
+ type.$$typeof === REACT_LAZY_TYPE
+ )
+ return "<...>";
+ try {
+ var name = getComponentNameFromType(type);
+ return name ? "<" + name + ">" : "<...>";
+ } catch (x) {
+ return "<...>";
+ }
+ }
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
@@ -409,7 +424,16 @@ __DEV__ &&
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
- function ReactElement(type, key, self, source, owner, props) {
+ function ReactElement(
+ type,
+ key,
+ self,
+ source,
+ owner,
+ props,
+ debugStack,
+ debugTask
+ ) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
@@ -437,6 +461,19 @@ __DEV__ &&
writable: !0,
value: null
});
+ enableOwnerStacks &&
+ (Object.defineProperty(type, "_debugStack", {
+ configurable: !1,
+ enumerable: !1,
+ writable: !0,
+ value: debugStack
+ }),
+ Object.defineProperty(type, "_debugTask", {
+ configurable: !1,
+ enumerable: !1,
+ writable: !0,
+ value: debugTask
+ }));
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
@@ -446,9 +483,12 @@ __DEV__ &&
maybeKey,
isStaticChildren,
source,
- self
+ self,
+ debugStack,
+ debugTask
) {
if (
+ enableOwnerStacks ||
"string" === typeof type ||
"function" === typeof type ||
type === REACT_FRAGMENT_TYPE ||
@@ -562,10 +602,21 @@ __DEV__ &&
? type.displayName || type.name || "Unknown"
: type
);
- return ReactElement(type, children, self, source, getOwner(), maybeKey);
+ return ReactElement(
+ type,
+ children,
+ self,
+ source,
+ getOwner(),
+ maybeKey,
+ debugStack,
+ debugTask
+ );
}
function validateChildKeys(node, parentType) {
- if (
+ if (enableOwnerStacks)
+ isValidElement(node) && node._store && (node._store.validated = 1);
+ else if (
"object" === typeof node &&
node &&
node.$$typeof !== REACT_CLIENT_REFERENCE
@@ -601,6 +652,7 @@ __DEV__ &&
}
function validateExplicitKey(element, parentType) {
if (
+ !enableOwnerStacks &&
element._store &&
!element._store.validated &&
null == element.key &&
@@ -651,12 +703,13 @@ __DEV__ &&
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
- enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing;
- dynamicFeatureFlags = dynamicFeatureFlags.renameElementSymbol;
- var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
- REACT_ELEMENT_TYPE = dynamicFeatureFlags
+ enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
+ renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks;
+ dynamicFeatureFlags = Symbol.for("react.element");
+ var REACT_ELEMENT_TYPE = renameElementSymbol
? Symbol.for("react.transitional.element")
- : REACT_LEGACY_ELEMENT_TYPE,
+ : dynamicFeatureFlags,
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
@@ -699,6 +752,12 @@ __DEV__ &&
"function" === typeof WeakMap ? WeakMap : Map
)();
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
+ createTask =
+ enableOwnerStacks && console.createTask
+ ? console.createTask
+ : function () {
+ return null;
+ },
specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var didWarnAboutKeySpread = {},
@@ -712,6 +771,15 @@ __DEV__ &&
source,
self
) {
- return jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self);
+ return jsxDEVImpl(
+ type,
+ config,
+ maybeKey,
+ isStaticChildren,
+ source,
+ self,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
})();
diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION
index c78ca31ce4..c827e8097c 100644
--- a/compiled/facebook-www/REVISION
+++ b/compiled/facebook-www/REVISION
@@ -1 +1 @@
-7c4a7c9ddf2f1c8e223565af1256ea201ec0f303
+a4964987dc140526702e996223fe7ee293def8ac
diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS
index c78ca31ce4..c827e8097c 100644
--- a/compiled/facebook-www/REVISION_TRANSFORMS
+++ b/compiled/facebook-www/REVISION_TRANSFORMS
@@ -1 +1 @@
-7c4a7c9ddf2f1c8e223565af1256ea201ec0f303
+a4964987dc140526702e996223fe7ee293def8ac
diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js
index 94bbce8486..037b5674b2 100644
--- a/compiled/facebook-www/React-dev.classic.js
+++ b/compiled/facebook-www/React-dev.classic.js
@@ -460,6 +460,21 @@ __DEV__ &&
}
return "";
}
+ function getTaskName(type) {
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
+ if (
+ "object" === typeof type &&
+ null !== type &&
+ type.$$typeof === REACT_LAZY_TYPE
+ )
+ return "<...>";
+ try {
+ var name = getComponentNameFromType(type);
+ return name ? "<" + name + ">" : "<...>";
+ } catch (x) {
+ return "<...>";
+ }
+ }
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
@@ -496,7 +511,16 @@ __DEV__ &&
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
- function ReactElement(type, key, self, source, owner, props) {
+ function ReactElement(
+ type,
+ key,
+ self,
+ source,
+ owner,
+ props,
+ debugStack,
+ debugTask
+ ) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
@@ -524,6 +548,19 @@ __DEV__ &&
writable: !0,
value: null
});
+ enableOwnerStacks &&
+ (Object.defineProperty(type, "_debugStack", {
+ configurable: !1,
+ enumerable: !1,
+ writable: !0,
+ value: debugStack
+ }),
+ Object.defineProperty(type, "_debugTask", {
+ configurable: !1,
+ enumerable: !1,
+ writable: !0,
+ value: debugTask
+ }));
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
@@ -533,9 +570,11 @@ __DEV__ &&
maybeKey,
isStaticChildren,
source,
- self
+ self,
+ debugStack,
+ debugTask
) {
- if (isValidElementType(type)) {
+ if (enableOwnerStacks || isValidElementType(type)) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
@@ -624,7 +663,16 @@ __DEV__ &&
? type.displayName || type.name || "Unknown"
: type
);
- return ReactElement(type, children, self, source, getOwner(), maybeKey);
+ return ReactElement(
+ type,
+ children,
+ self,
+ source,
+ getOwner(),
+ maybeKey,
+ debugStack,
+ debugTask
+ );
}
function cloneAndReplaceKey(oldElement, newKey) {
newKey = ReactElement(
@@ -633,13 +681,17 @@ __DEV__ &&
void 0,
void 0,
oldElement._owner,
- oldElement.props
+ oldElement.props,
+ enableOwnerStacks ? oldElement._debugStack : void 0,
+ enableOwnerStacks ? oldElement._debugTask : void 0
);
newKey._store.validated = oldElement._store.validated;
return newKey;
}
function validateChildKeys(node, parentType) {
- if (
+ if (enableOwnerStacks)
+ isValidElement(node) && node._store && (node._store.validated = 1);
+ else if (
"object" === typeof node &&
node &&
node.$$typeof !== REACT_CLIENT_REFERENCE
@@ -670,6 +722,7 @@ __DEV__ &&
}
function validateExplicitKey(element, parentType) {
if (
+ !enableOwnerStacks &&
element._store &&
!element._store.validated &&
null == element.key &&
@@ -1046,6 +1099,11 @@ __DEV__ &&
}
}
}
+ function captureOwnerStack() {
+ if (!enableOwnerStacks) return null;
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
+ return null === getCurrentStack ? null : getCurrentStack();
+ }
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
@@ -1059,6 +1117,7 @@ __DEV__ &&
enableUseResourceEffectHook =
dynamicFeatureFlags.enableUseResourceEffectHook,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
? Symbol.for("react.transitional.element")
@@ -1167,6 +1226,12 @@ __DEV__ &&
"function" === typeof WeakMap ? WeakMap : Map
)();
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
+ createTask =
+ enableOwnerStacks && console.createTask
+ ? console.createTask
+ : function () {
+ return null;
+ },
specialPropKeyWarningShown,
didWarnAboutOldJSXRuntime;
var didWarnAboutElementRef = {};
@@ -1217,42 +1282,45 @@ __DEV__ &&
}
: enqueueTask,
ReactCompilerRuntime = { c: useMemoCache },
+ Children = {
+ map: mapChildren,
+ forEach: function (children, forEachFunc, forEachContext) {
+ mapChildren(
+ children,
+ function () {
+ forEachFunc.apply(this, arguments);
+ },
+ forEachContext
+ );
+ },
+ count: function (children) {
+ var n = 0;
+ mapChildren(children, function () {
+ n++;
+ });
+ return n;
+ },
+ toArray: function (children) {
+ return (
+ mapChildren(children, function (child) {
+ return child;
+ }) || []
+ );
+ },
+ only: function (children) {
+ if (!isValidElement(children))
+ throw Error(
+ "React.Children.only expected to receive a single React element child."
+ );
+ return children;
+ }
+ },
experimental_useResourceEffect = enableUseResourceEffectHook
? useResourceEffect
: void 0;
- exports.Children = {
- map: mapChildren,
- forEach: function (children, forEachFunc, forEachContext) {
- mapChildren(
- children,
- function () {
- forEachFunc.apply(this, arguments);
- },
- forEachContext
- );
- },
- count: function (children) {
- var n = 0;
- mapChildren(children, function () {
- n++;
- });
- return n;
- },
- toArray: function (children) {
- return (
- mapChildren(children, function (child) {
- return child;
- }) || []
- );
- },
- only: function (children) {
- if (!isValidElement(children))
- throw Error(
- "React.Children.only expected to receive a single React element child."
- );
- return children;
- }
- };
+ exports.captureOwnerStack = void 0;
+ enableOwnerStacks && (exports.captureOwnerStack = captureOwnerStack);
+ exports.Children = Children;
exports.Component = Component;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
@@ -1440,7 +1508,16 @@ __DEV__ &&
arguments[JSCompiler_inline_result + 2];
props.children = defaultProps;
}
- props = ReactElement(element.type, key, void 0, void 0, owner, props);
+ props = ReactElement(
+ element.type,
+ key,
+ void 0,
+ void 0,
+ owner,
+ props,
+ enableOwnerStacks ? element._debugStack : void 0,
+ enableOwnerStacks ? element._debugTask : void 0
+ );
for (key = 2; key < arguments.length; key++)
validateChildKeys(arguments[key], props.type);
return props;
@@ -1516,7 +1593,7 @@ __DEV__ &&
return context;
};
exports.createElement = function (type, config, children) {
- if (isValidElementType(type))
+ if (enableOwnerStacks || isValidElementType(type))
for (var i = 2; i < arguments.length; i++)
validateChildKeys(arguments[i], type);
else {
@@ -1588,7 +1665,16 @@ __DEV__ &&
? type.displayName || type.name || "Unknown"
: type
);
- return ReactElement(type, typeString, void 0, void 0, getOwner(), i);
+ return ReactElement(
+ type,
+ typeString,
+ void 0,
+ void 0,
+ getOwner(),
+ i,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
exports.createRef = function () {
var refObject = { current: null };
@@ -1642,7 +1728,16 @@ __DEV__ &&
};
exports.isValidElement = isValidElement;
exports.jsx = function (type, config, maybeKey, source, self) {
- return jsxDEVImpl(type, config, maybeKey, !1, source, self);
+ return jsxDEVImpl(
+ type,
+ config,
+ maybeKey,
+ !1,
+ source,
+ self,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
exports.jsxDEV = function (
type,
@@ -1652,10 +1747,28 @@ __DEV__ &&
source,
self
) {
- return jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self);
+ return jsxDEVImpl(
+ type,
+ config,
+ maybeKey,
+ isStaticChildren,
+ source,
+ self,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
exports.jsxs = function (type, config, maybeKey, source, self) {
- return jsxDEVImpl(type, config, maybeKey, !0, source, self);
+ return jsxDEVImpl(
+ type,
+ config,
+ maybeKey,
+ !0,
+ source,
+ self,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
exports.lazy = function (ctor) {
var lazyType = {
@@ -1841,7 +1954,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
- exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-classic-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js
index 3ad98da31b..82049ee440 100644
--- a/compiled/facebook-www/React-dev.modern.js
+++ b/compiled/facebook-www/React-dev.modern.js
@@ -460,6 +460,21 @@ __DEV__ &&
}
return "";
}
+ function getTaskName(type) {
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
+ if (
+ "object" === typeof type &&
+ null !== type &&
+ type.$$typeof === REACT_LAZY_TYPE
+ )
+ return "<...>";
+ try {
+ var name = getComponentNameFromType(type);
+ return name ? "<" + name + ">" : "<...>";
+ } catch (x) {
+ return "<...>";
+ }
+ }
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
@@ -496,7 +511,16 @@ __DEV__ &&
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
- function ReactElement(type, key, self, source, owner, props) {
+ function ReactElement(
+ type,
+ key,
+ self,
+ source,
+ owner,
+ props,
+ debugStack,
+ debugTask
+ ) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
@@ -524,6 +548,19 @@ __DEV__ &&
writable: !0,
value: null
});
+ enableOwnerStacks &&
+ (Object.defineProperty(type, "_debugStack", {
+ configurable: !1,
+ enumerable: !1,
+ writable: !0,
+ value: debugStack
+ }),
+ Object.defineProperty(type, "_debugTask", {
+ configurable: !1,
+ enumerable: !1,
+ writable: !0,
+ value: debugTask
+ }));
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
@@ -533,9 +570,11 @@ __DEV__ &&
maybeKey,
isStaticChildren,
source,
- self
+ self,
+ debugStack,
+ debugTask
) {
- if (isValidElementType(type)) {
+ if (enableOwnerStacks || isValidElementType(type)) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
@@ -624,7 +663,16 @@ __DEV__ &&
? type.displayName || type.name || "Unknown"
: type
);
- return ReactElement(type, children, self, source, getOwner(), maybeKey);
+ return ReactElement(
+ type,
+ children,
+ self,
+ source,
+ getOwner(),
+ maybeKey,
+ debugStack,
+ debugTask
+ );
}
function cloneAndReplaceKey(oldElement, newKey) {
newKey = ReactElement(
@@ -633,13 +681,17 @@ __DEV__ &&
void 0,
void 0,
oldElement._owner,
- oldElement.props
+ oldElement.props,
+ enableOwnerStacks ? oldElement._debugStack : void 0,
+ enableOwnerStacks ? oldElement._debugTask : void 0
);
newKey._store.validated = oldElement._store.validated;
return newKey;
}
function validateChildKeys(node, parentType) {
- if (
+ if (enableOwnerStacks)
+ isValidElement(node) && node._store && (node._store.validated = 1);
+ else if (
"object" === typeof node &&
node &&
node.$$typeof !== REACT_CLIENT_REFERENCE
@@ -670,6 +722,7 @@ __DEV__ &&
}
function validateExplicitKey(element, parentType) {
if (
+ !enableOwnerStacks &&
element._store &&
!element._store.validated &&
null == element.key &&
@@ -1046,6 +1099,11 @@ __DEV__ &&
}
}
}
+ function captureOwnerStack() {
+ if (!enableOwnerStacks) return null;
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
+ return null === getCurrentStack ? null : getCurrentStack();
+ }
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
@@ -1059,6 +1117,7 @@ __DEV__ &&
enableUseResourceEffectHook =
dynamicFeatureFlags.enableUseResourceEffectHook,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
? Symbol.for("react.transitional.element")
@@ -1167,6 +1226,12 @@ __DEV__ &&
"function" === typeof WeakMap ? WeakMap : Map
)();
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
+ createTask =
+ enableOwnerStacks && console.createTask
+ ? console.createTask
+ : function () {
+ return null;
+ },
specialPropKeyWarningShown,
didWarnAboutOldJSXRuntime;
var didWarnAboutElementRef = {};
@@ -1217,42 +1282,45 @@ __DEV__ &&
}
: enqueueTask,
ReactCompilerRuntime = { c: useMemoCache },
+ Children = {
+ map: mapChildren,
+ forEach: function (children, forEachFunc, forEachContext) {
+ mapChildren(
+ children,
+ function () {
+ forEachFunc.apply(this, arguments);
+ },
+ forEachContext
+ );
+ },
+ count: function (children) {
+ var n = 0;
+ mapChildren(children, function () {
+ n++;
+ });
+ return n;
+ },
+ toArray: function (children) {
+ return (
+ mapChildren(children, function (child) {
+ return child;
+ }) || []
+ );
+ },
+ only: function (children) {
+ if (!isValidElement(children))
+ throw Error(
+ "React.Children.only expected to receive a single React element child."
+ );
+ return children;
+ }
+ },
experimental_useResourceEffect = enableUseResourceEffectHook
? useResourceEffect
: void 0;
- exports.Children = {
- map: mapChildren,
- forEach: function (children, forEachFunc, forEachContext) {
- mapChildren(
- children,
- function () {
- forEachFunc.apply(this, arguments);
- },
- forEachContext
- );
- },
- count: function (children) {
- var n = 0;
- mapChildren(children, function () {
- n++;
- });
- return n;
- },
- toArray: function (children) {
- return (
- mapChildren(children, function (child) {
- return child;
- }) || []
- );
- },
- only: function (children) {
- if (!isValidElement(children))
- throw Error(
- "React.Children.only expected to receive a single React element child."
- );
- return children;
- }
- };
+ exports.captureOwnerStack = void 0;
+ enableOwnerStacks && (exports.captureOwnerStack = captureOwnerStack);
+ exports.Children = Children;
exports.Component = Component;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
@@ -1440,7 +1508,16 @@ __DEV__ &&
arguments[JSCompiler_inline_result + 2];
props.children = defaultProps;
}
- props = ReactElement(element.type, key, void 0, void 0, owner, props);
+ props = ReactElement(
+ element.type,
+ key,
+ void 0,
+ void 0,
+ owner,
+ props,
+ enableOwnerStacks ? element._debugStack : void 0,
+ enableOwnerStacks ? element._debugTask : void 0
+ );
for (key = 2; key < arguments.length; key++)
validateChildKeys(arguments[key], props.type);
return props;
@@ -1516,7 +1593,7 @@ __DEV__ &&
return context;
};
exports.createElement = function (type, config, children) {
- if (isValidElementType(type))
+ if (enableOwnerStacks || isValidElementType(type))
for (var i = 2; i < arguments.length; i++)
validateChildKeys(arguments[i], type);
else {
@@ -1588,7 +1665,16 @@ __DEV__ &&
? type.displayName || type.name || "Unknown"
: type
);
- return ReactElement(type, typeString, void 0, void 0, getOwner(), i);
+ return ReactElement(
+ type,
+ typeString,
+ void 0,
+ void 0,
+ getOwner(),
+ i,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
exports.createRef = function () {
var refObject = { current: null };
@@ -1642,7 +1728,16 @@ __DEV__ &&
};
exports.isValidElement = isValidElement;
exports.jsx = function (type, config, maybeKey, source, self) {
- return jsxDEVImpl(type, config, maybeKey, !1, source, self);
+ return jsxDEVImpl(
+ type,
+ config,
+ maybeKey,
+ !1,
+ source,
+ self,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
exports.jsxDEV = function (
type,
@@ -1652,10 +1747,28 @@ __DEV__ &&
source,
self
) {
- return jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self);
+ return jsxDEVImpl(
+ type,
+ config,
+ maybeKey,
+ isStaticChildren,
+ source,
+ self,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
exports.jsxs = function (type, config, maybeKey, source, self) {
- return jsxDEVImpl(type, config, maybeKey, !0, source, self);
+ return jsxDEVImpl(
+ type,
+ config,
+ maybeKey,
+ !0,
+ source,
+ self,
+ enableOwnerStacks ? Error("react-stack-top-frame") : void 0,
+ enableOwnerStacks ? createTask(getTaskName(type)) : void 0
+ );
};
exports.lazy = function (ctor) {
var lazyType = {
@@ -1841,7 +1954,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
- exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-modern-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js
index cf7261f1dc..c0f6ac252d 100644
--- a/compiled/facebook-www/React-prod.classic.js
+++ b/compiled/facebook-www/React-prod.classic.js
@@ -420,6 +420,7 @@ exports.cache = function (fn) {
return fn.apply(null, arguments);
};
};
+exports.captureOwnerStack = void 0;
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(
@@ -634,4 +635,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
-exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-classic-a4964987-20241211";
diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js
index cff91e6011..b7b2801e3f 100644
--- a/compiled/facebook-www/React-prod.modern.js
+++ b/compiled/facebook-www/React-prod.modern.js
@@ -420,6 +420,7 @@ exports.cache = function (fn) {
return fn.apply(null, arguments);
};
};
+exports.captureOwnerStack = void 0;
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(
@@ -634,4 +635,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
-exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-modern-a4964987-20241211";
diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js
index 3f92d1b75b..5f2a76484e 100644
--- a/compiled/facebook-www/React-profiling.classic.js
+++ b/compiled/facebook-www/React-profiling.classic.js
@@ -424,6 +424,7 @@ exports.cache = function (fn) {
return fn.apply(null, arguments);
};
};
+exports.captureOwnerStack = void 0;
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(
@@ -638,7 +639,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
-exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-classic-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js
index 72a5b2f9f8..efc8ec8c15 100644
--- a/compiled/facebook-www/React-profiling.modern.js
+++ b/compiled/facebook-www/React-profiling.modern.js
@@ -424,6 +424,7 @@ exports.cache = function (fn) {
return fn.apply(null, arguments);
};
};
+exports.captureOwnerStack = void 0;
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(
@@ -638,7 +639,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
-exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-modern-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js
index 3505805b47..27eac3a411 100644
--- a/compiled/facebook-www/ReactART-dev.classic.js
+++ b/compiled/facebook-www/ReactART-dev.classic.js
@@ -536,6 +536,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
@@ -586,8 +607,71 @@ __DEV__ &&
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
+ return (fn = fn ? fn.displayName || fn.name : "")
+ ? describeBuiltInComponentFrame(fn)
+ : "";
+ }
+ function getOwnerStackByFiberInDev(workInProgress) {
+ if (!enableOwnerStacks) return "";
+ try {
+ var info = "";
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
+ switch (workInProgress.tag) {
+ case 26:
+ case 27:
+ case 5:
+ info += describeBuiltInComponentFrame(workInProgress.type);
+ break;
+ case 13:
+ info += describeBuiltInComponentFrame("Suspense");
+ break;
+ case 19:
+ info += describeBuiltInComponentFrame("SuspenseList");
+ break;
+ case 0:
+ case 15:
+ case 1:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type
+ ));
+ break;
+ case 11:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type.render
+ ));
+ }
+ for (; workInProgress; )
+ if ("number" === typeof workInProgress.tag) {
+ var fiber = workInProgress;
+ workInProgress = fiber._debugOwner;
+ var debugStack = fiber._debugStack;
+ workInProgress &&
+ debugStack &&
+ ("string" !== typeof debugStack &&
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
+ "" !== debugStack && (info += "\n" + debugStack));
+ } else if (null != workInProgress.debugStack) {
+ var ownerStack = workInProgress.debugStack;
+ (workInProgress = workInProgress.owner) &&
+ ownerStack &&
+ (info += "\n" + formatOwnerStack(ownerStack));
+ } else break;
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
function getCurrentFiberStackInDev() {
- return null === current ? "" : getStackByFiberInDevAndProd(current);
+ return null === current
+ ? ""
+ : enableOwnerStacks
+ ? getOwnerStackByFiberInDev(current)
+ : getStackByFiberInDevAndProd(current);
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
@@ -596,7 +680,11 @@ __DEV__ &&
isRendering = !1;
current = fiber;
try {
- return callback(arg0, arg1, arg2, arg3, arg4);
+ return enableOwnerStacks && null !== fiber && fiber._debugTask
+ ? fiber._debugTask.run(
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
+ )
+ : callback(arg0, arg1, arg2, arg3, arg4);
} finally {
current = previousFiber;
}
@@ -4691,6 +4779,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -4765,6 +4854,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -4787,6 +4877,7 @@ __DEV__ &&
)),
(newChild.return = returnFiber),
(newChild._debugOwner = returnFiber),
+ enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask),
(newChild._debugInfo = currentDebugInfo),
newChild
);
@@ -4834,6 +4925,7 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask),
(returnFiber = pushDebugInfo(newChild._debugInfo)),
(lanes._debugInfo = currentDebugInfo),
(currentDebugInfo = returnFiber),
@@ -5363,6 +5455,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
validateFragmentProps(newChild, lanes, returnFiber),
(returnFiber = lanes))
@@ -5529,6 +5623,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
(returnFiber = lanes)),
placeSingleChild(returnFiber)
@@ -5558,10 +5654,13 @@ __DEV__ &&
fiber.return = returnFiber;
var debugInfo = (fiber._debugInfo = currentDebugInfo);
fiber._debugOwner = returnFiber._debugOwner;
+ enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask);
if (null != debugInfo)
for (var i = debugInfo.length - 1; 0 <= i; i--)
if ("string" === typeof debugInfo[i].stack) {
fiber._debugOwner = debugInfo[i];
+ enableOwnerStacks &&
+ (fiber._debugTask = debugInfo[i].debugTask);
break;
}
return fiber;
@@ -8000,6 +8099,9 @@ __DEV__ &&
workInProgress.mode,
workInProgress.lanes
);
+ enableOwnerStacks &&
+ ((renderLanes._debugStack = workInProgress._debugStack),
+ (renderLanes._debugTask = workInProgress._debugTask));
var returnFiber = workInProgress.return;
if (null === returnFiber) throw Error("Cannot swap the root fiber.");
current.alternate = null;
@@ -14153,6 +14255,7 @@ __DEV__ &&
this.actualStartTime = -1.1;
this.treeBaseDuration = this.selfBaseDuration = -0;
this._debugOwner = this._debugInfo = null;
+ enableOwnerStacks && (this._debugTask = this._debugStack = null);
this._debugNeedsRemount = !1;
this._debugHookTypes = null;
hasBadMapPolyfill ||
@@ -14192,10 +14295,11 @@ __DEV__ &&
selfBaseDuration: -0,
treeBaseDuration: -0,
_debugInfo: null,
- _debugOwner: null,
- _debugNeedsRemount: !1,
- _debugHookTypes: null
+ _debugOwner: null
};
+ enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null));
+ tag._debugNeedsRemount = !1;
+ tag._debugHookTypes = null;
hasBadMapPolyfill ||
"function" !== typeof Object.preventExtensions ||
Object.preventExtensions(tag);
@@ -14218,6 +14322,9 @@ __DEV__ &&
(workInProgress.type = current.type),
(workInProgress.stateNode = current.stateNode),
(workInProgress._debugOwner = current._debugOwner),
+ enableOwnerStacks &&
+ ((workInProgress._debugStack = current._debugStack),
+ (workInProgress._debugTask = current._debugTask)),
(workInProgress._debugHookTypes = current._debugHookTypes),
(workInProgress.alternate = current),
(current.alternate = workInProgress))
@@ -14477,6 +14584,9 @@ __DEV__ &&
lanes
);
mode._debugOwner = element._owner;
+ enableOwnerStacks &&
+ ((mode._debugStack = element._debugStack),
+ (mode._debugTask = element._debugTask));
return mode;
}
function createFiberFromFragment(elements, mode, lanes, key) {
@@ -14760,6 +14870,7 @@ __DEV__ &&
syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs,
transitionLaneExpirationMs =
dynamicFeatureFlags.transitionLaneExpirationMs,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
@@ -17126,10 +17237,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
- version: "19.0.0-www-classic-7c4a7c9d-20241210",
+ version: "19.0.0-www-classic-a4964987-20241211",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17163,7 +17274,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
- exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-classic-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js
index 0f2e525047..e5f3767fe1 100644
--- a/compiled/facebook-www/ReactART-dev.modern.js
+++ b/compiled/facebook-www/ReactART-dev.modern.js
@@ -536,6 +536,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
@@ -586,8 +607,71 @@ __DEV__ &&
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
+ return (fn = fn ? fn.displayName || fn.name : "")
+ ? describeBuiltInComponentFrame(fn)
+ : "";
+ }
+ function getOwnerStackByFiberInDev(workInProgress) {
+ if (!enableOwnerStacks) return "";
+ try {
+ var info = "";
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
+ switch (workInProgress.tag) {
+ case 26:
+ case 27:
+ case 5:
+ info += describeBuiltInComponentFrame(workInProgress.type);
+ break;
+ case 13:
+ info += describeBuiltInComponentFrame("Suspense");
+ break;
+ case 19:
+ info += describeBuiltInComponentFrame("SuspenseList");
+ break;
+ case 0:
+ case 15:
+ case 1:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type
+ ));
+ break;
+ case 11:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type.render
+ ));
+ }
+ for (; workInProgress; )
+ if ("number" === typeof workInProgress.tag) {
+ var fiber = workInProgress;
+ workInProgress = fiber._debugOwner;
+ var debugStack = fiber._debugStack;
+ workInProgress &&
+ debugStack &&
+ ("string" !== typeof debugStack &&
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
+ "" !== debugStack && (info += "\n" + debugStack));
+ } else if (null != workInProgress.debugStack) {
+ var ownerStack = workInProgress.debugStack;
+ (workInProgress = workInProgress.owner) &&
+ ownerStack &&
+ (info += "\n" + formatOwnerStack(ownerStack));
+ } else break;
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
function getCurrentFiberStackInDev() {
- return null === current ? "" : getStackByFiberInDevAndProd(current);
+ return null === current
+ ? ""
+ : enableOwnerStacks
+ ? getOwnerStackByFiberInDev(current)
+ : getStackByFiberInDevAndProd(current);
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
@@ -596,7 +680,11 @@ __DEV__ &&
isRendering = !1;
current = fiber;
try {
- return callback(arg0, arg1, arg2, arg3, arg4);
+ return enableOwnerStacks && null !== fiber && fiber._debugTask
+ ? fiber._debugTask.run(
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
+ )
+ : callback(arg0, arg1, arg2, arg3, arg4);
} finally {
current = previousFiber;
}
@@ -4583,6 +4671,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -4657,6 +4746,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -4679,6 +4769,7 @@ __DEV__ &&
)),
(newChild.return = returnFiber),
(newChild._debugOwner = returnFiber),
+ enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask),
(newChild._debugInfo = currentDebugInfo),
newChild
);
@@ -4726,6 +4817,7 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask),
(returnFiber = pushDebugInfo(newChild._debugInfo)),
(lanes._debugInfo = currentDebugInfo),
(currentDebugInfo = returnFiber),
@@ -5255,6 +5347,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
validateFragmentProps(newChild, lanes, returnFiber),
(returnFiber = lanes))
@@ -5421,6 +5515,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
(returnFiber = lanes)),
placeSingleChild(returnFiber)
@@ -5450,10 +5546,13 @@ __DEV__ &&
fiber.return = returnFiber;
var debugInfo = (fiber._debugInfo = currentDebugInfo);
fiber._debugOwner = returnFiber._debugOwner;
+ enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask);
if (null != debugInfo)
for (var i = debugInfo.length - 1; 0 <= i; i--)
if ("string" === typeof debugInfo[i].stack) {
fiber._debugOwner = debugInfo[i];
+ enableOwnerStacks &&
+ (fiber._debugTask = debugInfo[i].debugTask);
break;
}
return fiber;
@@ -7816,6 +7915,9 @@ __DEV__ &&
workInProgress.mode,
workInProgress.lanes
);
+ enableOwnerStacks &&
+ ((renderLanes._debugStack = workInProgress._debugStack),
+ (renderLanes._debugTask = workInProgress._debugTask));
var returnFiber = workInProgress.return;
if (null === returnFiber) throw Error("Cannot swap the root fiber.");
current.alternate = null;
@@ -13953,6 +14055,7 @@ __DEV__ &&
this.actualStartTime = -1.1;
this.treeBaseDuration = this.selfBaseDuration = -0;
this._debugOwner = this._debugInfo = null;
+ enableOwnerStacks && (this._debugTask = this._debugStack = null);
this._debugNeedsRemount = !1;
this._debugHookTypes = null;
hasBadMapPolyfill ||
@@ -13992,10 +14095,11 @@ __DEV__ &&
selfBaseDuration: -0,
treeBaseDuration: -0,
_debugInfo: null,
- _debugOwner: null,
- _debugNeedsRemount: !1,
- _debugHookTypes: null
+ _debugOwner: null
};
+ enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null));
+ tag._debugNeedsRemount = !1;
+ tag._debugHookTypes = null;
hasBadMapPolyfill ||
"function" !== typeof Object.preventExtensions ||
Object.preventExtensions(tag);
@@ -14018,6 +14122,9 @@ __DEV__ &&
(workInProgress.type = current.type),
(workInProgress.stateNode = current.stateNode),
(workInProgress._debugOwner = current._debugOwner),
+ enableOwnerStacks &&
+ ((workInProgress._debugStack = current._debugStack),
+ (workInProgress._debugTask = current._debugTask)),
(workInProgress._debugHookTypes = current._debugHookTypes),
(workInProgress.alternate = current),
(current.alternate = workInProgress))
@@ -14277,6 +14384,9 @@ __DEV__ &&
lanes
);
mode._debugOwner = element._owner;
+ enableOwnerStacks &&
+ ((mode._debugStack = element._debugStack),
+ (mode._debugTask = element._debugTask));
return mode;
}
function createFiberFromFragment(elements, mode, lanes, key) {
@@ -14517,6 +14627,7 @@ __DEV__ &&
syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs,
transitionLaneExpirationMs =
dynamicFeatureFlags.transitionLaneExpirationMs,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
@@ -16889,10 +17000,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
- version: "19.0.0-www-modern-7c4a7c9d-20241210",
+ version: "19.0.0-www-modern-a4964987-20241211",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16926,7 +17037,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
- exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-modern-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js
index 760adf7c9c..fddc97993d 100644
--- a/compiled/facebook-www/ReactART-prod.classic.js
+++ b/compiled/facebook-www/ReactART-prod.classic.js
@@ -10827,10 +10827,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1509 = {
bundleType: 0,
- version: "19.0.0-www-classic-7c4a7c9d-20241210",
+ version: "19.0.0-www-classic-a4964987-20241211",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1510 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10856,4 +10856,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
-exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-classic-a4964987-20241211";
diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js
index 8c75861ec9..6b0261c725 100644
--- a/compiled/facebook-www/ReactART-prod.modern.js
+++ b/compiled/facebook-www/ReactART-prod.modern.js
@@ -10543,10 +10543,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1488 = {
bundleType: 0,
- version: "19.0.0-www-modern-7c4a7c9d-20241210",
+ version: "19.0.0-www-modern-a4964987-20241211",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1489 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10572,4 +10572,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
-exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-modern-a4964987-20241211";
diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js
index d882c57f17..1779aed958 100644
--- a/compiled/facebook-www/ReactDOM-dev.classic.js
+++ b/compiled/facebook-www/ReactDOM-dev.classic.js
@@ -520,6 +520,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
@@ -570,13 +591,76 @@ __DEV__ &&
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
+ return (fn = fn ? fn.displayName || fn.name : "")
+ ? describeBuiltInComponentFrame(fn)
+ : "";
+ }
+ function getOwnerStackByFiberInDev(workInProgress) {
+ if (!enableOwnerStacks) return "";
+ try {
+ var info = "";
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
+ switch (workInProgress.tag) {
+ case 26:
+ case 27:
+ case 5:
+ info += describeBuiltInComponentFrame(workInProgress.type);
+ break;
+ case 13:
+ info += describeBuiltInComponentFrame("Suspense");
+ break;
+ case 19:
+ info += describeBuiltInComponentFrame("SuspenseList");
+ break;
+ case 0:
+ case 15:
+ case 1:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type
+ ));
+ break;
+ case 11:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type.render
+ ));
+ }
+ for (; workInProgress; )
+ if ("number" === typeof workInProgress.tag) {
+ var fiber = workInProgress;
+ workInProgress = fiber._debugOwner;
+ var debugStack = fiber._debugStack;
+ workInProgress &&
+ debugStack &&
+ ("string" !== typeof debugStack &&
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
+ "" !== debugStack && (info += "\n" + debugStack));
+ } else if (null != workInProgress.debugStack) {
+ var ownerStack = workInProgress.debugStack;
+ (workInProgress = workInProgress.owner) &&
+ ownerStack &&
+ (info += "\n" + formatOwnerStack(ownerStack));
+ } else break;
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
function getCurrentFiberOwnerNameInDevOrNull() {
if (null === current) return null;
var owner = current._debugOwner;
return null != owner ? getComponentNameFromOwner(owner) : null;
}
function getCurrentFiberStackInDev() {
- return null === current ? "" : getStackByFiberInDevAndProd(current);
+ return null === current
+ ? ""
+ : enableOwnerStacks
+ ? getOwnerStackByFiberInDev(current)
+ : getStackByFiberInDevAndProd(current);
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
@@ -585,7 +669,11 @@ __DEV__ &&
isRendering = !1;
current = fiber;
try {
- return callback(arg0, arg1, arg2, arg3, arg4);
+ return enableOwnerStacks && null !== fiber && fiber._debugTask
+ ? fiber._debugTask.run(
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
+ )
+ : callback(arg0, arg1, arg2, arg3, arg4);
} finally {
current = previousFiber;
}
@@ -2548,37 +2636,51 @@ __DEV__ &&
: findInvalidAncestorForTag(childTag, ancestorInfo);
ancestorInfo = parentInfo || ancestorInfo;
if (!ancestorInfo) return !0;
- ancestorInfo = ancestorInfo.tag;
- var warnKey = String(!!parentInfo) + "|" + childTag + "|" + ancestorInfo;
- if (didWarn[warnKey]) return !1;
- didWarn[warnKey] = !0;
- var ancestor = (warnKey = current)
- ? findAncestor(warnKey.return, ancestorInfo)
- : null;
- warnKey =
- null !== warnKey && null !== ancestor
- ? describeAncestors(ancestor, warnKey, null)
- : "";
- ancestor = "<" + childTag + ">";
+ var ancestorTag = ancestorInfo.tag;
+ ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
+ if (didWarn[ancestorInfo]) return !1;
+ didWarn[ancestorInfo] = !0;
+ var ancestor = (ancestorInfo = current)
+ ? findAncestor(ancestorInfo.return, ancestorTag)
+ : null,
+ ancestorDescription =
+ null !== ancestorInfo && null !== ancestor
+ ? describeAncestors(ancestor, ancestorInfo, null)
+ : "",
+ tagDisplayName = "<" + childTag + ">";
parentInfo
? ((parentInfo = ""),
- "table" === ancestorInfo &&
+ "table" === ancestorTag &&
"tr" === childTag &&
(parentInfo +=
" Add a
, or to your code to match the DOM tree generated by the browser."),
error$jscomp$0(
"In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
- ancestor,
- ancestorInfo,
+ tagDisplayName,
+ ancestorTag,
parentInfo,
- warnKey
+ ancestorDescription
))
: error$jscomp$0(
"In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
- ancestor,
- ancestorInfo,
- warnKey
+ tagDisplayName,
+ ancestorTag,
+ ancestorDescription
);
+ enableOwnerStacks &&
+ ancestorInfo &&
+ ((childTag = ancestorInfo.return),
+ null === ancestor ||
+ null === childTag ||
+ (ancestor === childTag &&
+ childTag._debugOwner === ancestorInfo._debugOwner) ||
+ runWithFiberInDEV(ancestor, function () {
+ error$jscomp$0(
+ "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
+ ancestorTag,
+ tagDisplayName
+ );
+ }));
return !1;
}
function validateTextNesting(childText, parentTag) {
@@ -6595,6 +6697,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -6669,6 +6772,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -6691,6 +6795,7 @@ __DEV__ &&
)),
(newChild.return = returnFiber),
(newChild._debugOwner = returnFiber),
+ enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask),
(newChild._debugInfo = currentDebugInfo),
newChild
);
@@ -6738,6 +6843,7 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask),
(returnFiber = pushDebugInfo(newChild._debugInfo)),
(lanes._debugInfo = currentDebugInfo),
(currentDebugInfo = returnFiber),
@@ -7275,6 +7381,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
validateFragmentProps(newChild, lanes, returnFiber),
(returnFiber = lanes))
@@ -7441,6 +7549,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
(returnFiber = lanes)),
placeSingleChild(returnFiber)
@@ -7470,10 +7580,13 @@ __DEV__ &&
fiber.return = returnFiber;
var debugInfo = (fiber._debugInfo = currentDebugInfo);
fiber._debugOwner = returnFiber._debugOwner;
+ enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask);
if (null != debugInfo)
for (var i = debugInfo.length - 1; 0 <= i; i--)
if ("string" === typeof debugInfo[i].stack) {
fiber._debugOwner = debugInfo[i];
+ enableOwnerStacks &&
+ (fiber._debugTask = debugInfo[i].debugTask);
break;
}
return fiber;
@@ -7711,12 +7824,14 @@ __DEV__ &&
error = componentName
? "An error occurred in the <" + componentName + "> component."
: "An error occurred in one of your React components.";
- var prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
warn(
"%s\n\n%s\n",
@@ -7724,7 +7839,8 @@ __DEV__ &&
"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
}
function defaultOnCaughtError(error$1, errorInfo) {
@@ -7734,12 +7850,14 @@ __DEV__ &&
recreateMessage =
"React will try to recreate this component tree from scratch using the error boundary you provided, " +
((errorBoundaryName || "Anonymous") + "."),
- prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
"object" === typeof error$1 &&
null !== error$1 &&
@@ -7761,7 +7879,8 @@ __DEV__ &&
recreateMessage
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
}
function defaultOnRecoverableError(error) {
@@ -9247,32 +9366,32 @@ __DEV__ &&
return current;
}
function updateSuspenseComponent(current, workInProgress, renderLanes) {
- var JSCompiler_object_inline_digest_2513;
- var JSCompiler_object_inline_stack_2514 = workInProgress.pendingProps;
+ var JSCompiler_object_inline_digest_2503;
+ var JSCompiler_object_inline_stack_2504 = workInProgress.pendingProps;
shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128);
- var JSCompiler_object_inline_componentStack_2515 = !1;
+ var JSCompiler_object_inline_componentStack_2505 = !1;
var didSuspend = 0 !== (workInProgress.flags & 128);
- (JSCompiler_object_inline_digest_2513 = didSuspend) ||
- (JSCompiler_object_inline_digest_2513 =
+ (JSCompiler_object_inline_digest_2503 = didSuspend) ||
+ (JSCompiler_object_inline_digest_2503 =
null !== current && null === current.memoizedState
? !1
: 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
- JSCompiler_object_inline_digest_2513 &&
- ((JSCompiler_object_inline_componentStack_2515 = !0),
+ JSCompiler_object_inline_digest_2503 &&
+ ((JSCompiler_object_inline_componentStack_2505 = !0),
(workInProgress.flags &= -129));
- JSCompiler_object_inline_digest_2513 = 0 !== (workInProgress.flags & 32);
+ JSCompiler_object_inline_digest_2503 = 0 !== (workInProgress.flags & 32);
workInProgress.flags &= -33;
if (null === current) {
if (isHydrating) {
- JSCompiler_object_inline_componentStack_2515
+ JSCompiler_object_inline_componentStack_2505
? pushPrimaryTreeSuspenseHandler(workInProgress)
: reuseSuspenseHandlerOnStack(workInProgress);
if (isHydrating) {
- var JSCompiler_object_inline_message_2512 = nextHydratableInstance;
+ var JSCompiler_object_inline_message_2502 = nextHydratableInstance;
var JSCompiler_temp;
- if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2512)) {
+ if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2502)) {
c: {
- var instance = JSCompiler_object_inline_message_2512;
+ var instance = JSCompiler_object_inline_message_2502;
for (
JSCompiler_temp = rootOrSingletonContext;
instance.nodeType !== COMMENT_NODE;
@@ -9313,46 +9432,46 @@ __DEV__ &&
JSCompiler_temp &&
(warnNonHydratedInstance(
workInProgress,
- JSCompiler_object_inline_message_2512
+ JSCompiler_object_inline_message_2502
),
throwOnHydrationMismatch(workInProgress));
}
- JSCompiler_object_inline_message_2512 = workInProgress.memoizedState;
+ JSCompiler_object_inline_message_2502 = workInProgress.memoizedState;
if (
- null !== JSCompiler_object_inline_message_2512 &&
- ((JSCompiler_object_inline_message_2512 =
- JSCompiler_object_inline_message_2512.dehydrated),
- null !== JSCompiler_object_inline_message_2512)
+ null !== JSCompiler_object_inline_message_2502 &&
+ ((JSCompiler_object_inline_message_2502 =
+ JSCompiler_object_inline_message_2502.dehydrated),
+ null !== JSCompiler_object_inline_message_2502)
)
return (
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2512)
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2502)
? (workInProgress.lanes = 16)
: (workInProgress.lanes = 536870912),
null
);
popSuspenseHandler(workInProgress);
}
- JSCompiler_object_inline_message_2512 =
- JSCompiler_object_inline_stack_2514.children;
- JSCompiler_temp = JSCompiler_object_inline_stack_2514.fallback;
- if (JSCompiler_object_inline_componentStack_2515)
+ JSCompiler_object_inline_message_2502 =
+ JSCompiler_object_inline_stack_2504.children;
+ JSCompiler_temp = JSCompiler_object_inline_stack_2504.fallback;
+ if (JSCompiler_object_inline_componentStack_2505)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2514 =
+ (JSCompiler_object_inline_stack_2504 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2512,
+ JSCompiler_object_inline_message_2502,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2515 =
+ (JSCompiler_object_inline_componentStack_2505 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2515.memoizedState =
+ (JSCompiler_object_inline_componentStack_2505.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2515.childLanes =
+ (JSCompiler_object_inline_componentStack_2505.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2513,
+ JSCompiler_object_inline_digest_2503,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
@@ -9365,9 +9484,9 @@ __DEV__ &&
? markerInstanceStack.current
: null),
(renderLanes =
- JSCompiler_object_inline_componentStack_2515.updateQueue),
+ JSCompiler_object_inline_componentStack_2505.updateQueue),
null === renderLanes
- ? (JSCompiler_object_inline_componentStack_2515.updateQueue =
+ ? (JSCompiler_object_inline_componentStack_2505.updateQueue =
{
transitions: workInProgress,
markerInstances: current,
@@ -9375,46 +9494,46 @@ __DEV__ &&
})
: ((renderLanes.transitions = workInProgress),
(renderLanes.markerInstances = current)))),
- JSCompiler_object_inline_stack_2514
+ JSCompiler_object_inline_stack_2504
);
if (
"number" ===
- typeof JSCompiler_object_inline_stack_2514.unstable_expectedLoadTime
+ typeof JSCompiler_object_inline_stack_2504.unstable_expectedLoadTime
)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2514 =
+ (JSCompiler_object_inline_stack_2504 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2512,
+ JSCompiler_object_inline_message_2502,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2515 =
+ (JSCompiler_object_inline_componentStack_2505 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2515.memoizedState =
+ (JSCompiler_object_inline_componentStack_2505.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2515.childLanes =
+ (JSCompiler_object_inline_componentStack_2505.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2513,
+ JSCompiler_object_inline_digest_2503,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress.lanes = 4194304),
- JSCompiler_object_inline_stack_2514
+ JSCompiler_object_inline_stack_2504
);
pushPrimaryTreeSuspenseHandler(workInProgress);
return mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_message_2512
+ JSCompiler_object_inline_message_2502
);
}
var prevState = current.memoizedState;
if (
null !== prevState &&
- ((JSCompiler_object_inline_message_2512 = prevState.dehydrated),
- null !== JSCompiler_object_inline_message_2512)
+ ((JSCompiler_object_inline_message_2502 = prevState.dehydrated),
+ null !== JSCompiler_object_inline_message_2502)
) {
if (didSuspend)
workInProgress.flags & 256
@@ -9431,94 +9550,94 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2515 =
- JSCompiler_object_inline_stack_2514.fallback),
- (JSCompiler_object_inline_message_2512 = workInProgress.mode),
- (JSCompiler_object_inline_stack_2514 =
+ (JSCompiler_object_inline_componentStack_2505 =
+ JSCompiler_object_inline_stack_2504.fallback),
+ (JSCompiler_object_inline_message_2502 = workInProgress.mode),
+ (JSCompiler_object_inline_stack_2504 =
mountWorkInProgressOffscreenFiber(
{
mode: "visible",
- children: JSCompiler_object_inline_stack_2514.children
+ children: JSCompiler_object_inline_stack_2504.children
},
- JSCompiler_object_inline_message_2512
+ JSCompiler_object_inline_message_2502
)),
- (JSCompiler_object_inline_componentStack_2515 =
+ (JSCompiler_object_inline_componentStack_2505 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2515,
- JSCompiler_object_inline_message_2512,
+ JSCompiler_object_inline_componentStack_2505,
+ JSCompiler_object_inline_message_2502,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2515.flags |= 2),
- (JSCompiler_object_inline_stack_2514.return = workInProgress),
- (JSCompiler_object_inline_componentStack_2515.return =
+ (JSCompiler_object_inline_componentStack_2505.flags |= 2),
+ (JSCompiler_object_inline_stack_2504.return = workInProgress),
+ (JSCompiler_object_inline_componentStack_2505.return =
workInProgress),
- (JSCompiler_object_inline_stack_2514.sibling =
- JSCompiler_object_inline_componentStack_2515),
- (workInProgress.child = JSCompiler_object_inline_stack_2514),
+ (JSCompiler_object_inline_stack_2504.sibling =
+ JSCompiler_object_inline_componentStack_2505),
+ (workInProgress.child = JSCompiler_object_inline_stack_2504),
reconcileChildFibers(
workInProgress,
current.child,
null,
renderLanes
),
- (JSCompiler_object_inline_stack_2514 = workInProgress.child),
- (JSCompiler_object_inline_stack_2514.memoizedState =
+ (JSCompiler_object_inline_stack_2504 = workInProgress.child),
+ (JSCompiler_object_inline_stack_2504.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_stack_2514.childLanes =
+ (JSCompiler_object_inline_stack_2504.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2513,
+ JSCompiler_object_inline_digest_2503,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress =
- JSCompiler_object_inline_componentStack_2515));
+ JSCompiler_object_inline_componentStack_2505));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isHydrating &&
error$jscomp$0(
"We should not be hydrating here. This is a bug in React. Please file a bug."
),
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2512))
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2502))
) {
- JSCompiler_object_inline_digest_2513 =
- JSCompiler_object_inline_message_2512.nextSibling &&
- JSCompiler_object_inline_message_2512.nextSibling.dataset;
- if (JSCompiler_object_inline_digest_2513) {
- JSCompiler_temp = JSCompiler_object_inline_digest_2513.dgst;
- var message = JSCompiler_object_inline_digest_2513.msg;
- instance = JSCompiler_object_inline_digest_2513.stck;
- var componentStack = JSCompiler_object_inline_digest_2513.cstck;
+ JSCompiler_object_inline_digest_2503 =
+ JSCompiler_object_inline_message_2502.nextSibling &&
+ JSCompiler_object_inline_message_2502.nextSibling.dataset;
+ if (JSCompiler_object_inline_digest_2503) {
+ JSCompiler_temp = JSCompiler_object_inline_digest_2503.dgst;
+ var message = JSCompiler_object_inline_digest_2503.msg;
+ instance = JSCompiler_object_inline_digest_2503.stck;
+ var componentStack = JSCompiler_object_inline_digest_2503.cstck;
}
- JSCompiler_object_inline_message_2512 = message;
- JSCompiler_object_inline_digest_2513 = JSCompiler_temp;
- JSCompiler_object_inline_stack_2514 = instance;
- JSCompiler_temp = JSCompiler_object_inline_componentStack_2515 =
+ JSCompiler_object_inline_message_2502 = message;
+ JSCompiler_object_inline_digest_2503 = JSCompiler_temp;
+ JSCompiler_object_inline_stack_2504 = instance;
+ JSCompiler_temp = JSCompiler_object_inline_componentStack_2505 =
componentStack;
- JSCompiler_object_inline_componentStack_2515 =
- JSCompiler_object_inline_message_2512
- ? Error(JSCompiler_object_inline_message_2512)
+ JSCompiler_object_inline_componentStack_2505 =
+ JSCompiler_object_inline_message_2502
+ ? Error(JSCompiler_object_inline_message_2502)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
);
- JSCompiler_object_inline_componentStack_2515.stack =
- JSCompiler_object_inline_stack_2514 || "";
- JSCompiler_object_inline_componentStack_2515.digest =
- JSCompiler_object_inline_digest_2513;
- JSCompiler_object_inline_digest_2513 =
+ JSCompiler_object_inline_componentStack_2505.stack =
+ JSCompiler_object_inline_stack_2504 || "";
+ JSCompiler_object_inline_componentStack_2505.digest =
+ JSCompiler_object_inline_digest_2503;
+ JSCompiler_object_inline_digest_2503 =
void 0 === JSCompiler_temp ? null : JSCompiler_temp;
- JSCompiler_object_inline_stack_2514 = {
- value: JSCompiler_object_inline_componentStack_2515,
+ JSCompiler_object_inline_stack_2504 = {
+ value: JSCompiler_object_inline_componentStack_2505,
source: null,
- stack: JSCompiler_object_inline_digest_2513
+ stack: JSCompiler_object_inline_digest_2503
};
- "string" === typeof JSCompiler_object_inline_digest_2513 &&
+ "string" === typeof JSCompiler_object_inline_digest_2503 &&
CapturedStacks.set(
- JSCompiler_object_inline_componentStack_2515,
- JSCompiler_object_inline_stack_2514
+ JSCompiler_object_inline_componentStack_2505,
+ JSCompiler_object_inline_stack_2504
);
- queueHydrationError(JSCompiler_object_inline_stack_2514);
+ queueHydrationError(JSCompiler_object_inline_stack_2504);
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -9532,25 +9651,25 @@ __DEV__ &&
renderLanes,
!1
),
- (JSCompiler_object_inline_digest_2513 =
+ (JSCompiler_object_inline_digest_2503 =
0 !== (renderLanes & current.childLanes)),
- didReceiveUpdate || JSCompiler_object_inline_digest_2513)
+ didReceiveUpdate || JSCompiler_object_inline_digest_2503)
) {
- JSCompiler_object_inline_digest_2513 = workInProgressRoot;
- if (null !== JSCompiler_object_inline_digest_2513) {
- JSCompiler_object_inline_stack_2514 = renderLanes & -renderLanes;
- if (0 !== (JSCompiler_object_inline_stack_2514 & 42))
- JSCompiler_object_inline_stack_2514 = 1;
+ JSCompiler_object_inline_digest_2503 = workInProgressRoot;
+ if (null !== JSCompiler_object_inline_digest_2503) {
+ JSCompiler_object_inline_stack_2504 = renderLanes & -renderLanes;
+ if (0 !== (JSCompiler_object_inline_stack_2504 & 42))
+ JSCompiler_object_inline_stack_2504 = 1;
else
- switch (JSCompiler_object_inline_stack_2514) {
+ switch (JSCompiler_object_inline_stack_2504) {
case 2:
- JSCompiler_object_inline_stack_2514 = 1;
+ JSCompiler_object_inline_stack_2504 = 1;
break;
case 8:
- JSCompiler_object_inline_stack_2514 = 4;
+ JSCompiler_object_inline_stack_2504 = 4;
break;
case 32:
- JSCompiler_object_inline_stack_2514 = 16;
+ JSCompiler_object_inline_stack_2504 = 16;
break;
case 128:
case 256:
@@ -9571,40 +9690,40 @@ __DEV__ &&
case 8388608:
case 16777216:
case 33554432:
- JSCompiler_object_inline_stack_2514 = 64;
+ JSCompiler_object_inline_stack_2504 = 64;
break;
case 268435456:
- JSCompiler_object_inline_stack_2514 = 134217728;
+ JSCompiler_object_inline_stack_2504 = 134217728;
break;
default:
- JSCompiler_object_inline_stack_2514 = 0;
+ JSCompiler_object_inline_stack_2504 = 0;
}
- JSCompiler_object_inline_stack_2514 =
+ JSCompiler_object_inline_stack_2504 =
0 !==
- (JSCompiler_object_inline_stack_2514 &
- (JSCompiler_object_inline_digest_2513.suspendedLanes |
+ (JSCompiler_object_inline_stack_2504 &
+ (JSCompiler_object_inline_digest_2503.suspendedLanes |
renderLanes))
? 0
- : JSCompiler_object_inline_stack_2514;
+ : JSCompiler_object_inline_stack_2504;
if (
- 0 !== JSCompiler_object_inline_stack_2514 &&
- JSCompiler_object_inline_stack_2514 !== prevState.retryLane
+ 0 !== JSCompiler_object_inline_stack_2504 &&
+ JSCompiler_object_inline_stack_2504 !== prevState.retryLane
)
throw (
- ((prevState.retryLane = JSCompiler_object_inline_stack_2514),
+ ((prevState.retryLane = JSCompiler_object_inline_stack_2504),
enqueueConcurrentRenderForLane(
current,
- JSCompiler_object_inline_stack_2514
+ JSCompiler_object_inline_stack_2504
),
scheduleUpdateOnFiber(
- JSCompiler_object_inline_digest_2513,
+ JSCompiler_object_inline_digest_2503,
current,
- JSCompiler_object_inline_stack_2514
+ JSCompiler_object_inline_stack_2504
),
SelectiveHydrationException)
);
}
- JSCompiler_object_inline_message_2512.data ===
+ JSCompiler_object_inline_message_2502.data ===
SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -9612,14 +9731,14 @@ __DEV__ &&
renderLanes
);
} else
- JSCompiler_object_inline_message_2512.data ===
+ JSCompiler_object_inline_message_2502.data ===
SUSPENSE_PENDING_START_DATA
? ((workInProgress.flags |= 192),
(workInProgress.child = current.child),
(workInProgress = null))
: ((current = prevState.treeContext),
(nextHydratableInstance = getNextHydratable(
- JSCompiler_object_inline_message_2512.nextSibling
+ JSCompiler_object_inline_message_2502.nextSibling
)),
(hydrationParentFiber = workInProgress),
(isHydrating = !0),
@@ -9637,57 +9756,57 @@ __DEV__ &&
(treeContextProvider = workInProgress)),
(workInProgress = mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_stack_2514.children
+ JSCompiler_object_inline_stack_2504.children
)),
(workInProgress.flags |= 4096));
return workInProgress;
}
- if (JSCompiler_object_inline_componentStack_2515)
+ if (JSCompiler_object_inline_componentStack_2505)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2515 =
- JSCompiler_object_inline_stack_2514.fallback),
- (JSCompiler_object_inline_message_2512 = workInProgress.mode),
+ (JSCompiler_object_inline_componentStack_2505 =
+ JSCompiler_object_inline_stack_2504.fallback),
+ (JSCompiler_object_inline_message_2502 = workInProgress.mode),
(JSCompiler_temp = current.child),
(instance = JSCompiler_temp.sibling),
- (JSCompiler_object_inline_stack_2514 = createWorkInProgress(
+ (JSCompiler_object_inline_stack_2504 = createWorkInProgress(
JSCompiler_temp,
{
mode: "hidden",
- children: JSCompiler_object_inline_stack_2514.children
+ children: JSCompiler_object_inline_stack_2504.children
}
)),
- (JSCompiler_object_inline_stack_2514.subtreeFlags =
+ (JSCompiler_object_inline_stack_2504.subtreeFlags =
JSCompiler_temp.subtreeFlags & 31457280),
null !== instance
- ? (JSCompiler_object_inline_componentStack_2515 =
+ ? (JSCompiler_object_inline_componentStack_2505 =
createWorkInProgress(
instance,
- JSCompiler_object_inline_componentStack_2515
+ JSCompiler_object_inline_componentStack_2505
))
- : ((JSCompiler_object_inline_componentStack_2515 =
+ : ((JSCompiler_object_inline_componentStack_2505 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2515,
- JSCompiler_object_inline_message_2512,
+ JSCompiler_object_inline_componentStack_2505,
+ JSCompiler_object_inline_message_2502,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2515.flags |= 2)),
- (JSCompiler_object_inline_componentStack_2515.return =
+ (JSCompiler_object_inline_componentStack_2505.flags |= 2)),
+ (JSCompiler_object_inline_componentStack_2505.return =
workInProgress),
- (JSCompiler_object_inline_stack_2514.return = workInProgress),
- (JSCompiler_object_inline_stack_2514.sibling =
- JSCompiler_object_inline_componentStack_2515),
- (workInProgress.child = JSCompiler_object_inline_stack_2514),
- (JSCompiler_object_inline_stack_2514 =
- JSCompiler_object_inline_componentStack_2515),
- (JSCompiler_object_inline_componentStack_2515 = workInProgress.child),
- (JSCompiler_object_inline_message_2512 = current.child.memoizedState),
- null === JSCompiler_object_inline_message_2512
- ? (JSCompiler_object_inline_message_2512 =
+ (JSCompiler_object_inline_stack_2504.return = workInProgress),
+ (JSCompiler_object_inline_stack_2504.sibling =
+ JSCompiler_object_inline_componentStack_2505),
+ (workInProgress.child = JSCompiler_object_inline_stack_2504),
+ (JSCompiler_object_inline_stack_2504 =
+ JSCompiler_object_inline_componentStack_2505),
+ (JSCompiler_object_inline_componentStack_2505 = workInProgress.child),
+ (JSCompiler_object_inline_message_2502 = current.child.memoizedState),
+ null === JSCompiler_object_inline_message_2502
+ ? (JSCompiler_object_inline_message_2502 =
mountSuspenseOffscreenState(renderLanes))
: ((JSCompiler_temp =
- JSCompiler_object_inline_message_2512.cachePool),
+ JSCompiler_object_inline_message_2502.cachePool),
null !== JSCompiler_temp
? ((instance = CacheContext._currentValue),
(JSCompiler_temp =
@@ -9695,34 +9814,34 @@ __DEV__ &&
? { parent: instance, pool: instance }
: JSCompiler_temp))
: (JSCompiler_temp = getSuspendedCache()),
- (JSCompiler_object_inline_message_2512 = {
+ (JSCompiler_object_inline_message_2502 = {
baseLanes:
- JSCompiler_object_inline_message_2512.baseLanes | renderLanes,
+ JSCompiler_object_inline_message_2502.baseLanes | renderLanes,
cachePool: JSCompiler_temp
})),
- (JSCompiler_object_inline_componentStack_2515.memoizedState =
- JSCompiler_object_inline_message_2512),
+ (JSCompiler_object_inline_componentStack_2505.memoizedState =
+ JSCompiler_object_inline_message_2502),
enableTransitionTracing &&
- ((JSCompiler_object_inline_message_2512 = enableTransitionTracing
+ ((JSCompiler_object_inline_message_2502 = enableTransitionTracing
? transitionStack.current
: null),
- null !== JSCompiler_object_inline_message_2512 &&
+ null !== JSCompiler_object_inline_message_2502 &&
((JSCompiler_temp = enableTransitionTracing
? markerInstanceStack.current
: null),
(instance =
- JSCompiler_object_inline_componentStack_2515.updateQueue),
+ JSCompiler_object_inline_componentStack_2505.updateQueue),
(componentStack = current.updateQueue),
null === instance
- ? (JSCompiler_object_inline_componentStack_2515.updateQueue = {
- transitions: JSCompiler_object_inline_message_2512,
+ ? (JSCompiler_object_inline_componentStack_2505.updateQueue = {
+ transitions: JSCompiler_object_inline_message_2502,
markerInstances: JSCompiler_temp,
retryQueue: null
})
: instance === componentStack
- ? (JSCompiler_object_inline_componentStack_2515.updateQueue =
+ ? (JSCompiler_object_inline_componentStack_2505.updateQueue =
{
- transitions: JSCompiler_object_inline_message_2512,
+ transitions: JSCompiler_object_inline_message_2502,
markerInstances: JSCompiler_temp,
retryQueue:
null !== componentStack
@@ -9730,32 +9849,32 @@ __DEV__ &&
: null
})
: ((instance.transitions =
- JSCompiler_object_inline_message_2512),
+ JSCompiler_object_inline_message_2502),
(instance.markerInstances = JSCompiler_temp)))),
- (JSCompiler_object_inline_componentStack_2515.childLanes =
+ (JSCompiler_object_inline_componentStack_2505.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2513,
+ JSCompiler_object_inline_digest_2503,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
- JSCompiler_object_inline_stack_2514
+ JSCompiler_object_inline_stack_2504
);
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
mode: "visible",
- children: JSCompiler_object_inline_stack_2514.children
+ children: JSCompiler_object_inline_stack_2504.children
});
renderLanes.return = workInProgress;
renderLanes.sibling = null;
null !== current &&
- ((JSCompiler_object_inline_digest_2513 = workInProgress.deletions),
- null === JSCompiler_object_inline_digest_2513
+ ((JSCompiler_object_inline_digest_2503 = workInProgress.deletions),
+ null === JSCompiler_object_inline_digest_2503
? ((workInProgress.deletions = [current]),
(workInProgress.flags |= 16))
- : JSCompiler_object_inline_digest_2513.push(current));
+ : JSCompiler_object_inline_digest_2503.push(current));
workInProgress.child = renderLanes;
workInProgress.memoizedState = null;
return renderLanes;
@@ -10203,6 +10322,9 @@ __DEV__ &&
workInProgress.mode,
workInProgress.lanes
);
+ enableOwnerStacks &&
+ ((renderLanes._debugStack = workInProgress._debugStack),
+ (renderLanes._debugTask = workInProgress._debugTask));
var returnFiber = workInProgress.return;
if (null === returnFiber) throw Error("Cannot swap the root fiber.");
current.alternate = null;
@@ -17322,6 +17444,7 @@ __DEV__ &&
this.actualStartTime = -1.1;
this.treeBaseDuration = this.selfBaseDuration = -0;
this._debugOwner = this._debugInfo = null;
+ enableOwnerStacks && (this._debugTask = this._debugStack = null);
this._debugNeedsRemount = !1;
this._debugHookTypes = null;
hasBadMapPolyfill ||
@@ -17361,10 +17484,11 @@ __DEV__ &&
selfBaseDuration: -0,
treeBaseDuration: -0,
_debugInfo: null,
- _debugOwner: null,
- _debugNeedsRemount: !1,
- _debugHookTypes: null
+ _debugOwner: null
};
+ enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null));
+ tag._debugNeedsRemount = !1;
+ tag._debugHookTypes = null;
hasBadMapPolyfill ||
"function" !== typeof Object.preventExtensions ||
Object.preventExtensions(tag);
@@ -17387,6 +17511,9 @@ __DEV__ &&
(workInProgress.type = current.type),
(workInProgress.stateNode = current.stateNode),
(workInProgress._debugOwner = current._debugOwner),
+ enableOwnerStacks &&
+ ((workInProgress._debugStack = current._debugStack),
+ (workInProgress._debugTask = current._debugTask)),
(workInProgress._debugHookTypes = current._debugHookTypes),
(workInProgress.alternate = current),
(current.alternate = workInProgress))
@@ -17646,6 +17773,9 @@ __DEV__ &&
lanes
);
mode._debugOwner = element._owner;
+ enableOwnerStacks &&
+ ((mode._debugStack = element._debugStack),
+ (mode._debugTask = element._debugTask));
return mode;
}
function createFiberFromFragment(elements, mode, lanes, key) {
@@ -18687,6 +18817,15 @@ __DEV__ &&
});
}
}
+ function executeDispatch(event, listener, currentTarget) {
+ event.currentTarget = currentTarget;
+ try {
+ listener(event);
+ } catch (error$43) {
+ reportGlobalError(error$43);
+ }
+ event.currentTarget = null;
+ }
function processDispatchQueue(dispatchQueue, eventSystemFlags) {
eventSystemFlags = 0 !== (eventSystemFlags & 4);
for (var i = 0; i < dispatchQueue.length; i++) {
@@ -18707,14 +18846,15 @@ __DEV__ &&
_dispatchListeners$i = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped())
break a;
- previousInstance = event;
- previousInstance.currentTarget = currentTarget;
- try {
- _dispatchListeners$i(previousInstance);
- } catch (error$43) {
- reportGlobalError(error$43);
- }
- previousInstance.currentTarget = null;
+ enableOwnerStacks && null !== instance
+ ? runWithFiberInDEV(
+ instance,
+ executeDispatch,
+ event,
+ _dispatchListeners$i,
+ currentTarget
+ )
+ : executeDispatch(event, _dispatchListeners$i, currentTarget);
previousInstance = instance;
}
else
@@ -18729,14 +18869,15 @@ __DEV__ &&
_dispatchListeners$i = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped())
break a;
- previousInstance = event;
- previousInstance.currentTarget = currentTarget;
- try {
- _dispatchListeners$i(previousInstance);
- } catch (error$43) {
- reportGlobalError(error$43);
- }
- previousInstance.currentTarget = null;
+ enableOwnerStacks && null !== instance
+ ? runWithFiberInDEV(
+ instance,
+ executeDispatch,
+ event,
+ _dispatchListeners$i,
+ currentTarget
+ )
+ : executeDispatch(event, _dispatchListeners$i, currentTarget);
previousInstance = instance;
}
}
@@ -23672,6 +23813,7 @@ __DEV__ &&
syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs,
transitionLaneExpirationMs =
dynamicFeatureFlags.transitionLaneExpirationMs,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
@@ -27569,11 +27711,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
- if ("19.0.0-www-classic-7c4a7c9d-20241210" !== isomorphicReactPackageVersion)
+ if ("19.0.0-www-classic-a4964987-20241211" !== 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-7c4a7c9d-20241210\nLearn more: https://react.dev/warnings/version-mismatch")
+ "\n - react-dom: 19.0.0-www-classic-a4964987-20241211\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -27616,10 +27758,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
- version: "19.0.0-www-classic-7c4a7c9d-20241210",
+ version: "19.0.0-www-classic-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -28224,7 +28366,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
- exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-classic-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js
index d4fbb4d8be..0c767dc8c1 100644
--- a/compiled/facebook-www/ReactDOM-dev.modern.js
+++ b/compiled/facebook-www/ReactDOM-dev.modern.js
@@ -520,6 +520,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
@@ -570,13 +591,76 @@ __DEV__ &&
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
+ return (fn = fn ? fn.displayName || fn.name : "")
+ ? describeBuiltInComponentFrame(fn)
+ : "";
+ }
+ function getOwnerStackByFiberInDev(workInProgress) {
+ if (!enableOwnerStacks) return "";
+ try {
+ var info = "";
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
+ switch (workInProgress.tag) {
+ case 26:
+ case 27:
+ case 5:
+ info += describeBuiltInComponentFrame(workInProgress.type);
+ break;
+ case 13:
+ info += describeBuiltInComponentFrame("Suspense");
+ break;
+ case 19:
+ info += describeBuiltInComponentFrame("SuspenseList");
+ break;
+ case 0:
+ case 15:
+ case 1:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type
+ ));
+ break;
+ case 11:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type.render
+ ));
+ }
+ for (; workInProgress; )
+ if ("number" === typeof workInProgress.tag) {
+ var fiber = workInProgress;
+ workInProgress = fiber._debugOwner;
+ var debugStack = fiber._debugStack;
+ workInProgress &&
+ debugStack &&
+ ("string" !== typeof debugStack &&
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
+ "" !== debugStack && (info += "\n" + debugStack));
+ } else if (null != workInProgress.debugStack) {
+ var ownerStack = workInProgress.debugStack;
+ (workInProgress = workInProgress.owner) &&
+ ownerStack &&
+ (info += "\n" + formatOwnerStack(ownerStack));
+ } else break;
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
function getCurrentFiberOwnerNameInDevOrNull() {
if (null === current) return null;
var owner = current._debugOwner;
return null != owner ? getComponentNameFromOwner(owner) : null;
}
function getCurrentFiberStackInDev() {
- return null === current ? "" : getStackByFiberInDevAndProd(current);
+ return null === current
+ ? ""
+ : enableOwnerStacks
+ ? getOwnerStackByFiberInDev(current)
+ : getStackByFiberInDevAndProd(current);
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
@@ -585,7 +669,11 @@ __DEV__ &&
isRendering = !1;
current = fiber;
try {
- return callback(arg0, arg1, arg2, arg3, arg4);
+ return enableOwnerStacks && null !== fiber && fiber._debugTask
+ ? fiber._debugTask.run(
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
+ )
+ : callback(arg0, arg1, arg2, arg3, arg4);
} finally {
current = previousFiber;
}
@@ -2534,37 +2622,51 @@ __DEV__ &&
: findInvalidAncestorForTag(childTag, ancestorInfo);
ancestorInfo = parentInfo || ancestorInfo;
if (!ancestorInfo) return !0;
- ancestorInfo = ancestorInfo.tag;
- var warnKey = String(!!parentInfo) + "|" + childTag + "|" + ancestorInfo;
- if (didWarn[warnKey]) return !1;
- didWarn[warnKey] = !0;
- var ancestor = (warnKey = current)
- ? findAncestor(warnKey.return, ancestorInfo)
- : null;
- warnKey =
- null !== warnKey && null !== ancestor
- ? describeAncestors(ancestor, warnKey, null)
- : "";
- ancestor = "<" + childTag + ">";
+ var ancestorTag = ancestorInfo.tag;
+ ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
+ if (didWarn[ancestorInfo]) return !1;
+ didWarn[ancestorInfo] = !0;
+ var ancestor = (ancestorInfo = current)
+ ? findAncestor(ancestorInfo.return, ancestorTag)
+ : null,
+ ancestorDescription =
+ null !== ancestorInfo && null !== ancestor
+ ? describeAncestors(ancestor, ancestorInfo, null)
+ : "",
+ tagDisplayName = "<" + childTag + ">";
parentInfo
? ((parentInfo = ""),
- "table" === ancestorInfo &&
+ "table" === ancestorTag &&
"tr" === childTag &&
(parentInfo +=
" Add a , or to your code to match the DOM tree generated by the browser."),
error$jscomp$0(
"In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
- ancestor,
- ancestorInfo,
+ tagDisplayName,
+ ancestorTag,
parentInfo,
- warnKey
+ ancestorDescription
))
: error$jscomp$0(
"In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
- ancestor,
- ancestorInfo,
- warnKey
+ tagDisplayName,
+ ancestorTag,
+ ancestorDescription
);
+ enableOwnerStacks &&
+ ancestorInfo &&
+ ((childTag = ancestorInfo.return),
+ null === ancestor ||
+ null === childTag ||
+ (ancestor === childTag &&
+ childTag._debugOwner === ancestorInfo._debugOwner) ||
+ runWithFiberInDEV(ancestor, function () {
+ error$jscomp$0(
+ "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
+ ancestorTag,
+ tagDisplayName
+ );
+ }));
return !1;
}
function validateTextNesting(childText, parentTag) {
@@ -6482,6 +6584,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -6556,6 +6659,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -6578,6 +6682,7 @@ __DEV__ &&
)),
(newChild.return = returnFiber),
(newChild._debugOwner = returnFiber),
+ enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask),
(newChild._debugInfo = currentDebugInfo),
newChild
);
@@ -6625,6 +6730,7 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask),
(returnFiber = pushDebugInfo(newChild._debugInfo)),
(lanes._debugInfo = currentDebugInfo),
(currentDebugInfo = returnFiber),
@@ -7162,6 +7268,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
validateFragmentProps(newChild, lanes, returnFiber),
(returnFiber = lanes))
@@ -7328,6 +7436,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
(returnFiber = lanes)),
placeSingleChild(returnFiber)
@@ -7357,10 +7467,13 @@ __DEV__ &&
fiber.return = returnFiber;
var debugInfo = (fiber._debugInfo = currentDebugInfo);
fiber._debugOwner = returnFiber._debugOwner;
+ enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask);
if (null != debugInfo)
for (var i = debugInfo.length - 1; 0 <= i; i--)
if ("string" === typeof debugInfo[i].stack) {
fiber._debugOwner = debugInfo[i];
+ enableOwnerStacks &&
+ (fiber._debugTask = debugInfo[i].debugTask);
break;
}
return fiber;
@@ -7598,12 +7711,14 @@ __DEV__ &&
error = componentName
? "An error occurred in the <" + componentName + "> component."
: "An error occurred in one of your React components.";
- var prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
warn(
"%s\n\n%s\n",
@@ -7611,7 +7726,8 @@ __DEV__ &&
"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
}
function defaultOnCaughtError(error$1, errorInfo) {
@@ -7621,12 +7737,14 @@ __DEV__ &&
recreateMessage =
"React will try to recreate this component tree from scratch using the error boundary you provided, " +
((errorBoundaryName || "Anonymous") + "."),
- prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
"object" === typeof error$1 &&
null !== error$1 &&
@@ -7648,7 +7766,8 @@ __DEV__ &&
recreateMessage
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
}
function defaultOnRecoverableError(error) {
@@ -9059,32 +9178,32 @@ __DEV__ &&
return current;
}
function updateSuspenseComponent(current, workInProgress, renderLanes) {
- var JSCompiler_object_inline_digest_2505;
- var JSCompiler_object_inline_stack_2506 = workInProgress.pendingProps;
+ var JSCompiler_object_inline_digest_2495;
+ var JSCompiler_object_inline_stack_2496 = workInProgress.pendingProps;
shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128);
- var JSCompiler_object_inline_componentStack_2507 = !1;
+ var JSCompiler_object_inline_componentStack_2497 = !1;
var didSuspend = 0 !== (workInProgress.flags & 128);
- (JSCompiler_object_inline_digest_2505 = didSuspend) ||
- (JSCompiler_object_inline_digest_2505 =
+ (JSCompiler_object_inline_digest_2495 = didSuspend) ||
+ (JSCompiler_object_inline_digest_2495 =
null !== current && null === current.memoizedState
? !1
: 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
- JSCompiler_object_inline_digest_2505 &&
- ((JSCompiler_object_inline_componentStack_2507 = !0),
+ JSCompiler_object_inline_digest_2495 &&
+ ((JSCompiler_object_inline_componentStack_2497 = !0),
(workInProgress.flags &= -129));
- JSCompiler_object_inline_digest_2505 = 0 !== (workInProgress.flags & 32);
+ JSCompiler_object_inline_digest_2495 = 0 !== (workInProgress.flags & 32);
workInProgress.flags &= -33;
if (null === current) {
if (isHydrating) {
- JSCompiler_object_inline_componentStack_2507
+ JSCompiler_object_inline_componentStack_2497
? pushPrimaryTreeSuspenseHandler(workInProgress)
: reuseSuspenseHandlerOnStack(workInProgress);
if (isHydrating) {
- var JSCompiler_object_inline_message_2504 = nextHydratableInstance;
+ var JSCompiler_object_inline_message_2494 = nextHydratableInstance;
var JSCompiler_temp;
- if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2504)) {
+ if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2494)) {
c: {
- var instance = JSCompiler_object_inline_message_2504;
+ var instance = JSCompiler_object_inline_message_2494;
for (
JSCompiler_temp = rootOrSingletonContext;
instance.nodeType !== COMMENT_NODE;
@@ -9125,46 +9244,46 @@ __DEV__ &&
JSCompiler_temp &&
(warnNonHydratedInstance(
workInProgress,
- JSCompiler_object_inline_message_2504
+ JSCompiler_object_inline_message_2494
),
throwOnHydrationMismatch(workInProgress));
}
- JSCompiler_object_inline_message_2504 = workInProgress.memoizedState;
+ JSCompiler_object_inline_message_2494 = workInProgress.memoizedState;
if (
- null !== JSCompiler_object_inline_message_2504 &&
- ((JSCompiler_object_inline_message_2504 =
- JSCompiler_object_inline_message_2504.dehydrated),
- null !== JSCompiler_object_inline_message_2504)
+ null !== JSCompiler_object_inline_message_2494 &&
+ ((JSCompiler_object_inline_message_2494 =
+ JSCompiler_object_inline_message_2494.dehydrated),
+ null !== JSCompiler_object_inline_message_2494)
)
return (
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2504)
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2494)
? (workInProgress.lanes = 16)
: (workInProgress.lanes = 536870912),
null
);
popSuspenseHandler(workInProgress);
}
- JSCompiler_object_inline_message_2504 =
- JSCompiler_object_inline_stack_2506.children;
- JSCompiler_temp = JSCompiler_object_inline_stack_2506.fallback;
- if (JSCompiler_object_inline_componentStack_2507)
+ JSCompiler_object_inline_message_2494 =
+ JSCompiler_object_inline_stack_2496.children;
+ JSCompiler_temp = JSCompiler_object_inline_stack_2496.fallback;
+ if (JSCompiler_object_inline_componentStack_2497)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2506 =
+ (JSCompiler_object_inline_stack_2496 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2504,
+ JSCompiler_object_inline_message_2494,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2507 =
+ (JSCompiler_object_inline_componentStack_2497 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2507.memoizedState =
+ (JSCompiler_object_inline_componentStack_2497.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2507.childLanes =
+ (JSCompiler_object_inline_componentStack_2497.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2505,
+ JSCompiler_object_inline_digest_2495,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
@@ -9177,9 +9296,9 @@ __DEV__ &&
? markerInstanceStack.current
: null),
(renderLanes =
- JSCompiler_object_inline_componentStack_2507.updateQueue),
+ JSCompiler_object_inline_componentStack_2497.updateQueue),
null === renderLanes
- ? (JSCompiler_object_inline_componentStack_2507.updateQueue =
+ ? (JSCompiler_object_inline_componentStack_2497.updateQueue =
{
transitions: workInProgress,
markerInstances: current,
@@ -9187,46 +9306,46 @@ __DEV__ &&
})
: ((renderLanes.transitions = workInProgress),
(renderLanes.markerInstances = current)))),
- JSCompiler_object_inline_stack_2506
+ JSCompiler_object_inline_stack_2496
);
if (
"number" ===
- typeof JSCompiler_object_inline_stack_2506.unstable_expectedLoadTime
+ typeof JSCompiler_object_inline_stack_2496.unstable_expectedLoadTime
)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2506 =
+ (JSCompiler_object_inline_stack_2496 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2504,
+ JSCompiler_object_inline_message_2494,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2507 =
+ (JSCompiler_object_inline_componentStack_2497 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2507.memoizedState =
+ (JSCompiler_object_inline_componentStack_2497.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2507.childLanes =
+ (JSCompiler_object_inline_componentStack_2497.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2505,
+ JSCompiler_object_inline_digest_2495,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress.lanes = 4194304),
- JSCompiler_object_inline_stack_2506
+ JSCompiler_object_inline_stack_2496
);
pushPrimaryTreeSuspenseHandler(workInProgress);
return mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_message_2504
+ JSCompiler_object_inline_message_2494
);
}
var prevState = current.memoizedState;
if (
null !== prevState &&
- ((JSCompiler_object_inline_message_2504 = prevState.dehydrated),
- null !== JSCompiler_object_inline_message_2504)
+ ((JSCompiler_object_inline_message_2494 = prevState.dehydrated),
+ null !== JSCompiler_object_inline_message_2494)
) {
if (didSuspend)
workInProgress.flags & 256
@@ -9243,94 +9362,94 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2507 =
- JSCompiler_object_inline_stack_2506.fallback),
- (JSCompiler_object_inline_message_2504 = workInProgress.mode),
- (JSCompiler_object_inline_stack_2506 =
+ (JSCompiler_object_inline_componentStack_2497 =
+ JSCompiler_object_inline_stack_2496.fallback),
+ (JSCompiler_object_inline_message_2494 = workInProgress.mode),
+ (JSCompiler_object_inline_stack_2496 =
mountWorkInProgressOffscreenFiber(
{
mode: "visible",
- children: JSCompiler_object_inline_stack_2506.children
+ children: JSCompiler_object_inline_stack_2496.children
},
- JSCompiler_object_inline_message_2504
+ JSCompiler_object_inline_message_2494
)),
- (JSCompiler_object_inline_componentStack_2507 =
+ (JSCompiler_object_inline_componentStack_2497 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2507,
- JSCompiler_object_inline_message_2504,
+ JSCompiler_object_inline_componentStack_2497,
+ JSCompiler_object_inline_message_2494,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2507.flags |= 2),
- (JSCompiler_object_inline_stack_2506.return = workInProgress),
- (JSCompiler_object_inline_componentStack_2507.return =
+ (JSCompiler_object_inline_componentStack_2497.flags |= 2),
+ (JSCompiler_object_inline_stack_2496.return = workInProgress),
+ (JSCompiler_object_inline_componentStack_2497.return =
workInProgress),
- (JSCompiler_object_inline_stack_2506.sibling =
- JSCompiler_object_inline_componentStack_2507),
- (workInProgress.child = JSCompiler_object_inline_stack_2506),
+ (JSCompiler_object_inline_stack_2496.sibling =
+ JSCompiler_object_inline_componentStack_2497),
+ (workInProgress.child = JSCompiler_object_inline_stack_2496),
reconcileChildFibers(
workInProgress,
current.child,
null,
renderLanes
),
- (JSCompiler_object_inline_stack_2506 = workInProgress.child),
- (JSCompiler_object_inline_stack_2506.memoizedState =
+ (JSCompiler_object_inline_stack_2496 = workInProgress.child),
+ (JSCompiler_object_inline_stack_2496.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_stack_2506.childLanes =
+ (JSCompiler_object_inline_stack_2496.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2505,
+ JSCompiler_object_inline_digest_2495,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress =
- JSCompiler_object_inline_componentStack_2507));
+ JSCompiler_object_inline_componentStack_2497));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isHydrating &&
error$jscomp$0(
"We should not be hydrating here. This is a bug in React. Please file a bug."
),
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2504))
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2494))
) {
- JSCompiler_object_inline_digest_2505 =
- JSCompiler_object_inline_message_2504.nextSibling &&
- JSCompiler_object_inline_message_2504.nextSibling.dataset;
- if (JSCompiler_object_inline_digest_2505) {
- JSCompiler_temp = JSCompiler_object_inline_digest_2505.dgst;
- var message = JSCompiler_object_inline_digest_2505.msg;
- instance = JSCompiler_object_inline_digest_2505.stck;
- var componentStack = JSCompiler_object_inline_digest_2505.cstck;
+ JSCompiler_object_inline_digest_2495 =
+ JSCompiler_object_inline_message_2494.nextSibling &&
+ JSCompiler_object_inline_message_2494.nextSibling.dataset;
+ if (JSCompiler_object_inline_digest_2495) {
+ JSCompiler_temp = JSCompiler_object_inline_digest_2495.dgst;
+ var message = JSCompiler_object_inline_digest_2495.msg;
+ instance = JSCompiler_object_inline_digest_2495.stck;
+ var componentStack = JSCompiler_object_inline_digest_2495.cstck;
}
- JSCompiler_object_inline_message_2504 = message;
- JSCompiler_object_inline_digest_2505 = JSCompiler_temp;
- JSCompiler_object_inline_stack_2506 = instance;
- JSCompiler_temp = JSCompiler_object_inline_componentStack_2507 =
+ JSCompiler_object_inline_message_2494 = message;
+ JSCompiler_object_inline_digest_2495 = JSCompiler_temp;
+ JSCompiler_object_inline_stack_2496 = instance;
+ JSCompiler_temp = JSCompiler_object_inline_componentStack_2497 =
componentStack;
- JSCompiler_object_inline_componentStack_2507 =
- JSCompiler_object_inline_message_2504
- ? Error(JSCompiler_object_inline_message_2504)
+ JSCompiler_object_inline_componentStack_2497 =
+ JSCompiler_object_inline_message_2494
+ ? Error(JSCompiler_object_inline_message_2494)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
);
- JSCompiler_object_inline_componentStack_2507.stack =
- JSCompiler_object_inline_stack_2506 || "";
- JSCompiler_object_inline_componentStack_2507.digest =
- JSCompiler_object_inline_digest_2505;
- JSCompiler_object_inline_digest_2505 =
+ JSCompiler_object_inline_componentStack_2497.stack =
+ JSCompiler_object_inline_stack_2496 || "";
+ JSCompiler_object_inline_componentStack_2497.digest =
+ JSCompiler_object_inline_digest_2495;
+ JSCompiler_object_inline_digest_2495 =
void 0 === JSCompiler_temp ? null : JSCompiler_temp;
- JSCompiler_object_inline_stack_2506 = {
- value: JSCompiler_object_inline_componentStack_2507,
+ JSCompiler_object_inline_stack_2496 = {
+ value: JSCompiler_object_inline_componentStack_2497,
source: null,
- stack: JSCompiler_object_inline_digest_2505
+ stack: JSCompiler_object_inline_digest_2495
};
- "string" === typeof JSCompiler_object_inline_digest_2505 &&
+ "string" === typeof JSCompiler_object_inline_digest_2495 &&
CapturedStacks.set(
- JSCompiler_object_inline_componentStack_2507,
- JSCompiler_object_inline_stack_2506
+ JSCompiler_object_inline_componentStack_2497,
+ JSCompiler_object_inline_stack_2496
);
- queueHydrationError(JSCompiler_object_inline_stack_2506);
+ queueHydrationError(JSCompiler_object_inline_stack_2496);
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -9344,25 +9463,25 @@ __DEV__ &&
renderLanes,
!1
),
- (JSCompiler_object_inline_digest_2505 =
+ (JSCompiler_object_inline_digest_2495 =
0 !== (renderLanes & current.childLanes)),
- didReceiveUpdate || JSCompiler_object_inline_digest_2505)
+ didReceiveUpdate || JSCompiler_object_inline_digest_2495)
) {
- JSCompiler_object_inline_digest_2505 = workInProgressRoot;
- if (null !== JSCompiler_object_inline_digest_2505) {
- JSCompiler_object_inline_stack_2506 = renderLanes & -renderLanes;
- if (0 !== (JSCompiler_object_inline_stack_2506 & 42))
- JSCompiler_object_inline_stack_2506 = 1;
+ JSCompiler_object_inline_digest_2495 = workInProgressRoot;
+ if (null !== JSCompiler_object_inline_digest_2495) {
+ JSCompiler_object_inline_stack_2496 = renderLanes & -renderLanes;
+ if (0 !== (JSCompiler_object_inline_stack_2496 & 42))
+ JSCompiler_object_inline_stack_2496 = 1;
else
- switch (JSCompiler_object_inline_stack_2506) {
+ switch (JSCompiler_object_inline_stack_2496) {
case 2:
- JSCompiler_object_inline_stack_2506 = 1;
+ JSCompiler_object_inline_stack_2496 = 1;
break;
case 8:
- JSCompiler_object_inline_stack_2506 = 4;
+ JSCompiler_object_inline_stack_2496 = 4;
break;
case 32:
- JSCompiler_object_inline_stack_2506 = 16;
+ JSCompiler_object_inline_stack_2496 = 16;
break;
case 128:
case 256:
@@ -9383,40 +9502,40 @@ __DEV__ &&
case 8388608:
case 16777216:
case 33554432:
- JSCompiler_object_inline_stack_2506 = 64;
+ JSCompiler_object_inline_stack_2496 = 64;
break;
case 268435456:
- JSCompiler_object_inline_stack_2506 = 134217728;
+ JSCompiler_object_inline_stack_2496 = 134217728;
break;
default:
- JSCompiler_object_inline_stack_2506 = 0;
+ JSCompiler_object_inline_stack_2496 = 0;
}
- JSCompiler_object_inline_stack_2506 =
+ JSCompiler_object_inline_stack_2496 =
0 !==
- (JSCompiler_object_inline_stack_2506 &
- (JSCompiler_object_inline_digest_2505.suspendedLanes |
+ (JSCompiler_object_inline_stack_2496 &
+ (JSCompiler_object_inline_digest_2495.suspendedLanes |
renderLanes))
? 0
- : JSCompiler_object_inline_stack_2506;
+ : JSCompiler_object_inline_stack_2496;
if (
- 0 !== JSCompiler_object_inline_stack_2506 &&
- JSCompiler_object_inline_stack_2506 !== prevState.retryLane
+ 0 !== JSCompiler_object_inline_stack_2496 &&
+ JSCompiler_object_inline_stack_2496 !== prevState.retryLane
)
throw (
- ((prevState.retryLane = JSCompiler_object_inline_stack_2506),
+ ((prevState.retryLane = JSCompiler_object_inline_stack_2496),
enqueueConcurrentRenderForLane(
current,
- JSCompiler_object_inline_stack_2506
+ JSCompiler_object_inline_stack_2496
),
scheduleUpdateOnFiber(
- JSCompiler_object_inline_digest_2505,
+ JSCompiler_object_inline_digest_2495,
current,
- JSCompiler_object_inline_stack_2506
+ JSCompiler_object_inline_stack_2496
),
SelectiveHydrationException)
);
}
- JSCompiler_object_inline_message_2504.data ===
+ JSCompiler_object_inline_message_2494.data ===
SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -9424,14 +9543,14 @@ __DEV__ &&
renderLanes
);
} else
- JSCompiler_object_inline_message_2504.data ===
+ JSCompiler_object_inline_message_2494.data ===
SUSPENSE_PENDING_START_DATA
? ((workInProgress.flags |= 192),
(workInProgress.child = current.child),
(workInProgress = null))
: ((current = prevState.treeContext),
(nextHydratableInstance = getNextHydratable(
- JSCompiler_object_inline_message_2504.nextSibling
+ JSCompiler_object_inline_message_2494.nextSibling
)),
(hydrationParentFiber = workInProgress),
(isHydrating = !0),
@@ -9449,57 +9568,57 @@ __DEV__ &&
(treeContextProvider = workInProgress)),
(workInProgress = mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_stack_2506.children
+ JSCompiler_object_inline_stack_2496.children
)),
(workInProgress.flags |= 4096));
return workInProgress;
}
- if (JSCompiler_object_inline_componentStack_2507)
+ if (JSCompiler_object_inline_componentStack_2497)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2507 =
- JSCompiler_object_inline_stack_2506.fallback),
- (JSCompiler_object_inline_message_2504 = workInProgress.mode),
+ (JSCompiler_object_inline_componentStack_2497 =
+ JSCompiler_object_inline_stack_2496.fallback),
+ (JSCompiler_object_inline_message_2494 = workInProgress.mode),
(JSCompiler_temp = current.child),
(instance = JSCompiler_temp.sibling),
- (JSCompiler_object_inline_stack_2506 = createWorkInProgress(
+ (JSCompiler_object_inline_stack_2496 = createWorkInProgress(
JSCompiler_temp,
{
mode: "hidden",
- children: JSCompiler_object_inline_stack_2506.children
+ children: JSCompiler_object_inline_stack_2496.children
}
)),
- (JSCompiler_object_inline_stack_2506.subtreeFlags =
+ (JSCompiler_object_inline_stack_2496.subtreeFlags =
JSCompiler_temp.subtreeFlags & 31457280),
null !== instance
- ? (JSCompiler_object_inline_componentStack_2507 =
+ ? (JSCompiler_object_inline_componentStack_2497 =
createWorkInProgress(
instance,
- JSCompiler_object_inline_componentStack_2507
+ JSCompiler_object_inline_componentStack_2497
))
- : ((JSCompiler_object_inline_componentStack_2507 =
+ : ((JSCompiler_object_inline_componentStack_2497 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2507,
- JSCompiler_object_inline_message_2504,
+ JSCompiler_object_inline_componentStack_2497,
+ JSCompiler_object_inline_message_2494,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2507.flags |= 2)),
- (JSCompiler_object_inline_componentStack_2507.return =
+ (JSCompiler_object_inline_componentStack_2497.flags |= 2)),
+ (JSCompiler_object_inline_componentStack_2497.return =
workInProgress),
- (JSCompiler_object_inline_stack_2506.return = workInProgress),
- (JSCompiler_object_inline_stack_2506.sibling =
- JSCompiler_object_inline_componentStack_2507),
- (workInProgress.child = JSCompiler_object_inline_stack_2506),
- (JSCompiler_object_inline_stack_2506 =
- JSCompiler_object_inline_componentStack_2507),
- (JSCompiler_object_inline_componentStack_2507 = workInProgress.child),
- (JSCompiler_object_inline_message_2504 = current.child.memoizedState),
- null === JSCompiler_object_inline_message_2504
- ? (JSCompiler_object_inline_message_2504 =
+ (JSCompiler_object_inline_stack_2496.return = workInProgress),
+ (JSCompiler_object_inline_stack_2496.sibling =
+ JSCompiler_object_inline_componentStack_2497),
+ (workInProgress.child = JSCompiler_object_inline_stack_2496),
+ (JSCompiler_object_inline_stack_2496 =
+ JSCompiler_object_inline_componentStack_2497),
+ (JSCompiler_object_inline_componentStack_2497 = workInProgress.child),
+ (JSCompiler_object_inline_message_2494 = current.child.memoizedState),
+ null === JSCompiler_object_inline_message_2494
+ ? (JSCompiler_object_inline_message_2494 =
mountSuspenseOffscreenState(renderLanes))
: ((JSCompiler_temp =
- JSCompiler_object_inline_message_2504.cachePool),
+ JSCompiler_object_inline_message_2494.cachePool),
null !== JSCompiler_temp
? ((instance = CacheContext._currentValue),
(JSCompiler_temp =
@@ -9507,34 +9626,34 @@ __DEV__ &&
? { parent: instance, pool: instance }
: JSCompiler_temp))
: (JSCompiler_temp = getSuspendedCache()),
- (JSCompiler_object_inline_message_2504 = {
+ (JSCompiler_object_inline_message_2494 = {
baseLanes:
- JSCompiler_object_inline_message_2504.baseLanes | renderLanes,
+ JSCompiler_object_inline_message_2494.baseLanes | renderLanes,
cachePool: JSCompiler_temp
})),
- (JSCompiler_object_inline_componentStack_2507.memoizedState =
- JSCompiler_object_inline_message_2504),
+ (JSCompiler_object_inline_componentStack_2497.memoizedState =
+ JSCompiler_object_inline_message_2494),
enableTransitionTracing &&
- ((JSCompiler_object_inline_message_2504 = enableTransitionTracing
+ ((JSCompiler_object_inline_message_2494 = enableTransitionTracing
? transitionStack.current
: null),
- null !== JSCompiler_object_inline_message_2504 &&
+ null !== JSCompiler_object_inline_message_2494 &&
((JSCompiler_temp = enableTransitionTracing
? markerInstanceStack.current
: null),
(instance =
- JSCompiler_object_inline_componentStack_2507.updateQueue),
+ JSCompiler_object_inline_componentStack_2497.updateQueue),
(componentStack = current.updateQueue),
null === instance
- ? (JSCompiler_object_inline_componentStack_2507.updateQueue = {
- transitions: JSCompiler_object_inline_message_2504,
+ ? (JSCompiler_object_inline_componentStack_2497.updateQueue = {
+ transitions: JSCompiler_object_inline_message_2494,
markerInstances: JSCompiler_temp,
retryQueue: null
})
: instance === componentStack
- ? (JSCompiler_object_inline_componentStack_2507.updateQueue =
+ ? (JSCompiler_object_inline_componentStack_2497.updateQueue =
{
- transitions: JSCompiler_object_inline_message_2504,
+ transitions: JSCompiler_object_inline_message_2494,
markerInstances: JSCompiler_temp,
retryQueue:
null !== componentStack
@@ -9542,32 +9661,32 @@ __DEV__ &&
: null
})
: ((instance.transitions =
- JSCompiler_object_inline_message_2504),
+ JSCompiler_object_inline_message_2494),
(instance.markerInstances = JSCompiler_temp)))),
- (JSCompiler_object_inline_componentStack_2507.childLanes =
+ (JSCompiler_object_inline_componentStack_2497.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2505,
+ JSCompiler_object_inline_digest_2495,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
- JSCompiler_object_inline_stack_2506
+ JSCompiler_object_inline_stack_2496
);
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
mode: "visible",
- children: JSCompiler_object_inline_stack_2506.children
+ children: JSCompiler_object_inline_stack_2496.children
});
renderLanes.return = workInProgress;
renderLanes.sibling = null;
null !== current &&
- ((JSCompiler_object_inline_digest_2505 = workInProgress.deletions),
- null === JSCompiler_object_inline_digest_2505
+ ((JSCompiler_object_inline_digest_2495 = workInProgress.deletions),
+ null === JSCompiler_object_inline_digest_2495
? ((workInProgress.deletions = [current]),
(workInProgress.flags |= 16))
- : JSCompiler_object_inline_digest_2505.push(current));
+ : JSCompiler_object_inline_digest_2495.push(current));
workInProgress.child = renderLanes;
workInProgress.memoizedState = null;
return renderLanes;
@@ -10014,6 +10133,9 @@ __DEV__ &&
workInProgress.mode,
workInProgress.lanes
);
+ enableOwnerStacks &&
+ ((renderLanes._debugStack = workInProgress._debugStack),
+ (renderLanes._debugTask = workInProgress._debugTask));
var returnFiber = workInProgress.return;
if (null === returnFiber) throw Error("Cannot swap the root fiber.");
current.alternate = null;
@@ -17117,6 +17239,7 @@ __DEV__ &&
this.actualStartTime = -1.1;
this.treeBaseDuration = this.selfBaseDuration = -0;
this._debugOwner = this._debugInfo = null;
+ enableOwnerStacks && (this._debugTask = this._debugStack = null);
this._debugNeedsRemount = !1;
this._debugHookTypes = null;
hasBadMapPolyfill ||
@@ -17156,10 +17279,11 @@ __DEV__ &&
selfBaseDuration: -0,
treeBaseDuration: -0,
_debugInfo: null,
- _debugOwner: null,
- _debugNeedsRemount: !1,
- _debugHookTypes: null
+ _debugOwner: null
};
+ enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null));
+ tag._debugNeedsRemount = !1;
+ tag._debugHookTypes = null;
hasBadMapPolyfill ||
"function" !== typeof Object.preventExtensions ||
Object.preventExtensions(tag);
@@ -17182,6 +17306,9 @@ __DEV__ &&
(workInProgress.type = current.type),
(workInProgress.stateNode = current.stateNode),
(workInProgress._debugOwner = current._debugOwner),
+ enableOwnerStacks &&
+ ((workInProgress._debugStack = current._debugStack),
+ (workInProgress._debugTask = current._debugTask)),
(workInProgress._debugHookTypes = current._debugHookTypes),
(workInProgress.alternate = current),
(current.alternate = workInProgress))
@@ -17441,6 +17568,9 @@ __DEV__ &&
lanes
);
mode._debugOwner = element._owner;
+ enableOwnerStacks &&
+ ((mode._debugStack = element._debugStack),
+ (mode._debugTask = element._debugTask));
return mode;
}
function createFiberFromFragment(elements, mode, lanes, key) {
@@ -18478,6 +18608,15 @@ __DEV__ &&
});
}
}
+ function executeDispatch(event, listener, currentTarget) {
+ event.currentTarget = currentTarget;
+ try {
+ listener(event);
+ } catch (error$43) {
+ reportGlobalError(error$43);
+ }
+ event.currentTarget = null;
+ }
function processDispatchQueue(dispatchQueue, eventSystemFlags) {
eventSystemFlags = 0 !== (eventSystemFlags & 4);
for (var i = 0; i < dispatchQueue.length; i++) {
@@ -18498,14 +18637,15 @@ __DEV__ &&
_dispatchListeners$i = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped())
break a;
- previousInstance = event;
- previousInstance.currentTarget = currentTarget;
- try {
- _dispatchListeners$i(previousInstance);
- } catch (error$43) {
- reportGlobalError(error$43);
- }
- previousInstance.currentTarget = null;
+ enableOwnerStacks && null !== instance
+ ? runWithFiberInDEV(
+ instance,
+ executeDispatch,
+ event,
+ _dispatchListeners$i,
+ currentTarget
+ )
+ : executeDispatch(event, _dispatchListeners$i, currentTarget);
previousInstance = instance;
}
else
@@ -18520,14 +18660,15 @@ __DEV__ &&
_dispatchListeners$i = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped())
break a;
- previousInstance = event;
- previousInstance.currentTarget = currentTarget;
- try {
- _dispatchListeners$i(previousInstance);
- } catch (error$43) {
- reportGlobalError(error$43);
- }
- previousInstance.currentTarget = null;
+ enableOwnerStacks && null !== instance
+ ? runWithFiberInDEV(
+ instance,
+ executeDispatch,
+ event,
+ _dispatchListeners$i,
+ currentTarget
+ )
+ : executeDispatch(event, _dispatchListeners$i, currentTarget);
previousInstance = instance;
}
}
@@ -23457,6 +23598,7 @@ __DEV__ &&
syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs,
transitionLaneExpirationMs =
dynamicFeatureFlags.transitionLaneExpirationMs,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
@@ -27348,11 +27490,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
- if ("19.0.0-www-modern-7c4a7c9d-20241210" !== isomorphicReactPackageVersion)
+ if ("19.0.0-www-modern-a4964987-20241211" !== 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-7c4a7c9d-20241210\nLearn more: https://react.dev/warnings/version-mismatch")
+ "\n - react-dom: 19.0.0-www-modern-a4964987-20241211\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -27395,10 +27537,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
- version: "19.0.0-www-modern-7c4a7c9d-20241210",
+ version: "19.0.0-www-modern-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -28003,7 +28145,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
- exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-modern-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js
index 3b63ba1648..ce935a78a8 100644
--- a/compiled/facebook-www/ReactDOM-prod.classic.js
+++ b/compiled/facebook-www/ReactDOM-prod.classic.js
@@ -17277,14 +17277,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1774 = React.version;
if (
- "19.0.0-www-classic-7c4a7c9d-20241210" !==
+ "19.0.0-www-classic-a4964987-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1774
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1774,
- "19.0.0-www-classic-7c4a7c9d-20241210"
+ "19.0.0-www-classic-a4964987-20241211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17302,10 +17302,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2315 = {
bundleType: 0,
- version: "19.0.0-www-classic-7c4a7c9d-20241210",
+ version: "19.0.0-www-classic-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2316 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17668,4 +17668,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-classic-a4964987-20241211";
diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js
index 3aafbc4329..47c60ca350 100644
--- a/compiled/facebook-www/ReactDOM-prod.modern.js
+++ b/compiled/facebook-www/ReactDOM-prod.modern.js
@@ -17008,14 +17008,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1764 = React.version;
if (
- "19.0.0-www-modern-7c4a7c9d-20241210" !==
+ "19.0.0-www-modern-a4964987-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1764
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1764,
- "19.0.0-www-modern-7c4a7c9d-20241210"
+ "19.0.0-www-modern-a4964987-20241211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17033,10 +17033,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2297 = {
bundleType: 0,
- version: "19.0.0-www-modern-7c4a7c9d-20241210",
+ version: "19.0.0-www-modern-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2298 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17399,4 +17399,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-modern-a4964987-20241211";
diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js
index 41fb09cacf..f6d1fb900a 100644
--- a/compiled/facebook-www/ReactDOM-profiling.classic.js
+++ b/compiled/facebook-www/ReactDOM-profiling.classic.js
@@ -17966,14 +17966,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1867 = React.version;
if (
- "19.0.0-www-classic-7c4a7c9d-20241210" !==
+ "19.0.0-www-classic-a4964987-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1867
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1867,
- "19.0.0-www-classic-7c4a7c9d-20241210"
+ "19.0.0-www-classic-a4964987-20241211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17991,10 +17991,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1869 = {
bundleType: 0,
- version: "19.0.0-www-classic-7c4a7c9d-20241210",
+ version: "19.0.0-www-classic-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1869.getLaneLabelMap = getLaneLabelMap),
@@ -18360,7 +18360,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-classic-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js
index 4c1d638f61..9f31bc6d95 100644
--- a/compiled/facebook-www/ReactDOM-profiling.modern.js
+++ b/compiled/facebook-www/ReactDOM-profiling.modern.js
@@ -17696,14 +17696,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1857 = React.version;
if (
- "19.0.0-www-modern-7c4a7c9d-20241210" !==
+ "19.0.0-www-modern-a4964987-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1857
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1857,
- "19.0.0-www-modern-7c4a7c9d-20241210"
+ "19.0.0-www-modern-a4964987-20241211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17721,10 +17721,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1859 = {
bundleType: 0,
- version: "19.0.0-www-modern-7c4a7c9d-20241210",
+ version: "19.0.0-www-modern-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1859.getLaneLabelMap = getLaneLabelMap),
@@ -18090,7 +18090,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-modern-a4964987-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js
index 84eefe0bab..2952f35da4 100644
--- a/compiled/facebook-www/ReactDOMServer-dev.classic.js
+++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js
@@ -4264,6 +4264,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeComponentStackByType(type) {
if ("string" === typeof type) return describeBuiltInComponentFrame(type);
if ("function" === typeof type)
@@ -4429,7 +4450,8 @@ __DEV__ &&
emptyTreeContext,
null,
!1,
- emptyContextObject
+ emptyContextObject,
+ null
);
pushComponentStack(children);
resumableState.pingedTasks.push(children);
@@ -4475,7 +4497,8 @@ __DEV__ &&
treeContext,
componentStack,
isFallback,
- legacyContext
+ legacyContext,
+ debugTask
) {
request.allPendingTasks++;
null === blockedBoundary
@@ -4501,6 +4524,7 @@ __DEV__ &&
isFallback: isFallback
};
task.legacyContext = legacyContext;
+ enableOwnerStacks && (task.debugTask = debugTask);
abortSet.add(task);
return task;
}
@@ -4519,7 +4543,8 @@ __DEV__ &&
treeContext,
componentStack,
isFallback,
- legacyContext
+ legacyContext,
+ debugTask
) {
request.allPendingTasks++;
null === blockedBoundary
@@ -4546,6 +4571,7 @@ __DEV__ &&
isFallback: isFallback
};
task.legacyContext = legacyContext;
+ enableOwnerStacks && (task.debugTask = debugTask);
abortSet.add(task);
return task;
}
@@ -4571,22 +4597,68 @@ __DEV__ &&
};
}
function getCurrentStackInDEV() {
- return null === currentTaskInDEV ||
- null === currentTaskInDEV.componentStack
- ? ""
- : getStackByComponentStackNode(currentTaskInDEV.componentStack);
+ if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)
+ return "";
+ if (enableOwnerStacks) {
+ var componentStack = currentTaskInDEV.componentStack;
+ if (enableOwnerStacks)
+ try {
+ var info = "";
+ if ("string" === typeof componentStack.type)
+ info += describeBuiltInComponentFrame(componentStack.type);
+ else if ("function" === typeof componentStack.type) {
+ if (!componentStack.owner) {
+ var JSCompiler_temp_const = info,
+ fn = componentStack.type,
+ name = fn ? fn.displayName || fn.name : "";
+ var JSCompiler_inline_result = name
+ ? describeBuiltInComponentFrame(name)
+ : "";
+ info = JSCompiler_temp_const + JSCompiler_inline_result;
+ }
+ } else
+ componentStack.owner ||
+ (info += describeComponentStackByType(componentStack.type));
+ for (; componentStack; )
+ (JSCompiler_temp_const = null),
+ null != componentStack.debugStack
+ ? (JSCompiler_temp_const = formatOwnerStack(
+ componentStack.debugStack
+ ))
+ : ((JSCompiler_inline_result = componentStack),
+ null != JSCompiler_inline_result.stack &&
+ (JSCompiler_temp_const =
+ "string" !== typeof JSCompiler_inline_result.stack
+ ? (JSCompiler_inline_result.stack = formatOwnerStack(
+ JSCompiler_inline_result.stack
+ ))
+ : JSCompiler_inline_result.stack)),
+ (componentStack = componentStack.owner) &&
+ JSCompiler_temp_const &&
+ (info += "\n" + JSCompiler_temp_const);
+ var JSCompiler_inline_result$jscomp$0 = info;
+ } catch (x) {
+ JSCompiler_inline_result$jscomp$0 =
+ "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ else JSCompiler_inline_result$jscomp$0 = "";
+ return JSCompiler_inline_result$jscomp$0;
+ }
+ return getStackByComponentStackNode(currentTaskInDEV.componentStack);
}
function pushServerComponentStack(task, debugInfo) {
if (null != debugInfo)
for (var i = 0; i < debugInfo.length; i++) {
var componentInfo = debugInfo[i];
- "string" === typeof componentInfo.name &&
- (task.componentStack = {
+ "string" !== typeof componentInfo.name ||
+ (enableOwnerStacks && void 0 === componentInfo.debugStack) ||
+ ((task.componentStack = {
parent: task.componentStack,
type: componentInfo,
owner: componentInfo.owner,
- stack: null
- });
+ stack: enableOwnerStacks ? componentInfo.debugStack : null
+ }),
+ enableOwnerStacks && (task.debugTask = componentInfo.debugTask));
}
}
function pushComponentStack(task) {
@@ -4595,13 +4667,15 @@ __DEV__ &&
switch (node.$$typeof) {
case REACT_ELEMENT_TYPE:
var type = node.type,
- owner = node._owner;
+ owner = node._owner,
+ stack = enableOwnerStacks ? node._debugStack : null;
pushServerComponentStack(task, node._debugInfo);
+ enableOwnerStacks && (task.debugTask = node._debugTask);
task.componentStack = {
parent: task.componentStack,
type: type,
owner: owner,
- stack: null
+ stack: stack
};
break;
case REACT_LAZY_TYPE:
@@ -4650,9 +4724,12 @@ __DEV__ &&
boundary.errorStack = null !== error ? wasAborted + error : null;
boundary.errorComponentStack = thrownInfo.componentStack;
}
- function logRecoverableError(request, error$1, errorInfo) {
+ function logRecoverableError(request, error$1, errorInfo, debugTask) {
request = request.onError;
- error$1 = request(error$1, errorInfo);
+ error$1 =
+ enableOwnerStacks && debugTask
+ ? debugTask.run(request.bind(null, error$1, errorInfo))
+ : request(error$1, errorInfo);
if (null != error$1 && "string" !== typeof error$1)
error$jscomp$2(
'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',
@@ -4660,11 +4737,13 @@ __DEV__ &&
);
else return error$1;
}
- function fatalError(request, error) {
- var onShellError = request.onShellError,
- onFatalError = request.onFatalError;
- onShellError(error);
- onFatalError(error);
+ function fatalError(request, error, errorInfo, debugTask) {
+ errorInfo = request.onShellError;
+ var onFatalError = request.onFatalError;
+ enableOwnerStacks && debugTask
+ ? (debugTask.run(errorInfo.bind(null, error)),
+ debugTask.run(onFatalError.bind(null, error)))
+ : (errorInfo(error), onFatalError(error));
null !== request.destination
? ((request.status = CLOSED), request.destination.destroy(error))
: ((request.status = 13), (request.fatalError = error));
@@ -5522,7 +5601,8 @@ __DEV__ &&
task.treeContext,
task.componentStack,
task.isFallback,
- task.legacyContext
+ task.legacyContext,
+ enableOwnerStacks ? task.debugTask : null
);
pushComponentStack(suspendedPrimaryTask);
request.pingedTasks.push(suspendedPrimaryTask);
@@ -5560,7 +5640,8 @@ __DEV__ &&
var errorDigest = logRecoverableError(
request,
error,
- thrownInfo
+ thrownInfo,
+ enableOwnerStacks ? task.debugTask : null
);
encodeErrorForBoundary(
newBoundary,
@@ -5591,7 +5672,8 @@ __DEV__ &&
task.treeContext,
task.componentStack,
!0,
- task.legacyContext
+ task.legacyContext,
+ enableOwnerStacks ? task.debugTask : null
);
pushComponentStack(suspendedFallbackTask);
request.pingedTasks.push(suspendedFallbackTask);
@@ -5729,15 +5811,187 @@ __DEV__ &&
(task.replay = prevReplay), (task.blockedSegment = null);
}
}
+ function replayElement(
+ request,
+ task,
+ keyPath,
+ name,
+ keyOrIndex,
+ childIndex,
+ type,
+ props,
+ ref,
+ replay
+ ) {
+ childIndex = replay.nodes;
+ for (var i = 0; i < childIndex.length; i++) {
+ var node = childIndex[i];
+ if (keyOrIndex === node[1]) {
+ if (4 === node.length) {
+ if (null !== name && name !== node[0])
+ throw Error(
+ "Expected the resume to render <" +
+ node[0] +
+ "> in this slot but instead it rendered <" +
+ name +
+ ">. The tree doesn't match so React will fallback to client rendering."
+ );
+ var childNodes = node[2];
+ node = node[3];
+ name = task.node;
+ task.replay = { nodes: childNodes, slots: node, pendingTasks: 1 };
+ try {
+ renderElement(request, task, keyPath, type, props, ref);
+ if (
+ 1 === task.replay.pendingTasks &&
+ 0 < task.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."
+ );
+ task.replay.pendingTasks--;
+ } catch (x) {
+ if (
+ "object" === typeof x &&
+ null !== x &&
+ (x === SuspenseException || "function" === typeof x.then)
+ )
+ throw (task.node === name && (task.replay = replay), x);
+ task.replay.pendingTasks--;
+ type = getThrownInfo(task.componentStack);
+ props = request;
+ request = task.blockedBoundary;
+ keyPath = x;
+ ref = node;
+ node = logRecoverableError(
+ props,
+ keyPath,
+ type,
+ enableOwnerStacks ? task.debugTask : null
+ );
+ abortRemainingReplayNodes(
+ props,
+ request,
+ childNodes,
+ ref,
+ keyPath,
+ node,
+ type,
+ !1
+ );
+ }
+ task.replay = replay;
+ } else {
+ if (type !== REACT_SUSPENSE_TYPE)
+ throw Error(
+ "Expected the resume to render in this slot but instead it rendered <" +
+ (getComponentNameFromType(type) || "Unknown") +
+ ">. The tree doesn't match so React will fallback to client rendering."
+ );
+ a: {
+ replay = void 0;
+ type = node[5];
+ ref = node[2];
+ name = node[3];
+ keyOrIndex = null === node[4] ? [] : node[4][2];
+ node = null === node[4] ? null : node[4][3];
+ var prevKeyPath = task.keyPath,
+ previousReplaySet = task.replay,
+ parentBoundary = task.blockedBoundary,
+ parentHoistableState = task.hoistableState,
+ content = props.children;
+ props = props.fallback;
+ var fallbackAbortSet = new Set(),
+ resumedBoundary = createSuspenseBoundary(
+ request,
+ fallbackAbortSet
+ );
+ resumedBoundary.parentFlushed = !0;
+ resumedBoundary.rootSegmentID = type;
+ task.blockedBoundary = resumedBoundary;
+ task.hoistableState = resumedBoundary.contentState;
+ task.keyPath = keyPath;
+ task.replay = { nodes: ref, slots: name, pendingTasks: 1 };
+ try {
+ renderNode(request, task, content, -1);
+ if (
+ 1 === task.replay.pendingTasks &&
+ 0 < task.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."
+ );
+ task.replay.pendingTasks--;
+ if (
+ 0 === resumedBoundary.pendingTasks &&
+ resumedBoundary.status === PENDING
+ ) {
+ resumedBoundary.status = COMPLETED;
+ request.completedBoundaries.push(resumedBoundary);
+ break a;
+ }
+ } catch (error$3) {
+ (resumedBoundary.status = CLIENT_RENDERED),
+ (childNodes = getThrownInfo(task.componentStack)),
+ (replay = logRecoverableError(
+ request,
+ error$3,
+ childNodes,
+ enableOwnerStacks ? task.debugTask : null
+ )),
+ encodeErrorForBoundary(
+ resumedBoundary,
+ replay,
+ error$3,
+ childNodes,
+ !1
+ ),
+ task.replay.pendingTasks--,
+ request.clientRenderedBoundaries.push(resumedBoundary);
+ } finally {
+ (task.blockedBoundary = parentBoundary),
+ (task.hoistableState = parentHoistableState),
+ (task.replay = previousReplaySet),
+ (task.keyPath = prevKeyPath);
+ }
+ props = createReplayTask(
+ request,
+ null,
+ { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
+ props,
+ -1,
+ parentBoundary,
+ resumedBoundary.fallbackState,
+ fallbackAbortSet,
+ [keyPath[0], "Suspense Fallback", keyPath[2]],
+ task.formatContext,
+ task.context,
+ task.treeContext,
+ task.componentStack,
+ !0,
+ task.legacyContext,
+ enableOwnerStacks ? task.debugTask : null
+ );
+ pushComponentStack(props);
+ request.pingedTasks.push(props);
+ }
+ }
+ childIndex.splice(i, 1);
+ break;
+ }
+ }
+ }
function renderNodeDestructive(request, task, node, childIndex) {
null !== task.replay && "number" === typeof task.replay.slots
? resumeNode(request, task, task.replay.slots, node, childIndex)
: ((task.node = node),
(task.childIndex = childIndex),
(node = task.componentStack),
+ (childIndex = enableOwnerStacks ? task.debugTask : null),
pushComponentStack(task),
retryNode(request, task),
- (task.componentStack = node));
+ (task.componentStack = node),
+ enableOwnerStacks && (task.debugTask = childIndex));
}
function retryNode(request, task) {
var node = task.node,
@@ -5747,171 +6001,56 @@ __DEV__ &&
switch (node.$$typeof) {
case REACT_ELEMENT_TYPE:
var type = node.type,
- key = node.key,
- props = node.props;
- node = props.ref;
- var ref = void 0 !== node ? node : null,
- name = getComponentNameFromType(type),
- keyOrIndex =
- null == key ? (-1 === childIndex ? 0 : childIndex) : key,
- keyPath = [task.keyPath, name, keyOrIndex];
- if (null !== task.replay) {
- var replay = task.replay;
- childIndex = replay.nodes;
- for (node = 0; node < childIndex.length; node++)
- if (((key = childIndex[node]), keyOrIndex === key[1])) {
- if (4 === key.length) {
- if (null !== name && name !== key[0])
- throw Error(
- "Expected the resume to render <" +
- key[0] +
- "> in this slot but instead it rendered <" +
- name +
- ">. The tree doesn't match so React will fallback to client rendering."
- );
- var childNodes = key[2];
- key = key[3];
- name = task.node;
- task.replay = {
- nodes: childNodes,
- slots: key,
- pendingTasks: 1
- };
- try {
- renderElement(request, task, keyPath, type, props, ref);
- if (
- 1 === task.replay.pendingTasks &&
- 0 < task.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."
- );
- task.replay.pendingTasks--;
- } catch (x) {
- if (
- "object" === typeof x &&
- null !== x &&
- (x === SuspenseException ||
- "function" === typeof x.then)
- )
- throw (
- (task.node === name && (task.replay = replay), x)
- );
- task.replay.pendingTasks--;
- props = getThrownInfo(task.componentStack);
- erroredReplay(
- request,
- task.blockedBoundary,
- x,
- props,
- childNodes,
- key
- );
- }
- task.replay = replay;
- } else {
- if (type !== REACT_SUSPENSE_TYPE)
- throw Error(
- "Expected the resume to render in this slot but instead it rendered <" +
- (getComponentNameFromType(type) || "Unknown") +
- ">. The tree doesn't match so React will fallback to client rendering."
- );
- a: {
- type = void 0;
- ref = key[5];
- replay = key[2];
- name = key[3];
- keyOrIndex = null === key[4] ? [] : key[4][2];
- key = null === key[4] ? null : key[4][3];
- var prevKeyPath = task.keyPath,
- previousReplaySet = task.replay,
- parentBoundary = task.blockedBoundary,
- parentHoistableState = task.hoistableState,
- content = props.children;
- props = props.fallback;
- var fallbackAbortSet = new Set(),
- resumedBoundary = createSuspenseBoundary(
- request,
- fallbackAbortSet
- );
- resumedBoundary.parentFlushed = !0;
- resumedBoundary.rootSegmentID = ref;
- task.blockedBoundary = resumedBoundary;
- task.hoistableState = resumedBoundary.contentState;
- task.keyPath = keyPath;
- task.replay = {
- nodes: replay,
- slots: name,
- pendingTasks: 1
- };
- try {
- renderNode(request, task, content, -1);
- if (
- 1 === task.replay.pendingTasks &&
- 0 < task.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."
- );
- task.replay.pendingTasks--;
- if (
- 0 === resumedBoundary.pendingTasks &&
- resumedBoundary.status === PENDING
- ) {
- resumedBoundary.status = COMPLETED;
- request.completedBoundaries.push(resumedBoundary);
- break a;
- }
- } catch (error$3) {
- (resumedBoundary.status = CLIENT_RENDERED),
- (childNodes = getThrownInfo(task.componentStack)),
- (type = logRecoverableError(
- request,
- error$3,
- childNodes
- )),
- encodeErrorForBoundary(
- resumedBoundary,
- type,
- error$3,
- childNodes,
- !1
- ),
- task.replay.pendingTasks--,
- request.clientRenderedBoundaries.push(
- resumedBoundary
- );
- } finally {
- (task.blockedBoundary = parentBoundary),
- (task.hoistableState = parentHoistableState),
- (task.replay = previousReplaySet),
- (task.keyPath = prevKeyPath);
- }
- childNodes = createReplayTask(
- request,
- null,
- { nodes: keyOrIndex, slots: key, pendingTasks: 0 },
- props,
- -1,
- parentBoundary,
- resumedBoundary.fallbackState,
- fallbackAbortSet,
- [keyPath[0], "Suspense Fallback", keyPath[2]],
- task.formatContext,
- task.context,
- task.treeContext,
- task.componentStack,
- !0,
- task.legacyContext
- );
- pushComponentStack(childNodes);
- request.pingedTasks.push(childNodes);
- }
- }
- childIndex.splice(node, 1);
- break;
- }
- } else renderElement(request, task, keyPath, type, props, ref);
+ key = node.key;
+ node = node.props;
+ var refProp = node.ref;
+ refProp = void 0 !== refProp ? refProp : null;
+ var debugTask = enableOwnerStacks ? task.debugTask : null,
+ name = getComponentNameFromType(type);
+ key = null == key ? (-1 === childIndex ? 0 : childIndex) : key;
+ var keyPath = [task.keyPath, name, key];
+ null !== task.replay
+ ? debugTask
+ ? debugTask.run(
+ replayElement.bind(
+ null,
+ request,
+ task,
+ keyPath,
+ name,
+ key,
+ childIndex,
+ type,
+ node,
+ refProp,
+ task.replay
+ )
+ )
+ : replayElement(
+ request,
+ task,
+ keyPath,
+ name,
+ key,
+ childIndex,
+ type,
+ node,
+ refProp,
+ task.replay
+ )
+ : debugTask
+ ? debugTask.run(
+ renderElement.bind(
+ null,
+ request,
+ task,
+ keyPath,
+ type,
+ node,
+ refProp
+ )
+ )
+ : renderElement(request, task, keyPath, type, node, refProp);
return;
case REACT_PORTAL_TYPE:
throw Error(
@@ -5928,21 +6067,20 @@ __DEV__ &&
return;
}
null === node || "object" !== typeof node
- ? (props = null)
- : ((childNodes =
+ ? (key = null)
+ : ((type =
(MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
node["@@iterator"]),
- (props = "function" === typeof childNodes ? childNodes : null));
- if (props && (childNodes = props.call(node))) {
- if (childNodes === node) {
+ (key = "function" === typeof type ? type : null));
+ if (key && (type = key.call(node))) {
+ if (type === node) {
if (
-1 !== childIndex ||
null === task.componentStack ||
"function" !== typeof task.componentStack.type ||
"[object GeneratorFunction]" !==
Object.prototype.toString.call(task.componentStack.type) ||
- "[object Generator]" !==
- Object.prototype.toString.call(childNodes)
+ "[object Generator]" !== Object.prototype.toString.call(type)
)
didWarnAboutGenerators ||
error$jscomp$2(
@@ -5950,18 +6088,18 @@ __DEV__ &&
),
(didWarnAboutGenerators = !0);
} else
- node.entries !== props ||
+ node.entries !== key ||
didWarnAboutMaps ||
(error$jscomp$2(
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
),
(didWarnAboutMaps = !0));
- node = childNodes.next();
+ node = type.next();
if (!node.done) {
- props = [];
- do props.push(node.value), (node = childNodes.next());
+ key = [];
+ do key.push(node.value), (node = type.next());
while (!node.done);
- renderChildrenArray(request, task, props, childIndex);
+ renderChildrenArray(request, task, key, childIndex);
}
return;
}
@@ -5982,39 +6120,39 @@ __DEV__ &&
node._currentValue2,
childIndex
);
- childIndex = Object.prototype.toString.call(node);
+ request = Object.prototype.toString.call(node);
throw Error(
"Objects are not valid as a React child (found: " +
- ("[object Object]" === childIndex
+ ("[object Object]" === request
? "object with keys {" + Object.keys(node).join(", ") + "}"
- : childIndex) +
+ : request) +
"). If you meant to render a collection of children, use an array instead."
);
}
"string" === typeof node
- ? ((childIndex = task.blockedSegment),
- null !== childIndex &&
- (childIndex.lastPushedText = pushTextInstance(
- childIndex.chunks,
+ ? ((task = task.blockedSegment),
+ null !== task &&
+ (task.lastPushedText = pushTextInstance(
+ task.chunks,
node,
request.renderState,
- childIndex.lastPushedText
+ task.lastPushedText
)))
: "number" === typeof node || "bigint" === typeof node
- ? ((childIndex = task.blockedSegment),
- null !== childIndex &&
- (childIndex.lastPushedText = pushTextInstance(
- childIndex.chunks,
+ ? ((task = task.blockedSegment),
+ null !== task &&
+ (task.lastPushedText = pushTextInstance(
+ task.chunks,
"" + node,
request.renderState,
- childIndex.lastPushedText
+ task.lastPushedText
)))
: ("function" === typeof node &&
- ((childIndex = node.displayName || node.name || "Component"),
+ ((request = node.displayName || node.name || "Component"),
error$jscomp$2(
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",
- childIndex,
- childIndex
+ request,
+ request
)),
"symbol" === typeof node &&
error$jscomp$2(
@@ -6023,9 +6161,11 @@ __DEV__ &&
));
}
}
- function renderChildrenArray(request$jscomp$0, task, children, childIndex) {
+ function renderChildrenArray(request, task, children, childIndex) {
var prevKeyPath = task.keyPath,
- previousComponentStack = task.componentStack;
+ previousComponentStack = task.componentStack,
+ previousDebugTask = null;
+ enableOwnerStacks && (previousDebugTask = task.debugTask);
pushServerComponentStack(task, task.node._debugInfo);
if (
-1 !== childIndex &&
@@ -6043,7 +6183,7 @@ __DEV__ &&
node = node[3];
task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
try {
- renderChildrenArray(request$jscomp$0, task, children, -1);
+ renderChildrenArray(request, task, children, -1);
if (
1 === task.replay.pendingTasks &&
0 < task.replay.nodes.length
@@ -6060,14 +6200,25 @@ __DEV__ &&
)
throw x;
task.replay.pendingTasks--;
- children = getThrownInfo(task.componentStack);
- erroredReplay(
- request$jscomp$0,
- task.blockedBoundary,
- x,
+ var thrownInfo = getThrownInfo(task.componentStack);
+ children = task.blockedBoundary;
+ var error = x,
+ resumeSlots = node;
+ node = logRecoverableError(
+ request,
+ error,
+ thrownInfo,
+ enableOwnerStacks ? task.debugTask : null
+ );
+ abortRemainingReplayNodes(
+ request,
children,
childIndex,
- node
+ resumeSlots,
+ error,
+ node,
+ thrownInfo,
+ !1
);
}
task.replay = replay;
@@ -6077,6 +6228,7 @@ __DEV__ &&
}
task.keyPath = prevKeyPath;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
return;
}
replay = task.treeContext;
@@ -6085,98 +6237,98 @@ __DEV__ &&
null !== task.replay &&
((j = task.replay.slots), null !== j && "object" === typeof j)
) {
- for (childIndex = 0; childIndex < replayNodes; childIndex++) {
- node = children[childIndex];
- task.treeContext = pushTreeContext(replay, replayNodes, childIndex);
- var resumeSegmentID = j[childIndex];
- "number" === typeof resumeSegmentID
- ? (resumeNode(
- request$jscomp$0,
- task,
- resumeSegmentID,
- node,
- childIndex
- ),
- delete j[childIndex])
- : renderNode(request$jscomp$0, task, node, childIndex);
- }
+ for (childIndex = 0; childIndex < replayNodes; childIndex++)
+ (node = children[childIndex]),
+ (task.treeContext = pushTreeContext(
+ replay,
+ replayNodes,
+ childIndex
+ )),
+ (error = j[childIndex]),
+ "number" === typeof error
+ ? (resumeNode(request, task, error, node, childIndex),
+ delete j[childIndex])
+ : renderNode(request, task, node, childIndex);
task.treeContext = replay;
task.keyPath = prevKeyPath;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
return;
}
for (j = 0; j < replayNodes; j++) {
childIndex = children[j];
- var request = request$jscomp$0;
+ resumeSlots = request;
node = task;
- resumeSegmentID = childIndex;
+ error = childIndex;
if (
- null !== resumeSegmentID &&
- "object" === typeof resumeSegmentID &&
- (resumeSegmentID.$$typeof === REACT_ELEMENT_TYPE ||
- resumeSegmentID.$$typeof === REACT_PORTAL_TYPE) &&
- resumeSegmentID._store &&
- ((!resumeSegmentID._store.validated && null == resumeSegmentID.key) ||
- 2 === resumeSegmentID._store.validated)
+ null !== error &&
+ "object" === typeof error &&
+ (error.$$typeof === REACT_ELEMENT_TYPE ||
+ error.$$typeof === REACT_PORTAL_TYPE) &&
+ error._store &&
+ ((!error._store.validated && null == error.key) ||
+ 2 === error._store.validated)
) {
- if ("object" !== typeof resumeSegmentID._store)
+ if ("object" !== typeof error._store)
throw Error(
"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
);
- resumeSegmentID._store.validated = 1;
- var didWarnForKey = request.didWarnForKey;
- null == didWarnForKey &&
- (didWarnForKey = request.didWarnForKey = new WeakSet());
- request = node.componentStack;
- if (null !== request && !didWarnForKey.has(request)) {
- didWarnForKey.add(request);
- var componentName = getComponentNameFromType(resumeSegmentID.type);
- didWarnForKey = resumeSegmentID._owner;
- var parentOwner = request.owner;
- request = "";
+ error._store.validated = 1;
+ thrownInfo = resumeSlots.didWarnForKey;
+ null == thrownInfo &&
+ (thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
+ resumeSlots = node.componentStack;
+ if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
+ thrownInfo.add(resumeSlots);
+ var componentName = getComponentNameFromType(error.type);
+ thrownInfo = error._owner;
+ var parentOwner = resumeSlots.owner;
+ resumeSlots = "";
if (parentOwner && "undefined" !== typeof parentOwner.type) {
var name = getComponentNameFromType(parentOwner.type);
name &&
- (request = "\n\nCheck the render method of `" + name + "`.");
+ (resumeSlots =
+ "\n\nCheck the render method of `" + name + "`.");
}
- request ||
+ resumeSlots ||
(componentName &&
- (request =
+ (resumeSlots =
"\n\nCheck the top-level render call using <" +
componentName +
">."));
componentName = "";
- null != didWarnForKey &&
- parentOwner !== didWarnForKey &&
+ null != thrownInfo &&
+ parentOwner !== thrownInfo &&
((parentOwner = null),
- "undefined" !== typeof didWarnForKey.type
- ? (parentOwner = getComponentNameFromType(didWarnForKey.type))
- : "string" === typeof didWarnForKey.name &&
- (parentOwner = didWarnForKey.name),
+ "undefined" !== typeof thrownInfo.type
+ ? (parentOwner = getComponentNameFromType(thrownInfo.type))
+ : "string" === typeof thrownInfo.name &&
+ (parentOwner = thrownInfo.name),
parentOwner &&
(componentName =
" It was passed a child from " + parentOwner + "."));
- didWarnForKey = node.componentStack;
+ thrownInfo = node.componentStack;
node.componentStack = {
parent: node.componentStack,
- type: resumeSegmentID.type,
- owner: resumeSegmentID._owner,
- stack: null
+ type: error.type,
+ owner: error._owner,
+ stack: enableOwnerStacks ? error._debugStack : null
};
error$jscomp$2(
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
- request,
+ resumeSlots,
componentName
);
- node.componentStack = didWarnForKey;
+ node.componentStack = thrownInfo;
}
}
task.treeContext = pushTreeContext(replay, replayNodes, j);
- renderNode(request$jscomp$0, task, childIndex, j);
+ renderNode(request, task, childIndex, j);
}
task.treeContext = replay;
task.keyPath = prevKeyPath;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
}
function untrackBoundary(request, boundary) {
request = request.trackedPostpones;
@@ -6203,7 +6355,8 @@ __DEV__ &&
task.treeContext,
task.componentStack,
task.isFallback,
- task.legacyContext
+ task.legacyContext,
+ enableOwnerStacks ? task.debugTask : null
);
}
function spawnNewSuspendedRenderTask(request, task, thenableState) {
@@ -6233,7 +6386,8 @@ __DEV__ &&
task.treeContext,
task.componentStack,
task.isFallback,
- task.legacyContext
+ task.legacyContext,
+ enableOwnerStacks ? task.debugTask : null
);
}
function renderNode(request, task, node, childIndex) {
@@ -6243,6 +6397,7 @@ __DEV__ &&
previousKeyPath = task.keyPath,
previousTreeContext = task.treeContext,
previousComponentStack = task.componentStack,
+ previousDebugTask = enableOwnerStacks ? task.debugTask : null,
segment = task.blockedSegment;
if (null === segment)
try {
@@ -6270,6 +6425,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -6283,6 +6439,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -6318,6 +6475,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -6331,6 +6489,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -6345,26 +6504,6 @@ __DEV__ &&
switchContext(previousContext);
throw node;
}
- function erroredReplay(
- request,
- boundary,
- error,
- errorInfo,
- replayNodes,
- resumeSlots
- ) {
- var errorDigest = logRecoverableError(request, error, errorInfo);
- abortRemainingReplayNodes(
- request,
- boundary,
- replayNodes,
- resumeSlots,
- error,
- errorDigest,
- errorInfo,
- !1
- );
- }
function abortTaskSoft(task) {
var boundary = task.blockedBoundary;
task = task.blockedSegment;
@@ -6448,14 +6587,14 @@ __DEV__ &&
if (13 !== request.status && request.status !== CLOSED) {
boundary = task.replay;
if (null === boundary) {
- logRecoverableError(request, error, segment);
- fatalError(request, error);
+ logRecoverableError(request, error, segment, null);
+ fatalError(request, error, segment, null);
return;
}
boundary.pendingTasks--;
0 === boundary.pendingTasks &&
0 < boundary.nodes.length &&
- ((task = logRecoverableError(request, error, segment)),
+ ((task = logRecoverableError(request, error, segment, null)),
abortRemainingReplayNodes(
request,
null,
@@ -6473,7 +6612,7 @@ __DEV__ &&
boundary.pendingTasks--,
boundary.status !== CLIENT_RENDERED &&
((boundary.status = CLIENT_RENDERED),
- (task = logRecoverableError(request, error, segment)),
+ (task = logRecoverableError(request, error, segment, null)),
(boundary.status = CLIENT_RENDERED),
encodeErrorForBoundary(boundary, task, error, segment, !0),
untrackBoundary(request, boundary),
@@ -6548,7 +6687,7 @@ __DEV__ &&
}
}
} catch (error$5) {
- logRecoverableError(request, error$5, {});
+ logRecoverableError(request, error$5, {}, null);
}
}
function completeShell(request) {
@@ -6620,10 +6759,10 @@ __DEV__ &&
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
- function performWork(request$jscomp$1) {
+ function performWork(request$jscomp$2) {
if (
- request$jscomp$1.status !== CLOSED &&
- 13 !== request$jscomp$1.status
+ request$jscomp$2.status !== CLOSED &&
+ 13 !== request$jscomp$2.status
) {
var prevContext = currentActiveSnapshot,
prevDispatcher = ReactSharedInternals.H;
@@ -6631,16 +6770,16 @@ __DEV__ &&
var prevAsyncDispatcher = ReactSharedInternals.A;
ReactSharedInternals.A = DefaultAsyncDispatcher;
var prevRequest = currentRequest;
- currentRequest = request$jscomp$1;
+ currentRequest = request$jscomp$2;
var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
var prevResumableState = currentResumableState;
- currentResumableState = request$jscomp$1.resumableState;
+ currentResumableState = request$jscomp$2.resumableState;
try {
- var pingedTasks = request$jscomp$1.pingedTasks,
+ var pingedTasks = request$jscomp$2.pingedTasks,
i;
for (i = 0; i < pingedTasks.length; i++) {
- var request = request$jscomp$1,
+ var request = request$jscomp$2,
task = pingedTasks[i],
segment = task.blockedSegment;
if (null === segment) {
@@ -6688,16 +6827,32 @@ __DEV__ &&
} else {
request.replay.pendingTasks--;
request.abortSet.delete(request);
- var errorInfo = getThrownInfo(request.componentStack);
- erroredReplay(
- request$jscomp$0,
- request.blockedBoundary,
- 12 === request$jscomp$0.status
- ? request$jscomp$0.fatalError
- : x,
- errorInfo,
- request.replay.nodes,
- request.replay.slots
+ var errorInfo = getThrownInfo(request.componentStack),
+ errorDigest = void 0,
+ request$jscomp$1 = request$jscomp$0,
+ boundary = request.blockedBoundary,
+ error =
+ 12 === request$jscomp$0.status
+ ? request$jscomp$0.fatalError
+ : x,
+ errorInfo$jscomp$0 = errorInfo,
+ replayNodes = request.replay.nodes,
+ resumeSlots = request.replay.slots;
+ errorDigest = logRecoverableError(
+ request$jscomp$1,
+ error,
+ errorInfo$jscomp$0,
+ enableOwnerStacks ? request.debugTask : null
+ );
+ abortRemainingReplayNodes(
+ request$jscomp$1,
+ boundary,
+ replayNodes,
+ resumeSlots,
+ error,
+ errorDigest,
+ errorInfo$jscomp$0,
+ !1
);
request$jscomp$0.pendingRootTasks--;
0 === request$jscomp$0.pendingRootTasks &&
@@ -6710,97 +6865,108 @@ __DEV__ &&
currentTaskInDEV = prevTaskInDEV;
}
}
- } else {
- request$jscomp$0 = prevTaskInDEV = void 0;
- var task$jscomp$0 = task,
- segment$jscomp$0 = segment;
- if (segment$jscomp$0.status === PENDING) {
- segment$jscomp$0.status = 6;
- switchContext(task$jscomp$0.context);
- request$jscomp$0 = currentTaskInDEV;
- currentTaskInDEV = task$jscomp$0;
- var childrenLength = segment$jscomp$0.children.length,
- chunkLength = segment$jscomp$0.chunks.length;
- try {
- retryNode(request, task$jscomp$0),
- pushSegmentFinale(
- segment$jscomp$0.chunks,
- request.renderState,
- segment$jscomp$0.lastPushedText,
- segment$jscomp$0.textEmbedded
- ),
- task$jscomp$0.abortSet.delete(task$jscomp$0),
- (segment$jscomp$0.status = COMPLETED),
- 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()
- : 12 === request.status
- ? request.fatalError
- : thrownValue;
- if (
- "object" === typeof x$jscomp$0 &&
- null !== x$jscomp$0 &&
- "function" === typeof x$jscomp$0.then
- ) {
- 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);
- }
- } finally {
- currentTaskInDEV = request$jscomp$0;
+ } else if (
+ ((request$jscomp$0 = prevTaskInDEV = void 0),
+ (errorDigest = task),
+ (request$jscomp$1 = segment),
+ request$jscomp$1.status === PENDING)
+ ) {
+ request$jscomp$1.status = 6;
+ switchContext(errorDigest.context);
+ request$jscomp$0 = currentTaskInDEV;
+ currentTaskInDEV = errorDigest;
+ var childrenLength = request$jscomp$1.children.length,
+ chunkLength = request$jscomp$1.chunks.length;
+ try {
+ retryNode(request, errorDigest),
+ pushSegmentFinale(
+ request$jscomp$1.chunks,
+ request.renderState,
+ request$jscomp$1.lastPushedText,
+ request$jscomp$1.textEmbedded
+ ),
+ errorDigest.abortSet.delete(errorDigest),
+ (request$jscomp$1.status = COMPLETED),
+ finishedTask(
+ request,
+ errorDigest.blockedBoundary,
+ request$jscomp$1
+ );
+ } catch (thrownValue) {
+ resetHooksState();
+ request$jscomp$1.children.length = childrenLength;
+ request$jscomp$1.chunks.length = chunkLength;
+ var x$jscomp$0 =
+ thrownValue === SuspenseException
+ ? getSuspendedThenable()
+ : 12 === request.status
+ ? request.fatalError
+ : thrownValue;
+ if (
+ "object" === typeof x$jscomp$0 &&
+ null !== x$jscomp$0 &&
+ "function" === typeof x$jscomp$0.then
+ ) {
+ request$jscomp$1.status = PENDING;
+ errorDigest.thenableState = getThenableStateAfterSuspending();
+ var ping$jscomp$0 = errorDigest.ping;
+ x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
+ } else {
+ var errorInfo$jscomp$1 = getThrownInfo(
+ errorDigest.componentStack
+ );
+ errorDigest.abortSet.delete(errorDigest);
+ request$jscomp$1.status = 4;
+ var boundary$jscomp$0 = errorDigest.blockedBoundary,
+ debugTask = enableOwnerStacks
+ ? errorDigest.debugTask
+ : null;
+ prevTaskInDEV = logRecoverableError(
+ request,
+ x$jscomp$0,
+ errorInfo$jscomp$1,
+ debugTask
+ );
+ null === boundary$jscomp$0
+ ? fatalError(
+ request,
+ x$jscomp$0,
+ errorInfo$jscomp$1,
+ debugTask
+ )
+ : (boundary$jscomp$0.pendingTasks--,
+ boundary$jscomp$0.status !== CLIENT_RENDERED &&
+ ((boundary$jscomp$0.status = CLIENT_RENDERED),
+ encodeErrorForBoundary(
+ boundary$jscomp$0,
+ prevTaskInDEV,
+ x$jscomp$0,
+ errorInfo$jscomp$1,
+ !1
+ ),
+ untrackBoundary(request, boundary$jscomp$0),
+ boundary$jscomp$0.parentFlushed &&
+ request.clientRenderedBoundaries.push(
+ boundary$jscomp$0
+ )));
+ request.allPendingTasks--;
+ 0 === request.allPendingTasks && completeAll(request);
}
+ } finally {
+ currentTaskInDEV = request$jscomp$0;
}
}
}
pingedTasks.splice(0, i);
- null !== request$jscomp$1.destination &&
+ null !== request$jscomp$2.destination &&
flushCompletedQueues(
- request$jscomp$1,
- request$jscomp$1.destination
+ request$jscomp$2,
+ request$jscomp$2.destination
);
} catch (error$6) {
- logRecoverableError(request$jscomp$1, error$6, {}),
- fatalError(request$jscomp$1, error$6);
+ (pingedTasks = {}),
+ logRecoverableError(request$jscomp$2, error$6, pingedTasks, null),
+ fatalError(request$jscomp$2, error$6, pingedTasks, null);
} finally {
(currentResumableState = prevResumableState),
(ReactSharedInternals.H = prevDispatcher),
@@ -7435,8 +7601,9 @@ __DEV__ &&
try {
flushCompletedQueues(request, destination);
} catch (error$7) {
- logRecoverableError(request, error$7, {}),
- fatalError(request, error$7);
+ (destination = {}),
+ logRecoverableError(request, error$7, destination, null),
+ fatalError(request, error$7, destination, null);
}
}
}
@@ -7462,7 +7629,9 @@ __DEV__ &&
null !== request.destination &&
flushCompletedQueues(request, request.destination);
} catch (error$8) {
- logRecoverableError(request, error$8, {}), fatalError(request, error$8);
+ (reason = {}),
+ logRecoverableError(request, error$8, reason, null),
+ fatalError(request, error$8, reason, null);
}
}
function onError() {}
@@ -7525,6 +7694,7 @@ __DEV__ &&
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
? Symbol.for("react.transitional.element")
@@ -8991,5 +9161,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-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-classic-a4964987-20241211";
})();
diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js
index e9039f2bbe..d3ec293601 100644
--- a/compiled/facebook-www/ReactDOMServer-dev.modern.js
+++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js
@@ -4256,6 +4256,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeComponentStackByType(type) {
if ("string" === typeof type) return describeBuiltInComponentFrame(type);
if ("function" === typeof type)
@@ -4420,7 +4441,9 @@ __DEV__ &&
null,
emptyTreeContext,
null,
- !1
+ !1,
+ emptyContextObject,
+ null
);
pushComponentStack(children);
resumableState.pingedTasks.push(children);
@@ -4465,7 +4488,9 @@ __DEV__ &&
context,
treeContext,
componentStack,
- isFallback
+ isFallback,
+ legacyContext,
+ debugTask
) {
request.allPendingTasks++;
null === blockedBoundary
@@ -4490,6 +4515,7 @@ __DEV__ &&
thenableState: thenableState,
isFallback: isFallback
};
+ enableOwnerStacks && (task.debugTask = debugTask);
abortSet.add(task);
return task;
}
@@ -4507,7 +4533,9 @@ __DEV__ &&
context,
treeContext,
componentStack,
- isFallback
+ isFallback,
+ legacyContext,
+ debugTask
) {
request.allPendingTasks++;
null === blockedBoundary
@@ -4533,6 +4561,7 @@ __DEV__ &&
thenableState: thenableState,
isFallback: isFallback
};
+ enableOwnerStacks && (task.debugTask = debugTask);
abortSet.add(task);
return task;
}
@@ -4558,22 +4587,68 @@ __DEV__ &&
};
}
function getCurrentStackInDEV() {
- return null === currentTaskInDEV ||
- null === currentTaskInDEV.componentStack
- ? ""
- : getStackByComponentStackNode(currentTaskInDEV.componentStack);
+ if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)
+ return "";
+ if (enableOwnerStacks) {
+ var componentStack = currentTaskInDEV.componentStack;
+ if (enableOwnerStacks)
+ try {
+ var info = "";
+ if ("string" === typeof componentStack.type)
+ info += describeBuiltInComponentFrame(componentStack.type);
+ else if ("function" === typeof componentStack.type) {
+ if (!componentStack.owner) {
+ var JSCompiler_temp_const = info,
+ fn = componentStack.type,
+ name = fn ? fn.displayName || fn.name : "";
+ var JSCompiler_inline_result = name
+ ? describeBuiltInComponentFrame(name)
+ : "";
+ info = JSCompiler_temp_const + JSCompiler_inline_result;
+ }
+ } else
+ componentStack.owner ||
+ (info += describeComponentStackByType(componentStack.type));
+ for (; componentStack; )
+ (JSCompiler_temp_const = null),
+ null != componentStack.debugStack
+ ? (JSCompiler_temp_const = formatOwnerStack(
+ componentStack.debugStack
+ ))
+ : ((JSCompiler_inline_result = componentStack),
+ null != JSCompiler_inline_result.stack &&
+ (JSCompiler_temp_const =
+ "string" !== typeof JSCompiler_inline_result.stack
+ ? (JSCompiler_inline_result.stack = formatOwnerStack(
+ JSCompiler_inline_result.stack
+ ))
+ : JSCompiler_inline_result.stack)),
+ (componentStack = componentStack.owner) &&
+ JSCompiler_temp_const &&
+ (info += "\n" + JSCompiler_temp_const);
+ var JSCompiler_inline_result$jscomp$0 = info;
+ } catch (x) {
+ JSCompiler_inline_result$jscomp$0 =
+ "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ else JSCompiler_inline_result$jscomp$0 = "";
+ return JSCompiler_inline_result$jscomp$0;
+ }
+ return getStackByComponentStackNode(currentTaskInDEV.componentStack);
}
function pushServerComponentStack(task, debugInfo) {
if (null != debugInfo)
for (var i = 0; i < debugInfo.length; i++) {
var componentInfo = debugInfo[i];
- "string" === typeof componentInfo.name &&
- (task.componentStack = {
+ "string" !== typeof componentInfo.name ||
+ (enableOwnerStacks && void 0 === componentInfo.debugStack) ||
+ ((task.componentStack = {
parent: task.componentStack,
type: componentInfo,
owner: componentInfo.owner,
- stack: null
- });
+ stack: enableOwnerStacks ? componentInfo.debugStack : null
+ }),
+ enableOwnerStacks && (task.debugTask = componentInfo.debugTask));
}
}
function pushComponentStack(task) {
@@ -4582,13 +4657,15 @@ __DEV__ &&
switch (node.$$typeof) {
case REACT_ELEMENT_TYPE:
var type = node.type,
- owner = node._owner;
+ owner = node._owner,
+ stack = enableOwnerStacks ? node._debugStack : null;
pushServerComponentStack(task, node._debugInfo);
+ enableOwnerStacks && (task.debugTask = node._debugTask);
task.componentStack = {
parent: task.componentStack,
type: type,
owner: owner,
- stack: null
+ stack: stack
};
break;
case REACT_LAZY_TYPE:
@@ -4637,9 +4714,12 @@ __DEV__ &&
boundary.errorStack = null !== error ? wasAborted + error : null;
boundary.errorComponentStack = thrownInfo.componentStack;
}
- function logRecoverableError(request, error$1, errorInfo) {
+ function logRecoverableError(request, error$1, errorInfo, debugTask) {
request = request.onError;
- error$1 = request(error$1, errorInfo);
+ error$1 =
+ enableOwnerStacks && debugTask
+ ? debugTask.run(request.bind(null, error$1, errorInfo))
+ : request(error$1, errorInfo);
if (null != error$1 && "string" !== typeof error$1)
error$jscomp$2(
'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',
@@ -4647,11 +4727,13 @@ __DEV__ &&
);
else return error$1;
}
- function fatalError(request, error) {
- var onShellError = request.onShellError,
- onFatalError = request.onFatalError;
- onShellError(error);
- onFatalError(error);
+ function fatalError(request, error, errorInfo, debugTask) {
+ errorInfo = request.onShellError;
+ var onFatalError = request.onFatalError;
+ enableOwnerStacks && debugTask
+ ? (debugTask.run(errorInfo.bind(null, error)),
+ debugTask.run(onFatalError.bind(null, error)))
+ : (errorInfo(error), onFatalError(error));
null !== request.destination
? ((request.status = CLOSED), request.destination.destroy(error))
: ((request.status = 13), (request.fatalError = error));
@@ -5377,7 +5459,9 @@ __DEV__ &&
task.context,
task.treeContext,
task.componentStack,
- task.isFallback
+ task.isFallback,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
);
pushComponentStack(task);
request.pingedTasks.push(task);
@@ -5414,7 +5498,8 @@ __DEV__ &&
(addendum = logRecoverableError(
request,
newProps,
- defaultProps
+ defaultProps,
+ enableOwnerStacks ? task.debugTask : null
)),
encodeErrorForBoundary(
propName,
@@ -5444,7 +5529,9 @@ __DEV__ &&
task.context,
task.treeContext,
task.componentStack,
- !0
+ !0,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
);
pushComponentStack(task);
request.pingedTasks.push(task);
@@ -5560,15 +5647,187 @@ __DEV__ &&
(task.replay = prevReplay), (task.blockedSegment = null);
}
}
+ function replayElement(
+ request,
+ task,
+ keyPath,
+ name,
+ keyOrIndex,
+ childIndex,
+ type,
+ props,
+ ref,
+ replay
+ ) {
+ childIndex = replay.nodes;
+ for (var i = 0; i < childIndex.length; i++) {
+ var node = childIndex[i];
+ if (keyOrIndex === node[1]) {
+ if (4 === node.length) {
+ if (null !== name && name !== node[0])
+ throw Error(
+ "Expected the resume to render <" +
+ node[0] +
+ "> in this slot but instead it rendered <" +
+ name +
+ ">. The tree doesn't match so React will fallback to client rendering."
+ );
+ var childNodes = node[2];
+ node = node[3];
+ name = task.node;
+ task.replay = { nodes: childNodes, slots: node, pendingTasks: 1 };
+ try {
+ renderElement(request, task, keyPath, type, props, ref);
+ if (
+ 1 === task.replay.pendingTasks &&
+ 0 < task.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."
+ );
+ task.replay.pendingTasks--;
+ } catch (x) {
+ if (
+ "object" === typeof x &&
+ null !== x &&
+ (x === SuspenseException || "function" === typeof x.then)
+ )
+ throw (task.node === name && (task.replay = replay), x);
+ task.replay.pendingTasks--;
+ type = getThrownInfo(task.componentStack);
+ props = request;
+ request = task.blockedBoundary;
+ keyPath = x;
+ ref = node;
+ node = logRecoverableError(
+ props,
+ keyPath,
+ type,
+ enableOwnerStacks ? task.debugTask : null
+ );
+ abortRemainingReplayNodes(
+ props,
+ request,
+ childNodes,
+ ref,
+ keyPath,
+ node,
+ type,
+ !1
+ );
+ }
+ task.replay = replay;
+ } else {
+ if (type !== REACT_SUSPENSE_TYPE)
+ throw Error(
+ "Expected the resume to render in this slot but instead it rendered <" +
+ (getComponentNameFromType(type) || "Unknown") +
+ ">. The tree doesn't match so React will fallback to client rendering."
+ );
+ a: {
+ replay = void 0;
+ type = node[5];
+ ref = node[2];
+ name = node[3];
+ keyOrIndex = null === node[4] ? [] : node[4][2];
+ node = null === node[4] ? null : node[4][3];
+ var prevKeyPath = task.keyPath,
+ previousReplaySet = task.replay,
+ parentBoundary = task.blockedBoundary,
+ parentHoistableState = task.hoistableState,
+ content = props.children;
+ props = props.fallback;
+ var fallbackAbortSet = new Set(),
+ resumedBoundary = createSuspenseBoundary(
+ request,
+ fallbackAbortSet
+ );
+ resumedBoundary.parentFlushed = !0;
+ resumedBoundary.rootSegmentID = type;
+ task.blockedBoundary = resumedBoundary;
+ task.hoistableState = resumedBoundary.contentState;
+ task.keyPath = keyPath;
+ task.replay = { nodes: ref, slots: name, pendingTasks: 1 };
+ try {
+ renderNode(request, task, content, -1);
+ if (
+ 1 === task.replay.pendingTasks &&
+ 0 < task.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."
+ );
+ task.replay.pendingTasks--;
+ if (
+ 0 === resumedBoundary.pendingTasks &&
+ resumedBoundary.status === PENDING
+ ) {
+ resumedBoundary.status = COMPLETED;
+ request.completedBoundaries.push(resumedBoundary);
+ break a;
+ }
+ } catch (error$3) {
+ (resumedBoundary.status = CLIENT_RENDERED),
+ (childNodes = getThrownInfo(task.componentStack)),
+ (replay = logRecoverableError(
+ request,
+ error$3,
+ childNodes,
+ enableOwnerStacks ? task.debugTask : null
+ )),
+ encodeErrorForBoundary(
+ resumedBoundary,
+ replay,
+ error$3,
+ childNodes,
+ !1
+ ),
+ task.replay.pendingTasks--,
+ request.clientRenderedBoundaries.push(resumedBoundary);
+ } finally {
+ (task.blockedBoundary = parentBoundary),
+ (task.hoistableState = parentHoistableState),
+ (task.replay = previousReplaySet),
+ (task.keyPath = prevKeyPath);
+ }
+ props = createReplayTask(
+ request,
+ null,
+ { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
+ props,
+ -1,
+ parentBoundary,
+ resumedBoundary.fallbackState,
+ fallbackAbortSet,
+ [keyPath[0], "Suspense Fallback", keyPath[2]],
+ task.formatContext,
+ task.context,
+ task.treeContext,
+ task.componentStack,
+ !0,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
+ );
+ pushComponentStack(props);
+ request.pingedTasks.push(props);
+ }
+ }
+ childIndex.splice(i, 1);
+ break;
+ }
+ }
+ }
function renderNodeDestructive(request, task, node, childIndex) {
null !== task.replay && "number" === typeof task.replay.slots
? resumeNode(request, task, task.replay.slots, node, childIndex)
: ((task.node = node),
(task.childIndex = childIndex),
(node = task.componentStack),
+ (childIndex = enableOwnerStacks ? task.debugTask : null),
pushComponentStack(task),
retryNode(request, task),
- (task.componentStack = node));
+ (task.componentStack = node),
+ enableOwnerStacks && (task.debugTask = childIndex));
}
function retryNode(request, task) {
var node = task.node,
@@ -5578,170 +5837,56 @@ __DEV__ &&
switch (node.$$typeof) {
case REACT_ELEMENT_TYPE:
var type = node.type,
- key = node.key,
- props = node.props;
- node = props.ref;
- var ref = void 0 !== node ? node : null,
- name = getComponentNameFromType(type),
- keyOrIndex =
- null == key ? (-1 === childIndex ? 0 : childIndex) : key,
- keyPath = [task.keyPath, name, keyOrIndex];
- if (null !== task.replay) {
- var replay = task.replay;
- childIndex = replay.nodes;
- for (node = 0; node < childIndex.length; node++)
- if (((key = childIndex[node]), keyOrIndex === key[1])) {
- if (4 === key.length) {
- if (null !== name && name !== key[0])
- throw Error(
- "Expected the resume to render <" +
- key[0] +
- "> in this slot but instead it rendered <" +
- name +
- ">. The tree doesn't match so React will fallback to client rendering."
- );
- var childNodes = key[2];
- key = key[3];
- name = task.node;
- task.replay = {
- nodes: childNodes,
- slots: key,
- pendingTasks: 1
- };
- try {
- renderElement(request, task, keyPath, type, props, ref);
- if (
- 1 === task.replay.pendingTasks &&
- 0 < task.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."
- );
- task.replay.pendingTasks--;
- } catch (x) {
- if (
- "object" === typeof x &&
- null !== x &&
- (x === SuspenseException ||
- "function" === typeof x.then)
- )
- throw (
- (task.node === name && (task.replay = replay), x)
- );
- task.replay.pendingTasks--;
- props = getThrownInfo(task.componentStack);
- erroredReplay(
- request,
- task.blockedBoundary,
- x,
- props,
- childNodes,
- key
- );
- }
- task.replay = replay;
- } else {
- if (type !== REACT_SUSPENSE_TYPE)
- throw Error(
- "Expected the resume to render in this slot but instead it rendered <" +
- (getComponentNameFromType(type) || "Unknown") +
- ">. The tree doesn't match so React will fallback to client rendering."
- );
- a: {
- type = void 0;
- ref = key[5];
- replay = key[2];
- name = key[3];
- keyOrIndex = null === key[4] ? [] : key[4][2];
- key = null === key[4] ? null : key[4][3];
- var prevKeyPath = task.keyPath,
- previousReplaySet = task.replay,
- parentBoundary = task.blockedBoundary,
- parentHoistableState = task.hoistableState,
- content = props.children;
- props = props.fallback;
- var fallbackAbortSet = new Set(),
- resumedBoundary = createSuspenseBoundary(
- request,
- fallbackAbortSet
- );
- resumedBoundary.parentFlushed = !0;
- resumedBoundary.rootSegmentID = ref;
- task.blockedBoundary = resumedBoundary;
- task.hoistableState = resumedBoundary.contentState;
- task.keyPath = keyPath;
- task.replay = {
- nodes: replay,
- slots: name,
- pendingTasks: 1
- };
- try {
- renderNode(request, task, content, -1);
- if (
- 1 === task.replay.pendingTasks &&
- 0 < task.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."
- );
- task.replay.pendingTasks--;
- if (
- 0 === resumedBoundary.pendingTasks &&
- resumedBoundary.status === PENDING
- ) {
- resumedBoundary.status = COMPLETED;
- request.completedBoundaries.push(resumedBoundary);
- break a;
- }
- } catch (error$3) {
- (resumedBoundary.status = CLIENT_RENDERED),
- (childNodes = getThrownInfo(task.componentStack)),
- (type = logRecoverableError(
- request,
- error$3,
- childNodes
- )),
- encodeErrorForBoundary(
- resumedBoundary,
- type,
- error$3,
- childNodes,
- !1
- ),
- task.replay.pendingTasks--,
- request.clientRenderedBoundaries.push(
- resumedBoundary
- );
- } finally {
- (task.blockedBoundary = parentBoundary),
- (task.hoistableState = parentHoistableState),
- (task.replay = previousReplaySet),
- (task.keyPath = prevKeyPath);
- }
- childNodes = createReplayTask(
- request,
- null,
- { nodes: keyOrIndex, slots: key, pendingTasks: 0 },
- props,
- -1,
- parentBoundary,
- resumedBoundary.fallbackState,
- fallbackAbortSet,
- [keyPath[0], "Suspense Fallback", keyPath[2]],
- task.formatContext,
- task.context,
- task.treeContext,
- task.componentStack,
- !0
- );
- pushComponentStack(childNodes);
- request.pingedTasks.push(childNodes);
- }
- }
- childIndex.splice(node, 1);
- break;
- }
- } else renderElement(request, task, keyPath, type, props, ref);
+ key = node.key;
+ node = node.props;
+ var refProp = node.ref;
+ refProp = void 0 !== refProp ? refProp : null;
+ var debugTask = enableOwnerStacks ? task.debugTask : null,
+ name = getComponentNameFromType(type);
+ key = null == key ? (-1 === childIndex ? 0 : childIndex) : key;
+ var keyPath = [task.keyPath, name, key];
+ null !== task.replay
+ ? debugTask
+ ? debugTask.run(
+ replayElement.bind(
+ null,
+ request,
+ task,
+ keyPath,
+ name,
+ key,
+ childIndex,
+ type,
+ node,
+ refProp,
+ task.replay
+ )
+ )
+ : replayElement(
+ request,
+ task,
+ keyPath,
+ name,
+ key,
+ childIndex,
+ type,
+ node,
+ refProp,
+ task.replay
+ )
+ : debugTask
+ ? debugTask.run(
+ renderElement.bind(
+ null,
+ request,
+ task,
+ keyPath,
+ type,
+ node,
+ refProp
+ )
+ )
+ : renderElement(request, task, keyPath, type, node, refProp);
return;
case REACT_PORTAL_TYPE:
throw Error(
@@ -5758,21 +5903,20 @@ __DEV__ &&
return;
}
null === node || "object" !== typeof node
- ? (props = null)
- : ((childNodes =
+ ? (key = null)
+ : ((type =
(MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
node["@@iterator"]),
- (props = "function" === typeof childNodes ? childNodes : null));
- if (props && (childNodes = props.call(node))) {
- if (childNodes === node) {
+ (key = "function" === typeof type ? type : null));
+ if (key && (type = key.call(node))) {
+ if (type === node) {
if (
-1 !== childIndex ||
null === task.componentStack ||
"function" !== typeof task.componentStack.type ||
"[object GeneratorFunction]" !==
Object.prototype.toString.call(task.componentStack.type) ||
- "[object Generator]" !==
- Object.prototype.toString.call(childNodes)
+ "[object Generator]" !== Object.prototype.toString.call(type)
)
didWarnAboutGenerators ||
error$jscomp$2(
@@ -5780,18 +5924,18 @@ __DEV__ &&
),
(didWarnAboutGenerators = !0);
} else
- node.entries !== props ||
+ node.entries !== key ||
didWarnAboutMaps ||
(error$jscomp$2(
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
),
(didWarnAboutMaps = !0));
- node = childNodes.next();
+ node = type.next();
if (!node.done) {
- props = [];
- do props.push(node.value), (node = childNodes.next());
+ key = [];
+ do key.push(node.value), (node = type.next());
while (!node.done);
- renderChildrenArray(request, task, props, childIndex);
+ renderChildrenArray(request, task, key, childIndex);
}
return;
}
@@ -5812,39 +5956,39 @@ __DEV__ &&
node._currentValue2,
childIndex
);
- childIndex = Object.prototype.toString.call(node);
+ request = Object.prototype.toString.call(node);
throw Error(
"Objects are not valid as a React child (found: " +
- ("[object Object]" === childIndex
+ ("[object Object]" === request
? "object with keys {" + Object.keys(node).join(", ") + "}"
- : childIndex) +
+ : request) +
"). If you meant to render a collection of children, use an array instead."
);
}
"string" === typeof node
- ? ((childIndex = task.blockedSegment),
- null !== childIndex &&
- (childIndex.lastPushedText = pushTextInstance(
- childIndex.chunks,
+ ? ((task = task.blockedSegment),
+ null !== task &&
+ (task.lastPushedText = pushTextInstance(
+ task.chunks,
node,
request.renderState,
- childIndex.lastPushedText
+ task.lastPushedText
)))
: "number" === typeof node || "bigint" === typeof node
- ? ((childIndex = task.blockedSegment),
- null !== childIndex &&
- (childIndex.lastPushedText = pushTextInstance(
- childIndex.chunks,
+ ? ((task = task.blockedSegment),
+ null !== task &&
+ (task.lastPushedText = pushTextInstance(
+ task.chunks,
"" + node,
request.renderState,
- childIndex.lastPushedText
+ task.lastPushedText
)))
: ("function" === typeof node &&
- ((childIndex = node.displayName || node.name || "Component"),
+ ((request = node.displayName || node.name || "Component"),
error$jscomp$2(
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",
- childIndex,
- childIndex
+ request,
+ request
)),
"symbol" === typeof node &&
error$jscomp$2(
@@ -5853,9 +5997,11 @@ __DEV__ &&
));
}
}
- function renderChildrenArray(request$jscomp$0, task, children, childIndex) {
+ function renderChildrenArray(request, task, children, childIndex) {
var prevKeyPath = task.keyPath,
- previousComponentStack = task.componentStack;
+ previousComponentStack = task.componentStack,
+ previousDebugTask = null;
+ enableOwnerStacks && (previousDebugTask = task.debugTask);
pushServerComponentStack(task, task.node._debugInfo);
if (
-1 !== childIndex &&
@@ -5873,7 +6019,7 @@ __DEV__ &&
node = node[3];
task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
try {
- renderChildrenArray(request$jscomp$0, task, children, -1);
+ renderChildrenArray(request, task, children, -1);
if (
1 === task.replay.pendingTasks &&
0 < task.replay.nodes.length
@@ -5890,14 +6036,25 @@ __DEV__ &&
)
throw x;
task.replay.pendingTasks--;
- children = getThrownInfo(task.componentStack);
- erroredReplay(
- request$jscomp$0,
- task.blockedBoundary,
- x,
+ var thrownInfo = getThrownInfo(task.componentStack);
+ children = task.blockedBoundary;
+ var error = x,
+ resumeSlots = node;
+ node = logRecoverableError(
+ request,
+ error,
+ thrownInfo,
+ enableOwnerStacks ? task.debugTask : null
+ );
+ abortRemainingReplayNodes(
+ request,
children,
childIndex,
- node
+ resumeSlots,
+ error,
+ node,
+ thrownInfo,
+ !1
);
}
task.replay = replay;
@@ -5907,6 +6064,7 @@ __DEV__ &&
}
task.keyPath = prevKeyPath;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
return;
}
replay = task.treeContext;
@@ -5915,98 +6073,98 @@ __DEV__ &&
null !== task.replay &&
((j = task.replay.slots), null !== j && "object" === typeof j)
) {
- for (childIndex = 0; childIndex < replayNodes; childIndex++) {
- node = children[childIndex];
- task.treeContext = pushTreeContext(replay, replayNodes, childIndex);
- var resumeSegmentID = j[childIndex];
- "number" === typeof resumeSegmentID
- ? (resumeNode(
- request$jscomp$0,
- task,
- resumeSegmentID,
- node,
- childIndex
- ),
- delete j[childIndex])
- : renderNode(request$jscomp$0, task, node, childIndex);
- }
+ for (childIndex = 0; childIndex < replayNodes; childIndex++)
+ (node = children[childIndex]),
+ (task.treeContext = pushTreeContext(
+ replay,
+ replayNodes,
+ childIndex
+ )),
+ (error = j[childIndex]),
+ "number" === typeof error
+ ? (resumeNode(request, task, error, node, childIndex),
+ delete j[childIndex])
+ : renderNode(request, task, node, childIndex);
task.treeContext = replay;
task.keyPath = prevKeyPath;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
return;
}
for (j = 0; j < replayNodes; j++) {
childIndex = children[j];
- var request = request$jscomp$0;
+ resumeSlots = request;
node = task;
- resumeSegmentID = childIndex;
+ error = childIndex;
if (
- null !== resumeSegmentID &&
- "object" === typeof resumeSegmentID &&
- (resumeSegmentID.$$typeof === REACT_ELEMENT_TYPE ||
- resumeSegmentID.$$typeof === REACT_PORTAL_TYPE) &&
- resumeSegmentID._store &&
- ((!resumeSegmentID._store.validated && null == resumeSegmentID.key) ||
- 2 === resumeSegmentID._store.validated)
+ null !== error &&
+ "object" === typeof error &&
+ (error.$$typeof === REACT_ELEMENT_TYPE ||
+ error.$$typeof === REACT_PORTAL_TYPE) &&
+ error._store &&
+ ((!error._store.validated && null == error.key) ||
+ 2 === error._store.validated)
) {
- if ("object" !== typeof resumeSegmentID._store)
+ if ("object" !== typeof error._store)
throw Error(
"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
);
- resumeSegmentID._store.validated = 1;
- var didWarnForKey = request.didWarnForKey;
- null == didWarnForKey &&
- (didWarnForKey = request.didWarnForKey = new WeakSet());
- request = node.componentStack;
- if (null !== request && !didWarnForKey.has(request)) {
- didWarnForKey.add(request);
- var componentName = getComponentNameFromType(resumeSegmentID.type);
- didWarnForKey = resumeSegmentID._owner;
- var parentOwner = request.owner;
- request = "";
+ error._store.validated = 1;
+ thrownInfo = resumeSlots.didWarnForKey;
+ null == thrownInfo &&
+ (thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
+ resumeSlots = node.componentStack;
+ if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
+ thrownInfo.add(resumeSlots);
+ var componentName = getComponentNameFromType(error.type);
+ thrownInfo = error._owner;
+ var parentOwner = resumeSlots.owner;
+ resumeSlots = "";
if (parentOwner && "undefined" !== typeof parentOwner.type) {
var name = getComponentNameFromType(parentOwner.type);
name &&
- (request = "\n\nCheck the render method of `" + name + "`.");
+ (resumeSlots =
+ "\n\nCheck the render method of `" + name + "`.");
}
- request ||
+ resumeSlots ||
(componentName &&
- (request =
+ (resumeSlots =
"\n\nCheck the top-level render call using <" +
componentName +
">."));
componentName = "";
- null != didWarnForKey &&
- parentOwner !== didWarnForKey &&
+ null != thrownInfo &&
+ parentOwner !== thrownInfo &&
((parentOwner = null),
- "undefined" !== typeof didWarnForKey.type
- ? (parentOwner = getComponentNameFromType(didWarnForKey.type))
- : "string" === typeof didWarnForKey.name &&
- (parentOwner = didWarnForKey.name),
+ "undefined" !== typeof thrownInfo.type
+ ? (parentOwner = getComponentNameFromType(thrownInfo.type))
+ : "string" === typeof thrownInfo.name &&
+ (parentOwner = thrownInfo.name),
parentOwner &&
(componentName =
" It was passed a child from " + parentOwner + "."));
- didWarnForKey = node.componentStack;
+ thrownInfo = node.componentStack;
node.componentStack = {
parent: node.componentStack,
- type: resumeSegmentID.type,
- owner: resumeSegmentID._owner,
- stack: null
+ type: error.type,
+ owner: error._owner,
+ stack: enableOwnerStacks ? error._debugStack : null
};
error$jscomp$2(
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
- request,
+ resumeSlots,
componentName
);
- node.componentStack = didWarnForKey;
+ node.componentStack = thrownInfo;
}
}
task.treeContext = pushTreeContext(replay, replayNodes, j);
- renderNode(request$jscomp$0, task, childIndex, j);
+ renderNode(request, task, childIndex, j);
}
task.treeContext = replay;
task.keyPath = prevKeyPath;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
}
function untrackBoundary(request, boundary) {
request = request.trackedPostpones;
@@ -6032,7 +6190,9 @@ __DEV__ &&
task.context,
task.treeContext,
task.componentStack,
- task.isFallback
+ task.isFallback,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
);
}
function spawnNewSuspendedRenderTask(request, task, thenableState) {
@@ -6061,7 +6221,9 @@ __DEV__ &&
task.context,
task.treeContext,
task.componentStack,
- task.isFallback
+ task.isFallback,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
);
}
function renderNode(request, task, node, childIndex) {
@@ -6070,6 +6232,7 @@ __DEV__ &&
previousKeyPath = task.keyPath,
previousTreeContext = task.treeContext,
previousComponentStack = task.componentStack,
+ previousDebugTask = enableOwnerStacks ? task.debugTask : null,
segment = task.blockedSegment;
if (null === segment)
try {
@@ -6096,6 +6259,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -6108,6 +6272,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -6142,6 +6307,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -6154,6 +6320,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -6167,26 +6334,6 @@ __DEV__ &&
switchContext(previousContext);
throw node;
}
- function erroredReplay(
- request,
- boundary,
- error,
- errorInfo,
- replayNodes,
- resumeSlots
- ) {
- var errorDigest = logRecoverableError(request, error, errorInfo);
- abortRemainingReplayNodes(
- request,
- boundary,
- replayNodes,
- resumeSlots,
- error,
- errorDigest,
- errorInfo,
- !1
- );
- }
function abortTaskSoft(task) {
var boundary = task.blockedBoundary;
task = task.blockedSegment;
@@ -6270,14 +6417,14 @@ __DEV__ &&
if (13 !== request.status && request.status !== CLOSED) {
boundary = task.replay;
if (null === boundary) {
- logRecoverableError(request, error, segment);
- fatalError(request, error);
+ logRecoverableError(request, error, segment, null);
+ fatalError(request, error, segment, null);
return;
}
boundary.pendingTasks--;
0 === boundary.pendingTasks &&
0 < boundary.nodes.length &&
- ((task = logRecoverableError(request, error, segment)),
+ ((task = logRecoverableError(request, error, segment, null)),
abortRemainingReplayNodes(
request,
null,
@@ -6295,7 +6442,7 @@ __DEV__ &&
boundary.pendingTasks--,
boundary.status !== CLIENT_RENDERED &&
((boundary.status = CLIENT_RENDERED),
- (task = logRecoverableError(request, error, segment)),
+ (task = logRecoverableError(request, error, segment, null)),
(boundary.status = CLIENT_RENDERED),
encodeErrorForBoundary(boundary, task, error, segment, !0),
untrackBoundary(request, boundary),
@@ -6370,7 +6517,7 @@ __DEV__ &&
}
}
} catch (error$5) {
- logRecoverableError(request, error$5, {});
+ logRecoverableError(request, error$5, {}, null);
}
}
function completeShell(request) {
@@ -6442,10 +6589,10 @@ __DEV__ &&
request.allPendingTasks--;
0 === request.allPendingTasks && completeAll(request);
}
- function performWork(request$jscomp$1) {
+ function performWork(request$jscomp$2) {
if (
- request$jscomp$1.status !== CLOSED &&
- 13 !== request$jscomp$1.status
+ request$jscomp$2.status !== CLOSED &&
+ 13 !== request$jscomp$2.status
) {
var prevContext = currentActiveSnapshot,
prevDispatcher = ReactSharedInternals.H;
@@ -6453,16 +6600,16 @@ __DEV__ &&
var prevAsyncDispatcher = ReactSharedInternals.A;
ReactSharedInternals.A = DefaultAsyncDispatcher;
var prevRequest = currentRequest;
- currentRequest = request$jscomp$1;
+ currentRequest = request$jscomp$2;
var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
var prevResumableState = currentResumableState;
- currentResumableState = request$jscomp$1.resumableState;
+ currentResumableState = request$jscomp$2.resumableState;
try {
- var pingedTasks = request$jscomp$1.pingedTasks,
+ var pingedTasks = request$jscomp$2.pingedTasks,
i;
for (i = 0; i < pingedTasks.length; i++) {
- var request = request$jscomp$1,
+ var request = request$jscomp$2,
task = pingedTasks[i],
segment = task.blockedSegment;
if (null === segment) {
@@ -6510,16 +6657,32 @@ __DEV__ &&
} else {
request.replay.pendingTasks--;
request.abortSet.delete(request);
- var errorInfo = getThrownInfo(request.componentStack);
- erroredReplay(
- request$jscomp$0,
- request.blockedBoundary,
- 12 === request$jscomp$0.status
- ? request$jscomp$0.fatalError
- : x,
- errorInfo,
- request.replay.nodes,
- request.replay.slots
+ var errorInfo = getThrownInfo(request.componentStack),
+ errorDigest = void 0,
+ request$jscomp$1 = request$jscomp$0,
+ boundary = request.blockedBoundary,
+ error =
+ 12 === request$jscomp$0.status
+ ? request$jscomp$0.fatalError
+ : x,
+ errorInfo$jscomp$0 = errorInfo,
+ replayNodes = request.replay.nodes,
+ resumeSlots = request.replay.slots;
+ errorDigest = logRecoverableError(
+ request$jscomp$1,
+ error,
+ errorInfo$jscomp$0,
+ enableOwnerStacks ? request.debugTask : null
+ );
+ abortRemainingReplayNodes(
+ request$jscomp$1,
+ boundary,
+ replayNodes,
+ resumeSlots,
+ error,
+ errorDigest,
+ errorInfo$jscomp$0,
+ !1
);
request$jscomp$0.pendingRootTasks--;
0 === request$jscomp$0.pendingRootTasks &&
@@ -6532,97 +6695,108 @@ __DEV__ &&
currentTaskInDEV = prevTaskInDEV;
}
}
- } else {
- request$jscomp$0 = prevTaskInDEV = void 0;
- var task$jscomp$0 = task,
- segment$jscomp$0 = segment;
- if (segment$jscomp$0.status === PENDING) {
- segment$jscomp$0.status = 6;
- switchContext(task$jscomp$0.context);
- request$jscomp$0 = currentTaskInDEV;
- currentTaskInDEV = task$jscomp$0;
- var childrenLength = segment$jscomp$0.children.length,
- chunkLength = segment$jscomp$0.chunks.length;
- try {
- retryNode(request, task$jscomp$0),
- pushSegmentFinale(
- segment$jscomp$0.chunks,
- request.renderState,
- segment$jscomp$0.lastPushedText,
- segment$jscomp$0.textEmbedded
- ),
- task$jscomp$0.abortSet.delete(task$jscomp$0),
- (segment$jscomp$0.status = COMPLETED),
- 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()
- : 12 === request.status
- ? request.fatalError
- : thrownValue;
- if (
- "object" === typeof x$jscomp$0 &&
- null !== x$jscomp$0 &&
- "function" === typeof x$jscomp$0.then
- ) {
- 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);
- }
- } finally {
- currentTaskInDEV = request$jscomp$0;
+ } else if (
+ ((request$jscomp$0 = prevTaskInDEV = void 0),
+ (errorDigest = task),
+ (request$jscomp$1 = segment),
+ request$jscomp$1.status === PENDING)
+ ) {
+ request$jscomp$1.status = 6;
+ switchContext(errorDigest.context);
+ request$jscomp$0 = currentTaskInDEV;
+ currentTaskInDEV = errorDigest;
+ var childrenLength = request$jscomp$1.children.length,
+ chunkLength = request$jscomp$1.chunks.length;
+ try {
+ retryNode(request, errorDigest),
+ pushSegmentFinale(
+ request$jscomp$1.chunks,
+ request.renderState,
+ request$jscomp$1.lastPushedText,
+ request$jscomp$1.textEmbedded
+ ),
+ errorDigest.abortSet.delete(errorDigest),
+ (request$jscomp$1.status = COMPLETED),
+ finishedTask(
+ request,
+ errorDigest.blockedBoundary,
+ request$jscomp$1
+ );
+ } catch (thrownValue) {
+ resetHooksState();
+ request$jscomp$1.children.length = childrenLength;
+ request$jscomp$1.chunks.length = chunkLength;
+ var x$jscomp$0 =
+ thrownValue === SuspenseException
+ ? getSuspendedThenable()
+ : 12 === request.status
+ ? request.fatalError
+ : thrownValue;
+ if (
+ "object" === typeof x$jscomp$0 &&
+ null !== x$jscomp$0 &&
+ "function" === typeof x$jscomp$0.then
+ ) {
+ request$jscomp$1.status = PENDING;
+ errorDigest.thenableState = getThenableStateAfterSuspending();
+ var ping$jscomp$0 = errorDigest.ping;
+ x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
+ } else {
+ var errorInfo$jscomp$1 = getThrownInfo(
+ errorDigest.componentStack
+ );
+ errorDigest.abortSet.delete(errorDigest);
+ request$jscomp$1.status = 4;
+ var boundary$jscomp$0 = errorDigest.blockedBoundary,
+ debugTask = enableOwnerStacks
+ ? errorDigest.debugTask
+ : null;
+ prevTaskInDEV = logRecoverableError(
+ request,
+ x$jscomp$0,
+ errorInfo$jscomp$1,
+ debugTask
+ );
+ null === boundary$jscomp$0
+ ? fatalError(
+ request,
+ x$jscomp$0,
+ errorInfo$jscomp$1,
+ debugTask
+ )
+ : (boundary$jscomp$0.pendingTasks--,
+ boundary$jscomp$0.status !== CLIENT_RENDERED &&
+ ((boundary$jscomp$0.status = CLIENT_RENDERED),
+ encodeErrorForBoundary(
+ boundary$jscomp$0,
+ prevTaskInDEV,
+ x$jscomp$0,
+ errorInfo$jscomp$1,
+ !1
+ ),
+ untrackBoundary(request, boundary$jscomp$0),
+ boundary$jscomp$0.parentFlushed &&
+ request.clientRenderedBoundaries.push(
+ boundary$jscomp$0
+ )));
+ request.allPendingTasks--;
+ 0 === request.allPendingTasks && completeAll(request);
}
+ } finally {
+ currentTaskInDEV = request$jscomp$0;
}
}
}
pingedTasks.splice(0, i);
- null !== request$jscomp$1.destination &&
+ null !== request$jscomp$2.destination &&
flushCompletedQueues(
- request$jscomp$1,
- request$jscomp$1.destination
+ request$jscomp$2,
+ request$jscomp$2.destination
);
} catch (error$6) {
- logRecoverableError(request$jscomp$1, error$6, {}),
- fatalError(request$jscomp$1, error$6);
+ (pingedTasks = {}),
+ logRecoverableError(request$jscomp$2, error$6, pingedTasks, null),
+ fatalError(request$jscomp$2, error$6, pingedTasks, null);
} finally {
(currentResumableState = prevResumableState),
(ReactSharedInternals.H = prevDispatcher),
@@ -7257,8 +7431,9 @@ __DEV__ &&
try {
flushCompletedQueues(request, destination);
} catch (error$7) {
- logRecoverableError(request, error$7, {}),
- fatalError(request, error$7);
+ (destination = {}),
+ logRecoverableError(request, error$7, destination, null),
+ fatalError(request, error$7, destination, null);
}
}
}
@@ -7284,7 +7459,9 @@ __DEV__ &&
null !== request.destination &&
flushCompletedQueues(request, request.destination);
} catch (error$8) {
- logRecoverableError(request, error$8, {}), fatalError(request, error$8);
+ (reason = {}),
+ logRecoverableError(request, error$8, reason, null),
+ fatalError(request, error$8, reason, null);
}
}
function onError() {}
@@ -7345,6 +7522,7 @@ __DEV__ &&
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
? Symbol.for("react.transitional.element")
@@ -8809,5 +8987,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-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-modern-a4964987-20241211";
})();
diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js
index ea54ffed7e..061794ffa9 100644
--- a/compiled/facebook-www/ReactDOMServer-prod.classic.js
+++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js
@@ -5910,4 +5910,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-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-classic-a4964987-20241211";
diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js
index ac0eaf88be..ac5876a58a 100644
--- a/compiled/facebook-www/ReactDOMServer-prod.modern.js
+++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js
@@ -5822,4 +5822,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-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-modern-a4964987-20241211";
diff --git a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js
index 13bcc5e2db..2d1b30727b 100644
--- a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js
+++ b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js
@@ -4042,6 +4042,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeComponentStackByType(type) {
if ("string" === typeof type) return describeBuiltInComponentFrame(type);
if ("function" === typeof type)
@@ -4203,7 +4224,9 @@ __DEV__ &&
context,
treeContext,
componentStack,
- isFallback
+ isFallback,
+ legacyContext,
+ debugTask
) {
request.allPendingTasks++;
null === blockedBoundary
@@ -4228,6 +4251,7 @@ __DEV__ &&
thenableState: thenableState,
isFallback: isFallback
};
+ enableOwnerStacks && (task.debugTask = debugTask);
abortSet.add(task);
return task;
}
@@ -4245,7 +4269,9 @@ __DEV__ &&
context,
treeContext,
componentStack,
- isFallback
+ isFallback,
+ legacyContext,
+ debugTask
) {
request.allPendingTasks++;
null === blockedBoundary
@@ -4271,6 +4297,7 @@ __DEV__ &&
thenableState: thenableState,
isFallback: isFallback
};
+ enableOwnerStacks && (task.debugTask = debugTask);
abortSet.add(task);
return task;
}
@@ -4296,22 +4323,68 @@ __DEV__ &&
};
}
function getCurrentStackInDEV() {
- return null === currentTaskInDEV ||
- null === currentTaskInDEV.componentStack
- ? ""
- : getStackByComponentStackNode(currentTaskInDEV.componentStack);
+ if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)
+ return "";
+ if (enableOwnerStacks) {
+ var componentStack = currentTaskInDEV.componentStack;
+ if (enableOwnerStacks)
+ try {
+ var info = "";
+ if ("string" === typeof componentStack.type)
+ info += describeBuiltInComponentFrame(componentStack.type);
+ else if ("function" === typeof componentStack.type) {
+ if (!componentStack.owner) {
+ var JSCompiler_temp_const = info,
+ fn = componentStack.type,
+ name = fn ? fn.displayName || fn.name : "";
+ var JSCompiler_inline_result = name
+ ? describeBuiltInComponentFrame(name)
+ : "";
+ info = JSCompiler_temp_const + JSCompiler_inline_result;
+ }
+ } else
+ componentStack.owner ||
+ (info += describeComponentStackByType(componentStack.type));
+ for (; componentStack; )
+ (JSCompiler_temp_const = null),
+ null != componentStack.debugStack
+ ? (JSCompiler_temp_const = formatOwnerStack(
+ componentStack.debugStack
+ ))
+ : ((JSCompiler_inline_result = componentStack),
+ null != JSCompiler_inline_result.stack &&
+ (JSCompiler_temp_const =
+ "string" !== typeof JSCompiler_inline_result.stack
+ ? (JSCompiler_inline_result.stack = formatOwnerStack(
+ JSCompiler_inline_result.stack
+ ))
+ : JSCompiler_inline_result.stack)),
+ (componentStack = componentStack.owner) &&
+ JSCompiler_temp_const &&
+ (info += "\n" + JSCompiler_temp_const);
+ var JSCompiler_inline_result$jscomp$0 = info;
+ } catch (x) {
+ JSCompiler_inline_result$jscomp$0 =
+ "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ else JSCompiler_inline_result$jscomp$0 = "";
+ return JSCompiler_inline_result$jscomp$0;
+ }
+ return getStackByComponentStackNode(currentTaskInDEV.componentStack);
}
function pushServerComponentStack(task, debugInfo) {
if (null != debugInfo)
for (var i = 0; i < debugInfo.length; i++) {
var componentInfo = debugInfo[i];
- "string" === typeof componentInfo.name &&
- (task.componentStack = {
+ "string" !== typeof componentInfo.name ||
+ (enableOwnerStacks && void 0 === componentInfo.debugStack) ||
+ ((task.componentStack = {
parent: task.componentStack,
type: componentInfo,
owner: componentInfo.owner,
- stack: null
- });
+ stack: enableOwnerStacks ? componentInfo.debugStack : null
+ }),
+ enableOwnerStacks && (task.debugTask = componentInfo.debugTask));
}
}
function pushComponentStack(task) {
@@ -4320,13 +4393,15 @@ __DEV__ &&
switch (node.$$typeof) {
case REACT_ELEMENT_TYPE:
var type = node.type,
- owner = node._owner;
+ owner = node._owner,
+ stack = enableOwnerStacks ? node._debugStack : null;
pushServerComponentStack(task, node._debugInfo);
+ enableOwnerStacks && (task.debugTask = node._debugTask);
task.componentStack = {
parent: task.componentStack,
type: type,
owner: owner,
- stack: null
+ stack: stack
};
break;
case REACT_LAZY_TYPE:
@@ -4375,9 +4450,12 @@ __DEV__ &&
boundary.errorStack = null !== error ? wasAborted + error : null;
boundary.errorComponentStack = thrownInfo.componentStack;
}
- function logRecoverableError(request, error$1, errorInfo) {
+ function logRecoverableError(request, error$1, errorInfo, debugTask) {
request = request.onError;
- error$1 = request(error$1, errorInfo);
+ error$1 =
+ enableOwnerStacks && debugTask
+ ? debugTask.run(request.bind(null, error$1, errorInfo))
+ : request(error$1, errorInfo);
if (null != error$1 && "string" !== typeof error$1)
error$jscomp$2(
'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',
@@ -4385,11 +4463,13 @@ __DEV__ &&
);
else return error$1;
}
- function fatalError(request, error) {
- var onShellError = request.onShellError,
- onFatalError = request.onFatalError;
- onShellError(error);
- onFatalError(error);
+ function fatalError(request, error, errorInfo, debugTask) {
+ errorInfo = request.onShellError;
+ var onFatalError = request.onFatalError;
+ enableOwnerStacks && debugTask
+ ? (debugTask.run(errorInfo.bind(null, error)),
+ debugTask.run(onFatalError.bind(null, error)))
+ : (errorInfo(error), onFatalError(error));
null !== request.destination
? ((request.status = 14),
(request = request.destination),
@@ -5116,7 +5196,9 @@ __DEV__ &&
task.context,
task.treeContext,
task.componentStack,
- task.isFallback
+ task.isFallback,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
);
pushComponentStack(task);
request.pingedTasks.push(task);
@@ -5150,7 +5232,8 @@ __DEV__ &&
(addendum = logRecoverableError(
request,
newProps,
- defaultProps
+ defaultProps,
+ enableOwnerStacks ? task.debugTask : null
)),
encodeErrorForBoundary(
propName,
@@ -5180,7 +5263,9 @@ __DEV__ &&
task.context,
task.treeContext,
task.componentStack,
- !0
+ !0,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
);
pushComponentStack(task);
request.pingedTasks.push(task);
@@ -5296,15 +5381,187 @@ __DEV__ &&
(task.replay = prevReplay), (task.blockedSegment = null);
}
}
+ function replayElement(
+ request,
+ task,
+ keyPath,
+ name,
+ keyOrIndex,
+ childIndex,
+ type,
+ props,
+ ref,
+ replay
+ ) {
+ childIndex = replay.nodes;
+ for (var i = 0; i < childIndex.length; i++) {
+ var node = childIndex[i];
+ if (keyOrIndex === node[1]) {
+ if (4 === node.length) {
+ if (null !== name && name !== node[0])
+ throw Error(
+ "Expected the resume to render <" +
+ node[0] +
+ "> in this slot but instead it rendered <" +
+ name +
+ ">. The tree doesn't match so React will fallback to client rendering."
+ );
+ var childNodes = node[2];
+ node = node[3];
+ name = task.node;
+ task.replay = { nodes: childNodes, slots: node, pendingTasks: 1 };
+ try {
+ renderElement(request, task, keyPath, type, props, ref);
+ if (
+ 1 === task.replay.pendingTasks &&
+ 0 < task.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."
+ );
+ task.replay.pendingTasks--;
+ } catch (x) {
+ if (
+ "object" === typeof x &&
+ null !== x &&
+ (x === SuspenseException || "function" === typeof x.then)
+ )
+ throw (task.node === name && (task.replay = replay), x);
+ task.replay.pendingTasks--;
+ type = getThrownInfo(task.componentStack);
+ props = request;
+ request = task.blockedBoundary;
+ keyPath = x;
+ ref = node;
+ node = logRecoverableError(
+ props,
+ keyPath,
+ type,
+ enableOwnerStacks ? task.debugTask : null
+ );
+ abortRemainingReplayNodes(
+ props,
+ request,
+ childNodes,
+ ref,
+ keyPath,
+ node,
+ type,
+ !1
+ );
+ }
+ task.replay = replay;
+ } else {
+ if (type !== REACT_SUSPENSE_TYPE)
+ throw Error(
+ "Expected the resume to render in this slot but instead it rendered <" +
+ (getComponentNameFromType(type) || "Unknown") +
+ ">. The tree doesn't match so React will fallback to client rendering."
+ );
+ a: {
+ replay = void 0;
+ type = node[5];
+ ref = node[2];
+ name = node[3];
+ keyOrIndex = null === node[4] ? [] : node[4][2];
+ node = null === node[4] ? null : node[4][3];
+ var prevKeyPath = task.keyPath,
+ previousReplaySet = task.replay,
+ parentBoundary = task.blockedBoundary,
+ parentHoistableState = task.hoistableState,
+ content = props.children;
+ props = props.fallback;
+ var fallbackAbortSet = new Set(),
+ resumedBoundary = createSuspenseBoundary(
+ request,
+ fallbackAbortSet
+ );
+ resumedBoundary.parentFlushed = !0;
+ resumedBoundary.rootSegmentID = type;
+ task.blockedBoundary = resumedBoundary;
+ task.hoistableState = resumedBoundary.contentState;
+ task.keyPath = keyPath;
+ task.replay = { nodes: ref, slots: name, pendingTasks: 1 };
+ try {
+ renderNode(request, task, content, -1);
+ if (
+ 1 === task.replay.pendingTasks &&
+ 0 < task.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."
+ );
+ task.replay.pendingTasks--;
+ if (
+ 0 === resumedBoundary.pendingTasks &&
+ 0 === resumedBoundary.status
+ ) {
+ resumedBoundary.status = 1;
+ request.completedBoundaries.push(resumedBoundary);
+ break a;
+ }
+ } catch (error$3) {
+ (resumedBoundary.status = 4),
+ (childNodes = getThrownInfo(task.componentStack)),
+ (replay = logRecoverableError(
+ request,
+ error$3,
+ childNodes,
+ enableOwnerStacks ? task.debugTask : null
+ )),
+ encodeErrorForBoundary(
+ resumedBoundary,
+ replay,
+ error$3,
+ childNodes,
+ !1
+ ),
+ task.replay.pendingTasks--,
+ request.clientRenderedBoundaries.push(resumedBoundary);
+ } finally {
+ (task.blockedBoundary = parentBoundary),
+ (task.hoistableState = parentHoistableState),
+ (task.replay = previousReplaySet),
+ (task.keyPath = prevKeyPath);
+ }
+ props = createReplayTask(
+ request,
+ null,
+ { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
+ props,
+ -1,
+ parentBoundary,
+ resumedBoundary.fallbackState,
+ fallbackAbortSet,
+ [keyPath[0], "Suspense Fallback", keyPath[2]],
+ task.formatContext,
+ task.context,
+ task.treeContext,
+ task.componentStack,
+ !0,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
+ );
+ pushComponentStack(props);
+ request.pingedTasks.push(props);
+ }
+ }
+ childIndex.splice(i, 1);
+ break;
+ }
+ }
+ }
function renderNodeDestructive(request, task, node, childIndex) {
null !== task.replay && "number" === typeof task.replay.slots
? resumeNode(request, task, task.replay.slots, node, childIndex)
: ((task.node = node),
(task.childIndex = childIndex),
(node = task.componentStack),
+ (childIndex = enableOwnerStacks ? task.debugTask : null),
pushComponentStack(task),
retryNode(request, task),
- (task.componentStack = node));
+ (task.componentStack = node),
+ enableOwnerStacks && (task.debugTask = childIndex));
}
function retryNode(request, task) {
var node = task.node,
@@ -5314,170 +5571,56 @@ __DEV__ &&
switch (node.$$typeof) {
case REACT_ELEMENT_TYPE:
var type = node.type,
- key = node.key,
- props = node.props;
- node = props.ref;
- var ref = void 0 !== node ? node : null,
- name = getComponentNameFromType(type),
- keyOrIndex =
- null == key ? (-1 === childIndex ? 0 : childIndex) : key,
- keyPath = [task.keyPath, name, keyOrIndex];
- if (null !== task.replay) {
- var replay = task.replay;
- childIndex = replay.nodes;
- for (node = 0; node < childIndex.length; node++)
- if (((key = childIndex[node]), keyOrIndex === key[1])) {
- if (4 === key.length) {
- if (null !== name && name !== key[0])
- throw Error(
- "Expected the resume to render <" +
- key[0] +
- "> in this slot but instead it rendered <" +
- name +
- ">. The tree doesn't match so React will fallback to client rendering."
- );
- var childNodes = key[2];
- key = key[3];
- name = task.node;
- task.replay = {
- nodes: childNodes,
- slots: key,
- pendingTasks: 1
- };
- try {
- renderElement(request, task, keyPath, type, props, ref);
- if (
- 1 === task.replay.pendingTasks &&
- 0 < task.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."
- );
- task.replay.pendingTasks--;
- } catch (x) {
- if (
- "object" === typeof x &&
- null !== x &&
- (x === SuspenseException ||
- "function" === typeof x.then)
- )
- throw (
- (task.node === name && (task.replay = replay), x)
- );
- task.replay.pendingTasks--;
- props = getThrownInfo(task.componentStack);
- erroredReplay(
- request,
- task.blockedBoundary,
- x,
- props,
- childNodes,
- key
- );
- }
- task.replay = replay;
- } else {
- if (type !== REACT_SUSPENSE_TYPE)
- throw Error(
- "Expected the resume to render in this slot but instead it rendered <" +
- (getComponentNameFromType(type) || "Unknown") +
- ">. The tree doesn't match so React will fallback to client rendering."
- );
- a: {
- type = void 0;
- ref = key[5];
- replay = key[2];
- name = key[3];
- keyOrIndex = null === key[4] ? [] : key[4][2];
- key = null === key[4] ? null : key[4][3];
- var prevKeyPath = task.keyPath,
- previousReplaySet = task.replay,
- parentBoundary = task.blockedBoundary,
- parentHoistableState = task.hoistableState,
- content = props.children;
- props = props.fallback;
- var fallbackAbortSet = new Set(),
- resumedBoundary = createSuspenseBoundary(
- request,
- fallbackAbortSet
- );
- resumedBoundary.parentFlushed = !0;
- resumedBoundary.rootSegmentID = ref;
- task.blockedBoundary = resumedBoundary;
- task.hoistableState = resumedBoundary.contentState;
- task.keyPath = keyPath;
- task.replay = {
- nodes: replay,
- slots: name,
- pendingTasks: 1
- };
- try {
- renderNode(request, task, content, -1);
- if (
- 1 === task.replay.pendingTasks &&
- 0 < task.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."
- );
- task.replay.pendingTasks--;
- if (
- 0 === resumedBoundary.pendingTasks &&
- 0 === resumedBoundary.status
- ) {
- resumedBoundary.status = 1;
- request.completedBoundaries.push(resumedBoundary);
- break a;
- }
- } catch (error$3) {
- (resumedBoundary.status = 4),
- (childNodes = getThrownInfo(task.componentStack)),
- (type = logRecoverableError(
- request,
- error$3,
- childNodes
- )),
- encodeErrorForBoundary(
- resumedBoundary,
- type,
- error$3,
- childNodes,
- !1
- ),
- task.replay.pendingTasks--,
- request.clientRenderedBoundaries.push(
- resumedBoundary
- );
- } finally {
- (task.blockedBoundary = parentBoundary),
- (task.hoistableState = parentHoistableState),
- (task.replay = previousReplaySet),
- (task.keyPath = prevKeyPath);
- }
- childNodes = createReplayTask(
- request,
- null,
- { nodes: keyOrIndex, slots: key, pendingTasks: 0 },
- props,
- -1,
- parentBoundary,
- resumedBoundary.fallbackState,
- fallbackAbortSet,
- [keyPath[0], "Suspense Fallback", keyPath[2]],
- task.formatContext,
- task.context,
- task.treeContext,
- task.componentStack,
- !0
- );
- pushComponentStack(childNodes);
- request.pingedTasks.push(childNodes);
- }
- }
- childIndex.splice(node, 1);
- break;
- }
- } else renderElement(request, task, keyPath, type, props, ref);
+ key = node.key;
+ node = node.props;
+ var refProp = node.ref;
+ refProp = void 0 !== refProp ? refProp : null;
+ var debugTask = enableOwnerStacks ? task.debugTask : null,
+ name = getComponentNameFromType(type);
+ key = null == key ? (-1 === childIndex ? 0 : childIndex) : key;
+ var keyPath = [task.keyPath, name, key];
+ null !== task.replay
+ ? debugTask
+ ? debugTask.run(
+ replayElement.bind(
+ null,
+ request,
+ task,
+ keyPath,
+ name,
+ key,
+ childIndex,
+ type,
+ node,
+ refProp,
+ task.replay
+ )
+ )
+ : replayElement(
+ request,
+ task,
+ keyPath,
+ name,
+ key,
+ childIndex,
+ type,
+ node,
+ refProp,
+ task.replay
+ )
+ : debugTask
+ ? debugTask.run(
+ renderElement.bind(
+ null,
+ request,
+ task,
+ keyPath,
+ type,
+ node,
+ refProp
+ )
+ )
+ : renderElement(request, task, keyPath, type, node, refProp);
return;
case REACT_PORTAL_TYPE:
throw Error(
@@ -5494,21 +5637,20 @@ __DEV__ &&
return;
}
null === node || "object" !== typeof node
- ? (props = null)
- : ((childNodes =
+ ? (key = null)
+ : ((type =
(MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
node["@@iterator"]),
- (props = "function" === typeof childNodes ? childNodes : null));
- if (props && (childNodes = props.call(node))) {
- if (childNodes === node) {
+ (key = "function" === typeof type ? type : null));
+ if (key && (type = key.call(node))) {
+ if (type === node) {
if (
-1 !== childIndex ||
null === task.componentStack ||
"function" !== typeof task.componentStack.type ||
"[object GeneratorFunction]" !==
Object.prototype.toString.call(task.componentStack.type) ||
- "[object Generator]" !==
- Object.prototype.toString.call(childNodes)
+ "[object Generator]" !== Object.prototype.toString.call(type)
)
didWarnAboutGenerators ||
error$jscomp$2(
@@ -5516,18 +5658,18 @@ __DEV__ &&
),
(didWarnAboutGenerators = !0);
} else
- node.entries !== props ||
+ node.entries !== key ||
didWarnAboutMaps ||
(error$jscomp$2(
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
),
(didWarnAboutMaps = !0));
- node = childNodes.next();
+ node = type.next();
if (!node.done) {
- props = [];
- do props.push(node.value), (node = childNodes.next());
+ key = [];
+ do key.push(node.value), (node = type.next());
while (!node.done);
- renderChildrenArray(request, task, props, childIndex);
+ renderChildrenArray(request, task, key, childIndex);
}
return;
}
@@ -5548,39 +5690,39 @@ __DEV__ &&
node._currentValue,
childIndex
);
- childIndex = Object.prototype.toString.call(node);
+ request = Object.prototype.toString.call(node);
throw Error(
"Objects are not valid as a React child (found: " +
- ("[object Object]" === childIndex
+ ("[object Object]" === request
? "object with keys {" + Object.keys(node).join(", ") + "}"
- : childIndex) +
+ : request) +
"). If you meant to render a collection of children, use an array instead."
);
}
"string" === typeof node
- ? ((childIndex = task.blockedSegment),
- null !== childIndex &&
- (childIndex.lastPushedText = pushTextInstance(
- childIndex.chunks,
+ ? ((task = task.blockedSegment),
+ null !== task &&
+ (task.lastPushedText = pushTextInstance(
+ task.chunks,
node,
request.renderState,
- childIndex.lastPushedText
+ task.lastPushedText
)))
: "number" === typeof node || "bigint" === typeof node
- ? ((childIndex = task.blockedSegment),
- null !== childIndex &&
- (childIndex.lastPushedText = pushTextInstance(
- childIndex.chunks,
+ ? ((task = task.blockedSegment),
+ null !== task &&
+ (task.lastPushedText = pushTextInstance(
+ task.chunks,
"" + node,
request.renderState,
- childIndex.lastPushedText
+ task.lastPushedText
)))
: ("function" === typeof node &&
- ((childIndex = node.displayName || node.name || "Component"),
+ ((request = node.displayName || node.name || "Component"),
error$jscomp$2(
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",
- childIndex,
- childIndex
+ request,
+ request
)),
"symbol" === typeof node &&
error$jscomp$2(
@@ -5589,9 +5731,11 @@ __DEV__ &&
));
}
}
- function renderChildrenArray(request$jscomp$0, task, children, childIndex) {
+ function renderChildrenArray(request, task, children, childIndex) {
var prevKeyPath = task.keyPath,
- previousComponentStack = task.componentStack;
+ previousComponentStack = task.componentStack,
+ previousDebugTask = null;
+ enableOwnerStacks && (previousDebugTask = task.debugTask);
pushServerComponentStack(task, task.node._debugInfo);
if (
-1 !== childIndex &&
@@ -5609,7 +5753,7 @@ __DEV__ &&
node = node[3];
task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
try {
- renderChildrenArray(request$jscomp$0, task, children, -1);
+ renderChildrenArray(request, task, children, -1);
if (
1 === task.replay.pendingTasks &&
0 < task.replay.nodes.length
@@ -5626,14 +5770,25 @@ __DEV__ &&
)
throw x;
task.replay.pendingTasks--;
- children = getThrownInfo(task.componentStack);
- erroredReplay(
- request$jscomp$0,
- task.blockedBoundary,
- x,
+ var thrownInfo = getThrownInfo(task.componentStack);
+ children = task.blockedBoundary;
+ var error = x,
+ resumeSlots = node;
+ node = logRecoverableError(
+ request,
+ error,
+ thrownInfo,
+ enableOwnerStacks ? task.debugTask : null
+ );
+ abortRemainingReplayNodes(
+ request,
children,
childIndex,
- node
+ resumeSlots,
+ error,
+ node,
+ thrownInfo,
+ !1
);
}
task.replay = replay;
@@ -5643,6 +5798,7 @@ __DEV__ &&
}
task.keyPath = prevKeyPath;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
return;
}
replay = task.treeContext;
@@ -5651,98 +5807,98 @@ __DEV__ &&
null !== task.replay &&
((j = task.replay.slots), null !== j && "object" === typeof j)
) {
- for (childIndex = 0; childIndex < replayNodes; childIndex++) {
- node = children[childIndex];
- task.treeContext = pushTreeContext(replay, replayNodes, childIndex);
- var resumeSegmentID = j[childIndex];
- "number" === typeof resumeSegmentID
- ? (resumeNode(
- request$jscomp$0,
- task,
- resumeSegmentID,
- node,
- childIndex
- ),
- delete j[childIndex])
- : renderNode(request$jscomp$0, task, node, childIndex);
- }
+ for (childIndex = 0; childIndex < replayNodes; childIndex++)
+ (node = children[childIndex]),
+ (task.treeContext = pushTreeContext(
+ replay,
+ replayNodes,
+ childIndex
+ )),
+ (error = j[childIndex]),
+ "number" === typeof error
+ ? (resumeNode(request, task, error, node, childIndex),
+ delete j[childIndex])
+ : renderNode(request, task, node, childIndex);
task.treeContext = replay;
task.keyPath = prevKeyPath;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
return;
}
for (j = 0; j < replayNodes; j++) {
childIndex = children[j];
- var request = request$jscomp$0;
+ resumeSlots = request;
node = task;
- resumeSegmentID = childIndex;
+ error = childIndex;
if (
- null !== resumeSegmentID &&
- "object" === typeof resumeSegmentID &&
- (resumeSegmentID.$$typeof === REACT_ELEMENT_TYPE ||
- resumeSegmentID.$$typeof === REACT_PORTAL_TYPE) &&
- resumeSegmentID._store &&
- ((!resumeSegmentID._store.validated && null == resumeSegmentID.key) ||
- 2 === resumeSegmentID._store.validated)
+ null !== error &&
+ "object" === typeof error &&
+ (error.$$typeof === REACT_ELEMENT_TYPE ||
+ error.$$typeof === REACT_PORTAL_TYPE) &&
+ error._store &&
+ ((!error._store.validated && null == error.key) ||
+ 2 === error._store.validated)
) {
- if ("object" !== typeof resumeSegmentID._store)
+ if ("object" !== typeof error._store)
throw Error(
"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
);
- resumeSegmentID._store.validated = 1;
- var didWarnForKey = request.didWarnForKey;
- null == didWarnForKey &&
- (didWarnForKey = request.didWarnForKey = new WeakSet());
- request = node.componentStack;
- if (null !== request && !didWarnForKey.has(request)) {
- didWarnForKey.add(request);
- var componentName = getComponentNameFromType(resumeSegmentID.type);
- didWarnForKey = resumeSegmentID._owner;
- var parentOwner = request.owner;
- request = "";
+ error._store.validated = 1;
+ thrownInfo = resumeSlots.didWarnForKey;
+ null == thrownInfo &&
+ (thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
+ resumeSlots = node.componentStack;
+ if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
+ thrownInfo.add(resumeSlots);
+ var componentName = getComponentNameFromType(error.type);
+ thrownInfo = error._owner;
+ var parentOwner = resumeSlots.owner;
+ resumeSlots = "";
if (parentOwner && "undefined" !== typeof parentOwner.type) {
var name = getComponentNameFromType(parentOwner.type);
name &&
- (request = "\n\nCheck the render method of `" + name + "`.");
+ (resumeSlots =
+ "\n\nCheck the render method of `" + name + "`.");
}
- request ||
+ resumeSlots ||
(componentName &&
- (request =
+ (resumeSlots =
"\n\nCheck the top-level render call using <" +
componentName +
">."));
componentName = "";
- null != didWarnForKey &&
- parentOwner !== didWarnForKey &&
+ null != thrownInfo &&
+ parentOwner !== thrownInfo &&
((parentOwner = null),
- "undefined" !== typeof didWarnForKey.type
- ? (parentOwner = getComponentNameFromType(didWarnForKey.type))
- : "string" === typeof didWarnForKey.name &&
- (parentOwner = didWarnForKey.name),
+ "undefined" !== typeof thrownInfo.type
+ ? (parentOwner = getComponentNameFromType(thrownInfo.type))
+ : "string" === typeof thrownInfo.name &&
+ (parentOwner = thrownInfo.name),
parentOwner &&
(componentName =
" It was passed a child from " + parentOwner + "."));
- didWarnForKey = node.componentStack;
+ thrownInfo = node.componentStack;
node.componentStack = {
parent: node.componentStack,
- type: resumeSegmentID.type,
- owner: resumeSegmentID._owner,
- stack: null
+ type: error.type,
+ owner: error._owner,
+ stack: enableOwnerStacks ? error._debugStack : null
};
error$jscomp$2(
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
- request,
+ resumeSlots,
componentName
);
- node.componentStack = didWarnForKey;
+ node.componentStack = thrownInfo;
}
}
task.treeContext = pushTreeContext(replay, replayNodes, j);
- renderNode(request$jscomp$0, task, childIndex, j);
+ renderNode(request, task, childIndex, j);
}
task.treeContext = replay;
task.keyPath = prevKeyPath;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
}
function untrackBoundary(request, boundary) {
request = request.trackedPostpones;
@@ -5768,7 +5924,9 @@ __DEV__ &&
task.context,
task.treeContext,
task.componentStack,
- task.isFallback
+ task.isFallback,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
);
}
function spawnNewSuspendedRenderTask(request, task, thenableState) {
@@ -5797,7 +5955,9 @@ __DEV__ &&
task.context,
task.treeContext,
task.componentStack,
- task.isFallback
+ task.isFallback,
+ emptyContextObject,
+ enableOwnerStacks ? task.debugTask : null
);
}
function renderNode(request, task, node, childIndex) {
@@ -5806,6 +5966,7 @@ __DEV__ &&
previousKeyPath = task.keyPath,
previousTreeContext = task.treeContext,
previousComponentStack = task.componentStack,
+ previousDebugTask = enableOwnerStacks ? task.debugTask : null,
segment = task.blockedSegment;
if (null === segment)
try {
@@ -5832,6 +5993,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -5844,6 +6006,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -5878,6 +6041,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -5890,6 +6054,7 @@ __DEV__ &&
task.keyPath = previousKeyPath;
task.treeContext = previousTreeContext;
task.componentStack = previousComponentStack;
+ enableOwnerStacks && (task.debugTask = previousDebugTask);
switchContext(previousContext);
return;
}
@@ -5903,26 +6068,6 @@ __DEV__ &&
switchContext(previousContext);
throw node;
}
- function erroredReplay(
- request,
- boundary,
- error,
- errorInfo,
- replayNodes,
- resumeSlots
- ) {
- var errorDigest = logRecoverableError(request, error, errorInfo);
- abortRemainingReplayNodes(
- request,
- boundary,
- replayNodes,
- resumeSlots,
- error,
- errorDigest,
- errorInfo,
- !1
- );
- }
function abortTaskSoft(task) {
var boundary = task.blockedBoundary;
task = task.blockedSegment;
@@ -6006,14 +6151,14 @@ __DEV__ &&
if (13 !== request.status && 14 !== request.status) {
boundary = task.replay;
if (null === boundary) {
- logRecoverableError(request, error, segment);
- fatalError(request, error);
+ logRecoverableError(request, error, segment, null);
+ fatalError(request, error, segment, null);
return;
}
boundary.pendingTasks--;
0 === boundary.pendingTasks &&
0 < boundary.nodes.length &&
- ((task = logRecoverableError(request, error, segment)),
+ ((task = logRecoverableError(request, error, segment, null)),
abortRemainingReplayNodes(
request,
null,
@@ -6031,7 +6176,7 @@ __DEV__ &&
boundary.pendingTasks--,
4 !== boundary.status &&
((boundary.status = 4),
- (task = logRecoverableError(request, error, segment)),
+ (task = logRecoverableError(request, error, segment, null)),
(boundary.status = 4),
encodeErrorForBoundary(boundary, task, error, segment, !0),
untrackBoundary(request, boundary),
@@ -6106,7 +6251,7 @@ __DEV__ &&
}
}
} catch (error$5) {
- logRecoverableError(request, error$5, {});
+ logRecoverableError(request, error$5, {}, null);
}
}
function completeShell(request) {
@@ -6766,7 +6911,9 @@ __DEV__ &&
null !== request.destination &&
flushCompletedQueues(request, request.destination);
} catch (error$8) {
- logRecoverableError(request, error$8, {}), fatalError(request, error$8);
+ (reason = {}),
+ logRecoverableError(request, error$8, reason, null),
+ fatalError(request, error$8, reason, null);
}
}
var React = require("react"),
@@ -6778,6 +6925,7 @@ __DEV__ &&
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
? Symbol.for("react.transitional.element")
@@ -8165,35 +8313,35 @@ __DEV__ &&
task = pingedTasks[i],
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);
+ var errorDigest = void 0,
+ prevTaskInDEV = void 0,
+ 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) {
@@ -8207,45 +8355,56 @@ __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
- );
- erroredReplay(
- request$jscomp$1,
- request$jscomp$0.blockedBoundary,
- 12 === request$jscomp$1.status
- ? request$jscomp$1.fatalError
- : x,
+ task$jscomp$0.replay.pendingTasks--;
+ task$jscomp$0.abortSet.delete(task$jscomp$0);
+ var errorInfo = getThrownInfo(task$jscomp$0.componentStack),
+ boundary = task$jscomp$0.blockedBoundary,
+ error =
+ 12 === request$jscomp$0.status
+ ? request$jscomp$0.fatalError
+ : x,
+ replayNodes = task$jscomp$0.replay.nodes,
+ resumeSlots = task$jscomp$0.replay.slots;
+ errorDigest = logRecoverableError(
+ request$jscomp$0,
+ error,
errorInfo,
- request$jscomp$0.replay.nodes,
- request$jscomp$0.replay.slots
+ enableOwnerStacks ? task$jscomp$0.debugTask : null
);
- 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);
+ abortRemainingReplayNodes(
+ request$jscomp$0,
+ boundary,
+ replayNodes,
+ resumeSlots,
+ error,
+ errorDigest,
+ errorInfo,
+ !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 = errorDigest = 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;
@@ -8287,35 +8446,44 @@ __DEV__ &&
);
task$jscomp$0.abortSet.delete(task$jscomp$0);
segment$jscomp$0.status = 4;
- var boundary = task$jscomp$0.blockedBoundary;
- prevTaskInDEV = logRecoverableError(
+ var boundary$jscomp$0 = task$jscomp$0.blockedBoundary,
+ debugTask = enableOwnerStacks
+ ? task$jscomp$0.debugTask
+ : null;
+ errorDigest = logRecoverableError(
request$jscomp$0,
x$jscomp$0,
- errorInfo$jscomp$0
+ errorInfo$jscomp$0,
+ debugTask
);
- null === boundary
- ? fatalError(request$jscomp$0, x$jscomp$0)
- : (boundary.pendingTasks--,
- 4 !== boundary.status &&
- ((boundary.status = 4),
+ null === boundary$jscomp$0
+ ? fatalError(
+ request$jscomp$0,
+ x$jscomp$0,
+ errorInfo$jscomp$0,
+ debugTask
+ )
+ : (boundary$jscomp$0.pendingTasks--,
+ 4 !== boundary$jscomp$0.status &&
+ ((boundary$jscomp$0.status = 4),
encodeErrorForBoundary(
- boundary,
- prevTaskInDEV,
+ boundary$jscomp$0,
+ errorDigest,
x$jscomp$0,
errorInfo$jscomp$0,
!1
),
- untrackBoundary(request$jscomp$0, boundary),
- boundary.parentFlushed &&
+ untrackBoundary(request$jscomp$0, boundary$jscomp$0),
+ boundary$jscomp$0.parentFlushed &&
request$jscomp$0.clientRenderedBoundaries.push(
- boundary
+ boundary$jscomp$0
)));
request$jscomp$0.allPendingTasks--;
0 === request$jscomp$0.allPendingTasks &&
completeAll(request$jscomp$0);
}
} finally {
- currentTaskInDEV = request$jscomp$1;
+ currentTaskInDEV = prevTaskInDEV;
}
}
}
@@ -8324,8 +8492,9 @@ __DEV__ &&
null !== request.destination &&
flushCompletedQueues(request, request.destination);
} catch (error$6) {
- logRecoverableError(request, error$6, {}),
- fatalError(request, error$6);
+ (pingedTasks = {}),
+ logRecoverableError(request, error$6, pingedTasks, null),
+ fatalError(request, error$6, pingedTasks, null);
} finally {
(currentResumableState = prevResumableState),
(ReactSharedInternals.H = prevDispatcher),
@@ -8346,8 +8515,9 @@ __DEV__ &&
try {
flushCompletedQueues(request, stream);
} catch (error$7) {
- logRecoverableError(request, error$7, {}),
- fatalError(request, error$7);
+ (prevContext = {}),
+ logRecoverableError(request, error$7, prevContext, null),
+ fatalError(request, error$7, prevContext, null);
}
}
if (stream.fatal) throw stream.error;
@@ -8590,7 +8760,9 @@ __DEV__ &&
null,
emptyTreeContext,
null,
- !1
+ !1,
+ emptyContextObject,
+ null
);
pushComponentStack(children);
options.pingedTasks.push(children);
diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js
index bbc615488c..f1402ee70e 100644
--- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js
+++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js
@@ -520,6 +520,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
@@ -570,13 +591,76 @@ __DEV__ &&
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
+ return (fn = fn ? fn.displayName || fn.name : "")
+ ? describeBuiltInComponentFrame(fn)
+ : "";
+ }
+ function getOwnerStackByFiberInDev(workInProgress) {
+ if (!enableOwnerStacks) return "";
+ try {
+ var info = "";
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
+ switch (workInProgress.tag) {
+ case 26:
+ case 27:
+ case 5:
+ info += describeBuiltInComponentFrame(workInProgress.type);
+ break;
+ case 13:
+ info += describeBuiltInComponentFrame("Suspense");
+ break;
+ case 19:
+ info += describeBuiltInComponentFrame("SuspenseList");
+ break;
+ case 0:
+ case 15:
+ case 1:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type
+ ));
+ break;
+ case 11:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type.render
+ ));
+ }
+ for (; workInProgress; )
+ if ("number" === typeof workInProgress.tag) {
+ var fiber = workInProgress;
+ workInProgress = fiber._debugOwner;
+ var debugStack = fiber._debugStack;
+ workInProgress &&
+ debugStack &&
+ ("string" !== typeof debugStack &&
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
+ "" !== debugStack && (info += "\n" + debugStack));
+ } else if (null != workInProgress.debugStack) {
+ var ownerStack = workInProgress.debugStack;
+ (workInProgress = workInProgress.owner) &&
+ ownerStack &&
+ (info += "\n" + formatOwnerStack(ownerStack));
+ } else break;
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
function getCurrentFiberOwnerNameInDevOrNull() {
if (null === current) return null;
var owner = current._debugOwner;
return null != owner ? getComponentNameFromOwner(owner) : null;
}
function getCurrentFiberStackInDev() {
- return null === current ? "" : getStackByFiberInDevAndProd(current);
+ return null === current
+ ? ""
+ : enableOwnerStacks
+ ? getOwnerStackByFiberInDev(current)
+ : getStackByFiberInDevAndProd(current);
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
@@ -585,7 +669,11 @@ __DEV__ &&
isRendering = !1;
current = fiber;
try {
- return callback(arg0, arg1, arg2, arg3, arg4);
+ return enableOwnerStacks && null !== fiber && fiber._debugTask
+ ? fiber._debugTask.run(
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
+ )
+ : callback(arg0, arg1, arg2, arg3, arg4);
} finally {
current = previousFiber;
}
@@ -2589,37 +2677,51 @@ __DEV__ &&
: findInvalidAncestorForTag(childTag, ancestorInfo);
ancestorInfo = parentInfo || ancestorInfo;
if (!ancestorInfo) return !0;
- ancestorInfo = ancestorInfo.tag;
- var warnKey = String(!!parentInfo) + "|" + childTag + "|" + ancestorInfo;
- if (didWarn[warnKey]) return !1;
- didWarn[warnKey] = !0;
- var ancestor = (warnKey = current)
- ? findAncestor(warnKey.return, ancestorInfo)
- : null;
- warnKey =
- null !== warnKey && null !== ancestor
- ? describeAncestors(ancestor, warnKey, null)
- : "";
- ancestor = "<" + childTag + ">";
+ var ancestorTag = ancestorInfo.tag;
+ ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
+ if (didWarn[ancestorInfo]) return !1;
+ didWarn[ancestorInfo] = !0;
+ var ancestor = (ancestorInfo = current)
+ ? findAncestor(ancestorInfo.return, ancestorTag)
+ : null,
+ ancestorDescription =
+ null !== ancestorInfo && null !== ancestor
+ ? describeAncestors(ancestor, ancestorInfo, null)
+ : "",
+ tagDisplayName = "<" + childTag + ">";
parentInfo
? ((parentInfo = ""),
- "table" === ancestorInfo &&
+ "table" === ancestorTag &&
"tr" === childTag &&
(parentInfo +=
" Add a , or to your code to match the DOM tree generated by the browser."),
error$jscomp$0(
"In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
- ancestor,
- ancestorInfo,
+ tagDisplayName,
+ ancestorTag,
parentInfo,
- warnKey
+ ancestorDescription
))
: error$jscomp$0(
"In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
- ancestor,
- ancestorInfo,
- warnKey
+ tagDisplayName,
+ ancestorTag,
+ ancestorDescription
);
+ enableOwnerStacks &&
+ ancestorInfo &&
+ ((childTag = ancestorInfo.return),
+ null === ancestor ||
+ null === childTag ||
+ (ancestor === childTag &&
+ childTag._debugOwner === ancestorInfo._debugOwner) ||
+ runWithFiberInDEV(ancestor, function () {
+ error$jscomp$0(
+ "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
+ ancestorTag,
+ tagDisplayName
+ );
+ }));
return !1;
}
function validateTextNesting(childText, parentTag) {
@@ -6636,6 +6738,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -6710,6 +6813,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -6732,6 +6836,7 @@ __DEV__ &&
)),
(newChild.return = returnFiber),
(newChild._debugOwner = returnFiber),
+ enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask),
(newChild._debugInfo = currentDebugInfo),
newChild
);
@@ -6779,6 +6884,7 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask),
(returnFiber = pushDebugInfo(newChild._debugInfo)),
(lanes._debugInfo = currentDebugInfo),
(currentDebugInfo = returnFiber),
@@ -7316,6 +7422,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
validateFragmentProps(newChild, lanes, returnFiber),
(returnFiber = lanes))
@@ -7482,6 +7590,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
(returnFiber = lanes)),
placeSingleChild(returnFiber)
@@ -7511,10 +7621,13 @@ __DEV__ &&
fiber.return = returnFiber;
var debugInfo = (fiber._debugInfo = currentDebugInfo);
fiber._debugOwner = returnFiber._debugOwner;
+ enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask);
if (null != debugInfo)
for (var i = debugInfo.length - 1; 0 <= i; i--)
if ("string" === typeof debugInfo[i].stack) {
fiber._debugOwner = debugInfo[i];
+ enableOwnerStacks &&
+ (fiber._debugTask = debugInfo[i].debugTask);
break;
}
return fiber;
@@ -7752,12 +7865,14 @@ __DEV__ &&
error = componentName
? "An error occurred in the <" + componentName + "> component."
: "An error occurred in one of your React components.";
- var prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
warn(
"%s\n\n%s\n",
@@ -7765,7 +7880,8 @@ __DEV__ &&
"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
}
function defaultOnCaughtError(error$1, errorInfo) {
@@ -7775,12 +7891,14 @@ __DEV__ &&
recreateMessage =
"React will try to recreate this component tree from scratch using the error boundary you provided, " +
((errorBoundaryName || "Anonymous") + "."),
- prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
"object" === typeof error$1 &&
null !== error$1 &&
@@ -7802,7 +7920,8 @@ __DEV__ &&
recreateMessage
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
}
function defaultOnRecoverableError(error) {
@@ -9288,32 +9407,32 @@ __DEV__ &&
return current;
}
function updateSuspenseComponent(current, workInProgress, renderLanes) {
- var JSCompiler_object_inline_digest_2547;
- var JSCompiler_object_inline_stack_2548 = workInProgress.pendingProps;
+ var JSCompiler_object_inline_digest_2537;
+ var JSCompiler_object_inline_stack_2538 = workInProgress.pendingProps;
shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128);
- var JSCompiler_object_inline_componentStack_2549 = !1;
+ var JSCompiler_object_inline_componentStack_2539 = !1;
var didSuspend = 0 !== (workInProgress.flags & 128);
- (JSCompiler_object_inline_digest_2547 = didSuspend) ||
- (JSCompiler_object_inline_digest_2547 =
+ (JSCompiler_object_inline_digest_2537 = didSuspend) ||
+ (JSCompiler_object_inline_digest_2537 =
null !== current && null === current.memoizedState
? !1
: 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
- JSCompiler_object_inline_digest_2547 &&
- ((JSCompiler_object_inline_componentStack_2549 = !0),
+ JSCompiler_object_inline_digest_2537 &&
+ ((JSCompiler_object_inline_componentStack_2539 = !0),
(workInProgress.flags &= -129));
- JSCompiler_object_inline_digest_2547 = 0 !== (workInProgress.flags & 32);
+ JSCompiler_object_inline_digest_2537 = 0 !== (workInProgress.flags & 32);
workInProgress.flags &= -33;
if (null === current) {
if (isHydrating) {
- JSCompiler_object_inline_componentStack_2549
+ JSCompiler_object_inline_componentStack_2539
? pushPrimaryTreeSuspenseHandler(workInProgress)
: reuseSuspenseHandlerOnStack(workInProgress);
if (isHydrating) {
- var JSCompiler_object_inline_message_2546 = nextHydratableInstance;
+ var JSCompiler_object_inline_message_2536 = nextHydratableInstance;
var JSCompiler_temp;
- if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2546)) {
+ if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2536)) {
c: {
- var instance = JSCompiler_object_inline_message_2546;
+ var instance = JSCompiler_object_inline_message_2536;
for (
JSCompiler_temp = rootOrSingletonContext;
instance.nodeType !== COMMENT_NODE;
@@ -9354,46 +9473,46 @@ __DEV__ &&
JSCompiler_temp &&
(warnNonHydratedInstance(
workInProgress,
- JSCompiler_object_inline_message_2546
+ JSCompiler_object_inline_message_2536
),
throwOnHydrationMismatch(workInProgress));
}
- JSCompiler_object_inline_message_2546 = workInProgress.memoizedState;
+ JSCompiler_object_inline_message_2536 = workInProgress.memoizedState;
if (
- null !== JSCompiler_object_inline_message_2546 &&
- ((JSCompiler_object_inline_message_2546 =
- JSCompiler_object_inline_message_2546.dehydrated),
- null !== JSCompiler_object_inline_message_2546)
+ null !== JSCompiler_object_inline_message_2536 &&
+ ((JSCompiler_object_inline_message_2536 =
+ JSCompiler_object_inline_message_2536.dehydrated),
+ null !== JSCompiler_object_inline_message_2536)
)
return (
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2546)
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2536)
? (workInProgress.lanes = 16)
: (workInProgress.lanes = 536870912),
null
);
popSuspenseHandler(workInProgress);
}
- JSCompiler_object_inline_message_2546 =
- JSCompiler_object_inline_stack_2548.children;
- JSCompiler_temp = JSCompiler_object_inline_stack_2548.fallback;
- if (JSCompiler_object_inline_componentStack_2549)
+ JSCompiler_object_inline_message_2536 =
+ JSCompiler_object_inline_stack_2538.children;
+ JSCompiler_temp = JSCompiler_object_inline_stack_2538.fallback;
+ if (JSCompiler_object_inline_componentStack_2539)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2548 =
+ (JSCompiler_object_inline_stack_2538 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2546,
+ JSCompiler_object_inline_message_2536,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2549 =
+ (JSCompiler_object_inline_componentStack_2539 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2549.memoizedState =
+ (JSCompiler_object_inline_componentStack_2539.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2549.childLanes =
+ (JSCompiler_object_inline_componentStack_2539.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2547,
+ JSCompiler_object_inline_digest_2537,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
@@ -9406,9 +9525,9 @@ __DEV__ &&
? markerInstanceStack.current
: null),
(renderLanes =
- JSCompiler_object_inline_componentStack_2549.updateQueue),
+ JSCompiler_object_inline_componentStack_2539.updateQueue),
null === renderLanes
- ? (JSCompiler_object_inline_componentStack_2549.updateQueue =
+ ? (JSCompiler_object_inline_componentStack_2539.updateQueue =
{
transitions: workInProgress,
markerInstances: current,
@@ -9416,46 +9535,46 @@ __DEV__ &&
})
: ((renderLanes.transitions = workInProgress),
(renderLanes.markerInstances = current)))),
- JSCompiler_object_inline_stack_2548
+ JSCompiler_object_inline_stack_2538
);
if (
"number" ===
- typeof JSCompiler_object_inline_stack_2548.unstable_expectedLoadTime
+ typeof JSCompiler_object_inline_stack_2538.unstable_expectedLoadTime
)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2548 =
+ (JSCompiler_object_inline_stack_2538 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2546,
+ JSCompiler_object_inline_message_2536,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2549 =
+ (JSCompiler_object_inline_componentStack_2539 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2549.memoizedState =
+ (JSCompiler_object_inline_componentStack_2539.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2549.childLanes =
+ (JSCompiler_object_inline_componentStack_2539.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2547,
+ JSCompiler_object_inline_digest_2537,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress.lanes = 4194304),
- JSCompiler_object_inline_stack_2548
+ JSCompiler_object_inline_stack_2538
);
pushPrimaryTreeSuspenseHandler(workInProgress);
return mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_message_2546
+ JSCompiler_object_inline_message_2536
);
}
var prevState = current.memoizedState;
if (
null !== prevState &&
- ((JSCompiler_object_inline_message_2546 = prevState.dehydrated),
- null !== JSCompiler_object_inline_message_2546)
+ ((JSCompiler_object_inline_message_2536 = prevState.dehydrated),
+ null !== JSCompiler_object_inline_message_2536)
) {
if (didSuspend)
workInProgress.flags & 256
@@ -9472,94 +9591,94 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2549 =
- JSCompiler_object_inline_stack_2548.fallback),
- (JSCompiler_object_inline_message_2546 = workInProgress.mode),
- (JSCompiler_object_inline_stack_2548 =
+ (JSCompiler_object_inline_componentStack_2539 =
+ JSCompiler_object_inline_stack_2538.fallback),
+ (JSCompiler_object_inline_message_2536 = workInProgress.mode),
+ (JSCompiler_object_inline_stack_2538 =
mountWorkInProgressOffscreenFiber(
{
mode: "visible",
- children: JSCompiler_object_inline_stack_2548.children
+ children: JSCompiler_object_inline_stack_2538.children
},
- JSCompiler_object_inline_message_2546
+ JSCompiler_object_inline_message_2536
)),
- (JSCompiler_object_inline_componentStack_2549 =
+ (JSCompiler_object_inline_componentStack_2539 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2549,
- JSCompiler_object_inline_message_2546,
+ JSCompiler_object_inline_componentStack_2539,
+ JSCompiler_object_inline_message_2536,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2549.flags |= 2),
- (JSCompiler_object_inline_stack_2548.return = workInProgress),
- (JSCompiler_object_inline_componentStack_2549.return =
+ (JSCompiler_object_inline_componentStack_2539.flags |= 2),
+ (JSCompiler_object_inline_stack_2538.return = workInProgress),
+ (JSCompiler_object_inline_componentStack_2539.return =
workInProgress),
- (JSCompiler_object_inline_stack_2548.sibling =
- JSCompiler_object_inline_componentStack_2549),
- (workInProgress.child = JSCompiler_object_inline_stack_2548),
+ (JSCompiler_object_inline_stack_2538.sibling =
+ JSCompiler_object_inline_componentStack_2539),
+ (workInProgress.child = JSCompiler_object_inline_stack_2538),
reconcileChildFibers(
workInProgress,
current.child,
null,
renderLanes
),
- (JSCompiler_object_inline_stack_2548 = workInProgress.child),
- (JSCompiler_object_inline_stack_2548.memoizedState =
+ (JSCompiler_object_inline_stack_2538 = workInProgress.child),
+ (JSCompiler_object_inline_stack_2538.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_stack_2548.childLanes =
+ (JSCompiler_object_inline_stack_2538.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2547,
+ JSCompiler_object_inline_digest_2537,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress =
- JSCompiler_object_inline_componentStack_2549));
+ JSCompiler_object_inline_componentStack_2539));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isHydrating &&
error$jscomp$0(
"We should not be hydrating here. This is a bug in React. Please file a bug."
),
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2546))
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2536))
) {
- JSCompiler_object_inline_digest_2547 =
- JSCompiler_object_inline_message_2546.nextSibling &&
- JSCompiler_object_inline_message_2546.nextSibling.dataset;
- if (JSCompiler_object_inline_digest_2547) {
- JSCompiler_temp = JSCompiler_object_inline_digest_2547.dgst;
- var message = JSCompiler_object_inline_digest_2547.msg;
- instance = JSCompiler_object_inline_digest_2547.stck;
- var componentStack = JSCompiler_object_inline_digest_2547.cstck;
+ JSCompiler_object_inline_digest_2537 =
+ JSCompiler_object_inline_message_2536.nextSibling &&
+ JSCompiler_object_inline_message_2536.nextSibling.dataset;
+ if (JSCompiler_object_inline_digest_2537) {
+ JSCompiler_temp = JSCompiler_object_inline_digest_2537.dgst;
+ var message = JSCompiler_object_inline_digest_2537.msg;
+ instance = JSCompiler_object_inline_digest_2537.stck;
+ var componentStack = JSCompiler_object_inline_digest_2537.cstck;
}
- JSCompiler_object_inline_message_2546 = message;
- JSCompiler_object_inline_digest_2547 = JSCompiler_temp;
- JSCompiler_object_inline_stack_2548 = instance;
- JSCompiler_temp = JSCompiler_object_inline_componentStack_2549 =
+ JSCompiler_object_inline_message_2536 = message;
+ JSCompiler_object_inline_digest_2537 = JSCompiler_temp;
+ JSCompiler_object_inline_stack_2538 = instance;
+ JSCompiler_temp = JSCompiler_object_inline_componentStack_2539 =
componentStack;
- JSCompiler_object_inline_componentStack_2549 =
- JSCompiler_object_inline_message_2546
- ? Error(JSCompiler_object_inline_message_2546)
+ JSCompiler_object_inline_componentStack_2539 =
+ JSCompiler_object_inline_message_2536
+ ? Error(JSCompiler_object_inline_message_2536)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
);
- JSCompiler_object_inline_componentStack_2549.stack =
- JSCompiler_object_inline_stack_2548 || "";
- JSCompiler_object_inline_componentStack_2549.digest =
- JSCompiler_object_inline_digest_2547;
- JSCompiler_object_inline_digest_2547 =
+ JSCompiler_object_inline_componentStack_2539.stack =
+ JSCompiler_object_inline_stack_2538 || "";
+ JSCompiler_object_inline_componentStack_2539.digest =
+ JSCompiler_object_inline_digest_2537;
+ JSCompiler_object_inline_digest_2537 =
void 0 === JSCompiler_temp ? null : JSCompiler_temp;
- JSCompiler_object_inline_stack_2548 = {
- value: JSCompiler_object_inline_componentStack_2549,
+ JSCompiler_object_inline_stack_2538 = {
+ value: JSCompiler_object_inline_componentStack_2539,
source: null,
- stack: JSCompiler_object_inline_digest_2547
+ stack: JSCompiler_object_inline_digest_2537
};
- "string" === typeof JSCompiler_object_inline_digest_2547 &&
+ "string" === typeof JSCompiler_object_inline_digest_2537 &&
CapturedStacks.set(
- JSCompiler_object_inline_componentStack_2549,
- JSCompiler_object_inline_stack_2548
+ JSCompiler_object_inline_componentStack_2539,
+ JSCompiler_object_inline_stack_2538
);
- queueHydrationError(JSCompiler_object_inline_stack_2548);
+ queueHydrationError(JSCompiler_object_inline_stack_2538);
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -9573,25 +9692,25 @@ __DEV__ &&
renderLanes,
!1
),
- (JSCompiler_object_inline_digest_2547 =
+ (JSCompiler_object_inline_digest_2537 =
0 !== (renderLanes & current.childLanes)),
- didReceiveUpdate || JSCompiler_object_inline_digest_2547)
+ didReceiveUpdate || JSCompiler_object_inline_digest_2537)
) {
- JSCompiler_object_inline_digest_2547 = workInProgressRoot;
- if (null !== JSCompiler_object_inline_digest_2547) {
- JSCompiler_object_inline_stack_2548 = renderLanes & -renderLanes;
- if (0 !== (JSCompiler_object_inline_stack_2548 & 42))
- JSCompiler_object_inline_stack_2548 = 1;
+ JSCompiler_object_inline_digest_2537 = workInProgressRoot;
+ if (null !== JSCompiler_object_inline_digest_2537) {
+ JSCompiler_object_inline_stack_2538 = renderLanes & -renderLanes;
+ if (0 !== (JSCompiler_object_inline_stack_2538 & 42))
+ JSCompiler_object_inline_stack_2538 = 1;
else
- switch (JSCompiler_object_inline_stack_2548) {
+ switch (JSCompiler_object_inline_stack_2538) {
case 2:
- JSCompiler_object_inline_stack_2548 = 1;
+ JSCompiler_object_inline_stack_2538 = 1;
break;
case 8:
- JSCompiler_object_inline_stack_2548 = 4;
+ JSCompiler_object_inline_stack_2538 = 4;
break;
case 32:
- JSCompiler_object_inline_stack_2548 = 16;
+ JSCompiler_object_inline_stack_2538 = 16;
break;
case 128:
case 256:
@@ -9612,40 +9731,40 @@ __DEV__ &&
case 8388608:
case 16777216:
case 33554432:
- JSCompiler_object_inline_stack_2548 = 64;
+ JSCompiler_object_inline_stack_2538 = 64;
break;
case 268435456:
- JSCompiler_object_inline_stack_2548 = 134217728;
+ JSCompiler_object_inline_stack_2538 = 134217728;
break;
default:
- JSCompiler_object_inline_stack_2548 = 0;
+ JSCompiler_object_inline_stack_2538 = 0;
}
- JSCompiler_object_inline_stack_2548 =
+ JSCompiler_object_inline_stack_2538 =
0 !==
- (JSCompiler_object_inline_stack_2548 &
- (JSCompiler_object_inline_digest_2547.suspendedLanes |
+ (JSCompiler_object_inline_stack_2538 &
+ (JSCompiler_object_inline_digest_2537.suspendedLanes |
renderLanes))
? 0
- : JSCompiler_object_inline_stack_2548;
+ : JSCompiler_object_inline_stack_2538;
if (
- 0 !== JSCompiler_object_inline_stack_2548 &&
- JSCompiler_object_inline_stack_2548 !== prevState.retryLane
+ 0 !== JSCompiler_object_inline_stack_2538 &&
+ JSCompiler_object_inline_stack_2538 !== prevState.retryLane
)
throw (
- ((prevState.retryLane = JSCompiler_object_inline_stack_2548),
+ ((prevState.retryLane = JSCompiler_object_inline_stack_2538),
enqueueConcurrentRenderForLane(
current,
- JSCompiler_object_inline_stack_2548
+ JSCompiler_object_inline_stack_2538
),
scheduleUpdateOnFiber(
- JSCompiler_object_inline_digest_2547,
+ JSCompiler_object_inline_digest_2537,
current,
- JSCompiler_object_inline_stack_2548
+ JSCompiler_object_inline_stack_2538
),
SelectiveHydrationException)
);
}
- JSCompiler_object_inline_message_2546.data ===
+ JSCompiler_object_inline_message_2536.data ===
SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -9653,14 +9772,14 @@ __DEV__ &&
renderLanes
);
} else
- JSCompiler_object_inline_message_2546.data ===
+ JSCompiler_object_inline_message_2536.data ===
SUSPENSE_PENDING_START_DATA
? ((workInProgress.flags |= 192),
(workInProgress.child = current.child),
(workInProgress = null))
: ((current = prevState.treeContext),
(nextHydratableInstance = getNextHydratable(
- JSCompiler_object_inline_message_2546.nextSibling
+ JSCompiler_object_inline_message_2536.nextSibling
)),
(hydrationParentFiber = workInProgress),
(isHydrating = !0),
@@ -9678,57 +9797,57 @@ __DEV__ &&
(treeContextProvider = workInProgress)),
(workInProgress = mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_stack_2548.children
+ JSCompiler_object_inline_stack_2538.children
)),
(workInProgress.flags |= 4096));
return workInProgress;
}
- if (JSCompiler_object_inline_componentStack_2549)
+ if (JSCompiler_object_inline_componentStack_2539)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2549 =
- JSCompiler_object_inline_stack_2548.fallback),
- (JSCompiler_object_inline_message_2546 = workInProgress.mode),
+ (JSCompiler_object_inline_componentStack_2539 =
+ JSCompiler_object_inline_stack_2538.fallback),
+ (JSCompiler_object_inline_message_2536 = workInProgress.mode),
(JSCompiler_temp = current.child),
(instance = JSCompiler_temp.sibling),
- (JSCompiler_object_inline_stack_2548 = createWorkInProgress(
+ (JSCompiler_object_inline_stack_2538 = createWorkInProgress(
JSCompiler_temp,
{
mode: "hidden",
- children: JSCompiler_object_inline_stack_2548.children
+ children: JSCompiler_object_inline_stack_2538.children
}
)),
- (JSCompiler_object_inline_stack_2548.subtreeFlags =
+ (JSCompiler_object_inline_stack_2538.subtreeFlags =
JSCompiler_temp.subtreeFlags & 31457280),
null !== instance
- ? (JSCompiler_object_inline_componentStack_2549 =
+ ? (JSCompiler_object_inline_componentStack_2539 =
createWorkInProgress(
instance,
- JSCompiler_object_inline_componentStack_2549
+ JSCompiler_object_inline_componentStack_2539
))
- : ((JSCompiler_object_inline_componentStack_2549 =
+ : ((JSCompiler_object_inline_componentStack_2539 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2549,
- JSCompiler_object_inline_message_2546,
+ JSCompiler_object_inline_componentStack_2539,
+ JSCompiler_object_inline_message_2536,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2549.flags |= 2)),
- (JSCompiler_object_inline_componentStack_2549.return =
+ (JSCompiler_object_inline_componentStack_2539.flags |= 2)),
+ (JSCompiler_object_inline_componentStack_2539.return =
workInProgress),
- (JSCompiler_object_inline_stack_2548.return = workInProgress),
- (JSCompiler_object_inline_stack_2548.sibling =
- JSCompiler_object_inline_componentStack_2549),
- (workInProgress.child = JSCompiler_object_inline_stack_2548),
- (JSCompiler_object_inline_stack_2548 =
- JSCompiler_object_inline_componentStack_2549),
- (JSCompiler_object_inline_componentStack_2549 = workInProgress.child),
- (JSCompiler_object_inline_message_2546 = current.child.memoizedState),
- null === JSCompiler_object_inline_message_2546
- ? (JSCompiler_object_inline_message_2546 =
+ (JSCompiler_object_inline_stack_2538.return = workInProgress),
+ (JSCompiler_object_inline_stack_2538.sibling =
+ JSCompiler_object_inline_componentStack_2539),
+ (workInProgress.child = JSCompiler_object_inline_stack_2538),
+ (JSCompiler_object_inline_stack_2538 =
+ JSCompiler_object_inline_componentStack_2539),
+ (JSCompiler_object_inline_componentStack_2539 = workInProgress.child),
+ (JSCompiler_object_inline_message_2536 = current.child.memoizedState),
+ null === JSCompiler_object_inline_message_2536
+ ? (JSCompiler_object_inline_message_2536 =
mountSuspenseOffscreenState(renderLanes))
: ((JSCompiler_temp =
- JSCompiler_object_inline_message_2546.cachePool),
+ JSCompiler_object_inline_message_2536.cachePool),
null !== JSCompiler_temp
? ((instance = CacheContext._currentValue),
(JSCompiler_temp =
@@ -9736,34 +9855,34 @@ __DEV__ &&
? { parent: instance, pool: instance }
: JSCompiler_temp))
: (JSCompiler_temp = getSuspendedCache()),
- (JSCompiler_object_inline_message_2546 = {
+ (JSCompiler_object_inline_message_2536 = {
baseLanes:
- JSCompiler_object_inline_message_2546.baseLanes | renderLanes,
+ JSCompiler_object_inline_message_2536.baseLanes | renderLanes,
cachePool: JSCompiler_temp
})),
- (JSCompiler_object_inline_componentStack_2549.memoizedState =
- JSCompiler_object_inline_message_2546),
+ (JSCompiler_object_inline_componentStack_2539.memoizedState =
+ JSCompiler_object_inline_message_2536),
enableTransitionTracing &&
- ((JSCompiler_object_inline_message_2546 = enableTransitionTracing
+ ((JSCompiler_object_inline_message_2536 = enableTransitionTracing
? transitionStack.current
: null),
- null !== JSCompiler_object_inline_message_2546 &&
+ null !== JSCompiler_object_inline_message_2536 &&
((JSCompiler_temp = enableTransitionTracing
? markerInstanceStack.current
: null),
(instance =
- JSCompiler_object_inline_componentStack_2549.updateQueue),
+ JSCompiler_object_inline_componentStack_2539.updateQueue),
(componentStack = current.updateQueue),
null === instance
- ? (JSCompiler_object_inline_componentStack_2549.updateQueue = {
- transitions: JSCompiler_object_inline_message_2546,
+ ? (JSCompiler_object_inline_componentStack_2539.updateQueue = {
+ transitions: JSCompiler_object_inline_message_2536,
markerInstances: JSCompiler_temp,
retryQueue: null
})
: instance === componentStack
- ? (JSCompiler_object_inline_componentStack_2549.updateQueue =
+ ? (JSCompiler_object_inline_componentStack_2539.updateQueue =
{
- transitions: JSCompiler_object_inline_message_2546,
+ transitions: JSCompiler_object_inline_message_2536,
markerInstances: JSCompiler_temp,
retryQueue:
null !== componentStack
@@ -9771,32 +9890,32 @@ __DEV__ &&
: null
})
: ((instance.transitions =
- JSCompiler_object_inline_message_2546),
+ JSCompiler_object_inline_message_2536),
(instance.markerInstances = JSCompiler_temp)))),
- (JSCompiler_object_inline_componentStack_2549.childLanes =
+ (JSCompiler_object_inline_componentStack_2539.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2547,
+ JSCompiler_object_inline_digest_2537,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
- JSCompiler_object_inline_stack_2548
+ JSCompiler_object_inline_stack_2538
);
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
mode: "visible",
- children: JSCompiler_object_inline_stack_2548.children
+ children: JSCompiler_object_inline_stack_2538.children
});
renderLanes.return = workInProgress;
renderLanes.sibling = null;
null !== current &&
- ((JSCompiler_object_inline_digest_2547 = workInProgress.deletions),
- null === JSCompiler_object_inline_digest_2547
+ ((JSCompiler_object_inline_digest_2537 = workInProgress.deletions),
+ null === JSCompiler_object_inline_digest_2537
? ((workInProgress.deletions = [current]),
(workInProgress.flags |= 16))
- : JSCompiler_object_inline_digest_2547.push(current));
+ : JSCompiler_object_inline_digest_2537.push(current));
workInProgress.child = renderLanes;
workInProgress.memoizedState = null;
return renderLanes;
@@ -10244,6 +10363,9 @@ __DEV__ &&
workInProgress.mode,
workInProgress.lanes
);
+ enableOwnerStacks &&
+ ((renderLanes._debugStack = workInProgress._debugStack),
+ (renderLanes._debugTask = workInProgress._debugTask));
var returnFiber = workInProgress.return;
if (null === returnFiber) throw Error("Cannot swap the root fiber.");
current.alternate = null;
@@ -17545,6 +17667,7 @@ __DEV__ &&
this.actualStartTime = -1.1;
this.treeBaseDuration = this.selfBaseDuration = -0;
this._debugOwner = this._debugInfo = null;
+ enableOwnerStacks && (this._debugTask = this._debugStack = null);
this._debugNeedsRemount = !1;
this._debugHookTypes = null;
hasBadMapPolyfill ||
@@ -17584,10 +17707,11 @@ __DEV__ &&
selfBaseDuration: -0,
treeBaseDuration: -0,
_debugInfo: null,
- _debugOwner: null,
- _debugNeedsRemount: !1,
- _debugHookTypes: null
+ _debugOwner: null
};
+ enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null));
+ tag._debugNeedsRemount = !1;
+ tag._debugHookTypes = null;
hasBadMapPolyfill ||
"function" !== typeof Object.preventExtensions ||
Object.preventExtensions(tag);
@@ -17610,6 +17734,9 @@ __DEV__ &&
(workInProgress.type = current.type),
(workInProgress.stateNode = current.stateNode),
(workInProgress._debugOwner = current._debugOwner),
+ enableOwnerStacks &&
+ ((workInProgress._debugStack = current._debugStack),
+ (workInProgress._debugTask = current._debugTask)),
(workInProgress._debugHookTypes = current._debugHookTypes),
(workInProgress.alternate = current),
(current.alternate = workInProgress))
@@ -17869,6 +17996,9 @@ __DEV__ &&
lanes
);
mode._debugOwner = element._owner;
+ enableOwnerStacks &&
+ ((mode._debugStack = element._debugStack),
+ (mode._debugTask = element._debugTask));
return mode;
}
function createFiberFromFragment(elements, mode, lanes, key) {
@@ -18910,6 +19040,15 @@ __DEV__ &&
});
}
}
+ function executeDispatch(event, listener, currentTarget) {
+ event.currentTarget = currentTarget;
+ try {
+ listener(event);
+ } catch (error$43) {
+ reportGlobalError(error$43);
+ }
+ event.currentTarget = null;
+ }
function processDispatchQueue(dispatchQueue, eventSystemFlags) {
eventSystemFlags = 0 !== (eventSystemFlags & 4);
for (var i = 0; i < dispatchQueue.length; i++) {
@@ -18930,14 +19069,15 @@ __DEV__ &&
_dispatchListeners$i = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped())
break a;
- previousInstance = event;
- previousInstance.currentTarget = currentTarget;
- try {
- _dispatchListeners$i(previousInstance);
- } catch (error$43) {
- reportGlobalError(error$43);
- }
- previousInstance.currentTarget = null;
+ enableOwnerStacks && null !== instance
+ ? runWithFiberInDEV(
+ instance,
+ executeDispatch,
+ event,
+ _dispatchListeners$i,
+ currentTarget
+ )
+ : executeDispatch(event, _dispatchListeners$i, currentTarget);
previousInstance = instance;
}
else
@@ -18952,14 +19092,15 @@ __DEV__ &&
_dispatchListeners$i = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped())
break a;
- previousInstance = event;
- previousInstance.currentTarget = currentTarget;
- try {
- _dispatchListeners$i(previousInstance);
- } catch (error$43) {
- reportGlobalError(error$43);
- }
- previousInstance.currentTarget = null;
+ enableOwnerStacks && null !== instance
+ ? runWithFiberInDEV(
+ instance,
+ executeDispatch,
+ event,
+ _dispatchListeners$i,
+ currentTarget
+ )
+ : executeDispatch(event, _dispatchListeners$i, currentTarget);
previousInstance = instance;
}
}
@@ -23956,6 +24097,7 @@ __DEV__ &&
syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs,
transitionLaneExpirationMs =
dynamicFeatureFlags.transitionLaneExpirationMs,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
@@ -27903,11 +28045,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
- if ("19.0.0-www-classic-7c4a7c9d-20241210" !== isomorphicReactPackageVersion)
+ if ("19.0.0-www-classic-a4964987-20241211" !== 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-7c4a7c9d-20241210\nLearn more: https://react.dev/warnings/version-mismatch")
+ "\n - react-dom: 19.0.0-www-classic-a4964987-20241211\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -27950,10 +28092,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
- version: "19.0.0-www-classic-7c4a7c9d-20241210",
+ version: "19.0.0-www-classic-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -28724,5 +28866,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
- exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-classic-a4964987-20241211";
})();
diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js
index 19f6774ebd..57f7b8685b 100644
--- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js
+++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js
@@ -520,6 +520,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
@@ -570,13 +591,76 @@ __DEV__ &&
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
+ return (fn = fn ? fn.displayName || fn.name : "")
+ ? describeBuiltInComponentFrame(fn)
+ : "";
+ }
+ function getOwnerStackByFiberInDev(workInProgress) {
+ if (!enableOwnerStacks) return "";
+ try {
+ var info = "";
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
+ switch (workInProgress.tag) {
+ case 26:
+ case 27:
+ case 5:
+ info += describeBuiltInComponentFrame(workInProgress.type);
+ break;
+ case 13:
+ info += describeBuiltInComponentFrame("Suspense");
+ break;
+ case 19:
+ info += describeBuiltInComponentFrame("SuspenseList");
+ break;
+ case 0:
+ case 15:
+ case 1:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type
+ ));
+ break;
+ case 11:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type.render
+ ));
+ }
+ for (; workInProgress; )
+ if ("number" === typeof workInProgress.tag) {
+ var fiber = workInProgress;
+ workInProgress = fiber._debugOwner;
+ var debugStack = fiber._debugStack;
+ workInProgress &&
+ debugStack &&
+ ("string" !== typeof debugStack &&
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
+ "" !== debugStack && (info += "\n" + debugStack));
+ } else if (null != workInProgress.debugStack) {
+ var ownerStack = workInProgress.debugStack;
+ (workInProgress = workInProgress.owner) &&
+ ownerStack &&
+ (info += "\n" + formatOwnerStack(ownerStack));
+ } else break;
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
function getCurrentFiberOwnerNameInDevOrNull() {
if (null === current) return null;
var owner = current._debugOwner;
return null != owner ? getComponentNameFromOwner(owner) : null;
}
function getCurrentFiberStackInDev() {
- return null === current ? "" : getStackByFiberInDevAndProd(current);
+ return null === current
+ ? ""
+ : enableOwnerStacks
+ ? getOwnerStackByFiberInDev(current)
+ : getStackByFiberInDevAndProd(current);
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
@@ -585,7 +669,11 @@ __DEV__ &&
isRendering = !1;
current = fiber;
try {
- return callback(arg0, arg1, arg2, arg3, arg4);
+ return enableOwnerStacks && null !== fiber && fiber._debugTask
+ ? fiber._debugTask.run(
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
+ )
+ : callback(arg0, arg1, arg2, arg3, arg4);
} finally {
current = previousFiber;
}
@@ -2575,37 +2663,51 @@ __DEV__ &&
: findInvalidAncestorForTag(childTag, ancestorInfo);
ancestorInfo = parentInfo || ancestorInfo;
if (!ancestorInfo) return !0;
- ancestorInfo = ancestorInfo.tag;
- var warnKey = String(!!parentInfo) + "|" + childTag + "|" + ancestorInfo;
- if (didWarn[warnKey]) return !1;
- didWarn[warnKey] = !0;
- var ancestor = (warnKey = current)
- ? findAncestor(warnKey.return, ancestorInfo)
- : null;
- warnKey =
- null !== warnKey && null !== ancestor
- ? describeAncestors(ancestor, warnKey, null)
- : "";
- ancestor = "<" + childTag + ">";
+ var ancestorTag = ancestorInfo.tag;
+ ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
+ if (didWarn[ancestorInfo]) return !1;
+ didWarn[ancestorInfo] = !0;
+ var ancestor = (ancestorInfo = current)
+ ? findAncestor(ancestorInfo.return, ancestorTag)
+ : null,
+ ancestorDescription =
+ null !== ancestorInfo && null !== ancestor
+ ? describeAncestors(ancestor, ancestorInfo, null)
+ : "",
+ tagDisplayName = "<" + childTag + ">";
parentInfo
? ((parentInfo = ""),
- "table" === ancestorInfo &&
+ "table" === ancestorTag &&
"tr" === childTag &&
(parentInfo +=
" Add a , or to your code to match the DOM tree generated by the browser."),
error$jscomp$0(
"In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
- ancestor,
- ancestorInfo,
+ tagDisplayName,
+ ancestorTag,
parentInfo,
- warnKey
+ ancestorDescription
))
: error$jscomp$0(
"In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
- ancestor,
- ancestorInfo,
- warnKey
+ tagDisplayName,
+ ancestorTag,
+ ancestorDescription
);
+ enableOwnerStacks &&
+ ancestorInfo &&
+ ((childTag = ancestorInfo.return),
+ null === ancestor ||
+ null === childTag ||
+ (ancestor === childTag &&
+ childTag._debugOwner === ancestorInfo._debugOwner) ||
+ runWithFiberInDEV(ancestor, function () {
+ error$jscomp$0(
+ "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
+ ancestorTag,
+ tagDisplayName
+ );
+ }));
return !1;
}
function validateTextNesting(childText, parentTag) {
@@ -6523,6 +6625,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -6597,6 +6700,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -6619,6 +6723,7 @@ __DEV__ &&
)),
(newChild.return = returnFiber),
(newChild._debugOwner = returnFiber),
+ enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask),
(newChild._debugInfo = currentDebugInfo),
newChild
);
@@ -6666,6 +6771,7 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask),
(returnFiber = pushDebugInfo(newChild._debugInfo)),
(lanes._debugInfo = currentDebugInfo),
(currentDebugInfo = returnFiber),
@@ -7203,6 +7309,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
validateFragmentProps(newChild, lanes, returnFiber),
(returnFiber = lanes))
@@ -7369,6 +7477,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
(returnFiber = lanes)),
placeSingleChild(returnFiber)
@@ -7398,10 +7508,13 @@ __DEV__ &&
fiber.return = returnFiber;
var debugInfo = (fiber._debugInfo = currentDebugInfo);
fiber._debugOwner = returnFiber._debugOwner;
+ enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask);
if (null != debugInfo)
for (var i = debugInfo.length - 1; 0 <= i; i--)
if ("string" === typeof debugInfo[i].stack) {
fiber._debugOwner = debugInfo[i];
+ enableOwnerStacks &&
+ (fiber._debugTask = debugInfo[i].debugTask);
break;
}
return fiber;
@@ -7639,12 +7752,14 @@ __DEV__ &&
error = componentName
? "An error occurred in the <" + componentName + "> component."
: "An error occurred in one of your React components.";
- var prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
warn(
"%s\n\n%s\n",
@@ -7652,7 +7767,8 @@ __DEV__ &&
"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
}
function defaultOnCaughtError(error$1, errorInfo) {
@@ -7662,12 +7778,14 @@ __DEV__ &&
recreateMessage =
"React will try to recreate this component tree from scratch using the error boundary you provided, " +
((errorBoundaryName || "Anonymous") + "."),
- prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
"object" === typeof error$1 &&
null !== error$1 &&
@@ -7689,7 +7807,8 @@ __DEV__ &&
recreateMessage
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
}
function defaultOnRecoverableError(error) {
@@ -9100,32 +9219,32 @@ __DEV__ &&
return current;
}
function updateSuspenseComponent(current, workInProgress, renderLanes) {
- var JSCompiler_object_inline_digest_2539;
- var JSCompiler_object_inline_stack_2540 = workInProgress.pendingProps;
+ var JSCompiler_object_inline_digest_2529;
+ var JSCompiler_object_inline_stack_2530 = workInProgress.pendingProps;
shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128);
- var JSCompiler_object_inline_componentStack_2541 = !1;
+ var JSCompiler_object_inline_componentStack_2531 = !1;
var didSuspend = 0 !== (workInProgress.flags & 128);
- (JSCompiler_object_inline_digest_2539 = didSuspend) ||
- (JSCompiler_object_inline_digest_2539 =
+ (JSCompiler_object_inline_digest_2529 = didSuspend) ||
+ (JSCompiler_object_inline_digest_2529 =
null !== current && null === current.memoizedState
? !1
: 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
- JSCompiler_object_inline_digest_2539 &&
- ((JSCompiler_object_inline_componentStack_2541 = !0),
+ JSCompiler_object_inline_digest_2529 &&
+ ((JSCompiler_object_inline_componentStack_2531 = !0),
(workInProgress.flags &= -129));
- JSCompiler_object_inline_digest_2539 = 0 !== (workInProgress.flags & 32);
+ JSCompiler_object_inline_digest_2529 = 0 !== (workInProgress.flags & 32);
workInProgress.flags &= -33;
if (null === current) {
if (isHydrating) {
- JSCompiler_object_inline_componentStack_2541
+ JSCompiler_object_inline_componentStack_2531
? pushPrimaryTreeSuspenseHandler(workInProgress)
: reuseSuspenseHandlerOnStack(workInProgress);
if (isHydrating) {
- var JSCompiler_object_inline_message_2538 = nextHydratableInstance;
+ var JSCompiler_object_inline_message_2528 = nextHydratableInstance;
var JSCompiler_temp;
- if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2538)) {
+ if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2528)) {
c: {
- var instance = JSCompiler_object_inline_message_2538;
+ var instance = JSCompiler_object_inline_message_2528;
for (
JSCompiler_temp = rootOrSingletonContext;
instance.nodeType !== COMMENT_NODE;
@@ -9166,46 +9285,46 @@ __DEV__ &&
JSCompiler_temp &&
(warnNonHydratedInstance(
workInProgress,
- JSCompiler_object_inline_message_2538
+ JSCompiler_object_inline_message_2528
),
throwOnHydrationMismatch(workInProgress));
}
- JSCompiler_object_inline_message_2538 = workInProgress.memoizedState;
+ JSCompiler_object_inline_message_2528 = workInProgress.memoizedState;
if (
- null !== JSCompiler_object_inline_message_2538 &&
- ((JSCompiler_object_inline_message_2538 =
- JSCompiler_object_inline_message_2538.dehydrated),
- null !== JSCompiler_object_inline_message_2538)
+ null !== JSCompiler_object_inline_message_2528 &&
+ ((JSCompiler_object_inline_message_2528 =
+ JSCompiler_object_inline_message_2528.dehydrated),
+ null !== JSCompiler_object_inline_message_2528)
)
return (
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2538)
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2528)
? (workInProgress.lanes = 16)
: (workInProgress.lanes = 536870912),
null
);
popSuspenseHandler(workInProgress);
}
- JSCompiler_object_inline_message_2538 =
- JSCompiler_object_inline_stack_2540.children;
- JSCompiler_temp = JSCompiler_object_inline_stack_2540.fallback;
- if (JSCompiler_object_inline_componentStack_2541)
+ JSCompiler_object_inline_message_2528 =
+ JSCompiler_object_inline_stack_2530.children;
+ JSCompiler_temp = JSCompiler_object_inline_stack_2530.fallback;
+ if (JSCompiler_object_inline_componentStack_2531)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2540 =
+ (JSCompiler_object_inline_stack_2530 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2538,
+ JSCompiler_object_inline_message_2528,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2541 =
+ (JSCompiler_object_inline_componentStack_2531 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2541.memoizedState =
+ (JSCompiler_object_inline_componentStack_2531.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2541.childLanes =
+ (JSCompiler_object_inline_componentStack_2531.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2539,
+ JSCompiler_object_inline_digest_2529,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
@@ -9218,9 +9337,9 @@ __DEV__ &&
? markerInstanceStack.current
: null),
(renderLanes =
- JSCompiler_object_inline_componentStack_2541.updateQueue),
+ JSCompiler_object_inline_componentStack_2531.updateQueue),
null === renderLanes
- ? (JSCompiler_object_inline_componentStack_2541.updateQueue =
+ ? (JSCompiler_object_inline_componentStack_2531.updateQueue =
{
transitions: workInProgress,
markerInstances: current,
@@ -9228,46 +9347,46 @@ __DEV__ &&
})
: ((renderLanes.transitions = workInProgress),
(renderLanes.markerInstances = current)))),
- JSCompiler_object_inline_stack_2540
+ JSCompiler_object_inline_stack_2530
);
if (
"number" ===
- typeof JSCompiler_object_inline_stack_2540.unstable_expectedLoadTime
+ typeof JSCompiler_object_inline_stack_2530.unstable_expectedLoadTime
)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2540 =
+ (JSCompiler_object_inline_stack_2530 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2538,
+ JSCompiler_object_inline_message_2528,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2541 =
+ (JSCompiler_object_inline_componentStack_2531 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2541.memoizedState =
+ (JSCompiler_object_inline_componentStack_2531.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2541.childLanes =
+ (JSCompiler_object_inline_componentStack_2531.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2539,
+ JSCompiler_object_inline_digest_2529,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress.lanes = 4194304),
- JSCompiler_object_inline_stack_2540
+ JSCompiler_object_inline_stack_2530
);
pushPrimaryTreeSuspenseHandler(workInProgress);
return mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_message_2538
+ JSCompiler_object_inline_message_2528
);
}
var prevState = current.memoizedState;
if (
null !== prevState &&
- ((JSCompiler_object_inline_message_2538 = prevState.dehydrated),
- null !== JSCompiler_object_inline_message_2538)
+ ((JSCompiler_object_inline_message_2528 = prevState.dehydrated),
+ null !== JSCompiler_object_inline_message_2528)
) {
if (didSuspend)
workInProgress.flags & 256
@@ -9284,94 +9403,94 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2541 =
- JSCompiler_object_inline_stack_2540.fallback),
- (JSCompiler_object_inline_message_2538 = workInProgress.mode),
- (JSCompiler_object_inline_stack_2540 =
+ (JSCompiler_object_inline_componentStack_2531 =
+ JSCompiler_object_inline_stack_2530.fallback),
+ (JSCompiler_object_inline_message_2528 = workInProgress.mode),
+ (JSCompiler_object_inline_stack_2530 =
mountWorkInProgressOffscreenFiber(
{
mode: "visible",
- children: JSCompiler_object_inline_stack_2540.children
+ children: JSCompiler_object_inline_stack_2530.children
},
- JSCompiler_object_inline_message_2538
+ JSCompiler_object_inline_message_2528
)),
- (JSCompiler_object_inline_componentStack_2541 =
+ (JSCompiler_object_inline_componentStack_2531 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2541,
- JSCompiler_object_inline_message_2538,
+ JSCompiler_object_inline_componentStack_2531,
+ JSCompiler_object_inline_message_2528,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2541.flags |= 2),
- (JSCompiler_object_inline_stack_2540.return = workInProgress),
- (JSCompiler_object_inline_componentStack_2541.return =
+ (JSCompiler_object_inline_componentStack_2531.flags |= 2),
+ (JSCompiler_object_inline_stack_2530.return = workInProgress),
+ (JSCompiler_object_inline_componentStack_2531.return =
workInProgress),
- (JSCompiler_object_inline_stack_2540.sibling =
- JSCompiler_object_inline_componentStack_2541),
- (workInProgress.child = JSCompiler_object_inline_stack_2540),
+ (JSCompiler_object_inline_stack_2530.sibling =
+ JSCompiler_object_inline_componentStack_2531),
+ (workInProgress.child = JSCompiler_object_inline_stack_2530),
reconcileChildFibers(
workInProgress,
current.child,
null,
renderLanes
),
- (JSCompiler_object_inline_stack_2540 = workInProgress.child),
- (JSCompiler_object_inline_stack_2540.memoizedState =
+ (JSCompiler_object_inline_stack_2530 = workInProgress.child),
+ (JSCompiler_object_inline_stack_2530.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_stack_2540.childLanes =
+ (JSCompiler_object_inline_stack_2530.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2539,
+ JSCompiler_object_inline_digest_2529,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress =
- JSCompiler_object_inline_componentStack_2541));
+ JSCompiler_object_inline_componentStack_2531));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isHydrating &&
error$jscomp$0(
"We should not be hydrating here. This is a bug in React. Please file a bug."
),
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2538))
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2528))
) {
- JSCompiler_object_inline_digest_2539 =
- JSCompiler_object_inline_message_2538.nextSibling &&
- JSCompiler_object_inline_message_2538.nextSibling.dataset;
- if (JSCompiler_object_inline_digest_2539) {
- JSCompiler_temp = JSCompiler_object_inline_digest_2539.dgst;
- var message = JSCompiler_object_inline_digest_2539.msg;
- instance = JSCompiler_object_inline_digest_2539.stck;
- var componentStack = JSCompiler_object_inline_digest_2539.cstck;
+ JSCompiler_object_inline_digest_2529 =
+ JSCompiler_object_inline_message_2528.nextSibling &&
+ JSCompiler_object_inline_message_2528.nextSibling.dataset;
+ if (JSCompiler_object_inline_digest_2529) {
+ JSCompiler_temp = JSCompiler_object_inline_digest_2529.dgst;
+ var message = JSCompiler_object_inline_digest_2529.msg;
+ instance = JSCompiler_object_inline_digest_2529.stck;
+ var componentStack = JSCompiler_object_inline_digest_2529.cstck;
}
- JSCompiler_object_inline_message_2538 = message;
- JSCompiler_object_inline_digest_2539 = JSCompiler_temp;
- JSCompiler_object_inline_stack_2540 = instance;
- JSCompiler_temp = JSCompiler_object_inline_componentStack_2541 =
+ JSCompiler_object_inline_message_2528 = message;
+ JSCompiler_object_inline_digest_2529 = JSCompiler_temp;
+ JSCompiler_object_inline_stack_2530 = instance;
+ JSCompiler_temp = JSCompiler_object_inline_componentStack_2531 =
componentStack;
- JSCompiler_object_inline_componentStack_2541 =
- JSCompiler_object_inline_message_2538
- ? Error(JSCompiler_object_inline_message_2538)
+ JSCompiler_object_inline_componentStack_2531 =
+ JSCompiler_object_inline_message_2528
+ ? Error(JSCompiler_object_inline_message_2528)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
);
- JSCompiler_object_inline_componentStack_2541.stack =
- JSCompiler_object_inline_stack_2540 || "";
- JSCompiler_object_inline_componentStack_2541.digest =
- JSCompiler_object_inline_digest_2539;
- JSCompiler_object_inline_digest_2539 =
+ JSCompiler_object_inline_componentStack_2531.stack =
+ JSCompiler_object_inline_stack_2530 || "";
+ JSCompiler_object_inline_componentStack_2531.digest =
+ JSCompiler_object_inline_digest_2529;
+ JSCompiler_object_inline_digest_2529 =
void 0 === JSCompiler_temp ? null : JSCompiler_temp;
- JSCompiler_object_inline_stack_2540 = {
- value: JSCompiler_object_inline_componentStack_2541,
+ JSCompiler_object_inline_stack_2530 = {
+ value: JSCompiler_object_inline_componentStack_2531,
source: null,
- stack: JSCompiler_object_inline_digest_2539
+ stack: JSCompiler_object_inline_digest_2529
};
- "string" === typeof JSCompiler_object_inline_digest_2539 &&
+ "string" === typeof JSCompiler_object_inline_digest_2529 &&
CapturedStacks.set(
- JSCompiler_object_inline_componentStack_2541,
- JSCompiler_object_inline_stack_2540
+ JSCompiler_object_inline_componentStack_2531,
+ JSCompiler_object_inline_stack_2530
);
- queueHydrationError(JSCompiler_object_inline_stack_2540);
+ queueHydrationError(JSCompiler_object_inline_stack_2530);
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -9385,25 +9504,25 @@ __DEV__ &&
renderLanes,
!1
),
- (JSCompiler_object_inline_digest_2539 =
+ (JSCompiler_object_inline_digest_2529 =
0 !== (renderLanes & current.childLanes)),
- didReceiveUpdate || JSCompiler_object_inline_digest_2539)
+ didReceiveUpdate || JSCompiler_object_inline_digest_2529)
) {
- JSCompiler_object_inline_digest_2539 = workInProgressRoot;
- if (null !== JSCompiler_object_inline_digest_2539) {
- JSCompiler_object_inline_stack_2540 = renderLanes & -renderLanes;
- if (0 !== (JSCompiler_object_inline_stack_2540 & 42))
- JSCompiler_object_inline_stack_2540 = 1;
+ JSCompiler_object_inline_digest_2529 = workInProgressRoot;
+ if (null !== JSCompiler_object_inline_digest_2529) {
+ JSCompiler_object_inline_stack_2530 = renderLanes & -renderLanes;
+ if (0 !== (JSCompiler_object_inline_stack_2530 & 42))
+ JSCompiler_object_inline_stack_2530 = 1;
else
- switch (JSCompiler_object_inline_stack_2540) {
+ switch (JSCompiler_object_inline_stack_2530) {
case 2:
- JSCompiler_object_inline_stack_2540 = 1;
+ JSCompiler_object_inline_stack_2530 = 1;
break;
case 8:
- JSCompiler_object_inline_stack_2540 = 4;
+ JSCompiler_object_inline_stack_2530 = 4;
break;
case 32:
- JSCompiler_object_inline_stack_2540 = 16;
+ JSCompiler_object_inline_stack_2530 = 16;
break;
case 128:
case 256:
@@ -9424,40 +9543,40 @@ __DEV__ &&
case 8388608:
case 16777216:
case 33554432:
- JSCompiler_object_inline_stack_2540 = 64;
+ JSCompiler_object_inline_stack_2530 = 64;
break;
case 268435456:
- JSCompiler_object_inline_stack_2540 = 134217728;
+ JSCompiler_object_inline_stack_2530 = 134217728;
break;
default:
- JSCompiler_object_inline_stack_2540 = 0;
+ JSCompiler_object_inline_stack_2530 = 0;
}
- JSCompiler_object_inline_stack_2540 =
+ JSCompiler_object_inline_stack_2530 =
0 !==
- (JSCompiler_object_inline_stack_2540 &
- (JSCompiler_object_inline_digest_2539.suspendedLanes |
+ (JSCompiler_object_inline_stack_2530 &
+ (JSCompiler_object_inline_digest_2529.suspendedLanes |
renderLanes))
? 0
- : JSCompiler_object_inline_stack_2540;
+ : JSCompiler_object_inline_stack_2530;
if (
- 0 !== JSCompiler_object_inline_stack_2540 &&
- JSCompiler_object_inline_stack_2540 !== prevState.retryLane
+ 0 !== JSCompiler_object_inline_stack_2530 &&
+ JSCompiler_object_inline_stack_2530 !== prevState.retryLane
)
throw (
- ((prevState.retryLane = JSCompiler_object_inline_stack_2540),
+ ((prevState.retryLane = JSCompiler_object_inline_stack_2530),
enqueueConcurrentRenderForLane(
current,
- JSCompiler_object_inline_stack_2540
+ JSCompiler_object_inline_stack_2530
),
scheduleUpdateOnFiber(
- JSCompiler_object_inline_digest_2539,
+ JSCompiler_object_inline_digest_2529,
current,
- JSCompiler_object_inline_stack_2540
+ JSCompiler_object_inline_stack_2530
),
SelectiveHydrationException)
);
}
- JSCompiler_object_inline_message_2538.data ===
+ JSCompiler_object_inline_message_2528.data ===
SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -9465,14 +9584,14 @@ __DEV__ &&
renderLanes
);
} else
- JSCompiler_object_inline_message_2538.data ===
+ JSCompiler_object_inline_message_2528.data ===
SUSPENSE_PENDING_START_DATA
? ((workInProgress.flags |= 192),
(workInProgress.child = current.child),
(workInProgress = null))
: ((current = prevState.treeContext),
(nextHydratableInstance = getNextHydratable(
- JSCompiler_object_inline_message_2538.nextSibling
+ JSCompiler_object_inline_message_2528.nextSibling
)),
(hydrationParentFiber = workInProgress),
(isHydrating = !0),
@@ -9490,57 +9609,57 @@ __DEV__ &&
(treeContextProvider = workInProgress)),
(workInProgress = mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_stack_2540.children
+ JSCompiler_object_inline_stack_2530.children
)),
(workInProgress.flags |= 4096));
return workInProgress;
}
- if (JSCompiler_object_inline_componentStack_2541)
+ if (JSCompiler_object_inline_componentStack_2531)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2541 =
- JSCompiler_object_inline_stack_2540.fallback),
- (JSCompiler_object_inline_message_2538 = workInProgress.mode),
+ (JSCompiler_object_inline_componentStack_2531 =
+ JSCompiler_object_inline_stack_2530.fallback),
+ (JSCompiler_object_inline_message_2528 = workInProgress.mode),
(JSCompiler_temp = current.child),
(instance = JSCompiler_temp.sibling),
- (JSCompiler_object_inline_stack_2540 = createWorkInProgress(
+ (JSCompiler_object_inline_stack_2530 = createWorkInProgress(
JSCompiler_temp,
{
mode: "hidden",
- children: JSCompiler_object_inline_stack_2540.children
+ children: JSCompiler_object_inline_stack_2530.children
}
)),
- (JSCompiler_object_inline_stack_2540.subtreeFlags =
+ (JSCompiler_object_inline_stack_2530.subtreeFlags =
JSCompiler_temp.subtreeFlags & 31457280),
null !== instance
- ? (JSCompiler_object_inline_componentStack_2541 =
+ ? (JSCompiler_object_inline_componentStack_2531 =
createWorkInProgress(
instance,
- JSCompiler_object_inline_componentStack_2541
+ JSCompiler_object_inline_componentStack_2531
))
- : ((JSCompiler_object_inline_componentStack_2541 =
+ : ((JSCompiler_object_inline_componentStack_2531 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2541,
- JSCompiler_object_inline_message_2538,
+ JSCompiler_object_inline_componentStack_2531,
+ JSCompiler_object_inline_message_2528,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2541.flags |= 2)),
- (JSCompiler_object_inline_componentStack_2541.return =
+ (JSCompiler_object_inline_componentStack_2531.flags |= 2)),
+ (JSCompiler_object_inline_componentStack_2531.return =
workInProgress),
- (JSCompiler_object_inline_stack_2540.return = workInProgress),
- (JSCompiler_object_inline_stack_2540.sibling =
- JSCompiler_object_inline_componentStack_2541),
- (workInProgress.child = JSCompiler_object_inline_stack_2540),
- (JSCompiler_object_inline_stack_2540 =
- JSCompiler_object_inline_componentStack_2541),
- (JSCompiler_object_inline_componentStack_2541 = workInProgress.child),
- (JSCompiler_object_inline_message_2538 = current.child.memoizedState),
- null === JSCompiler_object_inline_message_2538
- ? (JSCompiler_object_inline_message_2538 =
+ (JSCompiler_object_inline_stack_2530.return = workInProgress),
+ (JSCompiler_object_inline_stack_2530.sibling =
+ JSCompiler_object_inline_componentStack_2531),
+ (workInProgress.child = JSCompiler_object_inline_stack_2530),
+ (JSCompiler_object_inline_stack_2530 =
+ JSCompiler_object_inline_componentStack_2531),
+ (JSCompiler_object_inline_componentStack_2531 = workInProgress.child),
+ (JSCompiler_object_inline_message_2528 = current.child.memoizedState),
+ null === JSCompiler_object_inline_message_2528
+ ? (JSCompiler_object_inline_message_2528 =
mountSuspenseOffscreenState(renderLanes))
: ((JSCompiler_temp =
- JSCompiler_object_inline_message_2538.cachePool),
+ JSCompiler_object_inline_message_2528.cachePool),
null !== JSCompiler_temp
? ((instance = CacheContext._currentValue),
(JSCompiler_temp =
@@ -9548,34 +9667,34 @@ __DEV__ &&
? { parent: instance, pool: instance }
: JSCompiler_temp))
: (JSCompiler_temp = getSuspendedCache()),
- (JSCompiler_object_inline_message_2538 = {
+ (JSCompiler_object_inline_message_2528 = {
baseLanes:
- JSCompiler_object_inline_message_2538.baseLanes | renderLanes,
+ JSCompiler_object_inline_message_2528.baseLanes | renderLanes,
cachePool: JSCompiler_temp
})),
- (JSCompiler_object_inline_componentStack_2541.memoizedState =
- JSCompiler_object_inline_message_2538),
+ (JSCompiler_object_inline_componentStack_2531.memoizedState =
+ JSCompiler_object_inline_message_2528),
enableTransitionTracing &&
- ((JSCompiler_object_inline_message_2538 = enableTransitionTracing
+ ((JSCompiler_object_inline_message_2528 = enableTransitionTracing
? transitionStack.current
: null),
- null !== JSCompiler_object_inline_message_2538 &&
+ null !== JSCompiler_object_inline_message_2528 &&
((JSCompiler_temp = enableTransitionTracing
? markerInstanceStack.current
: null),
(instance =
- JSCompiler_object_inline_componentStack_2541.updateQueue),
+ JSCompiler_object_inline_componentStack_2531.updateQueue),
(componentStack = current.updateQueue),
null === instance
- ? (JSCompiler_object_inline_componentStack_2541.updateQueue = {
- transitions: JSCompiler_object_inline_message_2538,
+ ? (JSCompiler_object_inline_componentStack_2531.updateQueue = {
+ transitions: JSCompiler_object_inline_message_2528,
markerInstances: JSCompiler_temp,
retryQueue: null
})
: instance === componentStack
- ? (JSCompiler_object_inline_componentStack_2541.updateQueue =
+ ? (JSCompiler_object_inline_componentStack_2531.updateQueue =
{
- transitions: JSCompiler_object_inline_message_2538,
+ transitions: JSCompiler_object_inline_message_2528,
markerInstances: JSCompiler_temp,
retryQueue:
null !== componentStack
@@ -9583,32 +9702,32 @@ __DEV__ &&
: null
})
: ((instance.transitions =
- JSCompiler_object_inline_message_2538),
+ JSCompiler_object_inline_message_2528),
(instance.markerInstances = JSCompiler_temp)))),
- (JSCompiler_object_inline_componentStack_2541.childLanes =
+ (JSCompiler_object_inline_componentStack_2531.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2539,
+ JSCompiler_object_inline_digest_2529,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
- JSCompiler_object_inline_stack_2540
+ JSCompiler_object_inline_stack_2530
);
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
mode: "visible",
- children: JSCompiler_object_inline_stack_2540.children
+ children: JSCompiler_object_inline_stack_2530.children
});
renderLanes.return = workInProgress;
renderLanes.sibling = null;
null !== current &&
- ((JSCompiler_object_inline_digest_2539 = workInProgress.deletions),
- null === JSCompiler_object_inline_digest_2539
+ ((JSCompiler_object_inline_digest_2529 = workInProgress.deletions),
+ null === JSCompiler_object_inline_digest_2529
? ((workInProgress.deletions = [current]),
(workInProgress.flags |= 16))
- : JSCompiler_object_inline_digest_2539.push(current));
+ : JSCompiler_object_inline_digest_2529.push(current));
workInProgress.child = renderLanes;
workInProgress.memoizedState = null;
return renderLanes;
@@ -10055,6 +10174,9 @@ __DEV__ &&
workInProgress.mode,
workInProgress.lanes
);
+ enableOwnerStacks &&
+ ((renderLanes._debugStack = workInProgress._debugStack),
+ (renderLanes._debugTask = workInProgress._debugTask));
var returnFiber = workInProgress.return;
if (null === returnFiber) throw Error("Cannot swap the root fiber.");
current.alternate = null;
@@ -17340,6 +17462,7 @@ __DEV__ &&
this.actualStartTime = -1.1;
this.treeBaseDuration = this.selfBaseDuration = -0;
this._debugOwner = this._debugInfo = null;
+ enableOwnerStacks && (this._debugTask = this._debugStack = null);
this._debugNeedsRemount = !1;
this._debugHookTypes = null;
hasBadMapPolyfill ||
@@ -17379,10 +17502,11 @@ __DEV__ &&
selfBaseDuration: -0,
treeBaseDuration: -0,
_debugInfo: null,
- _debugOwner: null,
- _debugNeedsRemount: !1,
- _debugHookTypes: null
+ _debugOwner: null
};
+ enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null));
+ tag._debugNeedsRemount = !1;
+ tag._debugHookTypes = null;
hasBadMapPolyfill ||
"function" !== typeof Object.preventExtensions ||
Object.preventExtensions(tag);
@@ -17405,6 +17529,9 @@ __DEV__ &&
(workInProgress.type = current.type),
(workInProgress.stateNode = current.stateNode),
(workInProgress._debugOwner = current._debugOwner),
+ enableOwnerStacks &&
+ ((workInProgress._debugStack = current._debugStack),
+ (workInProgress._debugTask = current._debugTask)),
(workInProgress._debugHookTypes = current._debugHookTypes),
(workInProgress.alternate = current),
(current.alternate = workInProgress))
@@ -17664,6 +17791,9 @@ __DEV__ &&
lanes
);
mode._debugOwner = element._owner;
+ enableOwnerStacks &&
+ ((mode._debugStack = element._debugStack),
+ (mode._debugTask = element._debugTask));
return mode;
}
function createFiberFromFragment(elements, mode, lanes, key) {
@@ -18701,6 +18831,15 @@ __DEV__ &&
});
}
}
+ function executeDispatch(event, listener, currentTarget) {
+ event.currentTarget = currentTarget;
+ try {
+ listener(event);
+ } catch (error$43) {
+ reportGlobalError(error$43);
+ }
+ event.currentTarget = null;
+ }
function processDispatchQueue(dispatchQueue, eventSystemFlags) {
eventSystemFlags = 0 !== (eventSystemFlags & 4);
for (var i = 0; i < dispatchQueue.length; i++) {
@@ -18721,14 +18860,15 @@ __DEV__ &&
_dispatchListeners$i = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped())
break a;
- previousInstance = event;
- previousInstance.currentTarget = currentTarget;
- try {
- _dispatchListeners$i(previousInstance);
- } catch (error$43) {
- reportGlobalError(error$43);
- }
- previousInstance.currentTarget = null;
+ enableOwnerStacks && null !== instance
+ ? runWithFiberInDEV(
+ instance,
+ executeDispatch,
+ event,
+ _dispatchListeners$i,
+ currentTarget
+ )
+ : executeDispatch(event, _dispatchListeners$i, currentTarget);
previousInstance = instance;
}
else
@@ -18743,14 +18883,15 @@ __DEV__ &&
_dispatchListeners$i = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped())
break a;
- previousInstance = event;
- previousInstance.currentTarget = currentTarget;
- try {
- _dispatchListeners$i(previousInstance);
- } catch (error$43) {
- reportGlobalError(error$43);
- }
- previousInstance.currentTarget = null;
+ enableOwnerStacks && null !== instance
+ ? runWithFiberInDEV(
+ instance,
+ executeDispatch,
+ event,
+ _dispatchListeners$i,
+ currentTarget
+ )
+ : executeDispatch(event, _dispatchListeners$i, currentTarget);
previousInstance = instance;
}
}
@@ -23741,6 +23882,7 @@ __DEV__ &&
syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs,
transitionLaneExpirationMs =
dynamicFeatureFlags.transitionLaneExpirationMs,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
@@ -27682,11 +27824,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
- if ("19.0.0-www-modern-7c4a7c9d-20241210" !== isomorphicReactPackageVersion)
+ if ("19.0.0-www-modern-a4964987-20241211" !== 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-7c4a7c9d-20241210\nLearn more: https://react.dev/warnings/version-mismatch")
+ "\n - react-dom: 19.0.0-www-modern-a4964987-20241211\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -27729,10 +27871,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
- version: "19.0.0-www-modern-7c4a7c9d-20241210",
+ version: "19.0.0-www-modern-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -28503,5 +28645,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
- exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-modern-a4964987-20241211";
})();
diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js
index cb03fd7850..4468783ffb 100644
--- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js
+++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js
@@ -17606,14 +17606,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1803 = React.version;
if (
- "19.0.0-www-classic-7c4a7c9d-20241210" !==
+ "19.0.0-www-classic-a4964987-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1803
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1803,
- "19.0.0-www-classic-7c4a7c9d-20241210"
+ "19.0.0-www-classic-a4964987-20241211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17631,10 +17631,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2349 = {
bundleType: 0,
- version: "19.0.0-www-classic-7c4a7c9d-20241210",
+ version: "19.0.0-www-classic-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2350 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -18148,4 +18148,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-classic-a4964987-20241211";
diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js
index 4a7056ffe1..4e735560ef 100644
--- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js
+++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js
@@ -17337,14 +17337,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1793 = React.version;
if (
- "19.0.0-www-modern-7c4a7c9d-20241210" !==
+ "19.0.0-www-modern-a4964987-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1793
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1793,
- "19.0.0-www-modern-7c4a7c9d-20241210"
+ "19.0.0-www-modern-a4964987-20241211"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17362,10 +17362,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2331 = {
bundleType: 0,
- version: "19.0.0-www-modern-7c4a7c9d-20241210",
+ version: "19.0.0-www-modern-a4964987-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2332 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17879,4 +17879,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+exports.version = "19.0.0-www-modern-a4964987-20241211";
diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js
index a40d063ff6..ec94a428bc 100644
--- a/compiled/facebook-www/ReactReconciler-dev.classic.js
+++ b/compiled/facebook-www/ReactReconciler-dev.classic.js
@@ -510,6 +510,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
@@ -560,8 +581,71 @@ __DEV__ &&
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
+ return (fn = fn ? fn.displayName || fn.name : "")
+ ? describeBuiltInComponentFrame(fn)
+ : "";
+ }
+ function getOwnerStackByFiberInDev(workInProgress) {
+ if (!enableOwnerStacks) return "";
+ try {
+ var info = "";
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
+ switch (workInProgress.tag) {
+ case 26:
+ case 27:
+ case 5:
+ info += describeBuiltInComponentFrame(workInProgress.type);
+ break;
+ case 13:
+ info += describeBuiltInComponentFrame("Suspense");
+ break;
+ case 19:
+ info += describeBuiltInComponentFrame("SuspenseList");
+ break;
+ case 0:
+ case 15:
+ case 1:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type
+ ));
+ break;
+ case 11:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type.render
+ ));
+ }
+ for (; workInProgress; )
+ if ("number" === typeof workInProgress.tag) {
+ var fiber = workInProgress;
+ workInProgress = fiber._debugOwner;
+ var debugStack = fiber._debugStack;
+ workInProgress &&
+ debugStack &&
+ ("string" !== typeof debugStack &&
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
+ "" !== debugStack && (info += "\n" + debugStack));
+ } else if (null != workInProgress.debugStack) {
+ var ownerStack = workInProgress.debugStack;
+ (workInProgress = workInProgress.owner) &&
+ ownerStack &&
+ (info += "\n" + formatOwnerStack(ownerStack));
+ } else break;
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
function getCurrentFiberStackInDev() {
- return null === current ? "" : getStackByFiberInDevAndProd(current);
+ return null === current
+ ? ""
+ : enableOwnerStacks
+ ? getOwnerStackByFiberInDev(current)
+ : getStackByFiberInDevAndProd(current);
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
@@ -570,7 +654,11 @@ __DEV__ &&
isRendering = !1;
current = fiber;
try {
- return callback(arg0, arg1, arg2, arg3, arg4);
+ return enableOwnerStacks && null !== fiber && fiber._debugTask
+ ? fiber._debugTask.run(
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
+ )
+ : callback(arg0, arg1, arg2, arg3, arg4);
} finally {
current = previousFiber;
}
@@ -4926,6 +5014,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -5000,6 +5089,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -5022,6 +5112,7 @@ __DEV__ &&
)),
(newChild.return = returnFiber),
(newChild._debugOwner = returnFiber),
+ enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask),
(newChild._debugInfo = currentDebugInfo),
newChild
);
@@ -5069,6 +5160,7 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask),
(returnFiber = pushDebugInfo(newChild._debugInfo)),
(lanes._debugInfo = currentDebugInfo),
(currentDebugInfo = returnFiber),
@@ -5606,6 +5698,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
validateFragmentProps(newChild, lanes, returnFiber),
(returnFiber = lanes))
@@ -5772,6 +5866,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
(returnFiber = lanes)),
placeSingleChild(returnFiber)
@@ -5801,10 +5897,13 @@ __DEV__ &&
fiber.return = returnFiber;
var debugInfo = (fiber._debugInfo = currentDebugInfo);
fiber._debugOwner = returnFiber._debugOwner;
+ enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask);
if (null != debugInfo)
for (var i = debugInfo.length - 1; 0 <= i; i--)
if ("string" === typeof debugInfo[i].stack) {
fiber._debugOwner = debugInfo[i];
+ enableOwnerStacks &&
+ (fiber._debugTask = debugInfo[i].debugTask);
break;
}
return fiber;
@@ -8383,6 +8482,9 @@ __DEV__ &&
workInProgress.mode,
workInProgress.lanes
);
+ enableOwnerStacks &&
+ ((renderLanes._debugStack = workInProgress._debugStack),
+ (renderLanes._debugTask = workInProgress._debugTask));
var returnFiber = workInProgress.return;
if (null === returnFiber) throw Error("Cannot swap the root fiber.");
current.alternate = null;
@@ -15710,6 +15812,7 @@ __DEV__ &&
this.actualStartTime = -1.1;
this.treeBaseDuration = this.selfBaseDuration = -0;
this._debugOwner = this._debugInfo = null;
+ enableOwnerStacks && (this._debugTask = this._debugStack = null);
this._debugNeedsRemount = !1;
this._debugHookTypes = null;
hasBadMapPolyfill ||
@@ -15749,10 +15852,11 @@ __DEV__ &&
selfBaseDuration: -0,
treeBaseDuration: -0,
_debugInfo: null,
- _debugOwner: null,
- _debugNeedsRemount: !1,
- _debugHookTypes: null
+ _debugOwner: null
};
+ enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null));
+ tag._debugNeedsRemount = !1;
+ tag._debugHookTypes = null;
hasBadMapPolyfill ||
"function" !== typeof Object.preventExtensions ||
Object.preventExtensions(tag);
@@ -15775,6 +15879,9 @@ __DEV__ &&
(workInProgress.type = current.type),
(workInProgress.stateNode = current.stateNode),
(workInProgress._debugOwner = current._debugOwner),
+ enableOwnerStacks &&
+ ((workInProgress._debugStack = current._debugStack),
+ (workInProgress._debugTask = current._debugTask)),
(workInProgress._debugHookTypes = current._debugHookTypes),
(workInProgress.alternate = current),
(current.alternate = workInProgress))
@@ -16051,6 +16158,9 @@ __DEV__ &&
lanes
);
mode._debugOwner = element._owner;
+ enableOwnerStacks &&
+ ((mode._debugStack = element._debugStack),
+ (mode._debugTask = element._debugTask));
return mode;
}
function createFiberFromFragment(elements, mode, lanes, key) {
@@ -16403,6 +16513,7 @@ __DEV__ &&
syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs,
transitionLaneExpirationMs =
dynamicFeatureFlags.transitionLaneExpirationMs,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
@@ -18980,12 +19091,14 @@ __DEV__ &&
recreateMessage =
"React will try to recreate this component tree from scratch using the error boundary you provided, " +
((errorBoundaryName || "Anonymous") + "."),
- prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
"object" === typeof error$1 &&
null !== error$1 &&
@@ -19007,7 +19120,8 @@ __DEV__ &&
recreateMessage
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
};
exports.defaultOnRecoverableError = function (error) {
@@ -19018,12 +19132,14 @@ __DEV__ &&
error = componentName
? "An error occurred in the <" + componentName + "> component."
: "An error occurred in one of your React components.";
- var prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
warn(
"%s\n\n%s\n",
@@ -19031,7 +19147,8 @@ __DEV__ &&
"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
};
exports.deferredUpdates = function (fn) {
@@ -19278,7 +19395,7 @@ __DEV__ &&
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js
index 6e3c0b9dea..e34a36c7be 100644
--- a/compiled/facebook-www/ReactReconciler-dev.modern.js
+++ b/compiled/facebook-www/ReactReconciler-dev.modern.js
@@ -510,6 +510,27 @@ __DEV__ &&
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
return sampleLines;
}
+ function formatOwnerStack(error) {
+ var prevPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ error = error.stack;
+ Error.prepareStackTrace = prevPrepareStackTrace;
+ error.startsWith("Error: react-stack-top-frame\n") &&
+ (error = error.slice(29));
+ prevPrepareStackTrace = error.indexOf("\n");
+ -1 !== prevPrepareStackTrace &&
+ (error = error.slice(prevPrepareStackTrace + 1));
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
+ -1 !== prevPrepareStackTrace &&
+ (prevPrepareStackTrace = error.lastIndexOf(
+ "\n",
+ prevPrepareStackTrace
+ ));
+ if (-1 !== prevPrepareStackTrace)
+ error = error.slice(0, prevPrepareStackTrace);
+ else return "";
+ return error;
+ }
function describeFiber(fiber) {
switch (fiber.tag) {
case 26:
@@ -560,8 +581,71 @@ __DEV__ &&
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
+ return (fn = fn ? fn.displayName || fn.name : "")
+ ? describeBuiltInComponentFrame(fn)
+ : "";
+ }
+ function getOwnerStackByFiberInDev(workInProgress) {
+ if (!enableOwnerStacks) return "";
+ try {
+ var info = "";
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
+ switch (workInProgress.tag) {
+ case 26:
+ case 27:
+ case 5:
+ info += describeBuiltInComponentFrame(workInProgress.type);
+ break;
+ case 13:
+ info += describeBuiltInComponentFrame("Suspense");
+ break;
+ case 19:
+ info += describeBuiltInComponentFrame("SuspenseList");
+ break;
+ case 0:
+ case 15:
+ case 1:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type
+ ));
+ break;
+ case 11:
+ workInProgress._debugOwner ||
+ "" !== info ||
+ (info += describeFunctionComponentFrameWithoutLineNumber(
+ workInProgress.type.render
+ ));
+ }
+ for (; workInProgress; )
+ if ("number" === typeof workInProgress.tag) {
+ var fiber = workInProgress;
+ workInProgress = fiber._debugOwner;
+ var debugStack = fiber._debugStack;
+ workInProgress &&
+ debugStack &&
+ ("string" !== typeof debugStack &&
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
+ "" !== debugStack && (info += "\n" + debugStack));
+ } else if (null != workInProgress.debugStack) {
+ var ownerStack = workInProgress.debugStack;
+ (workInProgress = workInProgress.owner) &&
+ ownerStack &&
+ (info += "\n" + formatOwnerStack(ownerStack));
+ } else break;
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
function getCurrentFiberStackInDev() {
- return null === current ? "" : getStackByFiberInDevAndProd(current);
+ return null === current
+ ? ""
+ : enableOwnerStacks
+ ? getOwnerStackByFiberInDev(current)
+ : getStackByFiberInDevAndProd(current);
}
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
var previousFiber = current;
@@ -570,7 +654,11 @@ __DEV__ &&
isRendering = !1;
current = fiber;
try {
- return callback(arg0, arg1, arg2, arg3, arg4);
+ return enableOwnerStacks && null !== fiber && fiber._debugTask
+ ? fiber._debugTask.run(
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
+ )
+ : callback(arg0, arg1, arg2, arg3, arg4);
} finally {
current = previousFiber;
}
@@ -4832,6 +4920,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -4906,6 +4995,7 @@ __DEV__ &&
)),
(current.return = returnFiber),
(current._debugOwner = returnFiber),
+ enableOwnerStacks && (current._debugTask = returnFiber._debugTask),
(current._debugInfo = currentDebugInfo),
current
);
@@ -4928,6 +5018,7 @@ __DEV__ &&
)),
(newChild.return = returnFiber),
(newChild._debugOwner = returnFiber),
+ enableOwnerStacks && (newChild._debugTask = returnFiber._debugTask),
(newChild._debugInfo = currentDebugInfo),
newChild
);
@@ -4975,6 +5066,7 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks && (lanes._debugTask = returnFiber._debugTask),
(returnFiber = pushDebugInfo(newChild._debugInfo)),
(lanes._debugInfo = currentDebugInfo),
(currentDebugInfo = returnFiber),
@@ -5512,6 +5604,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
validateFragmentProps(newChild, lanes, returnFiber),
(returnFiber = lanes))
@@ -5678,6 +5772,8 @@ __DEV__ &&
)),
(lanes.return = returnFiber),
(lanes._debugOwner = returnFiber),
+ enableOwnerStacks &&
+ (lanes._debugTask = returnFiber._debugTask),
(lanes._debugInfo = currentDebugInfo),
(returnFiber = lanes)),
placeSingleChild(returnFiber)
@@ -5707,10 +5803,13 @@ __DEV__ &&
fiber.return = returnFiber;
var debugInfo = (fiber._debugInfo = currentDebugInfo);
fiber._debugOwner = returnFiber._debugOwner;
+ enableOwnerStacks && (fiber._debugTask = returnFiber._debugTask);
if (null != debugInfo)
for (var i = debugInfo.length - 1; 0 <= i; i--)
if ("string" === typeof debugInfo[i].stack) {
fiber._debugOwner = debugInfo[i];
+ enableOwnerStacks &&
+ (fiber._debugTask = debugInfo[i].debugTask);
break;
}
return fiber;
@@ -8213,6 +8312,9 @@ __DEV__ &&
workInProgress.mode,
workInProgress.lanes
);
+ enableOwnerStacks &&
+ ((renderLanes._debugStack = workInProgress._debugStack),
+ (renderLanes._debugTask = workInProgress._debugTask));
var returnFiber = workInProgress.return;
if (null === returnFiber) throw Error("Cannot swap the root fiber.");
current.alternate = null;
@@ -15524,6 +15626,7 @@ __DEV__ &&
this.actualStartTime = -1.1;
this.treeBaseDuration = this.selfBaseDuration = -0;
this._debugOwner = this._debugInfo = null;
+ enableOwnerStacks && (this._debugTask = this._debugStack = null);
this._debugNeedsRemount = !1;
this._debugHookTypes = null;
hasBadMapPolyfill ||
@@ -15563,10 +15666,11 @@ __DEV__ &&
selfBaseDuration: -0,
treeBaseDuration: -0,
_debugInfo: null,
- _debugOwner: null,
- _debugNeedsRemount: !1,
- _debugHookTypes: null
+ _debugOwner: null
};
+ enableOwnerStacks && ((tag._debugStack = null), (tag._debugTask = null));
+ tag._debugNeedsRemount = !1;
+ tag._debugHookTypes = null;
hasBadMapPolyfill ||
"function" !== typeof Object.preventExtensions ||
Object.preventExtensions(tag);
@@ -15589,6 +15693,9 @@ __DEV__ &&
(workInProgress.type = current.type),
(workInProgress.stateNode = current.stateNode),
(workInProgress._debugOwner = current._debugOwner),
+ enableOwnerStacks &&
+ ((workInProgress._debugStack = current._debugStack),
+ (workInProgress._debugTask = current._debugTask)),
(workInProgress._debugHookTypes = current._debugHookTypes),
(workInProgress.alternate = current),
(current.alternate = workInProgress))
@@ -15865,6 +15972,9 @@ __DEV__ &&
lanes
);
mode._debugOwner = element._owner;
+ enableOwnerStacks &&
+ ((mode._debugStack = element._debugStack),
+ (mode._debugTask = element._debugTask));
return mode;
}
function createFiberFromFragment(elements, mode, lanes, key) {
@@ -16182,6 +16292,7 @@ __DEV__ &&
syncLaneExpirationMs = dynamicFeatureFlags.syncLaneExpirationMs,
transitionLaneExpirationMs =
dynamicFeatureFlags.transitionLaneExpirationMs,
+ enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_ELEMENT_TYPE = renameElementSymbol
@@ -18754,12 +18865,14 @@ __DEV__ &&
recreateMessage =
"React will try to recreate this component tree from scratch using the error boundary you provided, " +
((errorBoundaryName || "Anonymous") + "."),
- prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
"object" === typeof error$1 &&
null !== error$1 &&
@@ -18781,7 +18894,8 @@ __DEV__ &&
recreateMessage
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
};
exports.defaultOnRecoverableError = function (error) {
@@ -18792,12 +18906,14 @@ __DEV__ &&
error = componentName
? "An error occurred in the <" + componentName + "> component."
: "An error occurred in one of your React components.";
- var prevGetCurrentStack = ReactSharedInternals.getCurrentStack,
- componentStack =
+ var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
+ if (!enableOwnerStacks) {
+ var componentStack =
null != errorInfo.componentStack ? errorInfo.componentStack : "";
- ReactSharedInternals.getCurrentStack = function () {
- return componentStack;
- };
+ ReactSharedInternals.getCurrentStack = function () {
+ return componentStack;
+ };
+ }
try {
warn(
"%s\n\n%s\n",
@@ -18805,7 +18921,8 @@ __DEV__ &&
"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
);
} finally {
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
+ enableOwnerStacks ||
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStack);
}
};
exports.deferredUpdates = function (fn) {
@@ -19052,7 +19169,7 @@ __DEV__ &&
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js
index 5e40bd4141..34924af2ca 100644
--- a/compiled/facebook-www/ReactReconciler-prod.classic.js
+++ b/compiled/facebook-www/ReactReconciler-prod.classic.js
@@ -12851,7 +12851,7 @@ module.exports = function ($$$config) {
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js
index 3ba06f709a..e05b6ded1e 100644
--- a/compiled/facebook-www/ReactReconciler-prod.modern.js
+++ b/compiled/facebook-www/ReactReconciler-prod.modern.js
@@ -12570,7 +12570,7 @@ module.exports = function ($$$config) {
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js
index 4601c9ef8c..52697b0f7a 100644
--- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js
+++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js
@@ -15030,10 +15030,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
- version: "19.0.0-www-classic-7c4a7c9d-20241210",
+ version: "19.0.0-www-classic-a4964987-20241211",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-classic-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-classic-a4964987-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15168,5 +15168,5 @@ __DEV__ &&
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
- exports.version = "19.0.0-www-classic-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-classic-a4964987-20241211";
})();
diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js
index c05fe4abf6..df3989b189 100644
--- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js
+++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js
@@ -15030,10 +15030,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
- version: "19.0.0-www-modern-7c4a7c9d-20241210",
+ version: "19.0.0-www-modern-a4964987-20241211",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.0.0-www-modern-7c4a7c9d-20241210"
+ reconcilerVersion: "19.0.0-www-modern-a4964987-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15168,5 +15168,5 @@ __DEV__ &&
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
- exports.version = "19.0.0-www-modern-7c4a7c9d-20241210";
+ exports.version = "19.0.0-www-modern-a4964987-20241211";
})();
diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC
index d4578be0d5..25ae544bd3 100644
--- a/compiled/facebook-www/VERSION_CLASSIC
+++ b/compiled/facebook-www/VERSION_CLASSIC
@@ -1 +1 @@
-19.0.0-www-classic-7c4a7c9d-20241210
\ No newline at end of file
+19.0.0-www-classic-a4964987-20241211
\ No newline at end of file
diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN
index 12e64ee112..517841ce1e 100644
--- a/compiled/facebook-www/VERSION_MODERN
+++ b/compiled/facebook-www/VERSION_MODERN
@@ -1 +1 @@
-19.0.0-www-modern-7c4a7c9d-20241210
\ No newline at end of file
+19.0.0-www-modern-a4964987-20241211
\ No newline at end of file