mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Switch <Context> to mean <Context.Provider> (#28226)
Previously, `<Context>` was equivalent to `<Context.Consumer>`. However,
since the introduction of Hooks, the `<Context.Consumer>` API is rarely
used. The goal here is to make the common case cleaner:
```js
const ThemeContext = createContext('light')
function App() {
return (
<ThemeContext value="dark">
...
</ThemeContext>
)
}
function Button() {
const theme = use(ThemeContext)
// ...
}
```
This is technically a breaking change, but we've been warning about
rendering `<Context>` directly for several years by now, so it's
unlikely much code in the wild depends on the old behavior. [Proof that
it warns today (check
console).](https://codesandbox.io/p/sandbox/peaceful-nobel-pdxtfl)
---
**The relevant commit is 5696782b428a5ace96e66c1857e13249b6c07958.** It
switches `createContext` implementation so that `Context.Provider ===
Context`.
The main assumption that changed is that a Provider's fiber type is now
the context itself (rather than an intermediate object). Whereas a
Consumer's fiber type is now always an intermediate object (rather than
it being sometimes the context itself and sometimes an intermediate
object).
My methodology was to start with the relevant symbols, work tags, and
types, and work my way backwards to all usages.
This might break tooling that depends on inspecting React's internal
fields. I've added DevTools support in the second commit. This didn't
need explicit versioning—the structure tells us enough.
DiffTrain build for [14fd9630ee](https://github.com/facebook/react/commit/14fd9630ee04387f4361da289393234e2b7d93b6)
This commit is contained in:
@@ -27,7 +27,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -106,8 +108,8 @@ if (__DEV__) {
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing;
|
||||
// On WWW, false is used for a new modern build.
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build.
|
||||
|
||||
var REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference");
|
||||
function isValidElementType(type) {
|
||||
@@ -135,8 +137,9 @@ if (__DEV__) {
|
||||
if (
|
||||
type.$$typeof === REACT_LAZY_TYPE ||
|
||||
type.$$typeof === REACT_MEMO_TYPE ||
|
||||
type.$$typeof === REACT_PROVIDER_TYPE ||
|
||||
type.$$typeof === REACT_CONTEXT_TYPE ||
|
||||
(!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) ||
|
||||
(enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) ||
|
||||
type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
@@ -231,13 +234,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
|
||||
@@ -27,7 +27,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -106,8 +108,8 @@ if (__DEV__) {
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing;
|
||||
// On WWW, true is used for a new modern build.
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build.
|
||||
|
||||
var REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference");
|
||||
function isValidElementType(type) {
|
||||
@@ -135,8 +137,9 @@ if (__DEV__) {
|
||||
if (
|
||||
type.$$typeof === REACT_LAZY_TYPE ||
|
||||
type.$$typeof === REACT_MEMO_TYPE ||
|
||||
type.$$typeof === REACT_PROVIDER_TYPE ||
|
||||
type.$$typeof === REACT_CONTEXT_TYPE ||
|
||||
(!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) ||
|
||||
(enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) ||
|
||||
type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
@@ -231,13 +234,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
|
||||
@@ -1 +1 @@
|
||||
8d48183291870898ec42ac1f84482d9d26789424
|
||||
14fd9630ee04387f4361da289393234e2b7d93b6
|
||||
|
||||
@@ -24,7 +24,7 @@ if (__DEV__) {
|
||||
) {
|
||||
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
||||
}
|
||||
var ReactVersion = "18.3.0-www-classic-ab1e0612";
|
||||
var ReactVersion = "18.3.0-www-classic-38e30556";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -35,7 +35,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -473,8 +475,8 @@ if (__DEV__) {
|
||||
|
||||
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions;
|
||||
// On WWW, false is used for a new modern build.
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build.
|
||||
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
var displayName = outerType.displayName;
|
||||
@@ -556,13 +558,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
@@ -1022,8 +1041,9 @@ if (__DEV__) {
|
||||
if (
|
||||
type.$$typeof === REACT_LAZY_TYPE ||
|
||||
type.$$typeof === REACT_MEMO_TYPE ||
|
||||
type.$$typeof === REACT_PROVIDER_TYPE ||
|
||||
type.$$typeof === REACT_CONTEXT_TYPE ||
|
||||
(!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) ||
|
||||
(enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) ||
|
||||
type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
@@ -2472,98 +2492,71 @@ if (__DEV__) {
|
||||
Provider: null,
|
||||
Consumer: null
|
||||
};
|
||||
context.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: context
|
||||
};
|
||||
var hasWarnedAboutUsingNestedContextConsumers = false;
|
||||
var hasWarnedAboutUsingConsumerProvider = false;
|
||||
var hasWarnedAboutDisplayNameOnConsumer = false;
|
||||
|
||||
{
|
||||
// A separate object, but proxies back to the original context object for
|
||||
// backwards compatibility. It has a different $$typeof, so we can properly
|
||||
// warn for the incorrect usage of Context as a Consumer.
|
||||
var Consumer = {
|
||||
$$typeof: REACT_CONTEXT_TYPE,
|
||||
if (enableRenderableContext) {
|
||||
context.Provider = context;
|
||||
context.Consumer = {
|
||||
$$typeof: REACT_CONSUMER_TYPE,
|
||||
_context: context
|
||||
}; // $FlowFixMe[prop-missing]: Flow complains about not setting a value, which is intentional here
|
||||
};
|
||||
} else {
|
||||
context.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: context
|
||||
};
|
||||
|
||||
Object.defineProperties(Consumer, {
|
||||
Provider: {
|
||||
get: function () {
|
||||
if (!hasWarnedAboutUsingConsumerProvider) {
|
||||
hasWarnedAboutUsingConsumerProvider = true;
|
||||
|
||||
error(
|
||||
"Rendering <Context.Consumer.Provider> is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Provider> instead?"
|
||||
);
|
||||
{
|
||||
var Consumer = {
|
||||
$$typeof: REACT_CONTEXT_TYPE,
|
||||
_context: context
|
||||
};
|
||||
Object.defineProperties(Consumer, {
|
||||
Provider: {
|
||||
get: function () {
|
||||
return context.Provider;
|
||||
},
|
||||
set: function (_Provider) {
|
||||
context.Provider = _Provider;
|
||||
}
|
||||
|
||||
return context.Provider;
|
||||
},
|
||||
set: function (_Provider) {
|
||||
context.Provider = _Provider;
|
||||
}
|
||||
},
|
||||
_currentValue: {
|
||||
get: function () {
|
||||
return context._currentValue;
|
||||
},
|
||||
set: function (_currentValue) {
|
||||
context._currentValue = _currentValue;
|
||||
}
|
||||
},
|
||||
_currentValue2: {
|
||||
get: function () {
|
||||
return context._currentValue2;
|
||||
},
|
||||
set: function (_currentValue2) {
|
||||
context._currentValue2 = _currentValue2;
|
||||
}
|
||||
},
|
||||
_threadCount: {
|
||||
get: function () {
|
||||
return context._threadCount;
|
||||
},
|
||||
set: function (_threadCount) {
|
||||
context._threadCount = _threadCount;
|
||||
}
|
||||
},
|
||||
Consumer: {
|
||||
get: function () {
|
||||
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
||||
hasWarnedAboutUsingNestedContextConsumers = true;
|
||||
|
||||
error(
|
||||
"Rendering <Context.Consumer.Consumer> is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
_currentValue: {
|
||||
get: function () {
|
||||
return context._currentValue;
|
||||
},
|
||||
set: function (_currentValue) {
|
||||
context._currentValue = _currentValue;
|
||||
}
|
||||
|
||||
return context.Consumer;
|
||||
}
|
||||
},
|
||||
displayName: {
|
||||
get: function () {
|
||||
return context.displayName;
|
||||
},
|
||||
set: function (displayName) {
|
||||
if (!hasWarnedAboutDisplayNameOnConsumer) {
|
||||
warn(
|
||||
"Setting `displayName` on Context.Consumer has no effect. " +
|
||||
"You should set it directly on the context with Context.displayName = '%s'.",
|
||||
displayName
|
||||
);
|
||||
|
||||
hasWarnedAboutDisplayNameOnConsumer = true;
|
||||
_currentValue2: {
|
||||
get: function () {
|
||||
return context._currentValue2;
|
||||
},
|
||||
set: function (_currentValue2) {
|
||||
context._currentValue2 = _currentValue2;
|
||||
}
|
||||
},
|
||||
_threadCount: {
|
||||
get: function () {
|
||||
return context._threadCount;
|
||||
},
|
||||
set: function (_threadCount) {
|
||||
context._threadCount = _threadCount;
|
||||
}
|
||||
},
|
||||
Consumer: {
|
||||
get: function () {
|
||||
return context.Consumer;
|
||||
}
|
||||
},
|
||||
displayName: {
|
||||
get: function () {
|
||||
return context.displayName;
|
||||
},
|
||||
set: function (displayName) {}
|
||||
}
|
||||
}
|
||||
}); // $FlowFixMe[prop-missing]: Flow complains about missing properties because it doesn't understand defineProperty
|
||||
|
||||
context.Consumer = Consumer;
|
||||
});
|
||||
context.Consumer = Consumer;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
@@ -2910,22 +2903,11 @@ if (__DEV__) {
|
||||
var dispatcher = resolveDispatcher();
|
||||
|
||||
{
|
||||
// TODO: add a more generic warning for invalid values.
|
||||
if (Context._context !== undefined) {
|
||||
var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
|
||||
// and nobody should be using this in existing code.
|
||||
|
||||
if (realContext.Consumer === Context) {
|
||||
error(
|
||||
"Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be " +
|
||||
"removed in a future major release. Did you mean to call useContext(Context) instead?"
|
||||
);
|
||||
} else if (realContext.Provider === Context) {
|
||||
error(
|
||||
"Calling useContext(Context.Provider) is not supported. " +
|
||||
"Did you mean to call useContext(Context) instead?"
|
||||
);
|
||||
}
|
||||
if (Context.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
error(
|
||||
"Calling useContext(Context.Consumer) is not supported and will cause bugs. " +
|
||||
"Did you mean to call useContext(Context) instead?"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ if (__DEV__) {
|
||||
) {
|
||||
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
||||
}
|
||||
var ReactVersion = "18.3.0-www-modern-d9e56569";
|
||||
var ReactVersion = "18.3.0-www-modern-f32f96e5";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -35,7 +35,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -473,8 +475,8 @@ if (__DEV__) {
|
||||
|
||||
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions;
|
||||
// On WWW, true is used for a new modern build.
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build.
|
||||
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
var displayName = outerType.displayName;
|
||||
@@ -556,13 +558,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
@@ -1022,8 +1041,9 @@ if (__DEV__) {
|
||||
if (
|
||||
type.$$typeof === REACT_LAZY_TYPE ||
|
||||
type.$$typeof === REACT_MEMO_TYPE ||
|
||||
type.$$typeof === REACT_PROVIDER_TYPE ||
|
||||
type.$$typeof === REACT_CONTEXT_TYPE ||
|
||||
(!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) ||
|
||||
(enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) ||
|
||||
type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
@@ -2437,98 +2457,71 @@ if (__DEV__) {
|
||||
Provider: null,
|
||||
Consumer: null
|
||||
};
|
||||
context.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: context
|
||||
};
|
||||
var hasWarnedAboutUsingNestedContextConsumers = false;
|
||||
var hasWarnedAboutUsingConsumerProvider = false;
|
||||
var hasWarnedAboutDisplayNameOnConsumer = false;
|
||||
|
||||
{
|
||||
// A separate object, but proxies back to the original context object for
|
||||
// backwards compatibility. It has a different $$typeof, so we can properly
|
||||
// warn for the incorrect usage of Context as a Consumer.
|
||||
var Consumer = {
|
||||
$$typeof: REACT_CONTEXT_TYPE,
|
||||
if (enableRenderableContext) {
|
||||
context.Provider = context;
|
||||
context.Consumer = {
|
||||
$$typeof: REACT_CONSUMER_TYPE,
|
||||
_context: context
|
||||
}; // $FlowFixMe[prop-missing]: Flow complains about not setting a value, which is intentional here
|
||||
};
|
||||
} else {
|
||||
context.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: context
|
||||
};
|
||||
|
||||
Object.defineProperties(Consumer, {
|
||||
Provider: {
|
||||
get: function () {
|
||||
if (!hasWarnedAboutUsingConsumerProvider) {
|
||||
hasWarnedAboutUsingConsumerProvider = true;
|
||||
|
||||
error(
|
||||
"Rendering <Context.Consumer.Provider> is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Provider> instead?"
|
||||
);
|
||||
{
|
||||
var Consumer = {
|
||||
$$typeof: REACT_CONTEXT_TYPE,
|
||||
_context: context
|
||||
};
|
||||
Object.defineProperties(Consumer, {
|
||||
Provider: {
|
||||
get: function () {
|
||||
return context.Provider;
|
||||
},
|
||||
set: function (_Provider) {
|
||||
context.Provider = _Provider;
|
||||
}
|
||||
|
||||
return context.Provider;
|
||||
},
|
||||
set: function (_Provider) {
|
||||
context.Provider = _Provider;
|
||||
}
|
||||
},
|
||||
_currentValue: {
|
||||
get: function () {
|
||||
return context._currentValue;
|
||||
},
|
||||
set: function (_currentValue) {
|
||||
context._currentValue = _currentValue;
|
||||
}
|
||||
},
|
||||
_currentValue2: {
|
||||
get: function () {
|
||||
return context._currentValue2;
|
||||
},
|
||||
set: function (_currentValue2) {
|
||||
context._currentValue2 = _currentValue2;
|
||||
}
|
||||
},
|
||||
_threadCount: {
|
||||
get: function () {
|
||||
return context._threadCount;
|
||||
},
|
||||
set: function (_threadCount) {
|
||||
context._threadCount = _threadCount;
|
||||
}
|
||||
},
|
||||
Consumer: {
|
||||
get: function () {
|
||||
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
||||
hasWarnedAboutUsingNestedContextConsumers = true;
|
||||
|
||||
error(
|
||||
"Rendering <Context.Consumer.Consumer> is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
_currentValue: {
|
||||
get: function () {
|
||||
return context._currentValue;
|
||||
},
|
||||
set: function (_currentValue) {
|
||||
context._currentValue = _currentValue;
|
||||
}
|
||||
|
||||
return context.Consumer;
|
||||
}
|
||||
},
|
||||
displayName: {
|
||||
get: function () {
|
||||
return context.displayName;
|
||||
},
|
||||
set: function (displayName) {
|
||||
if (!hasWarnedAboutDisplayNameOnConsumer) {
|
||||
warn(
|
||||
"Setting `displayName` on Context.Consumer has no effect. " +
|
||||
"You should set it directly on the context with Context.displayName = '%s'.",
|
||||
displayName
|
||||
);
|
||||
|
||||
hasWarnedAboutDisplayNameOnConsumer = true;
|
||||
_currentValue2: {
|
||||
get: function () {
|
||||
return context._currentValue2;
|
||||
},
|
||||
set: function (_currentValue2) {
|
||||
context._currentValue2 = _currentValue2;
|
||||
}
|
||||
},
|
||||
_threadCount: {
|
||||
get: function () {
|
||||
return context._threadCount;
|
||||
},
|
||||
set: function (_threadCount) {
|
||||
context._threadCount = _threadCount;
|
||||
}
|
||||
},
|
||||
Consumer: {
|
||||
get: function () {
|
||||
return context.Consumer;
|
||||
}
|
||||
},
|
||||
displayName: {
|
||||
get: function () {
|
||||
return context.displayName;
|
||||
},
|
||||
set: function (displayName) {}
|
||||
}
|
||||
}
|
||||
}); // $FlowFixMe[prop-missing]: Flow complains about missing properties because it doesn't understand defineProperty
|
||||
|
||||
context.Consumer = Consumer;
|
||||
});
|
||||
context.Consumer = Consumer;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
@@ -2875,22 +2868,11 @@ if (__DEV__) {
|
||||
var dispatcher = resolveDispatcher();
|
||||
|
||||
{
|
||||
// TODO: add a more generic warning for invalid values.
|
||||
if (Context._context !== undefined) {
|
||||
var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
|
||||
// and nobody should be using this in existing code.
|
||||
|
||||
if (realContext.Consumer === Context) {
|
||||
error(
|
||||
"Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be " +
|
||||
"removed in a future major release. Did you mean to call useContext(Context) instead?"
|
||||
);
|
||||
} else if (realContext.Provider === Context) {
|
||||
error(
|
||||
"Calling useContext(Context.Provider) is not supported. " +
|
||||
"Did you mean to call useContext(Context) instead?"
|
||||
);
|
||||
}
|
||||
if (Context.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
error(
|
||||
"Calling useContext(Context.Consumer) is not supported and will cause bugs. " +
|
||||
"Did you mean to call useContext(Context) instead?"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -84,6 +85,7 @@ var isArrayImpl = Array.isArray,
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
ReactCurrentOwner$1 = { current: null };
|
||||
function ReactElement$1(type, key, ref, owner, props) {
|
||||
@@ -460,11 +462,18 @@ exports.createContext = function (defaultValue) {
|
||||
Provider: null,
|
||||
Consumer: null
|
||||
};
|
||||
defaultValue.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: defaultValue
|
||||
};
|
||||
return (defaultValue.Consumer = defaultValue);
|
||||
enableRenderableContext
|
||||
? ((defaultValue.Provider = defaultValue),
|
||||
(defaultValue.Consumer = {
|
||||
$$typeof: REACT_CONSUMER_TYPE,
|
||||
_context: defaultValue
|
||||
}))
|
||||
: ((defaultValue.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: defaultValue
|
||||
}),
|
||||
(defaultValue.Consumer = defaultValue));
|
||||
return defaultValue;
|
||||
};
|
||||
exports.createElement = createElement$1;
|
||||
exports.createFactory = function (type) {
|
||||
@@ -617,4 +626,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-1596b9e6";
|
||||
exports.version = "18.3.0-www-classic-25a61d97";
|
||||
|
||||
@@ -17,6 +17,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -83,6 +84,7 @@ var isArrayImpl = Array.isArray,
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
ReactCurrentOwner$1 = { current: null };
|
||||
function ReactElement$1(type, key, ref, owner, props) {
|
||||
@@ -431,11 +433,18 @@ exports.createContext = function (defaultValue) {
|
||||
Provider: null,
|
||||
Consumer: null
|
||||
};
|
||||
defaultValue.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: defaultValue
|
||||
};
|
||||
return (defaultValue.Consumer = defaultValue);
|
||||
enableRenderableContext
|
||||
? ((defaultValue.Provider = defaultValue),
|
||||
(defaultValue.Consumer = {
|
||||
$$typeof: REACT_CONSUMER_TYPE,
|
||||
_context: defaultValue
|
||||
}))
|
||||
: ((defaultValue.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: defaultValue
|
||||
}),
|
||||
(defaultValue.Consumer = defaultValue));
|
||||
return defaultValue;
|
||||
};
|
||||
exports.createElement = function (type, config, children) {
|
||||
var propName,
|
||||
@@ -609,4 +618,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-369264d7";
|
||||
exports.version = "18.3.0-www-modern-04e2d939";
|
||||
|
||||
@@ -21,6 +21,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -88,6 +89,7 @@ var isArrayImpl = Array.isArray,
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
ReactCurrentOwner$1 = { current: null };
|
||||
function ReactElement$1(type, key, ref, owner, props) {
|
||||
@@ -464,11 +466,18 @@ exports.createContext = function (defaultValue) {
|
||||
Provider: null,
|
||||
Consumer: null
|
||||
};
|
||||
defaultValue.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: defaultValue
|
||||
};
|
||||
return (defaultValue.Consumer = defaultValue);
|
||||
enableRenderableContext
|
||||
? ((defaultValue.Provider = defaultValue),
|
||||
(defaultValue.Consumer = {
|
||||
$$typeof: REACT_CONSUMER_TYPE,
|
||||
_context: defaultValue
|
||||
}))
|
||||
: ((defaultValue.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: defaultValue
|
||||
}),
|
||||
(defaultValue.Consumer = defaultValue));
|
||||
return defaultValue;
|
||||
};
|
||||
exports.createElement = createElement$1;
|
||||
exports.createFactory = function (type) {
|
||||
@@ -621,7 +630,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-317962e3";
|
||||
exports.version = "18.3.0-www-classic-0c80b4ef";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -21,6 +21,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -87,6 +88,7 @@ var isArrayImpl = Array.isArray,
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
ReactCurrentOwner$1 = { current: null };
|
||||
function ReactElement$1(type, key, ref, owner, props) {
|
||||
@@ -435,11 +437,18 @@ exports.createContext = function (defaultValue) {
|
||||
Provider: null,
|
||||
Consumer: null
|
||||
};
|
||||
defaultValue.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: defaultValue
|
||||
};
|
||||
return (defaultValue.Consumer = defaultValue);
|
||||
enableRenderableContext
|
||||
? ((defaultValue.Provider = defaultValue),
|
||||
(defaultValue.Consumer = {
|
||||
$$typeof: REACT_CONSUMER_TYPE,
|
||||
_context: defaultValue
|
||||
}))
|
||||
: ((defaultValue.Provider = {
|
||||
$$typeof: REACT_PROVIDER_TYPE,
|
||||
_context: defaultValue
|
||||
}),
|
||||
(defaultValue.Consumer = defaultValue));
|
||||
return defaultValue;
|
||||
};
|
||||
exports.createElement = function (type, config, children) {
|
||||
var propName,
|
||||
@@ -613,7 +622,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-de96d418";
|
||||
exports.version = "18.3.0-www-modern-73e137c7";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -66,7 +66,7 @@ if (__DEV__) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-70a849df";
|
||||
var ReactVersion = "18.3.0-www-classic-a110aae0";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -188,7 +188,8 @@ if (__DEV__) {
|
||||
transitionLaneExpirationMs =
|
||||
dynamicFeatureFlags.transitionLaneExpirationMs,
|
||||
enableInfiniteRenderLoopDetection =
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, false is used for a new modern build.
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build.
|
||||
var enableProfilerTimer = true;
|
||||
var enableProfilerCommitHooks = true;
|
||||
var enableProfilerNestedUpdatePhase = true;
|
||||
@@ -237,7 +238,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -349,13 +352,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName$1(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName$1(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
@@ -409,12 +429,22 @@ if (__DEV__) {
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
return getContextName(_context) + ".Provider";
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
@@ -13151,8 +13181,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -13166,11 +13195,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -17555,8 +17580,14 @@ if (__DEV__) {
|
||||
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
|
||||
|
||||
function updateContextProvider(current, workInProgress, renderLanes) {
|
||||
var providerType = workInProgress.type;
|
||||
var context = providerType._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
var newProps = workInProgress.pendingProps;
|
||||
var oldProps = workInProgress.memoizedProps;
|
||||
var newValue = newProps.value;
|
||||
@@ -17616,34 +17647,19 @@ if (__DEV__) {
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
var hasWarnedAboutUsingContextAsConsumer = false;
|
||||
|
||||
function updateContextConsumer(current, workInProgress, renderLanes) {
|
||||
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
var context;
|
||||
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
if (enableRenderableContext) {
|
||||
var consumerType = workInProgress.type;
|
||||
context = consumerType._context;
|
||||
} else {
|
||||
context = workInProgress.type;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
{
|
||||
if (context._context !== undefined) {
|
||||
context = context._context;
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17887,7 +17903,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider: {
|
||||
var newValue = workInProgress.memoizedProps.value;
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
pushProvider(workInProgress, context, newValue);
|
||||
break;
|
||||
}
|
||||
@@ -18871,8 +18894,14 @@ if (__DEV__) {
|
||||
var oldProps = currentParent.memoizedProps;
|
||||
|
||||
if (oldProps !== null) {
|
||||
var providerType = parent.type;
|
||||
var context = providerType._context;
|
||||
var context = void 0;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = parent.type;
|
||||
} else {
|
||||
context = parent.type._context;
|
||||
}
|
||||
|
||||
var newProps = parent.pendingProps;
|
||||
var newValue = newProps.value;
|
||||
var oldValue = oldProps.value;
|
||||
@@ -19413,7 +19442,10 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
function collectNearestContextValues(node, context, childContextValues) {
|
||||
if (node.tag === ContextProvider && node.type._context === context) {
|
||||
if (
|
||||
node.tag === ContextProvider &&
|
||||
(enableRenderableContext ? node.type : node.type._context) === context
|
||||
) {
|
||||
var contextValue = node.memoizedProps.value;
|
||||
childContextValues.push(contextValue);
|
||||
} else {
|
||||
@@ -20273,7 +20305,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider:
|
||||
// Pop provider fiber
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
bubbleProperties(workInProgress);
|
||||
return null;
|
||||
@@ -20756,7 +20795,14 @@ if (__DEV__) {
|
||||
return null;
|
||||
|
||||
case ContextProvider:
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
return null;
|
||||
|
||||
@@ -20848,7 +20894,14 @@ if (__DEV__) {
|
||||
break;
|
||||
|
||||
case ContextProvider:
|
||||
var context = interruptedWork.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = interruptedWork.type;
|
||||
} else {
|
||||
context = interruptedWork.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, interruptedWork);
|
||||
break;
|
||||
|
||||
@@ -29674,13 +29727,29 @@ if (__DEV__) {
|
||||
if (typeof type === "object" && type !== null) {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
if (!enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
// This is a consumer
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
} else {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = ForwardRef;
|
||||
|
||||
@@ -66,7 +66,7 @@ if (__DEV__) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-95a0d372";
|
||||
var ReactVersion = "18.3.0-www-modern-6bdcbf17";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -188,7 +188,8 @@ if (__DEV__) {
|
||||
transitionLaneExpirationMs =
|
||||
dynamicFeatureFlags.transitionLaneExpirationMs,
|
||||
enableInfiniteRenderLoopDetection =
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, true is used for a new modern build.
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build.
|
||||
var enableProfilerTimer = true;
|
||||
var enableProfilerCommitHooks = true;
|
||||
var enableProfilerNestedUpdatePhase = true;
|
||||
@@ -237,7 +238,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -349,13 +352,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName$1(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName$1(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
@@ -409,12 +429,22 @@ if (__DEV__) {
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
return getContextName(_context) + ".Provider";
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
@@ -12891,8 +12921,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -12906,11 +12935,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -17234,8 +17259,14 @@ if (__DEV__) {
|
||||
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
|
||||
|
||||
function updateContextProvider(current, workInProgress, renderLanes) {
|
||||
var providerType = workInProgress.type;
|
||||
var context = providerType._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
var newProps = workInProgress.pendingProps;
|
||||
var oldProps = workInProgress.memoizedProps;
|
||||
var newValue = newProps.value;
|
||||
@@ -17295,34 +17326,19 @@ if (__DEV__) {
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
var hasWarnedAboutUsingContextAsConsumer = false;
|
||||
|
||||
function updateContextConsumer(current, workInProgress, renderLanes) {
|
||||
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
var context;
|
||||
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
if (enableRenderableContext) {
|
||||
var consumerType = workInProgress.type;
|
||||
context = consumerType._context;
|
||||
} else {
|
||||
context = workInProgress.type;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
{
|
||||
if (context._context !== undefined) {
|
||||
context = context._context;
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17560,7 +17576,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider: {
|
||||
var newValue = workInProgress.memoizedProps.value;
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
pushProvider(workInProgress, context, newValue);
|
||||
break;
|
||||
}
|
||||
@@ -18544,8 +18567,14 @@ if (__DEV__) {
|
||||
var oldProps = currentParent.memoizedProps;
|
||||
|
||||
if (oldProps !== null) {
|
||||
var providerType = parent.type;
|
||||
var context = providerType._context;
|
||||
var context = void 0;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = parent.type;
|
||||
} else {
|
||||
context = parent.type._context;
|
||||
}
|
||||
|
||||
var newProps = parent.pendingProps;
|
||||
var newValue = newProps.value;
|
||||
var oldValue = oldProps.value;
|
||||
@@ -19086,7 +19115,10 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
function collectNearestContextValues(node, context, childContextValues) {
|
||||
if (node.tag === ContextProvider && node.type._context === context) {
|
||||
if (
|
||||
node.tag === ContextProvider &&
|
||||
(enableRenderableContext ? node.type : node.type._context) === context
|
||||
) {
|
||||
var contextValue = node.memoizedProps.value;
|
||||
childContextValues.push(contextValue);
|
||||
} else {
|
||||
@@ -19939,7 +19971,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider:
|
||||
// Pop provider fiber
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
bubbleProperties(workInProgress);
|
||||
return null;
|
||||
@@ -20407,7 +20446,14 @@ if (__DEV__) {
|
||||
return null;
|
||||
|
||||
case ContextProvider:
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
return null;
|
||||
|
||||
@@ -20492,7 +20538,14 @@ if (__DEV__) {
|
||||
break;
|
||||
|
||||
case ContextProvider:
|
||||
var context = interruptedWork.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = interruptedWork.type;
|
||||
} else {
|
||||
context = interruptedWork.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, interruptedWork);
|
||||
break;
|
||||
|
||||
@@ -29309,13 +29362,29 @@ if (__DEV__) {
|
||||
if (typeof type === "object" && type !== null) {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
if (!enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
// This is a consumer
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
} else {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = ForwardRef;
|
||||
|
||||
@@ -85,12 +85,14 @@ var ReactSharedInternals =
|
||||
transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs,
|
||||
enableInfiniteRenderLoopDetection =
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
|
||||
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -140,10 +142,17 @@ function getComponentNameFromType(type) {
|
||||
}
|
||||
if ("object" === typeof type)
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
return (type.displayName || "Context") + ".Consumer";
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return (type._context.displayName || "Context") + ".Provider";
|
||||
if (enableRenderableContext) break;
|
||||
else return (type._context.displayName || "Context") + ".Provider";
|
||||
case REACT_CONTEXT_TYPE:
|
||||
return enableRenderableContext
|
||||
? (type.displayName || "Context") + ".Provider"
|
||||
: (type.displayName || "Context") + ".Consumer";
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext)
|
||||
return (type._context.displayName || "Context") + ".Consumer";
|
||||
break;
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
var innerType = type.render;
|
||||
type = type.displayName;
|
||||
@@ -173,9 +182,13 @@ function getComponentNameFromFiber(fiber) {
|
||||
case 24:
|
||||
return "Cache";
|
||||
case 9:
|
||||
return (type.displayName || "Context") + ".Consumer";
|
||||
return enableRenderableContext
|
||||
? (type._context.displayName || "Context") + ".Consumer"
|
||||
: (type.displayName || "Context") + ".Consumer";
|
||||
case 10:
|
||||
return (type._context.displayName || "Context") + ".Provider";
|
||||
return enableRenderableContext
|
||||
? (type.displayName || "Context") + ".Provider"
|
||||
: (type._context.displayName || "Context") + ".Provider";
|
||||
case 18:
|
||||
return "DehydratedFragment";
|
||||
case 11:
|
||||
@@ -275,36 +288,36 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
||||
}
|
||||
if (a.return !== b.return) (a = parentA), (b = parentB);
|
||||
else {
|
||||
for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {
|
||||
if (child$0 === a) {
|
||||
for (var didFindChild = !1, child$1 = parentA.child; child$1; ) {
|
||||
if (child$1 === a) {
|
||||
didFindChild = !0;
|
||||
a = parentA;
|
||||
b = parentB;
|
||||
break;
|
||||
}
|
||||
if (child$0 === b) {
|
||||
if (child$1 === b) {
|
||||
didFindChild = !0;
|
||||
b = parentA;
|
||||
a = parentB;
|
||||
break;
|
||||
}
|
||||
child$0 = child$0.sibling;
|
||||
child$1 = child$1.sibling;
|
||||
}
|
||||
if (!didFindChild) {
|
||||
for (child$0 = parentB.child; child$0; ) {
|
||||
if (child$0 === a) {
|
||||
for (child$1 = parentB.child; child$1; ) {
|
||||
if (child$1 === a) {
|
||||
didFindChild = !0;
|
||||
a = parentB;
|
||||
b = parentA;
|
||||
break;
|
||||
}
|
||||
if (child$0 === b) {
|
||||
if (child$1 === b) {
|
||||
didFindChild = !0;
|
||||
b = parentB;
|
||||
a = parentA;
|
||||
break;
|
||||
}
|
||||
child$0 = child$0.sibling;
|
||||
child$1 = child$1.sibling;
|
||||
}
|
||||
if (!didFindChild) throw Error(formatProdErrorMessage(189));
|
||||
}
|
||||
@@ -576,18 +589,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) {
|
||||
0 < noLongerPendingLanes;
|
||||
|
||||
) {
|
||||
var index$4 = 31 - clz32(noLongerPendingLanes),
|
||||
lane = 1 << index$4;
|
||||
remainingLanes[index$4] = 0;
|
||||
expirationTimes[index$4] = -1;
|
||||
var hiddenUpdatesForLane = hiddenUpdates[index$4];
|
||||
var index$5 = 31 - clz32(noLongerPendingLanes),
|
||||
lane = 1 << index$5;
|
||||
remainingLanes[index$5] = 0;
|
||||
expirationTimes[index$5] = -1;
|
||||
var hiddenUpdatesForLane = hiddenUpdates[index$5];
|
||||
if (null !== hiddenUpdatesForLane)
|
||||
for (
|
||||
hiddenUpdates[index$4] = null, index$4 = 0;
|
||||
index$4 < hiddenUpdatesForLane.length;
|
||||
index$4++
|
||||
hiddenUpdates[index$5] = null, index$5 = 0;
|
||||
index$5 < hiddenUpdatesForLane.length;
|
||||
index$5++
|
||||
) {
|
||||
var update = hiddenUpdatesForLane[index$4];
|
||||
var update = hiddenUpdatesForLane[index$5];
|
||||
null !== update && (update.lane &= -536870913);
|
||||
}
|
||||
noLongerPendingLanes &= ~lane;
|
||||
@@ -607,21 +620,21 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
for (root = root.entanglements; rootEntangledLanes; ) {
|
||||
var index$5 = 31 - clz32(rootEntangledLanes),
|
||||
lane = 1 << index$5;
|
||||
(lane & entangledLanes) | (root[index$5] & entangledLanes) &&
|
||||
(root[index$5] |= entangledLanes);
|
||||
var index$6 = 31 - clz32(rootEntangledLanes),
|
||||
lane = 1 << index$6;
|
||||
(lane & entangledLanes) | (root[index$6] & entangledLanes) &&
|
||||
(root[index$6] |= entangledLanes);
|
||||
rootEntangledLanes &= ~lane;
|
||||
}
|
||||
}
|
||||
function getTransitionsForLanes(root, lanes) {
|
||||
if (!enableTransitionTracing) return null;
|
||||
for (var transitionsForLanes = []; 0 < lanes; ) {
|
||||
var index$7 = 31 - clz32(lanes),
|
||||
lane = 1 << index$7;
|
||||
index$7 = root.transitionLanes[index$7];
|
||||
null !== index$7 &&
|
||||
index$7.forEach(function (transition) {
|
||||
var index$8 = 31 - clz32(lanes),
|
||||
lane = 1 << index$8;
|
||||
index$8 = root.transitionLanes[index$8];
|
||||
null !== index$8 &&
|
||||
index$8.forEach(function (transition) {
|
||||
transitionsForLanes.push(transition);
|
||||
});
|
||||
lanes &= ~lane;
|
||||
@@ -631,10 +644,10 @@ function getTransitionsForLanes(root, lanes) {
|
||||
function clearTransitionsForLanes(root, lanes) {
|
||||
if (enableTransitionTracing)
|
||||
for (; 0 < lanes; ) {
|
||||
var index$8 = 31 - clz32(lanes),
|
||||
lane = 1 << index$8;
|
||||
null !== root.transitionLanes[index$8] &&
|
||||
(root.transitionLanes[index$8] = null);
|
||||
var index$9 = 31 - clz32(lanes),
|
||||
lane = 1 << index$9;
|
||||
null !== root.transitionLanes[index$9] &&
|
||||
(root.transitionLanes[index$9] = null);
|
||||
lanes &= ~lane;
|
||||
}
|
||||
}
|
||||
@@ -855,16 +868,16 @@ function describeNativeComponentFrame(fn, construct) {
|
||||
} else {
|
||||
try {
|
||||
Fake.call();
|
||||
} catch (x$9) {
|
||||
control = x$9;
|
||||
} catch (x$10) {
|
||||
control = x$10;
|
||||
}
|
||||
fn.call(Fake.prototype);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x$10) {
|
||||
control = x$10;
|
||||
} catch (x$11) {
|
||||
control = x$11;
|
||||
}
|
||||
(Fake = fn()) &&
|
||||
"function" === typeof Fake.catch &&
|
||||
@@ -1204,35 +1217,35 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) {
|
||||
var didPerformSomeWork = !1;
|
||||
for (var root = firstScheduledRoot; null !== root; ) {
|
||||
if (!onlyLegacy || 0 === root.tag) {
|
||||
var workInProgressRootRenderLanes$12 = workInProgressRootRenderLanes,
|
||||
var workInProgressRootRenderLanes$13 = workInProgressRootRenderLanes,
|
||||
nextLanes = getNextLanes(
|
||||
root,
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes$12 : 0
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes$13 : 0
|
||||
);
|
||||
if (0 !== (nextLanes & 3))
|
||||
try {
|
||||
didPerformSomeWork = !0;
|
||||
workInProgressRootRenderLanes$12 = root;
|
||||
workInProgressRootRenderLanes$13 = root;
|
||||
if (0 !== (executionContext & 6))
|
||||
throw Error(formatProdErrorMessage(327));
|
||||
if (!flushPassiveEffects()) {
|
||||
var exitStatus = renderRootSync(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
nextLanes
|
||||
);
|
||||
if (
|
||||
0 !== workInProgressRootRenderLanes$12.tag &&
|
||||
0 !== workInProgressRootRenderLanes$13.tag &&
|
||||
2 === exitStatus
|
||||
) {
|
||||
var originallyAttemptedLanes = nextLanes,
|
||||
errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((nextLanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
)));
|
||||
@@ -1240,34 +1253,34 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) {
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originallyAttemptedLanes = workInProgressRootFatalError),
|
||||
prepareFreshStack(workInProgressRootRenderLanes$12, 0),
|
||||
prepareFreshStack(workInProgressRootRenderLanes$13, 0),
|
||||
markRootSuspended(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
nextLanes,
|
||||
0
|
||||
),
|
||||
ensureRootIsScheduled(workInProgressRootRenderLanes$12),
|
||||
ensureRootIsScheduled(workInProgressRootRenderLanes$13),
|
||||
originallyAttemptedLanes)
|
||||
);
|
||||
6 === exitStatus
|
||||
? markRootSuspended(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
nextLanes,
|
||||
workInProgressDeferredLane
|
||||
)
|
||||
: ((workInProgressRootRenderLanes$12.finishedWork =
|
||||
workInProgressRootRenderLanes$12.current.alternate),
|
||||
(workInProgressRootRenderLanes$12.finishedLanes =
|
||||
: ((workInProgressRootRenderLanes$13.finishedWork =
|
||||
workInProgressRootRenderLanes$13.current.alternate),
|
||||
(workInProgressRootRenderLanes$13.finishedLanes =
|
||||
nextLanes),
|
||||
commitRoot(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
workInProgressRootDidIncludeRecursiveRenderUpdate,
|
||||
workInProgressDeferredLane
|
||||
));
|
||||
}
|
||||
ensureRootIsScheduled(workInProgressRootRenderLanes$12);
|
||||
ensureRootIsScheduled(workInProgressRootRenderLanes$13);
|
||||
} catch (error) {
|
||||
null === errors ? (errors = [error]) : errors.push(error);
|
||||
}
|
||||
@@ -1323,12 +1336,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
|
||||
0 < pendingLanes;
|
||||
|
||||
) {
|
||||
var index$2 = 31 - clz32(pendingLanes),
|
||||
lane = 1 << index$2,
|
||||
expirationTime = expirationTimes[index$2];
|
||||
var index$3 = 31 - clz32(pendingLanes),
|
||||
lane = 1 << index$3,
|
||||
expirationTime = expirationTimes[index$3];
|
||||
if (-1 === expirationTime) {
|
||||
if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
|
||||
expirationTimes[index$2] = computeExpirationTime(lane, currentTime);
|
||||
expirationTimes[index$3] = computeExpirationTime(lane, currentTime);
|
||||
} else expirationTime <= currentTime && (root.expiredLanes |= lane);
|
||||
pendingLanes &= ~lane;
|
||||
}
|
||||
@@ -2867,7 +2880,7 @@ function updateReducerImpl(hook, current, reducer) {
|
||||
var newBaseQueueFirst = (baseFirst = null),
|
||||
newBaseQueueLast = null,
|
||||
update = current,
|
||||
didReadFromEntangledAsyncAction$31 = !1;
|
||||
didReadFromEntangledAsyncAction$32 = !1;
|
||||
do {
|
||||
var updateLane = update.lane & -536870913;
|
||||
if (
|
||||
@@ -2880,7 +2893,7 @@ function updateReducerImpl(hook, current, reducer) {
|
||||
if ((renderLanes & revertLane) === revertLane) {
|
||||
update = update.next;
|
||||
revertLane === currentEntangledLane &&
|
||||
(didReadFromEntangledAsyncAction$31 = !0);
|
||||
(didReadFromEntangledAsyncAction$32 = !0);
|
||||
continue;
|
||||
} else
|
||||
(updateLane = {
|
||||
@@ -2909,7 +2922,7 @@ function updateReducerImpl(hook, current, reducer) {
|
||||
next: null
|
||||
}),
|
||||
updateLane === currentEntangledLane &&
|
||||
(didReadFromEntangledAsyncAction$31 = !0);
|
||||
(didReadFromEntangledAsyncAction$32 = !0);
|
||||
updateLane = update.action;
|
||||
shouldDoubleInvokeUserFnsInHooksDEV &&
|
||||
reducer(pendingQueue, updateLane);
|
||||
@@ -2939,7 +2952,7 @@ function updateReducerImpl(hook, current, reducer) {
|
||||
if (
|
||||
!objectIs(pendingQueue, hook.memoizedState) &&
|
||||
((didReceiveUpdate = !0),
|
||||
didReadFromEntangledAsyncAction$31 &&
|
||||
didReadFromEntangledAsyncAction$32 &&
|
||||
((reducer = currentEntangledActionThenable), null !== reducer))
|
||||
)
|
||||
throw reducer;
|
||||
@@ -5548,7 +5561,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
|
||||
case 10:
|
||||
pushProvider(
|
||||
workInProgress,
|
||||
workInProgress.type._context,
|
||||
enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context,
|
||||
workInProgress.memoizedProps.value
|
||||
);
|
||||
break;
|
||||
@@ -5799,7 +5814,9 @@ function propagateParentContextChanges(
|
||||
if (null === currentParent) throw Error(formatProdErrorMessage(387));
|
||||
currentParent = currentParent.memoizedProps;
|
||||
if (null !== currentParent) {
|
||||
var context = parent.type._context;
|
||||
var context = enableRenderableContext
|
||||
? parent.type
|
||||
: parent.type._context;
|
||||
objectIs(parent.pendingProps.value, currentParent.value) ||
|
||||
(null !== current ? current.push(context) : (current = [context]));
|
||||
}
|
||||
@@ -6026,7 +6043,10 @@ function collectNearestChildContextValues(
|
||||
var node = startingChild,
|
||||
context = context$jscomp$0,
|
||||
childContextValues = childContextValues$jscomp$0;
|
||||
if (10 === node.tag && node.type._context === context)
|
||||
if (
|
||||
10 === node.tag &&
|
||||
(enableRenderableContext ? node.type : node.type._context) === context
|
||||
)
|
||||
childContextValues.push(node.memoizedProps.value);
|
||||
else {
|
||||
var child = node.child;
|
||||
@@ -6088,14 +6108,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
|
||||
break;
|
||||
case "collapsed":
|
||||
lastTailNode = renderState.tail;
|
||||
for (var lastTailNode$77 = null; null !== lastTailNode; )
|
||||
null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode),
|
||||
for (var lastTailNode$78 = null; null !== lastTailNode; )
|
||||
null !== lastTailNode.alternate && (lastTailNode$78 = lastTailNode),
|
||||
(lastTailNode = lastTailNode.sibling);
|
||||
null === lastTailNode$77
|
||||
null === lastTailNode$78
|
||||
? hasRenderedATailFallback || null === renderState.tail
|
||||
? (renderState.tail = null)
|
||||
: (renderState.tail.sibling = null)
|
||||
: (lastTailNode$77.sibling = null);
|
||||
: (lastTailNode$78.sibling = null);
|
||||
}
|
||||
}
|
||||
function bubbleProperties(completedWork) {
|
||||
@@ -6105,19 +6125,19 @@ function bubbleProperties(completedWork) {
|
||||
newChildLanes = 0,
|
||||
subtreeFlags = 0;
|
||||
if (didBailout)
|
||||
for (var child$78 = completedWork.child; null !== child$78; )
|
||||
(newChildLanes |= child$78.lanes | child$78.childLanes),
|
||||
(subtreeFlags |= child$78.subtreeFlags & 31457280),
|
||||
(subtreeFlags |= child$78.flags & 31457280),
|
||||
(child$78.return = completedWork),
|
||||
(child$78 = child$78.sibling);
|
||||
for (var child$79 = completedWork.child; null !== child$79; )
|
||||
(newChildLanes |= child$79.lanes | child$79.childLanes),
|
||||
(subtreeFlags |= child$79.subtreeFlags & 31457280),
|
||||
(subtreeFlags |= child$79.flags & 31457280),
|
||||
(child$79.return = completedWork),
|
||||
(child$79 = child$79.sibling);
|
||||
else
|
||||
for (child$78 = completedWork.child; null !== child$78; )
|
||||
(newChildLanes |= child$78.lanes | child$78.childLanes),
|
||||
(subtreeFlags |= child$78.subtreeFlags),
|
||||
(subtreeFlags |= child$78.flags),
|
||||
(child$78.return = completedWork),
|
||||
(child$78 = child$78.sibling);
|
||||
for (child$79 = completedWork.child; null !== child$79; )
|
||||
(newChildLanes |= child$79.lanes | child$79.childLanes),
|
||||
(subtreeFlags |= child$79.subtreeFlags),
|
||||
(subtreeFlags |= child$79.flags),
|
||||
(child$79.return = completedWork),
|
||||
(child$79 = child$79.sibling);
|
||||
completedWork.subtreeFlags |= subtreeFlags;
|
||||
completedWork.childLanes = newChildLanes;
|
||||
return didBailout;
|
||||
@@ -6294,11 +6314,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
null !== newProps.alternate.memoizedState &&
|
||||
null !== newProps.alternate.memoizedState.cachePool &&
|
||||
(instance = newProps.alternate.memoizedState.cachePool.pool);
|
||||
var cache$82 = null;
|
||||
var cache$83 = null;
|
||||
null !== newProps.memoizedState &&
|
||||
null !== newProps.memoizedState.cachePool &&
|
||||
(cache$82 = newProps.memoizedState.cachePool.pool);
|
||||
cache$82 !== instance && (newProps.flags |= 2048);
|
||||
(cache$83 = newProps.memoizedState.cachePool.pool);
|
||||
cache$83 !== instance && (newProps.flags |= 2048);
|
||||
}
|
||||
renderLanes !== current &&
|
||||
(enableTransitionTracing && (workInProgress.child.flags |= 2048),
|
||||
@@ -6313,7 +6333,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
return popHostContainer(), bubbleProperties(workInProgress), null;
|
||||
case 10:
|
||||
return (
|
||||
popProvider(workInProgress.type._context),
|
||||
popProvider(
|
||||
enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context
|
||||
),
|
||||
bubbleProperties(workInProgress),
|
||||
null
|
||||
);
|
||||
@@ -6328,8 +6352,8 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
instance = workInProgress.memoizedState;
|
||||
if (null === instance) return bubbleProperties(workInProgress), null;
|
||||
newProps = 0 !== (workInProgress.flags & 128);
|
||||
cache$82 = instance.rendering;
|
||||
if (null === cache$82)
|
||||
cache$83 = instance.rendering;
|
||||
if (null === cache$83)
|
||||
if (newProps) cutOffTailIfNeeded(instance, !1);
|
||||
else {
|
||||
if (
|
||||
@@ -6337,11 +6361,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
(null !== current && 0 !== (current.flags & 128))
|
||||
)
|
||||
for (current = workInProgress.child; null !== current; ) {
|
||||
cache$82 = findFirstSuspended(current);
|
||||
if (null !== cache$82) {
|
||||
cache$83 = findFirstSuspended(current);
|
||||
if (null !== cache$83) {
|
||||
workInProgress.flags |= 128;
|
||||
cutOffTailIfNeeded(instance, !1);
|
||||
current = cache$82.updateQueue;
|
||||
current = cache$83.updateQueue;
|
||||
workInProgress.updateQueue = current;
|
||||
scheduleRetryEffect(workInProgress, current);
|
||||
workInProgress.subtreeFlags = 0;
|
||||
@@ -6366,7 +6390,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
}
|
||||
else {
|
||||
if (!newProps)
|
||||
if (((current = findFirstSuspended(cache$82)), null !== current)) {
|
||||
if (((current = findFirstSuspended(cache$83)), null !== current)) {
|
||||
if (
|
||||
((workInProgress.flags |= 128),
|
||||
(newProps = !0),
|
||||
@@ -6376,7 +6400,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
cutOffTailIfNeeded(instance, !0),
|
||||
null === instance.tail &&
|
||||
"hidden" === instance.tailMode &&
|
||||
!cache$82.alternate)
|
||||
!cache$83.alternate)
|
||||
)
|
||||
return bubbleProperties(workInProgress), null;
|
||||
} else
|
||||
@@ -6388,13 +6412,13 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
cutOffTailIfNeeded(instance, !1),
|
||||
(workInProgress.lanes = 4194304));
|
||||
instance.isBackwards
|
||||
? ((cache$82.sibling = workInProgress.child),
|
||||
(workInProgress.child = cache$82))
|
||||
? ((cache$83.sibling = workInProgress.child),
|
||||
(workInProgress.child = cache$83))
|
||||
: ((current = instance.last),
|
||||
null !== current
|
||||
? (current.sibling = cache$82)
|
||||
: (workInProgress.child = cache$82),
|
||||
(instance.last = cache$82));
|
||||
? (current.sibling = cache$83)
|
||||
: (workInProgress.child = cache$83),
|
||||
(instance.last = cache$83));
|
||||
}
|
||||
if (null !== instance.tail)
|
||||
return (
|
||||
@@ -6531,7 +6555,14 @@ function unwindWork(current, workInProgress) {
|
||||
case 4:
|
||||
return popHostContainer(), null;
|
||||
case 10:
|
||||
return popProvider(workInProgress.type._context), null;
|
||||
return (
|
||||
popProvider(
|
||||
enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context
|
||||
),
|
||||
null
|
||||
);
|
||||
case 22:
|
||||
case 23:
|
||||
return (
|
||||
@@ -6588,7 +6619,11 @@ function unwindInterruptedWork(current, interruptedWork) {
|
||||
pop(suspenseStackCursor);
|
||||
break;
|
||||
case 10:
|
||||
popProvider(interruptedWork.type._context);
|
||||
popProvider(
|
||||
enableRenderableContext
|
||||
? interruptedWork.type
|
||||
: interruptedWork.type._context
|
||||
);
|
||||
break;
|
||||
case 22:
|
||||
case 23:
|
||||
@@ -6652,8 +6687,8 @@ function safelyDetachRef(current, nearestMountedAncestor) {
|
||||
else if ("function" === typeof ref)
|
||||
try {
|
||||
ref(null);
|
||||
} catch (error$100) {
|
||||
captureCommitPhaseError(current, nearestMountedAncestor, error$100);
|
||||
} catch (error$101) {
|
||||
captureCommitPhaseError(current, nearestMountedAncestor, error$101);
|
||||
}
|
||||
else ref.current = null;
|
||||
}
|
||||
@@ -6855,11 +6890,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
|
||||
current,
|
||||
finishedRoot.__reactInternalSnapshotBeforeUpdate
|
||||
);
|
||||
} catch (error$101) {
|
||||
} catch (error$102) {
|
||||
captureCommitPhaseError(
|
||||
finishedWork,
|
||||
finishedWork.return,
|
||||
error$101
|
||||
error$102
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7452,8 +7487,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
}
|
||||
try {
|
||||
commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
|
||||
} catch (error$109) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$109);
|
||||
} catch (error$110) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$110);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -7487,8 +7522,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
finishedWork.updateQueue = null;
|
||||
try {
|
||||
flags._applyProps(flags, newProps, current);
|
||||
} catch (error$112) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$112);
|
||||
} catch (error$113) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$113);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -7524,8 +7559,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
null !== retryQueue && suspenseCallback(new Set(retryQueue));
|
||||
}
|
||||
}
|
||||
} catch (error$114) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$114);
|
||||
} catch (error$115) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$115);
|
||||
}
|
||||
flags = finishedWork.updateQueue;
|
||||
null !== flags &&
|
||||
@@ -7665,12 +7700,12 @@ function commitReconciliationEffects(finishedWork) {
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
var parent$104 = JSCompiler_inline_result.stateNode.containerInfo,
|
||||
before$105 = getHostSibling(finishedWork);
|
||||
var parent$105 = JSCompiler_inline_result.stateNode.containerInfo,
|
||||
before$106 = getHostSibling(finishedWork);
|
||||
insertOrAppendPlacementNodeIntoContainer(
|
||||
finishedWork,
|
||||
before$105,
|
||||
parent$104
|
||||
before$106,
|
||||
parent$105
|
||||
);
|
||||
break;
|
||||
default:
|
||||
@@ -8131,9 +8166,9 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
);
|
||||
break;
|
||||
case 22:
|
||||
var instance$120 = finishedWork.stateNode;
|
||||
var instance$121 = finishedWork.stateNode;
|
||||
null !== finishedWork.memoizedState
|
||||
? instance$120._visibility & 4
|
||||
? instance$121._visibility & 4
|
||||
? recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -8146,7 +8181,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork
|
||||
)
|
||||
: ((instance$120._visibility |= 4),
|
||||
: ((instance$121._visibility |= 4),
|
||||
recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -8154,7 +8189,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
committedTransitions,
|
||||
includeWorkInProgressEffects
|
||||
))
|
||||
: ((instance$120._visibility |= 4),
|
||||
: ((instance$121._visibility |= 4),
|
||||
recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -8167,7 +8202,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
commitOffscreenPassiveMountEffects(
|
||||
finishedWork.alternate,
|
||||
finishedWork,
|
||||
instance$120
|
||||
instance$121
|
||||
);
|
||||
break;
|
||||
case 24:
|
||||
@@ -8619,11 +8654,11 @@ function scheduleUpdateOnFiber(root, fiber, lane) {
|
||||
enableTransitionTracing)
|
||||
) {
|
||||
var transitionLanesMap = root.transitionLanes,
|
||||
index$6 = 31 - clz32(lane),
|
||||
transitions = transitionLanesMap[index$6];
|
||||
index$7 = 31 - clz32(lane),
|
||||
transitions = transitionLanesMap[index$7];
|
||||
null === transitions && (transitions = new Set());
|
||||
transitions.add(transition);
|
||||
transitionLanesMap[index$6] = transitions;
|
||||
transitionLanesMap[index$7] = transitions;
|
||||
}
|
||||
}
|
||||
root === workInProgressRoot &&
|
||||
@@ -8872,9 +8907,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) {
|
||||
0 < lanes;
|
||||
|
||||
) {
|
||||
var index$3 = 31 - clz32(lanes),
|
||||
lane = 1 << index$3;
|
||||
expirationTimes[index$3] = -1;
|
||||
var index$4 = 31 - clz32(lanes),
|
||||
lane = 1 << index$4;
|
||||
expirationTimes[index$4] = -1;
|
||||
lanes &= ~lane;
|
||||
}
|
||||
0 !== spawnedLane &&
|
||||
@@ -8931,9 +8966,9 @@ function prepareFreshStack(root, lanes) {
|
||||
0 < allEntangledLanes;
|
||||
|
||||
) {
|
||||
var index$1 = 31 - clz32(allEntangledLanes),
|
||||
lane = 1 << index$1;
|
||||
lanes |= root[index$1];
|
||||
var index$2 = 31 - clz32(allEntangledLanes),
|
||||
lane = 1 << index$2;
|
||||
lanes |= root[index$2];
|
||||
allEntangledLanes &= ~lane;
|
||||
}
|
||||
entangledRenderLanes = lanes;
|
||||
@@ -9029,8 +9064,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$128) {
|
||||
handleThrow(root, thrownValue$128);
|
||||
} catch (thrownValue$129) {
|
||||
handleThrow(root, thrownValue$129);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -9135,8 +9170,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$130) {
|
||||
handleThrow(root, thrownValue$130);
|
||||
} catch (thrownValue$131) {
|
||||
handleThrow(root, thrownValue$131);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -9876,7 +9911,9 @@ beginWork = function (current, workInProgress, renderLanes) {
|
||||
);
|
||||
case 10:
|
||||
a: {
|
||||
Component = workInProgress.type._context;
|
||||
Component = enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context;
|
||||
context = workInProgress.pendingProps;
|
||||
nextProps = workInProgress.memoizedProps;
|
||||
nextCache = context.value;
|
||||
@@ -9906,7 +9943,9 @@ beginWork = function (current, workInProgress, renderLanes) {
|
||||
return workInProgress;
|
||||
case 9:
|
||||
return (
|
||||
(context = workInProgress.type),
|
||||
(context = enableRenderableContext
|
||||
? workInProgress.type._context
|
||||
: workInProgress.type),
|
||||
(Component = workInProgress.pendingProps.children),
|
||||
prepareToReadContext(workInProgress, renderLanes),
|
||||
(context = readContext(context)),
|
||||
@@ -10263,11 +10302,18 @@ function createFiberFromTypeAndProps(
|
||||
if ("object" === typeof type && null !== type)
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
fiberTag = 10;
|
||||
break a;
|
||||
if (!enableRenderableContext) {
|
||||
fiberTag = 10;
|
||||
break a;
|
||||
}
|
||||
case REACT_CONTEXT_TYPE:
|
||||
fiberTag = 9;
|
||||
fiberTag = enableRenderableContext ? 10 : 9;
|
||||
break a;
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = 9;
|
||||
break a;
|
||||
}
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = 11;
|
||||
break a;
|
||||
@@ -10583,19 +10629,19 @@ var slice = Array.prototype.slice,
|
||||
};
|
||||
return Text;
|
||||
})(React.Component),
|
||||
devToolsConfig$jscomp$inline_1153 = {
|
||||
devToolsConfig$jscomp$inline_1154 = {
|
||||
findFiberByHostInstance: function () {
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-feceed69",
|
||||
version: "18.3.0-www-classic-c40bd6a3",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1327 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1153.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1153.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1153.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1153.rendererConfig,
|
||||
var internals$jscomp$inline_1328 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1154.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1154.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1154.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1154.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -10612,26 +10658,26 @@ var internals$jscomp$inline_1327 = {
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1153.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1154.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-feceed69"
|
||||
reconcilerVersion: "18.3.0-www-classic-c40bd6a3"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1328 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1329 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1328.isDisabled &&
|
||||
hook$jscomp$inline_1328.supportsFiber
|
||||
!hook$jscomp$inline_1329.isDisabled &&
|
||||
hook$jscomp$inline_1329.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1328.inject(
|
||||
internals$jscomp$inline_1327
|
||||
(rendererID = hook$jscomp$inline_1329.inject(
|
||||
internals$jscomp$inline_1328
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1328);
|
||||
(injectedHook = hook$jscomp$inline_1329);
|
||||
} catch (err) {}
|
||||
}
|
||||
var Path = Mode$1.Path;
|
||||
|
||||
@@ -85,12 +85,14 @@ var ReactSharedInternals =
|
||||
transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs,
|
||||
enableInfiniteRenderLoopDetection =
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
|
||||
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -160,36 +162,36 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
||||
}
|
||||
if (a.return !== b.return) (a = parentA), (b = parentB);
|
||||
else {
|
||||
for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {
|
||||
if (child$0 === a) {
|
||||
for (var didFindChild = !1, child$1 = parentA.child; child$1; ) {
|
||||
if (child$1 === a) {
|
||||
didFindChild = !0;
|
||||
a = parentA;
|
||||
b = parentB;
|
||||
break;
|
||||
}
|
||||
if (child$0 === b) {
|
||||
if (child$1 === b) {
|
||||
didFindChild = !0;
|
||||
b = parentA;
|
||||
a = parentB;
|
||||
break;
|
||||
}
|
||||
child$0 = child$0.sibling;
|
||||
child$1 = child$1.sibling;
|
||||
}
|
||||
if (!didFindChild) {
|
||||
for (child$0 = parentB.child; child$0; ) {
|
||||
if (child$0 === a) {
|
||||
for (child$1 = parentB.child; child$1; ) {
|
||||
if (child$1 === a) {
|
||||
didFindChild = !0;
|
||||
a = parentB;
|
||||
b = parentA;
|
||||
break;
|
||||
}
|
||||
if (child$0 === b) {
|
||||
if (child$1 === b) {
|
||||
didFindChild = !0;
|
||||
b = parentB;
|
||||
a = parentA;
|
||||
break;
|
||||
}
|
||||
child$0 = child$0.sibling;
|
||||
child$1 = child$1.sibling;
|
||||
}
|
||||
if (!didFindChild) throw Error(formatProdErrorMessage(189));
|
||||
}
|
||||
@@ -461,18 +463,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) {
|
||||
0 < noLongerPendingLanes;
|
||||
|
||||
) {
|
||||
var index$4 = 31 - clz32(noLongerPendingLanes),
|
||||
lane = 1 << index$4;
|
||||
remainingLanes[index$4] = 0;
|
||||
expirationTimes[index$4] = -1;
|
||||
var hiddenUpdatesForLane = hiddenUpdates[index$4];
|
||||
var index$5 = 31 - clz32(noLongerPendingLanes),
|
||||
lane = 1 << index$5;
|
||||
remainingLanes[index$5] = 0;
|
||||
expirationTimes[index$5] = -1;
|
||||
var hiddenUpdatesForLane = hiddenUpdates[index$5];
|
||||
if (null !== hiddenUpdatesForLane)
|
||||
for (
|
||||
hiddenUpdates[index$4] = null, index$4 = 0;
|
||||
index$4 < hiddenUpdatesForLane.length;
|
||||
index$4++
|
||||
hiddenUpdates[index$5] = null, index$5 = 0;
|
||||
index$5 < hiddenUpdatesForLane.length;
|
||||
index$5++
|
||||
) {
|
||||
var update = hiddenUpdatesForLane[index$4];
|
||||
var update = hiddenUpdatesForLane[index$5];
|
||||
null !== update && (update.lane &= -536870913);
|
||||
}
|
||||
noLongerPendingLanes &= ~lane;
|
||||
@@ -492,21 +494,21 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
for (root = root.entanglements; rootEntangledLanes; ) {
|
||||
var index$5 = 31 - clz32(rootEntangledLanes),
|
||||
lane = 1 << index$5;
|
||||
(lane & entangledLanes) | (root[index$5] & entangledLanes) &&
|
||||
(root[index$5] |= entangledLanes);
|
||||
var index$6 = 31 - clz32(rootEntangledLanes),
|
||||
lane = 1 << index$6;
|
||||
(lane & entangledLanes) | (root[index$6] & entangledLanes) &&
|
||||
(root[index$6] |= entangledLanes);
|
||||
rootEntangledLanes &= ~lane;
|
||||
}
|
||||
}
|
||||
function getTransitionsForLanes(root, lanes) {
|
||||
if (!enableTransitionTracing) return null;
|
||||
for (var transitionsForLanes = []; 0 < lanes; ) {
|
||||
var index$7 = 31 - clz32(lanes),
|
||||
lane = 1 << index$7;
|
||||
index$7 = root.transitionLanes[index$7];
|
||||
null !== index$7 &&
|
||||
index$7.forEach(function (transition) {
|
||||
var index$8 = 31 - clz32(lanes),
|
||||
lane = 1 << index$8;
|
||||
index$8 = root.transitionLanes[index$8];
|
||||
null !== index$8 &&
|
||||
index$8.forEach(function (transition) {
|
||||
transitionsForLanes.push(transition);
|
||||
});
|
||||
lanes &= ~lane;
|
||||
@@ -516,10 +518,10 @@ function getTransitionsForLanes(root, lanes) {
|
||||
function clearTransitionsForLanes(root, lanes) {
|
||||
if (enableTransitionTracing)
|
||||
for (; 0 < lanes; ) {
|
||||
var index$8 = 31 - clz32(lanes),
|
||||
lane = 1 << index$8;
|
||||
null !== root.transitionLanes[index$8] &&
|
||||
(root.transitionLanes[index$8] = null);
|
||||
var index$9 = 31 - clz32(lanes),
|
||||
lane = 1 << index$9;
|
||||
null !== root.transitionLanes[index$9] &&
|
||||
(root.transitionLanes[index$9] = null);
|
||||
lanes &= ~lane;
|
||||
}
|
||||
}
|
||||
@@ -740,16 +742,16 @@ function describeNativeComponentFrame(fn, construct) {
|
||||
} else {
|
||||
try {
|
||||
Fake.call();
|
||||
} catch (x$9) {
|
||||
control = x$9;
|
||||
} catch (x$10) {
|
||||
control = x$10;
|
||||
}
|
||||
fn.call(Fake.prototype);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x$10) {
|
||||
control = x$10;
|
||||
} catch (x$11) {
|
||||
control = x$11;
|
||||
}
|
||||
(Fake = fn()) &&
|
||||
"function" === typeof Fake.catch &&
|
||||
@@ -1011,35 +1013,35 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) {
|
||||
var didPerformSomeWork = !1;
|
||||
for (var root = firstScheduledRoot; null !== root; ) {
|
||||
if (!onlyLegacy || 0 === root.tag) {
|
||||
var workInProgressRootRenderLanes$12 = workInProgressRootRenderLanes,
|
||||
var workInProgressRootRenderLanes$13 = workInProgressRootRenderLanes,
|
||||
nextLanes = getNextLanes(
|
||||
root,
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes$12 : 0
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes$13 : 0
|
||||
);
|
||||
if (0 !== (nextLanes & 3))
|
||||
try {
|
||||
didPerformSomeWork = !0;
|
||||
workInProgressRootRenderLanes$12 = root;
|
||||
workInProgressRootRenderLanes$13 = root;
|
||||
if (0 !== (executionContext & 6))
|
||||
throw Error(formatProdErrorMessage(327));
|
||||
if (!flushPassiveEffects()) {
|
||||
var exitStatus = renderRootSync(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
nextLanes
|
||||
);
|
||||
if (
|
||||
0 !== workInProgressRootRenderLanes$12.tag &&
|
||||
0 !== workInProgressRootRenderLanes$13.tag &&
|
||||
2 === exitStatus
|
||||
) {
|
||||
var originallyAttemptedLanes = nextLanes,
|
||||
errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((nextLanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
originallyAttemptedLanes,
|
||||
errorRetryLanes
|
||||
)));
|
||||
@@ -1047,34 +1049,34 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) {
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originallyAttemptedLanes = workInProgressRootFatalError),
|
||||
prepareFreshStack(workInProgressRootRenderLanes$12, 0),
|
||||
prepareFreshStack(workInProgressRootRenderLanes$13, 0),
|
||||
markRootSuspended(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
nextLanes,
|
||||
0
|
||||
),
|
||||
ensureRootIsScheduled(workInProgressRootRenderLanes$12),
|
||||
ensureRootIsScheduled(workInProgressRootRenderLanes$13),
|
||||
originallyAttemptedLanes)
|
||||
);
|
||||
6 === exitStatus
|
||||
? markRootSuspended(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
nextLanes,
|
||||
workInProgressDeferredLane
|
||||
)
|
||||
: ((workInProgressRootRenderLanes$12.finishedWork =
|
||||
workInProgressRootRenderLanes$12.current.alternate),
|
||||
(workInProgressRootRenderLanes$12.finishedLanes =
|
||||
: ((workInProgressRootRenderLanes$13.finishedWork =
|
||||
workInProgressRootRenderLanes$13.current.alternate),
|
||||
(workInProgressRootRenderLanes$13.finishedLanes =
|
||||
nextLanes),
|
||||
commitRoot(
|
||||
workInProgressRootRenderLanes$12,
|
||||
workInProgressRootRenderLanes$13,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
workInProgressRootDidIncludeRecursiveRenderUpdate,
|
||||
workInProgressDeferredLane
|
||||
));
|
||||
}
|
||||
ensureRootIsScheduled(workInProgressRootRenderLanes$12);
|
||||
ensureRootIsScheduled(workInProgressRootRenderLanes$13);
|
||||
} catch (error) {
|
||||
null === errors ? (errors = [error]) : errors.push(error);
|
||||
}
|
||||
@@ -1130,12 +1132,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
|
||||
0 < pendingLanes;
|
||||
|
||||
) {
|
||||
var index$2 = 31 - clz32(pendingLanes),
|
||||
lane = 1 << index$2,
|
||||
expirationTime = expirationTimes[index$2];
|
||||
var index$3 = 31 - clz32(pendingLanes),
|
||||
lane = 1 << index$3,
|
||||
expirationTime = expirationTimes[index$3];
|
||||
if (-1 === expirationTime) {
|
||||
if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
|
||||
expirationTimes[index$2] = computeExpirationTime(lane, currentTime);
|
||||
expirationTimes[index$3] = computeExpirationTime(lane, currentTime);
|
||||
} else expirationTime <= currentTime && (root.expiredLanes |= lane);
|
||||
pendingLanes &= ~lane;
|
||||
}
|
||||
@@ -2674,7 +2676,7 @@ function updateReducerImpl(hook, current, reducer) {
|
||||
var newBaseQueueFirst = (baseFirst = null),
|
||||
newBaseQueueLast = null,
|
||||
update = current,
|
||||
didReadFromEntangledAsyncAction$31 = !1;
|
||||
didReadFromEntangledAsyncAction$32 = !1;
|
||||
do {
|
||||
var updateLane = update.lane & -536870913;
|
||||
if (
|
||||
@@ -2687,7 +2689,7 @@ function updateReducerImpl(hook, current, reducer) {
|
||||
if ((renderLanes & revertLane) === revertLane) {
|
||||
update = update.next;
|
||||
revertLane === currentEntangledLane &&
|
||||
(didReadFromEntangledAsyncAction$31 = !0);
|
||||
(didReadFromEntangledAsyncAction$32 = !0);
|
||||
continue;
|
||||
} else
|
||||
(updateLane = {
|
||||
@@ -2716,7 +2718,7 @@ function updateReducerImpl(hook, current, reducer) {
|
||||
next: null
|
||||
}),
|
||||
updateLane === currentEntangledLane &&
|
||||
(didReadFromEntangledAsyncAction$31 = !0);
|
||||
(didReadFromEntangledAsyncAction$32 = !0);
|
||||
updateLane = update.action;
|
||||
shouldDoubleInvokeUserFnsInHooksDEV &&
|
||||
reducer(pendingQueue, updateLane);
|
||||
@@ -2746,7 +2748,7 @@ function updateReducerImpl(hook, current, reducer) {
|
||||
if (
|
||||
!objectIs(pendingQueue, hook.memoizedState) &&
|
||||
((didReceiveUpdate = !0),
|
||||
didReadFromEntangledAsyncAction$31 &&
|
||||
didReadFromEntangledAsyncAction$32 &&
|
||||
((reducer = currentEntangledActionThenable), null !== reducer))
|
||||
)
|
||||
throw reducer;
|
||||
@@ -5304,7 +5306,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
|
||||
case 10:
|
||||
pushProvider(
|
||||
workInProgress,
|
||||
workInProgress.type._context,
|
||||
enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context,
|
||||
workInProgress.memoizedProps.value
|
||||
);
|
||||
break;
|
||||
@@ -5555,7 +5559,9 @@ function propagateParentContextChanges(
|
||||
if (null === currentParent) throw Error(formatProdErrorMessage(387));
|
||||
currentParent = currentParent.memoizedProps;
|
||||
if (null !== currentParent) {
|
||||
var context = parent.type._context;
|
||||
var context = enableRenderableContext
|
||||
? parent.type
|
||||
: parent.type._context;
|
||||
objectIs(parent.pendingProps.value, currentParent.value) ||
|
||||
(null !== current ? current.push(context) : (current = [context]));
|
||||
}
|
||||
@@ -5782,7 +5788,10 @@ function collectNearestChildContextValues(
|
||||
var node = startingChild,
|
||||
context = context$jscomp$0,
|
||||
childContextValues = childContextValues$jscomp$0;
|
||||
if (10 === node.tag && node.type._context === context)
|
||||
if (
|
||||
10 === node.tag &&
|
||||
(enableRenderableContext ? node.type : node.type._context) === context
|
||||
)
|
||||
childContextValues.push(node.memoizedProps.value);
|
||||
else {
|
||||
var child = node.child;
|
||||
@@ -5844,14 +5853,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
|
||||
break;
|
||||
case "collapsed":
|
||||
lastTailNode = renderState.tail;
|
||||
for (var lastTailNode$77 = null; null !== lastTailNode; )
|
||||
null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode),
|
||||
for (var lastTailNode$78 = null; null !== lastTailNode; )
|
||||
null !== lastTailNode.alternate && (lastTailNode$78 = lastTailNode),
|
||||
(lastTailNode = lastTailNode.sibling);
|
||||
null === lastTailNode$77
|
||||
null === lastTailNode$78
|
||||
? hasRenderedATailFallback || null === renderState.tail
|
||||
? (renderState.tail = null)
|
||||
: (renderState.tail.sibling = null)
|
||||
: (lastTailNode$77.sibling = null);
|
||||
: (lastTailNode$78.sibling = null);
|
||||
}
|
||||
}
|
||||
function bubbleProperties(completedWork) {
|
||||
@@ -5861,19 +5870,19 @@ function bubbleProperties(completedWork) {
|
||||
newChildLanes = 0,
|
||||
subtreeFlags = 0;
|
||||
if (didBailout)
|
||||
for (var child$78 = completedWork.child; null !== child$78; )
|
||||
(newChildLanes |= child$78.lanes | child$78.childLanes),
|
||||
(subtreeFlags |= child$78.subtreeFlags & 31457280),
|
||||
(subtreeFlags |= child$78.flags & 31457280),
|
||||
(child$78.return = completedWork),
|
||||
(child$78 = child$78.sibling);
|
||||
for (var child$79 = completedWork.child; null !== child$79; )
|
||||
(newChildLanes |= child$79.lanes | child$79.childLanes),
|
||||
(subtreeFlags |= child$79.subtreeFlags & 31457280),
|
||||
(subtreeFlags |= child$79.flags & 31457280),
|
||||
(child$79.return = completedWork),
|
||||
(child$79 = child$79.sibling);
|
||||
else
|
||||
for (child$78 = completedWork.child; null !== child$78; )
|
||||
(newChildLanes |= child$78.lanes | child$78.childLanes),
|
||||
(subtreeFlags |= child$78.subtreeFlags),
|
||||
(subtreeFlags |= child$78.flags),
|
||||
(child$78.return = completedWork),
|
||||
(child$78 = child$78.sibling);
|
||||
for (child$79 = completedWork.child; null !== child$79; )
|
||||
(newChildLanes |= child$79.lanes | child$79.childLanes),
|
||||
(subtreeFlags |= child$79.subtreeFlags),
|
||||
(subtreeFlags |= child$79.flags),
|
||||
(child$79.return = completedWork),
|
||||
(child$79 = child$79.sibling);
|
||||
completedWork.subtreeFlags |= subtreeFlags;
|
||||
completedWork.childLanes = newChildLanes;
|
||||
return didBailout;
|
||||
@@ -6044,11 +6053,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
null !== newProps.alternate.memoizedState &&
|
||||
null !== newProps.alternate.memoizedState.cachePool &&
|
||||
(instance = newProps.alternate.memoizedState.cachePool.pool);
|
||||
var cache$82 = null;
|
||||
var cache$83 = null;
|
||||
null !== newProps.memoizedState &&
|
||||
null !== newProps.memoizedState.cachePool &&
|
||||
(cache$82 = newProps.memoizedState.cachePool.pool);
|
||||
cache$82 !== instance && (newProps.flags |= 2048);
|
||||
(cache$83 = newProps.memoizedState.cachePool.pool);
|
||||
cache$83 !== instance && (newProps.flags |= 2048);
|
||||
}
|
||||
renderLanes !== current &&
|
||||
(enableTransitionTracing && (workInProgress.child.flags |= 2048),
|
||||
@@ -6063,7 +6072,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
return popHostContainer(), bubbleProperties(workInProgress), null;
|
||||
case 10:
|
||||
return (
|
||||
popProvider(workInProgress.type._context),
|
||||
popProvider(
|
||||
enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context
|
||||
),
|
||||
bubbleProperties(workInProgress),
|
||||
null
|
||||
);
|
||||
@@ -6074,8 +6087,8 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
instance = workInProgress.memoizedState;
|
||||
if (null === instance) return bubbleProperties(workInProgress), null;
|
||||
newProps = 0 !== (workInProgress.flags & 128);
|
||||
cache$82 = instance.rendering;
|
||||
if (null === cache$82)
|
||||
cache$83 = instance.rendering;
|
||||
if (null === cache$83)
|
||||
if (newProps) cutOffTailIfNeeded(instance, !1);
|
||||
else {
|
||||
if (
|
||||
@@ -6083,11 +6096,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
(null !== current && 0 !== (current.flags & 128))
|
||||
)
|
||||
for (current = workInProgress.child; null !== current; ) {
|
||||
cache$82 = findFirstSuspended(current);
|
||||
if (null !== cache$82) {
|
||||
cache$83 = findFirstSuspended(current);
|
||||
if (null !== cache$83) {
|
||||
workInProgress.flags |= 128;
|
||||
cutOffTailIfNeeded(instance, !1);
|
||||
current = cache$82.updateQueue;
|
||||
current = cache$83.updateQueue;
|
||||
workInProgress.updateQueue = current;
|
||||
scheduleRetryEffect(workInProgress, current);
|
||||
workInProgress.subtreeFlags = 0;
|
||||
@@ -6112,7 +6125,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
}
|
||||
else {
|
||||
if (!newProps)
|
||||
if (((current = findFirstSuspended(cache$82)), null !== current)) {
|
||||
if (((current = findFirstSuspended(cache$83)), null !== current)) {
|
||||
if (
|
||||
((workInProgress.flags |= 128),
|
||||
(newProps = !0),
|
||||
@@ -6122,7 +6135,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
cutOffTailIfNeeded(instance, !0),
|
||||
null === instance.tail &&
|
||||
"hidden" === instance.tailMode &&
|
||||
!cache$82.alternate)
|
||||
!cache$83.alternate)
|
||||
)
|
||||
return bubbleProperties(workInProgress), null;
|
||||
} else
|
||||
@@ -6134,13 +6147,13 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
cutOffTailIfNeeded(instance, !1),
|
||||
(workInProgress.lanes = 4194304));
|
||||
instance.isBackwards
|
||||
? ((cache$82.sibling = workInProgress.child),
|
||||
(workInProgress.child = cache$82))
|
||||
? ((cache$83.sibling = workInProgress.child),
|
||||
(workInProgress.child = cache$83))
|
||||
: ((current = instance.last),
|
||||
null !== current
|
||||
? (current.sibling = cache$82)
|
||||
: (workInProgress.child = cache$82),
|
||||
(instance.last = cache$82));
|
||||
? (current.sibling = cache$83)
|
||||
: (workInProgress.child = cache$83),
|
||||
(instance.last = cache$83));
|
||||
}
|
||||
if (null !== instance.tail)
|
||||
return (
|
||||
@@ -6274,7 +6287,14 @@ function unwindWork(current, workInProgress) {
|
||||
case 4:
|
||||
return popHostContainer(), null;
|
||||
case 10:
|
||||
return popProvider(workInProgress.type._context), null;
|
||||
return (
|
||||
popProvider(
|
||||
enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context
|
||||
),
|
||||
null
|
||||
);
|
||||
case 22:
|
||||
case 23:
|
||||
return (
|
||||
@@ -6325,7 +6345,11 @@ function unwindInterruptedWork(current, interruptedWork) {
|
||||
pop(suspenseStackCursor);
|
||||
break;
|
||||
case 10:
|
||||
popProvider(interruptedWork.type._context);
|
||||
popProvider(
|
||||
enableRenderableContext
|
||||
? interruptedWork.type
|
||||
: interruptedWork.type._context
|
||||
);
|
||||
break;
|
||||
case 22:
|
||||
case 23:
|
||||
@@ -6389,8 +6413,8 @@ function safelyDetachRef(current, nearestMountedAncestor) {
|
||||
else if ("function" === typeof ref)
|
||||
try {
|
||||
ref(null);
|
||||
} catch (error$99) {
|
||||
captureCommitPhaseError(current, nearestMountedAncestor, error$99);
|
||||
} catch (error$100) {
|
||||
captureCommitPhaseError(current, nearestMountedAncestor, error$100);
|
||||
}
|
||||
else ref.current = null;
|
||||
}
|
||||
@@ -6592,11 +6616,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
|
||||
current,
|
||||
finishedRoot.__reactInternalSnapshotBeforeUpdate
|
||||
);
|
||||
} catch (error$100) {
|
||||
} catch (error$101) {
|
||||
captureCommitPhaseError(
|
||||
finishedWork,
|
||||
finishedWork.return,
|
||||
error$100
|
||||
error$101
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7189,8 +7213,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
}
|
||||
try {
|
||||
commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
|
||||
} catch (error$108) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$108);
|
||||
} catch (error$109) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$109);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -7224,8 +7248,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
finishedWork.updateQueue = null;
|
||||
try {
|
||||
flags._applyProps(flags, newProps, current);
|
||||
} catch (error$111) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$111);
|
||||
} catch (error$112) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$112);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -7261,8 +7285,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
null !== retryQueue && suspenseCallback(new Set(retryQueue));
|
||||
}
|
||||
}
|
||||
} catch (error$113) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$113);
|
||||
} catch (error$114) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$114);
|
||||
}
|
||||
flags = finishedWork.updateQueue;
|
||||
null !== flags &&
|
||||
@@ -7402,12 +7426,12 @@ function commitReconciliationEffects(finishedWork) {
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
var parent$103 = JSCompiler_inline_result.stateNode.containerInfo,
|
||||
before$104 = getHostSibling(finishedWork);
|
||||
var parent$104 = JSCompiler_inline_result.stateNode.containerInfo,
|
||||
before$105 = getHostSibling(finishedWork);
|
||||
insertOrAppendPlacementNodeIntoContainer(
|
||||
finishedWork,
|
||||
before$104,
|
||||
parent$103
|
||||
before$105,
|
||||
parent$104
|
||||
);
|
||||
break;
|
||||
default:
|
||||
@@ -7868,9 +7892,9 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
);
|
||||
break;
|
||||
case 22:
|
||||
var instance$119 = finishedWork.stateNode;
|
||||
var instance$120 = finishedWork.stateNode;
|
||||
null !== finishedWork.memoizedState
|
||||
? instance$119._visibility & 4
|
||||
? instance$120._visibility & 4
|
||||
? recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -7883,7 +7907,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork
|
||||
)
|
||||
: ((instance$119._visibility |= 4),
|
||||
: ((instance$120._visibility |= 4),
|
||||
recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -7891,7 +7915,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
committedTransitions,
|
||||
includeWorkInProgressEffects
|
||||
))
|
||||
: ((instance$119._visibility |= 4),
|
||||
: ((instance$120._visibility |= 4),
|
||||
recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -7904,7 +7928,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
commitOffscreenPassiveMountEffects(
|
||||
finishedWork.alternate,
|
||||
finishedWork,
|
||||
instance$119
|
||||
instance$120
|
||||
);
|
||||
break;
|
||||
case 24:
|
||||
@@ -8356,11 +8380,11 @@ function scheduleUpdateOnFiber(root, fiber, lane) {
|
||||
enableTransitionTracing)
|
||||
) {
|
||||
var transitionLanesMap = root.transitionLanes,
|
||||
index$6 = 31 - clz32(lane),
|
||||
transitions = transitionLanesMap[index$6];
|
||||
index$7 = 31 - clz32(lane),
|
||||
transitions = transitionLanesMap[index$7];
|
||||
null === transitions && (transitions = new Set());
|
||||
transitions.add(transition);
|
||||
transitionLanesMap[index$6] = transitions;
|
||||
transitionLanesMap[index$7] = transitions;
|
||||
}
|
||||
}
|
||||
root === workInProgressRoot &&
|
||||
@@ -8609,9 +8633,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) {
|
||||
0 < lanes;
|
||||
|
||||
) {
|
||||
var index$3 = 31 - clz32(lanes),
|
||||
lane = 1 << index$3;
|
||||
expirationTimes[index$3] = -1;
|
||||
var index$4 = 31 - clz32(lanes),
|
||||
lane = 1 << index$4;
|
||||
expirationTimes[index$4] = -1;
|
||||
lanes &= ~lane;
|
||||
}
|
||||
0 !== spawnedLane &&
|
||||
@@ -8668,9 +8692,9 @@ function prepareFreshStack(root, lanes) {
|
||||
0 < allEntangledLanes;
|
||||
|
||||
) {
|
||||
var index$1 = 31 - clz32(allEntangledLanes),
|
||||
lane = 1 << index$1;
|
||||
lanes |= root[index$1];
|
||||
var index$2 = 31 - clz32(allEntangledLanes),
|
||||
lane = 1 << index$2;
|
||||
lanes |= root[index$2];
|
||||
allEntangledLanes &= ~lane;
|
||||
}
|
||||
entangledRenderLanes = lanes;
|
||||
@@ -8766,8 +8790,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$127) {
|
||||
handleThrow(root, thrownValue$127);
|
||||
} catch (thrownValue$128) {
|
||||
handleThrow(root, thrownValue$128);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -8872,8 +8896,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$129) {
|
||||
handleThrow(root, thrownValue$129);
|
||||
} catch (thrownValue$130) {
|
||||
handleThrow(root, thrownValue$130);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -9596,7 +9620,9 @@ beginWork = function (current, workInProgress, renderLanes) {
|
||||
);
|
||||
case 10:
|
||||
a: {
|
||||
Component = workInProgress.type._context;
|
||||
Component = enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context;
|
||||
init = workInProgress.pendingProps;
|
||||
nextProps = workInProgress.memoizedProps;
|
||||
nextCache = init.value;
|
||||
@@ -9618,7 +9644,9 @@ beginWork = function (current, workInProgress, renderLanes) {
|
||||
return workInProgress;
|
||||
case 9:
|
||||
return (
|
||||
(init = workInProgress.type),
|
||||
(init = enableRenderableContext
|
||||
? workInProgress.type._context
|
||||
: workInProgress.type),
|
||||
(Component = workInProgress.pendingProps.children),
|
||||
prepareToReadContext(workInProgress, renderLanes),
|
||||
(init = readContext(init)),
|
||||
@@ -9969,11 +9997,18 @@ function createFiberFromTypeAndProps(
|
||||
if ("object" === typeof type && null !== type)
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
fiberTag = 10;
|
||||
break a;
|
||||
if (!enableRenderableContext) {
|
||||
fiberTag = 10;
|
||||
break a;
|
||||
}
|
||||
case REACT_CONTEXT_TYPE:
|
||||
fiberTag = 9;
|
||||
fiberTag = enableRenderableContext ? 10 : 9;
|
||||
break a;
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = 9;
|
||||
break a;
|
||||
}
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = 11;
|
||||
break a;
|
||||
@@ -10249,19 +10284,19 @@ var slice = Array.prototype.slice,
|
||||
};
|
||||
return Text;
|
||||
})(React.Component),
|
||||
devToolsConfig$jscomp$inline_1133 = {
|
||||
devToolsConfig$jscomp$inline_1134 = {
|
||||
findFiberByHostInstance: function () {
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-b264c748",
|
||||
version: "18.3.0-www-modern-db363cc4",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1307 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1133.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1133.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1133.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1133.rendererConfig,
|
||||
var internals$jscomp$inline_1308 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1134.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1134.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1134.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1134.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -10278,26 +10313,26 @@ var internals$jscomp$inline_1307 = {
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1133.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1134.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-b264c748"
|
||||
reconcilerVersion: "18.3.0-www-modern-db363cc4"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1308 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1309 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1308.isDisabled &&
|
||||
hook$jscomp$inline_1308.supportsFiber
|
||||
!hook$jscomp$inline_1309.isDisabled &&
|
||||
hook$jscomp$inline_1309.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1308.inject(
|
||||
internals$jscomp$inline_1307
|
||||
(rendererID = hook$jscomp$inline_1309.inject(
|
||||
internals$jscomp$inline_1308
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1308);
|
||||
(injectedHook = hook$jscomp$inline_1309);
|
||||
} catch (err) {}
|
||||
}
|
||||
var Path = Mode$1.Path;
|
||||
|
||||
@@ -153,7 +153,8 @@ if (__DEV__) {
|
||||
transitionLaneExpirationMs =
|
||||
dynamicFeatureFlags.transitionLaneExpirationMs,
|
||||
enableInfiniteRenderLoopDetection =
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, false is used for a new modern build.
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build.
|
||||
var enableProfilerTimer = true;
|
||||
var enableProfilerCommitHooks = true;
|
||||
var enableProfilerNestedUpdatePhase = true;
|
||||
@@ -204,7 +205,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -316,13 +319,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName$1(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName$1(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
@@ -376,12 +396,22 @@ if (__DEV__) {
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
return getContextName(_context) + ".Provider";
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
@@ -18003,8 +18033,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -18018,11 +18047,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -22703,8 +22728,14 @@ if (__DEV__) {
|
||||
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
|
||||
|
||||
function updateContextProvider(current, workInProgress, renderLanes) {
|
||||
var providerType = workInProgress.type;
|
||||
var context = providerType._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
var newProps = workInProgress.pendingProps;
|
||||
var oldProps = workInProgress.memoizedProps;
|
||||
var newValue = newProps.value;
|
||||
@@ -22764,34 +22795,19 @@ if (__DEV__) {
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
var hasWarnedAboutUsingContextAsConsumer = false;
|
||||
|
||||
function updateContextConsumer(current, workInProgress, renderLanes) {
|
||||
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
var context;
|
||||
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
if (enableRenderableContext) {
|
||||
var consumerType = workInProgress.type;
|
||||
context = consumerType._context;
|
||||
} else {
|
||||
context = workInProgress.type;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
{
|
||||
if (context._context !== undefined) {
|
||||
context = context._context;
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23037,7 +23053,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider: {
|
||||
var newValue = workInProgress.memoizedProps.value;
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
pushProvider(workInProgress, context, newValue);
|
||||
break;
|
||||
}
|
||||
@@ -24039,8 +24062,14 @@ if (__DEV__) {
|
||||
var oldProps = currentParent.memoizedProps;
|
||||
|
||||
if (oldProps !== null) {
|
||||
var providerType = parent.type;
|
||||
var context = providerType._context;
|
||||
var context = void 0;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = parent.type;
|
||||
} else {
|
||||
context = parent.type._context;
|
||||
}
|
||||
|
||||
var newProps = parent.pendingProps;
|
||||
var newValue = newProps.value;
|
||||
var oldValue = oldProps.value;
|
||||
@@ -24581,7 +24610,10 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
function collectNearestContextValues(node, context, childContextValues) {
|
||||
if (node.tag === ContextProvider && node.type._context === context) {
|
||||
if (
|
||||
node.tag === ContextProvider &&
|
||||
(enableRenderableContext ? node.type : node.type._context) === context
|
||||
) {
|
||||
var contextValue = node.memoizedProps.value;
|
||||
childContextValues.push(contextValue);
|
||||
} else {
|
||||
@@ -25658,7 +25690,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider:
|
||||
// Pop provider fiber
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
bubbleProperties(workInProgress);
|
||||
return null;
|
||||
@@ -26149,7 +26188,14 @@ if (__DEV__) {
|
||||
return null;
|
||||
|
||||
case ContextProvider:
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
return null;
|
||||
|
||||
@@ -26247,7 +26293,14 @@ if (__DEV__) {
|
||||
break;
|
||||
|
||||
case ContextProvider:
|
||||
var context = interruptedWork.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = interruptedWork.type;
|
||||
} else {
|
||||
context = interruptedWork.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, interruptedWork);
|
||||
break;
|
||||
|
||||
@@ -35570,13 +35623,29 @@ if (__DEV__) {
|
||||
if (typeof type === "object" && type !== null) {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
if (!enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
// This is a consumer
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
} else {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = ForwardRef;
|
||||
@@ -36007,7 +36076,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-a4c6896e";
|
||||
var ReactVersion = "18.3.0-www-classic-768fda8b";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -139,7 +139,8 @@ if (__DEV__) {
|
||||
transitionLaneExpirationMs =
|
||||
dynamicFeatureFlags.transitionLaneExpirationMs,
|
||||
enableInfiniteRenderLoopDetection =
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, true is used for a new modern build.
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build.
|
||||
var enableProfilerTimer = true;
|
||||
var enableProfilerCommitHooks = true;
|
||||
var enableProfilerNestedUpdatePhase = true;
|
||||
@@ -266,7 +267,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -3473,13 +3476,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName$1(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName$1(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
@@ -3533,12 +3553,22 @@ if (__DEV__) {
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
return getContextName(_context) + ".Provider";
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
@@ -17929,8 +17959,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -17944,11 +17973,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -22568,8 +22593,14 @@ if (__DEV__) {
|
||||
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
|
||||
|
||||
function updateContextProvider(current, workInProgress, renderLanes) {
|
||||
var providerType = workInProgress.type;
|
||||
var context = providerType._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
var newProps = workInProgress.pendingProps;
|
||||
var oldProps = workInProgress.memoizedProps;
|
||||
var newValue = newProps.value;
|
||||
@@ -22629,34 +22660,19 @@ if (__DEV__) {
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
var hasWarnedAboutUsingContextAsConsumer = false;
|
||||
|
||||
function updateContextConsumer(current, workInProgress, renderLanes) {
|
||||
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
var context;
|
||||
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
if (enableRenderableContext) {
|
||||
var consumerType = workInProgress.type;
|
||||
context = consumerType._context;
|
||||
} else {
|
||||
context = workInProgress.type;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
{
|
||||
if (context._context !== undefined) {
|
||||
context = context._context;
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22896,7 +22912,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider: {
|
||||
var newValue = workInProgress.memoizedProps.value;
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
pushProvider(workInProgress, context, newValue);
|
||||
break;
|
||||
}
|
||||
@@ -23898,8 +23921,14 @@ if (__DEV__) {
|
||||
var oldProps = currentParent.memoizedProps;
|
||||
|
||||
if (oldProps !== null) {
|
||||
var providerType = parent.type;
|
||||
var context = providerType._context;
|
||||
var context = void 0;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = parent.type;
|
||||
} else {
|
||||
context = parent.type._context;
|
||||
}
|
||||
|
||||
var newProps = parent.pendingProps;
|
||||
var newValue = newProps.value;
|
||||
var oldValue = oldProps.value;
|
||||
@@ -24440,7 +24469,10 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
function collectNearestContextValues(node, context, childContextValues) {
|
||||
if (node.tag === ContextProvider && node.type._context === context) {
|
||||
if (
|
||||
node.tag === ContextProvider &&
|
||||
(enableRenderableContext ? node.type : node.type._context) === context
|
||||
) {
|
||||
var contextValue = node.memoizedProps.value;
|
||||
childContextValues.push(contextValue);
|
||||
} else {
|
||||
@@ -25510,7 +25542,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider:
|
||||
// Pop provider fiber
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
bubbleProperties(workInProgress);
|
||||
return null;
|
||||
@@ -25986,7 +26025,14 @@ if (__DEV__) {
|
||||
return null;
|
||||
|
||||
case ContextProvider:
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
return null;
|
||||
|
||||
@@ -26077,7 +26123,14 @@ if (__DEV__) {
|
||||
break;
|
||||
|
||||
case ContextProvider:
|
||||
var context = interruptedWork.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = interruptedWork.type;
|
||||
} else {
|
||||
context = interruptedWork.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, interruptedWork);
|
||||
break;
|
||||
|
||||
@@ -35391,13 +35444,29 @@ if (__DEV__) {
|
||||
if (typeof type === "object" && type !== null) {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
if (!enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
// This is a consumer
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
} else {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = ForwardRef;
|
||||
@@ -35828,7 +35897,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-45146695";
|
||||
var ReactVersion = "18.3.0-www-modern-60139b00";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-89e5fda0";
|
||||
var ReactVersion = "18.3.0-www-classic-cded7f68";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -82,6 +82,17 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
// Re-export dynamic flags from the www version.
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build.
|
||||
var enableFloat = true;
|
||||
|
||||
// A pure JS implementation of a string hashing function. We do not use it for
|
||||
// security or obfuscation purposes, only to create compact hashes. So we
|
||||
// prioritize speed over collision avoidance. For example, we use this to hash
|
||||
@@ -342,17 +353,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
// Re-export dynamic flags from the www version.
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg;
|
||||
// On WWW, false is used for a new modern build.
|
||||
var enableFloat = true;
|
||||
|
||||
// $FlowFixMe[method-unbinding]
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
@@ -8161,7 +8161,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -8273,13 +8275,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
@@ -9345,8 +9364,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -9360,11 +9378,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -11798,8 +11812,7 @@ if (__DEV__) {
|
||||
var didWarnAboutReassigningProps = false;
|
||||
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
||||
var didWarnAboutGenerators = false;
|
||||
var didWarnAboutMaps = false;
|
||||
var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern
|
||||
var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern
|
||||
// components for some reason.
|
||||
|
||||
function renderIndeterminateComponent(
|
||||
@@ -12076,33 +12089,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
function renderContextConsumer(request, task, keyPath, context, props) {
|
||||
// The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
var render = props.children;
|
||||
|
||||
{
|
||||
@@ -12124,8 +12110,7 @@ if (__DEV__) {
|
||||
task.keyPath = prevKeyPath;
|
||||
}
|
||||
|
||||
function renderContextProvider(request, task, keyPath, type, props) {
|
||||
var context = type._context;
|
||||
function renderContextProvider(request, task, keyPath, context, props) {
|
||||
var value = props.value;
|
||||
var children = props.children;
|
||||
var prevSnapshot;
|
||||
@@ -12272,13 +12257,38 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
case REACT_PROVIDER_TYPE: {
|
||||
renderContextProvider(request, task, keyPath, type, props);
|
||||
return;
|
||||
if (!enableRenderableContext) {
|
||||
var context = type._context;
|
||||
renderContextProvider(request, task, keyPath, context, props);
|
||||
return;
|
||||
} // Fall through
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE: {
|
||||
renderContextConsumer(request, task, keyPath, type, props);
|
||||
return;
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
renderContextProvider(request, task, keyPath, _context, props);
|
||||
return;
|
||||
} else {
|
||||
var _context2 = type;
|
||||
|
||||
{
|
||||
if (_context2._context !== undefined) {
|
||||
_context2 = _context2._context;
|
||||
}
|
||||
}
|
||||
|
||||
renderContextConsumer(request, task, keyPath, _context2, props);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE: {
|
||||
if (enableRenderableContext) {
|
||||
var _context3 = type._context;
|
||||
renderContextConsumer(request, task, keyPath, _context3, props);
|
||||
return;
|
||||
} // Fall through
|
||||
}
|
||||
|
||||
case REACT_LAZY_TYPE: {
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-e43084bc";
|
||||
var ReactVersion = "18.3.0-www-modern-05406ad7";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -82,6 +82,17 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
// Re-export dynamic flags from the www version.
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build.
|
||||
var enableFloat = true;
|
||||
|
||||
// A pure JS implementation of a string hashing function. We do not use it for
|
||||
// security or obfuscation purposes, only to create compact hashes. So we
|
||||
// prioritize speed over collision avoidance. For example, we use this to hash
|
||||
@@ -342,17 +353,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
// Re-export dynamic flags from the www version.
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg;
|
||||
// On WWW, true is used for a new modern build.
|
||||
var enableFloat = true;
|
||||
|
||||
// $FlowFixMe[method-unbinding]
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
@@ -8161,7 +8161,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -8273,13 +8275,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
@@ -9098,8 +9117,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -9113,11 +9131,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -11525,8 +11539,7 @@ if (__DEV__) {
|
||||
var didWarnAboutReassigningProps = false;
|
||||
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
||||
var didWarnAboutGenerators = false;
|
||||
var didWarnAboutMaps = false;
|
||||
var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern
|
||||
var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern
|
||||
// components for some reason.
|
||||
|
||||
function renderIndeterminateComponent(
|
||||
@@ -11810,33 +11823,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
function renderContextConsumer(request, task, keyPath, context, props) {
|
||||
// The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
var render = props.children;
|
||||
|
||||
{
|
||||
@@ -11858,8 +11844,7 @@ if (__DEV__) {
|
||||
task.keyPath = prevKeyPath;
|
||||
}
|
||||
|
||||
function renderContextProvider(request, task, keyPath, type, props) {
|
||||
var context = type._context;
|
||||
function renderContextProvider(request, task, keyPath, context, props) {
|
||||
var value = props.value;
|
||||
var children = props.children;
|
||||
var prevSnapshot;
|
||||
@@ -12006,13 +11991,38 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
case REACT_PROVIDER_TYPE: {
|
||||
renderContextProvider(request, task, keyPath, type, props);
|
||||
return;
|
||||
if (!enableRenderableContext) {
|
||||
var context = type._context;
|
||||
renderContextProvider(request, task, keyPath, context, props);
|
||||
return;
|
||||
} // Fall through
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE: {
|
||||
renderContextConsumer(request, task, keyPath, type, props);
|
||||
return;
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
renderContextProvider(request, task, keyPath, _context, props);
|
||||
return;
|
||||
} else {
|
||||
var _context2 = type;
|
||||
|
||||
{
|
||||
if (_context2._context !== undefined) {
|
||||
_context2 = _context2._context;
|
||||
}
|
||||
}
|
||||
|
||||
renderContextConsumer(request, task, keyPath, _context2, props);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE: {
|
||||
if (enableRenderableContext) {
|
||||
var _context3 = type._context;
|
||||
renderContextConsumer(request, task, keyPath, _context3, props);
|
||||
return;
|
||||
} // Fall through
|
||||
}
|
||||
|
||||
case REACT_LAZY_TYPE: {
|
||||
|
||||
@@ -52,6 +52,13 @@ function formatProdErrorMessage(code) {
|
||||
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
|
||||
);
|
||||
}
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext;
|
||||
function murmurhash3_32_gc(key, seed) {
|
||||
var remainder = key.length & 3;
|
||||
var bytes = key.length - remainder;
|
||||
@@ -106,12 +113,6 @@ function murmurhash3_32_gc(key, seed) {
|
||||
return (h1 ^ (h1 >>> 16)) >>> 0;
|
||||
}
|
||||
var assign = Object.assign,
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg,
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
VALID_ATTRIBUTE_NAME_REGEX = RegExp(
|
||||
"^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
|
||||
@@ -2569,16 +2570,16 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
"\x3c/script>"
|
||||
);
|
||||
bootstrapScriptContent = idPrefix + "P:";
|
||||
var JSCompiler_object_inline_segmentPrefix_1609 = idPrefix + "S:";
|
||||
var JSCompiler_object_inline_segmentPrefix_1594 = idPrefix + "S:";
|
||||
idPrefix += "B:";
|
||||
var JSCompiler_object_inline_preconnects_1623 = new Set(),
|
||||
JSCompiler_object_inline_fontPreloads_1624 = new Set(),
|
||||
JSCompiler_object_inline_highImagePreloads_1625 = new Set(),
|
||||
JSCompiler_object_inline_styles_1626 = new Map(),
|
||||
JSCompiler_object_inline_bootstrapScripts_1627 = new Set(),
|
||||
JSCompiler_object_inline_scripts_1628 = new Set(),
|
||||
JSCompiler_object_inline_bulkPreloads_1629 = new Set(),
|
||||
JSCompiler_object_inline_preloads_1630 = {
|
||||
var JSCompiler_object_inline_preconnects_1608 = new Set(),
|
||||
JSCompiler_object_inline_fontPreloads_1609 = new Set(),
|
||||
JSCompiler_object_inline_highImagePreloads_1610 = new Set(),
|
||||
JSCompiler_object_inline_styles_1611 = new Map(),
|
||||
JSCompiler_object_inline_bootstrapScripts_1612 = new Set(),
|
||||
JSCompiler_object_inline_scripts_1613 = new Set(),
|
||||
JSCompiler_object_inline_bulkPreloads_1614 = new Set(),
|
||||
JSCompiler_object_inline_preloads_1615 = {
|
||||
images: new Map(),
|
||||
stylesheets: new Map(),
|
||||
scripts: new Map(),
|
||||
@@ -2615,7 +2616,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
scriptConfig.moduleScriptResources[href] = null;
|
||||
scriptConfig = [];
|
||||
pushLinkImpl(scriptConfig, props);
|
||||
JSCompiler_object_inline_bootstrapScripts_1627.add(scriptConfig);
|
||||
JSCompiler_object_inline_bootstrapScripts_1612.add(scriptConfig);
|
||||
bootstrapChunks.push('<script src="', escapeTextForBrowser(src));
|
||||
"string" === typeof integrity &&
|
||||
bootstrapChunks.push('" integrity="', escapeTextForBrowser(integrity));
|
||||
@@ -2656,7 +2657,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
(props.moduleScriptResources[scriptConfig] = null),
|
||||
(props = []),
|
||||
pushLinkImpl(props, integrity),
|
||||
JSCompiler_object_inline_bootstrapScripts_1627.add(props),
|
||||
JSCompiler_object_inline_bootstrapScripts_1612.add(props),
|
||||
bootstrapChunks.push(
|
||||
'<script type="module" src="',
|
||||
escapeTextForBrowser(i)
|
||||
@@ -2671,7 +2672,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
bootstrapChunks.push('" async="">\x3c/script>');
|
||||
return {
|
||||
placeholderPrefix: bootstrapScriptContent,
|
||||
segmentPrefix: JSCompiler_object_inline_segmentPrefix_1609,
|
||||
segmentPrefix: JSCompiler_object_inline_segmentPrefix_1594,
|
||||
boundaryPrefix: idPrefix,
|
||||
startInlineScript: "<script>",
|
||||
htmlChunks: null,
|
||||
@@ -2691,14 +2692,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
charsetChunks: [],
|
||||
viewportChunks: [],
|
||||
hoistableChunks: [],
|
||||
preconnects: JSCompiler_object_inline_preconnects_1623,
|
||||
fontPreloads: JSCompiler_object_inline_fontPreloads_1624,
|
||||
highImagePreloads: JSCompiler_object_inline_highImagePreloads_1625,
|
||||
styles: JSCompiler_object_inline_styles_1626,
|
||||
bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1627,
|
||||
scripts: JSCompiler_object_inline_scripts_1628,
|
||||
bulkPreloads: JSCompiler_object_inline_bulkPreloads_1629,
|
||||
preloads: JSCompiler_object_inline_preloads_1630,
|
||||
preconnects: JSCompiler_object_inline_preconnects_1608,
|
||||
fontPreloads: JSCompiler_object_inline_fontPreloads_1609,
|
||||
highImagePreloads: JSCompiler_object_inline_highImagePreloads_1610,
|
||||
styles: JSCompiler_object_inline_styles_1611,
|
||||
bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1612,
|
||||
scripts: JSCompiler_object_inline_scripts_1613,
|
||||
bulkPreloads: JSCompiler_object_inline_bulkPreloads_1614,
|
||||
preloads: JSCompiler_object_inline_preloads_1615,
|
||||
stylesToHoist: !1,
|
||||
generateStaticMarkup: generateStaticMarkup
|
||||
};
|
||||
@@ -2719,6 +2720,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -2761,10 +2763,17 @@ function getComponentNameFromType(type) {
|
||||
}
|
||||
if ("object" === typeof type)
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
return (type.displayName || "Context") + ".Consumer";
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return (type._context.displayName || "Context") + ".Provider";
|
||||
if (enableRenderableContext) break;
|
||||
else return (type._context.displayName || "Context") + ".Provider";
|
||||
case REACT_CONTEXT_TYPE:
|
||||
return enableRenderableContext
|
||||
? (type.displayName || "Context") + ".Provider"
|
||||
: (type.displayName || "Context") + ".Consumer";
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext)
|
||||
return (type._context.displayName || "Context") + ".Consumer";
|
||||
break;
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
var innerType = type.render;
|
||||
type = type.displayName;
|
||||
@@ -3741,6 +3750,38 @@ function resolveDefaultProps(Component, baseProps) {
|
||||
}
|
||||
return baseProps;
|
||||
}
|
||||
function renderContextConsumer(request, task, keyPath, context, props) {
|
||||
props = props.children;
|
||||
context = props(context._currentValue2);
|
||||
props = task.keyPath;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, context, -1);
|
||||
task.keyPath = props;
|
||||
}
|
||||
function renderContextProvider(request, task, keyPath, context, props) {
|
||||
var value = props.value,
|
||||
children = props.children;
|
||||
props = task.keyPath;
|
||||
var prevValue = context._currentValue2;
|
||||
context._currentValue2 = value;
|
||||
var prevNode = currentActiveSnapshot;
|
||||
currentActiveSnapshot = context = {
|
||||
parent: prevNode,
|
||||
depth: null === prevNode ? 0 : prevNode.depth + 1,
|
||||
context: context,
|
||||
parentValue: prevValue,
|
||||
value: value
|
||||
};
|
||||
task.context = context;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, children, -1);
|
||||
request = currentActiveSnapshot;
|
||||
if (null === request) throw Error(formatProdErrorMessage(403));
|
||||
request.context._currentValue2 = request.parentValue;
|
||||
request = currentActiveSnapshot = request.parent;
|
||||
task.context = request;
|
||||
task.keyPath = props;
|
||||
}
|
||||
function renderElement(request, task, keyPath, type, props, ref) {
|
||||
if ("function" === typeof type)
|
||||
if (type.prototype && type.prototype.isReactComponent) {
|
||||
@@ -4155,38 +4196,20 @@ function renderElement(request, task, keyPath, type, props, ref) {
|
||||
renderElement(request, task, keyPath, type, props, ref);
|
||||
return;
|
||||
case REACT_PROVIDER_TYPE:
|
||||
ref = props.children;
|
||||
contextKey = task.keyPath;
|
||||
type = type._context;
|
||||
props = props.value;
|
||||
JSCompiler_inline_result = type._currentValue2;
|
||||
type._currentValue2 = props;
|
||||
maskedContext = currentActiveSnapshot;
|
||||
currentActiveSnapshot = props = {
|
||||
parent: maskedContext,
|
||||
depth: null === maskedContext ? 0 : maskedContext.depth + 1,
|
||||
context: type,
|
||||
parentValue: JSCompiler_inline_result,
|
||||
value: props
|
||||
};
|
||||
task.context = props;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, ref, -1);
|
||||
request = currentActiveSnapshot;
|
||||
if (null === request) throw Error(formatProdErrorMessage(403));
|
||||
request.context._currentValue2 = request.parentValue;
|
||||
request = currentActiveSnapshot = request.parent;
|
||||
task.context = request;
|
||||
task.keyPath = contextKey;
|
||||
return;
|
||||
if (!enableRenderableContext) {
|
||||
renderContextProvider(request, task, keyPath, type._context, props);
|
||||
return;
|
||||
}
|
||||
case REACT_CONTEXT_TYPE:
|
||||
props = props.children;
|
||||
props = props(type._currentValue2);
|
||||
type = task.keyPath;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, props, -1);
|
||||
task.keyPath = type;
|
||||
enableRenderableContext
|
||||
? renderContextProvider(request, task, keyPath, type, props)
|
||||
: renderContextConsumer(request, task, keyPath, type, props);
|
||||
return;
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
renderContextConsumer(request, task, keyPath, type._context, props);
|
||||
return;
|
||||
}
|
||||
case REACT_LAZY_TYPE:
|
||||
contextKey = task.componentStack;
|
||||
task.componentStack = createBuiltInComponentStack(task, "Lazy");
|
||||
@@ -4629,15 +4652,15 @@ function renderNode(request, task, node, childIndex) {
|
||||
chunkLength = segment.chunks.length;
|
||||
try {
|
||||
return renderNodeDestructive(request, task, node, childIndex);
|
||||
} catch (thrownValue$40) {
|
||||
} catch (thrownValue$43) {
|
||||
if (
|
||||
(resetHooksState(),
|
||||
(segment.children.length = childrenLength),
|
||||
(segment.chunks.length = chunkLength),
|
||||
(node =
|
||||
thrownValue$40 === SuspenseException
|
||||
thrownValue$43 === SuspenseException
|
||||
? getSuspendedThenable()
|
||||
: thrownValue$40),
|
||||
: thrownValue$43),
|
||||
"object" === typeof node &&
|
||||
null !== node &&
|
||||
"function" === typeof node.then)
|
||||
@@ -5480,11 +5503,11 @@ function flushCompletedQueues(request, destination) {
|
||||
completedBoundaries.splice(0, i);
|
||||
var partialBoundaries = request.partialBoundaries;
|
||||
for (i = 0; i < partialBoundaries.length; i++) {
|
||||
var boundary$44 = partialBoundaries[i];
|
||||
var boundary$47 = partialBoundaries[i];
|
||||
a: {
|
||||
clientRenderedBoundaries = request;
|
||||
boundary = destination;
|
||||
var completedSegments = boundary$44.completedSegments;
|
||||
var completedSegments = boundary$47.completedSegments;
|
||||
for (
|
||||
resumableState$jscomp$0 = 0;
|
||||
resumableState$jscomp$0 < completedSegments.length;
|
||||
@@ -5494,7 +5517,7 @@ function flushCompletedQueues(request, destination) {
|
||||
!flushPartiallyCompletedSegment(
|
||||
clientRenderedBoundaries,
|
||||
boundary,
|
||||
boundary$44,
|
||||
boundary$47,
|
||||
completedSegments[resumableState$jscomp$0]
|
||||
)
|
||||
) {
|
||||
@@ -5506,7 +5529,7 @@ function flushCompletedQueues(request, destination) {
|
||||
completedSegments.splice(0, resumableState$jscomp$0);
|
||||
JSCompiler_inline_result = writeHoistablesForBoundary(
|
||||
boundary,
|
||||
boundary$44.contentState,
|
||||
boundary$47.contentState,
|
||||
clientRenderedBoundaries.renderState
|
||||
);
|
||||
}
|
||||
@@ -5580,8 +5603,8 @@ function abort(request, reason) {
|
||||
}
|
||||
null !== request.destination &&
|
||||
flushCompletedQueues(request, request.destination);
|
||||
} catch (error$46) {
|
||||
logRecoverableError(request, error$46, {}), fatalError(request, error$46);
|
||||
} catch (error$49) {
|
||||
logRecoverableError(request, error$49, {}), fatalError(request, error$49);
|
||||
}
|
||||
}
|
||||
function onError() {}
|
||||
@@ -5655,4 +5678,4 @@ exports.renderToString = function (children, options) {
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-12067544";
|
||||
exports.version = "18.3.0-www-classic-a2a229aa";
|
||||
|
||||
@@ -52,6 +52,13 @@ function formatProdErrorMessage(code) {
|
||||
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
|
||||
);
|
||||
}
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext;
|
||||
function murmurhash3_32_gc(key, seed) {
|
||||
var remainder = key.length & 3;
|
||||
var bytes = key.length - remainder;
|
||||
@@ -106,12 +113,6 @@ function murmurhash3_32_gc(key, seed) {
|
||||
return (h1 ^ (h1 >>> 16)) >>> 0;
|
||||
}
|
||||
var assign = Object.assign,
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg,
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
VALID_ATTRIBUTE_NAME_REGEX = RegExp(
|
||||
"^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
|
||||
@@ -2569,16 +2570,16 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
"\x3c/script>"
|
||||
);
|
||||
bootstrapScriptContent = idPrefix + "P:";
|
||||
var JSCompiler_object_inline_segmentPrefix_1596 = idPrefix + "S:";
|
||||
var JSCompiler_object_inline_segmentPrefix_1581 = idPrefix + "S:";
|
||||
idPrefix += "B:";
|
||||
var JSCompiler_object_inline_preconnects_1610 = new Set(),
|
||||
JSCompiler_object_inline_fontPreloads_1611 = new Set(),
|
||||
JSCompiler_object_inline_highImagePreloads_1612 = new Set(),
|
||||
JSCompiler_object_inline_styles_1613 = new Map(),
|
||||
JSCompiler_object_inline_bootstrapScripts_1614 = new Set(),
|
||||
JSCompiler_object_inline_scripts_1615 = new Set(),
|
||||
JSCompiler_object_inline_bulkPreloads_1616 = new Set(),
|
||||
JSCompiler_object_inline_preloads_1617 = {
|
||||
var JSCompiler_object_inline_preconnects_1595 = new Set(),
|
||||
JSCompiler_object_inline_fontPreloads_1596 = new Set(),
|
||||
JSCompiler_object_inline_highImagePreloads_1597 = new Set(),
|
||||
JSCompiler_object_inline_styles_1598 = new Map(),
|
||||
JSCompiler_object_inline_bootstrapScripts_1599 = new Set(),
|
||||
JSCompiler_object_inline_scripts_1600 = new Set(),
|
||||
JSCompiler_object_inline_bulkPreloads_1601 = new Set(),
|
||||
JSCompiler_object_inline_preloads_1602 = {
|
||||
images: new Map(),
|
||||
stylesheets: new Map(),
|
||||
scripts: new Map(),
|
||||
@@ -2615,7 +2616,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
scriptConfig.moduleScriptResources[href] = null;
|
||||
scriptConfig = [];
|
||||
pushLinkImpl(scriptConfig, props);
|
||||
JSCompiler_object_inline_bootstrapScripts_1614.add(scriptConfig);
|
||||
JSCompiler_object_inline_bootstrapScripts_1599.add(scriptConfig);
|
||||
bootstrapChunks.push('<script src="', escapeTextForBrowser(src));
|
||||
"string" === typeof integrity &&
|
||||
bootstrapChunks.push('" integrity="', escapeTextForBrowser(integrity));
|
||||
@@ -2656,7 +2657,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
(props.moduleScriptResources[scriptConfig] = null),
|
||||
(props = []),
|
||||
pushLinkImpl(props, integrity),
|
||||
JSCompiler_object_inline_bootstrapScripts_1614.add(props),
|
||||
JSCompiler_object_inline_bootstrapScripts_1599.add(props),
|
||||
bootstrapChunks.push(
|
||||
'<script type="module" src="',
|
||||
escapeTextForBrowser(i)
|
||||
@@ -2671,7 +2672,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
bootstrapChunks.push('" async="">\x3c/script>');
|
||||
return {
|
||||
placeholderPrefix: bootstrapScriptContent,
|
||||
segmentPrefix: JSCompiler_object_inline_segmentPrefix_1596,
|
||||
segmentPrefix: JSCompiler_object_inline_segmentPrefix_1581,
|
||||
boundaryPrefix: idPrefix,
|
||||
startInlineScript: "<script>",
|
||||
htmlChunks: null,
|
||||
@@ -2691,14 +2692,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
|
||||
charsetChunks: [],
|
||||
viewportChunks: [],
|
||||
hoistableChunks: [],
|
||||
preconnects: JSCompiler_object_inline_preconnects_1610,
|
||||
fontPreloads: JSCompiler_object_inline_fontPreloads_1611,
|
||||
highImagePreloads: JSCompiler_object_inline_highImagePreloads_1612,
|
||||
styles: JSCompiler_object_inline_styles_1613,
|
||||
bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1614,
|
||||
scripts: JSCompiler_object_inline_scripts_1615,
|
||||
bulkPreloads: JSCompiler_object_inline_bulkPreloads_1616,
|
||||
preloads: JSCompiler_object_inline_preloads_1617,
|
||||
preconnects: JSCompiler_object_inline_preconnects_1595,
|
||||
fontPreloads: JSCompiler_object_inline_fontPreloads_1596,
|
||||
highImagePreloads: JSCompiler_object_inline_highImagePreloads_1597,
|
||||
styles: JSCompiler_object_inline_styles_1598,
|
||||
bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1599,
|
||||
scripts: JSCompiler_object_inline_scripts_1600,
|
||||
bulkPreloads: JSCompiler_object_inline_bulkPreloads_1601,
|
||||
preloads: JSCompiler_object_inline_preloads_1602,
|
||||
stylesToHoist: !1,
|
||||
generateStaticMarkup: generateStaticMarkup
|
||||
};
|
||||
@@ -2719,6 +2720,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -2761,10 +2763,17 @@ function getComponentNameFromType(type) {
|
||||
}
|
||||
if ("object" === typeof type)
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
return (type.displayName || "Context") + ".Consumer";
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return (type._context.displayName || "Context") + ".Provider";
|
||||
if (enableRenderableContext) break;
|
||||
else return (type._context.displayName || "Context") + ".Provider";
|
||||
case REACT_CONTEXT_TYPE:
|
||||
return enableRenderableContext
|
||||
? (type.displayName || "Context") + ".Provider"
|
||||
: (type.displayName || "Context") + ".Consumer";
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext)
|
||||
return (type._context.displayName || "Context") + ".Consumer";
|
||||
break;
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
var innerType = type.render;
|
||||
type = type.displayName;
|
||||
@@ -3733,6 +3742,38 @@ function resolveDefaultProps(Component, baseProps) {
|
||||
}
|
||||
return baseProps;
|
||||
}
|
||||
function renderContextConsumer(request, task, keyPath, context, props) {
|
||||
props = props.children;
|
||||
context = props(context._currentValue2);
|
||||
props = task.keyPath;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, context, -1);
|
||||
task.keyPath = props;
|
||||
}
|
||||
function renderContextProvider(request, task, keyPath, context, props) {
|
||||
var value = props.value,
|
||||
children = props.children;
|
||||
props = task.keyPath;
|
||||
var prevValue = context._currentValue2;
|
||||
context._currentValue2 = value;
|
||||
var prevNode = currentActiveSnapshot;
|
||||
currentActiveSnapshot = context = {
|
||||
parent: prevNode,
|
||||
depth: null === prevNode ? 0 : prevNode.depth + 1,
|
||||
context: context,
|
||||
parentValue: prevValue,
|
||||
value: value
|
||||
};
|
||||
task.context = context;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, children, -1);
|
||||
request = currentActiveSnapshot;
|
||||
if (null === request) throw Error(formatProdErrorMessage(403));
|
||||
request.context._currentValue2 = request.parentValue;
|
||||
request = currentActiveSnapshot = request.parent;
|
||||
task.context = request;
|
||||
task.keyPath = props;
|
||||
}
|
||||
function renderElement(request, task, keyPath, type, props, ref) {
|
||||
if ("function" === typeof type)
|
||||
if (type.prototype && type.prototype.isReactComponent) {
|
||||
@@ -4114,38 +4155,20 @@ function renderElement(request, task, keyPath, type, props, ref) {
|
||||
renderElement(request, task, keyPath, type, props, ref);
|
||||
return;
|
||||
case REACT_PROVIDER_TYPE:
|
||||
JSCompiler_inline_result = props.children;
|
||||
ref = task.keyPath;
|
||||
type = type._context;
|
||||
props = props.value;
|
||||
contextType = type._currentValue2;
|
||||
type._currentValue2 = props;
|
||||
initialState = currentActiveSnapshot;
|
||||
currentActiveSnapshot = props = {
|
||||
parent: initialState,
|
||||
depth: null === initialState ? 0 : initialState.depth + 1,
|
||||
context: type,
|
||||
parentValue: contextType,
|
||||
value: props
|
||||
};
|
||||
task.context = props;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, JSCompiler_inline_result, -1);
|
||||
request = currentActiveSnapshot;
|
||||
if (null === request) throw Error(formatProdErrorMessage(403));
|
||||
request.context._currentValue2 = request.parentValue;
|
||||
request = currentActiveSnapshot = request.parent;
|
||||
task.context = request;
|
||||
task.keyPath = ref;
|
||||
return;
|
||||
if (!enableRenderableContext) {
|
||||
renderContextProvider(request, task, keyPath, type._context, props);
|
||||
return;
|
||||
}
|
||||
case REACT_CONTEXT_TYPE:
|
||||
props = props.children;
|
||||
props = props(type._currentValue2);
|
||||
type = task.keyPath;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, props, -1);
|
||||
task.keyPath = type;
|
||||
enableRenderableContext
|
||||
? renderContextProvider(request, task, keyPath, type, props)
|
||||
: renderContextConsumer(request, task, keyPath, type, props);
|
||||
return;
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
renderContextConsumer(request, task, keyPath, type._context, props);
|
||||
return;
|
||||
}
|
||||
case REACT_LAZY_TYPE:
|
||||
ref = task.componentStack;
|
||||
task.componentStack = createBuiltInComponentStack(task, "Lazy");
|
||||
@@ -4588,15 +4611,15 @@ function renderNode(request, task, node, childIndex) {
|
||||
chunkLength = segment.chunks.length;
|
||||
try {
|
||||
return renderNodeDestructive(request, task, node, childIndex);
|
||||
} catch (thrownValue$40) {
|
||||
} catch (thrownValue$43) {
|
||||
if (
|
||||
(resetHooksState(),
|
||||
(segment.children.length = childrenLength),
|
||||
(segment.chunks.length = chunkLength),
|
||||
(node =
|
||||
thrownValue$40 === SuspenseException
|
||||
thrownValue$43 === SuspenseException
|
||||
? getSuspendedThenable()
|
||||
: thrownValue$40),
|
||||
: thrownValue$43),
|
||||
"object" === typeof node &&
|
||||
null !== node &&
|
||||
"function" === typeof node.then)
|
||||
@@ -5439,11 +5462,11 @@ function flushCompletedQueues(request, destination) {
|
||||
completedBoundaries.splice(0, i);
|
||||
var partialBoundaries = request.partialBoundaries;
|
||||
for (i = 0; i < partialBoundaries.length; i++) {
|
||||
var boundary$44 = partialBoundaries[i];
|
||||
var boundary$47 = partialBoundaries[i];
|
||||
a: {
|
||||
clientRenderedBoundaries = request;
|
||||
boundary = destination;
|
||||
var completedSegments = boundary$44.completedSegments;
|
||||
var completedSegments = boundary$47.completedSegments;
|
||||
for (
|
||||
resumableState$jscomp$0 = 0;
|
||||
resumableState$jscomp$0 < completedSegments.length;
|
||||
@@ -5453,7 +5476,7 @@ function flushCompletedQueues(request, destination) {
|
||||
!flushPartiallyCompletedSegment(
|
||||
clientRenderedBoundaries,
|
||||
boundary,
|
||||
boundary$44,
|
||||
boundary$47,
|
||||
completedSegments[resumableState$jscomp$0]
|
||||
)
|
||||
) {
|
||||
@@ -5465,7 +5488,7 @@ function flushCompletedQueues(request, destination) {
|
||||
completedSegments.splice(0, resumableState$jscomp$0);
|
||||
JSCompiler_inline_result = writeHoistablesForBoundary(
|
||||
boundary,
|
||||
boundary$44.contentState,
|
||||
boundary$47.contentState,
|
||||
clientRenderedBoundaries.renderState
|
||||
);
|
||||
}
|
||||
@@ -5539,8 +5562,8 @@ function abort(request, reason) {
|
||||
}
|
||||
null !== request.destination &&
|
||||
flushCompletedQueues(request, request.destination);
|
||||
} catch (error$46) {
|
||||
logRecoverableError(request, error$46, {}), fatalError(request, error$46);
|
||||
} catch (error$49) {
|
||||
logRecoverableError(request, error$49, {}), fatalError(request, error$49);
|
||||
}
|
||||
}
|
||||
function onError() {}
|
||||
@@ -5614,4 +5637,4 @@ exports.renderToString = function (children, options) {
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-ab6bdfd6";
|
||||
exports.version = "18.3.0-www-modern-87ef5acd";
|
||||
|
||||
@@ -80,6 +80,17 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
// Re-export dynamic flags from the www version.
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build.
|
||||
var enableFloat = true;
|
||||
|
||||
// A pure JS implementation of a string hashing function. We do not use it for
|
||||
// security or obfuscation purposes, only to create compact hashes. So we
|
||||
// prioritize speed over collision avoidance. For example, we use this to hash
|
||||
@@ -339,17 +350,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
// Re-export dynamic flags from the www version.
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg;
|
||||
// On WWW, true is used for a new modern build.
|
||||
var enableFloat = true;
|
||||
|
||||
// $FlowFixMe[method-unbinding]
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
@@ -8045,7 +8045,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -8157,13 +8159,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
@@ -8982,8 +9001,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -8997,11 +9015,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -11406,8 +11420,7 @@ if (__DEV__) {
|
||||
var didWarnAboutReassigningProps = false;
|
||||
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
||||
var didWarnAboutGenerators = false;
|
||||
var didWarnAboutMaps = false;
|
||||
var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern
|
||||
var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern
|
||||
// components for some reason.
|
||||
|
||||
function renderIndeterminateComponent(
|
||||
@@ -11691,33 +11704,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
function renderContextConsumer(request, task, keyPath, context, props) {
|
||||
// The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
var render = props.children;
|
||||
|
||||
{
|
||||
@@ -11739,8 +11725,7 @@ if (__DEV__) {
|
||||
task.keyPath = prevKeyPath;
|
||||
}
|
||||
|
||||
function renderContextProvider(request, task, keyPath, type, props) {
|
||||
var context = type._context;
|
||||
function renderContextProvider(request, task, keyPath, context, props) {
|
||||
var value = props.value;
|
||||
var children = props.children;
|
||||
var prevSnapshot;
|
||||
@@ -11887,13 +11872,38 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
case REACT_PROVIDER_TYPE: {
|
||||
renderContextProvider(request, task, keyPath, type, props);
|
||||
return;
|
||||
if (!enableRenderableContext) {
|
||||
var context = type._context;
|
||||
renderContextProvider(request, task, keyPath, context, props);
|
||||
return;
|
||||
} // Fall through
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE: {
|
||||
renderContextConsumer(request, task, keyPath, type, props);
|
||||
return;
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
renderContextProvider(request, task, keyPath, _context, props);
|
||||
return;
|
||||
} else {
|
||||
var _context2 = type;
|
||||
|
||||
{
|
||||
if (_context2._context !== undefined) {
|
||||
_context2 = _context2._context;
|
||||
}
|
||||
}
|
||||
|
||||
renderContextConsumer(request, task, keyPath, _context2, props);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE: {
|
||||
if (enableRenderableContext) {
|
||||
var _context3 = type._context;
|
||||
renderContextConsumer(request, task, keyPath, _context3, props);
|
||||
return;
|
||||
} // Fall through
|
||||
}
|
||||
|
||||
case REACT_LAZY_TYPE: {
|
||||
|
||||
@@ -36,7 +36,14 @@
|
||||
*/
|
||||
"use strict";
|
||||
var React = require("react"),
|
||||
ReactDOM = require("react-dom");
|
||||
ReactDOM = require("react-dom"),
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext;
|
||||
function murmurhash3_32_gc(key, seed) {
|
||||
var remainder = key.length & 3;
|
||||
var bytes = key.length - remainder;
|
||||
@@ -98,12 +105,6 @@ function writeChunkAndReturn(destination, chunk) {
|
||||
return !0;
|
||||
}
|
||||
var assign = Object.assign,
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableFormActions = dynamicFeatureFlags.enableFormActions,
|
||||
enableUseDeferredValueInitialArg =
|
||||
dynamicFeatureFlags.enableUseDeferredValueInitialArg,
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
VALID_ATTRIBUTE_NAME_REGEX = RegExp(
|
||||
"^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
|
||||
@@ -2579,6 +2580,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -2621,10 +2623,17 @@ function getComponentNameFromType(type) {
|
||||
}
|
||||
if ("object" === typeof type)
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
return (type.displayName || "Context") + ".Consumer";
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return (type._context.displayName || "Context") + ".Provider";
|
||||
if (enableRenderableContext) break;
|
||||
else return (type._context.displayName || "Context") + ".Provider";
|
||||
case REACT_CONTEXT_TYPE:
|
||||
return enableRenderableContext
|
||||
? (type.displayName || "Context") + ".Provider"
|
||||
: (type.displayName || "Context") + ".Consumer";
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext)
|
||||
return (type._context.displayName || "Context") + ".Consumer";
|
||||
break;
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
var innerType = type.render;
|
||||
type = type.displayName;
|
||||
@@ -3553,6 +3562,41 @@ function resolveDefaultProps(Component, baseProps) {
|
||||
}
|
||||
return baseProps;
|
||||
}
|
||||
function renderContextConsumer(request, task, keyPath, context, props) {
|
||||
props = props.children;
|
||||
context = props(context._currentValue);
|
||||
props = task.keyPath;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, context, -1);
|
||||
task.keyPath = props;
|
||||
}
|
||||
function renderContextProvider(request, task, keyPath, context, props) {
|
||||
var value = props.value,
|
||||
children = props.children;
|
||||
props = task.keyPath;
|
||||
var prevValue = context._currentValue;
|
||||
context._currentValue = value;
|
||||
var prevNode = currentActiveSnapshot;
|
||||
currentActiveSnapshot = context = {
|
||||
parent: prevNode,
|
||||
depth: null === prevNode ? 0 : prevNode.depth + 1,
|
||||
context: context,
|
||||
parentValue: prevValue,
|
||||
value: value
|
||||
};
|
||||
task.context = context;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, children, -1);
|
||||
request = currentActiveSnapshot;
|
||||
if (null === request)
|
||||
throw Error(
|
||||
"Tried to pop a Context at the root of the app. This is a bug in React."
|
||||
);
|
||||
request.context._currentValue = request.parentValue;
|
||||
request = currentActiveSnapshot = request.parent;
|
||||
task.context = request;
|
||||
task.keyPath = props;
|
||||
}
|
||||
function renderElement(request, task, keyPath, type, props, ref) {
|
||||
if ("function" === typeof type)
|
||||
if (type.prototype && type.prototype.isReactComponent) {
|
||||
@@ -3933,41 +3977,20 @@ function renderElement(request, task, keyPath, type, props, ref) {
|
||||
renderElement(request, task, keyPath, type, props, ref);
|
||||
return;
|
||||
case REACT_PROVIDER_TYPE:
|
||||
JSCompiler_inline_result = props.children;
|
||||
ref = task.keyPath;
|
||||
type = type._context;
|
||||
props = props.value;
|
||||
contextType = type._currentValue;
|
||||
type._currentValue = props;
|
||||
initialState = currentActiveSnapshot;
|
||||
currentActiveSnapshot = props = {
|
||||
parent: initialState,
|
||||
depth: null === initialState ? 0 : initialState.depth + 1,
|
||||
context: type,
|
||||
parentValue: contextType,
|
||||
value: props
|
||||
};
|
||||
task.context = props;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, JSCompiler_inline_result, -1);
|
||||
request = currentActiveSnapshot;
|
||||
if (null === request)
|
||||
throw Error(
|
||||
"Tried to pop a Context at the root of the app. This is a bug in React."
|
||||
);
|
||||
request.context._currentValue = request.parentValue;
|
||||
request = currentActiveSnapshot = request.parent;
|
||||
task.context = request;
|
||||
task.keyPath = ref;
|
||||
return;
|
||||
if (!enableRenderableContext) {
|
||||
renderContextProvider(request, task, keyPath, type._context, props);
|
||||
return;
|
||||
}
|
||||
case REACT_CONTEXT_TYPE:
|
||||
props = props.children;
|
||||
props = props(type._currentValue);
|
||||
type = task.keyPath;
|
||||
task.keyPath = keyPath;
|
||||
renderNodeDestructive(request, task, props, -1);
|
||||
task.keyPath = type;
|
||||
enableRenderableContext
|
||||
? renderContextProvider(request, task, keyPath, type, props)
|
||||
: renderContextConsumer(request, task, keyPath, type, props);
|
||||
return;
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
renderContextConsumer(request, task, keyPath, type._context, props);
|
||||
return;
|
||||
}
|
||||
case REACT_LAZY_TYPE:
|
||||
ref = task.componentStack;
|
||||
task.componentStack = createBuiltInComponentStack(task, "Lazy");
|
||||
@@ -4422,15 +4445,15 @@ function renderNode(request, task, node, childIndex) {
|
||||
chunkLength = segment.chunks.length;
|
||||
try {
|
||||
return renderNodeDestructive(request, task, node, childIndex);
|
||||
} catch (thrownValue$40) {
|
||||
} catch (thrownValue$43) {
|
||||
if (
|
||||
(resetHooksState(),
|
||||
(segment.children.length = childrenLength),
|
||||
(segment.chunks.length = chunkLength),
|
||||
(node =
|
||||
thrownValue$40 === SuspenseException
|
||||
thrownValue$43 === SuspenseException
|
||||
? getSuspendedThenable()
|
||||
: thrownValue$40),
|
||||
: thrownValue$43),
|
||||
"object" === typeof node &&
|
||||
null !== node &&
|
||||
"function" === typeof node.then)
|
||||
@@ -5111,11 +5134,11 @@ function flushCompletedQueues(request, destination) {
|
||||
completedBoundaries.splice(0, i);
|
||||
var partialBoundaries = request.partialBoundaries;
|
||||
for (i = 0; i < partialBoundaries.length; i++) {
|
||||
var boundary$44 = partialBoundaries[i];
|
||||
var boundary$47 = partialBoundaries[i];
|
||||
a: {
|
||||
clientRenderedBoundaries = request;
|
||||
boundary = destination;
|
||||
var completedSegments = boundary$44.completedSegments;
|
||||
var completedSegments = boundary$47.completedSegments;
|
||||
for (
|
||||
resumableState$jscomp$0 = 0;
|
||||
resumableState$jscomp$0 < completedSegments.length;
|
||||
@@ -5125,7 +5148,7 @@ function flushCompletedQueues(request, destination) {
|
||||
!flushPartiallyCompletedSegment(
|
||||
clientRenderedBoundaries,
|
||||
boundary,
|
||||
boundary$44,
|
||||
boundary$47,
|
||||
completedSegments[resumableState$jscomp$0]
|
||||
)
|
||||
) {
|
||||
@@ -5137,7 +5160,7 @@ function flushCompletedQueues(request, destination) {
|
||||
completedSegments.splice(0, resumableState$jscomp$0);
|
||||
JSCompiler_inline_result = writeHoistablesForBoundary(
|
||||
boundary,
|
||||
boundary$44.contentState,
|
||||
boundary$47.contentState,
|
||||
clientRenderedBoundaries.renderState
|
||||
);
|
||||
}
|
||||
@@ -5192,8 +5215,8 @@ function abort(request, reason) {
|
||||
}
|
||||
null !== request.destination &&
|
||||
flushCompletedQueues(request, request.destination);
|
||||
} catch (error$46) {
|
||||
logRecoverableError(request, error$46, {}), fatalError(request, error$46);
|
||||
} catch (error$49) {
|
||||
logRecoverableError(request, error$49, {}), fatalError(request, error$49);
|
||||
}
|
||||
}
|
||||
exports.abortStream = function (stream, reason) {
|
||||
|
||||
@@ -145,7 +145,8 @@ if (__DEV__) {
|
||||
transitionLaneExpirationMs =
|
||||
dynamicFeatureFlags.transitionLaneExpirationMs,
|
||||
enableInfiniteRenderLoopDetection =
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, false is used for a new modern build.
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build.
|
||||
var enableProfilerTimer = true;
|
||||
var enableProfilerCommitHooks = true;
|
||||
var enableProfilerNestedUpdatePhase = true;
|
||||
@@ -196,7 +197,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -308,13 +311,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName$1(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName$1(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
@@ -368,12 +388,22 @@ if (__DEV__) {
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
return getContextName(_context) + ".Provider";
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
@@ -18140,8 +18170,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -18155,11 +18184,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -22840,8 +22865,14 @@ if (__DEV__) {
|
||||
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
|
||||
|
||||
function updateContextProvider(current, workInProgress, renderLanes) {
|
||||
var providerType = workInProgress.type;
|
||||
var context = providerType._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
var newProps = workInProgress.pendingProps;
|
||||
var oldProps = workInProgress.memoizedProps;
|
||||
var newValue = newProps.value;
|
||||
@@ -22901,34 +22932,19 @@ if (__DEV__) {
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
var hasWarnedAboutUsingContextAsConsumer = false;
|
||||
|
||||
function updateContextConsumer(current, workInProgress, renderLanes) {
|
||||
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
var context;
|
||||
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
if (enableRenderableContext) {
|
||||
var consumerType = workInProgress.type;
|
||||
context = consumerType._context;
|
||||
} else {
|
||||
context = workInProgress.type;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
{
|
||||
if (context._context !== undefined) {
|
||||
context = context._context;
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23174,7 +23190,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider: {
|
||||
var newValue = workInProgress.memoizedProps.value;
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
pushProvider(workInProgress, context, newValue);
|
||||
break;
|
||||
}
|
||||
@@ -24176,8 +24199,14 @@ if (__DEV__) {
|
||||
var oldProps = currentParent.memoizedProps;
|
||||
|
||||
if (oldProps !== null) {
|
||||
var providerType = parent.type;
|
||||
var context = providerType._context;
|
||||
var context = void 0;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = parent.type;
|
||||
} else {
|
||||
context = parent.type._context;
|
||||
}
|
||||
|
||||
var newProps = parent.pendingProps;
|
||||
var newValue = newProps.value;
|
||||
var oldValue = oldProps.value;
|
||||
@@ -24718,7 +24747,10 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
function collectNearestContextValues(node, context, childContextValues) {
|
||||
if (node.tag === ContextProvider && node.type._context === context) {
|
||||
if (
|
||||
node.tag === ContextProvider &&
|
||||
(enableRenderableContext ? node.type : node.type._context) === context
|
||||
) {
|
||||
var contextValue = node.memoizedProps.value;
|
||||
childContextValues.push(contextValue);
|
||||
} else {
|
||||
@@ -25795,7 +25827,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider:
|
||||
// Pop provider fiber
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
bubbleProperties(workInProgress);
|
||||
return null;
|
||||
@@ -26286,7 +26325,14 @@ if (__DEV__) {
|
||||
return null;
|
||||
|
||||
case ContextProvider:
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
return null;
|
||||
|
||||
@@ -26384,7 +26430,14 @@ if (__DEV__) {
|
||||
break;
|
||||
|
||||
case ContextProvider:
|
||||
var context = interruptedWork.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = interruptedWork.type;
|
||||
} else {
|
||||
context = interruptedWork.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, interruptedWork);
|
||||
break;
|
||||
|
||||
@@ -36194,13 +36247,29 @@ if (__DEV__) {
|
||||
if (typeof type === "object" && type !== null) {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
if (!enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
// This is a consumer
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
} else {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = ForwardRef;
|
||||
@@ -36631,7 +36700,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-1596b9e6";
|
||||
var ReactVersion = "18.3.0-www-classic-25a61d97";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -131,7 +131,8 @@ if (__DEV__) {
|
||||
transitionLaneExpirationMs =
|
||||
dynamicFeatureFlags.transitionLaneExpirationMs,
|
||||
enableInfiniteRenderLoopDetection =
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, true is used for a new modern build.
|
||||
dynamicFeatureFlags.enableInfiniteRenderLoopDetection,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build.
|
||||
var enableProfilerTimer = true;
|
||||
var enableProfilerCommitHooks = true;
|
||||
var enableProfilerNestedUpdatePhase = true;
|
||||
@@ -258,7 +259,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -3610,13 +3613,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName$1(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName$1(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
@@ -3670,12 +3690,22 @@ if (__DEV__) {
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
return getContextName(_context) + ".Provider";
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
@@ -18066,8 +18096,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -18081,11 +18110,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -22705,8 +22730,14 @@ if (__DEV__) {
|
||||
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
|
||||
|
||||
function updateContextProvider(current, workInProgress, renderLanes) {
|
||||
var providerType = workInProgress.type;
|
||||
var context = providerType._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
var newProps = workInProgress.pendingProps;
|
||||
var oldProps = workInProgress.memoizedProps;
|
||||
var newValue = newProps.value;
|
||||
@@ -22766,34 +22797,19 @@ if (__DEV__) {
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
var hasWarnedAboutUsingContextAsConsumer = false;
|
||||
|
||||
function updateContextConsumer(current, workInProgress, renderLanes) {
|
||||
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
var context;
|
||||
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
if (enableRenderableContext) {
|
||||
var consumerType = workInProgress.type;
|
||||
context = consumerType._context;
|
||||
} else {
|
||||
context = workInProgress.type;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
{
|
||||
if (context._context !== undefined) {
|
||||
context = context._context;
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23033,7 +23049,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider: {
|
||||
var newValue = workInProgress.memoizedProps.value;
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
pushProvider(workInProgress, context, newValue);
|
||||
break;
|
||||
}
|
||||
@@ -24035,8 +24058,14 @@ if (__DEV__) {
|
||||
var oldProps = currentParent.memoizedProps;
|
||||
|
||||
if (oldProps !== null) {
|
||||
var providerType = parent.type;
|
||||
var context = providerType._context;
|
||||
var context = void 0;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = parent.type;
|
||||
} else {
|
||||
context = parent.type._context;
|
||||
}
|
||||
|
||||
var newProps = parent.pendingProps;
|
||||
var newValue = newProps.value;
|
||||
var oldValue = oldProps.value;
|
||||
@@ -24577,7 +24606,10 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
function collectNearestContextValues(node, context, childContextValues) {
|
||||
if (node.tag === ContextProvider && node.type._context === context) {
|
||||
if (
|
||||
node.tag === ContextProvider &&
|
||||
(enableRenderableContext ? node.type : node.type._context) === context
|
||||
) {
|
||||
var contextValue = node.memoizedProps.value;
|
||||
childContextValues.push(contextValue);
|
||||
} else {
|
||||
@@ -25647,7 +25679,14 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider:
|
||||
// Pop provider fiber
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
bubbleProperties(workInProgress);
|
||||
return null;
|
||||
@@ -26123,7 +26162,14 @@ if (__DEV__) {
|
||||
return null;
|
||||
|
||||
case ContextProvider:
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = workInProgress.type;
|
||||
} else {
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
return null;
|
||||
|
||||
@@ -26214,7 +26260,14 @@ if (__DEV__) {
|
||||
break;
|
||||
|
||||
case ContextProvider:
|
||||
var context = interruptedWork.type._context;
|
||||
var context;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
context = interruptedWork.type;
|
||||
} else {
|
||||
context = interruptedWork.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, interruptedWork);
|
||||
break;
|
||||
|
||||
@@ -36015,13 +36068,29 @@ if (__DEV__) {
|
||||
if (typeof type === "object" && type !== null) {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
if (!enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
// This is a consumer
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
} else {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = ForwardRef;
|
||||
@@ -36452,7 +36521,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-5c26b48f";
|
||||
var ReactVersion = "18.3.0-www-modern-f9a58904";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -43,8 +45,8 @@ if (__DEV__) {
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing;
|
||||
// On WWW, false is used for a new modern build.
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build.
|
||||
|
||||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
||||
function isValidElementType(type) {
|
||||
@@ -72,8 +74,9 @@ if (__DEV__) {
|
||||
if (
|
||||
type.$$typeof === REACT_LAZY_TYPE ||
|
||||
type.$$typeof === REACT_MEMO_TYPE ||
|
||||
type.$$typeof === REACT_PROVIDER_TYPE ||
|
||||
type.$$typeof === REACT_CONTEXT_TYPE ||
|
||||
(!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) ||
|
||||
(enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) ||
|
||||
type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
@@ -112,9 +115,22 @@ if (__DEV__) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
case REACT_LAZY_TYPE:
|
||||
case REACT_MEMO_TYPE:
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return $$typeofType;
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return $$typeofType;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (!enableRenderableContext) {
|
||||
return $$typeofType;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
default:
|
||||
return $$typeof;
|
||||
}
|
||||
@@ -127,8 +143,12 @@ if (__DEV__) {
|
||||
|
||||
return undefined;
|
||||
}
|
||||
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||||
var ContextProvider = REACT_PROVIDER_TYPE;
|
||||
var ContextConsumer = enableRenderableContext
|
||||
? REACT_CONSUMER_TYPE
|
||||
: REACT_CONTEXT_TYPE;
|
||||
var ContextProvider = enableRenderableContext
|
||||
? REACT_CONTEXT_TYPE
|
||||
: REACT_PROVIDER_TYPE;
|
||||
var Element = REACT_ELEMENT_TYPE;
|
||||
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||||
var Fragment = REACT_FRAGMENT_TYPE;
|
||||
@@ -140,10 +160,18 @@ if (__DEV__) {
|
||||
var Suspense = REACT_SUSPENSE_TYPE;
|
||||
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
||||
function isContextConsumer(object) {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
if (enableRenderableContext) {
|
||||
return typeOf(object) === REACT_CONSUMER_TYPE;
|
||||
} else {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
}
|
||||
}
|
||||
function isContextProvider(object) {
|
||||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
if (enableRenderableContext) {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
} else {
|
||||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
}
|
||||
}
|
||||
function isElement(object) {
|
||||
return (
|
||||
|
||||
@@ -25,7 +25,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -43,8 +45,8 @@ if (__DEV__) {
|
||||
var dynamicFeatureFlags = require("ReactFeatureFlags");
|
||||
|
||||
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing;
|
||||
// On WWW, true is used for a new modern build.
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build.
|
||||
|
||||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
||||
function isValidElementType(type) {
|
||||
@@ -72,8 +74,9 @@ if (__DEV__) {
|
||||
if (
|
||||
type.$$typeof === REACT_LAZY_TYPE ||
|
||||
type.$$typeof === REACT_MEMO_TYPE ||
|
||||
type.$$typeof === REACT_PROVIDER_TYPE ||
|
||||
type.$$typeof === REACT_CONTEXT_TYPE ||
|
||||
(!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) ||
|
||||
(enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) ||
|
||||
type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
@@ -112,9 +115,22 @@ if (__DEV__) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
case REACT_LAZY_TYPE:
|
||||
case REACT_MEMO_TYPE:
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return $$typeofType;
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return $$typeofType;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (!enableRenderableContext) {
|
||||
return $$typeofType;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
||||
default:
|
||||
return $$typeof;
|
||||
}
|
||||
@@ -127,8 +143,12 @@ if (__DEV__) {
|
||||
|
||||
return undefined;
|
||||
}
|
||||
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||||
var ContextProvider = REACT_PROVIDER_TYPE;
|
||||
var ContextConsumer = enableRenderableContext
|
||||
? REACT_CONSUMER_TYPE
|
||||
: REACT_CONTEXT_TYPE;
|
||||
var ContextProvider = enableRenderableContext
|
||||
? REACT_CONTEXT_TYPE
|
||||
: REACT_PROVIDER_TYPE;
|
||||
var Element = REACT_ELEMENT_TYPE;
|
||||
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||||
var Fragment = REACT_FRAGMENT_TYPE;
|
||||
@@ -140,10 +160,18 @@ if (__DEV__) {
|
||||
var Suspense = REACT_SUSPENSE_TYPE;
|
||||
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
||||
function isContextConsumer(object) {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
if (enableRenderableContext) {
|
||||
return typeOf(object) === REACT_CONSUMER_TYPE;
|
||||
} else {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
}
|
||||
}
|
||||
function isContextProvider(object) {
|
||||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
if (enableRenderableContext) {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
} else {
|
||||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
}
|
||||
}
|
||||
function isElement(object) {
|
||||
return (
|
||||
|
||||
@@ -17,6 +17,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -32,6 +33,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
|
||||
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
||||
function typeOf(object) {
|
||||
if ("object" === typeof object && null !== object) {
|
||||
@@ -51,8 +53,11 @@ function typeOf(object) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
case REACT_LAZY_TYPE:
|
||||
case REACT_MEMO_TYPE:
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return object;
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) return object;
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (!enableRenderableContext) return object;
|
||||
default:
|
||||
return $$typeof;
|
||||
}
|
||||
@@ -62,8 +67,13 @@ function typeOf(object) {
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.ContextConsumer = REACT_CONTEXT_TYPE;
|
||||
exports.ContextProvider = REACT_PROVIDER_TYPE;
|
||||
var ContextProvider = enableRenderableContext
|
||||
? REACT_CONTEXT_TYPE
|
||||
: REACT_PROVIDER_TYPE;
|
||||
exports.ContextConsumer = enableRenderableContext
|
||||
? REACT_CONSUMER_TYPE
|
||||
: REACT_CONTEXT_TYPE;
|
||||
exports.ContextProvider = ContextProvider;
|
||||
exports.Element = REACT_ELEMENT_TYPE;
|
||||
exports.ForwardRef = REACT_FORWARD_REF_TYPE;
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
@@ -75,10 +85,14 @@ exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
||||
exports.Suspense = REACT_SUSPENSE_TYPE;
|
||||
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
||||
exports.isContextConsumer = function (object) {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
return enableRenderableContext
|
||||
? typeOf(object) === REACT_CONSUMER_TYPE
|
||||
: typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
};
|
||||
exports.isContextProvider = function (object) {
|
||||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
return enableRenderableContext
|
||||
? typeOf(object) === REACT_CONTEXT_TYPE
|
||||
: typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
};
|
||||
exports.isElement = function (object) {
|
||||
return (
|
||||
@@ -132,8 +146,9 @@ exports.isValidElementType = function (type) {
|
||||
null !== type &&
|
||||
(type.$$typeof === REACT_LAZY_TYPE ||
|
||||
type.$$typeof === REACT_MEMO_TYPE ||
|
||||
type.$$typeof === REACT_PROVIDER_TYPE ||
|
||||
type.$$typeof === REACT_CONTEXT_TYPE ||
|
||||
(!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) ||
|
||||
(enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) ||
|
||||
type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
||||
type.$$typeof === REACT_CLIENT_REFERENCE ||
|
||||
void 0 !== type.getModuleId))
|
||||
|
||||
@@ -17,6 +17,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
||||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
||||
REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
||||
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
||||
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
||||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
||||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
||||
@@ -32,6 +33,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
dynamicFeatureFlags = require("ReactFeatureFlags"),
|
||||
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
|
||||
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
||||
function typeOf(object) {
|
||||
if ("object" === typeof object && null !== object) {
|
||||
@@ -51,8 +53,11 @@ function typeOf(object) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
case REACT_LAZY_TYPE:
|
||||
case REACT_MEMO_TYPE:
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return object;
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) return object;
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (!enableRenderableContext) return object;
|
||||
default:
|
||||
return $$typeof;
|
||||
}
|
||||
@@ -62,8 +67,13 @@ function typeOf(object) {
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.ContextConsumer = REACT_CONTEXT_TYPE;
|
||||
exports.ContextProvider = REACT_PROVIDER_TYPE;
|
||||
var ContextProvider = enableRenderableContext
|
||||
? REACT_CONTEXT_TYPE
|
||||
: REACT_PROVIDER_TYPE;
|
||||
exports.ContextConsumer = enableRenderableContext
|
||||
? REACT_CONSUMER_TYPE
|
||||
: REACT_CONTEXT_TYPE;
|
||||
exports.ContextProvider = ContextProvider;
|
||||
exports.Element = REACT_ELEMENT_TYPE;
|
||||
exports.ForwardRef = REACT_FORWARD_REF_TYPE;
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
@@ -75,10 +85,14 @@ exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
||||
exports.Suspense = REACT_SUSPENSE_TYPE;
|
||||
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
||||
exports.isContextConsumer = function (object) {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
return enableRenderableContext
|
||||
? typeOf(object) === REACT_CONSUMER_TYPE
|
||||
: typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
};
|
||||
exports.isContextProvider = function (object) {
|
||||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
return enableRenderableContext
|
||||
? typeOf(object) === REACT_CONTEXT_TYPE
|
||||
: typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
};
|
||||
exports.isElement = function (object) {
|
||||
return (
|
||||
@@ -132,8 +146,9 @@ exports.isValidElementType = function (type) {
|
||||
null !== type &&
|
||||
(type.$$typeof === REACT_LAZY_TYPE ||
|
||||
type.$$typeof === REACT_MEMO_TYPE ||
|
||||
type.$$typeof === REACT_PROVIDER_TYPE ||
|
||||
type.$$typeof === REACT_CONTEXT_TYPE ||
|
||||
(!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) ||
|
||||
(enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) ||
|
||||
type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
||||
type.$$typeof === REACT_CLIENT_REFERENCE ||
|
||||
void 0 !== type.getModuleId))
|
||||
|
||||
@@ -84,8 +84,8 @@ if (__DEV__) {
|
||||
|
||||
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
|
||||
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions;
|
||||
// On WWW, true is used for a new modern build.
|
||||
enableAsyncActions = dynamicFeatureFlags.enableAsyncActions,
|
||||
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build.
|
||||
|
||||
/**
|
||||
* Keeps track of the current Cache dispatcher.
|
||||
@@ -177,7 +177,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -362,13 +364,30 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
@@ -814,8 +833,9 @@ if (__DEV__) {
|
||||
if (
|
||||
type.$$typeof === REACT_LAZY_TYPE ||
|
||||
type.$$typeof === REACT_MEMO_TYPE ||
|
||||
type.$$typeof === REACT_PROVIDER_TYPE ||
|
||||
type.$$typeof === REACT_CONTEXT_TYPE ||
|
||||
(!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) ||
|
||||
(enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) ||
|
||||
type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
@@ -2652,7 +2672,7 @@ if (__DEV__) {
|
||||
console["error"](error);
|
||||
};
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-20165ed1";
|
||||
var ReactVersion = "18.3.0-www-modern-23ad9558";
|
||||
|
||||
// Patch fetch
|
||||
var Children = {
|
||||
|
||||
@@ -185,7 +185,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -290,13 +292,21 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
case REACT_PROVIDER_TYPE: {
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
|
||||
{
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE: {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
@@ -349,13 +359,15 @@ if (__DEV__) {
|
||||
case CacheComponent:
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
case ContextConsumer: {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
case ContextProvider: {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
@@ -11736,8 +11748,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -11751,11 +11762,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -15627,8 +15634,12 @@ if (__DEV__) {
|
||||
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
|
||||
|
||||
function updateContextProvider(current, workInProgress, renderLanes) {
|
||||
var providerType = workInProgress.type;
|
||||
var context = providerType._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
var newProps = workInProgress.pendingProps;
|
||||
var oldProps = workInProgress.memoizedProps;
|
||||
var newValue = newProps.value;
|
||||
@@ -15687,34 +15698,16 @@ if (__DEV__) {
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
var hasWarnedAboutUsingContextAsConsumer = false;
|
||||
|
||||
function updateContextConsumer(current, workInProgress, renderLanes) {
|
||||
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
var context;
|
||||
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
context = workInProgress.type;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
{
|
||||
if (context._context !== undefined) {
|
||||
context = context._context;
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15921,7 +15914,12 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider: {
|
||||
var newValue = workInProgress.memoizedProps.value;
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
pushProvider(workInProgress, context, newValue);
|
||||
break;
|
||||
}
|
||||
@@ -17859,7 +17857,12 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider:
|
||||
// Pop provider fiber
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
bubbleProperties(workInProgress);
|
||||
return null;
|
||||
@@ -18322,7 +18325,12 @@ if (__DEV__) {
|
||||
return null;
|
||||
|
||||
case ContextProvider:
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
return null;
|
||||
|
||||
@@ -18402,7 +18410,12 @@ if (__DEV__) {
|
||||
break;
|
||||
|
||||
case ContextProvider:
|
||||
var context = interruptedWork.type._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = interruptedWork.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, interruptedWork);
|
||||
break;
|
||||
|
||||
@@ -25972,14 +25985,21 @@ if (__DEV__) {
|
||||
default: {
|
||||
if (typeof type === "object" && type !== null) {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
case REACT_PROVIDER_TYPE: {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
// This is a consumer
|
||||
// Fall through
|
||||
|
||||
case REACT_CONTEXT_TYPE: {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = ForwardRef;
|
||||
@@ -26292,7 +26312,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-f4051741";
|
||||
var ReactVersion = "18.3.0-www-classic-a44f76ff";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
@@ -185,7 +185,9 @@ if (__DEV__) {
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
||||
|
||||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
@@ -290,13 +292,21 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
|
||||
case REACT_PROVIDER_TYPE:
|
||||
case REACT_PROVIDER_TYPE: {
|
||||
var provider = type;
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
|
||||
{
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE: {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
@@ -349,13 +359,15 @@ if (__DEV__) {
|
||||
case CacheComponent:
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
case ContextConsumer: {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
case ContextProvider: {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
@@ -11736,8 +11748,7 @@ if (__DEV__) {
|
||||
var isValid = // Allow null for conditional declaration
|
||||
contextType === null ||
|
||||
(contextType !== undefined &&
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE &&
|
||||
contextType._context === undefined); // Not a <Context.Consumer>
|
||||
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
||||
|
||||
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
@@ -11751,11 +11762,7 @@ if (__DEV__) {
|
||||
"try moving the createContext() call to a separate file.";
|
||||
} else if (typeof contextType !== "object") {
|
||||
addendum = " However, it is set to a " + typeof contextType + ".";
|
||||
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Provider instead?";
|
||||
} else if (contextType._context !== undefined) {
|
||||
// <Context.Consumer>
|
||||
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
||||
addendum =
|
||||
" Did you accidentally pass the Context.Consumer instead?";
|
||||
} else {
|
||||
@@ -15627,8 +15634,12 @@ if (__DEV__) {
|
||||
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
|
||||
|
||||
function updateContextProvider(current, workInProgress, renderLanes) {
|
||||
var providerType = workInProgress.type;
|
||||
var context = providerType._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
var newProps = workInProgress.pendingProps;
|
||||
var oldProps = workInProgress.memoizedProps;
|
||||
var newValue = newProps.value;
|
||||
@@ -15687,34 +15698,16 @@ if (__DEV__) {
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
var hasWarnedAboutUsingContextAsConsumer = false;
|
||||
|
||||
function updateContextConsumer(current, workInProgress, renderLanes) {
|
||||
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
|
||||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||||
// so we use the old behaviour (Context.Consumer references Context) to
|
||||
// reduce size and overhead. The separate object references context via
|
||||
// a property called "_context", which also gives us the ability to check
|
||||
// in DEV mode if this property exists or not and warn if it does not.
|
||||
var context;
|
||||
|
||||
{
|
||||
if (context._context === undefined) {
|
||||
// This may be because it's a Context (rather than a Consumer).
|
||||
// Or it may be because it's older React where they're the same thing.
|
||||
// We only want to warn if we're sure it's a new React.
|
||||
if (context !== context.Consumer) {
|
||||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||||
hasWarnedAboutUsingContextAsConsumer = true;
|
||||
context = workInProgress.type;
|
||||
|
||||
error(
|
||||
"Rendering <Context> directly is not supported and will be removed in " +
|
||||
"a future major release. Did you mean to render <Context.Consumer> instead?"
|
||||
);
|
||||
}
|
||||
{
|
||||
if (context._context !== undefined) {
|
||||
context = context._context;
|
||||
}
|
||||
} else {
|
||||
context = context._context;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15921,7 +15914,12 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider: {
|
||||
var newValue = workInProgress.memoizedProps.value;
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
pushProvider(workInProgress, context, newValue);
|
||||
break;
|
||||
}
|
||||
@@ -17859,7 +17857,12 @@ if (__DEV__) {
|
||||
|
||||
case ContextProvider:
|
||||
// Pop provider fiber
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
bubbleProperties(workInProgress);
|
||||
return null;
|
||||
@@ -18322,7 +18325,12 @@ if (__DEV__) {
|
||||
return null;
|
||||
|
||||
case ContextProvider:
|
||||
var context = workInProgress.type._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = workInProgress.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, workInProgress);
|
||||
return null;
|
||||
|
||||
@@ -18402,7 +18410,12 @@ if (__DEV__) {
|
||||
break;
|
||||
|
||||
case ContextProvider:
|
||||
var context = interruptedWork.type._context;
|
||||
var context;
|
||||
|
||||
{
|
||||
context = interruptedWork.type._context;
|
||||
}
|
||||
|
||||
popProvider(context, interruptedWork);
|
||||
break;
|
||||
|
||||
@@ -25972,14 +25985,21 @@ if (__DEV__) {
|
||||
default: {
|
||||
if (typeof type === "object" && type !== null) {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_PROVIDER_TYPE:
|
||||
case REACT_PROVIDER_TYPE: {
|
||||
fiberTag = ContextProvider;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
// This is a consumer
|
||||
// Fall through
|
||||
|
||||
case REACT_CONTEXT_TYPE: {
|
||||
fiberTag = ContextConsumer;
|
||||
break getTag;
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
|
||||
// Fall through
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
fiberTag = ForwardRef;
|
||||
@@ -26292,7 +26312,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-cc474a14";
|
||||
var ReactVersion = "18.3.0-www-modern-b84a23a6";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
@@ -102,8 +102,7 @@ export default [
|
||||
"An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",
|
||||
"Assignment to read-only property will result in a no-op: `%s`",
|
||||
"Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition.",
|
||||
"Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?",
|
||||
"Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?",
|
||||
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?",
|
||||
"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
|
||||
"Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.",
|
||||
"Cannot call startTransition while rendering.",
|
||||
@@ -269,11 +268,7 @@ export default [
|
||||
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.",
|
||||
"Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",
|
||||
"Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",
|
||||
"Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?",
|
||||
"Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?",
|
||||
"Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?",
|
||||
"Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components",
|
||||
"Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",
|
||||
"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
|
||||
"Should have found matching lanes. This is a bug in React.",
|
||||
"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().",
|
||||
|
||||
Reference in New Issue
Block a user