react-server-dom-rspack 0.0.1-alpha.1 → 0.0.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.browser.d.ts +23 -0
- package/dist/client.browser.js +41 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.edge.d.ts +28 -0
- package/dist/client.edge.js +27 -0
- package/dist/client.js +1 -0
- package/dist/client.node.d.ts +11 -0
- package/dist/client.node.js +10 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +2 -0
- package/dist/server.browser.d.ts +0 -0
- package/dist/server.browser.js +2 -0
- package/dist/server.d.ts +0 -0
- package/dist/server.edge.d.ts +29 -0
- package/dist/server.edge.js +44 -0
- package/dist/server.js +3 -0
- package/dist/server.node.d.ts +30 -0
- package/dist/server.node.js +48 -0
- package/dist/types.d.ts +41 -0
- package/dist/types.js +1 -0
- package/package.json +122 -12
- package/vendor/react-server-dom-webpack/LICENSE +21 -0
- package/vendor/react-server-dom-webpack/README.md +5 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +5006 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.js +1947 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +4987 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.js +2128 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +5130 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js +2256 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-node-register.js +69 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-plugin.js +404 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +5515 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js +3264 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +5617 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js +3299 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +6403 -0
- package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js +3517 -0
- package/vendor/react-server-dom-webpack/client.browser.js +7 -0
- package/vendor/react-server-dom-webpack/client.edge.js +7 -0
- package/vendor/react-server-dom-webpack/client.js +3 -0
- package/vendor/react-server-dom-webpack/client.node.js +7 -0
- package/vendor/react-server-dom-webpack/esm/package.json +3 -0
- package/vendor/react-server-dom-webpack/esm/react-server-dom-webpack-node-loader.production.js +515 -0
- package/vendor/react-server-dom-webpack/index.js +12 -0
- package/vendor/react-server-dom-webpack/node-register.js +3 -0
- package/vendor/react-server-dom-webpack/package.json +96 -0
- package/vendor/react-server-dom-webpack/plugin.js +3 -0
- package/vendor/react-server-dom-webpack/server.browser.js +17 -0
- package/vendor/react-server-dom-webpack/server.edge.js +18 -0
- package/vendor/react-server-dom-webpack/server.js +6 -0
- package/vendor/react-server-dom-webpack/server.node.js +20 -0
- package/vendor/react-server-dom-webpack/static.browser.js +10 -0
- package/vendor/react-server-dom-webpack/static.edge.js +10 -0
- package/vendor/react-server-dom-webpack/static.js +6 -0
- package/vendor/react-server-dom-webpack/static.node.js +11 -0
- package/dist/client.mjs +0 -19
- package/dist/server.mjs +0 -11
package/vendor/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js
ADDED
|
@@ -0,0 +1,4987 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-server-dom-webpack-client.edge.development.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
12
|
+
"production" !== process.env.NODE_ENV &&
|
|
13
|
+
(function () {
|
|
14
|
+
function resolveClientReference(bundlerConfig, metadata) {
|
|
15
|
+
if (bundlerConfig) {
|
|
16
|
+
var moduleExports = bundlerConfig[metadata[0]];
|
|
17
|
+
if ((bundlerConfig = moduleExports && moduleExports[metadata[2]]))
|
|
18
|
+
moduleExports = bundlerConfig.name;
|
|
19
|
+
else {
|
|
20
|
+
bundlerConfig = moduleExports && moduleExports["*"];
|
|
21
|
+
if (!bundlerConfig)
|
|
22
|
+
throw Error(
|
|
23
|
+
'Could not find the module "' +
|
|
24
|
+
metadata[0] +
|
|
25
|
+
'" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.'
|
|
26
|
+
);
|
|
27
|
+
moduleExports = metadata[2];
|
|
28
|
+
}
|
|
29
|
+
return 4 === metadata.length
|
|
30
|
+
? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1]
|
|
31
|
+
: [bundlerConfig.id, bundlerConfig.chunks, moduleExports];
|
|
32
|
+
}
|
|
33
|
+
return metadata;
|
|
34
|
+
}
|
|
35
|
+
function resolveServerReference(bundlerConfig, id) {
|
|
36
|
+
var name = "",
|
|
37
|
+
resolvedModuleData = bundlerConfig[id];
|
|
38
|
+
if (resolvedModuleData) name = resolvedModuleData.name;
|
|
39
|
+
else {
|
|
40
|
+
var idx = id.lastIndexOf("#");
|
|
41
|
+
-1 !== idx &&
|
|
42
|
+
((name = id.slice(idx + 1)),
|
|
43
|
+
(resolvedModuleData = bundlerConfig[id.slice(0, idx)]));
|
|
44
|
+
if (!resolvedModuleData)
|
|
45
|
+
throw Error(
|
|
46
|
+
'Could not find the module "' +
|
|
47
|
+
id +
|
|
48
|
+
'" in the React Server Manifest. This is probably a bug in the React Server Components bundler.'
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
return resolvedModuleData.async
|
|
52
|
+
? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1]
|
|
53
|
+
: [resolvedModuleData.id, resolvedModuleData.chunks, name];
|
|
54
|
+
}
|
|
55
|
+
function requireAsyncModule(id) {
|
|
56
|
+
var promise = __webpack_require__(id);
|
|
57
|
+
if ("function" !== typeof promise.then || "fulfilled" === promise.status)
|
|
58
|
+
return null;
|
|
59
|
+
promise.then(
|
|
60
|
+
function (value) {
|
|
61
|
+
promise.status = "fulfilled";
|
|
62
|
+
promise.value = value;
|
|
63
|
+
},
|
|
64
|
+
function (reason) {
|
|
65
|
+
promise.status = "rejected";
|
|
66
|
+
promise.reason = reason;
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
return promise;
|
|
70
|
+
}
|
|
71
|
+
function ignoreReject() {}
|
|
72
|
+
function preloadModule(metadata) {
|
|
73
|
+
for (
|
|
74
|
+
var chunks = metadata[1], promises = [], i = 0;
|
|
75
|
+
i < chunks.length;
|
|
76
|
+
|
|
77
|
+
) {
|
|
78
|
+
var chunkId = chunks[i++];
|
|
79
|
+
i++;
|
|
80
|
+
var thenable = __webpack_chunk_load__(chunkId);
|
|
81
|
+
promises.push(thenable);
|
|
82
|
+
thenable.catch(ignoreReject);
|
|
83
|
+
}
|
|
84
|
+
return 4 === metadata.length
|
|
85
|
+
? 0 === promises.length
|
|
86
|
+
? requireAsyncModule(metadata[0])
|
|
87
|
+
: Promise.all(promises).then(function () {
|
|
88
|
+
return requireAsyncModule(metadata[0]);
|
|
89
|
+
})
|
|
90
|
+
: 0 < promises.length
|
|
91
|
+
? Promise.all(promises)
|
|
92
|
+
: null;
|
|
93
|
+
}
|
|
94
|
+
function requireModule(metadata) {
|
|
95
|
+
var moduleExports = __webpack_require__(metadata[0]);
|
|
96
|
+
if (4 === metadata.length && "function" === typeof moduleExports.then)
|
|
97
|
+
if ("fulfilled" === moduleExports.status)
|
|
98
|
+
moduleExports = moduleExports.value;
|
|
99
|
+
else throw moduleExports.reason;
|
|
100
|
+
if ("*" === metadata[2]) return moduleExports;
|
|
101
|
+
if ("" === metadata[2])
|
|
102
|
+
return moduleExports.__esModule ? moduleExports.default : moduleExports;
|
|
103
|
+
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
104
|
+
return moduleExports[metadata[2]];
|
|
105
|
+
}
|
|
106
|
+
function prepareDestinationWithChunks(
|
|
107
|
+
moduleLoading,
|
|
108
|
+
chunks,
|
|
109
|
+
nonce$jscomp$0
|
|
110
|
+
) {
|
|
111
|
+
if (null !== moduleLoading)
|
|
112
|
+
for (var i = 1; i < chunks.length; i += 2) {
|
|
113
|
+
var nonce = nonce$jscomp$0,
|
|
114
|
+
JSCompiler_temp_const = ReactDOMSharedInternals.d,
|
|
115
|
+
JSCompiler_temp_const$jscomp$0 = JSCompiler_temp_const.X,
|
|
116
|
+
JSCompiler_temp_const$jscomp$1 = moduleLoading.prefix + chunks[i];
|
|
117
|
+
var JSCompiler_inline_result = moduleLoading.crossOrigin;
|
|
118
|
+
JSCompiler_inline_result =
|
|
119
|
+
"string" === typeof JSCompiler_inline_result
|
|
120
|
+
? "use-credentials" === JSCompiler_inline_result
|
|
121
|
+
? JSCompiler_inline_result
|
|
122
|
+
: ""
|
|
123
|
+
: void 0;
|
|
124
|
+
JSCompiler_temp_const$jscomp$0.call(
|
|
125
|
+
JSCompiler_temp_const,
|
|
126
|
+
JSCompiler_temp_const$jscomp$1,
|
|
127
|
+
{ crossOrigin: JSCompiler_inline_result, nonce: nonce }
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function getIteratorFn(maybeIterable) {
|
|
132
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
133
|
+
return null;
|
|
134
|
+
maybeIterable =
|
|
135
|
+
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
|
136
|
+
maybeIterable["@@iterator"];
|
|
137
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
138
|
+
}
|
|
139
|
+
function isObjectPrototype(object) {
|
|
140
|
+
if (!object) return !1;
|
|
141
|
+
var ObjectPrototype = Object.prototype;
|
|
142
|
+
if (object === ObjectPrototype) return !0;
|
|
143
|
+
if (getPrototypeOf(object)) return !1;
|
|
144
|
+
object = Object.getOwnPropertyNames(object);
|
|
145
|
+
for (var i = 0; i < object.length; i++)
|
|
146
|
+
if (!(object[i] in ObjectPrototype)) return !1;
|
|
147
|
+
return !0;
|
|
148
|
+
}
|
|
149
|
+
function isSimpleObject(object) {
|
|
150
|
+
if (!isObjectPrototype(getPrototypeOf(object))) return !1;
|
|
151
|
+
for (
|
|
152
|
+
var names = Object.getOwnPropertyNames(object), i = 0;
|
|
153
|
+
i < names.length;
|
|
154
|
+
i++
|
|
155
|
+
) {
|
|
156
|
+
var descriptor = Object.getOwnPropertyDescriptor(object, names[i]);
|
|
157
|
+
if (
|
|
158
|
+
!descriptor ||
|
|
159
|
+
(!descriptor.enumerable &&
|
|
160
|
+
(("key" !== names[i] && "ref" !== names[i]) ||
|
|
161
|
+
"function" !== typeof descriptor.get))
|
|
162
|
+
)
|
|
163
|
+
return !1;
|
|
164
|
+
}
|
|
165
|
+
return !0;
|
|
166
|
+
}
|
|
167
|
+
function objectName(object) {
|
|
168
|
+
object = Object.prototype.toString.call(object);
|
|
169
|
+
return object.slice(8, object.length - 1);
|
|
170
|
+
}
|
|
171
|
+
function describeKeyForErrorMessage(key) {
|
|
172
|
+
var encodedKey = JSON.stringify(key);
|
|
173
|
+
return '"' + key + '"' === encodedKey ? key : encodedKey;
|
|
174
|
+
}
|
|
175
|
+
function describeValueForErrorMessage(value) {
|
|
176
|
+
switch (typeof value) {
|
|
177
|
+
case "string":
|
|
178
|
+
return JSON.stringify(
|
|
179
|
+
10 >= value.length ? value : value.slice(0, 10) + "..."
|
|
180
|
+
);
|
|
181
|
+
case "object":
|
|
182
|
+
if (isArrayImpl(value)) return "[...]";
|
|
183
|
+
if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)
|
|
184
|
+
return "client";
|
|
185
|
+
value = objectName(value);
|
|
186
|
+
return "Object" === value ? "{...}" : value;
|
|
187
|
+
case "function":
|
|
188
|
+
return value.$$typeof === CLIENT_REFERENCE_TAG
|
|
189
|
+
? "client"
|
|
190
|
+
: (value = value.displayName || value.name)
|
|
191
|
+
? "function " + value
|
|
192
|
+
: "function";
|
|
193
|
+
default:
|
|
194
|
+
return String(value);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function describeElementType(type) {
|
|
198
|
+
if ("string" === typeof type) return type;
|
|
199
|
+
switch (type) {
|
|
200
|
+
case REACT_SUSPENSE_TYPE:
|
|
201
|
+
return "Suspense";
|
|
202
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
203
|
+
return "SuspenseList";
|
|
204
|
+
}
|
|
205
|
+
if ("object" === typeof type)
|
|
206
|
+
switch (type.$$typeof) {
|
|
207
|
+
case REACT_FORWARD_REF_TYPE:
|
|
208
|
+
return describeElementType(type.render);
|
|
209
|
+
case REACT_MEMO_TYPE:
|
|
210
|
+
return describeElementType(type.type);
|
|
211
|
+
case REACT_LAZY_TYPE:
|
|
212
|
+
var payload = type._payload;
|
|
213
|
+
type = type._init;
|
|
214
|
+
try {
|
|
215
|
+
return describeElementType(type(payload));
|
|
216
|
+
} catch (x) {}
|
|
217
|
+
}
|
|
218
|
+
return "";
|
|
219
|
+
}
|
|
220
|
+
function describeObjectForErrorMessage(objectOrArray, expandedName) {
|
|
221
|
+
var objKind = objectName(objectOrArray);
|
|
222
|
+
if ("Object" !== objKind && "Array" !== objKind) return objKind;
|
|
223
|
+
var start = -1,
|
|
224
|
+
length = 0;
|
|
225
|
+
if (isArrayImpl(objectOrArray))
|
|
226
|
+
if (jsxChildrenParents.has(objectOrArray)) {
|
|
227
|
+
var type = jsxChildrenParents.get(objectOrArray);
|
|
228
|
+
objKind = "<" + describeElementType(type) + ">";
|
|
229
|
+
for (var i = 0; i < objectOrArray.length; i++) {
|
|
230
|
+
var value = objectOrArray[i];
|
|
231
|
+
value =
|
|
232
|
+
"string" === typeof value
|
|
233
|
+
? value
|
|
234
|
+
: "object" === typeof value && null !== value
|
|
235
|
+
? "{" + describeObjectForErrorMessage(value) + "}"
|
|
236
|
+
: "{" + describeValueForErrorMessage(value) + "}";
|
|
237
|
+
"" + i === expandedName
|
|
238
|
+
? ((start = objKind.length),
|
|
239
|
+
(length = value.length),
|
|
240
|
+
(objKind += value))
|
|
241
|
+
: (objKind =
|
|
242
|
+
15 > value.length && 40 > objKind.length + value.length
|
|
243
|
+
? objKind + value
|
|
244
|
+
: objKind + "{...}");
|
|
245
|
+
}
|
|
246
|
+
objKind += "</" + describeElementType(type) + ">";
|
|
247
|
+
} else {
|
|
248
|
+
objKind = "[";
|
|
249
|
+
for (type = 0; type < objectOrArray.length; type++)
|
|
250
|
+
0 < type && (objKind += ", "),
|
|
251
|
+
(i = objectOrArray[type]),
|
|
252
|
+
(i =
|
|
253
|
+
"object" === typeof i && null !== i
|
|
254
|
+
? describeObjectForErrorMessage(i)
|
|
255
|
+
: describeValueForErrorMessage(i)),
|
|
256
|
+
"" + type === expandedName
|
|
257
|
+
? ((start = objKind.length),
|
|
258
|
+
(length = i.length),
|
|
259
|
+
(objKind += i))
|
|
260
|
+
: (objKind =
|
|
261
|
+
10 > i.length && 40 > objKind.length + i.length
|
|
262
|
+
? objKind + i
|
|
263
|
+
: objKind + "...");
|
|
264
|
+
objKind += "]";
|
|
265
|
+
}
|
|
266
|
+
else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)
|
|
267
|
+
objKind = "<" + describeElementType(objectOrArray.type) + "/>";
|
|
268
|
+
else {
|
|
269
|
+
if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client";
|
|
270
|
+
if (jsxPropsParents.has(objectOrArray)) {
|
|
271
|
+
objKind = jsxPropsParents.get(objectOrArray);
|
|
272
|
+
objKind = "<" + (describeElementType(objKind) || "...");
|
|
273
|
+
type = Object.keys(objectOrArray);
|
|
274
|
+
for (i = 0; i < type.length; i++) {
|
|
275
|
+
objKind += " ";
|
|
276
|
+
value = type[i];
|
|
277
|
+
objKind += describeKeyForErrorMessage(value) + "=";
|
|
278
|
+
var _value2 = objectOrArray[value];
|
|
279
|
+
var _substr2 =
|
|
280
|
+
value === expandedName &&
|
|
281
|
+
"object" === typeof _value2 &&
|
|
282
|
+
null !== _value2
|
|
283
|
+
? describeObjectForErrorMessage(_value2)
|
|
284
|
+
: describeValueForErrorMessage(_value2);
|
|
285
|
+
"string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}");
|
|
286
|
+
value === expandedName
|
|
287
|
+
? ((start = objKind.length),
|
|
288
|
+
(length = _substr2.length),
|
|
289
|
+
(objKind += _substr2))
|
|
290
|
+
: (objKind =
|
|
291
|
+
10 > _substr2.length && 40 > objKind.length + _substr2.length
|
|
292
|
+
? objKind + _substr2
|
|
293
|
+
: objKind + "...");
|
|
294
|
+
}
|
|
295
|
+
objKind += ">";
|
|
296
|
+
} else {
|
|
297
|
+
objKind = "{";
|
|
298
|
+
type = Object.keys(objectOrArray);
|
|
299
|
+
for (i = 0; i < type.length; i++)
|
|
300
|
+
0 < i && (objKind += ", "),
|
|
301
|
+
(value = type[i]),
|
|
302
|
+
(objKind += describeKeyForErrorMessage(value) + ": "),
|
|
303
|
+
(_value2 = objectOrArray[value]),
|
|
304
|
+
(_value2 =
|
|
305
|
+
"object" === typeof _value2 && null !== _value2
|
|
306
|
+
? describeObjectForErrorMessage(_value2)
|
|
307
|
+
: describeValueForErrorMessage(_value2)),
|
|
308
|
+
value === expandedName
|
|
309
|
+
? ((start = objKind.length),
|
|
310
|
+
(length = _value2.length),
|
|
311
|
+
(objKind += _value2))
|
|
312
|
+
: (objKind =
|
|
313
|
+
10 > _value2.length && 40 > objKind.length + _value2.length
|
|
314
|
+
? objKind + _value2
|
|
315
|
+
: objKind + "...");
|
|
316
|
+
objKind += "}";
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return void 0 === expandedName
|
|
320
|
+
? objKind
|
|
321
|
+
: -1 < start && 0 < length
|
|
322
|
+
? ((objectOrArray = " ".repeat(start) + "^".repeat(length)),
|
|
323
|
+
"\n " + objKind + "\n " + objectOrArray)
|
|
324
|
+
: "\n " + objKind;
|
|
325
|
+
}
|
|
326
|
+
function serializeNumber(number) {
|
|
327
|
+
return Number.isFinite(number)
|
|
328
|
+
? 0 === number && -Infinity === 1 / number
|
|
329
|
+
? "$-0"
|
|
330
|
+
: number
|
|
331
|
+
: Infinity === number
|
|
332
|
+
? "$Infinity"
|
|
333
|
+
: -Infinity === number
|
|
334
|
+
? "$-Infinity"
|
|
335
|
+
: "$NaN";
|
|
336
|
+
}
|
|
337
|
+
function processReply(
|
|
338
|
+
root,
|
|
339
|
+
formFieldPrefix,
|
|
340
|
+
temporaryReferences,
|
|
341
|
+
resolve,
|
|
342
|
+
reject
|
|
343
|
+
) {
|
|
344
|
+
function serializeTypedArray(tag, typedArray) {
|
|
345
|
+
typedArray = new Blob([
|
|
346
|
+
new Uint8Array(
|
|
347
|
+
typedArray.buffer,
|
|
348
|
+
typedArray.byteOffset,
|
|
349
|
+
typedArray.byteLength
|
|
350
|
+
)
|
|
351
|
+
]);
|
|
352
|
+
var blobId = nextPartId++;
|
|
353
|
+
null === formData && (formData = new FormData());
|
|
354
|
+
formData.append(formFieldPrefix + blobId, typedArray);
|
|
355
|
+
return "$" + tag + blobId.toString(16);
|
|
356
|
+
}
|
|
357
|
+
function serializeBinaryReader(reader) {
|
|
358
|
+
function progress(entry) {
|
|
359
|
+
entry.done
|
|
360
|
+
? ((entry = nextPartId++),
|
|
361
|
+
data.append(formFieldPrefix + entry, new Blob(buffer)),
|
|
362
|
+
data.append(
|
|
363
|
+
formFieldPrefix + streamId,
|
|
364
|
+
'"$o' + entry.toString(16) + '"'
|
|
365
|
+
),
|
|
366
|
+
data.append(formFieldPrefix + streamId, "C"),
|
|
367
|
+
pendingParts--,
|
|
368
|
+
0 === pendingParts && resolve(data))
|
|
369
|
+
: (buffer.push(entry.value),
|
|
370
|
+
reader.read(new Uint8Array(1024)).then(progress, reject));
|
|
371
|
+
}
|
|
372
|
+
null === formData && (formData = new FormData());
|
|
373
|
+
var data = formData;
|
|
374
|
+
pendingParts++;
|
|
375
|
+
var streamId = nextPartId++,
|
|
376
|
+
buffer = [];
|
|
377
|
+
reader.read(new Uint8Array(1024)).then(progress, reject);
|
|
378
|
+
return "$r" + streamId.toString(16);
|
|
379
|
+
}
|
|
380
|
+
function serializeReader(reader) {
|
|
381
|
+
function progress(entry) {
|
|
382
|
+
if (entry.done)
|
|
383
|
+
data.append(formFieldPrefix + streamId, "C"),
|
|
384
|
+
pendingParts--,
|
|
385
|
+
0 === pendingParts && resolve(data);
|
|
386
|
+
else
|
|
387
|
+
try {
|
|
388
|
+
var partJSON = JSON.stringify(entry.value, resolveToJSON);
|
|
389
|
+
data.append(formFieldPrefix + streamId, partJSON);
|
|
390
|
+
reader.read().then(progress, reject);
|
|
391
|
+
} catch (x) {
|
|
392
|
+
reject(x);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
null === formData && (formData = new FormData());
|
|
396
|
+
var data = formData;
|
|
397
|
+
pendingParts++;
|
|
398
|
+
var streamId = nextPartId++;
|
|
399
|
+
reader.read().then(progress, reject);
|
|
400
|
+
return "$R" + streamId.toString(16);
|
|
401
|
+
}
|
|
402
|
+
function serializeReadableStream(stream) {
|
|
403
|
+
try {
|
|
404
|
+
var binaryReader = stream.getReader({ mode: "byob" });
|
|
405
|
+
} catch (x) {
|
|
406
|
+
return serializeReader(stream.getReader());
|
|
407
|
+
}
|
|
408
|
+
return serializeBinaryReader(binaryReader);
|
|
409
|
+
}
|
|
410
|
+
function serializeAsyncIterable(iterable, iterator) {
|
|
411
|
+
function progress(entry) {
|
|
412
|
+
if (entry.done) {
|
|
413
|
+
if (void 0 === entry.value)
|
|
414
|
+
data.append(formFieldPrefix + streamId, "C");
|
|
415
|
+
else
|
|
416
|
+
try {
|
|
417
|
+
var partJSON = JSON.stringify(entry.value, resolveToJSON);
|
|
418
|
+
data.append(formFieldPrefix + streamId, "C" + partJSON);
|
|
419
|
+
} catch (x) {
|
|
420
|
+
reject(x);
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
pendingParts--;
|
|
424
|
+
0 === pendingParts && resolve(data);
|
|
425
|
+
} else
|
|
426
|
+
try {
|
|
427
|
+
var _partJSON = JSON.stringify(entry.value, resolveToJSON);
|
|
428
|
+
data.append(formFieldPrefix + streamId, _partJSON);
|
|
429
|
+
iterator.next().then(progress, reject);
|
|
430
|
+
} catch (x$0) {
|
|
431
|
+
reject(x$0);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
null === formData && (formData = new FormData());
|
|
435
|
+
var data = formData;
|
|
436
|
+
pendingParts++;
|
|
437
|
+
var streamId = nextPartId++;
|
|
438
|
+
iterable = iterable === iterator;
|
|
439
|
+
iterator.next().then(progress, reject);
|
|
440
|
+
return "$" + (iterable ? "x" : "X") + streamId.toString(16);
|
|
441
|
+
}
|
|
442
|
+
function resolveToJSON(key, value) {
|
|
443
|
+
var originalValue = this[key];
|
|
444
|
+
"object" !== typeof originalValue ||
|
|
445
|
+
originalValue === value ||
|
|
446
|
+
originalValue instanceof Date ||
|
|
447
|
+
("Object" !== objectName(originalValue)
|
|
448
|
+
? console.error(
|
|
449
|
+
"Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s",
|
|
450
|
+
objectName(originalValue),
|
|
451
|
+
describeObjectForErrorMessage(this, key)
|
|
452
|
+
)
|
|
453
|
+
: console.error(
|
|
454
|
+
"Only plain objects can be passed to Server Functions from the Client. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s",
|
|
455
|
+
describeObjectForErrorMessage(this, key)
|
|
456
|
+
));
|
|
457
|
+
if (null === value) return null;
|
|
458
|
+
if ("object" === typeof value) {
|
|
459
|
+
switch (value.$$typeof) {
|
|
460
|
+
case REACT_ELEMENT_TYPE:
|
|
461
|
+
if (void 0 !== temporaryReferences && -1 === key.indexOf(":")) {
|
|
462
|
+
var parentReference = writtenObjects.get(this);
|
|
463
|
+
if (void 0 !== parentReference)
|
|
464
|
+
return (
|
|
465
|
+
temporaryReferences.set(parentReference + ":" + key, value),
|
|
466
|
+
"$T"
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
throw Error(
|
|
470
|
+
"React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options." +
|
|
471
|
+
describeObjectForErrorMessage(this, key)
|
|
472
|
+
);
|
|
473
|
+
case REACT_LAZY_TYPE:
|
|
474
|
+
originalValue = value._payload;
|
|
475
|
+
var init = value._init;
|
|
476
|
+
null === formData && (formData = new FormData());
|
|
477
|
+
pendingParts++;
|
|
478
|
+
try {
|
|
479
|
+
parentReference = init(originalValue);
|
|
480
|
+
var lazyId = nextPartId++,
|
|
481
|
+
partJSON = serializeModel(parentReference, lazyId);
|
|
482
|
+
formData.append(formFieldPrefix + lazyId, partJSON);
|
|
483
|
+
return "$" + lazyId.toString(16);
|
|
484
|
+
} catch (x) {
|
|
485
|
+
if (
|
|
486
|
+
"object" === typeof x &&
|
|
487
|
+
null !== x &&
|
|
488
|
+
"function" === typeof x.then
|
|
489
|
+
) {
|
|
490
|
+
pendingParts++;
|
|
491
|
+
var _lazyId = nextPartId++;
|
|
492
|
+
parentReference = function () {
|
|
493
|
+
try {
|
|
494
|
+
var _partJSON2 = serializeModel(value, _lazyId),
|
|
495
|
+
_data = formData;
|
|
496
|
+
_data.append(formFieldPrefix + _lazyId, _partJSON2);
|
|
497
|
+
pendingParts--;
|
|
498
|
+
0 === pendingParts && resolve(_data);
|
|
499
|
+
} catch (reason) {
|
|
500
|
+
reject(reason);
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
x.then(parentReference, parentReference);
|
|
504
|
+
return "$" + _lazyId.toString(16);
|
|
505
|
+
}
|
|
506
|
+
reject(x);
|
|
507
|
+
return null;
|
|
508
|
+
} finally {
|
|
509
|
+
pendingParts--;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
parentReference = writtenObjects.get(value);
|
|
513
|
+
if ("function" === typeof value.then) {
|
|
514
|
+
if (void 0 !== parentReference)
|
|
515
|
+
if (modelRoot === value) modelRoot = null;
|
|
516
|
+
else return parentReference;
|
|
517
|
+
null === formData && (formData = new FormData());
|
|
518
|
+
pendingParts++;
|
|
519
|
+
var promiseId = nextPartId++;
|
|
520
|
+
key = "$@" + promiseId.toString(16);
|
|
521
|
+
writtenObjects.set(value, key);
|
|
522
|
+
value.then(function (partValue) {
|
|
523
|
+
try {
|
|
524
|
+
var previousReference = writtenObjects.get(partValue);
|
|
525
|
+
var _partJSON3 =
|
|
526
|
+
void 0 !== previousReference
|
|
527
|
+
? JSON.stringify(previousReference)
|
|
528
|
+
: serializeModel(partValue, promiseId);
|
|
529
|
+
partValue = formData;
|
|
530
|
+
partValue.append(formFieldPrefix + promiseId, _partJSON3);
|
|
531
|
+
pendingParts--;
|
|
532
|
+
0 === pendingParts && resolve(partValue);
|
|
533
|
+
} catch (reason) {
|
|
534
|
+
reject(reason);
|
|
535
|
+
}
|
|
536
|
+
}, reject);
|
|
537
|
+
return key;
|
|
538
|
+
}
|
|
539
|
+
if (void 0 !== parentReference)
|
|
540
|
+
if (modelRoot === value) modelRoot = null;
|
|
541
|
+
else return parentReference;
|
|
542
|
+
else
|
|
543
|
+
-1 === key.indexOf(":") &&
|
|
544
|
+
((parentReference = writtenObjects.get(this)),
|
|
545
|
+
void 0 !== parentReference &&
|
|
546
|
+
((parentReference = parentReference + ":" + key),
|
|
547
|
+
writtenObjects.set(value, parentReference),
|
|
548
|
+
void 0 !== temporaryReferences &&
|
|
549
|
+
temporaryReferences.set(parentReference, value)));
|
|
550
|
+
if (isArrayImpl(value)) return value;
|
|
551
|
+
if (value instanceof FormData) {
|
|
552
|
+
null === formData && (formData = new FormData());
|
|
553
|
+
var _data3 = formData;
|
|
554
|
+
key = nextPartId++;
|
|
555
|
+
var prefix = formFieldPrefix + key + "_";
|
|
556
|
+
value.forEach(function (originalValue, originalKey) {
|
|
557
|
+
_data3.append(prefix + originalKey, originalValue);
|
|
558
|
+
});
|
|
559
|
+
return "$K" + key.toString(16);
|
|
560
|
+
}
|
|
561
|
+
if (value instanceof Map)
|
|
562
|
+
return (
|
|
563
|
+
(key = nextPartId++),
|
|
564
|
+
(parentReference = serializeModel(Array.from(value), key)),
|
|
565
|
+
null === formData && (formData = new FormData()),
|
|
566
|
+
formData.append(formFieldPrefix + key, parentReference),
|
|
567
|
+
"$Q" + key.toString(16)
|
|
568
|
+
);
|
|
569
|
+
if (value instanceof Set)
|
|
570
|
+
return (
|
|
571
|
+
(key = nextPartId++),
|
|
572
|
+
(parentReference = serializeModel(Array.from(value), key)),
|
|
573
|
+
null === formData && (formData = new FormData()),
|
|
574
|
+
formData.append(formFieldPrefix + key, parentReference),
|
|
575
|
+
"$W" + key.toString(16)
|
|
576
|
+
);
|
|
577
|
+
if (value instanceof ArrayBuffer)
|
|
578
|
+
return (
|
|
579
|
+
(key = new Blob([value])),
|
|
580
|
+
(parentReference = nextPartId++),
|
|
581
|
+
null === formData && (formData = new FormData()),
|
|
582
|
+
formData.append(formFieldPrefix + parentReference, key),
|
|
583
|
+
"$A" + parentReference.toString(16)
|
|
584
|
+
);
|
|
585
|
+
if (value instanceof Int8Array)
|
|
586
|
+
return serializeTypedArray("O", value);
|
|
587
|
+
if (value instanceof Uint8Array)
|
|
588
|
+
return serializeTypedArray("o", value);
|
|
589
|
+
if (value instanceof Uint8ClampedArray)
|
|
590
|
+
return serializeTypedArray("U", value);
|
|
591
|
+
if (value instanceof Int16Array)
|
|
592
|
+
return serializeTypedArray("S", value);
|
|
593
|
+
if (value instanceof Uint16Array)
|
|
594
|
+
return serializeTypedArray("s", value);
|
|
595
|
+
if (value instanceof Int32Array)
|
|
596
|
+
return serializeTypedArray("L", value);
|
|
597
|
+
if (value instanceof Uint32Array)
|
|
598
|
+
return serializeTypedArray("l", value);
|
|
599
|
+
if (value instanceof Float32Array)
|
|
600
|
+
return serializeTypedArray("G", value);
|
|
601
|
+
if (value instanceof Float64Array)
|
|
602
|
+
return serializeTypedArray("g", value);
|
|
603
|
+
if (value instanceof BigInt64Array)
|
|
604
|
+
return serializeTypedArray("M", value);
|
|
605
|
+
if (value instanceof BigUint64Array)
|
|
606
|
+
return serializeTypedArray("m", value);
|
|
607
|
+
if (value instanceof DataView) return serializeTypedArray("V", value);
|
|
608
|
+
if ("function" === typeof Blob && value instanceof Blob)
|
|
609
|
+
return (
|
|
610
|
+
null === formData && (formData = new FormData()),
|
|
611
|
+
(key = nextPartId++),
|
|
612
|
+
formData.append(formFieldPrefix + key, value),
|
|
613
|
+
"$B" + key.toString(16)
|
|
614
|
+
);
|
|
615
|
+
if ((parentReference = getIteratorFn(value)))
|
|
616
|
+
return (
|
|
617
|
+
(parentReference = parentReference.call(value)),
|
|
618
|
+
parentReference === value
|
|
619
|
+
? ((key = nextPartId++),
|
|
620
|
+
(parentReference = serializeModel(
|
|
621
|
+
Array.from(parentReference),
|
|
622
|
+
key
|
|
623
|
+
)),
|
|
624
|
+
null === formData && (formData = new FormData()),
|
|
625
|
+
formData.append(formFieldPrefix + key, parentReference),
|
|
626
|
+
"$i" + key.toString(16))
|
|
627
|
+
: Array.from(parentReference)
|
|
628
|
+
);
|
|
629
|
+
if (
|
|
630
|
+
"function" === typeof ReadableStream &&
|
|
631
|
+
value instanceof ReadableStream
|
|
632
|
+
)
|
|
633
|
+
return serializeReadableStream(value);
|
|
634
|
+
parentReference = value[ASYNC_ITERATOR];
|
|
635
|
+
if ("function" === typeof parentReference)
|
|
636
|
+
return serializeAsyncIterable(value, parentReference.call(value));
|
|
637
|
+
parentReference = getPrototypeOf(value);
|
|
638
|
+
if (
|
|
639
|
+
parentReference !== ObjectPrototype &&
|
|
640
|
+
(null === parentReference ||
|
|
641
|
+
null !== getPrototypeOf(parentReference))
|
|
642
|
+
) {
|
|
643
|
+
if (void 0 === temporaryReferences)
|
|
644
|
+
throw Error(
|
|
645
|
+
"Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." +
|
|
646
|
+
describeObjectForErrorMessage(this, key)
|
|
647
|
+
);
|
|
648
|
+
return "$T";
|
|
649
|
+
}
|
|
650
|
+
value.$$typeof === REACT_CONTEXT_TYPE
|
|
651
|
+
? console.error(
|
|
652
|
+
"React Context Providers cannot be passed to Server Functions from the Client.%s",
|
|
653
|
+
describeObjectForErrorMessage(this, key)
|
|
654
|
+
)
|
|
655
|
+
: "Object" !== objectName(value)
|
|
656
|
+
? console.error(
|
|
657
|
+
"Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s",
|
|
658
|
+
objectName(value),
|
|
659
|
+
describeObjectForErrorMessage(this, key)
|
|
660
|
+
)
|
|
661
|
+
: isSimpleObject(value)
|
|
662
|
+
? Object.getOwnPropertySymbols &&
|
|
663
|
+
((parentReference = Object.getOwnPropertySymbols(value)),
|
|
664
|
+
0 < parentReference.length &&
|
|
665
|
+
console.error(
|
|
666
|
+
"Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s",
|
|
667
|
+
parentReference[0].description,
|
|
668
|
+
describeObjectForErrorMessage(this, key)
|
|
669
|
+
))
|
|
670
|
+
: console.error(
|
|
671
|
+
"Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s",
|
|
672
|
+
describeObjectForErrorMessage(this, key)
|
|
673
|
+
);
|
|
674
|
+
return value;
|
|
675
|
+
}
|
|
676
|
+
if ("string" === typeof value) {
|
|
677
|
+
if ("Z" === value[value.length - 1] && this[key] instanceof Date)
|
|
678
|
+
return "$D" + value;
|
|
679
|
+
key = "$" === value[0] ? "$" + value : value;
|
|
680
|
+
return key;
|
|
681
|
+
}
|
|
682
|
+
if ("boolean" === typeof value) return value;
|
|
683
|
+
if ("number" === typeof value) return serializeNumber(value);
|
|
684
|
+
if ("undefined" === typeof value) return "$undefined";
|
|
685
|
+
if ("function" === typeof value) {
|
|
686
|
+
parentReference = knownServerReferences.get(value);
|
|
687
|
+
if (void 0 !== parentReference)
|
|
688
|
+
return (
|
|
689
|
+
(key = JSON.stringify(
|
|
690
|
+
{ id: parentReference.id, bound: parentReference.bound },
|
|
691
|
+
resolveToJSON
|
|
692
|
+
)),
|
|
693
|
+
null === formData && (formData = new FormData()),
|
|
694
|
+
(parentReference = nextPartId++),
|
|
695
|
+
formData.set(formFieldPrefix + parentReference, key),
|
|
696
|
+
"$h" + parentReference.toString(16)
|
|
697
|
+
);
|
|
698
|
+
if (
|
|
699
|
+
void 0 !== temporaryReferences &&
|
|
700
|
+
-1 === key.indexOf(":") &&
|
|
701
|
+
((parentReference = writtenObjects.get(this)),
|
|
702
|
+
void 0 !== parentReference)
|
|
703
|
+
)
|
|
704
|
+
return (
|
|
705
|
+
temporaryReferences.set(parentReference + ":" + key, value), "$T"
|
|
706
|
+
);
|
|
707
|
+
throw Error(
|
|
708
|
+
"Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again."
|
|
709
|
+
);
|
|
710
|
+
}
|
|
711
|
+
if ("symbol" === typeof value) {
|
|
712
|
+
if (
|
|
713
|
+
void 0 !== temporaryReferences &&
|
|
714
|
+
-1 === key.indexOf(":") &&
|
|
715
|
+
((parentReference = writtenObjects.get(this)),
|
|
716
|
+
void 0 !== parentReference)
|
|
717
|
+
)
|
|
718
|
+
return (
|
|
719
|
+
temporaryReferences.set(parentReference + ":" + key, value), "$T"
|
|
720
|
+
);
|
|
721
|
+
throw Error(
|
|
722
|
+
"Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options." +
|
|
723
|
+
describeObjectForErrorMessage(this, key)
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
if ("bigint" === typeof value) return "$n" + value.toString(10);
|
|
727
|
+
throw Error(
|
|
728
|
+
"Type " +
|
|
729
|
+
typeof value +
|
|
730
|
+
" is not supported as an argument to a Server Function."
|
|
731
|
+
);
|
|
732
|
+
}
|
|
733
|
+
function serializeModel(model, id) {
|
|
734
|
+
"object" === typeof model &&
|
|
735
|
+
null !== model &&
|
|
736
|
+
((id = "$" + id.toString(16)),
|
|
737
|
+
writtenObjects.set(model, id),
|
|
738
|
+
void 0 !== temporaryReferences && temporaryReferences.set(id, model));
|
|
739
|
+
modelRoot = model;
|
|
740
|
+
return JSON.stringify(model, resolveToJSON);
|
|
741
|
+
}
|
|
742
|
+
var nextPartId = 1,
|
|
743
|
+
pendingParts = 0,
|
|
744
|
+
formData = null,
|
|
745
|
+
writtenObjects = new WeakMap(),
|
|
746
|
+
modelRoot = root,
|
|
747
|
+
json = serializeModel(root, 0);
|
|
748
|
+
null === formData
|
|
749
|
+
? resolve(json)
|
|
750
|
+
: (formData.set(formFieldPrefix + "0", json),
|
|
751
|
+
0 === pendingParts && resolve(formData));
|
|
752
|
+
return function () {
|
|
753
|
+
0 < pendingParts &&
|
|
754
|
+
((pendingParts = 0),
|
|
755
|
+
null === formData ? resolve(json) : resolve(formData));
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
function encodeFormData(reference) {
|
|
759
|
+
var resolve,
|
|
760
|
+
reject,
|
|
761
|
+
thenable = new Promise(function (res, rej) {
|
|
762
|
+
resolve = res;
|
|
763
|
+
reject = rej;
|
|
764
|
+
});
|
|
765
|
+
processReply(
|
|
766
|
+
reference,
|
|
767
|
+
"",
|
|
768
|
+
void 0,
|
|
769
|
+
function (body) {
|
|
770
|
+
if ("string" === typeof body) {
|
|
771
|
+
var data = new FormData();
|
|
772
|
+
data.append("0", body);
|
|
773
|
+
body = data;
|
|
774
|
+
}
|
|
775
|
+
thenable.status = "fulfilled";
|
|
776
|
+
thenable.value = body;
|
|
777
|
+
resolve(body);
|
|
778
|
+
},
|
|
779
|
+
function (e) {
|
|
780
|
+
thenable.status = "rejected";
|
|
781
|
+
thenable.reason = e;
|
|
782
|
+
reject(e);
|
|
783
|
+
}
|
|
784
|
+
);
|
|
785
|
+
return thenable;
|
|
786
|
+
}
|
|
787
|
+
function defaultEncodeFormAction(identifierPrefix) {
|
|
788
|
+
var referenceClosure = knownServerReferences.get(this);
|
|
789
|
+
if (!referenceClosure)
|
|
790
|
+
throw Error(
|
|
791
|
+
"Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React."
|
|
792
|
+
);
|
|
793
|
+
var data = null;
|
|
794
|
+
if (null !== referenceClosure.bound) {
|
|
795
|
+
data = boundCache.get(referenceClosure);
|
|
796
|
+
data ||
|
|
797
|
+
((data = encodeFormData({
|
|
798
|
+
id: referenceClosure.id,
|
|
799
|
+
bound: referenceClosure.bound
|
|
800
|
+
})),
|
|
801
|
+
boundCache.set(referenceClosure, data));
|
|
802
|
+
if ("rejected" === data.status) throw data.reason;
|
|
803
|
+
if ("fulfilled" !== data.status) throw data;
|
|
804
|
+
referenceClosure = data.value;
|
|
805
|
+
var prefixedData = new FormData();
|
|
806
|
+
referenceClosure.forEach(function (value, key) {
|
|
807
|
+
prefixedData.append("$ACTION_" + identifierPrefix + ":" + key, value);
|
|
808
|
+
});
|
|
809
|
+
data = prefixedData;
|
|
810
|
+
referenceClosure = "$ACTION_REF_" + identifierPrefix;
|
|
811
|
+
} else referenceClosure = "$ACTION_ID_" + referenceClosure.id;
|
|
812
|
+
return {
|
|
813
|
+
name: referenceClosure,
|
|
814
|
+
method: "POST",
|
|
815
|
+
encType: "multipart/form-data",
|
|
816
|
+
data: data
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
function isSignatureEqual(referenceId, numberOfBoundArgs) {
|
|
820
|
+
var referenceClosure = knownServerReferences.get(this);
|
|
821
|
+
if (!referenceClosure)
|
|
822
|
+
throw Error(
|
|
823
|
+
"Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React."
|
|
824
|
+
);
|
|
825
|
+
if (referenceClosure.id !== referenceId) return !1;
|
|
826
|
+
var boundPromise = referenceClosure.bound;
|
|
827
|
+
if (null === boundPromise) return 0 === numberOfBoundArgs;
|
|
828
|
+
switch (boundPromise.status) {
|
|
829
|
+
case "fulfilled":
|
|
830
|
+
return boundPromise.value.length === numberOfBoundArgs;
|
|
831
|
+
case "pending":
|
|
832
|
+
throw boundPromise;
|
|
833
|
+
case "rejected":
|
|
834
|
+
throw boundPromise.reason;
|
|
835
|
+
default:
|
|
836
|
+
throw (
|
|
837
|
+
("string" !== typeof boundPromise.status &&
|
|
838
|
+
((boundPromise.status = "pending"),
|
|
839
|
+
boundPromise.then(
|
|
840
|
+
function (boundArgs) {
|
|
841
|
+
boundPromise.status = "fulfilled";
|
|
842
|
+
boundPromise.value = boundArgs;
|
|
843
|
+
},
|
|
844
|
+
function (error) {
|
|
845
|
+
boundPromise.status = "rejected";
|
|
846
|
+
boundPromise.reason = error;
|
|
847
|
+
}
|
|
848
|
+
)),
|
|
849
|
+
boundPromise)
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
function createFakeServerFunction(
|
|
854
|
+
name,
|
|
855
|
+
filename,
|
|
856
|
+
sourceMap,
|
|
857
|
+
line,
|
|
858
|
+
col,
|
|
859
|
+
environmentName,
|
|
860
|
+
innerFunction
|
|
861
|
+
) {
|
|
862
|
+
name || (name = "<anonymous>");
|
|
863
|
+
var encodedName = JSON.stringify(name);
|
|
864
|
+
1 >= line
|
|
865
|
+
? ((line = encodedName.length + 7),
|
|
866
|
+
(col =
|
|
867
|
+
"s=>({" +
|
|
868
|
+
encodedName +
|
|
869
|
+
" ".repeat(col < line ? 0 : col - line) +
|
|
870
|
+
":(...args) => s(...args)})\n/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */"))
|
|
871
|
+
: (col =
|
|
872
|
+
"/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */" +
|
|
873
|
+
"\n".repeat(line - 2) +
|
|
874
|
+
"server=>({" +
|
|
875
|
+
encodedName +
|
|
876
|
+
":\n" +
|
|
877
|
+
" ".repeat(1 > col ? 0 : col - 1) +
|
|
878
|
+
"(...args) => server(...args)})");
|
|
879
|
+
filename.startsWith("/") && (filename = "file://" + filename);
|
|
880
|
+
sourceMap
|
|
881
|
+
? ((col +=
|
|
882
|
+
"\n//# sourceURL=about://React/" +
|
|
883
|
+
encodeURIComponent(environmentName) +
|
|
884
|
+
"/" +
|
|
885
|
+
encodeURI(filename) +
|
|
886
|
+
"?s" +
|
|
887
|
+
fakeServerFunctionIdx++),
|
|
888
|
+
(col += "\n//# sourceMappingURL=" + sourceMap))
|
|
889
|
+
: filename && (col += "\n//# sourceURL=" + filename);
|
|
890
|
+
try {
|
|
891
|
+
return (0, eval)(col)(innerFunction)[name];
|
|
892
|
+
} catch (x) {
|
|
893
|
+
return innerFunction;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
function registerBoundServerReference(
|
|
897
|
+
reference,
|
|
898
|
+
id,
|
|
899
|
+
bound,
|
|
900
|
+
encodeFormAction
|
|
901
|
+
) {
|
|
902
|
+
knownServerReferences.has(reference) ||
|
|
903
|
+
(knownServerReferences.set(reference, {
|
|
904
|
+
id: id,
|
|
905
|
+
originalBind: reference.bind,
|
|
906
|
+
bound: bound
|
|
907
|
+
}),
|
|
908
|
+
Object.defineProperties(reference, {
|
|
909
|
+
$$FORM_ACTION: {
|
|
910
|
+
value:
|
|
911
|
+
void 0 === encodeFormAction
|
|
912
|
+
? defaultEncodeFormAction
|
|
913
|
+
: function () {
|
|
914
|
+
var referenceClosure = knownServerReferences.get(this);
|
|
915
|
+
if (!referenceClosure)
|
|
916
|
+
throw Error(
|
|
917
|
+
"Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React."
|
|
918
|
+
);
|
|
919
|
+
var boundPromise = referenceClosure.bound;
|
|
920
|
+
null === boundPromise &&
|
|
921
|
+
(boundPromise = Promise.resolve([]));
|
|
922
|
+
return encodeFormAction(referenceClosure.id, boundPromise);
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
$$IS_SIGNATURE_EQUAL: { value: isSignatureEqual },
|
|
926
|
+
bind: { value: bind }
|
|
927
|
+
}));
|
|
928
|
+
}
|
|
929
|
+
function bind() {
|
|
930
|
+
var referenceClosure = knownServerReferences.get(this);
|
|
931
|
+
if (!referenceClosure) return FunctionBind.apply(this, arguments);
|
|
932
|
+
var newFn = referenceClosure.originalBind.apply(this, arguments);
|
|
933
|
+
null != arguments[0] &&
|
|
934
|
+
console.error(
|
|
935
|
+
'Cannot bind "this" of a Server Action. Pass null or undefined as the first argument to .bind().'
|
|
936
|
+
);
|
|
937
|
+
var args = ArraySlice.call(arguments, 1),
|
|
938
|
+
boundPromise = null;
|
|
939
|
+
boundPromise =
|
|
940
|
+
null !== referenceClosure.bound
|
|
941
|
+
? Promise.resolve(referenceClosure.bound).then(function (boundArgs) {
|
|
942
|
+
return boundArgs.concat(args);
|
|
943
|
+
})
|
|
944
|
+
: Promise.resolve(args);
|
|
945
|
+
knownServerReferences.set(newFn, {
|
|
946
|
+
id: referenceClosure.id,
|
|
947
|
+
originalBind: newFn.bind,
|
|
948
|
+
bound: boundPromise
|
|
949
|
+
});
|
|
950
|
+
Object.defineProperties(newFn, {
|
|
951
|
+
$$FORM_ACTION: { value: this.$$FORM_ACTION },
|
|
952
|
+
$$IS_SIGNATURE_EQUAL: { value: isSignatureEqual },
|
|
953
|
+
bind: { value: bind }
|
|
954
|
+
});
|
|
955
|
+
return newFn;
|
|
956
|
+
}
|
|
957
|
+
function createBoundServerReference(
|
|
958
|
+
metaData,
|
|
959
|
+
callServer,
|
|
960
|
+
encodeFormAction,
|
|
961
|
+
findSourceMapURL
|
|
962
|
+
) {
|
|
963
|
+
function action() {
|
|
964
|
+
var args = Array.prototype.slice.call(arguments);
|
|
965
|
+
return bound
|
|
966
|
+
? "fulfilled" === bound.status
|
|
967
|
+
? callServer(id, bound.value.concat(args))
|
|
968
|
+
: Promise.resolve(bound).then(function (boundArgs) {
|
|
969
|
+
return callServer(id, boundArgs.concat(args));
|
|
970
|
+
})
|
|
971
|
+
: callServer(id, args);
|
|
972
|
+
}
|
|
973
|
+
var id = metaData.id,
|
|
974
|
+
bound = metaData.bound,
|
|
975
|
+
location = metaData.location;
|
|
976
|
+
if (location) {
|
|
977
|
+
var functionName = metaData.name || "",
|
|
978
|
+
filename = location[1],
|
|
979
|
+
line = location[2];
|
|
980
|
+
location = location[3];
|
|
981
|
+
metaData = metaData.env || "Server";
|
|
982
|
+
findSourceMapURL =
|
|
983
|
+
null == findSourceMapURL
|
|
984
|
+
? null
|
|
985
|
+
: findSourceMapURL(filename, metaData);
|
|
986
|
+
action = createFakeServerFunction(
|
|
987
|
+
functionName,
|
|
988
|
+
filename,
|
|
989
|
+
findSourceMapURL,
|
|
990
|
+
line,
|
|
991
|
+
location,
|
|
992
|
+
metaData,
|
|
993
|
+
action
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
registerBoundServerReference(action, id, bound, encodeFormAction);
|
|
997
|
+
return action;
|
|
998
|
+
}
|
|
999
|
+
function parseStackLocation(error) {
|
|
1000
|
+
error = error.stack;
|
|
1001
|
+
error.startsWith("Error: react-stack-top-frame\n") &&
|
|
1002
|
+
(error = error.slice(29));
|
|
1003
|
+
var endOfFirst = error.indexOf("\n");
|
|
1004
|
+
if (-1 !== endOfFirst) {
|
|
1005
|
+
var endOfSecond = error.indexOf("\n", endOfFirst + 1);
|
|
1006
|
+
endOfFirst =
|
|
1007
|
+
-1 === endOfSecond
|
|
1008
|
+
? error.slice(endOfFirst + 1)
|
|
1009
|
+
: error.slice(endOfFirst + 1, endOfSecond);
|
|
1010
|
+
} else endOfFirst = error;
|
|
1011
|
+
error = v8FrameRegExp.exec(endOfFirst);
|
|
1012
|
+
if (
|
|
1013
|
+
!error &&
|
|
1014
|
+
((error = jscSpiderMonkeyFrameRegExp.exec(endOfFirst)), !error)
|
|
1015
|
+
)
|
|
1016
|
+
return null;
|
|
1017
|
+
endOfFirst = error[1] || "";
|
|
1018
|
+
"<anonymous>" === endOfFirst && (endOfFirst = "");
|
|
1019
|
+
endOfSecond = error[2] || error[5] || "";
|
|
1020
|
+
"<anonymous>" === endOfSecond && (endOfSecond = "");
|
|
1021
|
+
return [
|
|
1022
|
+
endOfFirst,
|
|
1023
|
+
endOfSecond,
|
|
1024
|
+
+(error[3] || error[6]),
|
|
1025
|
+
+(error[4] || error[7])
|
|
1026
|
+
];
|
|
1027
|
+
}
|
|
1028
|
+
function createServerReference$1(
|
|
1029
|
+
id,
|
|
1030
|
+
callServer,
|
|
1031
|
+
encodeFormAction,
|
|
1032
|
+
findSourceMapURL,
|
|
1033
|
+
functionName
|
|
1034
|
+
) {
|
|
1035
|
+
function action() {
|
|
1036
|
+
var args = Array.prototype.slice.call(arguments);
|
|
1037
|
+
return callServer(id, args);
|
|
1038
|
+
}
|
|
1039
|
+
var location = parseStackLocation(Error("react-stack-top-frame"));
|
|
1040
|
+
if (null !== location) {
|
|
1041
|
+
var filename = location[1],
|
|
1042
|
+
line = location[2];
|
|
1043
|
+
location = location[3];
|
|
1044
|
+
findSourceMapURL =
|
|
1045
|
+
null == findSourceMapURL
|
|
1046
|
+
? null
|
|
1047
|
+
: findSourceMapURL(filename, "Client");
|
|
1048
|
+
action = createFakeServerFunction(
|
|
1049
|
+
functionName || "",
|
|
1050
|
+
filename,
|
|
1051
|
+
findSourceMapURL,
|
|
1052
|
+
line,
|
|
1053
|
+
location,
|
|
1054
|
+
"Client",
|
|
1055
|
+
action
|
|
1056
|
+
);
|
|
1057
|
+
}
|
|
1058
|
+
registerBoundServerReference(action, id, null, encodeFormAction);
|
|
1059
|
+
return action;
|
|
1060
|
+
}
|
|
1061
|
+
function getComponentNameFromType(type) {
|
|
1062
|
+
if (null == type) return null;
|
|
1063
|
+
if ("function" === typeof type)
|
|
1064
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
1065
|
+
? null
|
|
1066
|
+
: type.displayName || type.name || null;
|
|
1067
|
+
if ("string" === typeof type) return type;
|
|
1068
|
+
switch (type) {
|
|
1069
|
+
case REACT_FRAGMENT_TYPE:
|
|
1070
|
+
return "Fragment";
|
|
1071
|
+
case REACT_PROFILER_TYPE:
|
|
1072
|
+
return "Profiler";
|
|
1073
|
+
case REACT_STRICT_MODE_TYPE:
|
|
1074
|
+
return "StrictMode";
|
|
1075
|
+
case REACT_SUSPENSE_TYPE:
|
|
1076
|
+
return "Suspense";
|
|
1077
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
1078
|
+
return "SuspenseList";
|
|
1079
|
+
case REACT_ACTIVITY_TYPE:
|
|
1080
|
+
return "Activity";
|
|
1081
|
+
}
|
|
1082
|
+
if ("object" === typeof type)
|
|
1083
|
+
switch (
|
|
1084
|
+
("number" === typeof type.tag &&
|
|
1085
|
+
console.error(
|
|
1086
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
1087
|
+
),
|
|
1088
|
+
type.$$typeof)
|
|
1089
|
+
) {
|
|
1090
|
+
case REACT_PORTAL_TYPE:
|
|
1091
|
+
return "Portal";
|
|
1092
|
+
case REACT_CONTEXT_TYPE:
|
|
1093
|
+
return type.displayName || "Context";
|
|
1094
|
+
case REACT_CONSUMER_TYPE:
|
|
1095
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
1096
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1097
|
+
var innerType = type.render;
|
|
1098
|
+
type = type.displayName;
|
|
1099
|
+
type ||
|
|
1100
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
1101
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
1102
|
+
return type;
|
|
1103
|
+
case REACT_MEMO_TYPE:
|
|
1104
|
+
return (
|
|
1105
|
+
(innerType = type.displayName || null),
|
|
1106
|
+
null !== innerType
|
|
1107
|
+
? innerType
|
|
1108
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
1109
|
+
);
|
|
1110
|
+
case REACT_LAZY_TYPE:
|
|
1111
|
+
innerType = type._payload;
|
|
1112
|
+
type = type._init;
|
|
1113
|
+
try {
|
|
1114
|
+
return getComponentNameFromType(type(innerType));
|
|
1115
|
+
} catch (x) {}
|
|
1116
|
+
}
|
|
1117
|
+
return null;
|
|
1118
|
+
}
|
|
1119
|
+
function getArrayKind(array) {
|
|
1120
|
+
for (var kind = 0, i = 0; i < array.length; i++) {
|
|
1121
|
+
var value = array[i];
|
|
1122
|
+
if ("object" === typeof value && null !== value)
|
|
1123
|
+
if (
|
|
1124
|
+
isArrayImpl(value) &&
|
|
1125
|
+
2 === value.length &&
|
|
1126
|
+
"string" === typeof value[0]
|
|
1127
|
+
) {
|
|
1128
|
+
if (0 !== kind && 3 !== kind) return 1;
|
|
1129
|
+
kind = 3;
|
|
1130
|
+
} else return 1;
|
|
1131
|
+
else {
|
|
1132
|
+
if (
|
|
1133
|
+
"function" === typeof value ||
|
|
1134
|
+
("string" === typeof value && 50 < value.length) ||
|
|
1135
|
+
(0 !== kind && 2 !== kind)
|
|
1136
|
+
)
|
|
1137
|
+
return 1;
|
|
1138
|
+
kind = 2;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
return kind;
|
|
1142
|
+
}
|
|
1143
|
+
function addObjectToProperties(object, properties, indent, prefix) {
|
|
1144
|
+
for (var key in object)
|
|
1145
|
+
hasOwnProperty.call(object, key) &&
|
|
1146
|
+
"_" !== key[0] &&
|
|
1147
|
+
addValueToProperties(key, object[key], properties, indent, prefix);
|
|
1148
|
+
}
|
|
1149
|
+
function addValueToProperties(
|
|
1150
|
+
propertyName,
|
|
1151
|
+
value,
|
|
1152
|
+
properties,
|
|
1153
|
+
indent,
|
|
1154
|
+
prefix
|
|
1155
|
+
) {
|
|
1156
|
+
switch (typeof value) {
|
|
1157
|
+
case "object":
|
|
1158
|
+
if (null === value) {
|
|
1159
|
+
value = "null";
|
|
1160
|
+
break;
|
|
1161
|
+
} else {
|
|
1162
|
+
if (value.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1163
|
+
var typeName = getComponentNameFromType(value.type) || "\u2026",
|
|
1164
|
+
key = value.key;
|
|
1165
|
+
value = value.props;
|
|
1166
|
+
var propsKeys = Object.keys(value),
|
|
1167
|
+
propsLength = propsKeys.length;
|
|
1168
|
+
if (null == key && 0 === propsLength) {
|
|
1169
|
+
value = "<" + typeName + " />";
|
|
1170
|
+
break;
|
|
1171
|
+
}
|
|
1172
|
+
if (
|
|
1173
|
+
3 > indent ||
|
|
1174
|
+
(1 === propsLength &&
|
|
1175
|
+
"children" === propsKeys[0] &&
|
|
1176
|
+
null == key)
|
|
1177
|
+
) {
|
|
1178
|
+
value = "<" + typeName + " \u2026 />";
|
|
1179
|
+
break;
|
|
1180
|
+
}
|
|
1181
|
+
properties.push([
|
|
1182
|
+
prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1183
|
+
"<" + typeName
|
|
1184
|
+
]);
|
|
1185
|
+
null !== key &&
|
|
1186
|
+
addValueToProperties(
|
|
1187
|
+
"key",
|
|
1188
|
+
key,
|
|
1189
|
+
properties,
|
|
1190
|
+
indent + 1,
|
|
1191
|
+
prefix
|
|
1192
|
+
);
|
|
1193
|
+
propertyName = !1;
|
|
1194
|
+
for (var propKey in value)
|
|
1195
|
+
"children" === propKey
|
|
1196
|
+
? null != value.children &&
|
|
1197
|
+
(!isArrayImpl(value.children) ||
|
|
1198
|
+
0 < value.children.length) &&
|
|
1199
|
+
(propertyName = !0)
|
|
1200
|
+
: hasOwnProperty.call(value, propKey) &&
|
|
1201
|
+
"_" !== propKey[0] &&
|
|
1202
|
+
addValueToProperties(
|
|
1203
|
+
propKey,
|
|
1204
|
+
value[propKey],
|
|
1205
|
+
properties,
|
|
1206
|
+
indent + 1,
|
|
1207
|
+
prefix
|
|
1208
|
+
);
|
|
1209
|
+
properties.push([
|
|
1210
|
+
"",
|
|
1211
|
+
propertyName ? ">\u2026</" + typeName + ">" : "/>"
|
|
1212
|
+
]);
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
typeName = Object.prototype.toString.call(value);
|
|
1216
|
+
typeName = typeName.slice(8, typeName.length - 1);
|
|
1217
|
+
if ("Array" === typeName)
|
|
1218
|
+
if (
|
|
1219
|
+
((propKey = getArrayKind(value)),
|
|
1220
|
+
2 === propKey || 0 === propKey)
|
|
1221
|
+
) {
|
|
1222
|
+
value = JSON.stringify(value);
|
|
1223
|
+
break;
|
|
1224
|
+
} else if (3 === propKey) {
|
|
1225
|
+
properties.push([
|
|
1226
|
+
prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1227
|
+
""
|
|
1228
|
+
]);
|
|
1229
|
+
for (
|
|
1230
|
+
propertyName = 0;
|
|
1231
|
+
propertyName < value.length;
|
|
1232
|
+
propertyName++
|
|
1233
|
+
)
|
|
1234
|
+
(typeName = value[propertyName]),
|
|
1235
|
+
addValueToProperties(
|
|
1236
|
+
typeName[0],
|
|
1237
|
+
typeName[1],
|
|
1238
|
+
properties,
|
|
1239
|
+
indent + 1,
|
|
1240
|
+
prefix
|
|
1241
|
+
);
|
|
1242
|
+
return;
|
|
1243
|
+
}
|
|
1244
|
+
if ("Promise" === typeName) {
|
|
1245
|
+
if ("fulfilled" === value.status) {
|
|
1246
|
+
if (
|
|
1247
|
+
((typeName = properties.length),
|
|
1248
|
+
addValueToProperties(
|
|
1249
|
+
propertyName,
|
|
1250
|
+
value.value,
|
|
1251
|
+
properties,
|
|
1252
|
+
indent,
|
|
1253
|
+
prefix
|
|
1254
|
+
),
|
|
1255
|
+
properties.length > typeName)
|
|
1256
|
+
) {
|
|
1257
|
+
properties = properties[typeName];
|
|
1258
|
+
properties[1] =
|
|
1259
|
+
"Promise<" + (properties[1] || "Object") + ">";
|
|
1260
|
+
return;
|
|
1261
|
+
}
|
|
1262
|
+
} else if (
|
|
1263
|
+
"rejected" === value.status &&
|
|
1264
|
+
((typeName = properties.length),
|
|
1265
|
+
addValueToProperties(
|
|
1266
|
+
propertyName,
|
|
1267
|
+
value.reason,
|
|
1268
|
+
properties,
|
|
1269
|
+
indent,
|
|
1270
|
+
prefix
|
|
1271
|
+
),
|
|
1272
|
+
properties.length > typeName)
|
|
1273
|
+
) {
|
|
1274
|
+
properties = properties[typeName];
|
|
1275
|
+
properties[1] = "Rejected Promise<" + properties[1] + ">";
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
properties.push([
|
|
1279
|
+
"\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1280
|
+
"Promise"
|
|
1281
|
+
]);
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
"Object" === typeName &&
|
|
1285
|
+
(propKey = Object.getPrototypeOf(value)) &&
|
|
1286
|
+
"function" === typeof propKey.constructor &&
|
|
1287
|
+
(typeName = propKey.constructor.name);
|
|
1288
|
+
properties.push([
|
|
1289
|
+
prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1290
|
+
"Object" === typeName ? (3 > indent ? "" : "\u2026") : typeName
|
|
1291
|
+
]);
|
|
1292
|
+
3 > indent &&
|
|
1293
|
+
addObjectToProperties(value, properties, indent + 1, prefix);
|
|
1294
|
+
return;
|
|
1295
|
+
}
|
|
1296
|
+
case "function":
|
|
1297
|
+
value = "" === value.name ? "() => {}" : value.name + "() {}";
|
|
1298
|
+
break;
|
|
1299
|
+
case "string":
|
|
1300
|
+
value =
|
|
1301
|
+
"This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects." ===
|
|
1302
|
+
value
|
|
1303
|
+
? "\u2026"
|
|
1304
|
+
: JSON.stringify(value);
|
|
1305
|
+
break;
|
|
1306
|
+
case "undefined":
|
|
1307
|
+
value = "undefined";
|
|
1308
|
+
break;
|
|
1309
|
+
case "boolean":
|
|
1310
|
+
value = value ? "true" : "false";
|
|
1311
|
+
break;
|
|
1312
|
+
default:
|
|
1313
|
+
value = String(value);
|
|
1314
|
+
}
|
|
1315
|
+
properties.push([
|
|
1316
|
+
prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1317
|
+
value
|
|
1318
|
+
]);
|
|
1319
|
+
}
|
|
1320
|
+
function getIODescription(value) {
|
|
1321
|
+
try {
|
|
1322
|
+
switch (typeof value) {
|
|
1323
|
+
case "object":
|
|
1324
|
+
if (null === value) return "";
|
|
1325
|
+
if (value instanceof Error) return String(value.message);
|
|
1326
|
+
if ("string" === typeof value.url) return value.url;
|
|
1327
|
+
if ("string" === typeof value.href) return value.href;
|
|
1328
|
+
if ("string" === typeof value.src) return value.src;
|
|
1329
|
+
if ("string" === typeof value.currentSrc) return value.currentSrc;
|
|
1330
|
+
if ("string" === typeof value.command) return value.command;
|
|
1331
|
+
if (
|
|
1332
|
+
"object" === typeof value.request &&
|
|
1333
|
+
null !== value.request &&
|
|
1334
|
+
"string" === typeof value.request.url
|
|
1335
|
+
)
|
|
1336
|
+
return value.request.url;
|
|
1337
|
+
if (
|
|
1338
|
+
"object" === typeof value.response &&
|
|
1339
|
+
null !== value.response &&
|
|
1340
|
+
"string" === typeof value.response.url
|
|
1341
|
+
)
|
|
1342
|
+
return value.response.url;
|
|
1343
|
+
if (
|
|
1344
|
+
"string" === typeof value.id ||
|
|
1345
|
+
"number" === typeof value.id ||
|
|
1346
|
+
"bigint" === typeof value.id
|
|
1347
|
+
)
|
|
1348
|
+
return String(value.id);
|
|
1349
|
+
if ("string" === typeof value.name) return value.name;
|
|
1350
|
+
var str = value.toString();
|
|
1351
|
+
return str.startsWith("[object ") ||
|
|
1352
|
+
5 > str.length ||
|
|
1353
|
+
500 < str.length
|
|
1354
|
+
? ""
|
|
1355
|
+
: str;
|
|
1356
|
+
case "string":
|
|
1357
|
+
return 5 > value.length || 500 < value.length ? "" : value;
|
|
1358
|
+
case "number":
|
|
1359
|
+
case "bigint":
|
|
1360
|
+
return String(value);
|
|
1361
|
+
default:
|
|
1362
|
+
return "";
|
|
1363
|
+
}
|
|
1364
|
+
} catch (x) {
|
|
1365
|
+
return "";
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
function markAllTracksInOrder() {
|
|
1369
|
+
supportsUserTiming &&
|
|
1370
|
+
(console.timeStamp(
|
|
1371
|
+
"Server Requests Track",
|
|
1372
|
+
0.001,
|
|
1373
|
+
0.001,
|
|
1374
|
+
"Server Requests \u269b",
|
|
1375
|
+
void 0,
|
|
1376
|
+
"primary-light"
|
|
1377
|
+
),
|
|
1378
|
+
console.timeStamp(
|
|
1379
|
+
"Server Components Track",
|
|
1380
|
+
0.001,
|
|
1381
|
+
0.001,
|
|
1382
|
+
"Primary",
|
|
1383
|
+
"Server Components \u269b",
|
|
1384
|
+
"primary-light"
|
|
1385
|
+
));
|
|
1386
|
+
}
|
|
1387
|
+
function getIOColor(functionName) {
|
|
1388
|
+
switch (functionName.charCodeAt(0) % 3) {
|
|
1389
|
+
case 0:
|
|
1390
|
+
return "tertiary-light";
|
|
1391
|
+
case 1:
|
|
1392
|
+
return "tertiary";
|
|
1393
|
+
default:
|
|
1394
|
+
return "tertiary-dark";
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
function getIOLongName(ioInfo, description, env, rootEnv) {
|
|
1398
|
+
ioInfo = ioInfo.name;
|
|
1399
|
+
description =
|
|
1400
|
+
"" === description ? ioInfo : ioInfo + " (" + description + ")";
|
|
1401
|
+
return env === rootEnv || void 0 === env
|
|
1402
|
+
? description
|
|
1403
|
+
: description + " [" + env + "]";
|
|
1404
|
+
}
|
|
1405
|
+
function getIOShortName(ioInfo, description, env, rootEnv) {
|
|
1406
|
+
ioInfo = ioInfo.name;
|
|
1407
|
+
env = env === rootEnv || void 0 === env ? "" : " [" + env + "]";
|
|
1408
|
+
var desc = "";
|
|
1409
|
+
rootEnv = 30 - ioInfo.length - env.length;
|
|
1410
|
+
if (1 < rootEnv) {
|
|
1411
|
+
var l = description.length;
|
|
1412
|
+
if (0 < l && l <= rootEnv) desc = " (" + description + ")";
|
|
1413
|
+
else if (
|
|
1414
|
+
description.startsWith("http://") ||
|
|
1415
|
+
description.startsWith("https://") ||
|
|
1416
|
+
description.startsWith("/")
|
|
1417
|
+
) {
|
|
1418
|
+
var queryIdx = description.indexOf("?");
|
|
1419
|
+
-1 === queryIdx && (queryIdx = description.length);
|
|
1420
|
+
47 === description.charCodeAt(queryIdx - 1) && queryIdx--;
|
|
1421
|
+
desc = description.lastIndexOf("/", queryIdx - 1);
|
|
1422
|
+
queryIdx - desc < rootEnv
|
|
1423
|
+
? (desc = " (\u2026" + description.slice(desc, queryIdx) + ")")
|
|
1424
|
+
: ((l = description.slice(desc, desc + rootEnv / 2)),
|
|
1425
|
+
(description = description.slice(
|
|
1426
|
+
queryIdx - rootEnv / 2,
|
|
1427
|
+
queryIdx
|
|
1428
|
+
)),
|
|
1429
|
+
(desc =
|
|
1430
|
+
" (" +
|
|
1431
|
+
(0 < desc ? "\u2026" : "") +
|
|
1432
|
+
l +
|
|
1433
|
+
"\u2026" +
|
|
1434
|
+
description +
|
|
1435
|
+
")"));
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
return ioInfo + desc + env;
|
|
1439
|
+
}
|
|
1440
|
+
function logComponentAwait(
|
|
1441
|
+
asyncInfo,
|
|
1442
|
+
trackIdx,
|
|
1443
|
+
startTime,
|
|
1444
|
+
endTime,
|
|
1445
|
+
rootEnv,
|
|
1446
|
+
value
|
|
1447
|
+
) {
|
|
1448
|
+
if (supportsUserTiming && 0 < endTime) {
|
|
1449
|
+
var description = getIODescription(value),
|
|
1450
|
+
name = getIOShortName(
|
|
1451
|
+
asyncInfo.awaited,
|
|
1452
|
+
description,
|
|
1453
|
+
asyncInfo.env,
|
|
1454
|
+
rootEnv
|
|
1455
|
+
),
|
|
1456
|
+
entryName = "await " + name;
|
|
1457
|
+
name = getIOColor(name);
|
|
1458
|
+
var debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask;
|
|
1459
|
+
if (debugTask) {
|
|
1460
|
+
var properties = [];
|
|
1461
|
+
"object" === typeof value && null !== value
|
|
1462
|
+
? addObjectToProperties(value, properties, 0, "")
|
|
1463
|
+
: void 0 !== value &&
|
|
1464
|
+
addValueToProperties("awaited value", value, properties, 0, "");
|
|
1465
|
+
asyncInfo = getIOLongName(
|
|
1466
|
+
asyncInfo.awaited,
|
|
1467
|
+
description,
|
|
1468
|
+
asyncInfo.env,
|
|
1469
|
+
rootEnv
|
|
1470
|
+
);
|
|
1471
|
+
debugTask.run(
|
|
1472
|
+
performance.measure.bind(performance, entryName, {
|
|
1473
|
+
start: 0 > startTime ? 0 : startTime,
|
|
1474
|
+
end: endTime,
|
|
1475
|
+
detail: {
|
|
1476
|
+
devtools: {
|
|
1477
|
+
color: name,
|
|
1478
|
+
track: trackNames[trackIdx],
|
|
1479
|
+
trackGroup: "Server Components \u269b",
|
|
1480
|
+
properties: properties,
|
|
1481
|
+
tooltipText: asyncInfo
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
})
|
|
1485
|
+
);
|
|
1486
|
+
} else
|
|
1487
|
+
console.timeStamp(
|
|
1488
|
+
entryName,
|
|
1489
|
+
0 > startTime ? 0 : startTime,
|
|
1490
|
+
endTime,
|
|
1491
|
+
trackNames[trackIdx],
|
|
1492
|
+
"Server Components \u269b",
|
|
1493
|
+
name
|
|
1494
|
+
);
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
function logIOInfoErrored(ioInfo, rootEnv, error) {
|
|
1498
|
+
var startTime = ioInfo.start,
|
|
1499
|
+
endTime = ioInfo.end;
|
|
1500
|
+
if (supportsUserTiming && 0 <= endTime) {
|
|
1501
|
+
var description = getIODescription(error),
|
|
1502
|
+
entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv),
|
|
1503
|
+
debugTask = ioInfo.debugTask;
|
|
1504
|
+
debugTask
|
|
1505
|
+
? ((error = [
|
|
1506
|
+
[
|
|
1507
|
+
"rejected with",
|
|
1508
|
+
"object" === typeof error &&
|
|
1509
|
+
null !== error &&
|
|
1510
|
+
"string" === typeof error.message
|
|
1511
|
+
? String(error.message)
|
|
1512
|
+
: String(error)
|
|
1513
|
+
]
|
|
1514
|
+
]),
|
|
1515
|
+
(ioInfo =
|
|
1516
|
+
getIOLongName(ioInfo, description, ioInfo.env, rootEnv) +
|
|
1517
|
+
" Rejected"),
|
|
1518
|
+
debugTask.run(
|
|
1519
|
+
performance.measure.bind(performance, "\u200b" + entryName, {
|
|
1520
|
+
start: 0 > startTime ? 0 : startTime,
|
|
1521
|
+
end: endTime,
|
|
1522
|
+
detail: {
|
|
1523
|
+
devtools: {
|
|
1524
|
+
color: "error",
|
|
1525
|
+
track: "Server Requests \u269b",
|
|
1526
|
+
properties: error,
|
|
1527
|
+
tooltipText: ioInfo
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
})
|
|
1531
|
+
))
|
|
1532
|
+
: console.timeStamp(
|
|
1533
|
+
entryName,
|
|
1534
|
+
0 > startTime ? 0 : startTime,
|
|
1535
|
+
endTime,
|
|
1536
|
+
"Server Requests \u269b",
|
|
1537
|
+
void 0,
|
|
1538
|
+
"error"
|
|
1539
|
+
);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
function logIOInfo(ioInfo, rootEnv, value) {
|
|
1543
|
+
var startTime = ioInfo.start,
|
|
1544
|
+
endTime = ioInfo.end;
|
|
1545
|
+
if (supportsUserTiming && 0 <= endTime) {
|
|
1546
|
+
var description = getIODescription(value),
|
|
1547
|
+
entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv),
|
|
1548
|
+
color = getIOColor(entryName),
|
|
1549
|
+
debugTask = ioInfo.debugTask;
|
|
1550
|
+
if (debugTask) {
|
|
1551
|
+
var properties = [];
|
|
1552
|
+
"object" === typeof value && null !== value
|
|
1553
|
+
? addObjectToProperties(value, properties, 0, "")
|
|
1554
|
+
: void 0 !== value &&
|
|
1555
|
+
addValueToProperties("Resolved", value, properties, 0, "");
|
|
1556
|
+
ioInfo = getIOLongName(ioInfo, description, ioInfo.env, rootEnv);
|
|
1557
|
+
debugTask.run(
|
|
1558
|
+
performance.measure.bind(performance, "\u200b" + entryName, {
|
|
1559
|
+
start: 0 > startTime ? 0 : startTime,
|
|
1560
|
+
end: endTime,
|
|
1561
|
+
detail: {
|
|
1562
|
+
devtools: {
|
|
1563
|
+
color: color,
|
|
1564
|
+
track: "Server Requests \u269b",
|
|
1565
|
+
properties: properties,
|
|
1566
|
+
tooltipText: ioInfo
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
})
|
|
1570
|
+
);
|
|
1571
|
+
} else
|
|
1572
|
+
console.timeStamp(
|
|
1573
|
+
entryName,
|
|
1574
|
+
0 > startTime ? 0 : startTime,
|
|
1575
|
+
endTime,
|
|
1576
|
+
"Server Requests \u269b",
|
|
1577
|
+
void 0,
|
|
1578
|
+
color
|
|
1579
|
+
);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
function prepareStackTrace(error, structuredStackTrace) {
|
|
1583
|
+
error = (error.name || "Error") + ": " + (error.message || "");
|
|
1584
|
+
for (var i = 0; i < structuredStackTrace.length; i++)
|
|
1585
|
+
error += "\n at " + structuredStackTrace[i].toString();
|
|
1586
|
+
return error;
|
|
1587
|
+
}
|
|
1588
|
+
function ReactPromise(status, value, reason) {
|
|
1589
|
+
this.status = status;
|
|
1590
|
+
this.value = value;
|
|
1591
|
+
this.reason = reason;
|
|
1592
|
+
this._children = [];
|
|
1593
|
+
this._debugChunk = null;
|
|
1594
|
+
this._debugInfo = [];
|
|
1595
|
+
}
|
|
1596
|
+
function unwrapWeakResponse(weakResponse) {
|
|
1597
|
+
weakResponse = weakResponse.weak.deref();
|
|
1598
|
+
if (void 0 === weakResponse)
|
|
1599
|
+
throw Error(
|
|
1600
|
+
"We did not expect to receive new data after GC:ing the response."
|
|
1601
|
+
);
|
|
1602
|
+
return weakResponse;
|
|
1603
|
+
}
|
|
1604
|
+
function closeDebugChannel(debugChannel) {
|
|
1605
|
+
debugChannel.callback && debugChannel.callback("");
|
|
1606
|
+
}
|
|
1607
|
+
function readChunk(chunk) {
|
|
1608
|
+
switch (chunk.status) {
|
|
1609
|
+
case "resolved_model":
|
|
1610
|
+
initializeModelChunk(chunk);
|
|
1611
|
+
break;
|
|
1612
|
+
case "resolved_module":
|
|
1613
|
+
initializeModuleChunk(chunk);
|
|
1614
|
+
}
|
|
1615
|
+
switch (chunk.status) {
|
|
1616
|
+
case "fulfilled":
|
|
1617
|
+
return chunk.value;
|
|
1618
|
+
case "pending":
|
|
1619
|
+
case "blocked":
|
|
1620
|
+
case "halted":
|
|
1621
|
+
throw chunk;
|
|
1622
|
+
default:
|
|
1623
|
+
throw chunk.reason;
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
function getRoot(weakResponse) {
|
|
1627
|
+
weakResponse = unwrapWeakResponse(weakResponse);
|
|
1628
|
+
return getChunk(weakResponse, 0);
|
|
1629
|
+
}
|
|
1630
|
+
function createPendingChunk(response) {
|
|
1631
|
+
0 === response._pendingChunks++ &&
|
|
1632
|
+
((response._weakResponse.response = response),
|
|
1633
|
+
null !== response._pendingInitialRender &&
|
|
1634
|
+
(clearTimeout(response._pendingInitialRender),
|
|
1635
|
+
(response._pendingInitialRender = null)));
|
|
1636
|
+
return new ReactPromise("pending", null, null);
|
|
1637
|
+
}
|
|
1638
|
+
function releasePendingChunk(response, chunk) {
|
|
1639
|
+
"pending" === chunk.status &&
|
|
1640
|
+
0 === --response._pendingChunks &&
|
|
1641
|
+
((response._weakResponse.response = null),
|
|
1642
|
+
(response._pendingInitialRender = setTimeout(
|
|
1643
|
+
flushInitialRenderPerformance.bind(null, response),
|
|
1644
|
+
100
|
|
1645
|
+
)));
|
|
1646
|
+
}
|
|
1647
|
+
function moveDebugInfoFromChunkToInnerValue(chunk, value) {
|
|
1648
|
+
value = resolveLazy(value);
|
|
1649
|
+
"object" !== typeof value ||
|
|
1650
|
+
null === value ||
|
|
1651
|
+
(!isArrayImpl(value) &&
|
|
1652
|
+
"function" !== typeof value[ASYNC_ITERATOR] &&
|
|
1653
|
+
value.$$typeof !== REACT_ELEMENT_TYPE &&
|
|
1654
|
+
value.$$typeof !== REACT_LAZY_TYPE) ||
|
|
1655
|
+
((chunk = chunk._debugInfo.splice(0)),
|
|
1656
|
+
isArrayImpl(value._debugInfo)
|
|
1657
|
+
? value._debugInfo.unshift.apply(value._debugInfo, chunk)
|
|
1658
|
+
: Object.defineProperty(value, "_debugInfo", {
|
|
1659
|
+
configurable: !1,
|
|
1660
|
+
enumerable: !1,
|
|
1661
|
+
writable: !0,
|
|
1662
|
+
value: chunk
|
|
1663
|
+
}));
|
|
1664
|
+
}
|
|
1665
|
+
function wakeChunk(listeners, value, chunk) {
|
|
1666
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
1667
|
+
var listener = listeners[i];
|
|
1668
|
+
"function" === typeof listener
|
|
1669
|
+
? listener(value)
|
|
1670
|
+
: fulfillReference(listener, value, chunk);
|
|
1671
|
+
}
|
|
1672
|
+
moveDebugInfoFromChunkToInnerValue(chunk, value);
|
|
1673
|
+
}
|
|
1674
|
+
function rejectChunk(listeners, error) {
|
|
1675
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
1676
|
+
var listener = listeners[i];
|
|
1677
|
+
"function" === typeof listener
|
|
1678
|
+
? listener(error)
|
|
1679
|
+
: rejectReference(listener, error);
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
function resolveBlockedCycle(resolvedChunk, reference) {
|
|
1683
|
+
var referencedChunk = reference.handler.chunk;
|
|
1684
|
+
if (null === referencedChunk) return null;
|
|
1685
|
+
if (referencedChunk === resolvedChunk) return reference.handler;
|
|
1686
|
+
reference = referencedChunk.value;
|
|
1687
|
+
if (null !== reference)
|
|
1688
|
+
for (
|
|
1689
|
+
referencedChunk = 0;
|
|
1690
|
+
referencedChunk < reference.length;
|
|
1691
|
+
referencedChunk++
|
|
1692
|
+
) {
|
|
1693
|
+
var listener = reference[referencedChunk];
|
|
1694
|
+
if (
|
|
1695
|
+
"function" !== typeof listener &&
|
|
1696
|
+
((listener = resolveBlockedCycle(resolvedChunk, listener)),
|
|
1697
|
+
null !== listener)
|
|
1698
|
+
)
|
|
1699
|
+
return listener;
|
|
1700
|
+
}
|
|
1701
|
+
return null;
|
|
1702
|
+
}
|
|
1703
|
+
function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) {
|
|
1704
|
+
switch (chunk.status) {
|
|
1705
|
+
case "fulfilled":
|
|
1706
|
+
wakeChunk(resolveListeners, chunk.value, chunk);
|
|
1707
|
+
break;
|
|
1708
|
+
case "blocked":
|
|
1709
|
+
for (var i = 0; i < resolveListeners.length; i++) {
|
|
1710
|
+
var listener = resolveListeners[i];
|
|
1711
|
+
if ("function" !== typeof listener) {
|
|
1712
|
+
var cyclicHandler = resolveBlockedCycle(chunk, listener);
|
|
1713
|
+
if (null !== cyclicHandler)
|
|
1714
|
+
switch (
|
|
1715
|
+
(fulfillReference(listener, cyclicHandler.value, chunk),
|
|
1716
|
+
resolveListeners.splice(i, 1),
|
|
1717
|
+
i--,
|
|
1718
|
+
null !== rejectListeners &&
|
|
1719
|
+
((listener = rejectListeners.indexOf(listener)),
|
|
1720
|
+
-1 !== listener && rejectListeners.splice(listener, 1)),
|
|
1721
|
+
chunk.status)
|
|
1722
|
+
) {
|
|
1723
|
+
case "fulfilled":
|
|
1724
|
+
wakeChunk(resolveListeners, chunk.value, chunk);
|
|
1725
|
+
return;
|
|
1726
|
+
case "rejected":
|
|
1727
|
+
null !== rejectListeners &&
|
|
1728
|
+
rejectChunk(rejectListeners, chunk.reason);
|
|
1729
|
+
return;
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
case "pending":
|
|
1734
|
+
if (chunk.value)
|
|
1735
|
+
for (i = 0; i < resolveListeners.length; i++)
|
|
1736
|
+
chunk.value.push(resolveListeners[i]);
|
|
1737
|
+
else chunk.value = resolveListeners;
|
|
1738
|
+
if (chunk.reason) {
|
|
1739
|
+
if (rejectListeners)
|
|
1740
|
+
for (
|
|
1741
|
+
resolveListeners = 0;
|
|
1742
|
+
resolveListeners < rejectListeners.length;
|
|
1743
|
+
resolveListeners++
|
|
1744
|
+
)
|
|
1745
|
+
chunk.reason.push(rejectListeners[resolveListeners]);
|
|
1746
|
+
} else chunk.reason = rejectListeners;
|
|
1747
|
+
break;
|
|
1748
|
+
case "rejected":
|
|
1749
|
+
rejectListeners && rejectChunk(rejectListeners, chunk.reason);
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
function triggerErrorOnChunk(response, chunk, error) {
|
|
1753
|
+
if ("pending" !== chunk.status && "blocked" !== chunk.status)
|
|
1754
|
+
chunk.reason.error(error);
|
|
1755
|
+
else {
|
|
1756
|
+
releasePendingChunk(response, chunk);
|
|
1757
|
+
var listeners = chunk.reason;
|
|
1758
|
+
if ("pending" === chunk.status && null != chunk._debugChunk) {
|
|
1759
|
+
var prevHandler = initializingHandler,
|
|
1760
|
+
prevChunk = initializingChunk;
|
|
1761
|
+
initializingHandler = null;
|
|
1762
|
+
chunk.status = "blocked";
|
|
1763
|
+
chunk.value = null;
|
|
1764
|
+
chunk.reason = null;
|
|
1765
|
+
initializingChunk = chunk;
|
|
1766
|
+
try {
|
|
1767
|
+
initializeDebugChunk(response, chunk);
|
|
1768
|
+
} finally {
|
|
1769
|
+
(initializingHandler = prevHandler),
|
|
1770
|
+
(initializingChunk = prevChunk);
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
chunk.status = "rejected";
|
|
1774
|
+
chunk.reason = error;
|
|
1775
|
+
null !== listeners && rejectChunk(listeners, error);
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
function createResolvedModelChunk(response, value) {
|
|
1779
|
+
return new ReactPromise("resolved_model", value, response);
|
|
1780
|
+
}
|
|
1781
|
+
function createResolvedIteratorResultChunk(response, value, done) {
|
|
1782
|
+
return new ReactPromise(
|
|
1783
|
+
"resolved_model",
|
|
1784
|
+
(done ? '{"done":true,"value":' : '{"done":false,"value":') +
|
|
1785
|
+
value +
|
|
1786
|
+
"}",
|
|
1787
|
+
response
|
|
1788
|
+
);
|
|
1789
|
+
}
|
|
1790
|
+
function resolveIteratorResultChunk(response, chunk, value, done) {
|
|
1791
|
+
resolveModelChunk(
|
|
1792
|
+
response,
|
|
1793
|
+
chunk,
|
|
1794
|
+
(done ? '{"done":true,"value":' : '{"done":false,"value":') +
|
|
1795
|
+
value +
|
|
1796
|
+
"}"
|
|
1797
|
+
);
|
|
1798
|
+
}
|
|
1799
|
+
function resolveModelChunk(response, chunk, value) {
|
|
1800
|
+
if ("pending" !== chunk.status) chunk.reason.enqueueModel(value);
|
|
1801
|
+
else {
|
|
1802
|
+
releasePendingChunk(response, chunk);
|
|
1803
|
+
var resolveListeners = chunk.value,
|
|
1804
|
+
rejectListeners = chunk.reason;
|
|
1805
|
+
chunk.status = "resolved_model";
|
|
1806
|
+
chunk.value = value;
|
|
1807
|
+
chunk.reason = response;
|
|
1808
|
+
null !== resolveListeners &&
|
|
1809
|
+
(initializeModelChunk(chunk),
|
|
1810
|
+
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
function resolveModuleChunk(response, chunk, value) {
|
|
1814
|
+
if ("pending" === chunk.status || "blocked" === chunk.status) {
|
|
1815
|
+
releasePendingChunk(response, chunk);
|
|
1816
|
+
response = chunk.value;
|
|
1817
|
+
var rejectListeners = chunk.reason;
|
|
1818
|
+
chunk.status = "resolved_module";
|
|
1819
|
+
chunk.value = value;
|
|
1820
|
+
chunk.reason = null;
|
|
1821
|
+
value = [];
|
|
1822
|
+
null !== value && chunk._debugInfo.push.apply(chunk._debugInfo, value);
|
|
1823
|
+
null !== response &&
|
|
1824
|
+
(initializeModuleChunk(chunk),
|
|
1825
|
+
wakeChunkIfInitialized(chunk, response, rejectListeners));
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
function initializeDebugChunk(response, chunk) {
|
|
1829
|
+
var debugChunk = chunk._debugChunk;
|
|
1830
|
+
if (null !== debugChunk) {
|
|
1831
|
+
var debugInfo = chunk._debugInfo;
|
|
1832
|
+
try {
|
|
1833
|
+
if ("resolved_model" === debugChunk.status) {
|
|
1834
|
+
for (
|
|
1835
|
+
var idx = debugInfo.length, c = debugChunk._debugChunk;
|
|
1836
|
+
null !== c;
|
|
1837
|
+
|
|
1838
|
+
)
|
|
1839
|
+
"fulfilled" !== c.status && idx++, (c = c._debugChunk);
|
|
1840
|
+
initializeModelChunk(debugChunk);
|
|
1841
|
+
switch (debugChunk.status) {
|
|
1842
|
+
case "fulfilled":
|
|
1843
|
+
debugInfo[idx] = initializeDebugInfo(
|
|
1844
|
+
response,
|
|
1845
|
+
debugChunk.value
|
|
1846
|
+
);
|
|
1847
|
+
break;
|
|
1848
|
+
case "blocked":
|
|
1849
|
+
case "pending":
|
|
1850
|
+
waitForReference(
|
|
1851
|
+
debugChunk,
|
|
1852
|
+
debugInfo,
|
|
1853
|
+
"" + idx,
|
|
1854
|
+
response,
|
|
1855
|
+
initializeDebugInfo,
|
|
1856
|
+
[""],
|
|
1857
|
+
!0
|
|
1858
|
+
);
|
|
1859
|
+
break;
|
|
1860
|
+
default:
|
|
1861
|
+
throw debugChunk.reason;
|
|
1862
|
+
}
|
|
1863
|
+
} else
|
|
1864
|
+
switch (debugChunk.status) {
|
|
1865
|
+
case "fulfilled":
|
|
1866
|
+
break;
|
|
1867
|
+
case "blocked":
|
|
1868
|
+
case "pending":
|
|
1869
|
+
waitForReference(
|
|
1870
|
+
debugChunk,
|
|
1871
|
+
{},
|
|
1872
|
+
"debug",
|
|
1873
|
+
response,
|
|
1874
|
+
initializeDebugInfo,
|
|
1875
|
+
[""],
|
|
1876
|
+
!0
|
|
1877
|
+
);
|
|
1878
|
+
break;
|
|
1879
|
+
default:
|
|
1880
|
+
throw debugChunk.reason;
|
|
1881
|
+
}
|
|
1882
|
+
} catch (error) {
|
|
1883
|
+
triggerErrorOnChunk(response, chunk, error);
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
function initializeModelChunk(chunk) {
|
|
1888
|
+
var prevHandler = initializingHandler,
|
|
1889
|
+
prevChunk = initializingChunk;
|
|
1890
|
+
initializingHandler = null;
|
|
1891
|
+
var resolvedModel = chunk.value,
|
|
1892
|
+
response = chunk.reason;
|
|
1893
|
+
chunk.status = "blocked";
|
|
1894
|
+
chunk.value = null;
|
|
1895
|
+
chunk.reason = null;
|
|
1896
|
+
initializingChunk = chunk;
|
|
1897
|
+
initializeDebugChunk(response, chunk);
|
|
1898
|
+
try {
|
|
1899
|
+
var value = JSON.parse(resolvedModel, response._fromJSON),
|
|
1900
|
+
resolveListeners = chunk.value;
|
|
1901
|
+
if (null !== resolveListeners)
|
|
1902
|
+
for (
|
|
1903
|
+
chunk.value = null, chunk.reason = null, resolvedModel = 0;
|
|
1904
|
+
resolvedModel < resolveListeners.length;
|
|
1905
|
+
resolvedModel++
|
|
1906
|
+
) {
|
|
1907
|
+
var listener = resolveListeners[resolvedModel];
|
|
1908
|
+
"function" === typeof listener
|
|
1909
|
+
? listener(value)
|
|
1910
|
+
: fulfillReference(listener, value, chunk);
|
|
1911
|
+
}
|
|
1912
|
+
if (null !== initializingHandler) {
|
|
1913
|
+
if (initializingHandler.errored) throw initializingHandler.reason;
|
|
1914
|
+
if (0 < initializingHandler.deps) {
|
|
1915
|
+
initializingHandler.value = value;
|
|
1916
|
+
initializingHandler.chunk = chunk;
|
|
1917
|
+
return;
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
chunk.status = "fulfilled";
|
|
1921
|
+
chunk.value = value;
|
|
1922
|
+
moveDebugInfoFromChunkToInnerValue(chunk, value);
|
|
1923
|
+
} catch (error) {
|
|
1924
|
+
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1925
|
+
} finally {
|
|
1926
|
+
(initializingHandler = prevHandler), (initializingChunk = prevChunk);
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
function initializeModuleChunk(chunk) {
|
|
1930
|
+
try {
|
|
1931
|
+
var value = requireModule(chunk.value);
|
|
1932
|
+
chunk.status = "fulfilled";
|
|
1933
|
+
chunk.value = value;
|
|
1934
|
+
} catch (error) {
|
|
1935
|
+
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
function reportGlobalError(weakResponse, error) {
|
|
1939
|
+
if (void 0 !== weakResponse.weak.deref()) {
|
|
1940
|
+
var response = unwrapWeakResponse(weakResponse);
|
|
1941
|
+
response._closed = !0;
|
|
1942
|
+
response._closedReason = error;
|
|
1943
|
+
response._chunks.forEach(function (chunk) {
|
|
1944
|
+
"pending" === chunk.status
|
|
1945
|
+
? triggerErrorOnChunk(response, chunk, error)
|
|
1946
|
+
: "fulfilled" === chunk.status &&
|
|
1947
|
+
null !== chunk.reason &&
|
|
1948
|
+
chunk.reason.error(error);
|
|
1949
|
+
});
|
|
1950
|
+
weakResponse = response._debugChannel;
|
|
1951
|
+
void 0 !== weakResponse &&
|
|
1952
|
+
(closeDebugChannel(weakResponse),
|
|
1953
|
+
(response._debugChannel = void 0),
|
|
1954
|
+
null !== debugChannelRegistry &&
|
|
1955
|
+
debugChannelRegistry.unregister(response));
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
function nullRefGetter() {
|
|
1959
|
+
return null;
|
|
1960
|
+
}
|
|
1961
|
+
function getTaskName(type) {
|
|
1962
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
1963
|
+
if ("function" === typeof type) return '"use client"';
|
|
1964
|
+
if (
|
|
1965
|
+
"object" === typeof type &&
|
|
1966
|
+
null !== type &&
|
|
1967
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
1968
|
+
)
|
|
1969
|
+
return type._init === readChunk ? '"use client"' : "<...>";
|
|
1970
|
+
try {
|
|
1971
|
+
var name = getComponentNameFromType(type);
|
|
1972
|
+
return name ? "<" + name + ">" : "<...>";
|
|
1973
|
+
} catch (x) {
|
|
1974
|
+
return "<...>";
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
function initializeElement(response, element, lazyNode) {
|
|
1978
|
+
var stack = element._debugStack,
|
|
1979
|
+
owner = element._owner;
|
|
1980
|
+
null === owner && (element._owner = response._debugRootOwner);
|
|
1981
|
+
var env = response._rootEnvironmentName;
|
|
1982
|
+
null !== owner && null != owner.env && (env = owner.env);
|
|
1983
|
+
var normalizedStackTrace = null;
|
|
1984
|
+
null === owner && null != response._debugRootStack
|
|
1985
|
+
? (normalizedStackTrace = response._debugRootStack)
|
|
1986
|
+
: null !== stack &&
|
|
1987
|
+
(normalizedStackTrace = createFakeJSXCallStackInDEV(
|
|
1988
|
+
response,
|
|
1989
|
+
stack,
|
|
1990
|
+
env
|
|
1991
|
+
));
|
|
1992
|
+
element._debugStack = normalizedStackTrace;
|
|
1993
|
+
normalizedStackTrace = null;
|
|
1994
|
+
supportsCreateTask &&
|
|
1995
|
+
null !== stack &&
|
|
1996
|
+
((normalizedStackTrace = console.createTask.bind(
|
|
1997
|
+
console,
|
|
1998
|
+
getTaskName(element.type)
|
|
1999
|
+
)),
|
|
2000
|
+
(stack = buildFakeCallStack(
|
|
2001
|
+
response,
|
|
2002
|
+
stack,
|
|
2003
|
+
env,
|
|
2004
|
+
!1,
|
|
2005
|
+
normalizedStackTrace
|
|
2006
|
+
)),
|
|
2007
|
+
(env = null === owner ? null : initializeFakeTask(response, owner)),
|
|
2008
|
+
null === env
|
|
2009
|
+
? ((env = response._debugRootTask),
|
|
2010
|
+
(normalizedStackTrace = null != env ? env.run(stack) : stack()))
|
|
2011
|
+
: (normalizedStackTrace = env.run(stack)));
|
|
2012
|
+
element._debugTask = normalizedStackTrace;
|
|
2013
|
+
null !== owner && initializeFakeStack(response, owner);
|
|
2014
|
+
null !== lazyNode &&
|
|
2015
|
+
(lazyNode._store &&
|
|
2016
|
+
lazyNode._store.validated &&
|
|
2017
|
+
!element._store.validated &&
|
|
2018
|
+
(element._store.validated = lazyNode._store.validated),
|
|
2019
|
+
"fulfilled" === lazyNode._payload.status &&
|
|
2020
|
+
lazyNode._debugInfo &&
|
|
2021
|
+
((response = lazyNode._debugInfo.splice(0)),
|
|
2022
|
+
element._debugInfo
|
|
2023
|
+
? element._debugInfo.unshift.apply(element._debugInfo, response)
|
|
2024
|
+
: Object.defineProperty(element, "_debugInfo", {
|
|
2025
|
+
configurable: !1,
|
|
2026
|
+
enumerable: !1,
|
|
2027
|
+
writable: !0,
|
|
2028
|
+
value: response
|
|
2029
|
+
})));
|
|
2030
|
+
Object.freeze(element.props);
|
|
2031
|
+
}
|
|
2032
|
+
function createLazyChunkWrapper(chunk, validated) {
|
|
2033
|
+
var lazyType = {
|
|
2034
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
2035
|
+
_payload: chunk,
|
|
2036
|
+
_init: readChunk
|
|
2037
|
+
};
|
|
2038
|
+
lazyType._debugInfo = chunk._debugInfo;
|
|
2039
|
+
lazyType._store = { validated: validated };
|
|
2040
|
+
return lazyType;
|
|
2041
|
+
}
|
|
2042
|
+
function getChunk(response, id) {
|
|
2043
|
+
var chunks = response._chunks,
|
|
2044
|
+
chunk = chunks.get(id);
|
|
2045
|
+
chunk ||
|
|
2046
|
+
((chunk = response._closed
|
|
2047
|
+
? new ReactPromise("rejected", null, response._closedReason)
|
|
2048
|
+
: createPendingChunk(response)),
|
|
2049
|
+
chunks.set(id, chunk));
|
|
2050
|
+
return chunk;
|
|
2051
|
+
}
|
|
2052
|
+
function fulfillReference(reference, value, fulfilledChunk) {
|
|
2053
|
+
var response = reference.response,
|
|
2054
|
+
handler = reference.handler,
|
|
2055
|
+
parentObject = reference.parentObject,
|
|
2056
|
+
key = reference.key,
|
|
2057
|
+
map = reference.map,
|
|
2058
|
+
path = reference.path;
|
|
2059
|
+
try {
|
|
2060
|
+
for (var i = 1; i < path.length; i++) {
|
|
2061
|
+
for (
|
|
2062
|
+
;
|
|
2063
|
+
"object" === typeof value &&
|
|
2064
|
+
null !== value &&
|
|
2065
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2066
|
+
|
|
2067
|
+
) {
|
|
2068
|
+
var referencedChunk = value._payload;
|
|
2069
|
+
if (referencedChunk === handler.chunk) value = handler.value;
|
|
2070
|
+
else {
|
|
2071
|
+
switch (referencedChunk.status) {
|
|
2072
|
+
case "resolved_model":
|
|
2073
|
+
initializeModelChunk(referencedChunk);
|
|
2074
|
+
break;
|
|
2075
|
+
case "resolved_module":
|
|
2076
|
+
initializeModuleChunk(referencedChunk);
|
|
2077
|
+
}
|
|
2078
|
+
switch (referencedChunk.status) {
|
|
2079
|
+
case "fulfilled":
|
|
2080
|
+
value = referencedChunk.value;
|
|
2081
|
+
continue;
|
|
2082
|
+
case "blocked":
|
|
2083
|
+
var cyclicHandler = resolveBlockedCycle(
|
|
2084
|
+
referencedChunk,
|
|
2085
|
+
reference
|
|
2086
|
+
);
|
|
2087
|
+
if (null !== cyclicHandler) {
|
|
2088
|
+
value = cyclicHandler.value;
|
|
2089
|
+
continue;
|
|
2090
|
+
}
|
|
2091
|
+
case "pending":
|
|
2092
|
+
path.splice(0, i - 1);
|
|
2093
|
+
null === referencedChunk.value
|
|
2094
|
+
? (referencedChunk.value = [reference])
|
|
2095
|
+
: referencedChunk.value.push(reference);
|
|
2096
|
+
null === referencedChunk.reason
|
|
2097
|
+
? (referencedChunk.reason = [reference])
|
|
2098
|
+
: referencedChunk.reason.push(reference);
|
|
2099
|
+
return;
|
|
2100
|
+
case "halted":
|
|
2101
|
+
return;
|
|
2102
|
+
default:
|
|
2103
|
+
rejectReference(reference, referencedChunk.reason);
|
|
2104
|
+
return;
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
value = value[path[i]];
|
|
2109
|
+
}
|
|
2110
|
+
for (
|
|
2111
|
+
;
|
|
2112
|
+
"object" === typeof value &&
|
|
2113
|
+
null !== value &&
|
|
2114
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2115
|
+
|
|
2116
|
+
) {
|
|
2117
|
+
var _referencedChunk = value._payload;
|
|
2118
|
+
if (_referencedChunk === handler.chunk) value = handler.value;
|
|
2119
|
+
else {
|
|
2120
|
+
switch (_referencedChunk.status) {
|
|
2121
|
+
case "resolved_model":
|
|
2122
|
+
initializeModelChunk(_referencedChunk);
|
|
2123
|
+
break;
|
|
2124
|
+
case "resolved_module":
|
|
2125
|
+
initializeModuleChunk(_referencedChunk);
|
|
2126
|
+
}
|
|
2127
|
+
switch (_referencedChunk.status) {
|
|
2128
|
+
case "fulfilled":
|
|
2129
|
+
value = _referencedChunk.value;
|
|
2130
|
+
continue;
|
|
2131
|
+
}
|
|
2132
|
+
break;
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
var mappedValue = map(response, value, parentObject, key);
|
|
2136
|
+
parentObject[key] = mappedValue;
|
|
2137
|
+
"" === key && null === handler.value && (handler.value = mappedValue);
|
|
2138
|
+
if (
|
|
2139
|
+
parentObject[0] === REACT_ELEMENT_TYPE &&
|
|
2140
|
+
"object" === typeof handler.value &&
|
|
2141
|
+
null !== handler.value &&
|
|
2142
|
+
handler.value.$$typeof === REACT_ELEMENT_TYPE
|
|
2143
|
+
) {
|
|
2144
|
+
var element = handler.value;
|
|
2145
|
+
switch (key) {
|
|
2146
|
+
case "3":
|
|
2147
|
+
transferReferencedDebugInfo(handler.chunk, fulfilledChunk);
|
|
2148
|
+
element.props = mappedValue;
|
|
2149
|
+
break;
|
|
2150
|
+
case "4":
|
|
2151
|
+
element._owner = mappedValue;
|
|
2152
|
+
break;
|
|
2153
|
+
case "5":
|
|
2154
|
+
element._debugStack = mappedValue;
|
|
2155
|
+
break;
|
|
2156
|
+
default:
|
|
2157
|
+
transferReferencedDebugInfo(handler.chunk, fulfilledChunk);
|
|
2158
|
+
}
|
|
2159
|
+
} else
|
|
2160
|
+
reference.isDebug ||
|
|
2161
|
+
transferReferencedDebugInfo(handler.chunk, fulfilledChunk);
|
|
2162
|
+
} catch (error) {
|
|
2163
|
+
rejectReference(reference, error);
|
|
2164
|
+
return;
|
|
2165
|
+
}
|
|
2166
|
+
handler.deps--;
|
|
2167
|
+
0 === handler.deps &&
|
|
2168
|
+
((reference = handler.chunk),
|
|
2169
|
+
null !== reference &&
|
|
2170
|
+
"blocked" === reference.status &&
|
|
2171
|
+
((value = reference.value),
|
|
2172
|
+
(reference.status = "fulfilled"),
|
|
2173
|
+
(reference.value = handler.value),
|
|
2174
|
+
(reference.reason = handler.reason),
|
|
2175
|
+
null !== value && wakeChunk(value, handler.value, reference)));
|
|
2176
|
+
}
|
|
2177
|
+
function rejectReference(reference, error) {
|
|
2178
|
+
var handler = reference.handler;
|
|
2179
|
+
reference = reference.response;
|
|
2180
|
+
if (!handler.errored) {
|
|
2181
|
+
var blockedValue = handler.value;
|
|
2182
|
+
handler.errored = !0;
|
|
2183
|
+
handler.value = null;
|
|
2184
|
+
handler.reason = error;
|
|
2185
|
+
handler = handler.chunk;
|
|
2186
|
+
if (null !== handler && "blocked" === handler.status) {
|
|
2187
|
+
if (
|
|
2188
|
+
"object" === typeof blockedValue &&
|
|
2189
|
+
null !== blockedValue &&
|
|
2190
|
+
blockedValue.$$typeof === REACT_ELEMENT_TYPE
|
|
2191
|
+
) {
|
|
2192
|
+
var erroredComponent = {
|
|
2193
|
+
name: getComponentNameFromType(blockedValue.type) || "",
|
|
2194
|
+
owner: blockedValue._owner
|
|
2195
|
+
};
|
|
2196
|
+
erroredComponent.debugStack = blockedValue._debugStack;
|
|
2197
|
+
supportsCreateTask &&
|
|
2198
|
+
(erroredComponent.debugTask = blockedValue._debugTask);
|
|
2199
|
+
handler._debugInfo.push(erroredComponent);
|
|
2200
|
+
}
|
|
2201
|
+
triggerErrorOnChunk(reference, handler, error);
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
function waitForReference(
|
|
2206
|
+
referencedChunk,
|
|
2207
|
+
parentObject,
|
|
2208
|
+
key,
|
|
2209
|
+
response,
|
|
2210
|
+
map,
|
|
2211
|
+
path,
|
|
2212
|
+
isAwaitingDebugInfo
|
|
2213
|
+
) {
|
|
2214
|
+
if (
|
|
2215
|
+
!(
|
|
2216
|
+
(void 0 !== response._debugChannel &&
|
|
2217
|
+
response._debugChannel.hasReadable) ||
|
|
2218
|
+
"pending" !== referencedChunk.status ||
|
|
2219
|
+
parentObject[0] !== REACT_ELEMENT_TYPE ||
|
|
2220
|
+
("4" !== key && "5" !== key)
|
|
2221
|
+
)
|
|
2222
|
+
)
|
|
2223
|
+
return null;
|
|
2224
|
+
if (initializingHandler) {
|
|
2225
|
+
var handler = initializingHandler;
|
|
2226
|
+
handler.deps++;
|
|
2227
|
+
} else
|
|
2228
|
+
handler = initializingHandler = {
|
|
2229
|
+
parent: null,
|
|
2230
|
+
chunk: null,
|
|
2231
|
+
value: null,
|
|
2232
|
+
reason: null,
|
|
2233
|
+
deps: 1,
|
|
2234
|
+
errored: !1
|
|
2235
|
+
};
|
|
2236
|
+
parentObject = {
|
|
2237
|
+
response: response,
|
|
2238
|
+
handler: handler,
|
|
2239
|
+
parentObject: parentObject,
|
|
2240
|
+
key: key,
|
|
2241
|
+
map: map,
|
|
2242
|
+
path: path
|
|
2243
|
+
};
|
|
2244
|
+
parentObject.isDebug = isAwaitingDebugInfo;
|
|
2245
|
+
null === referencedChunk.value
|
|
2246
|
+
? (referencedChunk.value = [parentObject])
|
|
2247
|
+
: referencedChunk.value.push(parentObject);
|
|
2248
|
+
null === referencedChunk.reason
|
|
2249
|
+
? (referencedChunk.reason = [parentObject])
|
|
2250
|
+
: referencedChunk.reason.push(parentObject);
|
|
2251
|
+
return null;
|
|
2252
|
+
}
|
|
2253
|
+
function loadServerReference(response, metaData, parentObject, key) {
|
|
2254
|
+
if (!response._serverReferenceConfig)
|
|
2255
|
+
return createBoundServerReference(
|
|
2256
|
+
metaData,
|
|
2257
|
+
response._callServer,
|
|
2258
|
+
response._encodeFormAction,
|
|
2259
|
+
response._debugFindSourceMapURL
|
|
2260
|
+
);
|
|
2261
|
+
var serverReference = resolveServerReference(
|
|
2262
|
+
response._serverReferenceConfig,
|
|
2263
|
+
metaData.id
|
|
2264
|
+
),
|
|
2265
|
+
promise = preloadModule(serverReference);
|
|
2266
|
+
if (promise)
|
|
2267
|
+
metaData.bound && (promise = Promise.all([promise, metaData.bound]));
|
|
2268
|
+
else if (metaData.bound) promise = Promise.resolve(metaData.bound);
|
|
2269
|
+
else
|
|
2270
|
+
return (
|
|
2271
|
+
(promise = requireModule(serverReference)),
|
|
2272
|
+
registerBoundServerReference(
|
|
2273
|
+
promise,
|
|
2274
|
+
metaData.id,
|
|
2275
|
+
metaData.bound,
|
|
2276
|
+
response._encodeFormAction
|
|
2277
|
+
),
|
|
2278
|
+
promise
|
|
2279
|
+
);
|
|
2280
|
+
if (initializingHandler) {
|
|
2281
|
+
var handler = initializingHandler;
|
|
2282
|
+
handler.deps++;
|
|
2283
|
+
} else
|
|
2284
|
+
handler = initializingHandler = {
|
|
2285
|
+
parent: null,
|
|
2286
|
+
chunk: null,
|
|
2287
|
+
value: null,
|
|
2288
|
+
reason: null,
|
|
2289
|
+
deps: 1,
|
|
2290
|
+
errored: !1
|
|
2291
|
+
};
|
|
2292
|
+
promise.then(
|
|
2293
|
+
function () {
|
|
2294
|
+
var resolvedValue = requireModule(serverReference);
|
|
2295
|
+
if (metaData.bound) {
|
|
2296
|
+
var boundArgs = metaData.bound.value.slice(0);
|
|
2297
|
+
boundArgs.unshift(null);
|
|
2298
|
+
resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs);
|
|
2299
|
+
}
|
|
2300
|
+
registerBoundServerReference(
|
|
2301
|
+
resolvedValue,
|
|
2302
|
+
metaData.id,
|
|
2303
|
+
metaData.bound,
|
|
2304
|
+
response._encodeFormAction
|
|
2305
|
+
);
|
|
2306
|
+
parentObject[key] = resolvedValue;
|
|
2307
|
+
"" === key &&
|
|
2308
|
+
null === handler.value &&
|
|
2309
|
+
(handler.value = resolvedValue);
|
|
2310
|
+
if (
|
|
2311
|
+
parentObject[0] === REACT_ELEMENT_TYPE &&
|
|
2312
|
+
"object" === typeof handler.value &&
|
|
2313
|
+
null !== handler.value &&
|
|
2314
|
+
handler.value.$$typeof === REACT_ELEMENT_TYPE
|
|
2315
|
+
)
|
|
2316
|
+
switch (((boundArgs = handler.value), key)) {
|
|
2317
|
+
case "3":
|
|
2318
|
+
boundArgs.props = resolvedValue;
|
|
2319
|
+
break;
|
|
2320
|
+
case "4":
|
|
2321
|
+
boundArgs._owner = resolvedValue;
|
|
2322
|
+
}
|
|
2323
|
+
handler.deps--;
|
|
2324
|
+
0 === handler.deps &&
|
|
2325
|
+
((resolvedValue = handler.chunk),
|
|
2326
|
+
null !== resolvedValue &&
|
|
2327
|
+
"blocked" === resolvedValue.status &&
|
|
2328
|
+
((boundArgs = resolvedValue.value),
|
|
2329
|
+
(resolvedValue.status = "fulfilled"),
|
|
2330
|
+
(resolvedValue.value = handler.value),
|
|
2331
|
+
(resolvedValue.reason = null),
|
|
2332
|
+
null !== boundArgs &&
|
|
2333
|
+
wakeChunk(boundArgs, handler.value, resolvedValue)));
|
|
2334
|
+
},
|
|
2335
|
+
function (error) {
|
|
2336
|
+
if (!handler.errored) {
|
|
2337
|
+
var blockedValue = handler.value;
|
|
2338
|
+
handler.errored = !0;
|
|
2339
|
+
handler.value = null;
|
|
2340
|
+
handler.reason = error;
|
|
2341
|
+
var chunk = handler.chunk;
|
|
2342
|
+
if (null !== chunk && "blocked" === chunk.status) {
|
|
2343
|
+
if (
|
|
2344
|
+
"object" === typeof blockedValue &&
|
|
2345
|
+
null !== blockedValue &&
|
|
2346
|
+
blockedValue.$$typeof === REACT_ELEMENT_TYPE
|
|
2347
|
+
) {
|
|
2348
|
+
var erroredComponent = {
|
|
2349
|
+
name: getComponentNameFromType(blockedValue.type) || "",
|
|
2350
|
+
owner: blockedValue._owner
|
|
2351
|
+
};
|
|
2352
|
+
erroredComponent.debugStack = blockedValue._debugStack;
|
|
2353
|
+
supportsCreateTask &&
|
|
2354
|
+
(erroredComponent.debugTask = blockedValue._debugTask);
|
|
2355
|
+
chunk._debugInfo.push(erroredComponent);
|
|
2356
|
+
}
|
|
2357
|
+
triggerErrorOnChunk(response, chunk, error);
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
);
|
|
2362
|
+
return null;
|
|
2363
|
+
}
|
|
2364
|
+
function resolveLazy(value) {
|
|
2365
|
+
for (
|
|
2366
|
+
;
|
|
2367
|
+
"object" === typeof value &&
|
|
2368
|
+
null !== value &&
|
|
2369
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2370
|
+
|
|
2371
|
+
) {
|
|
2372
|
+
var payload = value._payload;
|
|
2373
|
+
if ("fulfilled" === payload.status) value = payload.value;
|
|
2374
|
+
else break;
|
|
2375
|
+
}
|
|
2376
|
+
return value;
|
|
2377
|
+
}
|
|
2378
|
+
function transferReferencedDebugInfo(parentChunk, referencedChunk) {
|
|
2379
|
+
if (null !== parentChunk) {
|
|
2380
|
+
referencedChunk = referencedChunk._debugInfo;
|
|
2381
|
+
parentChunk = parentChunk._debugInfo;
|
|
2382
|
+
for (var i = 0; i < referencedChunk.length; ++i) {
|
|
2383
|
+
var debugInfoEntry = referencedChunk[i];
|
|
2384
|
+
null == debugInfoEntry.name && parentChunk.push(debugInfoEntry);
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
function getOutlinedModel(response, reference, parentObject, key, map) {
|
|
2389
|
+
var path = reference.split(":");
|
|
2390
|
+
reference = parseInt(path[0], 16);
|
|
2391
|
+
reference = getChunk(response, reference);
|
|
2392
|
+
null !== initializingChunk &&
|
|
2393
|
+
isArrayImpl(initializingChunk._children) &&
|
|
2394
|
+
initializingChunk._children.push(reference);
|
|
2395
|
+
switch (reference.status) {
|
|
2396
|
+
case "resolved_model":
|
|
2397
|
+
initializeModelChunk(reference);
|
|
2398
|
+
break;
|
|
2399
|
+
case "resolved_module":
|
|
2400
|
+
initializeModuleChunk(reference);
|
|
2401
|
+
}
|
|
2402
|
+
switch (reference.status) {
|
|
2403
|
+
case "fulfilled":
|
|
2404
|
+
for (var value = reference.value, i = 1; i < path.length; i++) {
|
|
2405
|
+
for (
|
|
2406
|
+
;
|
|
2407
|
+
"object" === typeof value &&
|
|
2408
|
+
null !== value &&
|
|
2409
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2410
|
+
|
|
2411
|
+
) {
|
|
2412
|
+
value = value._payload;
|
|
2413
|
+
switch (value.status) {
|
|
2414
|
+
case "resolved_model":
|
|
2415
|
+
initializeModelChunk(value);
|
|
2416
|
+
break;
|
|
2417
|
+
case "resolved_module":
|
|
2418
|
+
initializeModuleChunk(value);
|
|
2419
|
+
}
|
|
2420
|
+
switch (value.status) {
|
|
2421
|
+
case "fulfilled":
|
|
2422
|
+
value = value.value;
|
|
2423
|
+
break;
|
|
2424
|
+
case "blocked":
|
|
2425
|
+
case "pending":
|
|
2426
|
+
return waitForReference(
|
|
2427
|
+
value,
|
|
2428
|
+
parentObject,
|
|
2429
|
+
key,
|
|
2430
|
+
response,
|
|
2431
|
+
map,
|
|
2432
|
+
path.slice(i - 1),
|
|
2433
|
+
!1
|
|
2434
|
+
);
|
|
2435
|
+
case "halted":
|
|
2436
|
+
return (
|
|
2437
|
+
initializingHandler
|
|
2438
|
+
? ((parentObject = initializingHandler),
|
|
2439
|
+
parentObject.deps++)
|
|
2440
|
+
: (initializingHandler = {
|
|
2441
|
+
parent: null,
|
|
2442
|
+
chunk: null,
|
|
2443
|
+
value: null,
|
|
2444
|
+
reason: null,
|
|
2445
|
+
deps: 1,
|
|
2446
|
+
errored: !1
|
|
2447
|
+
}),
|
|
2448
|
+
null
|
|
2449
|
+
);
|
|
2450
|
+
default:
|
|
2451
|
+
return (
|
|
2452
|
+
initializingHandler
|
|
2453
|
+
? ((initializingHandler.errored = !0),
|
|
2454
|
+
(initializingHandler.value = null),
|
|
2455
|
+
(initializingHandler.reason = value.reason))
|
|
2456
|
+
: (initializingHandler = {
|
|
2457
|
+
parent: null,
|
|
2458
|
+
chunk: null,
|
|
2459
|
+
value: null,
|
|
2460
|
+
reason: value.reason,
|
|
2461
|
+
deps: 0,
|
|
2462
|
+
errored: !0
|
|
2463
|
+
}),
|
|
2464
|
+
null
|
|
2465
|
+
);
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
value = value[path[i]];
|
|
2469
|
+
}
|
|
2470
|
+
for (
|
|
2471
|
+
;
|
|
2472
|
+
"object" === typeof value &&
|
|
2473
|
+
null !== value &&
|
|
2474
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2475
|
+
|
|
2476
|
+
) {
|
|
2477
|
+
path = value._payload;
|
|
2478
|
+
switch (path.status) {
|
|
2479
|
+
case "resolved_model":
|
|
2480
|
+
initializeModelChunk(path);
|
|
2481
|
+
break;
|
|
2482
|
+
case "resolved_module":
|
|
2483
|
+
initializeModuleChunk(path);
|
|
2484
|
+
}
|
|
2485
|
+
switch (path.status) {
|
|
2486
|
+
case "fulfilled":
|
|
2487
|
+
value = path.value;
|
|
2488
|
+
continue;
|
|
2489
|
+
}
|
|
2490
|
+
break;
|
|
2491
|
+
}
|
|
2492
|
+
response = map(response, value, parentObject, key);
|
|
2493
|
+
(parentObject[0] !== REACT_ELEMENT_TYPE ||
|
|
2494
|
+
("4" !== key && "5" !== key)) &&
|
|
2495
|
+
transferReferencedDebugInfo(initializingChunk, reference);
|
|
2496
|
+
return response;
|
|
2497
|
+
case "pending":
|
|
2498
|
+
case "blocked":
|
|
2499
|
+
return waitForReference(
|
|
2500
|
+
reference,
|
|
2501
|
+
parentObject,
|
|
2502
|
+
key,
|
|
2503
|
+
response,
|
|
2504
|
+
map,
|
|
2505
|
+
path,
|
|
2506
|
+
!1
|
|
2507
|
+
);
|
|
2508
|
+
case "halted":
|
|
2509
|
+
return (
|
|
2510
|
+
initializingHandler
|
|
2511
|
+
? ((parentObject = initializingHandler), parentObject.deps++)
|
|
2512
|
+
: (initializingHandler = {
|
|
2513
|
+
parent: null,
|
|
2514
|
+
chunk: null,
|
|
2515
|
+
value: null,
|
|
2516
|
+
reason: null,
|
|
2517
|
+
deps: 1,
|
|
2518
|
+
errored: !1
|
|
2519
|
+
}),
|
|
2520
|
+
null
|
|
2521
|
+
);
|
|
2522
|
+
default:
|
|
2523
|
+
return (
|
|
2524
|
+
initializingHandler
|
|
2525
|
+
? ((initializingHandler.errored = !0),
|
|
2526
|
+
(initializingHandler.value = null),
|
|
2527
|
+
(initializingHandler.reason = reference.reason))
|
|
2528
|
+
: (initializingHandler = {
|
|
2529
|
+
parent: null,
|
|
2530
|
+
chunk: null,
|
|
2531
|
+
value: null,
|
|
2532
|
+
reason: reference.reason,
|
|
2533
|
+
deps: 0,
|
|
2534
|
+
errored: !0
|
|
2535
|
+
}),
|
|
2536
|
+
null
|
|
2537
|
+
);
|
|
2538
|
+
}
|
|
2539
|
+
}
|
|
2540
|
+
function createMap(response, model) {
|
|
2541
|
+
return new Map(model);
|
|
2542
|
+
}
|
|
2543
|
+
function createSet(response, model) {
|
|
2544
|
+
return new Set(model);
|
|
2545
|
+
}
|
|
2546
|
+
function createBlob(response, model) {
|
|
2547
|
+
return new Blob(model.slice(1), { type: model[0] });
|
|
2548
|
+
}
|
|
2549
|
+
function createFormData(response, model) {
|
|
2550
|
+
response = new FormData();
|
|
2551
|
+
for (var i = 0; i < model.length; i++)
|
|
2552
|
+
response.append(model[i][0], model[i][1]);
|
|
2553
|
+
return response;
|
|
2554
|
+
}
|
|
2555
|
+
function applyConstructor(response, model, parentObject) {
|
|
2556
|
+
Object.setPrototypeOf(parentObject, model.prototype);
|
|
2557
|
+
}
|
|
2558
|
+
function defineLazyGetter(response, chunk, parentObject, key) {
|
|
2559
|
+
Object.defineProperty(parentObject, key, {
|
|
2560
|
+
get: function () {
|
|
2561
|
+
"resolved_model" === chunk.status && initializeModelChunk(chunk);
|
|
2562
|
+
switch (chunk.status) {
|
|
2563
|
+
case "fulfilled":
|
|
2564
|
+
return chunk.value;
|
|
2565
|
+
case "rejected":
|
|
2566
|
+
throw chunk.reason;
|
|
2567
|
+
}
|
|
2568
|
+
return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.";
|
|
2569
|
+
},
|
|
2570
|
+
enumerable: !0,
|
|
2571
|
+
configurable: !1
|
|
2572
|
+
});
|
|
2573
|
+
return null;
|
|
2574
|
+
}
|
|
2575
|
+
function extractIterator(response, model) {
|
|
2576
|
+
return model[Symbol.iterator]();
|
|
2577
|
+
}
|
|
2578
|
+
function createModel(response, model) {
|
|
2579
|
+
return model;
|
|
2580
|
+
}
|
|
2581
|
+
function getInferredFunctionApproximate(code) {
|
|
2582
|
+
code = code.startsWith("Object.defineProperty(")
|
|
2583
|
+
? code.slice(22)
|
|
2584
|
+
: code.startsWith("(")
|
|
2585
|
+
? code.slice(1)
|
|
2586
|
+
: code;
|
|
2587
|
+
if (code.startsWith("async function")) {
|
|
2588
|
+
var idx = code.indexOf("(", 14);
|
|
2589
|
+
if (-1 !== idx)
|
|
2590
|
+
return (
|
|
2591
|
+
(code = code.slice(14, idx).trim()),
|
|
2592
|
+
(0, eval)("({" + JSON.stringify(code) + ":async function(){}})")[
|
|
2593
|
+
code
|
|
2594
|
+
]
|
|
2595
|
+
);
|
|
2596
|
+
} else if (code.startsWith("function")) {
|
|
2597
|
+
if (((idx = code.indexOf("(", 8)), -1 !== idx))
|
|
2598
|
+
return (
|
|
2599
|
+
(code = code.slice(8, idx).trim()),
|
|
2600
|
+
(0, eval)("({" + JSON.stringify(code) + ":function(){}})")[code]
|
|
2601
|
+
);
|
|
2602
|
+
} else if (
|
|
2603
|
+
code.startsWith("class") &&
|
|
2604
|
+
((idx = code.indexOf("{", 5)), -1 !== idx)
|
|
2605
|
+
)
|
|
2606
|
+
return (
|
|
2607
|
+
(code = code.slice(5, idx).trim()),
|
|
2608
|
+
(0, eval)("({" + JSON.stringify(code) + ":class{}})")[code]
|
|
2609
|
+
);
|
|
2610
|
+
return function () {};
|
|
2611
|
+
}
|
|
2612
|
+
function parseModelString(response, parentObject, key, value) {
|
|
2613
|
+
if ("$" === value[0]) {
|
|
2614
|
+
if ("$" === value)
|
|
2615
|
+
return (
|
|
2616
|
+
null !== initializingHandler &&
|
|
2617
|
+
"0" === key &&
|
|
2618
|
+
(initializingHandler = {
|
|
2619
|
+
parent: initializingHandler,
|
|
2620
|
+
chunk: null,
|
|
2621
|
+
value: null,
|
|
2622
|
+
reason: null,
|
|
2623
|
+
deps: 0,
|
|
2624
|
+
errored: !1
|
|
2625
|
+
}),
|
|
2626
|
+
REACT_ELEMENT_TYPE
|
|
2627
|
+
);
|
|
2628
|
+
switch (value[1]) {
|
|
2629
|
+
case "$":
|
|
2630
|
+
return value.slice(1);
|
|
2631
|
+
case "L":
|
|
2632
|
+
return (
|
|
2633
|
+
(parentObject = parseInt(value.slice(2), 16)),
|
|
2634
|
+
(response = getChunk(response, parentObject)),
|
|
2635
|
+
null !== initializingChunk &&
|
|
2636
|
+
isArrayImpl(initializingChunk._children) &&
|
|
2637
|
+
initializingChunk._children.push(response),
|
|
2638
|
+
createLazyChunkWrapper(response, 0)
|
|
2639
|
+
);
|
|
2640
|
+
case "@":
|
|
2641
|
+
return (
|
|
2642
|
+
(parentObject = parseInt(value.slice(2), 16)),
|
|
2643
|
+
(response = getChunk(response, parentObject)),
|
|
2644
|
+
null !== initializingChunk &&
|
|
2645
|
+
isArrayImpl(initializingChunk._children) &&
|
|
2646
|
+
initializingChunk._children.push(response),
|
|
2647
|
+
response
|
|
2648
|
+
);
|
|
2649
|
+
case "S":
|
|
2650
|
+
return Symbol.for(value.slice(2));
|
|
2651
|
+
case "h":
|
|
2652
|
+
var ref = value.slice(2);
|
|
2653
|
+
return getOutlinedModel(
|
|
2654
|
+
response,
|
|
2655
|
+
ref,
|
|
2656
|
+
parentObject,
|
|
2657
|
+
key,
|
|
2658
|
+
loadServerReference
|
|
2659
|
+
);
|
|
2660
|
+
case "T":
|
|
2661
|
+
parentObject = "$" + value.slice(2);
|
|
2662
|
+
response = response._tempRefs;
|
|
2663
|
+
if (null == response)
|
|
2664
|
+
throw Error(
|
|
2665
|
+
"Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply."
|
|
2666
|
+
);
|
|
2667
|
+
return response.get(parentObject);
|
|
2668
|
+
case "Q":
|
|
2669
|
+
return (
|
|
2670
|
+
(ref = value.slice(2)),
|
|
2671
|
+
getOutlinedModel(response, ref, parentObject, key, createMap)
|
|
2672
|
+
);
|
|
2673
|
+
case "W":
|
|
2674
|
+
return (
|
|
2675
|
+
(ref = value.slice(2)),
|
|
2676
|
+
getOutlinedModel(response, ref, parentObject, key, createSet)
|
|
2677
|
+
);
|
|
2678
|
+
case "B":
|
|
2679
|
+
return (
|
|
2680
|
+
(ref = value.slice(2)),
|
|
2681
|
+
getOutlinedModel(response, ref, parentObject, key, createBlob)
|
|
2682
|
+
);
|
|
2683
|
+
case "K":
|
|
2684
|
+
return (
|
|
2685
|
+
(ref = value.slice(2)),
|
|
2686
|
+
getOutlinedModel(response, ref, parentObject, key, createFormData)
|
|
2687
|
+
);
|
|
2688
|
+
case "Z":
|
|
2689
|
+
return (
|
|
2690
|
+
(ref = value.slice(2)),
|
|
2691
|
+
getOutlinedModel(
|
|
2692
|
+
response,
|
|
2693
|
+
ref,
|
|
2694
|
+
parentObject,
|
|
2695
|
+
key,
|
|
2696
|
+
resolveErrorDev
|
|
2697
|
+
)
|
|
2698
|
+
);
|
|
2699
|
+
case "i":
|
|
2700
|
+
return (
|
|
2701
|
+
(ref = value.slice(2)),
|
|
2702
|
+
getOutlinedModel(
|
|
2703
|
+
response,
|
|
2704
|
+
ref,
|
|
2705
|
+
parentObject,
|
|
2706
|
+
key,
|
|
2707
|
+
extractIterator
|
|
2708
|
+
)
|
|
2709
|
+
);
|
|
2710
|
+
case "I":
|
|
2711
|
+
return Infinity;
|
|
2712
|
+
case "-":
|
|
2713
|
+
return "$-0" === value ? -0 : -Infinity;
|
|
2714
|
+
case "N":
|
|
2715
|
+
return NaN;
|
|
2716
|
+
case "u":
|
|
2717
|
+
return;
|
|
2718
|
+
case "D":
|
|
2719
|
+
return new Date(Date.parse(value.slice(2)));
|
|
2720
|
+
case "n":
|
|
2721
|
+
return BigInt(value.slice(2));
|
|
2722
|
+
case "P":
|
|
2723
|
+
return (
|
|
2724
|
+
(ref = value.slice(2)),
|
|
2725
|
+
getOutlinedModel(
|
|
2726
|
+
response,
|
|
2727
|
+
ref,
|
|
2728
|
+
parentObject,
|
|
2729
|
+
key,
|
|
2730
|
+
applyConstructor
|
|
2731
|
+
)
|
|
2732
|
+
);
|
|
2733
|
+
case "E":
|
|
2734
|
+
response = value.slice(2);
|
|
2735
|
+
try {
|
|
2736
|
+
if (!mightHaveStaticConstructor.test(response))
|
|
2737
|
+
return (0, eval)(response);
|
|
2738
|
+
} catch (x) {}
|
|
2739
|
+
try {
|
|
2740
|
+
if (
|
|
2741
|
+
((ref = getInferredFunctionApproximate(response)),
|
|
2742
|
+
response.startsWith("Object.defineProperty("))
|
|
2743
|
+
) {
|
|
2744
|
+
var idx = response.lastIndexOf(',"name",{value:"');
|
|
2745
|
+
if (-1 !== idx) {
|
|
2746
|
+
var name = JSON.parse(
|
|
2747
|
+
response.slice(idx + 16 - 1, response.length - 2)
|
|
2748
|
+
);
|
|
2749
|
+
Object.defineProperty(ref, "name", { value: name });
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
} catch (_) {
|
|
2753
|
+
ref = function () {};
|
|
2754
|
+
}
|
|
2755
|
+
return ref;
|
|
2756
|
+
case "Y":
|
|
2757
|
+
if (
|
|
2758
|
+
2 < value.length &&
|
|
2759
|
+
(ref = response._debugChannel && response._debugChannel.callback)
|
|
2760
|
+
) {
|
|
2761
|
+
if ("@" === value[2])
|
|
2762
|
+
return (
|
|
2763
|
+
(parentObject = value.slice(3)),
|
|
2764
|
+
(key = parseInt(parentObject, 16)),
|
|
2765
|
+
response._chunks.has(key) || ref("P:" + parentObject),
|
|
2766
|
+
getChunk(response, key)
|
|
2767
|
+
);
|
|
2768
|
+
value = value.slice(2);
|
|
2769
|
+
idx = parseInt(value, 16);
|
|
2770
|
+
response._chunks.has(idx) || ref("Q:" + value);
|
|
2771
|
+
ref = getChunk(response, idx);
|
|
2772
|
+
return "fulfilled" === ref.status
|
|
2773
|
+
? ref.value
|
|
2774
|
+
: defineLazyGetter(response, ref, parentObject, key);
|
|
2775
|
+
}
|
|
2776
|
+
Object.defineProperty(parentObject, key, {
|
|
2777
|
+
get: function () {
|
|
2778
|
+
return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.";
|
|
2779
|
+
},
|
|
2780
|
+
enumerable: !0,
|
|
2781
|
+
configurable: !1
|
|
2782
|
+
});
|
|
2783
|
+
return null;
|
|
2784
|
+
default:
|
|
2785
|
+
return (
|
|
2786
|
+
(ref = value.slice(1)),
|
|
2787
|
+
getOutlinedModel(response, ref, parentObject, key, createModel)
|
|
2788
|
+
);
|
|
2789
|
+
}
|
|
2790
|
+
}
|
|
2791
|
+
return value;
|
|
2792
|
+
}
|
|
2793
|
+
function missingCall() {
|
|
2794
|
+
throw Error(
|
|
2795
|
+
'Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.'
|
|
2796
|
+
);
|
|
2797
|
+
}
|
|
2798
|
+
function ResponseInstance(
|
|
2799
|
+
bundlerConfig,
|
|
2800
|
+
serverReferenceConfig,
|
|
2801
|
+
moduleLoading,
|
|
2802
|
+
callServer,
|
|
2803
|
+
encodeFormAction,
|
|
2804
|
+
nonce,
|
|
2805
|
+
temporaryReferences,
|
|
2806
|
+
findSourceMapURL,
|
|
2807
|
+
replayConsole,
|
|
2808
|
+
environmentName,
|
|
2809
|
+
debugChannel
|
|
2810
|
+
) {
|
|
2811
|
+
var chunks = new Map();
|
|
2812
|
+
this._bundlerConfig = bundlerConfig;
|
|
2813
|
+
this._serverReferenceConfig = serverReferenceConfig;
|
|
2814
|
+
this._moduleLoading = moduleLoading;
|
|
2815
|
+
this._callServer = void 0 !== callServer ? callServer : missingCall;
|
|
2816
|
+
this._encodeFormAction = encodeFormAction;
|
|
2817
|
+
this._nonce = nonce;
|
|
2818
|
+
this._chunks = chunks;
|
|
2819
|
+
this._stringDecoder = new TextDecoder();
|
|
2820
|
+
this._fromJSON = null;
|
|
2821
|
+
this._closed = !1;
|
|
2822
|
+
this._closedReason = null;
|
|
2823
|
+
this._tempRefs = temporaryReferences;
|
|
2824
|
+
this._timeOrigin = 0;
|
|
2825
|
+
this._pendingInitialRender = null;
|
|
2826
|
+
this._pendingChunks = 0;
|
|
2827
|
+
this._weakResponse = { weak: new WeakRef(this), response: this };
|
|
2828
|
+
this._debugRootOwner = bundlerConfig =
|
|
2829
|
+
void 0 === ReactSharedInteralsServer ||
|
|
2830
|
+
null === ReactSharedInteralsServer.A
|
|
2831
|
+
? null
|
|
2832
|
+
: ReactSharedInteralsServer.A.getOwner();
|
|
2833
|
+
this._debugRootStack =
|
|
2834
|
+
null !== bundlerConfig ? Error("react-stack-top-frame") : null;
|
|
2835
|
+
environmentName = void 0 === environmentName ? "Server" : environmentName;
|
|
2836
|
+
supportsCreateTask &&
|
|
2837
|
+
(this._debugRootTask = console.createTask(
|
|
2838
|
+
'"use ' + environmentName.toLowerCase() + '"'
|
|
2839
|
+
));
|
|
2840
|
+
this._debugStartTime = performance.now();
|
|
2841
|
+
this._debugFindSourceMapURL = findSourceMapURL;
|
|
2842
|
+
this._debugChannel = debugChannel;
|
|
2843
|
+
this._blockedConsole = null;
|
|
2844
|
+
this._replayConsole = replayConsole;
|
|
2845
|
+
this._rootEnvironmentName = environmentName;
|
|
2846
|
+
debugChannel &&
|
|
2847
|
+
(null === debugChannelRegistry
|
|
2848
|
+
? (closeDebugChannel(debugChannel), (this._debugChannel = void 0))
|
|
2849
|
+
: debugChannelRegistry.register(this, debugChannel, this));
|
|
2850
|
+
replayConsole && markAllTracksInOrder();
|
|
2851
|
+
this._fromJSON = createFromJSONCallback(this);
|
|
2852
|
+
}
|
|
2853
|
+
function createStreamState(weakResponse, streamDebugValue) {
|
|
2854
|
+
var streamState = {
|
|
2855
|
+
_rowState: 0,
|
|
2856
|
+
_rowID: 0,
|
|
2857
|
+
_rowTag: 0,
|
|
2858
|
+
_rowLength: 0,
|
|
2859
|
+
_buffer: []
|
|
2860
|
+
};
|
|
2861
|
+
weakResponse = unwrapWeakResponse(weakResponse);
|
|
2862
|
+
var debugValuePromise = Promise.resolve(streamDebugValue);
|
|
2863
|
+
debugValuePromise.status = "fulfilled";
|
|
2864
|
+
debugValuePromise.value = streamDebugValue;
|
|
2865
|
+
streamState._debugInfo = {
|
|
2866
|
+
name: "RSC stream",
|
|
2867
|
+
start: weakResponse._debugStartTime,
|
|
2868
|
+
end: weakResponse._debugStartTime,
|
|
2869
|
+
byteSize: 0,
|
|
2870
|
+
value: debugValuePromise,
|
|
2871
|
+
owner: weakResponse._debugRootOwner,
|
|
2872
|
+
debugStack: weakResponse._debugRootStack,
|
|
2873
|
+
debugTask: weakResponse._debugRootTask
|
|
2874
|
+
};
|
|
2875
|
+
streamState._debugTargetChunkSize = MIN_CHUNK_SIZE;
|
|
2876
|
+
return streamState;
|
|
2877
|
+
}
|
|
2878
|
+
function addDebugInfo(chunk, debugInfo) {
|
|
2879
|
+
var value = resolveLazy(chunk.value);
|
|
2880
|
+
"object" !== typeof value ||
|
|
2881
|
+
null === value ||
|
|
2882
|
+
(!isArrayImpl(value) &&
|
|
2883
|
+
"function" !== typeof value[ASYNC_ITERATOR] &&
|
|
2884
|
+
value.$$typeof !== REACT_ELEMENT_TYPE &&
|
|
2885
|
+
value.$$typeof !== REACT_LAZY_TYPE)
|
|
2886
|
+
? chunk._debugInfo.push.apply(chunk._debugInfo, debugInfo)
|
|
2887
|
+
: isArrayImpl(value._debugInfo)
|
|
2888
|
+
? value._debugInfo.push.apply(value._debugInfo, debugInfo)
|
|
2889
|
+
: Object.defineProperty(value, "_debugInfo", {
|
|
2890
|
+
configurable: !1,
|
|
2891
|
+
enumerable: !1,
|
|
2892
|
+
writable: !0,
|
|
2893
|
+
value: debugInfo
|
|
2894
|
+
});
|
|
2895
|
+
}
|
|
2896
|
+
function resolveChunkDebugInfo(streamState, chunk) {
|
|
2897
|
+
streamState = [{ awaited: streamState._debugInfo }];
|
|
2898
|
+
"pending" === chunk.status || "blocked" === chunk.status
|
|
2899
|
+
? ((streamState = addDebugInfo.bind(null, chunk, streamState)),
|
|
2900
|
+
chunk.then(streamState, streamState))
|
|
2901
|
+
: addDebugInfo(chunk, streamState);
|
|
2902
|
+
}
|
|
2903
|
+
function resolveBuffer(response, id, buffer, streamState) {
|
|
2904
|
+
var chunks = response._chunks,
|
|
2905
|
+
chunk = chunks.get(id);
|
|
2906
|
+
chunk && "pending" !== chunk.status
|
|
2907
|
+
? chunk.reason.enqueueValue(buffer)
|
|
2908
|
+
: (chunk && releasePendingChunk(response, chunk),
|
|
2909
|
+
(response = new ReactPromise("fulfilled", buffer, null)),
|
|
2910
|
+
resolveChunkDebugInfo(streamState, response),
|
|
2911
|
+
chunks.set(id, response));
|
|
2912
|
+
}
|
|
2913
|
+
function resolveModule(response, id, model, streamState) {
|
|
2914
|
+
var chunks = response._chunks,
|
|
2915
|
+
chunk = chunks.get(id);
|
|
2916
|
+
model = JSON.parse(model, response._fromJSON);
|
|
2917
|
+
var clientReference = resolveClientReference(
|
|
2918
|
+
response._bundlerConfig,
|
|
2919
|
+
model
|
|
2920
|
+
);
|
|
2921
|
+
prepareDestinationWithChunks(
|
|
2922
|
+
response._moduleLoading,
|
|
2923
|
+
model[1],
|
|
2924
|
+
response._nonce
|
|
2925
|
+
);
|
|
2926
|
+
if ((model = preloadModule(clientReference))) {
|
|
2927
|
+
if (chunk) {
|
|
2928
|
+
releasePendingChunk(response, chunk);
|
|
2929
|
+
var blockedChunk = chunk;
|
|
2930
|
+
blockedChunk.status = "blocked";
|
|
2931
|
+
} else
|
|
2932
|
+
(blockedChunk = new ReactPromise("blocked", null, null)),
|
|
2933
|
+
chunks.set(id, blockedChunk);
|
|
2934
|
+
resolveChunkDebugInfo(streamState, blockedChunk);
|
|
2935
|
+
model.then(
|
|
2936
|
+
function () {
|
|
2937
|
+
return resolveModuleChunk(response, blockedChunk, clientReference);
|
|
2938
|
+
},
|
|
2939
|
+
function (error) {
|
|
2940
|
+
return triggerErrorOnChunk(response, blockedChunk, error);
|
|
2941
|
+
}
|
|
2942
|
+
);
|
|
2943
|
+
} else
|
|
2944
|
+
chunk
|
|
2945
|
+
? (resolveChunkDebugInfo(streamState, chunk),
|
|
2946
|
+
resolveModuleChunk(response, chunk, clientReference))
|
|
2947
|
+
: ((chunk = new ReactPromise(
|
|
2948
|
+
"resolved_module",
|
|
2949
|
+
clientReference,
|
|
2950
|
+
null
|
|
2951
|
+
)),
|
|
2952
|
+
resolveChunkDebugInfo(streamState, chunk),
|
|
2953
|
+
chunks.set(id, chunk));
|
|
2954
|
+
}
|
|
2955
|
+
function resolveStream(response, id, stream, controller, streamState) {
|
|
2956
|
+
var chunks = response._chunks,
|
|
2957
|
+
chunk = chunks.get(id);
|
|
2958
|
+
if (chunk) {
|
|
2959
|
+
if (
|
|
2960
|
+
(resolveChunkDebugInfo(streamState, chunk),
|
|
2961
|
+
"pending" === chunk.status)
|
|
2962
|
+
) {
|
|
2963
|
+
releasePendingChunk(response, chunk);
|
|
2964
|
+
id = chunk.value;
|
|
2965
|
+
if (null != chunk._debugChunk) {
|
|
2966
|
+
streamState = initializingHandler;
|
|
2967
|
+
chunks = initializingChunk;
|
|
2968
|
+
initializingHandler = null;
|
|
2969
|
+
chunk.status = "blocked";
|
|
2970
|
+
chunk.value = null;
|
|
2971
|
+
chunk.reason = null;
|
|
2972
|
+
initializingChunk = chunk;
|
|
2973
|
+
try {
|
|
2974
|
+
if (
|
|
2975
|
+
(initializeDebugChunk(response, chunk),
|
|
2976
|
+
null !== initializingHandler &&
|
|
2977
|
+
!initializingHandler.errored &&
|
|
2978
|
+
0 < initializingHandler.deps)
|
|
2979
|
+
) {
|
|
2980
|
+
initializingHandler.value = stream;
|
|
2981
|
+
initializingHandler.reason = controller;
|
|
2982
|
+
initializingHandler.chunk = chunk;
|
|
2983
|
+
return;
|
|
2984
|
+
}
|
|
2985
|
+
} finally {
|
|
2986
|
+
(initializingHandler = streamState), (initializingChunk = chunks);
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
chunk.status = "fulfilled";
|
|
2990
|
+
chunk.value = stream;
|
|
2991
|
+
chunk.reason = controller;
|
|
2992
|
+
null !== id && wakeChunk(id, chunk.value, chunk);
|
|
2993
|
+
}
|
|
2994
|
+
} else
|
|
2995
|
+
(response = new ReactPromise("fulfilled", stream, controller)),
|
|
2996
|
+
resolveChunkDebugInfo(streamState, response),
|
|
2997
|
+
chunks.set(id, response);
|
|
2998
|
+
}
|
|
2999
|
+
function startReadableStream(response, id, type, streamState) {
|
|
3000
|
+
var controller = null,
|
|
3001
|
+
closed = !1;
|
|
3002
|
+
type = new ReadableStream({
|
|
3003
|
+
type: type,
|
|
3004
|
+
start: function (c) {
|
|
3005
|
+
controller = c;
|
|
3006
|
+
}
|
|
3007
|
+
});
|
|
3008
|
+
var previousBlockedChunk = null;
|
|
3009
|
+
resolveStream(
|
|
3010
|
+
response,
|
|
3011
|
+
id,
|
|
3012
|
+
type,
|
|
3013
|
+
{
|
|
3014
|
+
enqueueValue: function (value) {
|
|
3015
|
+
null === previousBlockedChunk
|
|
3016
|
+
? controller.enqueue(value)
|
|
3017
|
+
: previousBlockedChunk.then(function () {
|
|
3018
|
+
controller.enqueue(value);
|
|
3019
|
+
});
|
|
3020
|
+
},
|
|
3021
|
+
enqueueModel: function (json) {
|
|
3022
|
+
if (null === previousBlockedChunk) {
|
|
3023
|
+
var chunk = createResolvedModelChunk(response, json);
|
|
3024
|
+
initializeModelChunk(chunk);
|
|
3025
|
+
"fulfilled" === chunk.status
|
|
3026
|
+
? controller.enqueue(chunk.value)
|
|
3027
|
+
: (chunk.then(
|
|
3028
|
+
function (v) {
|
|
3029
|
+
return controller.enqueue(v);
|
|
3030
|
+
},
|
|
3031
|
+
function (e) {
|
|
3032
|
+
return controller.error(e);
|
|
3033
|
+
}
|
|
3034
|
+
),
|
|
3035
|
+
(previousBlockedChunk = chunk));
|
|
3036
|
+
} else {
|
|
3037
|
+
chunk = previousBlockedChunk;
|
|
3038
|
+
var _chunk3 = createPendingChunk(response);
|
|
3039
|
+
_chunk3.then(
|
|
3040
|
+
function (v) {
|
|
3041
|
+
return controller.enqueue(v);
|
|
3042
|
+
},
|
|
3043
|
+
function (e) {
|
|
3044
|
+
return controller.error(e);
|
|
3045
|
+
}
|
|
3046
|
+
);
|
|
3047
|
+
previousBlockedChunk = _chunk3;
|
|
3048
|
+
chunk.then(function () {
|
|
3049
|
+
previousBlockedChunk === _chunk3 &&
|
|
3050
|
+
(previousBlockedChunk = null);
|
|
3051
|
+
resolveModelChunk(response, _chunk3, json);
|
|
3052
|
+
});
|
|
3053
|
+
}
|
|
3054
|
+
},
|
|
3055
|
+
close: function () {
|
|
3056
|
+
if (!closed)
|
|
3057
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
3058
|
+
controller.close();
|
|
3059
|
+
else {
|
|
3060
|
+
var blockedChunk = previousBlockedChunk;
|
|
3061
|
+
previousBlockedChunk = null;
|
|
3062
|
+
blockedChunk.then(function () {
|
|
3063
|
+
return controller.close();
|
|
3064
|
+
});
|
|
3065
|
+
}
|
|
3066
|
+
},
|
|
3067
|
+
error: function (error) {
|
|
3068
|
+
if (!closed)
|
|
3069
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
3070
|
+
controller.error(error);
|
|
3071
|
+
else {
|
|
3072
|
+
var blockedChunk = previousBlockedChunk;
|
|
3073
|
+
previousBlockedChunk = null;
|
|
3074
|
+
blockedChunk.then(function () {
|
|
3075
|
+
return controller.error(error);
|
|
3076
|
+
});
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
},
|
|
3080
|
+
streamState
|
|
3081
|
+
);
|
|
3082
|
+
}
|
|
3083
|
+
function asyncIterator() {
|
|
3084
|
+
return this;
|
|
3085
|
+
}
|
|
3086
|
+
function createIterator(next) {
|
|
3087
|
+
next = { next: next };
|
|
3088
|
+
next[ASYNC_ITERATOR] = asyncIterator;
|
|
3089
|
+
return next;
|
|
3090
|
+
}
|
|
3091
|
+
function startAsyncIterable(response, id, iterator, streamState) {
|
|
3092
|
+
var buffer = [],
|
|
3093
|
+
closed = !1,
|
|
3094
|
+
nextWriteIndex = 0,
|
|
3095
|
+
iterable = {};
|
|
3096
|
+
iterable[ASYNC_ITERATOR] = function () {
|
|
3097
|
+
var nextReadIndex = 0;
|
|
3098
|
+
return createIterator(function (arg) {
|
|
3099
|
+
if (void 0 !== arg)
|
|
3100
|
+
throw Error(
|
|
3101
|
+
"Values cannot be passed to next() of AsyncIterables passed to Client Components."
|
|
3102
|
+
);
|
|
3103
|
+
if (nextReadIndex === buffer.length) {
|
|
3104
|
+
if (closed)
|
|
3105
|
+
return new ReactPromise(
|
|
3106
|
+
"fulfilled",
|
|
3107
|
+
{ done: !0, value: void 0 },
|
|
3108
|
+
null
|
|
3109
|
+
);
|
|
3110
|
+
buffer[nextReadIndex] = createPendingChunk(response);
|
|
3111
|
+
}
|
|
3112
|
+
return buffer[nextReadIndex++];
|
|
3113
|
+
});
|
|
3114
|
+
};
|
|
3115
|
+
resolveStream(
|
|
3116
|
+
response,
|
|
3117
|
+
id,
|
|
3118
|
+
iterator ? iterable[ASYNC_ITERATOR]() : iterable,
|
|
3119
|
+
{
|
|
3120
|
+
enqueueValue: function (value) {
|
|
3121
|
+
if (nextWriteIndex === buffer.length)
|
|
3122
|
+
buffer[nextWriteIndex] = new ReactPromise(
|
|
3123
|
+
"fulfilled",
|
|
3124
|
+
{ done: !1, value: value },
|
|
3125
|
+
null
|
|
3126
|
+
);
|
|
3127
|
+
else {
|
|
3128
|
+
var chunk = buffer[nextWriteIndex],
|
|
3129
|
+
resolveListeners = chunk.value,
|
|
3130
|
+
rejectListeners = chunk.reason;
|
|
3131
|
+
chunk.status = "fulfilled";
|
|
3132
|
+
chunk.value = { done: !1, value: value };
|
|
3133
|
+
chunk.reason = null;
|
|
3134
|
+
null !== resolveListeners &&
|
|
3135
|
+
wakeChunkIfInitialized(
|
|
3136
|
+
chunk,
|
|
3137
|
+
resolveListeners,
|
|
3138
|
+
rejectListeners
|
|
3139
|
+
);
|
|
3140
|
+
}
|
|
3141
|
+
nextWriteIndex++;
|
|
3142
|
+
},
|
|
3143
|
+
enqueueModel: function (value) {
|
|
3144
|
+
nextWriteIndex === buffer.length
|
|
3145
|
+
? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(
|
|
3146
|
+
response,
|
|
3147
|
+
value,
|
|
3148
|
+
!1
|
|
3149
|
+
))
|
|
3150
|
+
: resolveIteratorResultChunk(
|
|
3151
|
+
response,
|
|
3152
|
+
buffer[nextWriteIndex],
|
|
3153
|
+
value,
|
|
3154
|
+
!1
|
|
3155
|
+
);
|
|
3156
|
+
nextWriteIndex++;
|
|
3157
|
+
},
|
|
3158
|
+
close: function (value) {
|
|
3159
|
+
if (!closed)
|
|
3160
|
+
for (
|
|
3161
|
+
closed = !0,
|
|
3162
|
+
nextWriteIndex === buffer.length
|
|
3163
|
+
? (buffer[nextWriteIndex] =
|
|
3164
|
+
createResolvedIteratorResultChunk(response, value, !0))
|
|
3165
|
+
: resolveIteratorResultChunk(
|
|
3166
|
+
response,
|
|
3167
|
+
buffer[nextWriteIndex],
|
|
3168
|
+
value,
|
|
3169
|
+
!0
|
|
3170
|
+
),
|
|
3171
|
+
nextWriteIndex++;
|
|
3172
|
+
nextWriteIndex < buffer.length;
|
|
3173
|
+
|
|
3174
|
+
)
|
|
3175
|
+
resolveIteratorResultChunk(
|
|
3176
|
+
response,
|
|
3177
|
+
buffer[nextWriteIndex++],
|
|
3178
|
+
'"$undefined"',
|
|
3179
|
+
!0
|
|
3180
|
+
);
|
|
3181
|
+
},
|
|
3182
|
+
error: function (error) {
|
|
3183
|
+
if (!closed)
|
|
3184
|
+
for (
|
|
3185
|
+
closed = !0,
|
|
3186
|
+
nextWriteIndex === buffer.length &&
|
|
3187
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
3188
|
+
nextWriteIndex < buffer.length;
|
|
3189
|
+
|
|
3190
|
+
)
|
|
3191
|
+
triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);
|
|
3192
|
+
}
|
|
3193
|
+
},
|
|
3194
|
+
streamState
|
|
3195
|
+
);
|
|
3196
|
+
}
|
|
3197
|
+
function resolveErrorDev(response, errorInfo) {
|
|
3198
|
+
var name = errorInfo.name,
|
|
3199
|
+
env = errorInfo.env;
|
|
3200
|
+
var error = buildFakeCallStack(
|
|
3201
|
+
response,
|
|
3202
|
+
errorInfo.stack,
|
|
3203
|
+
env,
|
|
3204
|
+
!1,
|
|
3205
|
+
Error.bind(
|
|
3206
|
+
null,
|
|
3207
|
+
errorInfo.message ||
|
|
3208
|
+
"An error occurred in the Server Components render but no message was provided"
|
|
3209
|
+
)
|
|
3210
|
+
);
|
|
3211
|
+
var ownerTask = null;
|
|
3212
|
+
null != errorInfo.owner &&
|
|
3213
|
+
((errorInfo = errorInfo.owner.slice(1)),
|
|
3214
|
+
(errorInfo = getOutlinedModel(
|
|
3215
|
+
response,
|
|
3216
|
+
errorInfo,
|
|
3217
|
+
{},
|
|
3218
|
+
"",
|
|
3219
|
+
createModel
|
|
3220
|
+
)),
|
|
3221
|
+
null !== errorInfo &&
|
|
3222
|
+
(ownerTask = initializeFakeTask(response, errorInfo)));
|
|
3223
|
+
null === ownerTask
|
|
3224
|
+
? ((response = getRootTask(response, env)),
|
|
3225
|
+
(error = null != response ? response.run(error) : error()))
|
|
3226
|
+
: (error = ownerTask.run(error));
|
|
3227
|
+
error.name = name;
|
|
3228
|
+
error.environmentName = env;
|
|
3229
|
+
return error;
|
|
3230
|
+
}
|
|
3231
|
+
function createFakeFunction(
|
|
3232
|
+
name,
|
|
3233
|
+
filename,
|
|
3234
|
+
sourceMap,
|
|
3235
|
+
line,
|
|
3236
|
+
col,
|
|
3237
|
+
enclosingLine,
|
|
3238
|
+
enclosingCol,
|
|
3239
|
+
environmentName
|
|
3240
|
+
) {
|
|
3241
|
+
name || (name = "<anonymous>");
|
|
3242
|
+
var encodedName = JSON.stringify(name);
|
|
3243
|
+
1 > enclosingLine ? (enclosingLine = 0) : enclosingLine--;
|
|
3244
|
+
1 > enclosingCol ? (enclosingCol = 0) : enclosingCol--;
|
|
3245
|
+
1 > line ? (line = 0) : line--;
|
|
3246
|
+
1 > col ? (col = 0) : col--;
|
|
3247
|
+
if (
|
|
3248
|
+
line < enclosingLine ||
|
|
3249
|
+
(line === enclosingLine && col < enclosingCol)
|
|
3250
|
+
)
|
|
3251
|
+
enclosingCol = enclosingLine = 0;
|
|
3252
|
+
1 > line
|
|
3253
|
+
? ((line = encodedName.length + 3),
|
|
3254
|
+
(enclosingCol -= line),
|
|
3255
|
+
0 > enclosingCol && (enclosingCol = 0),
|
|
3256
|
+
(col = col - enclosingCol - line - 3),
|
|
3257
|
+
0 > col && (col = 0),
|
|
3258
|
+
(encodedName =
|
|
3259
|
+
"({" +
|
|
3260
|
+
encodedName +
|
|
3261
|
+
":" +
|
|
3262
|
+
" ".repeat(enclosingCol) +
|
|
3263
|
+
"_=>" +
|
|
3264
|
+
" ".repeat(col) +
|
|
3265
|
+
"_()})"))
|
|
3266
|
+
: 1 > enclosingLine
|
|
3267
|
+
? ((enclosingCol -= encodedName.length + 3),
|
|
3268
|
+
0 > enclosingCol && (enclosingCol = 0),
|
|
3269
|
+
(encodedName =
|
|
3270
|
+
"({" +
|
|
3271
|
+
encodedName +
|
|
3272
|
+
":" +
|
|
3273
|
+
" ".repeat(enclosingCol) +
|
|
3274
|
+
"_=>" +
|
|
3275
|
+
"\n".repeat(line - enclosingLine) +
|
|
3276
|
+
" ".repeat(col) +
|
|
3277
|
+
"_()})"))
|
|
3278
|
+
: enclosingLine === line
|
|
3279
|
+
? ((col = col - enclosingCol - 3),
|
|
3280
|
+
0 > col && (col = 0),
|
|
3281
|
+
(encodedName =
|
|
3282
|
+
"\n".repeat(enclosingLine - 1) +
|
|
3283
|
+
"({" +
|
|
3284
|
+
encodedName +
|
|
3285
|
+
":\n" +
|
|
3286
|
+
" ".repeat(enclosingCol) +
|
|
3287
|
+
"_=>" +
|
|
3288
|
+
" ".repeat(col) +
|
|
3289
|
+
"_()})"))
|
|
3290
|
+
: (encodedName =
|
|
3291
|
+
"\n".repeat(enclosingLine - 1) +
|
|
3292
|
+
"({" +
|
|
3293
|
+
encodedName +
|
|
3294
|
+
":\n" +
|
|
3295
|
+
" ".repeat(enclosingCol) +
|
|
3296
|
+
"_=>" +
|
|
3297
|
+
"\n".repeat(line - enclosingLine) +
|
|
3298
|
+
" ".repeat(col) +
|
|
3299
|
+
"_()})");
|
|
3300
|
+
encodedName =
|
|
3301
|
+
1 > enclosingLine
|
|
3302
|
+
? encodedName +
|
|
3303
|
+
"\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */"
|
|
3304
|
+
: "/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" +
|
|
3305
|
+
encodedName;
|
|
3306
|
+
filename.startsWith("/") && (filename = "file://" + filename);
|
|
3307
|
+
sourceMap
|
|
3308
|
+
? ((encodedName +=
|
|
3309
|
+
"\n//# sourceURL=about://React/" +
|
|
3310
|
+
encodeURIComponent(environmentName) +
|
|
3311
|
+
"/" +
|
|
3312
|
+
encodeURI(filename) +
|
|
3313
|
+
"?" +
|
|
3314
|
+
fakeFunctionIdx++),
|
|
3315
|
+
(encodedName += "\n//# sourceMappingURL=" + sourceMap))
|
|
3316
|
+
: (encodedName = filename
|
|
3317
|
+
? encodedName + ("\n//# sourceURL=" + encodeURI(filename))
|
|
3318
|
+
: encodedName + "\n//# sourceURL=<anonymous>");
|
|
3319
|
+
try {
|
|
3320
|
+
var fn = (0, eval)(encodedName)[name];
|
|
3321
|
+
} catch (x) {
|
|
3322
|
+
fn = function (_) {
|
|
3323
|
+
return _();
|
|
3324
|
+
};
|
|
3325
|
+
}
|
|
3326
|
+
return fn;
|
|
3327
|
+
}
|
|
3328
|
+
function buildFakeCallStack(
|
|
3329
|
+
response,
|
|
3330
|
+
stack,
|
|
3331
|
+
environmentName,
|
|
3332
|
+
useEnclosingLine,
|
|
3333
|
+
innerCall
|
|
3334
|
+
) {
|
|
3335
|
+
for (var i = 0; i < stack.length; i++) {
|
|
3336
|
+
var frame = stack[i],
|
|
3337
|
+
frameKey =
|
|
3338
|
+
frame.join("-") +
|
|
3339
|
+
"-" +
|
|
3340
|
+
environmentName +
|
|
3341
|
+
(useEnclosingLine ? "-e" : "-n"),
|
|
3342
|
+
fn = fakeFunctionCache.get(frameKey);
|
|
3343
|
+
if (void 0 === fn) {
|
|
3344
|
+
fn = frame[0];
|
|
3345
|
+
var filename = frame[1],
|
|
3346
|
+
line = frame[2],
|
|
3347
|
+
col = frame[3],
|
|
3348
|
+
enclosingLine = frame[4];
|
|
3349
|
+
frame = frame[5];
|
|
3350
|
+
var findSourceMapURL = response._debugFindSourceMapURL;
|
|
3351
|
+
findSourceMapURL = findSourceMapURL
|
|
3352
|
+
? findSourceMapURL(filename, environmentName)
|
|
3353
|
+
: null;
|
|
3354
|
+
fn = createFakeFunction(
|
|
3355
|
+
fn,
|
|
3356
|
+
filename,
|
|
3357
|
+
findSourceMapURL,
|
|
3358
|
+
line,
|
|
3359
|
+
col,
|
|
3360
|
+
useEnclosingLine ? line : enclosingLine,
|
|
3361
|
+
useEnclosingLine ? col : frame,
|
|
3362
|
+
environmentName
|
|
3363
|
+
);
|
|
3364
|
+
fakeFunctionCache.set(frameKey, fn);
|
|
3365
|
+
}
|
|
3366
|
+
innerCall = fn.bind(null, innerCall);
|
|
3367
|
+
}
|
|
3368
|
+
return innerCall;
|
|
3369
|
+
}
|
|
3370
|
+
function getRootTask(response, childEnvironmentName) {
|
|
3371
|
+
var rootTask = response._debugRootTask;
|
|
3372
|
+
return rootTask
|
|
3373
|
+
? response._rootEnvironmentName !== childEnvironmentName
|
|
3374
|
+
? ((response = console.createTask.bind(
|
|
3375
|
+
console,
|
|
3376
|
+
'"use ' + childEnvironmentName.toLowerCase() + '"'
|
|
3377
|
+
)),
|
|
3378
|
+
rootTask.run(response))
|
|
3379
|
+
: rootTask
|
|
3380
|
+
: null;
|
|
3381
|
+
}
|
|
3382
|
+
function initializeFakeTask(response, debugInfo) {
|
|
3383
|
+
if (!supportsCreateTask || null == debugInfo.stack) return null;
|
|
3384
|
+
var cachedEntry = debugInfo.debugTask;
|
|
3385
|
+
if (void 0 !== cachedEntry) return cachedEntry;
|
|
3386
|
+
var useEnclosingLine = void 0 === debugInfo.key,
|
|
3387
|
+
stack = debugInfo.stack,
|
|
3388
|
+
env =
|
|
3389
|
+
null == debugInfo.env ? response._rootEnvironmentName : debugInfo.env;
|
|
3390
|
+
cachedEntry =
|
|
3391
|
+
null == debugInfo.owner || null == debugInfo.owner.env
|
|
3392
|
+
? response._rootEnvironmentName
|
|
3393
|
+
: debugInfo.owner.env;
|
|
3394
|
+
var ownerTask =
|
|
3395
|
+
null == debugInfo.owner
|
|
3396
|
+
? null
|
|
3397
|
+
: initializeFakeTask(response, debugInfo.owner);
|
|
3398
|
+
env =
|
|
3399
|
+
env !== cachedEntry
|
|
3400
|
+
? '"use ' + env.toLowerCase() + '"'
|
|
3401
|
+
: void 0 !== debugInfo.key
|
|
3402
|
+
? "<" + (debugInfo.name || "...") + ">"
|
|
3403
|
+
: void 0 !== debugInfo.name
|
|
3404
|
+
? debugInfo.name || "unknown"
|
|
3405
|
+
: "await " + (debugInfo.awaited.name || "unknown");
|
|
3406
|
+
env = console.createTask.bind(console, env);
|
|
3407
|
+
useEnclosingLine = buildFakeCallStack(
|
|
3408
|
+
response,
|
|
3409
|
+
stack,
|
|
3410
|
+
cachedEntry,
|
|
3411
|
+
useEnclosingLine,
|
|
3412
|
+
env
|
|
3413
|
+
);
|
|
3414
|
+
null === ownerTask
|
|
3415
|
+
? ((response = getRootTask(response, cachedEntry)),
|
|
3416
|
+
(response =
|
|
3417
|
+
null != response
|
|
3418
|
+
? response.run(useEnclosingLine)
|
|
3419
|
+
: useEnclosingLine()))
|
|
3420
|
+
: (response = ownerTask.run(useEnclosingLine));
|
|
3421
|
+
return (debugInfo.debugTask = response);
|
|
3422
|
+
}
|
|
3423
|
+
function fakeJSXCallSite() {
|
|
3424
|
+
return Error("react-stack-top-frame");
|
|
3425
|
+
}
|
|
3426
|
+
function initializeFakeStack(response, debugInfo) {
|
|
3427
|
+
if (void 0 === debugInfo.debugStack) {
|
|
3428
|
+
null != debugInfo.stack &&
|
|
3429
|
+
(debugInfo.debugStack = createFakeJSXCallStackInDEV(
|
|
3430
|
+
response,
|
|
3431
|
+
debugInfo.stack,
|
|
3432
|
+
null == debugInfo.env ? "" : debugInfo.env
|
|
3433
|
+
));
|
|
3434
|
+
var owner = debugInfo.owner;
|
|
3435
|
+
null != owner &&
|
|
3436
|
+
(initializeFakeStack(response, owner),
|
|
3437
|
+
void 0 === owner.debugLocation &&
|
|
3438
|
+
null != debugInfo.debugStack &&
|
|
3439
|
+
(owner.debugLocation = debugInfo.debugStack));
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3442
|
+
function initializeDebugInfo(response, debugInfo) {
|
|
3443
|
+
void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo);
|
|
3444
|
+
if (null == debugInfo.owner && null != response._debugRootOwner) {
|
|
3445
|
+
var _componentInfoOrAsyncInfo = debugInfo;
|
|
3446
|
+
_componentInfoOrAsyncInfo.owner = response._debugRootOwner;
|
|
3447
|
+
_componentInfoOrAsyncInfo.stack = null;
|
|
3448
|
+
_componentInfoOrAsyncInfo.debugStack = response._debugRootStack;
|
|
3449
|
+
_componentInfoOrAsyncInfo.debugTask = response._debugRootTask;
|
|
3450
|
+
} else
|
|
3451
|
+
void 0 !== debugInfo.stack && initializeFakeStack(response, debugInfo);
|
|
3452
|
+
"number" === typeof debugInfo.time &&
|
|
3453
|
+
(debugInfo = { time: debugInfo.time + response._timeOrigin });
|
|
3454
|
+
return debugInfo;
|
|
3455
|
+
}
|
|
3456
|
+
function getCurrentStackInDEV() {
|
|
3457
|
+
var owner = currentOwnerInDEV;
|
|
3458
|
+
if (null === owner) return "";
|
|
3459
|
+
try {
|
|
3460
|
+
var info = "";
|
|
3461
|
+
if (owner.owner || "string" !== typeof owner.name) {
|
|
3462
|
+
for (; owner; ) {
|
|
3463
|
+
var ownerStack = owner.debugStack;
|
|
3464
|
+
if (null != ownerStack) {
|
|
3465
|
+
if ((owner = owner.owner)) {
|
|
3466
|
+
var JSCompiler_temp_const = info;
|
|
3467
|
+
var error = ownerStack,
|
|
3468
|
+
prevPrepareStackTrace = Error.prepareStackTrace;
|
|
3469
|
+
Error.prepareStackTrace = prepareStackTrace;
|
|
3470
|
+
var stack = error.stack;
|
|
3471
|
+
Error.prepareStackTrace = prevPrepareStackTrace;
|
|
3472
|
+
stack.startsWith("Error: react-stack-top-frame\n") &&
|
|
3473
|
+
(stack = stack.slice(29));
|
|
3474
|
+
var idx = stack.indexOf("\n");
|
|
3475
|
+
-1 !== idx && (stack = stack.slice(idx + 1));
|
|
3476
|
+
idx = stack.indexOf("react_stack_bottom_frame");
|
|
3477
|
+
-1 !== idx && (idx = stack.lastIndexOf("\n", idx));
|
|
3478
|
+
var JSCompiler_inline_result =
|
|
3479
|
+
-1 !== idx ? (stack = stack.slice(0, idx)) : "";
|
|
3480
|
+
info =
|
|
3481
|
+
JSCompiler_temp_const + ("\n" + JSCompiler_inline_result);
|
|
3482
|
+
}
|
|
3483
|
+
} else break;
|
|
3484
|
+
}
|
|
3485
|
+
var JSCompiler_inline_result$jscomp$0 = info;
|
|
3486
|
+
} else {
|
|
3487
|
+
JSCompiler_temp_const = owner.name;
|
|
3488
|
+
if (void 0 === prefix)
|
|
3489
|
+
try {
|
|
3490
|
+
throw Error();
|
|
3491
|
+
} catch (x) {
|
|
3492
|
+
(prefix =
|
|
3493
|
+
((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) ||
|
|
3494
|
+
""),
|
|
3495
|
+
(suffix =
|
|
3496
|
+
-1 < x.stack.indexOf("\n at")
|
|
3497
|
+
? " (<anonymous>)"
|
|
3498
|
+
: -1 < x.stack.indexOf("@")
|
|
3499
|
+
? "@unknown:0:0"
|
|
3500
|
+
: "");
|
|
3501
|
+
}
|
|
3502
|
+
JSCompiler_inline_result$jscomp$0 =
|
|
3503
|
+
"\n" + prefix + JSCompiler_temp_const + suffix;
|
|
3504
|
+
}
|
|
3505
|
+
} catch (x) {
|
|
3506
|
+
JSCompiler_inline_result$jscomp$0 =
|
|
3507
|
+
"\nError generating stack: " + x.message + "\n" + x.stack;
|
|
3508
|
+
}
|
|
3509
|
+
return JSCompiler_inline_result$jscomp$0;
|
|
3510
|
+
}
|
|
3511
|
+
function resolveConsoleEntry(response, json) {
|
|
3512
|
+
if (response._replayConsole) {
|
|
3513
|
+
var blockedChunk = response._blockedConsole;
|
|
3514
|
+
if (null == blockedChunk)
|
|
3515
|
+
(blockedChunk = createResolvedModelChunk(response, json)),
|
|
3516
|
+
initializeModelChunk(blockedChunk),
|
|
3517
|
+
"fulfilled" === blockedChunk.status
|
|
3518
|
+
? replayConsoleWithCallStackInDEV(response, blockedChunk.value)
|
|
3519
|
+
: (blockedChunk.then(
|
|
3520
|
+
function (v) {
|
|
3521
|
+
return replayConsoleWithCallStackInDEV(response, v);
|
|
3522
|
+
},
|
|
3523
|
+
function () {}
|
|
3524
|
+
),
|
|
3525
|
+
(response._blockedConsole = blockedChunk));
|
|
3526
|
+
else {
|
|
3527
|
+
var _chunk4 = createPendingChunk(response);
|
|
3528
|
+
_chunk4.then(
|
|
3529
|
+
function (v) {
|
|
3530
|
+
return replayConsoleWithCallStackInDEV(response, v);
|
|
3531
|
+
},
|
|
3532
|
+
function () {}
|
|
3533
|
+
);
|
|
3534
|
+
response._blockedConsole = _chunk4;
|
|
3535
|
+
var unblock = function () {
|
|
3536
|
+
response._blockedConsole === _chunk4 &&
|
|
3537
|
+
(response._blockedConsole = null);
|
|
3538
|
+
resolveModelChunk(response, _chunk4, json);
|
|
3539
|
+
};
|
|
3540
|
+
blockedChunk.then(unblock, unblock);
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3543
|
+
}
|
|
3544
|
+
function initializeIOInfo(response, ioInfo) {
|
|
3545
|
+
void 0 !== ioInfo.stack &&
|
|
3546
|
+
(initializeFakeTask(response, ioInfo),
|
|
3547
|
+
initializeFakeStack(response, ioInfo));
|
|
3548
|
+
ioInfo.start += response._timeOrigin;
|
|
3549
|
+
ioInfo.end += response._timeOrigin;
|
|
3550
|
+
if (response._replayConsole) {
|
|
3551
|
+
response = response._rootEnvironmentName;
|
|
3552
|
+
var promise = ioInfo.value;
|
|
3553
|
+
if (promise)
|
|
3554
|
+
switch (promise.status) {
|
|
3555
|
+
case "fulfilled":
|
|
3556
|
+
logIOInfo(ioInfo, response, promise.value);
|
|
3557
|
+
break;
|
|
3558
|
+
case "rejected":
|
|
3559
|
+
logIOInfoErrored(ioInfo, response, promise.reason);
|
|
3560
|
+
break;
|
|
3561
|
+
default:
|
|
3562
|
+
promise.then(
|
|
3563
|
+
logIOInfo.bind(null, ioInfo, response),
|
|
3564
|
+
logIOInfoErrored.bind(null, ioInfo, response)
|
|
3565
|
+
);
|
|
3566
|
+
}
|
|
3567
|
+
else logIOInfo(ioInfo, response, void 0);
|
|
3568
|
+
}
|
|
3569
|
+
}
|
|
3570
|
+
function resolveIOInfo(response, id, model) {
|
|
3571
|
+
var chunks = response._chunks,
|
|
3572
|
+
chunk = chunks.get(id);
|
|
3573
|
+
chunk
|
|
3574
|
+
? (resolveModelChunk(response, chunk, model),
|
|
3575
|
+
"resolved_model" === chunk.status && initializeModelChunk(chunk))
|
|
3576
|
+
: ((chunk = createResolvedModelChunk(response, model)),
|
|
3577
|
+
chunks.set(id, chunk),
|
|
3578
|
+
initializeModelChunk(chunk));
|
|
3579
|
+
"fulfilled" === chunk.status
|
|
3580
|
+
? initializeIOInfo(response, chunk.value)
|
|
3581
|
+
: chunk.then(
|
|
3582
|
+
function (v) {
|
|
3583
|
+
initializeIOInfo(response, v);
|
|
3584
|
+
},
|
|
3585
|
+
function () {}
|
|
3586
|
+
);
|
|
3587
|
+
}
|
|
3588
|
+
function mergeBuffer(buffer, lastChunk) {
|
|
3589
|
+
for (
|
|
3590
|
+
var l = buffer.length, byteLength = lastChunk.length, i = 0;
|
|
3591
|
+
i < l;
|
|
3592
|
+
i++
|
|
3593
|
+
)
|
|
3594
|
+
byteLength += buffer[i].byteLength;
|
|
3595
|
+
byteLength = new Uint8Array(byteLength);
|
|
3596
|
+
for (var _i3 = (i = 0); _i3 < l; _i3++) {
|
|
3597
|
+
var chunk = buffer[_i3];
|
|
3598
|
+
byteLength.set(chunk, i);
|
|
3599
|
+
i += chunk.byteLength;
|
|
3600
|
+
}
|
|
3601
|
+
byteLength.set(lastChunk, i);
|
|
3602
|
+
return byteLength;
|
|
3603
|
+
}
|
|
3604
|
+
function resolveTypedArray(
|
|
3605
|
+
response,
|
|
3606
|
+
id,
|
|
3607
|
+
buffer,
|
|
3608
|
+
lastChunk,
|
|
3609
|
+
constructor,
|
|
3610
|
+
bytesPerElement,
|
|
3611
|
+
streamState
|
|
3612
|
+
) {
|
|
3613
|
+
buffer =
|
|
3614
|
+
0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement
|
|
3615
|
+
? lastChunk
|
|
3616
|
+
: mergeBuffer(buffer, lastChunk);
|
|
3617
|
+
constructor = new constructor(
|
|
3618
|
+
buffer.buffer,
|
|
3619
|
+
buffer.byteOffset,
|
|
3620
|
+
buffer.byteLength / bytesPerElement
|
|
3621
|
+
);
|
|
3622
|
+
resolveBuffer(response, id, constructor, streamState);
|
|
3623
|
+
}
|
|
3624
|
+
function flushComponentPerformance(
|
|
3625
|
+
response$jscomp$0,
|
|
3626
|
+
root,
|
|
3627
|
+
trackIdx$jscomp$6,
|
|
3628
|
+
trackTime,
|
|
3629
|
+
parentEndTime
|
|
3630
|
+
) {
|
|
3631
|
+
if (!isArrayImpl(root._children)) {
|
|
3632
|
+
var previousResult = root._children,
|
|
3633
|
+
previousEndTime = previousResult.endTime;
|
|
3634
|
+
if (
|
|
3635
|
+
-Infinity < parentEndTime &&
|
|
3636
|
+
parentEndTime < previousEndTime &&
|
|
3637
|
+
null !== previousResult.component
|
|
3638
|
+
) {
|
|
3639
|
+
var componentInfo = previousResult.component,
|
|
3640
|
+
trackIdx = trackIdx$jscomp$6,
|
|
3641
|
+
startTime = parentEndTime;
|
|
3642
|
+
if (supportsUserTiming && 0 <= previousEndTime && 10 > trackIdx) {
|
|
3643
|
+
var color =
|
|
3644
|
+
componentInfo.env === response$jscomp$0._rootEnvironmentName
|
|
3645
|
+
? "primary-light"
|
|
3646
|
+
: "secondary-light",
|
|
3647
|
+
entryName = componentInfo.name + " [deduped]",
|
|
3648
|
+
debugTask = componentInfo.debugTask;
|
|
3649
|
+
debugTask
|
|
3650
|
+
? debugTask.run(
|
|
3651
|
+
console.timeStamp.bind(
|
|
3652
|
+
console,
|
|
3653
|
+
entryName,
|
|
3654
|
+
0 > startTime ? 0 : startTime,
|
|
3655
|
+
previousEndTime,
|
|
3656
|
+
trackNames[trackIdx],
|
|
3657
|
+
"Server Components \u269b",
|
|
3658
|
+
color
|
|
3659
|
+
)
|
|
3660
|
+
)
|
|
3661
|
+
: console.timeStamp(
|
|
3662
|
+
entryName,
|
|
3663
|
+
0 > startTime ? 0 : startTime,
|
|
3664
|
+
previousEndTime,
|
|
3665
|
+
trackNames[trackIdx],
|
|
3666
|
+
"Server Components \u269b",
|
|
3667
|
+
color
|
|
3668
|
+
);
|
|
3669
|
+
}
|
|
3670
|
+
}
|
|
3671
|
+
previousResult.track = trackIdx$jscomp$6;
|
|
3672
|
+
return previousResult;
|
|
3673
|
+
}
|
|
3674
|
+
var children = root._children,
|
|
3675
|
+
debugInfo = root._debugInfo;
|
|
3676
|
+
if (debugInfo) {
|
|
3677
|
+
for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) {
|
|
3678
|
+
var info = debugInfo[i];
|
|
3679
|
+
"number" === typeof info.time && (startTime$jscomp$0 = info.time);
|
|
3680
|
+
if ("string" === typeof info.name) {
|
|
3681
|
+
startTime$jscomp$0 < trackTime && trackIdx$jscomp$6++;
|
|
3682
|
+
trackTime = startTime$jscomp$0;
|
|
3683
|
+
break;
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
for (var _i4 = debugInfo.length - 1; 0 <= _i4; _i4--) {
|
|
3687
|
+
var _info = debugInfo[_i4];
|
|
3688
|
+
if ("number" === typeof _info.time && _info.time > parentEndTime) {
|
|
3689
|
+
parentEndTime = _info.time;
|
|
3690
|
+
break;
|
|
3691
|
+
}
|
|
3692
|
+
}
|
|
3693
|
+
}
|
|
3694
|
+
var result = {
|
|
3695
|
+
track: trackIdx$jscomp$6,
|
|
3696
|
+
endTime: -Infinity,
|
|
3697
|
+
component: null
|
|
3698
|
+
};
|
|
3699
|
+
root._children = result;
|
|
3700
|
+
for (
|
|
3701
|
+
var childrenEndTime = -Infinity,
|
|
3702
|
+
childTrackIdx = trackIdx$jscomp$6,
|
|
3703
|
+
childTrackTime = trackTime,
|
|
3704
|
+
_i5 = 0;
|
|
3705
|
+
_i5 < children.length;
|
|
3706
|
+
_i5++
|
|
3707
|
+
) {
|
|
3708
|
+
var childResult = flushComponentPerformance(
|
|
3709
|
+
response$jscomp$0,
|
|
3710
|
+
children[_i5],
|
|
3711
|
+
childTrackIdx,
|
|
3712
|
+
childTrackTime,
|
|
3713
|
+
parentEndTime
|
|
3714
|
+
);
|
|
3715
|
+
null !== childResult.component &&
|
|
3716
|
+
(result.component = childResult.component);
|
|
3717
|
+
childTrackIdx = childResult.track;
|
|
3718
|
+
var childEndTime = childResult.endTime;
|
|
3719
|
+
childEndTime > childTrackTime && (childTrackTime = childEndTime);
|
|
3720
|
+
childEndTime > childrenEndTime && (childrenEndTime = childEndTime);
|
|
3721
|
+
}
|
|
3722
|
+
if (debugInfo)
|
|
3723
|
+
for (
|
|
3724
|
+
var componentEndTime = 0,
|
|
3725
|
+
isLastComponent = !0,
|
|
3726
|
+
endTime = -1,
|
|
3727
|
+
endTimeIdx = -1,
|
|
3728
|
+
_i6 = debugInfo.length - 1;
|
|
3729
|
+
0 <= _i6;
|
|
3730
|
+
_i6--
|
|
3731
|
+
) {
|
|
3732
|
+
var _info2 = debugInfo[_i6];
|
|
3733
|
+
if ("number" === typeof _info2.time) {
|
|
3734
|
+
0 === componentEndTime && (componentEndTime = _info2.time);
|
|
3735
|
+
var time = _info2.time;
|
|
3736
|
+
if (-1 < endTimeIdx)
|
|
3737
|
+
for (var j = endTimeIdx - 1; j > _i6; j--) {
|
|
3738
|
+
var candidateInfo = debugInfo[j];
|
|
3739
|
+
if ("string" === typeof candidateInfo.name) {
|
|
3740
|
+
componentEndTime > childrenEndTime &&
|
|
3741
|
+
(childrenEndTime = componentEndTime);
|
|
3742
|
+
var componentInfo$jscomp$0 = candidateInfo,
|
|
3743
|
+
response = response$jscomp$0,
|
|
3744
|
+
componentInfo$jscomp$1 = componentInfo$jscomp$0,
|
|
3745
|
+
trackIdx$jscomp$0 = trackIdx$jscomp$6,
|
|
3746
|
+
startTime$jscomp$1 = time,
|
|
3747
|
+
componentEndTime$jscomp$0 = componentEndTime,
|
|
3748
|
+
childrenEndTime$jscomp$0 = childrenEndTime;
|
|
3749
|
+
if (
|
|
3750
|
+
isLastComponent &&
|
|
3751
|
+
"rejected" === root.status &&
|
|
3752
|
+
root.reason !== response._closedReason
|
|
3753
|
+
) {
|
|
3754
|
+
var componentInfo$jscomp$2 = componentInfo$jscomp$1,
|
|
3755
|
+
trackIdx$jscomp$1 = trackIdx$jscomp$0,
|
|
3756
|
+
startTime$jscomp$2 = startTime$jscomp$1,
|
|
3757
|
+
childrenEndTime$jscomp$1 = childrenEndTime$jscomp$0,
|
|
3758
|
+
error = root.reason;
|
|
3759
|
+
if (supportsUserTiming) {
|
|
3760
|
+
var env = componentInfo$jscomp$2.env,
|
|
3761
|
+
name = componentInfo$jscomp$2.name,
|
|
3762
|
+
entryName$jscomp$0 =
|
|
3763
|
+
env === response._rootEnvironmentName ||
|
|
3764
|
+
void 0 === env
|
|
3765
|
+
? name
|
|
3766
|
+
: name + " [" + env + "]",
|
|
3767
|
+
properties = [
|
|
3768
|
+
[
|
|
3769
|
+
"Error",
|
|
3770
|
+
"object" === typeof error &&
|
|
3771
|
+
null !== error &&
|
|
3772
|
+
"string" === typeof error.message
|
|
3773
|
+
? String(error.message)
|
|
3774
|
+
: String(error)
|
|
3775
|
+
]
|
|
3776
|
+
];
|
|
3777
|
+
null != componentInfo$jscomp$2.key &&
|
|
3778
|
+
addValueToProperties(
|
|
3779
|
+
"key",
|
|
3780
|
+
componentInfo$jscomp$2.key,
|
|
3781
|
+
properties,
|
|
3782
|
+
0,
|
|
3783
|
+
""
|
|
3784
|
+
);
|
|
3785
|
+
null != componentInfo$jscomp$2.props &&
|
|
3786
|
+
addObjectToProperties(
|
|
3787
|
+
componentInfo$jscomp$2.props,
|
|
3788
|
+
properties,
|
|
3789
|
+
0,
|
|
3790
|
+
""
|
|
3791
|
+
);
|
|
3792
|
+
performance.measure("\u200b" + entryName$jscomp$0, {
|
|
3793
|
+
start: 0 > startTime$jscomp$2 ? 0 : startTime$jscomp$2,
|
|
3794
|
+
end: childrenEndTime$jscomp$1,
|
|
3795
|
+
detail: {
|
|
3796
|
+
devtools: {
|
|
3797
|
+
color: "error",
|
|
3798
|
+
track: trackNames[trackIdx$jscomp$1],
|
|
3799
|
+
trackGroup: "Server Components \u269b",
|
|
3800
|
+
tooltipText: entryName$jscomp$0 + " Errored",
|
|
3801
|
+
properties: properties
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
3804
|
+
});
|
|
3805
|
+
}
|
|
3806
|
+
} else {
|
|
3807
|
+
var componentInfo$jscomp$3 = componentInfo$jscomp$1,
|
|
3808
|
+
trackIdx$jscomp$2 = trackIdx$jscomp$0,
|
|
3809
|
+
startTime$jscomp$3 = startTime$jscomp$1,
|
|
3810
|
+
childrenEndTime$jscomp$2 = childrenEndTime$jscomp$0;
|
|
3811
|
+
if (
|
|
3812
|
+
supportsUserTiming &&
|
|
3813
|
+
0 <= childrenEndTime$jscomp$2 &&
|
|
3814
|
+
10 > trackIdx$jscomp$2
|
|
3815
|
+
) {
|
|
3816
|
+
var env$jscomp$0 = componentInfo$jscomp$3.env,
|
|
3817
|
+
name$jscomp$0 = componentInfo$jscomp$3.name,
|
|
3818
|
+
isPrimaryEnv =
|
|
3819
|
+
env$jscomp$0 === response._rootEnvironmentName,
|
|
3820
|
+
selfTime =
|
|
3821
|
+
componentEndTime$jscomp$0 - startTime$jscomp$3,
|
|
3822
|
+
color$jscomp$0 =
|
|
3823
|
+
0.5 > selfTime
|
|
3824
|
+
? isPrimaryEnv
|
|
3825
|
+
? "primary-light"
|
|
3826
|
+
: "secondary-light"
|
|
3827
|
+
: 50 > selfTime
|
|
3828
|
+
? isPrimaryEnv
|
|
3829
|
+
? "primary"
|
|
3830
|
+
: "secondary"
|
|
3831
|
+
: 500 > selfTime
|
|
3832
|
+
? isPrimaryEnv
|
|
3833
|
+
? "primary-dark"
|
|
3834
|
+
: "secondary-dark"
|
|
3835
|
+
: "error",
|
|
3836
|
+
entryName$jscomp$1 =
|
|
3837
|
+
isPrimaryEnv || void 0 === env$jscomp$0
|
|
3838
|
+
? name$jscomp$0
|
|
3839
|
+
: name$jscomp$0 + " [" + env$jscomp$0 + "]",
|
|
3840
|
+
debugTask$jscomp$0 = componentInfo$jscomp$3.debugTask;
|
|
3841
|
+
if (debugTask$jscomp$0) {
|
|
3842
|
+
var properties$jscomp$0 = [];
|
|
3843
|
+
null != componentInfo$jscomp$3.key &&
|
|
3844
|
+
addValueToProperties(
|
|
3845
|
+
"key",
|
|
3846
|
+
componentInfo$jscomp$3.key,
|
|
3847
|
+
properties$jscomp$0,
|
|
3848
|
+
0,
|
|
3849
|
+
""
|
|
3850
|
+
);
|
|
3851
|
+
null != componentInfo$jscomp$3.props &&
|
|
3852
|
+
addObjectToProperties(
|
|
3853
|
+
componentInfo$jscomp$3.props,
|
|
3854
|
+
properties$jscomp$0,
|
|
3855
|
+
0,
|
|
3856
|
+
""
|
|
3857
|
+
);
|
|
3858
|
+
debugTask$jscomp$0.run(
|
|
3859
|
+
performance.measure.bind(
|
|
3860
|
+
performance,
|
|
3861
|
+
"\u200b" + entryName$jscomp$1,
|
|
3862
|
+
{
|
|
3863
|
+
start:
|
|
3864
|
+
0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3,
|
|
3865
|
+
end: childrenEndTime$jscomp$2,
|
|
3866
|
+
detail: {
|
|
3867
|
+
devtools: {
|
|
3868
|
+
color: color$jscomp$0,
|
|
3869
|
+
track: trackNames[trackIdx$jscomp$2],
|
|
3870
|
+
trackGroup: "Server Components \u269b",
|
|
3871
|
+
properties: properties$jscomp$0
|
|
3872
|
+
}
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
)
|
|
3876
|
+
);
|
|
3877
|
+
} else
|
|
3878
|
+
console.timeStamp(
|
|
3879
|
+
"\u200b" + entryName$jscomp$1,
|
|
3880
|
+
0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3,
|
|
3881
|
+
childrenEndTime$jscomp$2,
|
|
3882
|
+
trackNames[trackIdx$jscomp$2],
|
|
3883
|
+
"Server Components \u269b",
|
|
3884
|
+
color$jscomp$0
|
|
3885
|
+
);
|
|
3886
|
+
}
|
|
3887
|
+
}
|
|
3888
|
+
componentEndTime = time;
|
|
3889
|
+
result.component = componentInfo$jscomp$0;
|
|
3890
|
+
isLastComponent = !1;
|
|
3891
|
+
} else if (
|
|
3892
|
+
candidateInfo.awaited &&
|
|
3893
|
+
null != candidateInfo.awaited.env
|
|
3894
|
+
) {
|
|
3895
|
+
endTime > childrenEndTime && (childrenEndTime = endTime);
|
|
3896
|
+
var asyncInfo = candidateInfo,
|
|
3897
|
+
env$jscomp$1 = response$jscomp$0._rootEnvironmentName,
|
|
3898
|
+
promise = asyncInfo.awaited.value;
|
|
3899
|
+
if (promise) {
|
|
3900
|
+
var thenable = promise;
|
|
3901
|
+
switch (thenable.status) {
|
|
3902
|
+
case "fulfilled":
|
|
3903
|
+
logComponentAwait(
|
|
3904
|
+
asyncInfo,
|
|
3905
|
+
trackIdx$jscomp$6,
|
|
3906
|
+
time,
|
|
3907
|
+
endTime,
|
|
3908
|
+
env$jscomp$1,
|
|
3909
|
+
thenable.value
|
|
3910
|
+
);
|
|
3911
|
+
break;
|
|
3912
|
+
case "rejected":
|
|
3913
|
+
var asyncInfo$jscomp$0 = asyncInfo,
|
|
3914
|
+
trackIdx$jscomp$3 = trackIdx$jscomp$6,
|
|
3915
|
+
startTime$jscomp$4 = time,
|
|
3916
|
+
endTime$jscomp$0 = endTime,
|
|
3917
|
+
rootEnv = env$jscomp$1,
|
|
3918
|
+
error$jscomp$0 = thenable.reason;
|
|
3919
|
+
if (supportsUserTiming && 0 < endTime$jscomp$0) {
|
|
3920
|
+
var description = getIODescription(error$jscomp$0),
|
|
3921
|
+
entryName$jscomp$2 =
|
|
3922
|
+
"await " +
|
|
3923
|
+
getIOShortName(
|
|
3924
|
+
asyncInfo$jscomp$0.awaited,
|
|
3925
|
+
description,
|
|
3926
|
+
asyncInfo$jscomp$0.env,
|
|
3927
|
+
rootEnv
|
|
3928
|
+
),
|
|
3929
|
+
debugTask$jscomp$1 =
|
|
3930
|
+
asyncInfo$jscomp$0.debugTask ||
|
|
3931
|
+
asyncInfo$jscomp$0.awaited.debugTask;
|
|
3932
|
+
if (debugTask$jscomp$1) {
|
|
3933
|
+
var properties$jscomp$1 = [
|
|
3934
|
+
[
|
|
3935
|
+
"Rejected",
|
|
3936
|
+
"object" === typeof error$jscomp$0 &&
|
|
3937
|
+
null !== error$jscomp$0 &&
|
|
3938
|
+
"string" === typeof error$jscomp$0.message
|
|
3939
|
+
? String(error$jscomp$0.message)
|
|
3940
|
+
: String(error$jscomp$0)
|
|
3941
|
+
]
|
|
3942
|
+
],
|
|
3943
|
+
tooltipText =
|
|
3944
|
+
getIOLongName(
|
|
3945
|
+
asyncInfo$jscomp$0.awaited,
|
|
3946
|
+
description,
|
|
3947
|
+
asyncInfo$jscomp$0.env,
|
|
3948
|
+
rootEnv
|
|
3949
|
+
) + " Rejected";
|
|
3950
|
+
debugTask$jscomp$1.run(
|
|
3951
|
+
performance.measure.bind(
|
|
3952
|
+
performance,
|
|
3953
|
+
entryName$jscomp$2,
|
|
3954
|
+
{
|
|
3955
|
+
start:
|
|
3956
|
+
0 > startTime$jscomp$4
|
|
3957
|
+
? 0
|
|
3958
|
+
: startTime$jscomp$4,
|
|
3959
|
+
end: endTime$jscomp$0,
|
|
3960
|
+
detail: {
|
|
3961
|
+
devtools: {
|
|
3962
|
+
color: "error",
|
|
3963
|
+
track: trackNames[trackIdx$jscomp$3],
|
|
3964
|
+
trackGroup: "Server Components \u269b",
|
|
3965
|
+
properties: properties$jscomp$1,
|
|
3966
|
+
tooltipText: tooltipText
|
|
3967
|
+
}
|
|
3968
|
+
}
|
|
3969
|
+
}
|
|
3970
|
+
)
|
|
3971
|
+
);
|
|
3972
|
+
} else
|
|
3973
|
+
console.timeStamp(
|
|
3974
|
+
entryName$jscomp$2,
|
|
3975
|
+
0 > startTime$jscomp$4 ? 0 : startTime$jscomp$4,
|
|
3976
|
+
endTime$jscomp$0,
|
|
3977
|
+
trackNames[trackIdx$jscomp$3],
|
|
3978
|
+
"Server Components \u269b",
|
|
3979
|
+
"error"
|
|
3980
|
+
);
|
|
3981
|
+
}
|
|
3982
|
+
break;
|
|
3983
|
+
default:
|
|
3984
|
+
logComponentAwait(
|
|
3985
|
+
asyncInfo,
|
|
3986
|
+
trackIdx$jscomp$6,
|
|
3987
|
+
time,
|
|
3988
|
+
endTime,
|
|
3989
|
+
env$jscomp$1,
|
|
3990
|
+
void 0
|
|
3991
|
+
);
|
|
3992
|
+
}
|
|
3993
|
+
} else
|
|
3994
|
+
logComponentAwait(
|
|
3995
|
+
asyncInfo,
|
|
3996
|
+
trackIdx$jscomp$6,
|
|
3997
|
+
time,
|
|
3998
|
+
endTime,
|
|
3999
|
+
env$jscomp$1,
|
|
4000
|
+
void 0
|
|
4001
|
+
);
|
|
4002
|
+
}
|
|
4003
|
+
}
|
|
4004
|
+
else {
|
|
4005
|
+
endTime = time;
|
|
4006
|
+
for (var _j = debugInfo.length - 1; _j > _i6; _j--) {
|
|
4007
|
+
var _candidateInfo = debugInfo[_j];
|
|
4008
|
+
if ("string" === typeof _candidateInfo.name) {
|
|
4009
|
+
componentEndTime > childrenEndTime &&
|
|
4010
|
+
(childrenEndTime = componentEndTime);
|
|
4011
|
+
var _componentInfo = _candidateInfo,
|
|
4012
|
+
_env = response$jscomp$0._rootEnvironmentName,
|
|
4013
|
+
componentInfo$jscomp$4 = _componentInfo,
|
|
4014
|
+
trackIdx$jscomp$4 = trackIdx$jscomp$6,
|
|
4015
|
+
startTime$jscomp$5 = time,
|
|
4016
|
+
childrenEndTime$jscomp$3 = childrenEndTime;
|
|
4017
|
+
if (supportsUserTiming) {
|
|
4018
|
+
var env$jscomp$2 = componentInfo$jscomp$4.env,
|
|
4019
|
+
name$jscomp$1 = componentInfo$jscomp$4.name,
|
|
4020
|
+
entryName$jscomp$3 =
|
|
4021
|
+
env$jscomp$2 === _env || void 0 === env$jscomp$2
|
|
4022
|
+
? name$jscomp$1
|
|
4023
|
+
: name$jscomp$1 + " [" + env$jscomp$2 + "]",
|
|
4024
|
+
properties$jscomp$2 = [
|
|
4025
|
+
[
|
|
4026
|
+
"Aborted",
|
|
4027
|
+
"The stream was aborted before this Component finished rendering."
|
|
4028
|
+
]
|
|
4029
|
+
];
|
|
4030
|
+
null != componentInfo$jscomp$4.key &&
|
|
4031
|
+
addValueToProperties(
|
|
4032
|
+
"key",
|
|
4033
|
+
componentInfo$jscomp$4.key,
|
|
4034
|
+
properties$jscomp$2,
|
|
4035
|
+
0,
|
|
4036
|
+
""
|
|
4037
|
+
);
|
|
4038
|
+
null != componentInfo$jscomp$4.props &&
|
|
4039
|
+
addObjectToProperties(
|
|
4040
|
+
componentInfo$jscomp$4.props,
|
|
4041
|
+
properties$jscomp$2,
|
|
4042
|
+
0,
|
|
4043
|
+
""
|
|
4044
|
+
);
|
|
4045
|
+
performance.measure("\u200b" + entryName$jscomp$3, {
|
|
4046
|
+
start: 0 > startTime$jscomp$5 ? 0 : startTime$jscomp$5,
|
|
4047
|
+
end: childrenEndTime$jscomp$3,
|
|
4048
|
+
detail: {
|
|
4049
|
+
devtools: {
|
|
4050
|
+
color: "warning",
|
|
4051
|
+
track: trackNames[trackIdx$jscomp$4],
|
|
4052
|
+
trackGroup: "Server Components \u269b",
|
|
4053
|
+
tooltipText: entryName$jscomp$3 + " Aborted",
|
|
4054
|
+
properties: properties$jscomp$2
|
|
4055
|
+
}
|
|
4056
|
+
}
|
|
4057
|
+
});
|
|
4058
|
+
}
|
|
4059
|
+
componentEndTime = time;
|
|
4060
|
+
result.component = _componentInfo;
|
|
4061
|
+
isLastComponent = !1;
|
|
4062
|
+
} else if (
|
|
4063
|
+
_candidateInfo.awaited &&
|
|
4064
|
+
null != _candidateInfo.awaited.env
|
|
4065
|
+
) {
|
|
4066
|
+
var _asyncInfo = _candidateInfo,
|
|
4067
|
+
_env2 = response$jscomp$0._rootEnvironmentName;
|
|
4068
|
+
_asyncInfo.awaited.end > endTime &&
|
|
4069
|
+
(endTime = _asyncInfo.awaited.end);
|
|
4070
|
+
endTime > childrenEndTime && (childrenEndTime = endTime);
|
|
4071
|
+
var asyncInfo$jscomp$1 = _asyncInfo,
|
|
4072
|
+
trackIdx$jscomp$5 = trackIdx$jscomp$6,
|
|
4073
|
+
startTime$jscomp$6 = time,
|
|
4074
|
+
endTime$jscomp$1 = endTime,
|
|
4075
|
+
rootEnv$jscomp$0 = _env2;
|
|
4076
|
+
if (supportsUserTiming && 0 < endTime$jscomp$1) {
|
|
4077
|
+
var entryName$jscomp$4 =
|
|
4078
|
+
"await " +
|
|
4079
|
+
getIOShortName(
|
|
4080
|
+
asyncInfo$jscomp$1.awaited,
|
|
4081
|
+
"",
|
|
4082
|
+
asyncInfo$jscomp$1.env,
|
|
4083
|
+
rootEnv$jscomp$0
|
|
4084
|
+
),
|
|
4085
|
+
debugTask$jscomp$2 =
|
|
4086
|
+
asyncInfo$jscomp$1.debugTask ||
|
|
4087
|
+
asyncInfo$jscomp$1.awaited.debugTask;
|
|
4088
|
+
if (debugTask$jscomp$2) {
|
|
4089
|
+
var tooltipText$jscomp$0 =
|
|
4090
|
+
getIOLongName(
|
|
4091
|
+
asyncInfo$jscomp$1.awaited,
|
|
4092
|
+
"",
|
|
4093
|
+
asyncInfo$jscomp$1.env,
|
|
4094
|
+
rootEnv$jscomp$0
|
|
4095
|
+
) + " Aborted";
|
|
4096
|
+
debugTask$jscomp$2.run(
|
|
4097
|
+
performance.measure.bind(
|
|
4098
|
+
performance,
|
|
4099
|
+
entryName$jscomp$4,
|
|
4100
|
+
{
|
|
4101
|
+
start:
|
|
4102
|
+
0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6,
|
|
4103
|
+
end: endTime$jscomp$1,
|
|
4104
|
+
detail: {
|
|
4105
|
+
devtools: {
|
|
4106
|
+
color: "warning",
|
|
4107
|
+
track: trackNames[trackIdx$jscomp$5],
|
|
4108
|
+
trackGroup: "Server Components \u269b",
|
|
4109
|
+
properties: [
|
|
4110
|
+
[
|
|
4111
|
+
"Aborted",
|
|
4112
|
+
"The stream was aborted before this Promise resolved."
|
|
4113
|
+
]
|
|
4114
|
+
],
|
|
4115
|
+
tooltipText: tooltipText$jscomp$0
|
|
4116
|
+
}
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
)
|
|
4120
|
+
);
|
|
4121
|
+
} else
|
|
4122
|
+
console.timeStamp(
|
|
4123
|
+
entryName$jscomp$4,
|
|
4124
|
+
0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6,
|
|
4125
|
+
endTime$jscomp$1,
|
|
4126
|
+
trackNames[trackIdx$jscomp$5],
|
|
4127
|
+
"Server Components \u269b",
|
|
4128
|
+
"warning"
|
|
4129
|
+
);
|
|
4130
|
+
}
|
|
4131
|
+
}
|
|
4132
|
+
}
|
|
4133
|
+
}
|
|
4134
|
+
endTime = time;
|
|
4135
|
+
endTimeIdx = _i6;
|
|
4136
|
+
}
|
|
4137
|
+
}
|
|
4138
|
+
result.endTime = childrenEndTime;
|
|
4139
|
+
return result;
|
|
4140
|
+
}
|
|
4141
|
+
function flushInitialRenderPerformance(response) {
|
|
4142
|
+
if (response._replayConsole) {
|
|
4143
|
+
var rootChunk = getChunk(response, 0);
|
|
4144
|
+
isArrayImpl(rootChunk._children) &&
|
|
4145
|
+
(markAllTracksInOrder(),
|
|
4146
|
+
flushComponentPerformance(
|
|
4147
|
+
response,
|
|
4148
|
+
rootChunk,
|
|
4149
|
+
0,
|
|
4150
|
+
-Infinity,
|
|
4151
|
+
-Infinity
|
|
4152
|
+
));
|
|
4153
|
+
}
|
|
4154
|
+
}
|
|
4155
|
+
function processFullBinaryRow(
|
|
4156
|
+
response,
|
|
4157
|
+
streamState,
|
|
4158
|
+
id,
|
|
4159
|
+
tag,
|
|
4160
|
+
buffer,
|
|
4161
|
+
chunk
|
|
4162
|
+
) {
|
|
4163
|
+
switch (tag) {
|
|
4164
|
+
case 65:
|
|
4165
|
+
resolveBuffer(
|
|
4166
|
+
response,
|
|
4167
|
+
id,
|
|
4168
|
+
mergeBuffer(buffer, chunk).buffer,
|
|
4169
|
+
streamState
|
|
4170
|
+
);
|
|
4171
|
+
return;
|
|
4172
|
+
case 79:
|
|
4173
|
+
resolveTypedArray(
|
|
4174
|
+
response,
|
|
4175
|
+
id,
|
|
4176
|
+
buffer,
|
|
4177
|
+
chunk,
|
|
4178
|
+
Int8Array,
|
|
4179
|
+
1,
|
|
4180
|
+
streamState
|
|
4181
|
+
);
|
|
4182
|
+
return;
|
|
4183
|
+
case 111:
|
|
4184
|
+
resolveBuffer(
|
|
4185
|
+
response,
|
|
4186
|
+
id,
|
|
4187
|
+
0 === buffer.length ? chunk : mergeBuffer(buffer, chunk),
|
|
4188
|
+
streamState
|
|
4189
|
+
);
|
|
4190
|
+
return;
|
|
4191
|
+
case 85:
|
|
4192
|
+
resolveTypedArray(
|
|
4193
|
+
response,
|
|
4194
|
+
id,
|
|
4195
|
+
buffer,
|
|
4196
|
+
chunk,
|
|
4197
|
+
Uint8ClampedArray,
|
|
4198
|
+
1,
|
|
4199
|
+
streamState
|
|
4200
|
+
);
|
|
4201
|
+
return;
|
|
4202
|
+
case 83:
|
|
4203
|
+
resolveTypedArray(
|
|
4204
|
+
response,
|
|
4205
|
+
id,
|
|
4206
|
+
buffer,
|
|
4207
|
+
chunk,
|
|
4208
|
+
Int16Array,
|
|
4209
|
+
2,
|
|
4210
|
+
streamState
|
|
4211
|
+
);
|
|
4212
|
+
return;
|
|
4213
|
+
case 115:
|
|
4214
|
+
resolveTypedArray(
|
|
4215
|
+
response,
|
|
4216
|
+
id,
|
|
4217
|
+
buffer,
|
|
4218
|
+
chunk,
|
|
4219
|
+
Uint16Array,
|
|
4220
|
+
2,
|
|
4221
|
+
streamState
|
|
4222
|
+
);
|
|
4223
|
+
return;
|
|
4224
|
+
case 76:
|
|
4225
|
+
resolveTypedArray(
|
|
4226
|
+
response,
|
|
4227
|
+
id,
|
|
4228
|
+
buffer,
|
|
4229
|
+
chunk,
|
|
4230
|
+
Int32Array,
|
|
4231
|
+
4,
|
|
4232
|
+
streamState
|
|
4233
|
+
);
|
|
4234
|
+
return;
|
|
4235
|
+
case 108:
|
|
4236
|
+
resolveTypedArray(
|
|
4237
|
+
response,
|
|
4238
|
+
id,
|
|
4239
|
+
buffer,
|
|
4240
|
+
chunk,
|
|
4241
|
+
Uint32Array,
|
|
4242
|
+
4,
|
|
4243
|
+
streamState
|
|
4244
|
+
);
|
|
4245
|
+
return;
|
|
4246
|
+
case 71:
|
|
4247
|
+
resolveTypedArray(
|
|
4248
|
+
response,
|
|
4249
|
+
id,
|
|
4250
|
+
buffer,
|
|
4251
|
+
chunk,
|
|
4252
|
+
Float32Array,
|
|
4253
|
+
4,
|
|
4254
|
+
streamState
|
|
4255
|
+
);
|
|
4256
|
+
return;
|
|
4257
|
+
case 103:
|
|
4258
|
+
resolveTypedArray(
|
|
4259
|
+
response,
|
|
4260
|
+
id,
|
|
4261
|
+
buffer,
|
|
4262
|
+
chunk,
|
|
4263
|
+
Float64Array,
|
|
4264
|
+
8,
|
|
4265
|
+
streamState
|
|
4266
|
+
);
|
|
4267
|
+
return;
|
|
4268
|
+
case 77:
|
|
4269
|
+
resolveTypedArray(
|
|
4270
|
+
response,
|
|
4271
|
+
id,
|
|
4272
|
+
buffer,
|
|
4273
|
+
chunk,
|
|
4274
|
+
BigInt64Array,
|
|
4275
|
+
8,
|
|
4276
|
+
streamState
|
|
4277
|
+
);
|
|
4278
|
+
return;
|
|
4279
|
+
case 109:
|
|
4280
|
+
resolveTypedArray(
|
|
4281
|
+
response,
|
|
4282
|
+
id,
|
|
4283
|
+
buffer,
|
|
4284
|
+
chunk,
|
|
4285
|
+
BigUint64Array,
|
|
4286
|
+
8,
|
|
4287
|
+
streamState
|
|
4288
|
+
);
|
|
4289
|
+
return;
|
|
4290
|
+
case 86:
|
|
4291
|
+
resolveTypedArray(
|
|
4292
|
+
response,
|
|
4293
|
+
id,
|
|
4294
|
+
buffer,
|
|
4295
|
+
chunk,
|
|
4296
|
+
DataView,
|
|
4297
|
+
1,
|
|
4298
|
+
streamState
|
|
4299
|
+
);
|
|
4300
|
+
return;
|
|
4301
|
+
}
|
|
4302
|
+
for (
|
|
4303
|
+
var stringDecoder = response._stringDecoder, row = "", i = 0;
|
|
4304
|
+
i < buffer.length;
|
|
4305
|
+
i++
|
|
4306
|
+
)
|
|
4307
|
+
row += stringDecoder.decode(buffer[i], decoderOptions);
|
|
4308
|
+
buffer = row += stringDecoder.decode(chunk);
|
|
4309
|
+
switch (tag) {
|
|
4310
|
+
case 73:
|
|
4311
|
+
resolveModule(response, id, buffer, streamState);
|
|
4312
|
+
break;
|
|
4313
|
+
case 72:
|
|
4314
|
+
id = buffer[0];
|
|
4315
|
+
streamState = buffer.slice(1);
|
|
4316
|
+
response = JSON.parse(streamState, response._fromJSON);
|
|
4317
|
+
streamState = ReactDOMSharedInternals.d;
|
|
4318
|
+
switch (id) {
|
|
4319
|
+
case "D":
|
|
4320
|
+
streamState.D(response);
|
|
4321
|
+
break;
|
|
4322
|
+
case "C":
|
|
4323
|
+
"string" === typeof response
|
|
4324
|
+
? streamState.C(response)
|
|
4325
|
+
: streamState.C(response[0], response[1]);
|
|
4326
|
+
break;
|
|
4327
|
+
case "L":
|
|
4328
|
+
id = response[0];
|
|
4329
|
+
buffer = response[1];
|
|
4330
|
+
3 === response.length
|
|
4331
|
+
? streamState.L(id, buffer, response[2])
|
|
4332
|
+
: streamState.L(id, buffer);
|
|
4333
|
+
break;
|
|
4334
|
+
case "m":
|
|
4335
|
+
"string" === typeof response
|
|
4336
|
+
? streamState.m(response)
|
|
4337
|
+
: streamState.m(response[0], response[1]);
|
|
4338
|
+
break;
|
|
4339
|
+
case "X":
|
|
4340
|
+
"string" === typeof response
|
|
4341
|
+
? streamState.X(response)
|
|
4342
|
+
: streamState.X(response[0], response[1]);
|
|
4343
|
+
break;
|
|
4344
|
+
case "S":
|
|
4345
|
+
"string" === typeof response
|
|
4346
|
+
? streamState.S(response)
|
|
4347
|
+
: streamState.S(
|
|
4348
|
+
response[0],
|
|
4349
|
+
0 === response[1] ? void 0 : response[1],
|
|
4350
|
+
3 === response.length ? response[2] : void 0
|
|
4351
|
+
);
|
|
4352
|
+
break;
|
|
4353
|
+
case "M":
|
|
4354
|
+
"string" === typeof response
|
|
4355
|
+
? streamState.M(response)
|
|
4356
|
+
: streamState.M(response[0], response[1]);
|
|
4357
|
+
}
|
|
4358
|
+
break;
|
|
4359
|
+
case 69:
|
|
4360
|
+
tag = response._chunks;
|
|
4361
|
+
chunk = tag.get(id);
|
|
4362
|
+
buffer = JSON.parse(buffer);
|
|
4363
|
+
stringDecoder = resolveErrorDev(response, buffer);
|
|
4364
|
+
stringDecoder.digest = buffer.digest;
|
|
4365
|
+
chunk
|
|
4366
|
+
? (resolveChunkDebugInfo(streamState, chunk),
|
|
4367
|
+
triggerErrorOnChunk(response, chunk, stringDecoder))
|
|
4368
|
+
: ((response = new ReactPromise("rejected", null, stringDecoder)),
|
|
4369
|
+
resolveChunkDebugInfo(streamState, response),
|
|
4370
|
+
tag.set(id, response));
|
|
4371
|
+
break;
|
|
4372
|
+
case 84:
|
|
4373
|
+
tag = response._chunks;
|
|
4374
|
+
(chunk = tag.get(id)) && "pending" !== chunk.status
|
|
4375
|
+
? chunk.reason.enqueueValue(buffer)
|
|
4376
|
+
: (chunk && releasePendingChunk(response, chunk),
|
|
4377
|
+
(response = new ReactPromise("fulfilled", buffer, null)),
|
|
4378
|
+
resolveChunkDebugInfo(streamState, response),
|
|
4379
|
+
tag.set(id, response));
|
|
4380
|
+
break;
|
|
4381
|
+
case 78:
|
|
4382
|
+
response._timeOrigin = +buffer - performance.timeOrigin;
|
|
4383
|
+
break;
|
|
4384
|
+
case 68:
|
|
4385
|
+
id = getChunk(response, id);
|
|
4386
|
+
"fulfilled" !== id.status &&
|
|
4387
|
+
"rejected" !== id.status &&
|
|
4388
|
+
"halted" !== id.status &&
|
|
4389
|
+
"blocked" !== id.status &&
|
|
4390
|
+
"resolved_module" !== id.status &&
|
|
4391
|
+
((streamState = id._debugChunk),
|
|
4392
|
+
(tag = createResolvedModelChunk(response, buffer)),
|
|
4393
|
+
(tag._debugChunk = streamState),
|
|
4394
|
+
(id._debugChunk = tag),
|
|
4395
|
+
initializeDebugChunk(response, id),
|
|
4396
|
+
"blocked" !== tag.status ||
|
|
4397
|
+
(void 0 !== response._debugChannel &&
|
|
4398
|
+
response._debugChannel.hasReadable) ||
|
|
4399
|
+
'"' !== buffer[0] ||
|
|
4400
|
+
"$" !== buffer[1] ||
|
|
4401
|
+
((streamState = buffer.slice(2, buffer.length - 1).split(":")),
|
|
4402
|
+
(streamState = parseInt(streamState[0], 16)),
|
|
4403
|
+
"pending" === getChunk(response, streamState).status &&
|
|
4404
|
+
(id._debugChunk = null)));
|
|
4405
|
+
break;
|
|
4406
|
+
case 74:
|
|
4407
|
+
resolveIOInfo(response, id, buffer);
|
|
4408
|
+
break;
|
|
4409
|
+
case 87:
|
|
4410
|
+
resolveConsoleEntry(response, buffer);
|
|
4411
|
+
break;
|
|
4412
|
+
case 82:
|
|
4413
|
+
startReadableStream(response, id, void 0, streamState);
|
|
4414
|
+
break;
|
|
4415
|
+
case 114:
|
|
4416
|
+
startReadableStream(response, id, "bytes", streamState);
|
|
4417
|
+
break;
|
|
4418
|
+
case 88:
|
|
4419
|
+
startAsyncIterable(response, id, !1, streamState);
|
|
4420
|
+
break;
|
|
4421
|
+
case 120:
|
|
4422
|
+
startAsyncIterable(response, id, !0, streamState);
|
|
4423
|
+
break;
|
|
4424
|
+
case 67:
|
|
4425
|
+
(response = response._chunks.get(id)) &&
|
|
4426
|
+
"fulfilled" === response.status &&
|
|
4427
|
+
response.reason.close("" === buffer ? '"$undefined"' : buffer);
|
|
4428
|
+
break;
|
|
4429
|
+
default:
|
|
4430
|
+
if ("" === buffer) {
|
|
4431
|
+
if (
|
|
4432
|
+
((streamState = response._chunks),
|
|
4433
|
+
(buffer = streamState.get(id)) ||
|
|
4434
|
+
streamState.set(id, (buffer = createPendingChunk(response))),
|
|
4435
|
+
"pending" === buffer.status || "blocked" === buffer.status)
|
|
4436
|
+
)
|
|
4437
|
+
releasePendingChunk(response, buffer),
|
|
4438
|
+
(response = buffer),
|
|
4439
|
+
(response.status = "halted"),
|
|
4440
|
+
(response.value = null),
|
|
4441
|
+
(response.reason = null);
|
|
4442
|
+
} else
|
|
4443
|
+
(tag = response._chunks),
|
|
4444
|
+
(chunk = tag.get(id))
|
|
4445
|
+
? (resolveChunkDebugInfo(streamState, chunk),
|
|
4446
|
+
resolveModelChunk(response, chunk, buffer))
|
|
4447
|
+
: ((response = createResolvedModelChunk(response, buffer)),
|
|
4448
|
+
resolveChunkDebugInfo(streamState, response),
|
|
4449
|
+
tag.set(id, response));
|
|
4450
|
+
}
|
|
4451
|
+
}
|
|
4452
|
+
function createFromJSONCallback(response) {
|
|
4453
|
+
return function (key, value) {
|
|
4454
|
+
if ("string" === typeof value)
|
|
4455
|
+
return parseModelString(response, this, key, value);
|
|
4456
|
+
if ("object" === typeof value && null !== value) {
|
|
4457
|
+
if (value[0] === REACT_ELEMENT_TYPE)
|
|
4458
|
+
b: {
|
|
4459
|
+
var owner = value[4],
|
|
4460
|
+
stack = value[5];
|
|
4461
|
+
key = value[6];
|
|
4462
|
+
value = {
|
|
4463
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
4464
|
+
type: value[1],
|
|
4465
|
+
key: value[2],
|
|
4466
|
+
props: value[3],
|
|
4467
|
+
_owner: void 0 === owner ? null : owner
|
|
4468
|
+
};
|
|
4469
|
+
Object.defineProperty(value, "ref", {
|
|
4470
|
+
enumerable: !1,
|
|
4471
|
+
get: nullRefGetter
|
|
4472
|
+
});
|
|
4473
|
+
value._store = {};
|
|
4474
|
+
Object.defineProperty(value._store, "validated", {
|
|
4475
|
+
configurable: !1,
|
|
4476
|
+
enumerable: !1,
|
|
4477
|
+
writable: !0,
|
|
4478
|
+
value: key
|
|
4479
|
+
});
|
|
4480
|
+
Object.defineProperty(value, "_debugInfo", {
|
|
4481
|
+
configurable: !1,
|
|
4482
|
+
enumerable: !1,
|
|
4483
|
+
writable: !0,
|
|
4484
|
+
value: null
|
|
4485
|
+
});
|
|
4486
|
+
Object.defineProperty(value, "_debugStack", {
|
|
4487
|
+
configurable: !1,
|
|
4488
|
+
enumerable: !1,
|
|
4489
|
+
writable: !0,
|
|
4490
|
+
value: void 0 === stack ? null : stack
|
|
4491
|
+
});
|
|
4492
|
+
Object.defineProperty(value, "_debugTask", {
|
|
4493
|
+
configurable: !1,
|
|
4494
|
+
enumerable: !1,
|
|
4495
|
+
writable: !0,
|
|
4496
|
+
value: null
|
|
4497
|
+
});
|
|
4498
|
+
if (null !== initializingHandler) {
|
|
4499
|
+
owner = initializingHandler;
|
|
4500
|
+
initializingHandler = owner.parent;
|
|
4501
|
+
if (owner.errored) {
|
|
4502
|
+
stack = new ReactPromise("rejected", null, owner.reason);
|
|
4503
|
+
initializeElement(response, value, null);
|
|
4504
|
+
owner = {
|
|
4505
|
+
name: getComponentNameFromType(value.type) || "",
|
|
4506
|
+
owner: value._owner
|
|
4507
|
+
};
|
|
4508
|
+
owner.debugStack = value._debugStack;
|
|
4509
|
+
supportsCreateTask && (owner.debugTask = value._debugTask);
|
|
4510
|
+
stack._debugInfo = [owner];
|
|
4511
|
+
key = createLazyChunkWrapper(stack, key);
|
|
4512
|
+
break b;
|
|
4513
|
+
}
|
|
4514
|
+
if (0 < owner.deps) {
|
|
4515
|
+
stack = new ReactPromise("blocked", null, null);
|
|
4516
|
+
owner.value = value;
|
|
4517
|
+
owner.chunk = stack;
|
|
4518
|
+
key = createLazyChunkWrapper(stack, key);
|
|
4519
|
+
value = initializeElement.bind(null, response, value, key);
|
|
4520
|
+
stack.then(value, value);
|
|
4521
|
+
break b;
|
|
4522
|
+
}
|
|
4523
|
+
}
|
|
4524
|
+
initializeElement(response, value, null);
|
|
4525
|
+
key = value;
|
|
4526
|
+
}
|
|
4527
|
+
else key = value;
|
|
4528
|
+
return key;
|
|
4529
|
+
}
|
|
4530
|
+
return value;
|
|
4531
|
+
};
|
|
4532
|
+
}
|
|
4533
|
+
function close(weakResponse) {
|
|
4534
|
+
reportGlobalError(weakResponse, Error("Connection closed."));
|
|
4535
|
+
}
|
|
4536
|
+
function noServerCall() {
|
|
4537
|
+
throw Error(
|
|
4538
|
+
"Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead."
|
|
4539
|
+
);
|
|
4540
|
+
}
|
|
4541
|
+
function createResponseFromOptions(options) {
|
|
4542
|
+
return new ResponseInstance(
|
|
4543
|
+
options.serverConsumerManifest.moduleMap,
|
|
4544
|
+
options.serverConsumerManifest.serverModuleMap,
|
|
4545
|
+
options.serverConsumerManifest.moduleLoading,
|
|
4546
|
+
noServerCall,
|
|
4547
|
+
options.encodeFormAction,
|
|
4548
|
+
"string" === typeof options.nonce ? options.nonce : void 0,
|
|
4549
|
+
options && options.temporaryReferences
|
|
4550
|
+
? options.temporaryReferences
|
|
4551
|
+
: void 0,
|
|
4552
|
+
options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
|
|
4553
|
+
options ? !0 === options.replayConsoleLogs : !1,
|
|
4554
|
+
options && options.environmentName ? options.environmentName : void 0,
|
|
4555
|
+
options && void 0 !== options.debugChannel
|
|
4556
|
+
? {
|
|
4557
|
+
hasReadable: void 0 !== options.debugChannel.readable,
|
|
4558
|
+
callback: null
|
|
4559
|
+
}
|
|
4560
|
+
: void 0
|
|
4561
|
+
)._weakResponse;
|
|
4562
|
+
}
|
|
4563
|
+
function startReadingFromStream(
|
|
4564
|
+
response$jscomp$0,
|
|
4565
|
+
stream,
|
|
4566
|
+
onDone,
|
|
4567
|
+
debugValue
|
|
4568
|
+
) {
|
|
4569
|
+
function progress(_ref) {
|
|
4570
|
+
var value = _ref.value;
|
|
4571
|
+
if (_ref.done) return onDone();
|
|
4572
|
+
_ref = streamState;
|
|
4573
|
+
if (void 0 !== response$jscomp$0.weak.deref()) {
|
|
4574
|
+
var response = unwrapWeakResponse(response$jscomp$0),
|
|
4575
|
+
i = 0,
|
|
4576
|
+
rowState = _ref._rowState,
|
|
4577
|
+
rowID = _ref._rowID,
|
|
4578
|
+
rowTag = _ref._rowTag,
|
|
4579
|
+
rowLength = _ref._rowLength,
|
|
4580
|
+
buffer = _ref._buffer,
|
|
4581
|
+
chunkLength = value.length,
|
|
4582
|
+
debugInfo = _ref._debugInfo,
|
|
4583
|
+
endTime = performance.now(),
|
|
4584
|
+
previousEndTime = debugInfo.end,
|
|
4585
|
+
newByteLength = debugInfo.byteSize + chunkLength;
|
|
4586
|
+
newByteLength > _ref._debugTargetChunkSize ||
|
|
4587
|
+
endTime > previousEndTime + 10
|
|
4588
|
+
? ((_ref._debugInfo = {
|
|
4589
|
+
name: debugInfo.name,
|
|
4590
|
+
start: debugInfo.start,
|
|
4591
|
+
end: endTime,
|
|
4592
|
+
byteSize: newByteLength,
|
|
4593
|
+
value: debugInfo.value,
|
|
4594
|
+
owner: debugInfo.owner,
|
|
4595
|
+
debugStack: debugInfo.debugStack,
|
|
4596
|
+
debugTask: debugInfo.debugTask
|
|
4597
|
+
}),
|
|
4598
|
+
(_ref._debugTargetChunkSize = newByteLength + MIN_CHUNK_SIZE))
|
|
4599
|
+
: ((debugInfo.end = endTime), (debugInfo.byteSize = newByteLength));
|
|
4600
|
+
for (; i < chunkLength; ) {
|
|
4601
|
+
debugInfo = -1;
|
|
4602
|
+
switch (rowState) {
|
|
4603
|
+
case 0:
|
|
4604
|
+
debugInfo = value[i++];
|
|
4605
|
+
58 === debugInfo
|
|
4606
|
+
? (rowState = 1)
|
|
4607
|
+
: (rowID =
|
|
4608
|
+
(rowID << 4) |
|
|
4609
|
+
(96 < debugInfo ? debugInfo - 87 : debugInfo - 48));
|
|
4610
|
+
continue;
|
|
4611
|
+
case 1:
|
|
4612
|
+
rowState = value[i];
|
|
4613
|
+
84 === rowState ||
|
|
4614
|
+
65 === rowState ||
|
|
4615
|
+
79 === rowState ||
|
|
4616
|
+
111 === rowState ||
|
|
4617
|
+
85 === rowState ||
|
|
4618
|
+
83 === rowState ||
|
|
4619
|
+
115 === rowState ||
|
|
4620
|
+
76 === rowState ||
|
|
4621
|
+
108 === rowState ||
|
|
4622
|
+
71 === rowState ||
|
|
4623
|
+
103 === rowState ||
|
|
4624
|
+
77 === rowState ||
|
|
4625
|
+
109 === rowState ||
|
|
4626
|
+
86 === rowState
|
|
4627
|
+
? ((rowTag = rowState), (rowState = 2), i++)
|
|
4628
|
+
: (64 < rowState && 91 > rowState) ||
|
|
4629
|
+
35 === rowState ||
|
|
4630
|
+
114 === rowState ||
|
|
4631
|
+
120 === rowState
|
|
4632
|
+
? ((rowTag = rowState), (rowState = 3), i++)
|
|
4633
|
+
: ((rowTag = 0), (rowState = 3));
|
|
4634
|
+
continue;
|
|
4635
|
+
case 2:
|
|
4636
|
+
debugInfo = value[i++];
|
|
4637
|
+
44 === debugInfo
|
|
4638
|
+
? (rowState = 4)
|
|
4639
|
+
: (rowLength =
|
|
4640
|
+
(rowLength << 4) |
|
|
4641
|
+
(96 < debugInfo ? debugInfo - 87 : debugInfo - 48));
|
|
4642
|
+
continue;
|
|
4643
|
+
case 3:
|
|
4644
|
+
debugInfo = value.indexOf(10, i);
|
|
4645
|
+
break;
|
|
4646
|
+
case 4:
|
|
4647
|
+
(debugInfo = i + rowLength),
|
|
4648
|
+
debugInfo > value.length && (debugInfo = -1);
|
|
4649
|
+
}
|
|
4650
|
+
endTime = value.byteOffset + i;
|
|
4651
|
+
if (-1 < debugInfo)
|
|
4652
|
+
(rowLength = new Uint8Array(
|
|
4653
|
+
value.buffer,
|
|
4654
|
+
endTime,
|
|
4655
|
+
debugInfo - i
|
|
4656
|
+
)),
|
|
4657
|
+
processFullBinaryRow(
|
|
4658
|
+
response,
|
|
4659
|
+
_ref,
|
|
4660
|
+
rowID,
|
|
4661
|
+
rowTag,
|
|
4662
|
+
buffer,
|
|
4663
|
+
rowLength
|
|
4664
|
+
),
|
|
4665
|
+
(i = debugInfo),
|
|
4666
|
+
3 === rowState && i++,
|
|
4667
|
+
(rowLength = rowID = rowTag = rowState = 0),
|
|
4668
|
+
(buffer.length = 0);
|
|
4669
|
+
else {
|
|
4670
|
+
value = new Uint8Array(
|
|
4671
|
+
value.buffer,
|
|
4672
|
+
endTime,
|
|
4673
|
+
value.byteLength - i
|
|
4674
|
+
);
|
|
4675
|
+
buffer.push(value);
|
|
4676
|
+
rowLength -= value.byteLength;
|
|
4677
|
+
break;
|
|
4678
|
+
}
|
|
4679
|
+
}
|
|
4680
|
+
_ref._rowState = rowState;
|
|
4681
|
+
_ref._rowID = rowID;
|
|
4682
|
+
_ref._rowTag = rowTag;
|
|
4683
|
+
_ref._rowLength = rowLength;
|
|
4684
|
+
}
|
|
4685
|
+
return reader.read().then(progress).catch(error);
|
|
4686
|
+
}
|
|
4687
|
+
function error(e) {
|
|
4688
|
+
reportGlobalError(response$jscomp$0, e);
|
|
4689
|
+
}
|
|
4690
|
+
var streamState = createStreamState(response$jscomp$0, debugValue),
|
|
4691
|
+
reader = stream.getReader();
|
|
4692
|
+
reader.read().then(progress).catch(error);
|
|
4693
|
+
}
|
|
4694
|
+
var ReactDOM = require("react-dom"),
|
|
4695
|
+
React = require("react"),
|
|
4696
|
+
decoderOptions = { stream: !0 },
|
|
4697
|
+
bind$1 = Function.prototype.bind,
|
|
4698
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4699
|
+
ReactDOMSharedInternals =
|
|
4700
|
+
ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
4701
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
4702
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
4703
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
4704
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
4705
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
4706
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
4707
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
4708
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
4709
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
4710
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
4711
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
4712
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
4713
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
4714
|
+
MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
4715
|
+
ASYNC_ITERATOR = Symbol.asyncIterator,
|
|
4716
|
+
isArrayImpl = Array.isArray,
|
|
4717
|
+
getPrototypeOf = Object.getPrototypeOf,
|
|
4718
|
+
jsxPropsParents = new WeakMap(),
|
|
4719
|
+
jsxChildrenParents = new WeakMap(),
|
|
4720
|
+
CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
|
|
4721
|
+
ObjectPrototype = Object.prototype,
|
|
4722
|
+
knownServerReferences = new WeakMap(),
|
|
4723
|
+
boundCache = new WeakMap(),
|
|
4724
|
+
fakeServerFunctionIdx = 0,
|
|
4725
|
+
FunctionBind = Function.prototype.bind,
|
|
4726
|
+
ArraySlice = Array.prototype.slice,
|
|
4727
|
+
v8FrameRegExp =
|
|
4728
|
+
/^ {3} at (?:(.+) \((.+):(\d+):(\d+)\)|(?:async )?(.+):(\d+):(\d+))$/,
|
|
4729
|
+
jscSpiderMonkeyFrameRegExp = /(?:(.*)@)?(.*):(\d+):(\d+)/,
|
|
4730
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
4731
|
+
supportsUserTiming =
|
|
4732
|
+
"undefined" !== typeof console &&
|
|
4733
|
+
"function" === typeof console.timeStamp &&
|
|
4734
|
+
"undefined" !== typeof performance &&
|
|
4735
|
+
"function" === typeof performance.measure,
|
|
4736
|
+
trackNames =
|
|
4737
|
+
"Primary Parallel Parallel\u200b Parallel\u200b\u200b Parallel\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b".split(
|
|
4738
|
+
" "
|
|
4739
|
+
),
|
|
4740
|
+
prefix,
|
|
4741
|
+
suffix;
|
|
4742
|
+
new ("function" === typeof WeakMap ? WeakMap : Map)();
|
|
4743
|
+
var ReactSharedInteralsServer =
|
|
4744
|
+
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
4745
|
+
ReactSharedInternals =
|
|
4746
|
+
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE ||
|
|
4747
|
+
ReactSharedInteralsServer;
|
|
4748
|
+
ReactPromise.prototype = Object.create(Promise.prototype);
|
|
4749
|
+
ReactPromise.prototype.then = function (resolve, reject) {
|
|
4750
|
+
var _this = this;
|
|
4751
|
+
switch (this.status) {
|
|
4752
|
+
case "resolved_model":
|
|
4753
|
+
initializeModelChunk(this);
|
|
4754
|
+
break;
|
|
4755
|
+
case "resolved_module":
|
|
4756
|
+
initializeModuleChunk(this);
|
|
4757
|
+
}
|
|
4758
|
+
var resolveCallback = resolve,
|
|
4759
|
+
rejectCallback = reject,
|
|
4760
|
+
wrapperPromise = new Promise(function (res, rej) {
|
|
4761
|
+
resolve = function (value) {
|
|
4762
|
+
wrapperPromise._debugInfo = _this._debugInfo;
|
|
4763
|
+
res(value);
|
|
4764
|
+
};
|
|
4765
|
+
reject = function (reason) {
|
|
4766
|
+
wrapperPromise._debugInfo = _this._debugInfo;
|
|
4767
|
+
rej(reason);
|
|
4768
|
+
};
|
|
4769
|
+
});
|
|
4770
|
+
wrapperPromise.then(resolveCallback, rejectCallback);
|
|
4771
|
+
switch (this.status) {
|
|
4772
|
+
case "fulfilled":
|
|
4773
|
+
"function" === typeof resolve && resolve(this.value);
|
|
4774
|
+
break;
|
|
4775
|
+
case "pending":
|
|
4776
|
+
case "blocked":
|
|
4777
|
+
"function" === typeof resolve &&
|
|
4778
|
+
(null === this.value && (this.value = []),
|
|
4779
|
+
this.value.push(resolve));
|
|
4780
|
+
"function" === typeof reject &&
|
|
4781
|
+
(null === this.reason && (this.reason = []),
|
|
4782
|
+
this.reason.push(reject));
|
|
4783
|
+
break;
|
|
4784
|
+
case "halted":
|
|
4785
|
+
break;
|
|
4786
|
+
default:
|
|
4787
|
+
"function" === typeof reject && reject(this.reason);
|
|
4788
|
+
}
|
|
4789
|
+
};
|
|
4790
|
+
var debugChannelRegistry =
|
|
4791
|
+
"function" === typeof FinalizationRegistry
|
|
4792
|
+
? new FinalizationRegistry(closeDebugChannel)
|
|
4793
|
+
: null,
|
|
4794
|
+
initializingHandler = null,
|
|
4795
|
+
initializingChunk = null,
|
|
4796
|
+
mightHaveStaticConstructor = /\bclass\b.*\bstatic\b/,
|
|
4797
|
+
MIN_CHUNK_SIZE = 65536,
|
|
4798
|
+
supportsCreateTask = !!console.createTask,
|
|
4799
|
+
fakeFunctionCache = new Map(),
|
|
4800
|
+
fakeFunctionIdx = 0,
|
|
4801
|
+
createFakeJSXCallStack = {
|
|
4802
|
+
react_stack_bottom_frame: function (response, stack, environmentName) {
|
|
4803
|
+
return buildFakeCallStack(
|
|
4804
|
+
response,
|
|
4805
|
+
stack,
|
|
4806
|
+
environmentName,
|
|
4807
|
+
!1,
|
|
4808
|
+
fakeJSXCallSite
|
|
4809
|
+
)();
|
|
4810
|
+
}
|
|
4811
|
+
},
|
|
4812
|
+
createFakeJSXCallStackInDEV =
|
|
4813
|
+
createFakeJSXCallStack.react_stack_bottom_frame.bind(
|
|
4814
|
+
createFakeJSXCallStack
|
|
4815
|
+
),
|
|
4816
|
+
currentOwnerInDEV = null,
|
|
4817
|
+
replayConsoleWithCallStack = {
|
|
4818
|
+
react_stack_bottom_frame: function (response, payload) {
|
|
4819
|
+
var methodName = payload[0],
|
|
4820
|
+
stackTrace = payload[1],
|
|
4821
|
+
owner = payload[2],
|
|
4822
|
+
env = payload[3];
|
|
4823
|
+
payload = payload.slice(4);
|
|
4824
|
+
var prevStack = ReactSharedInternals.getCurrentStack;
|
|
4825
|
+
ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
|
|
4826
|
+
currentOwnerInDEV = null === owner ? response._debugRootOwner : owner;
|
|
4827
|
+
try {
|
|
4828
|
+
a: {
|
|
4829
|
+
var offset = 0;
|
|
4830
|
+
switch (methodName) {
|
|
4831
|
+
case "dir":
|
|
4832
|
+
case "dirxml":
|
|
4833
|
+
case "groupEnd":
|
|
4834
|
+
case "table":
|
|
4835
|
+
var JSCompiler_inline_result = bind$1.apply(
|
|
4836
|
+
console[methodName],
|
|
4837
|
+
[console].concat(payload)
|
|
4838
|
+
);
|
|
4839
|
+
break a;
|
|
4840
|
+
case "assert":
|
|
4841
|
+
offset = 1;
|
|
4842
|
+
}
|
|
4843
|
+
var newArgs = payload.slice(0);
|
|
4844
|
+
"string" === typeof newArgs[offset]
|
|
4845
|
+
? newArgs.splice(
|
|
4846
|
+
offset,
|
|
4847
|
+
1,
|
|
4848
|
+
"\u001b[0m\u001b[7m%c%s\u001b[0m%c " + newArgs[offset],
|
|
4849
|
+
"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
|
|
4850
|
+
" " + env + " ",
|
|
4851
|
+
""
|
|
4852
|
+
)
|
|
4853
|
+
: newArgs.splice(
|
|
4854
|
+
offset,
|
|
4855
|
+
0,
|
|
4856
|
+
"\u001b[0m\u001b[7m%c%s\u001b[0m%c",
|
|
4857
|
+
"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
|
|
4858
|
+
" " + env + " ",
|
|
4859
|
+
""
|
|
4860
|
+
);
|
|
4861
|
+
newArgs.unshift(console);
|
|
4862
|
+
JSCompiler_inline_result = bind$1.apply(
|
|
4863
|
+
console[methodName],
|
|
4864
|
+
newArgs
|
|
4865
|
+
);
|
|
4866
|
+
}
|
|
4867
|
+
var callStack = buildFakeCallStack(
|
|
4868
|
+
response,
|
|
4869
|
+
stackTrace,
|
|
4870
|
+
env,
|
|
4871
|
+
!1,
|
|
4872
|
+
JSCompiler_inline_result
|
|
4873
|
+
);
|
|
4874
|
+
if (null != owner) {
|
|
4875
|
+
var task = initializeFakeTask(response, owner);
|
|
4876
|
+
initializeFakeStack(response, owner);
|
|
4877
|
+
if (null !== task) {
|
|
4878
|
+
task.run(callStack);
|
|
4879
|
+
return;
|
|
4880
|
+
}
|
|
4881
|
+
}
|
|
4882
|
+
var rootTask = getRootTask(response, env);
|
|
4883
|
+
null != rootTask ? rootTask.run(callStack) : callStack();
|
|
4884
|
+
} finally {
|
|
4885
|
+
(currentOwnerInDEV = null),
|
|
4886
|
+
(ReactSharedInternals.getCurrentStack = prevStack);
|
|
4887
|
+
}
|
|
4888
|
+
}
|
|
4889
|
+
},
|
|
4890
|
+
replayConsoleWithCallStackInDEV =
|
|
4891
|
+
replayConsoleWithCallStack.react_stack_bottom_frame.bind(
|
|
4892
|
+
replayConsoleWithCallStack
|
|
4893
|
+
);
|
|
4894
|
+
exports.createFromFetch = function (promiseForResponse, options) {
|
|
4895
|
+
var response = createResponseFromOptions(options);
|
|
4896
|
+
promiseForResponse.then(
|
|
4897
|
+
function (r) {
|
|
4898
|
+
if (
|
|
4899
|
+
options &&
|
|
4900
|
+
options.debugChannel &&
|
|
4901
|
+
options.debugChannel.readable
|
|
4902
|
+
) {
|
|
4903
|
+
var streamDoneCount = 0,
|
|
4904
|
+
handleDone = function () {
|
|
4905
|
+
2 === ++streamDoneCount && close(response);
|
|
4906
|
+
};
|
|
4907
|
+
startReadingFromStream(
|
|
4908
|
+
response,
|
|
4909
|
+
options.debugChannel.readable,
|
|
4910
|
+
handleDone
|
|
4911
|
+
);
|
|
4912
|
+
startReadingFromStream(response, r.body, handleDone, r);
|
|
4913
|
+
} else
|
|
4914
|
+
startReadingFromStream(
|
|
4915
|
+
response,
|
|
4916
|
+
r.body,
|
|
4917
|
+
close.bind(null, response),
|
|
4918
|
+
r
|
|
4919
|
+
);
|
|
4920
|
+
},
|
|
4921
|
+
function (e) {
|
|
4922
|
+
reportGlobalError(response, e);
|
|
4923
|
+
}
|
|
4924
|
+
);
|
|
4925
|
+
return getRoot(response);
|
|
4926
|
+
};
|
|
4927
|
+
exports.createFromReadableStream = function (stream, options) {
|
|
4928
|
+
var response = createResponseFromOptions(options);
|
|
4929
|
+
if (options && options.debugChannel && options.debugChannel.readable) {
|
|
4930
|
+
var streamDoneCount = 0,
|
|
4931
|
+
handleDone = function () {
|
|
4932
|
+
2 === ++streamDoneCount && close(response);
|
|
4933
|
+
};
|
|
4934
|
+
startReadingFromStream(
|
|
4935
|
+
response,
|
|
4936
|
+
options.debugChannel.readable,
|
|
4937
|
+
handleDone
|
|
4938
|
+
);
|
|
4939
|
+
startReadingFromStream(response, stream, handleDone, stream);
|
|
4940
|
+
} else
|
|
4941
|
+
startReadingFromStream(
|
|
4942
|
+
response,
|
|
4943
|
+
stream,
|
|
4944
|
+
close.bind(null, response),
|
|
4945
|
+
stream
|
|
4946
|
+
);
|
|
4947
|
+
return getRoot(response);
|
|
4948
|
+
};
|
|
4949
|
+
exports.createServerReference = function (id) {
|
|
4950
|
+
return createServerReference$1(id, noServerCall);
|
|
4951
|
+
};
|
|
4952
|
+
exports.createTemporaryReferenceSet = function () {
|
|
4953
|
+
return new Map();
|
|
4954
|
+
};
|
|
4955
|
+
exports.encodeReply = function (value, options) {
|
|
4956
|
+
return new Promise(function (resolve, reject) {
|
|
4957
|
+
var abort = processReply(
|
|
4958
|
+
value,
|
|
4959
|
+
"",
|
|
4960
|
+
options && options.temporaryReferences
|
|
4961
|
+
? options.temporaryReferences
|
|
4962
|
+
: void 0,
|
|
4963
|
+
resolve,
|
|
4964
|
+
reject
|
|
4965
|
+
);
|
|
4966
|
+
if (options && options.signal) {
|
|
4967
|
+
var signal = options.signal;
|
|
4968
|
+
if (signal.aborted) abort(signal.reason);
|
|
4969
|
+
else {
|
|
4970
|
+
var listener = function () {
|
|
4971
|
+
abort(signal.reason);
|
|
4972
|
+
signal.removeEventListener("abort", listener);
|
|
4973
|
+
};
|
|
4974
|
+
signal.addEventListener("abort", listener);
|
|
4975
|
+
}
|
|
4976
|
+
}
|
|
4977
|
+
});
|
|
4978
|
+
};
|
|
4979
|
+
exports.registerServerReference = function (
|
|
4980
|
+
reference,
|
|
4981
|
+
id,
|
|
4982
|
+
encodeFormAction
|
|
4983
|
+
) {
|
|
4984
|
+
registerBoundServerReference(reference, id, null, encodeFormAction);
|
|
4985
|
+
return reference;
|
|
4986
|
+
};
|
|
4987
|
+
})();
|