Unverified Commit 003b3af7 authored by Shu Ding's avatar Shu Ding Committed by GitHub

Update vendored React (#46826)

This PR updates vendored React to the latest `@next` version, as well as
corresponding changes to the manifest and module reference generation
code.

The new React version includes the following upstream changes:

- 49f741046 Fix: Infinite act loop caused by wrong shouldYield (#26317)
(Andrew Clark)
-  106ea1c58 Support Iterables in Flight (#26313) (Sebastian Markbåge)
- f905da227 [Flight] Send server reference error chunks to the client
(#26293) (Hendrik Liebau)
- e0241b660 Simplify Webpack References by encoding file path + export
name as single id (#26300) (Sebastian Markbåge)
- 25685d8a9 Codemod tests to waitFor pattern (9/?) (#26309) (Andrew
Clark)
- 64dde7082 Codemod tests to waitFor pattern (8/?) (#26308) (Andrew
Clark)
- 3cb5afb82 Codemod tests to waitFor pattern (7/?) (#26307) (Andrew
Clark)
- e98695db9 Codemod tests to waitFor pattern (6/?) (#26305) (Andrew
Clark)
- 9a52cc8bc Convert ReactLazy-test to waitFor pattern (#26304) (Andrew
Clark)
- 03462cfc7 [Fizz] External runtime: fix bug in processing existing
elements (#26303) (mofeiZ)
- faacefb4d Codemod tests to waitFor pattern (4/?) (#26302) (Andrew
Clark)
- 06460b6fb Remove unnecessary (and incorrect) code for compatibility
with Paper in the Fabric version of GlobalResponderHandler (#26290)
(Rubén Norte)
- e64a8f403 Codemod tests to waitFor pattern (3/?) (#26299) (Andrew
Clark)
- ce8a72fd4 Codemod tests to waitFor pattern (2/?) (#26296) (Andrew
Clark)
- 1f1f8eb55 [Float][Fizz][Fiber]: Refactor <style> Resource
implementation to group on flush (#26280) (Josh Story)
- 5c633a48f Add back accidentally deleted test comments (#26294) (Andrew
Clark)
- b073104c2 [DevTools] improve troubleshooting in README (#26235)
(Mengdi Chen)
- fcf218791 [DevTools] Remove renderer.js from extension build (#26234)
(Mengdi Chen)
- b72ed698f Fixed incorrect value returned as public instance from
reconciler (#26283) (Rubén Norte)
- 25a8b9735 Codemod tests to waitFor pattern (1/?) (#26288) (Andrew
Clark)
- e52446733 New internal testing helpers: waitFor, waitForAll,
waitForPaint (#26285) (Andrew Clark)
- d49e0e0be Removed unused imperative events implementation from React
Native renderer (#26282) (Rubén Norte)

---------
parent ceb028a4
...@@ -190,11 +190,11 @@ ...@@ -190,11 +190,11 @@
"random-seed": "0.3.0", "random-seed": "0.3.0",
"react": "18.2.0", "react": "18.2.0",
"react-17": "npm:react@17.0.2", "react-17": "npm:react@17.0.2",
"react-builtin": "npm:react@18.3.0-next-41110021f-20230301", "react-builtin": "npm:react@18.3.0-next-49f741046-20230305",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2", "react-dom-17": "npm:react-dom@17.0.2",
"react-dom-builtin": "npm:react-dom@18.3.0-next-41110021f-20230301", "react-dom-builtin": "npm:react-dom@18.3.0-next-49f741046-20230305",
"react-server-dom-webpack": "18.3.0-next-41110021f-20230301", "react-server-dom-webpack": "18.3.0-next-49f741046-20230305",
"react-ssr-prepass": "1.0.8", "react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3", "react-virtualized": "9.22.3",
"relay-compiler": "13.0.2", "relay-compiler": "13.0.2",
......
...@@ -2384,12 +2384,14 @@ dependencies = [ ...@@ -2384,12 +2384,14 @@ dependencies = [
"easy-error", "easy-error",
"either", "either",
"fxhash", "fxhash",
"hex",
"next-binding", "next-binding",
"once_cell", "once_cell",
"pathdiff", "pathdiff",
"regex", "regex",
"serde", "serde",
"serde_json", "serde_json",
"sha1 0.10.5",
"tracing", "tracing",
"walkdir", "walkdir",
] ]
...@@ -3639,6 +3641,17 @@ dependencies = [ ...@@ -3639,6 +3641,17 @@ dependencies = [
"sha1_smol", "sha1_smol",
] ]
[[package]]
name = "sha1"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
dependencies = [
"cfg-if 1.0.0",
"cpufeatures",
"digest",
]
[[package]] [[package]]
name = "sha1_smol" name = "sha1_smol"
version = "1.0.0" version = "1.0.0"
...@@ -3848,7 +3861,7 @@ dependencies = [ ...@@ -3848,7 +3861,7 @@ dependencies = [
"serde", "serde",
"serde_derive", "serde_derive",
"serde_json", "serde_json",
"sha1", "sha1 0.6.1",
"syn", "syn",
] ]
......
...@@ -12,11 +12,13 @@ chrono = "0.4" ...@@ -12,11 +12,13 @@ chrono = "0.4"
easy-error = "1.0.0" easy-error = "1.0.0"
either = "1" either = "1"
fxhash = "0.2.1" fxhash = "0.2.1"
hex = "0.4.3"
once_cell = "1.13.0" once_cell = "1.13.0"
pathdiff = "0.2.0" pathdiff = "0.2.0"
regex = "1.5" regex = "1.5"
serde = "1" serde = "1"
serde_json = "1" serde_json = "1"
sha1 = "0.10.1"
tracing = { version = "0.1.37", features = ["release_max_level_info"] } tracing = { version = "0.1.37", features = ["release_max_level_info"] }
next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230302.2", features = [ next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230302.2", features = [
......
use std::convert::{TryFrom, TryInto}; use std::convert::{TryFrom, TryInto};
use hex::encode as hex_encode;
use next_binding::swc::core::{ use next_binding::swc::core::{
common::{ common::{
comments::{Comment, CommentKind, Comments}, comments::{Comment, CommentKind, Comments},
...@@ -15,6 +16,7 @@ use next_binding::swc::core::{ ...@@ -15,6 +16,7 @@ use next_binding::swc::core::{
}, },
}; };
use serde::Deserialize; use serde::Deserialize;
use sha1::{Digest, Sha1};
#[derive(Clone, Debug, Deserialize)] #[derive(Clone, Debug, Deserialize)]
#[serde(deny_unknown_fields, rename_all = "camelCase")] #[serde(deny_unknown_fields, rename_all = "camelCase")]
...@@ -146,16 +148,17 @@ impl<C: Comments> ServerActions<C> { ...@@ -146,16 +148,17 @@ impl<C: Comments> ServerActions<C> {
.into(), .into(),
)); ));
// myAction.$$filepath = '/app/page.tsx'; // Attach a checksum to the action using sha1:
self.annotations.push(annotate( // myAction.$$id = sha1('file_name' + ':' + 'action_name');
ident, let mut hasher = Sha1::new();
"$$filepath", hasher.update(self.file_name.to_string().as_bytes());
self.file_name.to_string().into(), hasher.update(b":");
)); hasher.update(action_name.as_bytes());
let result = hasher.finalize();
// myAction.$$name = '$ACTION_myAction'; // Convert result to hex string
self.annotations self.annotations
.push(annotate(ident, "$$name", action_name.into())); .push(annotate(ident, "$$id", hex_encode(result).into()));
if self.top_level { if self.top_level {
// myAction.$$bound = []; // myAction.$$bound = [];
......
/* __next_internal_action_entry_do_not_use__ foo */ export function foo() {} /* __next_internal_action_entry_do_not_use__ foo */ export function foo() {}
foo.$$typeof = Symbol.for("react.server.reference"); foo.$$typeof = Symbol.for("react.server.reference");
foo.$$filepath = "/app/item.js"; foo.$$id = "ab21efdafbe611287bc25c0462b1e0510d13e48b";
foo.$$name = "foo";
foo.$$bound = []; foo.$$bound = [];
\ No newline at end of file
/* __next_internal_action_entry_do_not_use__ bar */ 'use strict'; /* __next_internal_action_entry_do_not_use__ bar */ 'use strict';
export function bar() {} export function bar() {}
bar.$$typeof = Symbol.for("react.server.reference"); bar.$$typeof = Symbol.for("react.server.reference");
bar.$$filepath = "/app/item.js"; bar.$$id = "ac840dcaf5e8197cb02b7f3a43c119b7a770b272";
bar.$$name = "bar";
bar.$$bound = []; bar.$$bound = [];
\ No newline at end of file
...@@ -4,8 +4,7 @@ export function Item({ id1 , id2 }) { ...@@ -4,8 +4,7 @@ export function Item({ id1 , id2 }) {
return $ACTION_deleteItem(deleteItem.$$bound); return $ACTION_deleteItem(deleteItem.$$bound);
} }
deleteItem.$$typeof = Symbol.for("react.server.reference"); deleteItem.$$typeof = Symbol.for("react.server.reference");
deleteItem.$$filepath = "/app/item.js"; deleteItem.$$id = "de52fdc8536c533b05b2e525bd43b18cf019cbb3";
deleteItem.$$name = "$ACTION_deleteItem";
deleteItem.$$bound = [ deleteItem.$$bound = [
id1, id1,
id2 id2
......
/* __next_internal_action_entry_do_not_use__ foo */ export default async function foo() {} /* __next_internal_action_entry_do_not_use__ foo */ export default async function foo() {}
foo.$$typeof = Symbol.for("react.server.reference"); foo.$$typeof = Symbol.for("react.server.reference");
foo.$$filepath = "/app/item.js"; foo.$$id = "ab21efdafbe611287bc25c0462b1e0510d13e48b";
foo.$$name = "foo";
foo.$$bound = []; foo.$$bound = [];
\ No newline at end of file
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
console.log('a'); console.log('a');
} }
myAction.$$typeof = Symbol.for("react.server.reference"); myAction.$$typeof = Symbol.for("react.server.reference");
myAction.$$filepath = "/app/item.js"; myAction.$$id = "c67fa6a80e65945a14b1fac181d282d79bba49b7";
myAction.$$name = "$ACTION_myAction";
myAction.$$bound = []; myAction.$$bound = [];
export const $ACTION_myAction = myAction; export const $ACTION_myAction = myAction;
export default function Page() { export default function Page() {
......
...@@ -3,6 +3,5 @@ ...@@ -3,6 +3,5 @@
console.log('a'); console.log('a');
} }
myAction.$$typeof = Symbol.for("react.server.reference"); myAction.$$typeof = Symbol.for("react.server.reference");
myAction.$$filepath = "/app/item.js"; myAction.$$id = "e10665baac148856374b2789aceb970f66fec33e";
myAction.$$name = "myAction";
myAction.$$bound = []; myAction.$$bound = [];
/* __next_internal_action_entry_do_not_use__ a,b,c,$ACTION_e */ export async function a() {} /* __next_internal_action_entry_do_not_use__ a,b,c,$ACTION_e */ export async function a() {}
a.$$typeof = Symbol.for("react.server.reference"); a.$$typeof = Symbol.for("react.server.reference");
a.$$filepath = "/app/item.js"; a.$$id = "6e7bc104e4d6e7fda190c4a51be969cfd0be6d6d";
a.$$name = "a";
a.$$bound = []; a.$$bound = [];
export async function b() {} export async function b() {}
b.$$typeof = Symbol.for("react.server.reference"); b.$$typeof = Symbol.for("react.server.reference");
b.$$filepath = "/app/item.js"; b.$$id = "d1f7eb64271d7c601dfef7d4d7053de1c2ca4338";
b.$$name = "b";
b.$$bound = []; b.$$bound = [];
export async function c() {} export async function c() {}
c.$$typeof = Symbol.for("react.server.reference"); c.$$typeof = Symbol.for("react.server.reference");
c.$$filepath = "/app/item.js"; c.$$id = "1ab723c80dcca470e0410b4b2a2fc2bf21f41476";
c.$$name = "c";
c.$$bound = []; c.$$bound = [];
function d() {} function d() {}
function Foo() { function Foo() {
...@@ -19,8 +16,7 @@ function Foo() { ...@@ -19,8 +16,7 @@ function Foo() {
return $ACTION_e(e.$$bound); return $ACTION_e(e.$$bound);
} }
e.$$typeof = Symbol.for("react.server.reference"); e.$$typeof = Symbol.for("react.server.reference");
e.$$filepath = "/app/item.js"; e.$$id = "b6c8c6754aefb804cf95f444931ba7e955c0701d";
e.$$name = "$ACTION_e";
e.$$bound = []; e.$$bound = [];
} }
export async function $ACTION_e(closure) {} export async function $ACTION_e(closure) {}
\ No newline at end of file
...@@ -6,8 +6,7 @@ export function Item({ id1 , id2 }) { ...@@ -6,8 +6,7 @@ export function Item({ id1 , id2 }) {
return $ACTION_deleteItem(deleteItem.$$bound); return $ACTION_deleteItem(deleteItem.$$bound);
} }
deleteItem.$$typeof = Symbol.for("react.server.reference"); deleteItem.$$typeof = Symbol.for("react.server.reference");
deleteItem.$$filepath = "/app/item.js"; deleteItem.$$id = "de52fdc8536c533b05b2e525bd43b18cf019cbb3";
deleteItem.$$name = "$ACTION_deleteItem";
deleteItem.$$bound = [ deleteItem.$$bound = [
id1, id1,
v2 v2
......
...@@ -21,8 +21,7 @@ export function y(p, [p1, { p2 }], ...p3) { ...@@ -21,8 +21,7 @@ export function y(p, [p1, { p2 }], ...p3) {
return $ACTION_action(action.$$bound); return $ACTION_action(action.$$bound);
} }
action.$$typeof = Symbol.for("react.server.reference"); action.$$typeof = Symbol.for("react.server.reference");
action.$$filepath = "/app/item.js"; action.$$id = "b3d2707f04906fa37fdc7bee4f53e41053034751";
action.$$name = "$ACTION_action";
action.$$bound = [ action.$$bound = [
f2, f2,
f2, f2,
......
...@@ -4,8 +4,7 @@ export function Item(product, foo, bar) { ...@@ -4,8 +4,7 @@ export function Item(product, foo, bar) {
return $ACTION_deleteItem(deleteItem.$$bound); return $ACTION_deleteItem(deleteItem.$$bound);
} }
deleteItem.$$typeof = Symbol.for("react.server.reference"); deleteItem.$$typeof = Symbol.for("react.server.reference");
deleteItem.$$filepath = "/app/item.js"; deleteItem.$$id = "de52fdc8536c533b05b2e525bd43b18cf019cbb3";
deleteItem.$$name = "$ACTION_deleteItem";
deleteItem.$$bound = [ deleteItem.$$bound = [
product.id, product.id,
product?.foo, product?.foo,
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
console.log('a'); console.log('a');
} }
myAction.$$typeof = Symbol.for("react.server.reference"); myAction.$$typeof = Symbol.for("react.server.reference");
myAction.$$filepath = "/app/item.js"; myAction.$$id = "c67fa6a80e65945a14b1fac181d282d79bba49b7";
myAction.$$name = "$ACTION_myAction";
myAction.$$bound = []; myAction.$$bound = [];
export const $ACTION_myAction = myAction; export const $ACTION_myAction = myAction;
export default function Page() { export default function Page() {
......
// app/send.ts // app/send.ts
/* __next_internal_action_entry_do_not_use__ foo,bar,qux */ async function foo() {} /* __next_internal_action_entry_do_not_use__ foo,bar,qux */ async function foo() {}
foo.$$typeof = Symbol.for("react.server.reference"); foo.$$typeof = Symbol.for("react.server.reference");
foo.$$filepath = "/app/item.js"; foo.$$id = "ab21efdafbe611287bc25c0462b1e0510d13e48b";
foo.$$name = "foo";
foo.$$bound = []; foo.$$bound = [];
export { foo }; export { foo };
async function bar() {} async function bar() {}
bar.$$typeof = Symbol.for("react.server.reference"); bar.$$typeof = Symbol.for("react.server.reference");
bar.$$filepath = "/app/item.js"; bar.$$id = "ac840dcaf5e8197cb02b7f3a43c119b7a770b272";
bar.$$name = "bar";
bar.$$bound = []; bar.$$bound = [];
export { bar as baz }; export { bar as baz };
async function qux() {} async function qux() {}
qux.$$typeof = Symbol.for("react.server.reference"); qux.$$typeof = Symbol.for("react.server.reference");
qux.$$filepath = "/app/item.js"; qux.$$id = "3c8ed39a99caf636869d076cc7cae786a4053164";
qux.$$name = "qux";
qux.$$bound = []; qux.$$bound = [];
export { qux as default }; export { qux as default };
\ No newline at end of file
...@@ -18,14 +18,14 @@ const deepProxyHandlers = { ...@@ -18,14 +18,14 @@ const deepProxyHandlers = {
// These names are a little too common. We should probably have a way to // These names are a little too common. We should probably have a way to
// have the Flight runtime extract the inner target instead. // have the Flight runtime extract the inner target instead.
return target.$$typeof return target.$$typeof
case 'filepath': case '$$id':
return target.filepath return target.$$id
case '$$async':
return target.$$async
case 'name': case 'name':
return target.name return target.name
case 'displayName': case 'displayName':
return undefined return undefined
case 'async':
return target.async
// We need to special case this because createElement reads it if we pass this // We need to special case this because createElement reads it if we pass this
// reference. // reference.
case 'defaultProps': case 'defaultProps':
...@@ -45,17 +45,7 @@ const deepProxyHandlers = { ...@@ -45,17 +45,7 @@ const deepProxyHandlers = {
default: default:
break break
} }
let expression const expression = String(target.name) + '.' + String(name)
switch (target.name) {
case '':
expression = String(name)
break
case '*':
expression = String(name)
break
default:
expression = String(target.name) + '.' + String(name)
}
throw new Error( throw new Error(
`Cannot access ${expression} on the server. ` + `Cannot access ${expression} on the server. ` +
'You cannot dot into a client module from a server component. ' + 'You cannot dot into a client module from a server component. ' +
...@@ -72,15 +62,13 @@ const proxyHandlers = { ...@@ -72,15 +62,13 @@ const proxyHandlers = {
switch (name) { switch (name) {
// These names are read by the Flight runtime if you end up using the exports object. // These names are read by the Flight runtime if you end up using the exports object.
case '$$typeof': case '$$typeof':
// These names are a little too common. We should probably have a way to
// have the Flight runtime extract the inner target instead.
return target.$$typeof return target.$$typeof
case 'filepath': case '$$id':
return target.filepath return target.$$id
case '$$async':
return target.$$async
case 'name': case 'name':
return target.name return target.name
case 'async':
return target.async
// We need to special case this because createElement reads it if we pass this // We need to special case this because createElement reads it if we pass this
// reference. // reference.
case 'defaultProps': case 'defaultProps':
...@@ -94,7 +82,7 @@ const proxyHandlers = { ...@@ -94,7 +82,7 @@ const proxyHandlers = {
case '__esModule': case '__esModule':
// Something is conditionally checking which export to use. We'll pretend to be // Something is conditionally checking which export to use. We'll pretend to be
// an ESM compat module but then we'll check again on the client. // an ESM compat module but then we'll check again on the client.
const moduleId = target.filepath const moduleId = target.$$id
target.default = Object.defineProperties( target.default = Object.defineProperties(
function () { function () {
throw new Error( throw new Error(
...@@ -105,12 +93,11 @@ const proxyHandlers = { ...@@ -105,12 +93,11 @@ const proxyHandlers = {
) )
}, },
{ {
$$typeof: { value: CLIENT_REFERENCE },
// This a placeholder value that tells the client to conditionally use the // This a placeholder value that tells the client to conditionally use the
// whole object or just the default export. // whole object or just the default export.
name: { value: '' }, $$id: { value: target.$$id + '#' },
$$typeof: { value: CLIENT_REFERENCE }, $$async: { value: target.$$async },
filepath: { value: target.filepath },
async: { value: target.async },
} }
) )
return true return true
...@@ -119,7 +106,7 @@ const proxyHandlers = { ...@@ -119,7 +106,7 @@ const proxyHandlers = {
// Use a cached value // Use a cached value
return target.then return target.then
} }
if (!target.async) { if (!target.$$async) {
// If this module is expected to return a Promise (such as an AsyncModule) then // If this module is expected to return a Promise (such as an AsyncModule) then
// we should resolve that with a client reference that unwraps the Promise on // we should resolve that with a client reference that unwraps the Promise on
// the client. // the client.
...@@ -127,11 +114,9 @@ const proxyHandlers = { ...@@ -127,11 +114,9 @@ const proxyHandlers = {
const clientReference = Object.defineProperties( const clientReference = Object.defineProperties(
{}, {},
{ {
// Represents the whole Module object instead of a particular import.
name: { value: '*' },
$$typeof: { value: CLIENT_REFERENCE }, $$typeof: { value: CLIENT_REFERENCE },
filepath: { value: target.filepath }, $$id: { value: target.$$id },
async: { value: true }, $$async: { value: true },
} }
) )
const proxy = new Proxy(clientReference, proxyHandlers) const proxy = new Proxy(clientReference, proxyHandlers)
...@@ -151,10 +136,9 @@ const proxyHandlers = { ...@@ -151,10 +136,9 @@ const proxyHandlers = {
// If this is not used as a Promise but is treated as a reference to a `.then` // If this is not used as a Promise but is treated as a reference to a `.then`
// export then we should treat it as a reference to that name. // export then we should treat it as a reference to that name.
{ {
name: { value: 'then' },
$$typeof: { value: CLIENT_REFERENCE }, $$typeof: { value: CLIENT_REFERENCE },
filepath: { value: target.filepath }, $$id: { value: target.$$id },
async: { value: false }, $$async: { value: false },
} }
)) ))
return then return then
...@@ -180,10 +164,9 @@ const proxyHandlers = { ...@@ -180,10 +164,9 @@ const proxyHandlers = {
) )
}, },
{ {
name: { value: name },
$$typeof: { value: CLIENT_REFERENCE }, $$typeof: { value: CLIENT_REFERENCE },
filepath: { value: target.filepath }, $$id: { value: target.$$id + '#' + name },
async: { value: target.async }, $$async: { value: target.$$async },
} }
) )
cachedReference = target[name] = new Proxy(reference, deepProxyHandlers) cachedReference = target[name] = new Proxy(reference, deepProxyHandlers)
...@@ -203,11 +186,10 @@ export function createProxy(moduleId: string) { ...@@ -203,11 +186,10 @@ export function createProxy(moduleId: string) {
const clientReference = Object.defineProperties( const clientReference = Object.defineProperties(
{}, {},
{ {
// Represents the whole object instead of a particular import.
name: { value: '*' },
$$typeof: { value: CLIENT_REFERENCE }, $$typeof: { value: CLIENT_REFERENCE },
filepath: { value: moduleId }, // Represents the whole Module object instead of a particular import.
async: { value: false }, $$id: { value: moduleId },
$$async: { value: false },
} }
) )
return new Proxy(clientReference, proxyHandlers) return new Proxy(clientReference, proxyHandlers)
......
...@@ -19,13 +19,6 @@ import { traverseModules } from '../utils' ...@@ -19,13 +19,6 @@ import { traverseModules } from '../utils'
import { nonNullable } from '../../../lib/non-nullable' import { nonNullable } from '../../../lib/non-nullable'
import { WEBPACK_LAYERS } from '../../../lib/constants' import { WEBPACK_LAYERS } from '../../../lib/constants'
// This is the module that will be used to anchor all client references to.
// I.e. it will have all the client files as async deps from this point on.
// We use the Flight client implementation because you can't get to these
// without the client runtime so it's the first time in the loading sequence
// you might want them.
// const clientFileName = require.resolve('../');
interface Options { interface Options {
dev: boolean dev: boolean
appDir: string appDir: string
...@@ -69,17 +62,15 @@ interface ManifestNode { ...@@ -69,17 +62,15 @@ interface ManifestNode {
export type FlightManifest = { export type FlightManifest = {
__ssr_module_mapping__: { __ssr_module_mapping__: {
[moduleId: string]: ManifestNode [modulePath: string]: ManifestNode
} }
__edge_ssr_module_mapping__: { __edge_ssr_module_mapping__: {
[moduleId: string]: ManifestNode [modulePath: string]: ManifestNode
} }
__entry_css_files__: { __entry_css_files__: {
[entryPathWithoutExtension: string]: string[] [entryPathWithoutExtension: string]: string[]
} }
} & { } & ManifestNode
[modulePath: string]: ManifestNode
}
export type FlightCSSManifest = { export type FlightCSSManifest = {
[modulePath: string]: string[] [modulePath: string]: string[]
...@@ -135,6 +126,7 @@ export class FlightManifestPlugin { ...@@ -135,6 +126,7 @@ export class FlightManifestPlugin {
compilation: webpack.Compilation, compilation: webpack.Compilation,
context: string context: string
) { ) {
// @ts-ignore
const manifest: FlightManifest = { const manifest: FlightManifest = {
__ssr_module_mapping__: {}, __ssr_module_mapping__: {},
__edge_ssr_module_mapping__: {}, __edge_ssr_module_mapping__: {},
...@@ -191,7 +183,6 @@ export class FlightManifestPlugin { ...@@ -191,7 +183,6 @@ export class FlightManifestPlugin {
return return
} }
const moduleExports = manifest[resource] || {}
const moduleIdMapping = manifest.__ssr_module_mapping__ const moduleIdMapping = manifest.__ssr_module_mapping__
const edgeModuleIdMapping = manifest.__edge_ssr_module_mapping__ const edgeModuleIdMapping = manifest.__edge_ssr_module_mapping__
...@@ -207,20 +198,18 @@ export class FlightManifestPlugin { ...@@ -207,20 +198,18 @@ export class FlightManifestPlugin {
ssrNamedModuleId = `./${ssrNamedModuleId.replace(/\\/g, '/')}` ssrNamedModuleId = `./${ssrNamedModuleId.replace(/\\/g, '/')}`
if (isCSSModule) { if (isCSSModule) {
if (!manifest[resource]) { if (!manifest[resource + '#']) {
manifest[resource] = { manifest[resource + '#'] = {
default: { id: id || '',
id, name: '',
name: 'default', chunks: chunkCSS,
chunks: chunkCSS,
},
} }
} else { } else {
// It is possible that there are multiple modules with the same resource, // It is possible that there are multiple modules with the same resource,
// e.g. extracted by mini-css-extract-plugin. In that case we need to // e.g. extracted by mini-css-extract-plugin. In that case we need to
// merge the chunks. // merge the chunks.
manifest[resource].default.chunks = [ manifest[resource + '#'].chunks = [
...new Set([...manifest[resource].default.chunks, ...chunkCSS]), ...new Set([...manifest[resource + '#'].chunks, ...chunkCSS]),
] ]
} }
...@@ -237,25 +226,29 @@ export class FlightManifestPlugin { ...@@ -237,25 +226,29 @@ export class FlightManifestPlugin {
const isAsyncModule = this.ASYNC_CLIENT_MODULES.has(mod.resource) const isAsyncModule = this.ASYNC_CLIENT_MODULES.has(mod.resource)
const cjsExports = [ const cjsExports = [
...new Set([ ...new Set(
...mod.dependencies.map((dep) => { [
// Match CommonJsSelfReferenceDependency ...mod.dependencies.map((dep) => {
if (dep.type === 'cjs self exports reference') { // Match CommonJsSelfReferenceDependency
// @ts-expect-error: TODO: Fix Dependency type if (dep.type === 'cjs self exports reference') {
if (dep.base === 'module.exports') { // @ts-expect-error: TODO: Fix Dependency type
return 'default' if (dep.base === 'module.exports') {
} return 'default'
}
// `exports.foo = ...`, `exports.default = ...` // `exports.foo = ...`, `exports.default = ...`
// @ts-expect-error: TODO: Fix Dependency type
if (dep.base === 'exports') {
// @ts-expect-error: TODO: Fix Dependency type // @ts-expect-error: TODO: Fix Dependency type
return dep.names.filter((name: any) => name !== '__esModule') if (dep.base === 'exports') {
// @ts-expect-error: TODO: Fix Dependency type
return dep.names.filter(
(name: any) => name !== '__esModule'
)
}
} }
} return null
return null }),
}), ].flat()
]), ),
] ]
function getAppPathRequiredChunks() { function getAppPathRequiredChunks() {
...@@ -274,42 +267,60 @@ export class FlightManifestPlugin { ...@@ -274,42 +267,60 @@ export class FlightManifestPlugin {
}) })
.filter(nonNullable) .filter(nonNullable)
} }
const requiredChunks = getAppPathRequiredChunks()
const moduleExportedKeys = ['', '*'] // The client compiler will always use the CJS Next.js build, so here we
.concat( // also add the mapping for the ESM build (Edge runtime) to consume.
[...exportsInfo.exports] const esmResource = /[\\/]next[\\/]dist[\\/]/.test(resource)
.filter((exportInfo) => exportInfo.provided) ? resource.replace(
.map((exportInfo) => exportInfo.name), /[\\/]next[\\/]dist[\\/]/,
...cjsExports '/next/dist/esm/'.replace(/\//g, path.sep)
) )
.filter((name) => name !== null) : null
moduleExportedKeys.forEach((name) => {
// If the chunk is from `app/` chunkGroup, use it first.
// This make sure not to load the overlapped chunk from `pages/` chunkGroup
if (
!moduleExports[name] ||
(chunkGroup.name && /^app[\\/]/.test(chunkGroup.name))
) {
const requiredChunks = getAppPathRequiredChunks()
moduleExports[name] = { function addClientReference(name: string) {
if (name === '*') {
manifest[resource] = {
id, id,
name,
chunks: requiredChunks, chunks: requiredChunks,
// E.g. name: '*',
// page (server) -> local module (client) -> package (esm)
// The esm package will bubble up to make the entire chain till the client entry as async module.
async: isAsyncModule, async: isAsyncModule,
} }
if (esmResource) {
manifest[esmResource] = manifest[resource]
}
} else if (name === '') {
manifest[resource + '#'] = {
id,
chunks: requiredChunks,
name: '',
async: isAsyncModule,
}
if (esmResource) {
manifest[esmResource + '#'] = manifest[resource + '#']
}
} else {
manifest[resource + '#' + name] = {
id,
chunks: requiredChunks,
name,
async: isAsyncModule,
}
if (esmResource) {
manifest[esmResource + '#' + name] =
manifest[resource + '#' + name]
}
} }
}
function addSSRIdMapping(name: string) {
const key = resource + (name === '*' ? '' : '#' + name)
if ( if (
typeof pluginState.serverModuleIds[ssrNamedModuleId] !== 'undefined' typeof pluginState.serverModuleIds[ssrNamedModuleId] !== 'undefined'
) { ) {
moduleIdMapping[id] = moduleIdMapping[id] || {} moduleIdMapping[id] = moduleIdMapping[id] || {}
moduleIdMapping[id][name] = { moduleIdMapping[id][name] = {
...moduleExports[name], ...manifest[key],
id: pluginState.serverModuleIds[ssrNamedModuleId], id: pluginState.serverModuleIds[ssrNamedModuleId],
} }
} }
...@@ -320,24 +331,38 @@ export class FlightManifestPlugin { ...@@ -320,24 +331,38 @@ export class FlightManifestPlugin {
) { ) {
edgeModuleIdMapping[id] = edgeModuleIdMapping[id] || {} edgeModuleIdMapping[id] = edgeModuleIdMapping[id] || {}
edgeModuleIdMapping[id][name] = { edgeModuleIdMapping[id][name] = {
...moduleExports[name], ...manifest[key],
id: pluginState.edgeServerModuleIds[ssrNamedModuleId], id: pluginState.edgeServerModuleIds[ssrNamedModuleId],
} }
} }
}) }
manifest[resource] = moduleExports addClientReference('*')
addClientReference('')
addSSRIdMapping('*')
addSSRIdMapping('')
// The client compiler will always use the CJS Next.js build, so here we const moduleExportedKeys = [
// also add the mapping for the ESM build (Edge runtime) to consume. ...[...exportsInfo.exports]
if (/[\\/]next[\\/]dist[\\/]/.test(resource)) { .filter((exportInfo) => exportInfo.provided)
manifest[ .map((exportInfo) => exportInfo.name),
resource.replace( ...cjsExports,
/[\\/]next[\\/]dist[\\/]/, ].filter((name) => name !== null)
'/next/dist/esm/'.replace(/\//g, path.sep)
) moduleExportedKeys.forEach((name) => {
] = moduleExports const key = resource + '#' + name
}
// If the chunk is from `app/` chunkGroup, use it first.
// This make sure not to load the overlapped chunk from `pages/` chunkGroup
if (
!manifest[key] ||
(chunkGroup.name && /^app[\\/]/.test(chunkGroup.name))
) {
addClientReference(name)
}
addSSRIdMapping(name)
})
manifest.__ssr_module_mapping__ = moduleIdMapping manifest.__ssr_module_mapping__ = moduleIdMapping
manifest.__edge_ssr_module_mapping__ = edgeModuleIdMapping manifest.__edge_ssr_module_mapping__ = edgeModuleIdMapping
......
...@@ -66,16 +66,6 @@ const getCacheKey = () => { ...@@ -66,16 +66,6 @@ const getCacheKey = () => {
return pathname + search return pathname + search
} }
async function sha1(message: string) {
const arrayBuffer = await crypto.subtle.digest(
'SHA-1',
new TextEncoder().encode(message)
)
const data = Array.from(new Uint8Array(arrayBuffer))
const hex = data.map((b) => b.toString(16).padStart(2, '0')).join('')
return hex
}
const encoder = new TextEncoder() const encoder = new TextEncoder()
let initialServerDataBuffer: string[] | undefined = undefined let initialServerDataBuffer: string[] | undefined = undefined
...@@ -161,14 +151,10 @@ function useInitialServerResponse(cacheKey: string): Promise<JSX.Element> { ...@@ -161,14 +151,10 @@ function useInitialServerResponse(cacheKey: string): Promise<JSX.Element> {
}) })
const newResponse = createFromReadableStream(readable, { const newResponse = createFromReadableStream(readable, {
async callServer( async callServer(id: string, args: any[]) {
metadata: { console.log('callServer', id, args)
id: string
name: string const actionId = id
},
args: any[]
) {
const actionId = await sha1(metadata.id + ':' + metadata.name)
// Fetching the current url with the action header. // Fetching the current url with the action header.
// TODO: Refactor this to look up from a manifest. // TODO: Refactor this to look up from a manifest.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -14,7 +14,7 @@ if (process.env.NODE_ENV !== "production") { ...@@ -14,7 +14,7 @@ if (process.env.NODE_ENV !== "production") {
(function() { (function() {
'use strict'; 'use strict';
var ReactVersion = '18.3.0-next-41110021f-20230301'; var ReactVersion = '18.3.0-next-49f741046-20230305';
var Internals = { var Internals = {
usingClientEntryPoint: false, usingClientEntryPoint: false,
......
...@@ -8,4 +8,4 @@ ...@@ -8,4 +8,4 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
'use strict';var b={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function d(a){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)e+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b; 'use strict';var b={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function d(a){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)e+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b;
exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preconnect=function(){var a=b.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=b.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-next-41110021f-20230301"; exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preconnect=function(){var a=b.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=b.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-next-49f741046-20230305";
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -11963,7 +11963,7 @@ function styleTagPropsFromRawProps(rawProps) { ...@@ -11963,7 +11963,7 @@ function styleTagPropsFromRawProps(rawProps) {
function getStyleKey(href) { function getStyleKey(href) {
var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href); var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);
return "href=\"" + limitedEscapedHref + "\""; return "href~=\"" + limitedEscapedHref + "\"";
} }
function getStyleTagSelectorFromKey(key) { function getStyleTagSelectorFromKey(key) {
...@@ -30588,7 +30588,17 @@ function renderRootConcurrent(root, lanes) { ...@@ -30588,7 +30588,17 @@ function renderRootConcurrent(root, lanes) {
} }
} }
workLoopConcurrent(); if (true && ReactCurrentActQueue.current !== null) {
// `act` special case: If we're inside an `act` scope, don't consult
// `shouldYield`. Always keep working until the render is complete.
// This is not just an optimization: in a unit test environment, we
// can't trust the result of `shouldYield`, because the host I/O is
// likely mocked.
workLoopSync();
} else {
workLoopConcurrent();
}
break; break;
} catch (thrownValue) { } catch (thrownValue) {
handleThrow(root, thrownValue); handleThrow(root, thrownValue);
...@@ -33046,7 +33056,7 @@ identifierPrefix, onRecoverableError, transitionCallbacks) { ...@@ -33046,7 +33056,7 @@ identifierPrefix, onRecoverableError, transitionCallbacks) {
return root; return root;
} }
var ReactVersion = '18.3.0-next-41110021f-20230301'; var ReactVersion = '18.3.0-next-49f741046-20230305';
function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
implementation) { implementation) {
...@@ -33141,7 +33151,7 @@ function findHostInstanceWithWarning(component, methodName) { ...@@ -33141,7 +33151,7 @@ function findHostInstanceWithWarning(component, methodName) {
} }
} }
return hostFiber.stateNode; return getPublicInstance(hostFiber.stateNode);
} }
} }
...@@ -33338,7 +33348,7 @@ function findHostInstanceWithNoPortals(fiber) { ...@@ -33338,7 +33348,7 @@ function findHostInstanceWithNoPortals(fiber) {
return null; return null;
} }
return hostFiber.stateNode; return getPublicInstance(hostFiber.stateNode);
} }
var shouldErrorImpl = function (fiber) { var shouldErrorImpl = function (fiber) {
...@@ -135,7 +135,7 @@ e=tg(a),f=d.get(e),f||(f=c.querySelector("script[async]"+e),f||(a={src:a,async:! ...@@ -135,7 +135,7 @@ e=tg(a),f=d.get(e),f||(f=c.querySelector("script[async]"+e),f||(a={src:a,async:!
rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity},lg.set(f,a),null===c.querySelector(e)&&(b=Rf("link",a,c,"http://www.w3.org/1999/xhtml"),Sf(b,"link",a),b[ma]=!0,c.head.appendChild(b)))}}} rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity},lg.set(f,a),null===c.querySelector(e)&&(b=Rf("link",a,c,"http://www.w3.org/1999/xhtml"),Sf(b,"link",a),b[ma]=!0,c.head.appendChild(b)))}}}
function yg(a,b,c){b=og();if(!b)throw Error(q(446));switch(a){case "meta":case "title":return null;case "style":return"string"===typeof c.precedence&&"string"===typeof c.href?(c=sg(c.href),b=ta(b).hoistableStyles,a=b.get(c),a||(a={type:"style",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};case "link":if("stylesheet"===c.rel&&"string"===typeof c.href&&"string"===typeof c.precedence){var d=sg(c.href),e=ta(b).hoistableStyles;a=e.get(d);a||(b=b.ownerDocument||b,a={type:"stylesheet", function yg(a,b,c){b=og();if(!b)throw Error(q(446));switch(a){case "meta":case "title":return null;case "style":return"string"===typeof c.precedence&&"string"===typeof c.href?(c=sg(c.href),b=ta(b).hoistableStyles,a=b.get(c),a||(a={type:"style",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};case "link":if("stylesheet"===c.rel&&"string"===typeof c.href&&"string"===typeof c.precedence){var d=sg(c.href),e=ta(b).hoistableStyles;a=e.get(d);a||(b=b.ownerDocument||b,a={type:"stylesheet",
instance:null,count:0},e.set(d,a),lg.has(d)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},lg.set(d,c),b.querySelector(ug(d))||null!==b.querySelector('link[rel="preload"][as="style"]['+d+"]")||(d=Rf("link",c,b,"http://www.w3.org/1999/xhtml"),Sf(d,"link",c),d[ma]=!0,b.head.appendChild(d))));return a}return null;case "script":return"string"===typeof c.src&&!0===c.async?(c=tg(c.src),b=ta(b).hoistableScripts, instance:null,count:0},e.set(d,a),lg.has(d)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},lg.set(d,c),b.querySelector(ug(d))||null!==b.querySelector('link[rel="preload"][as="style"]['+d+"]")||(d=Rf("link",c,b,"http://www.w3.org/1999/xhtml"),Sf(d,"link",c),d[ma]=!0,b.head.appendChild(d))));return a}return null;case "script":return"string"===typeof c.src&&!0===c.async?(c=tg(c.src),b=ta(b).hoistableScripts,
a=b.get(c),a||(a={type:"script",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};default:throw Error(q(444,a));}}function sg(a){return'href="'+rg(a)+'"'}function ug(a){return'link[rel="stylesheet"]['+a+"]"}function tg(a){return'[src="'+rg(a)+'"]'} a=b.get(c),a||(a={type:"script",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};default:throw Error(q(444,a));}}function sg(a){return'href~="'+rg(a)+'"'}function ug(a){return'link[rel="stylesheet"]['+a+"]"}function tg(a){return'[src="'+rg(a)+'"]'}
function zg(a,b,c){b.count++;if(null===b.instance)switch(b.type){case "style":var d=sg(c.href);if(d=a.querySelector("style[data-"+d+"]"))return b.instance=d;var e=D({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});d=Rf("style",e,a,"http://www.w3.org/1999/xhtml");d[ma]=!0;Sf(d,"style",e);wg(d,c.precedence,a);return b.instance=d;case "stylesheet":e=sg(c.href);var f=a.querySelector(ug(e));if(f)return b.instance=f;d=D({},c,{"data-precedence":c.precedence,precedence:null}); function zg(a,b,c){b.count++;if(null===b.instance)switch(b.type){case "style":var d=sg(c.href);if(d=a.querySelector("style[data-"+d+"]"))return b.instance=d;var e=D({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});d=Rf("style",e,a,"http://www.w3.org/1999/xhtml");d[ma]=!0;Sf(d,"style",e);wg(d,c.precedence,a);return b.instance=d;case "stylesheet":e=sg(c.href);var f=a.querySelector(ug(e));if(f)return b.instance=f;d=D({},c,{"data-precedence":c.precedence,precedence:null});
(e=lg.get(e))&&vg(d,e);f=Rf("link",d,a,"http://www.w3.org/1999/xhtml");f[ma]=!0;var g=f;g._p=(new Promise(function(h,l){g.onload=h;g.onerror=l})).then(function(){return g._p.s="l"},function(){return g._p.s="e"});Sf(f,"link",d);wg(f,c.precedence,a);return b.instance=f;case "script":e=tg(c.src);if(f=a.querySelector("script[async]"+e))return b.instance=f;d=c;if(e=lg.get(e))d=D({},c),xg(d,e);f=Rf("script",d,a,"http://www.w3.org/1999/xhtml");f[ma]=!0;Sf(f,"link",d);(a.ownerDocument||a).head.appendChild(f); (e=lg.get(e))&&vg(d,e);f=Rf("link",d,a,"http://www.w3.org/1999/xhtml");f[ma]=!0;var g=f;g._p=(new Promise(function(h,l){g.onload=h;g.onerror=l})).then(function(){return g._p.s="l"},function(){return g._p.s="e"});Sf(f,"link",d);wg(f,c.precedence,a);return b.instance=f;case "script":e=tg(c.src);if(f=a.querySelector("script[async]"+e))return b.instance=f;d=c;if(e=lg.get(e))d=D({},c),xg(d,e);f=Rf("script",d,a,"http://www.w3.org/1999/xhtml");f[ma]=!0;Sf(f,"link",d);(a.ownerDocument||a).head.appendChild(f);
return b.instance=f;case "void":return null;default:throw Error(q(443,b.type));}return b.instance}function wg(a,b,c){for(var d=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),e=d.length?d[d.length-1]:null,f=e,g=0;g<d.length;g++){var h=d[g];if(h.dataset.precedence===b)f=h;else if(f!==e)break}f?f.parentNode.insertBefore(a,f.nextSibling):(b=9===c.nodeType?c.head:c,b.insertBefore(a,b.firstChild))} return b.instance=f;case "void":return null;default:throw Error(q(443,b.type));}return b.instance}function wg(a,b,c){for(var d=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),e=d.length?d[d.length-1]:null,f=e,g=0;g<d.length;g++){var h=d[g];if(h.dataset.precedence===b)f=h;else if(f!==e)break}f?f.parentNode.insertBefore(a,f.nextSibling):(b=9===c.nodeType?c.head:c,b.insertBefore(a,b.firstChild))}
...@@ -367,12 +367,12 @@ function Hn(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var ...@@ -367,12 +367,12 @@ function Hn(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var
function In(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var l=wn(g);h.call(l)}}vn(b,g,a,e)}else g=Hn(c,b,a,e,d);return wn(g)}Xc=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=Mc(b.pendingLanes);0!==c&&(Vc(b,c|2),Jm(b,F()),0===(L&6)&&(nl=F()+500,fh()))}break;case 13:Um(function(){var d=Nh(a,2);if(null!==d){var e=Nj();tj(d,a,2,e)}}),yn(a,2)}}; function In(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var l=wn(g);h.call(l)}}vn(b,g,a,e)}else g=Hn(c,b,a,e,d);return wn(g)}Xc=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=Mc(b.pendingLanes);0!==c&&(Vc(b,c|2),Jm(b,F()),0===(L&6)&&(nl=F()+500,fh()))}break;case 13:Um(function(){var d=Nh(a,2);if(null!==d){var e=Nj();tj(d,a,2,e)}}),yn(a,2)}};
Yc=function(a){if(13===a.tag){var b=Nh(a,134217728);if(null!==b){var c=Nj();tj(b,a,134217728,c)}yn(a,134217728)}};Zc=function(a){if(13===a.tag){var b=Mj(a),c=Nh(a,b);if(null!==c){var d=Nj();tj(c,a,b,d)}yn(a,b)}};$c=function(){return G};ad=function(a,b){var c=G;try{return G=a,b()}finally{G=c}}; Yc=function(a){if(13===a.tag){var b=Nh(a,134217728);if(null!==b){var c=Nj();tj(b,a,134217728,c)}yn(a,134217728)}};Zc=function(a){if(13===a.tag){var b=Mj(a),c=Nh(a,b);if(null!==c){var d=Nj();tj(c,a,b,d)}yn(a,b)}};$c=function(){return G};ad=function(a,b){var c=G;try{return G=a,b()}finally{G=c}};
Tb=function(a,b,c){switch(b){case "input":vb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=sa(d);if(!e)throw Error(q(90));qb(d);vb(d,e)}}}break;case "textarea":Cb(a,c);break;case "select":b=c.value,null!=b&&zb(a,!!c.multiple,b,!1)}};Zb=Tm;$b=Um;ca.Events=[qa,ra,sa,Xb,Yb,Tm]; Tb=function(a,b,c){switch(b){case "input":vb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=sa(d);if(!e)throw Error(q(90));qb(d);vb(d,e)}}}break;case "textarea":Cb(a,c);break;case "select":b=c.value,null!=b&&zb(a,!!c.multiple,b,!1)}};Zb=Tm;$b=Um;ca.Events=[qa,ra,sa,Xb,Yb,Tm];
var Jn={findFiberByHostInstance:oa,bundleType:0,version:"18.3.0-next-41110021f-20230301",rendererPackageName:"react-dom"}; var Jn={findFiberByHostInstance:oa,bundleType:0,version:"18.3.0-next-49f741046-20230305",rendererPackageName:"react-dom"};
var Kn={bundleType:Jn.bundleType,version:Jn.version,rendererPackageName:Jn.rendererPackageName,rendererConfig:Jn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:La.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=rc(a);return null===a?null:a.stateNode},findFiberByHostInstance:Jn.findFiberByHostInstance|| var Kn={bundleType:Jn.bundleType,version:Jn.version,rendererPackageName:Jn.rendererPackageName,rendererConfig:Jn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:La.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=rc(a);return null===a?null:a.stateNode},findFiberByHostInstance:Jn.findFiberByHostInstance||
zn,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-41110021f-20230301"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Ln=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ln.isDisabled&&Ln.supportsFiber)try{Dc=Ln.inject(Kn),Ec=Ln}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ca; zn,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-49f741046-20230305"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Ln=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ln.isDisabled&&Ln.supportsFiber)try{Dc=Ln.inject(Kn),Ec=Ln}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ca;
exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!En(b))throw Error(q(200));return sn(a,b,null,c)};exports.createRoot=function(a,b){if(!En(a))throw Error(q(299));var c=!1,d="",e=Bn;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=rn(a,1,!1,null,null,c,!1,d,e);a[ha]=b.current;An.current=kg;If(8===a.nodeType?a.parentNode:a);return new Cn(b)}; exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!En(b))throw Error(q(200));return sn(a,b,null,c)};exports.createRoot=function(a,b){if(!En(a))throw Error(q(299));var c=!1,d="",e=Bn;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=rn(a,1,!1,null,null,c,!1,d,e);a[ha]=b.current;An.current=kg;If(8===a.nodeType?a.parentNode:a);return new Cn(b)};
exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(q(188));a=Object.keys(a).join(",");throw Error(q(268,a));}a=rc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Um(a)};exports.hydrate=function(a,b,c){if(!Fn(b))throw Error(q(200));return In(null,a,b,!0,c)}; exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(q(188));a=Object.keys(a).join(",");throw Error(q(268,a));}a=rc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Um(a)};exports.hydrate=function(a,b,c){if(!Fn(b))throw Error(q(200));return In(null,a,b,!0,c)};
exports.hydrateRoot=function(a,b,c){if(!En(a))throw Error(q(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=Bn;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=un(b,null,a,1,null!=c?c:null,e,!1,f,g);a[ha]=b.current;An.current=kg;If(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData= exports.hydrateRoot=function(a,b,c){if(!En(a))throw Error(q(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=Bn;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=un(b,null,a,1,null!=c?c:null,e,!1,f,g);a[ha]=b.current;An.current=kg;If(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData=
[c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new Dn(b)};exports.preconnect=function(){var a=ca.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=ca.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=ca.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=ca.Dispatcher.current;a&&a.preload.apply(this,arguments)}; [c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new Dn(b)};exports.preconnect=function(){var a=ca.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=ca.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=ca.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=ca.Dispatcher.current;a&&a.preload.apply(this,arguments)};
exports.render=function(a,b,c){if(!Fn(b))throw Error(q(200));return In(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!Fn(a))throw Error(q(40));return a._reactRootContainer?(Um(function(){In(null,null,a,!1,function(){a._reactRootContainer=null;a[ha]=null})}),!0):!1};exports.unstable_batchedUpdates=Tm;exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!Fn(c))throw Error(q(200));if(null==a||void 0===a._reactInternals)throw Error(q(38));return In(a,b,c,!1,d)}; exports.render=function(a,b,c){if(!Fn(b))throw Error(q(200));return In(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!Fn(a))throw Error(q(40));return a._reactRootContainer?(Um(function(){In(null,null,a,!1,function(){a._reactRootContainer=null;a[ha]=null})}),!0):!1};exports.unstable_batchedUpdates=Tm;exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!Fn(c))throw Error(q(200));if(null==a||void 0===a._reactInternals)throw Error(q(38));return In(a,b,c,!1,d)};
exports.version="18.3.0-next-41110021f-20230301"; exports.version="18.3.0-next-49f741046-20230305";
...@@ -150,7 +150,7 @@ e=Hg(a),f=d.get(e),f||(f=c.querySelector("script[async]"+e),f||(a={src:a,async:! ...@@ -150,7 +150,7 @@ e=Hg(a),f=d.get(e),f||(f=c.querySelector("script[async]"+e),f||(a={src:a,async:!
rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity},zg.set(f,a),null===c.querySelector(e)&&(b=eg("link",a,c,"http://www.w3.org/1999/xhtml"),fg(b,"link",a),b[ma]=!0,c.head.appendChild(b)))}}} rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity},zg.set(f,a),null===c.querySelector(e)&&(b=eg("link",a,c,"http://www.w3.org/1999/xhtml"),fg(b,"link",a),b[ma]=!0,c.head.appendChild(b)))}}}
function Mg(a,b,c){b=Cg();if(!b)throw Error(q(446));switch(a){case "meta":case "title":return null;case "style":return"string"===typeof c.precedence&&"string"===typeof c.href?(c=Gg(c.href),b=ta(b).hoistableStyles,a=b.get(c),a||(a={type:"style",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};case "link":if("stylesheet"===c.rel&&"string"===typeof c.href&&"string"===typeof c.precedence){var d=Gg(c.href),e=ta(b).hoistableStyles;a=e.get(d);a||(b=b.ownerDocument||b,a={type:"stylesheet", function Mg(a,b,c){b=Cg();if(!b)throw Error(q(446));switch(a){case "meta":case "title":return null;case "style":return"string"===typeof c.precedence&&"string"===typeof c.href?(c=Gg(c.href),b=ta(b).hoistableStyles,a=b.get(c),a||(a={type:"style",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};case "link":if("stylesheet"===c.rel&&"string"===typeof c.href&&"string"===typeof c.precedence){var d=Gg(c.href),e=ta(b).hoistableStyles;a=e.get(d);a||(b=b.ownerDocument||b,a={type:"stylesheet",
instance:null,count:0},e.set(d,a),zg.has(d)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},zg.set(d,c),b.querySelector(Ig(d))||null!==b.querySelector('link[rel="preload"][as="style"]['+d+"]")||(d=eg("link",c,b,"http://www.w3.org/1999/xhtml"),fg(d,"link",c),d[ma]=!0,b.head.appendChild(d))));return a}return null;case "script":return"string"===typeof c.src&&!0===c.async?(c=Hg(c.src),b=ta(b).hoistableScripts, instance:null,count:0},e.set(d,a),zg.has(d)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},zg.set(d,c),b.querySelector(Ig(d))||null!==b.querySelector('link[rel="preload"][as="style"]['+d+"]")||(d=eg("link",c,b,"http://www.w3.org/1999/xhtml"),fg(d,"link",c),d[ma]=!0,b.head.appendChild(d))));return a}return null;case "script":return"string"===typeof c.src&&!0===c.async?(c=Hg(c.src),b=ta(b).hoistableScripts,
a=b.get(c),a||(a={type:"script",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};default:throw Error(q(444,a));}}function Gg(a){return'href="'+Fg(a)+'"'}function Ig(a){return'link[rel="stylesheet"]['+a+"]"}function Hg(a){return'[src="'+Fg(a)+'"]'} a=b.get(c),a||(a={type:"script",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};default:throw Error(q(444,a));}}function Gg(a){return'href~="'+Fg(a)+'"'}function Ig(a){return'link[rel="stylesheet"]['+a+"]"}function Hg(a){return'[src="'+Fg(a)+'"]'}
function Ng(a,b,c){b.count++;if(null===b.instance)switch(b.type){case "style":var d=Gg(c.href);if(d=a.querySelector("style[data-"+d+"]"))return b.instance=d;var e=x({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});d=eg("style",e,a,"http://www.w3.org/1999/xhtml");d[ma]=!0;fg(d,"style",e);Kg(d,c.precedence,a);return b.instance=d;case "stylesheet":e=Gg(c.href);var f=a.querySelector(Ig(e));if(f)return b.instance=f;d=x({},c,{"data-precedence":c.precedence,precedence:null}); function Ng(a,b,c){b.count++;if(null===b.instance)switch(b.type){case "style":var d=Gg(c.href);if(d=a.querySelector("style[data-"+d+"]"))return b.instance=d;var e=x({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});d=eg("style",e,a,"http://www.w3.org/1999/xhtml");d[ma]=!0;fg(d,"style",e);Kg(d,c.precedence,a);return b.instance=d;case "stylesheet":e=Gg(c.href);var f=a.querySelector(Ig(e));if(f)return b.instance=f;d=x({},c,{"data-precedence":c.precedence,precedence:null});
(e=zg.get(e))&&Jg(d,e);f=eg("link",d,a,"http://www.w3.org/1999/xhtml");f[ma]=!0;var g=f;g._p=(new Promise(function(h,l){g.onload=h;g.onerror=l})).then(function(){return g._p.s="l"},function(){return g._p.s="e"});fg(f,"link",d);Kg(f,c.precedence,a);return b.instance=f;case "script":e=Hg(c.src);if(f=a.querySelector("script[async]"+e))return b.instance=f;d=c;if(e=zg.get(e))d=x({},c),Lg(d,e);f=eg("script",d,a,"http://www.w3.org/1999/xhtml");f[ma]=!0;fg(f,"link",d);(a.ownerDocument||a).head.appendChild(f); (e=zg.get(e))&&Jg(d,e);f=eg("link",d,a,"http://www.w3.org/1999/xhtml");f[ma]=!0;var g=f;g._p=(new Promise(function(h,l){g.onload=h;g.onerror=l})).then(function(){return g._p.s="l"},function(){return g._p.s="e"});fg(f,"link",d);Kg(f,c.precedence,a);return b.instance=f;case "script":e=Hg(c.src);if(f=a.querySelector("script[async]"+e))return b.instance=f;d=c;if(e=zg.get(e))d=x({},c),Lg(d,e);f=eg("script",d,a,"http://www.w3.org/1999/xhtml");f[ma]=!0;fg(f,"link",d);(a.ownerDocument||a).head.appendChild(f);
return b.instance=f;case "void":return null;default:throw Error(q(443,b.type));}return b.instance}function Kg(a,b,c){for(var d=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),e=d.length?d[d.length-1]:null,f=e,g=0;g<d.length;g++){var h=d[g];if(h.dataset.precedence===b)f=h;else if(f!==e)break}f?f.parentNode.insertBefore(a,f.nextSibling):(b=9===c.nodeType?c.head:c,b.insertBefore(a,b.firstChild))} return b.instance=f;case "void":return null;default:throw Error(q(443,b.type));}return b.instance}function Kg(a,b,c){for(var d=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),e=d.length?d[d.length-1]:null,f=e,g=0;g<d.length;g++){var h=d[g];if(h.dataset.precedence===b)f=h;else if(f!==e)break}f?f.parentNode.insertBefore(a,f.nextSibling):(b=9===c.nodeType?c.head:c,b.insertBefore(a,b.firstChild))}
...@@ -399,16 +399,16 @@ function uo(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var ...@@ -399,16 +399,16 @@ function uo(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var
function vo(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var l=jo(g);h.call(l)}}io(b,g,a,e)}else g=uo(c,b,a,e,d);return jo(g)}kd=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=Yc(b.pendingLanes);0!==c&&(gd(b,c|2),wn(b,E()),0===(N&6)&&(Pl=E()+500,th()))}break;case 13:Hn(function(){var d=ai(a,2);if(null!==d){var e=ck();Ij(d,a,2,e)}}),lo(a,2)}}; function vo(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var l=jo(g);h.call(l)}}io(b,g,a,e)}else g=uo(c,b,a,e,d);return jo(g)}kd=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=Yc(b.pendingLanes);0!==c&&(gd(b,c|2),wn(b,E()),0===(N&6)&&(Pl=E()+500,th()))}break;case 13:Hn(function(){var d=ai(a,2);if(null!==d){var e=ck();Ij(d,a,2,e)}}),lo(a,2)}};
ld=function(a){if(13===a.tag){var b=ai(a,134217728);if(null!==b){var c=ck();Ij(b,a,134217728,c)}lo(a,134217728)}};md=function(a){if(13===a.tag){var b=bk(a),c=ai(a,b);if(null!==c){var d=ck();Ij(c,a,b,d)}lo(a,b)}};nd=function(){return I};od=function(a,b){var c=I;try{return I=a,b()}finally{I=c}}; ld=function(a){if(13===a.tag){var b=ai(a,134217728);if(null!==b){var c=ck();Ij(b,a,134217728,c)}lo(a,134217728)}};md=function(a){if(13===a.tag){var b=bk(a),c=ai(a,b);if(null!==c){var d=ck();Ij(c,a,b,d)}lo(a,b)}};nd=function(){return I};od=function(a,b){var c=I;try{return I=a,b()}finally{I=c}};
Tb=function(a,b,c){switch(b){case "input":vb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=sa(d);if(!e)throw Error(q(90));qb(d);vb(d,e)}}}break;case "textarea":Cb(a,c);break;case "select":b=c.value,null!=b&&zb(a,!!c.multiple,b,!1)}};Zb=Gn;$b=Hn;ca.Events=[qa,ra,sa,Xb,Yb,Gn]; Tb=function(a,b,c){switch(b){case "input":vb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=sa(d);if(!e)throw Error(q(90));qb(d);vb(d,e)}}}break;case "textarea":Cb(a,c);break;case "select":b=c.value,null!=b&&zb(a,!!c.multiple,b,!1)}};Zb=Gn;$b=Hn;ca.Events=[qa,ra,sa,Xb,Yb,Gn];
var wo={findFiberByHostInstance:oa,bundleType:0,version:"18.3.0-next-41110021f-20230301",rendererPackageName:"react-dom"}; var wo={findFiberByHostInstance:oa,bundleType:0,version:"18.3.0-next-49f741046-20230305",rendererPackageName:"react-dom"};
(function(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{a=x({},a,{getLaneLabelMap:Ic,injectProfilingHooks:Hc}),Dc=b.inject(a),Ec=b}catch(c){}return b.checkDCE?!0:!1})({bundleType:wo.bundleType,version:wo.version,rendererPackageName:wo.rendererPackageName,rendererConfig:wo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null, (function(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{a=x({},a,{getLaneLabelMap:Ic,injectProfilingHooks:Hc}),Dc=b.inject(a),Ec=b}catch(c){}return b.checkDCE?!0:!1})({bundleType:wo.bundleType,version:wo.version,rendererPackageName:wo.rendererPackageName,rendererConfig:wo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,
overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:La.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=rc(a);return null===a?null:a.stateNode},findFiberByHostInstance:wo.findFiberByHostInstance||mo,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-41110021f-20230301"}); overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:La.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=rc(a);return null===a?null:a.stateNode},findFiberByHostInstance:wo.findFiberByHostInstance||mo,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-49f741046-20230305"});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ca;exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ro(b))throw Error(q(200));return fo(a,b,null,c)}; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ca;exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ro(b))throw Error(q(200));return fo(a,b,null,c)};
exports.createRoot=function(a,b){if(!ro(a))throw Error(q(299));var c=!1,d="",e=oo;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=eo(a,1,!1,null,null,c,!1,d,e);a[ha]=b.current;no.current=yg;Wf(8===a.nodeType?a.parentNode:a);return new po(b)}; exports.createRoot=function(a,b){if(!ro(a))throw Error(q(299));var c=!1,d="",e=oo;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=eo(a,1,!1,null,null,c,!1,d,e);a[ha]=b.current;no.current=yg;Wf(8===a.nodeType?a.parentNode:a);return new po(b)};
exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(q(188));a=Object.keys(a).join(",");throw Error(q(268,a));}a=rc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Hn(a)};exports.hydrate=function(a,b,c){if(!so(b))throw Error(q(200));return vo(null,a,b,!0,c)}; exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(q(188));a=Object.keys(a).join(",");throw Error(q(268,a));}a=rc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Hn(a)};exports.hydrate=function(a,b,c){if(!so(b))throw Error(q(200));return vo(null,a,b,!0,c)};
exports.hydrateRoot=function(a,b,c){if(!ro(a))throw Error(q(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=oo;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=ho(b,null,a,1,null!=c?c:null,e,!1,f,g);a[ha]=b.current;no.current=yg;Wf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData= exports.hydrateRoot=function(a,b,c){if(!ro(a))throw Error(q(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=oo;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=ho(b,null,a,1,null!=c?c:null,e,!1,f,g);a[ha]=b.current;no.current=yg;Wf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData=
[c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new qo(b)};exports.preconnect=function(){var a=ca.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=ca.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=ca.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=ca.Dispatcher.current;a&&a.preload.apply(this,arguments)}; [c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new qo(b)};exports.preconnect=function(){var a=ca.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=ca.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=ca.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=ca.Dispatcher.current;a&&a.preload.apply(this,arguments)};
exports.render=function(a,b,c){if(!so(b))throw Error(q(200));return vo(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!so(a))throw Error(q(40));return a._reactRootContainer?(Hn(function(){vo(null,null,a,!1,function(){a._reactRootContainer=null;a[ha]=null})}),!0):!1};exports.unstable_batchedUpdates=Gn;exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!so(c))throw Error(q(200));if(null==a||void 0===a._reactInternals)throw Error(q(38));return vo(a,b,c,!1,d)}; exports.render=function(a,b,c){if(!so(b))throw Error(q(200));return vo(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!so(a))throw Error(q(40));return a._reactRootContainer?(Hn(function(){vo(null,null,a,!1,function(){a._reactRootContainer=null;a[ha]=null})}),!0):!1};exports.unstable_batchedUpdates=Gn;exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!so(c))throw Error(q(200));if(null==a||void 0===a._reactInternals)throw Error(q(38));return vo(a,b,c,!1,d)};
exports.version="18.3.0-next-41110021f-20230301"; exports.version="18.3.0-next-49f741046-20230305";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if ( if (
......
{ {
"name": "react-dom", "name": "react-dom",
"version": "18.3.0-next-41110021f-20230301", "version": "18.3.0-next-49f741046-20230305",
"description": "React package for working with the DOM.", "description": "React package for working with the DOM.",
"main": "index.js", "main": "index.js",
"repository": { "repository": {
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
"homepage": "https://reactjs.org/", "homepage": "https://reactjs.org/",
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"scheduler": "0.24.0-next-41110021f-20230301" "scheduler": "0.24.0-next-49f741046-20230305"
}, },
"peerDependencies": { "peerDependencies": {
"react": "18.3.0-next-41110021f-20230301" "react": "18.3.0-next-49f741046-20230305"
}, },
"files": [ "files": [
"LICENSE", "LICENSE",
......
...@@ -549,13 +549,13 @@ function createServerReferenceProxy(response, metaData) { ...@@ -549,13 +549,13 @@ function createServerReferenceProxy(response, metaData) {
if (p.status === INITIALIZED) { if (p.status === INITIALIZED) {
var bound = p.value; var bound = p.value;
return callServer(metaData, bound.concat(args)); return callServer(metaData.id, bound.concat(args));
} // Since this is a fake Promise whose .then doesn't chain, we have to wrap it. } // Since this is a fake Promise whose .then doesn't chain, we have to wrap it.
// TODO: Remove the wrapper once that's fixed. // TODO: Remove the wrapper once that's fixed.
return Promise.resolve(p).then(function (bound) { return Promise.resolve(p).then(function (bound) {
return callServer(metaData, bound.concat(args)); return callServer(metaData.id, bound.concat(args));
}); });
}; };
......
...@@ -15,7 +15,7 @@ function C(a){switch(a.status){case "resolved_model":z(a);break;case "resolved_m ...@@ -15,7 +15,7 @@ function C(a){switch(a.status){case "resolved_model":z(a);break;case "resolved_m
function F(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&D(c,b)}}function G(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.value,d=a.reason;a.status="resolved_module";a.value=b;null!==c&&(A(a),E(a,c,d))}}var H=null,I=null; function F(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&D(c,b)}}function G(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.value,d=a.reason;a.status="resolved_module";a.value=b;null!==c&&(A(a),E(a,c,d))}}var H=null,I=null;
function z(a){var b=H,c=I;H=a;I=null;try{var d=JSON.parse(a.value,a._response._fromJSON);null!==I&&0<I.deps?(I.value=d,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=d)}catch(e){a.status="rejected",a.reason=e}finally{H=b,I=c}} function z(a){var b=H,c=I;H=a;I=null;try{var d=JSON.parse(a.value,a._response._fromJSON);null!==I&&0<I.deps?(I.value=d,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=d)}catch(e){a.status="rejected",a.reason=e}finally{H=b,I=c}}
function A(a){try{var b=a.value;if(b.async){var c=q.get(b.id);if("fulfilled"===c.status)var d=c.value;else throw c.reason;}else d=globalThis.__next_require__(b.id);var e="*"===b.name?d:""===b.name?d.__esModule?d.default:d:d[b.name];a.status="fulfilled";a.value=e}catch(f){a.status="rejected",a.reason=f}}function J(a,b){a._chunks.forEach(function(c){"pending"===c.status&&F(c,b)})}function K(a,b){var c=a._chunks,d=c.get(b);d||(d=new y("pending",null,null,a),c.set(b,d));return d} function A(a){try{var b=a.value;if(b.async){var c=q.get(b.id);if("fulfilled"===c.status)var d=c.value;else throw c.reason;}else d=globalThis.__next_require__(b.id);var e="*"===b.name?d:""===b.name?d.__esModule?d.default:d:d[b.name];a.status="fulfilled";a.value=e}catch(f){a.status="rejected",a.reason=f}}function J(a,b){a._chunks.forEach(function(c){"pending"===c.status&&F(c,b)})}function K(a,b){var c=a._chunks,d=c.get(b);d||(d=new y("pending",null,null,a),c.set(b,d));return d}
function L(a,b,c){if(I){var d=I;d.deps++}else d=I={deps:1,value:null};return function(e){b[c]=e;d.deps--;0===d.deps&&"blocked"===a.status&&(e=a.value,a.status="fulfilled",a.value=d.value,null!==e&&D(e,d.value))}}function M(a){return function(b){return F(a,b)}}function N(a,b){var c=a._callServer;return function(){var d=Array.prototype.slice.call(arguments),e=b.bound;return"fulfilled"===e.status?c(b,e.value.concat(d)):Promise.resolve(e).then(function(f){return c(b,f.concat(d))})}} function L(a,b,c){if(I){var d=I;d.deps++}else d=I={deps:1,value:null};return function(e){b[c]=e;d.deps--;0===d.deps&&"blocked"===a.status&&(e=a.value,a.status="fulfilled",a.value=d.value,null!==e&&D(e,d.value))}}function M(a){return function(b){return F(a,b)}}function N(a,b){var c=a._callServer;return function(){var d=Array.prototype.slice.call(arguments),e=b.bound;return"fulfilled"===e.status?c(b.id,e.value.concat(d)):Promise.resolve(e).then(function(f){return c(b.id,f.concat(d))})}}
function O(a,b,c,d){if("$"===d[0]){if("$"===d)return u;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),a=K(a,b),{$$typeof:v,_payload:a,_init:C};case "@":return b=parseInt(d.substring(2),16),K(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),x[a]||(x[a]=l.createServerContext(a,w)),x[a].Provider;case "F":b=parseInt(d.substring(2),16);b=K(a,b);switch(b.status){case "resolved_model":z(b)}switch(b.status){case "fulfilled":return N(a, function O(a,b,c,d){if("$"===d[0]){if("$"===d)return u;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),a=K(a,b),{$$typeof:v,_payload:a,_init:C};case "@":return b=parseInt(d.substring(2),16),K(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),x[a]||(x[a]=l.createServerContext(a,w)),x[a].Provider;case "F":b=parseInt(d.substring(2),16);b=K(a,b);switch(b.status){case "resolved_model":z(b)}switch(b.status){case "fulfilled":return N(a,
b.value);default:throw b.reason;}default:d=parseInt(d.substring(1),16);a=K(a,d);switch(a.status){case "resolved_model":z(a);break;case "resolved_module":A(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=H,a.then(L(d,b,c),M(d)),null;default:throw a.reason;}}}return d}function P(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');} b.value);default:throw b.reason;}default:d=parseInt(d.substring(1),16);a=K(a,d);switch(a.status){case "resolved_model":z(a);break;case "resolved_module":A(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=H,a.then(L(d,b,c),M(d)),null;default:throw a.reason;}}}return d}function P(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}
function Q(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=n(a._bundlerConfig,c);if(c=t(f)){if(e){var h=e;h.status="blocked"}else h=new y("blocked",null,null,a),d.set(b,h);c.then(function(){return G(h,f)},function(g){return F(h,g)})}else e?G(e,f):d.set(b,new y("resolved_module",f,null,a))}function R(a){J(a,Error("Connection closed."))} function Q(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=n(a._bundlerConfig,c);if(c=t(f)){if(e){var h=e;h.status="blocked"}else h=new y("blocked",null,null,a),d.set(b,h);c.then(function(){return G(h,f)},function(g){return F(h,g)})}else e?G(e,f):d.set(b,new y("resolved_module",f,null,a))}function R(a){J(a,Error("Connection closed."))}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment