@vitejs/plugin-rsc 0.4.34 → 0.5.0
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/{browser-CQv7Z3J4.d.ts → browser-STIFJSFF.d.ts} +1 -1
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +19 -1
- package/dist/{cjs-BamOAUgw.js → cjs-C5-IrxV9.js} +1 -1
- package/dist/core/browser.d.ts +1 -1
- package/dist/core/plugin.js +1 -1
- package/dist/core/rsc.d.ts +2 -2
- package/dist/core/rsc.js +1 -1
- package/dist/core/ssr.d.ts +2 -2
- package/dist/core/ssr.js +1 -1
- package/dist/{encryption-runtime-DT6dtlC5.js → encryption-runtime-FhNKiASK.js} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/{plugin-BLedJFh7.js → plugin-CrduXSyi.js} +6 -14
- package/dist/{plugin-DCLI7Wh8.d.ts → plugin-DGhnAIi6.d.ts} +1 -5
- package/dist/plugin.d.ts +2 -2
- package/dist/plugin.js +7 -7
- package/dist/plugins/cjs.js +2 -2
- package/dist/react/browser.d.ts +3 -3
- package/dist/react/rsc.d.ts +3 -3
- package/dist/react/rsc.js +2 -2
- package/dist/react/ssr.d.ts +3 -3
- package/dist/react/ssr.js +2 -2
- package/dist/{rsc-3bkzqdsJ.d.ts → rsc-Cg31p8XR.d.ts} +1 -1
- package/dist/{rsc-BdCB3621.js → rsc-DdBcg-Lb.js} +1 -1
- package/dist/rsc.d.ts +4 -4
- package/dist/rsc.js +22 -5
- package/dist/{ssr-CMjeQ9AS.d.ts → ssr-00tY_Tdf.d.ts} +1 -1
- package/dist/{ssr-Cd4SbAaO.js → ssr-CE8X2HyS.js} +1 -1
- package/dist/ssr.d.ts +3 -3
- package/dist/ssr.js +52 -4
- package/dist/transforms/index.d.ts +1 -1
- package/dist/transforms/index.js +1 -1
- package/dist/utils/encryption-runtime.d.ts +1 -1
- package/dist/utils/encryption-runtime.js +4 -4
- package/dist/utils/rpc.js +1 -1
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.development.js +2964 -774
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.production.js +554 -312
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.edge.development.js +2721 -724
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.edge.production.js +541 -300
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.development.js +2955 -858
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.production.js +652 -332
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2956 -861
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.unbundled.production.js +652 -332
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-plugin.js +6 -2
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.development.js +1931 -713
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.production.js +544 -295
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.development.js +1926 -715
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.production.js +542 -299
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.development.js +2719 -743
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.production.js +725 -338
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.unbundled.development.js +2703 -727
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.unbundled.production.js +725 -338
- package/dist/vendor/react-server-dom/package.json +3 -3
- package/dist/vendor/react-server-dom/server.node.js +3 -1
- package/dist/vendor/react-server-dom/server.node.unbundled.js +3 -1
- package/dist/vendor/react-server-dom/static.browser.js +1 -3
- package/dist/vendor/react-server-dom/static.edge.js +1 -3
- package/dist/vendor/react-server-dom/static.node.js +2 -3
- package/dist/vendor/react-server-dom/static.node.unbundled.js +1 -3
- package/package.json +6 -7
- package/types/index.d.ts +0 -4
- package/dist/browser--ZREVnM9.js +0 -22
- package/dist/client-C7Eok9hc.js +0 -23
- package/dist/extra/browser.d.ts +0 -14
- package/dist/extra/browser.js +0 -88
- package/dist/extra/rsc.d.ts +0 -2
- package/dist/extra/rsc.js +0 -56
- package/dist/extra/ssr.d.ts +0 -14
- package/dist/extra/ssr.js +0 -37
- package/dist/rsc-CiAoLCx8.js +0 -21
- package/dist/rsc-c22DF1A7.d.ts +0 -16
- package/dist/rsc-html-stream/browser.d.ts +0 -5
- package/dist/rsc-html-stream/browser.js +0 -8
- package/dist/rsc-html-stream/ssr.d.ts +0 -7
- package/dist/rsc-html-stream/ssr.js +0 -8
- package/dist/server-DMhFuTz_.js +0 -72
- package/dist/ssr-BQwZitKq.js +0 -53
- package/types/virtual.d.ts +0 -5
- /package/dist/{browser-DwWQeoll.d.ts → browser-CXHICuDc.d.ts} +0 -0
- /package/dist/{encryption-runtime-B8xcnJoN.d.ts → encryption-runtime-DwihLkYv.d.ts} +0 -0
- /package/dist/{encryption-utils-BDwwcMVT.js → encryption-utils-CoE0gWjC.js} +0 -0
- /package/dist/{index-B04iFwO5.d.ts → index-DYBWAuKP.d.ts} +0 -0
- /package/dist/{index-CPkExgij.d.ts → index-kBz3NvVt.d.ts} +0 -0
- /package/dist/{plugin-CZbI4rhS.js → plugin-BwI7mYXI.js} +0 -0
- /package/dist/{rpc-CUvSZurk.js → rpc-D7cb_Wd5.js} +0 -0
- /package/dist/{rsc-JJjz3Z0i.d.ts → rsc-Fgmk6j0z.d.ts} +0 -0
- /package/dist/{rsc-GFzFWyhT.js → rsc-cp4EenMG.js} +0 -0
- /package/dist/{shared-n-ykEs15.js → shared-CceFFukJ.js} +0 -0
- /package/dist/{ssr-BrSGyrxe.d.ts → ssr-BnYZ8xo9.d.ts} +0 -0
- /package/dist/{ssr-Cm2FP2zD.js → ssr-C468YlFl.js} +0 -0
- /package/dist/{transforms-CpF3zNE0.js → transforms-wFF-pWF7.js} +0 -0
package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.development.js
CHANGED
|
@@ -74,6 +74,15 @@
|
|
|
74
74
|
}
|
|
75
75
|
return !0;
|
|
76
76
|
}
|
|
77
|
+
function completeWriting(destination) {
|
|
78
|
+
currentView &&
|
|
79
|
+
0 < writtenBytes &&
|
|
80
|
+
(destination.enqueue(
|
|
81
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
|
82
|
+
),
|
|
83
|
+
(currentView = null),
|
|
84
|
+
(writtenBytes = 0));
|
|
85
|
+
}
|
|
77
86
|
function stringToChunk(content) {
|
|
78
87
|
return textEncoder.encode(content);
|
|
79
88
|
}
|
|
@@ -128,6 +137,8 @@
|
|
|
128
137
|
return target.name;
|
|
129
138
|
case "defaultProps":
|
|
130
139
|
return;
|
|
140
|
+
case "_debugInfo":
|
|
141
|
+
return;
|
|
131
142
|
case "toJSON":
|
|
132
143
|
return;
|
|
133
144
|
case Symbol.toPrimitive:
|
|
@@ -191,6 +202,73 @@
|
|
|
191
202
|
new Proxy(clientReference, deepProxyHandlers)));
|
|
192
203
|
return clientReference;
|
|
193
204
|
}
|
|
205
|
+
function resolveClientReferenceMetadata(config, clientReference) {
|
|
206
|
+
var modulePath = clientReference.$$id,
|
|
207
|
+
name = "",
|
|
208
|
+
resolvedModuleData = config[modulePath];
|
|
209
|
+
if (resolvedModuleData) name = resolvedModuleData.name;
|
|
210
|
+
else {
|
|
211
|
+
var idx = modulePath.lastIndexOf("#");
|
|
212
|
+
-1 !== idx &&
|
|
213
|
+
((name = modulePath.slice(idx + 1)),
|
|
214
|
+
(resolvedModuleData = config[modulePath.slice(0, idx)]));
|
|
215
|
+
if (!resolvedModuleData)
|
|
216
|
+
throw Error(
|
|
217
|
+
'Could not find the module "' +
|
|
218
|
+
modulePath +
|
|
219
|
+
'" in the React Client Manifest. This is probably a bug in the React Server Components bundler.'
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
if (!0 === resolvedModuleData.async && !0 === clientReference.$$async)
|
|
223
|
+
throw Error(
|
|
224
|
+
'The module "' +
|
|
225
|
+
modulePath +
|
|
226
|
+
'" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.'
|
|
227
|
+
);
|
|
228
|
+
return !0 === resolvedModuleData.async || !0 === clientReference.$$async
|
|
229
|
+
? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1]
|
|
230
|
+
: [resolvedModuleData.id, resolvedModuleData.chunks, name];
|
|
231
|
+
}
|
|
232
|
+
function preload(href, as, options) {
|
|
233
|
+
if ("string" === typeof href) {
|
|
234
|
+
var request = resolveRequest();
|
|
235
|
+
if (request) {
|
|
236
|
+
var hints = request.hints,
|
|
237
|
+
key = "L";
|
|
238
|
+
if ("image" === as && options) {
|
|
239
|
+
var imageSrcSet = options.imageSrcSet,
|
|
240
|
+
imageSizes = options.imageSizes,
|
|
241
|
+
uniquePart = "";
|
|
242
|
+
"string" === typeof imageSrcSet && "" !== imageSrcSet
|
|
243
|
+
? ((uniquePart += "[" + imageSrcSet + "]"),
|
|
244
|
+
"string" === typeof imageSizes &&
|
|
245
|
+
(uniquePart += "[" + imageSizes + "]"))
|
|
246
|
+
: (uniquePart += "[][]" + href);
|
|
247
|
+
key += "[image]" + uniquePart;
|
|
248
|
+
} else key += "[" + as + "]" + href;
|
|
249
|
+
hints.has(key) ||
|
|
250
|
+
(hints.add(key),
|
|
251
|
+
(options = trimOptions(options))
|
|
252
|
+
? emitHint(request, "L", [href, as, options])
|
|
253
|
+
: emitHint(request, "L", [href, as]));
|
|
254
|
+
} else previousDispatcher.L(href, as, options);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function preloadModule$1(href, options) {
|
|
258
|
+
if ("string" === typeof href) {
|
|
259
|
+
var request = resolveRequest();
|
|
260
|
+
if (request) {
|
|
261
|
+
var hints = request.hints,
|
|
262
|
+
key = "m|" + href;
|
|
263
|
+
if (hints.has(key)) return;
|
|
264
|
+
hints.add(key);
|
|
265
|
+
return (options = trimOptions(options))
|
|
266
|
+
? emitHint(request, "m", [href, options])
|
|
267
|
+
: emitHint(request, "m", href);
|
|
268
|
+
}
|
|
269
|
+
previousDispatcher.m(href, options);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
194
272
|
function trimOptions(options) {
|
|
195
273
|
if (null == options) return null;
|
|
196
274
|
var hasProperties = !1,
|
|
@@ -201,44 +279,227 @@
|
|
|
201
279
|
((hasProperties = !0), (trimmed[key] = options[key]));
|
|
202
280
|
return hasProperties ? trimmed : null;
|
|
203
281
|
}
|
|
204
|
-
function
|
|
282
|
+
function getChildFormatContext(parentContext, type, props) {
|
|
283
|
+
switch (type) {
|
|
284
|
+
case "img":
|
|
285
|
+
type = props.src;
|
|
286
|
+
var srcSet = props.srcSet;
|
|
287
|
+
if (
|
|
288
|
+
!(
|
|
289
|
+
"lazy" === props.loading ||
|
|
290
|
+
(!type && !srcSet) ||
|
|
291
|
+
("string" !== typeof type && null != type) ||
|
|
292
|
+
("string" !== typeof srcSet && null != srcSet) ||
|
|
293
|
+
"low" === props.fetchPriority ||
|
|
294
|
+
parentContext & 3
|
|
295
|
+
) &&
|
|
296
|
+
("string" !== typeof type ||
|
|
297
|
+
":" !== type[4] ||
|
|
298
|
+
("d" !== type[0] && "D" !== type[0]) ||
|
|
299
|
+
("a" !== type[1] && "A" !== type[1]) ||
|
|
300
|
+
("t" !== type[2] && "T" !== type[2]) ||
|
|
301
|
+
("a" !== type[3] && "A" !== type[3])) &&
|
|
302
|
+
("string" !== typeof srcSet ||
|
|
303
|
+
":" !== srcSet[4] ||
|
|
304
|
+
("d" !== srcSet[0] && "D" !== srcSet[0]) ||
|
|
305
|
+
("a" !== srcSet[1] && "A" !== srcSet[1]) ||
|
|
306
|
+
("t" !== srcSet[2] && "T" !== srcSet[2]) ||
|
|
307
|
+
("a" !== srcSet[3] && "A" !== srcSet[3]))
|
|
308
|
+
) {
|
|
309
|
+
var sizes = "string" === typeof props.sizes ? props.sizes : void 0;
|
|
310
|
+
var input = props.crossOrigin;
|
|
311
|
+
preload(type || "", "image", {
|
|
312
|
+
imageSrcSet: srcSet,
|
|
313
|
+
imageSizes: sizes,
|
|
314
|
+
crossOrigin:
|
|
315
|
+
"string" === typeof input
|
|
316
|
+
? "use-credentials" === input
|
|
317
|
+
? input
|
|
318
|
+
: ""
|
|
319
|
+
: void 0,
|
|
320
|
+
integrity: props.integrity,
|
|
321
|
+
type: props.type,
|
|
322
|
+
fetchPriority: props.fetchPriority,
|
|
323
|
+
referrerPolicy: props.referrerPolicy
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
return parentContext;
|
|
327
|
+
case "link":
|
|
328
|
+
type = props.rel;
|
|
329
|
+
srcSet = props.href;
|
|
330
|
+
if (
|
|
331
|
+
!(
|
|
332
|
+
parentContext & 1 ||
|
|
333
|
+
null != props.itemProp ||
|
|
334
|
+
"string" !== typeof type ||
|
|
335
|
+
"string" !== typeof srcSet ||
|
|
336
|
+
"" === srcSet
|
|
337
|
+
)
|
|
338
|
+
)
|
|
339
|
+
switch (type) {
|
|
340
|
+
case "preload":
|
|
341
|
+
preload(srcSet, props.as, {
|
|
342
|
+
crossOrigin: props.crossOrigin,
|
|
343
|
+
integrity: props.integrity,
|
|
344
|
+
nonce: props.nonce,
|
|
345
|
+
type: props.type,
|
|
346
|
+
fetchPriority: props.fetchPriority,
|
|
347
|
+
referrerPolicy: props.referrerPolicy,
|
|
348
|
+
imageSrcSet: props.imageSrcSet,
|
|
349
|
+
imageSizes: props.imageSizes,
|
|
350
|
+
media: props.media
|
|
351
|
+
});
|
|
352
|
+
break;
|
|
353
|
+
case "modulepreload":
|
|
354
|
+
preloadModule$1(srcSet, {
|
|
355
|
+
as: props.as,
|
|
356
|
+
crossOrigin: props.crossOrigin,
|
|
357
|
+
integrity: props.integrity,
|
|
358
|
+
nonce: props.nonce
|
|
359
|
+
});
|
|
360
|
+
break;
|
|
361
|
+
case "stylesheet":
|
|
362
|
+
preload(srcSet, "stylesheet", {
|
|
363
|
+
crossOrigin: props.crossOrigin,
|
|
364
|
+
integrity: props.integrity,
|
|
365
|
+
nonce: props.nonce,
|
|
366
|
+
type: props.type,
|
|
367
|
+
fetchPriority: props.fetchPriority,
|
|
368
|
+
referrerPolicy: props.referrerPolicy,
|
|
369
|
+
media: props.media
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
return parentContext;
|
|
373
|
+
case "picture":
|
|
374
|
+
return parentContext | 2;
|
|
375
|
+
case "noscript":
|
|
376
|
+
return parentContext | 1;
|
|
377
|
+
default:
|
|
378
|
+
return parentContext;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
function collectStackTracePrivate(error, structuredStackTrace) {
|
|
382
|
+
error = [];
|
|
383
|
+
for (var i = framesToSkip; i < structuredStackTrace.length; i++) {
|
|
384
|
+
var callSite = structuredStackTrace[i],
|
|
385
|
+
name = callSite.getFunctionName() || "<anonymous>";
|
|
386
|
+
if (name.includes("react_stack_bottom_frame")) break;
|
|
387
|
+
else if (callSite.isNative())
|
|
388
|
+
(callSite = callSite.isAsync()),
|
|
389
|
+
error.push([name, "", 0, 0, 0, 0, callSite]);
|
|
390
|
+
else {
|
|
391
|
+
if (callSite.isConstructor()) name = "new " + name;
|
|
392
|
+
else if (!callSite.isToplevel()) {
|
|
393
|
+
var callSite$jscomp$0 = callSite;
|
|
394
|
+
name = callSite$jscomp$0.getTypeName();
|
|
395
|
+
var methodName = callSite$jscomp$0.getMethodName();
|
|
396
|
+
callSite$jscomp$0 = callSite$jscomp$0.getFunctionName();
|
|
397
|
+
var result = "";
|
|
398
|
+
callSite$jscomp$0
|
|
399
|
+
? (name &&
|
|
400
|
+
identifierRegExp.test(callSite$jscomp$0) &&
|
|
401
|
+
callSite$jscomp$0 !== name &&
|
|
402
|
+
(result += name + "."),
|
|
403
|
+
(result += callSite$jscomp$0),
|
|
404
|
+
!methodName ||
|
|
405
|
+
callSite$jscomp$0 === methodName ||
|
|
406
|
+
callSite$jscomp$0.endsWith("." + methodName) ||
|
|
407
|
+
callSite$jscomp$0.endsWith(" " + methodName) ||
|
|
408
|
+
(result += " [as " + methodName + "]"))
|
|
409
|
+
: (name && (result += name + "."),
|
|
410
|
+
(result = methodName
|
|
411
|
+
? result + methodName
|
|
412
|
+
: result + "<anonymous>"));
|
|
413
|
+
name = result;
|
|
414
|
+
}
|
|
415
|
+
"<anonymous>" === name && (name = "");
|
|
416
|
+
methodName = callSite.getScriptNameOrSourceURL() || "<anonymous>";
|
|
417
|
+
"<anonymous>" === methodName &&
|
|
418
|
+
((methodName = ""),
|
|
419
|
+
callSite.isEval() &&
|
|
420
|
+
(callSite$jscomp$0 = callSite.getEvalOrigin()) &&
|
|
421
|
+
(methodName = callSite$jscomp$0.toString() + ", <anonymous>"));
|
|
422
|
+
callSite$jscomp$0 = callSite.getLineNumber() || 0;
|
|
423
|
+
result = callSite.getColumnNumber() || 0;
|
|
424
|
+
var enclosingLine =
|
|
425
|
+
"function" === typeof callSite.getEnclosingLineNumber
|
|
426
|
+
? callSite.getEnclosingLineNumber() || 0
|
|
427
|
+
: 0,
|
|
428
|
+
enclosingCol =
|
|
429
|
+
"function" === typeof callSite.getEnclosingColumnNumber
|
|
430
|
+
? callSite.getEnclosingColumnNumber() || 0
|
|
431
|
+
: 0;
|
|
432
|
+
callSite = callSite.isAsync();
|
|
433
|
+
error.push([
|
|
434
|
+
name,
|
|
435
|
+
methodName,
|
|
436
|
+
callSite$jscomp$0,
|
|
437
|
+
result,
|
|
438
|
+
enclosingLine,
|
|
439
|
+
enclosingCol,
|
|
440
|
+
callSite
|
|
441
|
+
]);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
collectedStackTrace = error;
|
|
445
|
+
return "";
|
|
446
|
+
}
|
|
447
|
+
function collectStackTrace(error, structuredStackTrace) {
|
|
448
|
+
collectStackTracePrivate(error, structuredStackTrace);
|
|
205
449
|
error = (error.name || "Error") + ": " + (error.message || "");
|
|
206
450
|
for (var i = 0; i < structuredStackTrace.length; i++)
|
|
207
451
|
error += "\n at " + structuredStackTrace[i].toString();
|
|
208
452
|
return error;
|
|
209
453
|
}
|
|
210
454
|
function parseStackTrace(error, skipFrames) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
455
|
+
var existing = stackTraceCache.get(error);
|
|
456
|
+
if (void 0 !== existing) return existing;
|
|
457
|
+
collectedStackTrace = null;
|
|
458
|
+
framesToSkip = skipFrames;
|
|
459
|
+
existing = Error.prepareStackTrace;
|
|
460
|
+
Error.prepareStackTrace = collectStackTrace;
|
|
461
|
+
try {
|
|
462
|
+
var stack = String(error.stack);
|
|
463
|
+
} finally {
|
|
464
|
+
Error.prepareStackTrace = existing;
|
|
221
465
|
}
|
|
466
|
+
if (null !== collectedStackTrace)
|
|
467
|
+
return (
|
|
468
|
+
(stack = collectedStackTrace),
|
|
469
|
+
(collectedStackTrace = null),
|
|
470
|
+
stackTraceCache.set(error, stack),
|
|
471
|
+
stack
|
|
472
|
+
);
|
|
222
473
|
stack.startsWith("Error: react-stack-top-frame\n") &&
|
|
223
474
|
(stack = stack.slice(29));
|
|
224
|
-
|
|
225
|
-
-1 !==
|
|
226
|
-
-1 !==
|
|
475
|
+
existing = stack.indexOf("react_stack_bottom_frame");
|
|
476
|
+
-1 !== existing && (existing = stack.lastIndexOf("\n", existing));
|
|
477
|
+
-1 !== existing && (stack = stack.slice(0, existing));
|
|
227
478
|
stack = stack.split("\n");
|
|
228
|
-
for (
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
479
|
+
for (existing = []; skipFrames < stack.length; skipFrames++) {
|
|
480
|
+
var parsed = frameRegExp.exec(stack[skipFrames]);
|
|
481
|
+
if (parsed) {
|
|
482
|
+
var name = parsed[1] || "",
|
|
483
|
+
isAsync = "async " === parsed[8];
|
|
484
|
+
"<anonymous>" === name
|
|
485
|
+
? (name = "")
|
|
486
|
+
: name.startsWith("async ") &&
|
|
487
|
+
((name = name.slice(5)), (isAsync = !0));
|
|
488
|
+
var filename = parsed[2] || parsed[5] || "";
|
|
233
489
|
"<anonymous>" === filename && (filename = "");
|
|
234
|
-
|
|
490
|
+
existing.push([
|
|
235
491
|
name,
|
|
236
492
|
filename,
|
|
237
|
-
+(
|
|
238
|
-
+(
|
|
493
|
+
+(parsed[3] || parsed[6]),
|
|
494
|
+
+(parsed[4] || parsed[7]),
|
|
495
|
+
0,
|
|
496
|
+
0,
|
|
497
|
+
isAsync
|
|
239
498
|
]);
|
|
240
499
|
}
|
|
241
|
-
|
|
500
|
+
}
|
|
501
|
+
stackTraceCache.set(error, existing);
|
|
502
|
+
return existing;
|
|
242
503
|
}
|
|
243
504
|
function createTemporaryReference(temporaryReferences, id) {
|
|
244
505
|
var reference = Object.defineProperties(
|
|
@@ -253,13 +514,13 @@
|
|
|
253
514
|
temporaryReferences.set(reference, id);
|
|
254
515
|
return reference;
|
|
255
516
|
}
|
|
256
|
-
function noop
|
|
517
|
+
function noop() {}
|
|
257
518
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
258
519
|
index = thenableState[index];
|
|
259
520
|
void 0 === index
|
|
260
|
-
? thenableState.push(thenable)
|
|
261
|
-
|
|
262
|
-
|
|
521
|
+
? (thenableState.push(thenable),
|
|
522
|
+
(thenableState._stacks || (thenableState._stacks = [])).push(Error()))
|
|
523
|
+
: index !== thenable && (thenable.then(noop, noop), (thenable = index));
|
|
263
524
|
switch (thenable.status) {
|
|
264
525
|
case "fulfilled":
|
|
265
526
|
return thenable.value;
|
|
@@ -267,7 +528,7 @@
|
|
|
267
528
|
throw thenable.reason;
|
|
268
529
|
default:
|
|
269
530
|
"string" === typeof thenable.status
|
|
270
|
-
? thenable.then(noop
|
|
531
|
+
? thenable.then(noop, noop)
|
|
271
532
|
: ((thenableState = thenable),
|
|
272
533
|
(thenableState.status = "pending"),
|
|
273
534
|
thenableState.then(
|
|
@@ -330,6 +591,12 @@
|
|
|
330
591
|
}
|
|
331
592
|
return null;
|
|
332
593
|
}
|
|
594
|
+
function prepareStackTrace(error, structuredStackTrace) {
|
|
595
|
+
error = (error.name || "Error") + ": " + (error.message || "");
|
|
596
|
+
for (var i = 0; i < structuredStackTrace.length; i++)
|
|
597
|
+
error += "\n at " + structuredStackTrace[i].toString();
|
|
598
|
+
return error;
|
|
599
|
+
}
|
|
333
600
|
function resetOwnerStackLimit() {
|
|
334
601
|
var now = getCurrentTime();
|
|
335
602
|
1e3 < now - lastResetTime &&
|
|
@@ -346,6 +613,13 @@
|
|
|
346
613
|
if (!(object[i] in ObjectPrototype)) return !1;
|
|
347
614
|
return !0;
|
|
348
615
|
}
|
|
616
|
+
function isGetter(object, name) {
|
|
617
|
+
if (object === Object.prototype || null === object) return !1;
|
|
618
|
+
var descriptor = Object.getOwnPropertyDescriptor(object, name);
|
|
619
|
+
return void 0 === descriptor
|
|
620
|
+
? isGetter(getPrototypeOf(object), name)
|
|
621
|
+
: "function" === typeof descriptor.get;
|
|
622
|
+
}
|
|
349
623
|
function isSimpleObject(object) {
|
|
350
624
|
if (!isObjectPrototype(getPrototypeOf(object))) return !1;
|
|
351
625
|
for (
|
|
@@ -365,11 +639,8 @@
|
|
|
365
639
|
return !0;
|
|
366
640
|
}
|
|
367
641
|
function objectName(object) {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
.replace(/^\[object (.*)\]$/, function (m, p0) {
|
|
371
|
-
return p0;
|
|
372
|
-
});
|
|
642
|
+
object = Object.prototype.toString.call(object);
|
|
643
|
+
return object.slice(8, object.length - 1);
|
|
373
644
|
}
|
|
374
645
|
function describeKeyForErrorMessage(key) {
|
|
375
646
|
var encodedKey = JSON.stringify(key);
|
|
@@ -533,24 +804,25 @@
|
|
|
533
804
|
!filename.includes("node_modules")
|
|
534
805
|
);
|
|
535
806
|
}
|
|
536
|
-
function filterStackTrace(request,
|
|
807
|
+
function filterStackTrace(request, stack) {
|
|
537
808
|
request = request.filterStackFrame;
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
var envIdx = url.indexOf("/", 12),
|
|
809
|
+
for (var filteredStack = [], i = 0; i < stack.length; i++) {
|
|
810
|
+
var callsite = stack[i],
|
|
811
|
+
functionName = callsite[0];
|
|
812
|
+
var url = callsite[1];
|
|
813
|
+
if (url.startsWith("about://React/")) {
|
|
814
|
+
var envIdx = url.indexOf("/", 14),
|
|
545
815
|
suffixIdx = url.lastIndexOf("?");
|
|
546
816
|
-1 < envIdx &&
|
|
547
817
|
-1 < suffixIdx &&
|
|
548
|
-
(url =
|
|
818
|
+
(url = decodeURI(url.slice(envIdx + 1, suffixIdx)));
|
|
549
819
|
}
|
|
550
|
-
request(url, functionName)
|
|
551
|
-
(
|
|
820
|
+
request(url, functionName, callsite[2], callsite[3]) &&
|
|
821
|
+
((callsite = callsite.slice(0)),
|
|
822
|
+
(callsite[1] = url),
|
|
823
|
+
filteredStack.push(callsite));
|
|
552
824
|
}
|
|
553
|
-
return
|
|
825
|
+
return filteredStack;
|
|
554
826
|
}
|
|
555
827
|
function patchConsole(consoleInst, methodName) {
|
|
556
828
|
var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName);
|
|
@@ -564,14 +836,81 @@
|
|
|
564
836
|
var wrapperMethod = function () {
|
|
565
837
|
var request = resolveRequest();
|
|
566
838
|
if (("assert" !== methodName || !arguments[0]) && null !== request) {
|
|
567
|
-
|
|
839
|
+
a: {
|
|
840
|
+
var error = Error("react-stack-top-frame");
|
|
841
|
+
collectedStackTrace = null;
|
|
842
|
+
framesToSkip = 1;
|
|
843
|
+
var previousPrepare = Error.prepareStackTrace;
|
|
844
|
+
Error.prepareStackTrace = collectStackTracePrivate;
|
|
845
|
+
try {
|
|
846
|
+
if ("" !== error.stack) {
|
|
847
|
+
var JSCompiler_inline_result = null;
|
|
848
|
+
break a;
|
|
849
|
+
}
|
|
850
|
+
} finally {
|
|
851
|
+
Error.prepareStackTrace = previousPrepare;
|
|
852
|
+
}
|
|
853
|
+
JSCompiler_inline_result = collectedStackTrace;
|
|
854
|
+
}
|
|
855
|
+
JSCompiler_inline_result = filterStackTrace(
|
|
856
|
+
request,
|
|
857
|
+
JSCompiler_inline_result || []
|
|
858
|
+
);
|
|
859
|
+
request.pendingDebugChunks++;
|
|
860
|
+
error = resolveOwner();
|
|
861
|
+
previousPrepare = Array.from(arguments);
|
|
862
|
+
a: {
|
|
863
|
+
var env = 0;
|
|
864
|
+
switch (methodName) {
|
|
865
|
+
case "dir":
|
|
866
|
+
case "dirxml":
|
|
867
|
+
case "groupEnd":
|
|
868
|
+
case "table":
|
|
869
|
+
env = null;
|
|
870
|
+
break a;
|
|
871
|
+
case "assert":
|
|
872
|
+
env = 1;
|
|
873
|
+
}
|
|
874
|
+
var format = previousPrepare[env],
|
|
875
|
+
style = previousPrepare[env + 1],
|
|
876
|
+
badge = previousPrepare[env + 2];
|
|
877
|
+
"string" === typeof format &&
|
|
878
|
+
format.startsWith("\u001b[0m\u001b[7m%c%s\u001b[0m%c") &&
|
|
879
|
+
"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" ===
|
|
880
|
+
style &&
|
|
881
|
+
"string" === typeof badge
|
|
882
|
+
? ((format = format.slice(18)),
|
|
883
|
+
" " === format[0] && (format = format.slice(1)),
|
|
884
|
+
previousPrepare.splice(env, 4, format),
|
|
885
|
+
(env = badge.slice(1, badge.length - 1)))
|
|
886
|
+
: (env = null);
|
|
887
|
+
}
|
|
888
|
+
null === env && (env = (0, request.environmentName)());
|
|
889
|
+
null != error && outlineComponentInfo(request, error);
|
|
890
|
+
badge = [methodName, JSCompiler_inline_result, error, env];
|
|
891
|
+
badge.push.apply(badge, previousPrepare);
|
|
892
|
+
previousPrepare = serializeDebugModel(
|
|
568
893
|
request,
|
|
569
|
-
|
|
570
|
-
|
|
894
|
+
(null === request.deferredDebugObjects ? 500 : 10) +
|
|
895
|
+
JSCompiler_inline_result.length,
|
|
896
|
+
badge
|
|
897
|
+
);
|
|
898
|
+
"[" !== previousPrepare[0] &&
|
|
899
|
+
(previousPrepare = serializeDebugModel(
|
|
900
|
+
request,
|
|
901
|
+
10 + JSCompiler_inline_result.length,
|
|
902
|
+
[
|
|
903
|
+
methodName,
|
|
904
|
+
JSCompiler_inline_result,
|
|
905
|
+
error,
|
|
906
|
+
env,
|
|
907
|
+
"Unknown Value: React could not send it from the server."
|
|
908
|
+
]
|
|
909
|
+
));
|
|
910
|
+
JSCompiler_inline_result = stringToChunk(
|
|
911
|
+
":W" + previousPrepare + "\n"
|
|
571
912
|
);
|
|
572
|
-
request.
|
|
573
|
-
var owner = resolveOwner();
|
|
574
|
-
emitConsoleChunk(request, methodName, owner, stack, arguments);
|
|
913
|
+
request.completedDebugChunks.push(JSCompiler_inline_result);
|
|
575
914
|
}
|
|
576
915
|
return originalMethod.apply(this, arguments);
|
|
577
916
|
};
|
|
@@ -639,19 +978,19 @@
|
|
|
639
978
|
function defaultErrorHandler(error) {
|
|
640
979
|
console.error(error);
|
|
641
980
|
}
|
|
642
|
-
function defaultPostponeHandler() {}
|
|
643
981
|
function RequestInstance(
|
|
644
982
|
type,
|
|
645
983
|
model,
|
|
646
984
|
bundlerConfig,
|
|
647
985
|
onError,
|
|
648
|
-
identifierPrefix,
|
|
649
986
|
onPostpone,
|
|
987
|
+
onAllReady,
|
|
988
|
+
onFatalError,
|
|
989
|
+
identifierPrefix,
|
|
650
990
|
temporaryReferences,
|
|
651
991
|
environmentName,
|
|
652
992
|
filterStackFrame,
|
|
653
|
-
|
|
654
|
-
onFatalError
|
|
993
|
+
keepDebugAlive
|
|
655
994
|
) {
|
|
656
995
|
if (
|
|
657
996
|
null !== ReactSharedInternalsServer.A &&
|
|
@@ -666,14 +1005,14 @@
|
|
|
666
1005
|
pingedTasks = [],
|
|
667
1006
|
hints = new Set();
|
|
668
1007
|
this.type = type;
|
|
669
|
-
this.status =
|
|
1008
|
+
this.status = 10;
|
|
670
1009
|
this.flushScheduled = !1;
|
|
671
1010
|
this.destination = this.fatalError = null;
|
|
672
1011
|
this.bundlerConfig = bundlerConfig;
|
|
673
1012
|
this.cache = new Map();
|
|
1013
|
+
this.cacheController = new AbortController();
|
|
674
1014
|
this.pendingChunks = this.nextChunkId = 0;
|
|
675
1015
|
this.hints = hints;
|
|
676
|
-
this.abortListeners = new Set();
|
|
677
1016
|
this.abortableTasks = abortSet;
|
|
678
1017
|
this.pingedTasks = pingedTasks;
|
|
679
1018
|
this.completedImportChunks = [];
|
|
@@ -693,6 +1032,9 @@
|
|
|
693
1032
|
void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
|
|
694
1033
|
this.onAllReady = onAllReady;
|
|
695
1034
|
this.onFatalError = onFatalError;
|
|
1035
|
+
this.pendingDebugChunks = 0;
|
|
1036
|
+
this.completedDebugChunks = [];
|
|
1037
|
+
this.debugDestination = null;
|
|
696
1038
|
this.environmentName =
|
|
697
1039
|
void 0 === environmentName
|
|
698
1040
|
? function () {
|
|
@@ -708,10 +1050,27 @@
|
|
|
708
1050
|
? defaultFilterStackFrame
|
|
709
1051
|
: filterStackFrame;
|
|
710
1052
|
this.didWarnForKey = null;
|
|
711
|
-
|
|
712
|
-
|
|
1053
|
+
this.writtenDebugObjects = new WeakMap();
|
|
1054
|
+
this.deferredDebugObjects = keepDebugAlive
|
|
1055
|
+
? { retained: new Map(), existing: new Map() }
|
|
1056
|
+
: null;
|
|
1057
|
+
type = this.timeOrigin = performance.now();
|
|
1058
|
+
emitTimeOriginChunk(this, type + performance.timeOrigin);
|
|
1059
|
+
this.abortTime = -0;
|
|
1060
|
+
model = createTask(
|
|
1061
|
+
this,
|
|
1062
|
+
model,
|
|
1063
|
+
null,
|
|
1064
|
+
!1,
|
|
1065
|
+
0,
|
|
1066
|
+
abortSet,
|
|
1067
|
+
type,
|
|
1068
|
+
null,
|
|
1069
|
+
null,
|
|
1070
|
+
null
|
|
1071
|
+
);
|
|
1072
|
+
pingedTasks.push(model);
|
|
713
1073
|
}
|
|
714
|
-
function noop() {}
|
|
715
1074
|
function createRequest(
|
|
716
1075
|
model,
|
|
717
1076
|
bundlerConfig,
|
|
@@ -720,7 +1079,8 @@
|
|
|
720
1079
|
onPostpone,
|
|
721
1080
|
temporaryReferences,
|
|
722
1081
|
environmentName,
|
|
723
|
-
filterStackFrame
|
|
1082
|
+
filterStackFrame,
|
|
1083
|
+
keepDebugAlive
|
|
724
1084
|
) {
|
|
725
1085
|
resetOwnerStackLimit();
|
|
726
1086
|
return new RequestInstance(
|
|
@@ -728,13 +1088,14 @@
|
|
|
728
1088
|
model,
|
|
729
1089
|
bundlerConfig,
|
|
730
1090
|
onError,
|
|
731
|
-
identifierPrefix,
|
|
732
1091
|
onPostpone,
|
|
1092
|
+
noop,
|
|
1093
|
+
noop,
|
|
1094
|
+
identifierPrefix,
|
|
733
1095
|
temporaryReferences,
|
|
734
1096
|
environmentName,
|
|
735
1097
|
filterStackFrame,
|
|
736
|
-
|
|
737
|
-
noop
|
|
1098
|
+
keepDebugAlive
|
|
738
1099
|
);
|
|
739
1100
|
}
|
|
740
1101
|
function createPrerenderRequest(
|
|
@@ -747,21 +1108,23 @@
|
|
|
747
1108
|
onPostpone,
|
|
748
1109
|
temporaryReferences,
|
|
749
1110
|
environmentName,
|
|
750
|
-
filterStackFrame
|
|
1111
|
+
filterStackFrame,
|
|
1112
|
+
keepDebugAlive
|
|
751
1113
|
) {
|
|
752
1114
|
resetOwnerStackLimit();
|
|
753
1115
|
return new RequestInstance(
|
|
754
|
-
|
|
1116
|
+
21,
|
|
755
1117
|
model,
|
|
756
1118
|
bundlerConfig,
|
|
757
1119
|
onError,
|
|
758
|
-
identifierPrefix,
|
|
759
1120
|
onPostpone,
|
|
1121
|
+
onAllReady,
|
|
1122
|
+
onFatalError,
|
|
1123
|
+
identifierPrefix,
|
|
760
1124
|
temporaryReferences,
|
|
761
1125
|
environmentName,
|
|
762
1126
|
filterStackFrame,
|
|
763
|
-
|
|
764
|
-
onFatalError
|
|
1127
|
+
keepDebugAlive
|
|
765
1128
|
);
|
|
766
1129
|
}
|
|
767
1130
|
function resolveRequest() {
|
|
@@ -772,35 +1135,124 @@
|
|
|
772
1135
|
}
|
|
773
1136
|
return null;
|
|
774
1137
|
}
|
|
1138
|
+
function serializeDebugThenable(request, counter, thenable) {
|
|
1139
|
+
request.pendingDebugChunks++;
|
|
1140
|
+
var id = request.nextChunkId++,
|
|
1141
|
+
ref = "$@" + id.toString(16);
|
|
1142
|
+
request.writtenDebugObjects.set(thenable, ref);
|
|
1143
|
+
switch (thenable.status) {
|
|
1144
|
+
case "fulfilled":
|
|
1145
|
+
return (
|
|
1146
|
+
emitOutlinedDebugModelChunk(request, id, counter, thenable.value),
|
|
1147
|
+
ref
|
|
1148
|
+
);
|
|
1149
|
+
case "rejected":
|
|
1150
|
+
return (
|
|
1151
|
+
emitErrorChunk(request, id, "", thenable.reason, !0, null), ref
|
|
1152
|
+
);
|
|
1153
|
+
}
|
|
1154
|
+
if (request.status === ABORTING)
|
|
1155
|
+
return emitDebugHaltChunk(request, id), ref;
|
|
1156
|
+
var deferredDebugObjects = request.deferredDebugObjects;
|
|
1157
|
+
if (null !== deferredDebugObjects)
|
|
1158
|
+
return (
|
|
1159
|
+
deferredDebugObjects.retained.set(id, thenable),
|
|
1160
|
+
(ref = "$Y@" + id.toString(16)),
|
|
1161
|
+
request.writtenDebugObjects.set(thenable, ref),
|
|
1162
|
+
ref
|
|
1163
|
+
);
|
|
1164
|
+
var cancelled = !1;
|
|
1165
|
+
thenable.then(
|
|
1166
|
+
function (value) {
|
|
1167
|
+
cancelled ||
|
|
1168
|
+
((cancelled = !0),
|
|
1169
|
+
request.status === ABORTING
|
|
1170
|
+
? emitDebugHaltChunk(request, id)
|
|
1171
|
+
: emitOutlinedDebugModelChunk(request, id, counter, value),
|
|
1172
|
+
enqueueFlush(request));
|
|
1173
|
+
},
|
|
1174
|
+
function (reason) {
|
|
1175
|
+
cancelled ||
|
|
1176
|
+
((cancelled = !0),
|
|
1177
|
+
request.status === ABORTING
|
|
1178
|
+
? emitDebugHaltChunk(request, id)
|
|
1179
|
+
: emitErrorChunk(request, id, "", reason, !0, null),
|
|
1180
|
+
enqueueFlush(request));
|
|
1181
|
+
}
|
|
1182
|
+
);
|
|
1183
|
+
Promise.resolve().then(function () {
|
|
1184
|
+
cancelled ||
|
|
1185
|
+
((cancelled = !0),
|
|
1186
|
+
emitDebugHaltChunk(request, id),
|
|
1187
|
+
enqueueFlush(request),
|
|
1188
|
+
(counter = request = null));
|
|
1189
|
+
});
|
|
1190
|
+
return ref;
|
|
1191
|
+
}
|
|
1192
|
+
function emitRequestedDebugThenable(request, id, counter, thenable) {
|
|
1193
|
+
thenable.then(
|
|
1194
|
+
function (value) {
|
|
1195
|
+
request.status === ABORTING
|
|
1196
|
+
? emitDebugHaltChunk(request, id)
|
|
1197
|
+
: emitOutlinedDebugModelChunk(request, id, counter, value);
|
|
1198
|
+
enqueueFlush(request);
|
|
1199
|
+
},
|
|
1200
|
+
function (reason) {
|
|
1201
|
+
request.status === ABORTING
|
|
1202
|
+
? emitDebugHaltChunk(request, id)
|
|
1203
|
+
: emitErrorChunk(request, id, "", reason, !0, null);
|
|
1204
|
+
enqueueFlush(request);
|
|
1205
|
+
}
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
775
1208
|
function serializeThenable(request, task, thenable) {
|
|
776
1209
|
var newTask = createTask(
|
|
777
1210
|
request,
|
|
778
|
-
|
|
1211
|
+
thenable,
|
|
779
1212
|
task.keyPath,
|
|
780
1213
|
task.implicitSlot,
|
|
1214
|
+
task.formatContext,
|
|
781
1215
|
request.abortableTasks,
|
|
1216
|
+
task.time,
|
|
782
1217
|
task.debugOwner,
|
|
783
1218
|
task.debugStack,
|
|
784
1219
|
task.debugTask
|
|
785
1220
|
);
|
|
786
|
-
(task = thenable._debugInfo) &&
|
|
787
|
-
forwardDebugInfo(request, newTask.id, task);
|
|
788
1221
|
switch (thenable.status) {
|
|
789
1222
|
case "fulfilled":
|
|
790
1223
|
return (
|
|
1224
|
+
forwardDebugInfoFromThenable(
|
|
1225
|
+
request,
|
|
1226
|
+
newTask,
|
|
1227
|
+
thenable,
|
|
1228
|
+
null,
|
|
1229
|
+
null
|
|
1230
|
+
),
|
|
791
1231
|
(newTask.model = thenable.value),
|
|
792
1232
|
pingTask(request, newTask),
|
|
793
1233
|
newTask.id
|
|
794
1234
|
);
|
|
795
1235
|
case "rejected":
|
|
796
|
-
return
|
|
1236
|
+
return (
|
|
1237
|
+
forwardDebugInfoFromThenable(
|
|
1238
|
+
request,
|
|
1239
|
+
newTask,
|
|
1240
|
+
thenable,
|
|
1241
|
+
null,
|
|
1242
|
+
null
|
|
1243
|
+
),
|
|
1244
|
+
erroredTask(request, newTask, thenable.reason),
|
|
1245
|
+
newTask.id
|
|
1246
|
+
);
|
|
797
1247
|
default:
|
|
798
1248
|
if (request.status === ABORTING)
|
|
799
1249
|
return (
|
|
800
1250
|
request.abortableTasks.delete(newTask),
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
1251
|
+
21 === request.type
|
|
1252
|
+
? (haltTask(newTask), finishHaltedTask(newTask, request))
|
|
1253
|
+
: ((task = request.fatalError),
|
|
1254
|
+
abortTask(newTask),
|
|
1255
|
+
finishAbortedTask(newTask, request, task)),
|
|
804
1256
|
newTask.id
|
|
805
1257
|
);
|
|
806
1258
|
"string" !== typeof thenable.status &&
|
|
@@ -819,25 +1271,33 @@
|
|
|
819
1271
|
}
|
|
820
1272
|
thenable.then(
|
|
821
1273
|
function (value) {
|
|
1274
|
+
forwardDebugInfoFromCurrentContext(request, newTask, thenable);
|
|
822
1275
|
newTask.model = value;
|
|
823
1276
|
pingTask(request, newTask);
|
|
824
1277
|
},
|
|
825
1278
|
function (reason) {
|
|
826
|
-
newTask.status
|
|
827
|
-
(
|
|
1279
|
+
0 === newTask.status &&
|
|
1280
|
+
((newTask.timed = !0),
|
|
1281
|
+
erroredTask(request, newTask, reason),
|
|
1282
|
+
enqueueFlush(request));
|
|
828
1283
|
}
|
|
829
1284
|
);
|
|
830
1285
|
return newTask.id;
|
|
831
1286
|
}
|
|
832
1287
|
function serializeReadableStream(request, task, stream) {
|
|
833
1288
|
function progress(entry) {
|
|
834
|
-
if (
|
|
1289
|
+
if (0 === streamTask.status)
|
|
835
1290
|
if (entry.done)
|
|
836
|
-
|
|
1291
|
+
(streamTask.status = 1),
|
|
837
1292
|
(entry = streamTask.id.toString(16) + ":C\n"),
|
|
838
1293
|
request.completedRegularChunks.push(stringToChunk(entry)),
|
|
1294
|
+
request.abortableTasks.delete(streamTask),
|
|
1295
|
+
request.cacheController.signal.removeEventListener(
|
|
1296
|
+
"abort",
|
|
1297
|
+
abortStream
|
|
1298
|
+
),
|
|
839
1299
|
enqueueFlush(request),
|
|
840
|
-
(
|
|
1300
|
+
callOnAllReadyIfReady(request);
|
|
841
1301
|
else
|
|
842
1302
|
try {
|
|
843
1303
|
(streamTask.model = entry.value),
|
|
@@ -850,20 +1310,27 @@
|
|
|
850
1310
|
}
|
|
851
1311
|
}
|
|
852
1312
|
function error(reason) {
|
|
853
|
-
|
|
854
|
-
((
|
|
855
|
-
|
|
1313
|
+
0 === streamTask.status &&
|
|
1314
|
+
(request.cacheController.signal.removeEventListener(
|
|
1315
|
+
"abort",
|
|
1316
|
+
abortStream
|
|
1317
|
+
),
|
|
856
1318
|
erroredTask(request, streamTask, reason),
|
|
857
1319
|
enqueueFlush(request),
|
|
858
1320
|
reader.cancel(reason).then(error, error));
|
|
859
1321
|
}
|
|
860
|
-
function abortStream(
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
1322
|
+
function abortStream() {
|
|
1323
|
+
if (0 === streamTask.status) {
|
|
1324
|
+
var signal = request.cacheController.signal;
|
|
1325
|
+
signal.removeEventListener("abort", abortStream);
|
|
1326
|
+
signal = signal.reason;
|
|
1327
|
+
21 === request.type
|
|
1328
|
+
? (request.abortableTasks.delete(streamTask),
|
|
1329
|
+
haltTask(streamTask),
|
|
1330
|
+
finishHaltedTask(streamTask, request))
|
|
1331
|
+
: (erroredTask(request, streamTask, signal), enqueueFlush(request));
|
|
1332
|
+
reader.cancel(signal).then(error, error);
|
|
1333
|
+
}
|
|
867
1334
|
}
|
|
868
1335
|
var supportsBYOB = stream.supportsBYOB;
|
|
869
1336
|
if (void 0 === supportsBYOB)
|
|
@@ -878,26 +1345,26 @@
|
|
|
878
1345
|
task.model,
|
|
879
1346
|
task.keyPath,
|
|
880
1347
|
task.implicitSlot,
|
|
1348
|
+
task.formatContext,
|
|
881
1349
|
request.abortableTasks,
|
|
1350
|
+
task.time,
|
|
882
1351
|
task.debugOwner,
|
|
883
1352
|
task.debugStack,
|
|
884
1353
|
task.debugTask
|
|
885
1354
|
);
|
|
886
|
-
request.abortableTasks.delete(streamTask);
|
|
887
1355
|
request.pendingChunks++;
|
|
888
1356
|
task =
|
|
889
1357
|
streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n";
|
|
890
1358
|
request.completedRegularChunks.push(stringToChunk(task));
|
|
891
|
-
|
|
892
|
-
request.abortListeners.add(abortStream);
|
|
1359
|
+
request.cacheController.signal.addEventListener("abort", abortStream);
|
|
893
1360
|
reader.read().then(progress, error);
|
|
894
1361
|
return serializeByValueID(streamTask.id);
|
|
895
1362
|
}
|
|
896
1363
|
function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
897
1364
|
function progress(entry) {
|
|
898
|
-
if (
|
|
1365
|
+
if (0 === streamTask.status)
|
|
899
1366
|
if (entry.done) {
|
|
900
|
-
|
|
1367
|
+
streamTask.status = 1;
|
|
901
1368
|
if (void 0 === entry.value)
|
|
902
1369
|
var endStreamRow = streamTask.id.toString(16) + ":C\n";
|
|
903
1370
|
else
|
|
@@ -913,8 +1380,13 @@
|
|
|
913
1380
|
return;
|
|
914
1381
|
}
|
|
915
1382
|
request.completedRegularChunks.push(stringToChunk(endStreamRow));
|
|
1383
|
+
request.abortableTasks.delete(streamTask);
|
|
1384
|
+
request.cacheController.signal.removeEventListener(
|
|
1385
|
+
"abort",
|
|
1386
|
+
abortIterable
|
|
1387
|
+
);
|
|
916
1388
|
enqueueFlush(request);
|
|
917
|
-
|
|
1389
|
+
callOnAllReadyIfReady(request);
|
|
918
1390
|
} else
|
|
919
1391
|
try {
|
|
920
1392
|
(streamTask.model = entry.value),
|
|
@@ -927,22 +1399,30 @@
|
|
|
927
1399
|
}
|
|
928
1400
|
}
|
|
929
1401
|
function error(reason) {
|
|
930
|
-
|
|
931
|
-
((
|
|
932
|
-
|
|
1402
|
+
0 === streamTask.status &&
|
|
1403
|
+
(request.cacheController.signal.removeEventListener(
|
|
1404
|
+
"abort",
|
|
1405
|
+
abortIterable
|
|
1406
|
+
),
|
|
933
1407
|
erroredTask(request, streamTask, reason),
|
|
934
1408
|
enqueueFlush(request),
|
|
935
1409
|
"function" === typeof iterator.throw &&
|
|
936
1410
|
iterator.throw(reason).then(error, error));
|
|
937
1411
|
}
|
|
938
|
-
function abortIterable(
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1412
|
+
function abortIterable() {
|
|
1413
|
+
if (0 === streamTask.status) {
|
|
1414
|
+
var signal = request.cacheController.signal;
|
|
1415
|
+
signal.removeEventListener("abort", abortIterable);
|
|
1416
|
+
var reason = signal.reason;
|
|
1417
|
+
21 === request.type
|
|
1418
|
+
? (request.abortableTasks.delete(streamTask),
|
|
1419
|
+
haltTask(streamTask),
|
|
1420
|
+
finishHaltedTask(streamTask, request))
|
|
1421
|
+
: (erroredTask(request, streamTask, signal.reason),
|
|
1422
|
+
enqueueFlush(request));
|
|
944
1423
|
"function" === typeof iterator.throw &&
|
|
945
|
-
iterator.throw(reason).then(error, error)
|
|
1424
|
+
iterator.throw(reason).then(error, error);
|
|
1425
|
+
}
|
|
946
1426
|
}
|
|
947
1427
|
var isIterator = iterable === iterator,
|
|
948
1428
|
streamTask = createTask(
|
|
@@ -950,19 +1430,20 @@
|
|
|
950
1430
|
task.model,
|
|
951
1431
|
task.keyPath,
|
|
952
1432
|
task.implicitSlot,
|
|
1433
|
+
task.formatContext,
|
|
953
1434
|
request.abortableTasks,
|
|
1435
|
+
task.time,
|
|
954
1436
|
task.debugOwner,
|
|
955
1437
|
task.debugStack,
|
|
956
1438
|
task.debugTask
|
|
957
1439
|
);
|
|
958
|
-
|
|
1440
|
+
(task = iterable._debugInfo) &&
|
|
1441
|
+
forwardDebugInfo(request, streamTask, task);
|
|
959
1442
|
request.pendingChunks++;
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
(
|
|
963
|
-
|
|
964
|
-
var aborted = !1;
|
|
965
|
-
request.abortListeners.add(abortIterable);
|
|
1443
|
+
isIterator =
|
|
1444
|
+
streamTask.id.toString(16) + ":" + (isIterator ? "x" : "X") + "\n";
|
|
1445
|
+
request.completedRegularChunks.push(stringToChunk(isIterator));
|
|
1446
|
+
request.cacheController.signal.addEventListener("abort", abortIterable);
|
|
966
1447
|
callIteratorInDEV(iterator, progress, error);
|
|
967
1448
|
return serializeByValueID(streamTask.id);
|
|
968
1449
|
}
|
|
@@ -977,33 +1458,38 @@
|
|
|
977
1458
|
if ("rejected" === thenable.status) throw thenable.reason;
|
|
978
1459
|
throw thenable;
|
|
979
1460
|
}
|
|
980
|
-
function createLazyWrapperAroundWakeable(wakeable) {
|
|
1461
|
+
function createLazyWrapperAroundWakeable(request, task, wakeable) {
|
|
981
1462
|
switch (wakeable.status) {
|
|
982
1463
|
case "fulfilled":
|
|
1464
|
+
return (
|
|
1465
|
+
forwardDebugInfoFromThenable(request, task, wakeable, null, null),
|
|
1466
|
+
wakeable.value
|
|
1467
|
+
);
|
|
983
1468
|
case "rejected":
|
|
1469
|
+
forwardDebugInfoFromThenable(request, task, wakeable, null, null);
|
|
984
1470
|
break;
|
|
985
1471
|
default:
|
|
986
1472
|
"string" !== typeof wakeable.status &&
|
|
987
1473
|
((wakeable.status = "pending"),
|
|
988
1474
|
wakeable.then(
|
|
989
1475
|
function (fulfilledValue) {
|
|
1476
|
+
forwardDebugInfoFromCurrentContext(request, task, wakeable);
|
|
990
1477
|
"pending" === wakeable.status &&
|
|
991
1478
|
((wakeable.status = "fulfilled"),
|
|
992
1479
|
(wakeable.value = fulfilledValue));
|
|
993
1480
|
},
|
|
994
1481
|
function (error) {
|
|
1482
|
+
forwardDebugInfoFromCurrentContext(request, task, wakeable);
|
|
995
1483
|
"pending" === wakeable.status &&
|
|
996
1484
|
((wakeable.status = "rejected"), (wakeable.reason = error));
|
|
997
1485
|
}
|
|
998
1486
|
));
|
|
999
1487
|
}
|
|
1000
|
-
|
|
1488
|
+
return {
|
|
1001
1489
|
$$typeof: REACT_LAZY_TYPE,
|
|
1002
1490
|
_payload: wakeable,
|
|
1003
1491
|
_init: readThenable
|
|
1004
1492
|
};
|
|
1005
|
-
lazyType._debugInfo = wakeable._debugInfo || [];
|
|
1006
|
-
return lazyType;
|
|
1007
1493
|
}
|
|
1008
1494
|
function callWithDebugContextInDEV(request, task, callback, arg) {
|
|
1009
1495
|
var componentDebugInfo = {
|
|
@@ -1015,7 +1501,7 @@
|
|
|
1015
1501
|
componentDebugInfo.stack =
|
|
1016
1502
|
null === task.debugStack
|
|
1017
1503
|
? null
|
|
1018
|
-
: filterStackTrace(request, task.debugStack, 1);
|
|
1504
|
+
: filterStackTrace(request, parseStackTrace(task.debugStack, 1));
|
|
1019
1505
|
componentDebugInfo.debugStack = task.debugStack;
|
|
1020
1506
|
request = componentDebugInfo.debugTask = task.debugTask;
|
|
1021
1507
|
currentOwner = componentDebugInfo;
|
|
@@ -1045,9 +1531,7 @@
|
|
|
1045
1531
|
resolvedValue.$$typeof === REACT_ELEMENT_TYPE &&
|
|
1046
1532
|
(resolvedValue._store.validated = 1);
|
|
1047
1533
|
}, voidHandler),
|
|
1048
|
-
|
|
1049
|
-
? result.value
|
|
1050
|
-
: createLazyWrapperAroundWakeable(result)
|
|
1534
|
+
createLazyWrapperAroundWakeable(request, task, result)
|
|
1051
1535
|
);
|
|
1052
1536
|
result.$$typeof === REACT_ELEMENT_TYPE && (result._store.validated = 1);
|
|
1053
1537
|
var iteratorFn = getIteratorFn(result);
|
|
@@ -1100,33 +1584,40 @@
|
|
|
1100
1584
|
) {
|
|
1101
1585
|
var prevThenableState = task.thenableState;
|
|
1102
1586
|
task.thenableState = null;
|
|
1103
|
-
if (
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1587
|
+
if (canEmitDebugInfo)
|
|
1588
|
+
if (null !== prevThenableState)
|
|
1589
|
+
var componentDebugInfo = prevThenableState._componentDebugInfo;
|
|
1590
|
+
else {
|
|
1591
|
+
var componentDebugID = task.id;
|
|
1592
|
+
componentDebugInfo = Component.displayName || Component.name || "";
|
|
1593
|
+
var componentEnv = (0, request.environmentName)();
|
|
1594
|
+
request.pendingChunks++;
|
|
1595
|
+
componentDebugInfo = {
|
|
1596
|
+
name: componentDebugInfo,
|
|
1597
|
+
env: componentEnv,
|
|
1598
|
+
key: key,
|
|
1599
|
+
owner: task.debugOwner
|
|
1600
|
+
};
|
|
1601
|
+
componentDebugInfo.stack =
|
|
1602
|
+
null === task.debugStack
|
|
1603
|
+
? null
|
|
1604
|
+
: filterStackTrace(request, parseStackTrace(task.debugStack, 1));
|
|
1605
|
+
componentDebugInfo.props = props;
|
|
1606
|
+
componentDebugInfo.debugStack = task.debugStack;
|
|
1607
|
+
componentDebugInfo.debugTask = task.debugTask;
|
|
1608
|
+
outlineComponentInfo(request, componentDebugInfo);
|
|
1609
|
+
var timestamp = performance.now();
|
|
1610
|
+
timestamp > task.time
|
|
1611
|
+
? (emitTimingChunk(request, task.id, timestamp),
|
|
1612
|
+
(task.time = timestamp))
|
|
1613
|
+
: task.timed || emitTimingChunk(request, task.id, task.time);
|
|
1614
|
+
task.timed = !0;
|
|
1615
|
+
emitDebugChunk(request, componentDebugID, componentDebugInfo);
|
|
1616
|
+
task.environmentName = componentEnv;
|
|
1617
|
+
2 === validated &&
|
|
1618
|
+
warnForMissingKey(request, key, componentDebugInfo, task.debugTask);
|
|
1619
|
+
}
|
|
1620
|
+
else return outlineTask(request, task);
|
|
1130
1621
|
thenableIndexCounter = 0;
|
|
1131
1622
|
thenableState = prevThenableState;
|
|
1132
1623
|
currentComponentDebugInfo = componentDebugInfo;
|
|
@@ -1168,20 +1659,38 @@
|
|
|
1168
1659
|
props.then(voidHandler, voidHandler),
|
|
1169
1660
|
null)
|
|
1170
1661
|
);
|
|
1662
|
+
validated = thenableState;
|
|
1663
|
+
if (null !== validated)
|
|
1664
|
+
for (
|
|
1665
|
+
prevThenableState = validated._stacks || (validated._stacks = []),
|
|
1666
|
+
componentDebugID = 0;
|
|
1667
|
+
componentDebugID < validated.length;
|
|
1668
|
+
componentDebugID++
|
|
1669
|
+
)
|
|
1670
|
+
forwardDebugInfoFromThenable(
|
|
1671
|
+
request,
|
|
1672
|
+
task,
|
|
1673
|
+
validated[componentDebugID],
|
|
1674
|
+
componentDebugInfo,
|
|
1675
|
+
prevThenableState[componentDebugID]
|
|
1676
|
+
);
|
|
1171
1677
|
props = processServerComponentReturnValue(
|
|
1172
1678
|
request,
|
|
1173
1679
|
task,
|
|
1174
1680
|
Component,
|
|
1175
1681
|
props
|
|
1176
1682
|
);
|
|
1683
|
+
task.debugOwner = componentDebugInfo;
|
|
1684
|
+
task.debugStack = null;
|
|
1685
|
+
task.debugTask = null;
|
|
1177
1686
|
Component = task.keyPath;
|
|
1178
|
-
|
|
1687
|
+
componentDebugInfo = task.implicitSlot;
|
|
1179
1688
|
null !== key
|
|
1180
1689
|
? (task.keyPath = null === Component ? key : Component + "," + key)
|
|
1181
1690
|
: null === Component && (task.implicitSlot = !0);
|
|
1182
1691
|
request = renderModelDestructive(request, task, emptyRoot, "", props);
|
|
1183
1692
|
task.keyPath = Component;
|
|
1184
|
-
task.implicitSlot =
|
|
1693
|
+
task.implicitSlot = componentDebugInfo;
|
|
1185
1694
|
return request;
|
|
1186
1695
|
}
|
|
1187
1696
|
function warnForMissingKey(request, key, componentDebugInfo, debugTask) {
|
|
@@ -1253,8 +1762,8 @@
|
|
|
1253
1762
|
task.implicitSlot ? [request] : request
|
|
1254
1763
|
);
|
|
1255
1764
|
if ((i = children._debugInfo)) {
|
|
1256
|
-
if (
|
|
1257
|
-
|
|
1765
|
+
if (canEmitDebugInfo) forwardDebugInfo(request, task, i);
|
|
1766
|
+
else return outlineTask(request, task);
|
|
1258
1767
|
children = Array.from(children);
|
|
1259
1768
|
}
|
|
1260
1769
|
return children;
|
|
@@ -1276,21 +1785,39 @@
|
|
|
1276
1785
|
getAsyncIterator = getAsyncIterator.call(children);
|
|
1277
1786
|
return serializeAsyncIterable(request, task, children, getAsyncIterator);
|
|
1278
1787
|
}
|
|
1788
|
+
function deferTask(request, task) {
|
|
1789
|
+
task = createTask(
|
|
1790
|
+
request,
|
|
1791
|
+
task.model,
|
|
1792
|
+
task.keyPath,
|
|
1793
|
+
task.implicitSlot,
|
|
1794
|
+
task.formatContext,
|
|
1795
|
+
request.abortableTasks,
|
|
1796
|
+
task.time,
|
|
1797
|
+
task.debugOwner,
|
|
1798
|
+
task.debugStack,
|
|
1799
|
+
task.debugTask
|
|
1800
|
+
);
|
|
1801
|
+
pingTask(request, task);
|
|
1802
|
+
return serializeLazyID(task.id);
|
|
1803
|
+
}
|
|
1279
1804
|
function outlineTask(request, task) {
|
|
1280
1805
|
task = createTask(
|
|
1281
1806
|
request,
|
|
1282
1807
|
task.model,
|
|
1283
1808
|
task.keyPath,
|
|
1284
1809
|
task.implicitSlot,
|
|
1810
|
+
task.formatContext,
|
|
1285
1811
|
request.abortableTasks,
|
|
1812
|
+
task.time,
|
|
1286
1813
|
task.debugOwner,
|
|
1287
1814
|
task.debugStack,
|
|
1288
1815
|
task.debugTask
|
|
1289
1816
|
);
|
|
1290
1817
|
retryTask(request, task);
|
|
1291
|
-
return task.status
|
|
1818
|
+
return 1 === task.status
|
|
1292
1819
|
? serializeByValueID(task.id)
|
|
1293
|
-
:
|
|
1820
|
+
: serializeLazyID(task.id);
|
|
1294
1821
|
}
|
|
1295
1822
|
function renderElement(request, task, type, key, ref, props, validated) {
|
|
1296
1823
|
if (null !== ref && void 0 !== ref)
|
|
@@ -1317,7 +1844,10 @@
|
|
|
1317
1844
|
stack:
|
|
1318
1845
|
null === task.debugStack
|
|
1319
1846
|
? null
|
|
1320
|
-
: filterStackTrace(
|
|
1847
|
+
: filterStackTrace(
|
|
1848
|
+
request,
|
|
1849
|
+
parseStackTrace(task.debugStack, 1)
|
|
1850
|
+
),
|
|
1321
1851
|
props: props,
|
|
1322
1852
|
debugStack: task.debugStack,
|
|
1323
1853
|
debugTask: task.debugTask
|
|
@@ -1375,6 +1905,17 @@
|
|
|
1375
1905
|
case REACT_ELEMENT_TYPE:
|
|
1376
1906
|
type._store.validated = 1;
|
|
1377
1907
|
}
|
|
1908
|
+
else if ("string" === typeof type) {
|
|
1909
|
+
ref = task.formatContext;
|
|
1910
|
+
var newFormatContext = getChildFormatContext(ref, type, props);
|
|
1911
|
+
ref !== newFormatContext &&
|
|
1912
|
+
null != props.children &&
|
|
1913
|
+
outlineModelWithFormatContext(
|
|
1914
|
+
request,
|
|
1915
|
+
props.children,
|
|
1916
|
+
newFormatContext
|
|
1917
|
+
);
|
|
1918
|
+
}
|
|
1378
1919
|
} else
|
|
1379
1920
|
return renderFunctionComponent(
|
|
1380
1921
|
request,
|
|
@@ -1386,28 +1927,40 @@
|
|
|
1386
1927
|
);
|
|
1387
1928
|
ref = task.keyPath;
|
|
1388
1929
|
null === key ? (key = ref) : null !== ref && (key = ref + "," + key);
|
|
1389
|
-
|
|
1390
|
-
|
|
1930
|
+
newFormatContext = null;
|
|
1931
|
+
ref = task.debugOwner;
|
|
1932
|
+
null !== ref && outlineComponentInfo(request, ref);
|
|
1933
|
+
if (null !== task.debugStack) {
|
|
1934
|
+
newFormatContext = filterStackTrace(
|
|
1935
|
+
request,
|
|
1936
|
+
parseStackTrace(task.debugStack, 1)
|
|
1937
|
+
);
|
|
1938
|
+
var id = outlineDebugModel(
|
|
1939
|
+
request,
|
|
1940
|
+
{ objectLimit: 2 * newFormatContext.length + 1 },
|
|
1941
|
+
newFormatContext
|
|
1942
|
+
);
|
|
1943
|
+
request.writtenObjects.set(newFormatContext, serializeByValueID(id));
|
|
1944
|
+
}
|
|
1391
1945
|
request = [
|
|
1392
1946
|
REACT_ELEMENT_TYPE,
|
|
1393
1947
|
type,
|
|
1394
1948
|
key,
|
|
1395
1949
|
props,
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
? null
|
|
1399
|
-
: filterStackTrace(request, task.debugStack, 1),
|
|
1950
|
+
ref,
|
|
1951
|
+
newFormatContext,
|
|
1400
1952
|
validated
|
|
1401
1953
|
];
|
|
1402
1954
|
task = task.implicitSlot && null !== key ? [request] : request;
|
|
1403
1955
|
return task;
|
|
1404
1956
|
}
|
|
1405
1957
|
function pingTask(request, task) {
|
|
1958
|
+
task.timed = !0;
|
|
1406
1959
|
var pingedTasks = request.pingedTasks;
|
|
1407
1960
|
pingedTasks.push(task);
|
|
1408
1961
|
1 === pingedTasks.length &&
|
|
1409
1962
|
((request.flushScheduled = null !== request.destination),
|
|
1410
|
-
request.type
|
|
1963
|
+
21 === request.type || 10 === request.status
|
|
1411
1964
|
? scheduleMicrotask(function () {
|
|
1412
1965
|
return performWork(request);
|
|
1413
1966
|
})
|
|
@@ -1420,7 +1973,9 @@
|
|
|
1420
1973
|
model,
|
|
1421
1974
|
keyPath,
|
|
1422
1975
|
implicitSlot,
|
|
1976
|
+
formatContext,
|
|
1423
1977
|
abortSet,
|
|
1978
|
+
lastTimestamp,
|
|
1424
1979
|
debugOwner,
|
|
1425
1980
|
debugStack,
|
|
1426
1981
|
debugTask
|
|
@@ -1434,10 +1989,11 @@
|
|
|
1434
1989
|
request.writtenObjects.set(model, serializeByValueID(id));
|
|
1435
1990
|
var task = {
|
|
1436
1991
|
id: id,
|
|
1437
|
-
status:
|
|
1992
|
+
status: 0,
|
|
1438
1993
|
model: model,
|
|
1439
1994
|
keyPath: keyPath,
|
|
1440
1995
|
implicitSlot: implicitSlot,
|
|
1996
|
+
formatContext: formatContext,
|
|
1441
1997
|
ping: function () {
|
|
1442
1998
|
return pingTask(request, task);
|
|
1443
1999
|
},
|
|
@@ -1467,8 +2023,10 @@
|
|
|
1467
2023
|
});
|
|
1468
2024
|
return renderModel(request, task, parent, parentPropertyName, value);
|
|
1469
2025
|
},
|
|
1470
|
-
thenableState: null
|
|
2026
|
+
thenableState: null,
|
|
2027
|
+
timed: !1
|
|
1471
2028
|
};
|
|
2029
|
+
task.time = lastTimestamp;
|
|
1472
2030
|
task.environmentName = request.environmentName();
|
|
1473
2031
|
task.debugOwner = debugOwner;
|
|
1474
2032
|
task.debugStack = debugStack;
|
|
@@ -1479,6 +2037,19 @@
|
|
|
1479
2037
|
function serializeByValueID(id) {
|
|
1480
2038
|
return "$" + id.toString(16);
|
|
1481
2039
|
}
|
|
2040
|
+
function serializeLazyID(id) {
|
|
2041
|
+
return "$L" + id.toString(16);
|
|
2042
|
+
}
|
|
2043
|
+
function serializeDeferredObject(request, value) {
|
|
2044
|
+
var deferredDebugObjects = request.deferredDebugObjects;
|
|
2045
|
+
return null !== deferredDebugObjects
|
|
2046
|
+
? (request.pendingDebugChunks++,
|
|
2047
|
+
(request = request.nextChunkId++),
|
|
2048
|
+
deferredDebugObjects.existing.set(value, request),
|
|
2049
|
+
deferredDebugObjects.retained.set(request, value),
|
|
2050
|
+
"$Y" + request.toString(16))
|
|
2051
|
+
: "$Y";
|
|
2052
|
+
}
|
|
1482
2053
|
function serializeNumber(number) {
|
|
1483
2054
|
return Number.isFinite(number)
|
|
1484
2055
|
? 0 === number && -Infinity === 1 / number
|
|
@@ -1508,63 +2079,78 @@
|
|
|
1508
2079
|
existingId = writtenClientReferences.get(clientReferenceKey);
|
|
1509
2080
|
if (void 0 !== existingId)
|
|
1510
2081
|
return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName
|
|
1511
|
-
?
|
|
2082
|
+
? serializeLazyID(existingId)
|
|
1512
2083
|
: serializeByValueID(existingId);
|
|
1513
2084
|
try {
|
|
1514
|
-
var
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
if (resolvedModuleData) existingId = resolvedModuleData.name;
|
|
1519
|
-
else {
|
|
1520
|
-
var idx = modulePath.lastIndexOf("#");
|
|
1521
|
-
-1 !== idx &&
|
|
1522
|
-
((existingId = modulePath.slice(idx + 1)),
|
|
1523
|
-
(resolvedModuleData = config[modulePath.slice(0, idx)]));
|
|
1524
|
-
if (!resolvedModuleData)
|
|
1525
|
-
throw Error(
|
|
1526
|
-
'Could not find the module "' +
|
|
1527
|
-
modulePath +
|
|
1528
|
-
'" in the React Client Manifest. This is probably a bug in the React Server Components bundler.'
|
|
1529
|
-
);
|
|
1530
|
-
}
|
|
1531
|
-
if (!0 === resolvedModuleData.async && !0 === clientReference.$$async)
|
|
1532
|
-
throw Error(
|
|
1533
|
-
'The module "' +
|
|
1534
|
-
modulePath +
|
|
1535
|
-
'" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.'
|
|
1536
|
-
);
|
|
1537
|
-
var clientReferenceMetadata =
|
|
1538
|
-
!0 === resolvedModuleData.async || !0 === clientReference.$$async
|
|
1539
|
-
? [resolvedModuleData.id, resolvedModuleData.chunks, existingId, 1]
|
|
1540
|
-
: [resolvedModuleData.id, resolvedModuleData.chunks, existingId];
|
|
2085
|
+
var clientReferenceMetadata = resolveClientReferenceMetadata(
|
|
2086
|
+
request.bundlerConfig,
|
|
2087
|
+
clientReference
|
|
2088
|
+
);
|
|
1541
2089
|
request.pendingChunks++;
|
|
1542
|
-
var importId = request.nextChunkId
|
|
1543
|
-
|
|
1544
|
-
row = importId.toString(16) + ":I" + json + "\n",
|
|
1545
|
-
processedChunk = stringToChunk(row);
|
|
1546
|
-
request.completedImportChunks.push(processedChunk);
|
|
2090
|
+
var importId = request.nextChunkId++;
|
|
2091
|
+
emitImportChunk(request, importId, clientReferenceMetadata, !1);
|
|
1547
2092
|
writtenClientReferences.set(clientReferenceKey, importId);
|
|
1548
2093
|
return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName
|
|
1549
|
-
?
|
|
2094
|
+
? serializeLazyID(importId)
|
|
1550
2095
|
: serializeByValueID(importId);
|
|
1551
2096
|
} catch (x) {
|
|
1552
2097
|
return (
|
|
1553
2098
|
request.pendingChunks++,
|
|
1554
2099
|
(parent = request.nextChunkId++),
|
|
1555
2100
|
(parentPropertyName = logRecoverableError(request, x, null)),
|
|
1556
|
-
emitErrorChunk(request, parent, parentPropertyName, x),
|
|
2101
|
+
emitErrorChunk(request, parent, parentPropertyName, x, !1, null),
|
|
2102
|
+
serializeByValueID(parent)
|
|
2103
|
+
);
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
function serializeDebugClientReference(
|
|
2107
|
+
request,
|
|
2108
|
+
parent,
|
|
2109
|
+
parentPropertyName,
|
|
2110
|
+
clientReference
|
|
2111
|
+
) {
|
|
2112
|
+
var existingId = request.writtenClientReferences.get(
|
|
2113
|
+
clientReference.$$async
|
|
2114
|
+
? clientReference.$$id + "#async"
|
|
2115
|
+
: clientReference.$$id
|
|
2116
|
+
);
|
|
2117
|
+
if (void 0 !== existingId)
|
|
2118
|
+
return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName
|
|
2119
|
+
? serializeLazyID(existingId)
|
|
2120
|
+
: serializeByValueID(existingId);
|
|
2121
|
+
try {
|
|
2122
|
+
var clientReferenceMetadata = resolveClientReferenceMetadata(
|
|
2123
|
+
request.bundlerConfig,
|
|
2124
|
+
clientReference
|
|
2125
|
+
);
|
|
2126
|
+
request.pendingDebugChunks++;
|
|
2127
|
+
var importId = request.nextChunkId++;
|
|
2128
|
+
emitImportChunk(request, importId, clientReferenceMetadata, !0);
|
|
2129
|
+
return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName
|
|
2130
|
+
? serializeLazyID(importId)
|
|
2131
|
+
: serializeByValueID(importId);
|
|
2132
|
+
} catch (x) {
|
|
2133
|
+
return (
|
|
2134
|
+
request.pendingDebugChunks++,
|
|
2135
|
+
(parent = request.nextChunkId++),
|
|
2136
|
+
(parentPropertyName = logRecoverableError(request, x, null)),
|
|
2137
|
+
emitErrorChunk(request, parent, parentPropertyName, x, !0, null),
|
|
1557
2138
|
serializeByValueID(parent)
|
|
1558
2139
|
);
|
|
1559
2140
|
}
|
|
1560
2141
|
}
|
|
1561
2142
|
function outlineModel(request, value) {
|
|
2143
|
+
return outlineModelWithFormatContext(request, value, 0);
|
|
2144
|
+
}
|
|
2145
|
+
function outlineModelWithFormatContext(request, value, formatContext) {
|
|
1562
2146
|
value = createTask(
|
|
1563
2147
|
request,
|
|
1564
2148
|
value,
|
|
1565
2149
|
null,
|
|
1566
2150
|
!1,
|
|
2151
|
+
formatContext,
|
|
1567
2152
|
request.abortableTasks,
|
|
2153
|
+
performance.now(),
|
|
1568
2154
|
null,
|
|
1569
2155
|
null,
|
|
1570
2156
|
null
|
|
@@ -1583,7 +2169,9 @@
|
|
|
1583
2169
|
error = serverReference.$$location;
|
|
1584
2170
|
error &&
|
|
1585
2171
|
((error = parseStackTrace(error, 1)),
|
|
1586
|
-
0 < error.length &&
|
|
2172
|
+
0 < error.length &&
|
|
2173
|
+
((location = error[0]),
|
|
2174
|
+
(location = [location[0], location[1], location[2], location[3]])));
|
|
1587
2175
|
existingId =
|
|
1588
2176
|
null !== location
|
|
1589
2177
|
? {
|
|
@@ -1604,7 +2192,7 @@
|
|
|
1604
2192
|
function serializeLargeTextString(request, text) {
|
|
1605
2193
|
request.pendingChunks++;
|
|
1606
2194
|
var textId = request.nextChunkId++;
|
|
1607
|
-
emitTextChunk(request, textId, text);
|
|
2195
|
+
emitTextChunk(request, textId, text, !1);
|
|
1608
2196
|
return serializeByValueID(textId);
|
|
1609
2197
|
}
|
|
1610
2198
|
function serializeMap(request, map) {
|
|
@@ -1622,15 +2210,50 @@
|
|
|
1622
2210
|
function serializeTypedArray(request, tag, typedArray) {
|
|
1623
2211
|
request.pendingChunks++;
|
|
1624
2212
|
var bufferId = request.nextChunkId++;
|
|
1625
|
-
emitTypedArrayChunk(request, bufferId, tag, typedArray);
|
|
2213
|
+
emitTypedArrayChunk(request, bufferId, tag, typedArray, !1);
|
|
1626
2214
|
return serializeByValueID(bufferId);
|
|
1627
2215
|
}
|
|
2216
|
+
function serializeDebugTypedArray(request, tag, typedArray) {
|
|
2217
|
+
request.pendingDebugChunks++;
|
|
2218
|
+
var bufferId = request.nextChunkId++;
|
|
2219
|
+
emitTypedArrayChunk(request, bufferId, tag, typedArray, !0);
|
|
2220
|
+
return serializeByValueID(bufferId);
|
|
2221
|
+
}
|
|
2222
|
+
function serializeDebugBlob(request, blob) {
|
|
2223
|
+
function progress(entry) {
|
|
2224
|
+
if (entry.done)
|
|
2225
|
+
emitOutlinedDebugModelChunk(
|
|
2226
|
+
request,
|
|
2227
|
+
id,
|
|
2228
|
+
{ objectLimit: model.length + 2 },
|
|
2229
|
+
model
|
|
2230
|
+
),
|
|
2231
|
+
enqueueFlush(request);
|
|
2232
|
+
else
|
|
2233
|
+
return (
|
|
2234
|
+
model.push(entry.value), reader.read().then(progress).catch(error)
|
|
2235
|
+
);
|
|
2236
|
+
}
|
|
2237
|
+
function error(reason) {
|
|
2238
|
+
emitErrorChunk(request, id, "", reason, !0, null);
|
|
2239
|
+
enqueueFlush(request);
|
|
2240
|
+
reader.cancel(reason).then(noop, noop);
|
|
2241
|
+
}
|
|
2242
|
+
var model = [blob.type],
|
|
2243
|
+
reader = blob.stream().getReader();
|
|
2244
|
+
request.pendingDebugChunks++;
|
|
2245
|
+
var id = request.nextChunkId++;
|
|
2246
|
+
reader.read().then(progress).catch(error);
|
|
2247
|
+
return "$B" + id.toString(16);
|
|
2248
|
+
}
|
|
1628
2249
|
function serializeBlob(request, blob) {
|
|
1629
2250
|
function progress(entry) {
|
|
1630
|
-
if (
|
|
2251
|
+
if (0 === newTask.status)
|
|
1631
2252
|
if (entry.done)
|
|
1632
|
-
request.
|
|
1633
|
-
|
|
2253
|
+
request.cacheController.signal.removeEventListener(
|
|
2254
|
+
"abort",
|
|
2255
|
+
abortBlob
|
|
2256
|
+
),
|
|
1634
2257
|
pingTask(request, newTask);
|
|
1635
2258
|
else
|
|
1636
2259
|
return (
|
|
@@ -1638,20 +2261,27 @@
|
|
|
1638
2261
|
);
|
|
1639
2262
|
}
|
|
1640
2263
|
function error(reason) {
|
|
1641
|
-
|
|
1642
|
-
((
|
|
1643
|
-
|
|
2264
|
+
0 === newTask.status &&
|
|
2265
|
+
(request.cacheController.signal.removeEventListener(
|
|
2266
|
+
"abort",
|
|
2267
|
+
abortBlob
|
|
2268
|
+
),
|
|
1644
2269
|
erroredTask(request, newTask, reason),
|
|
1645
2270
|
enqueueFlush(request),
|
|
1646
2271
|
reader.cancel(reason).then(error, error));
|
|
1647
2272
|
}
|
|
1648
|
-
function abortBlob(
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
2273
|
+
function abortBlob() {
|
|
2274
|
+
if (0 === newTask.status) {
|
|
2275
|
+
var signal = request.cacheController.signal;
|
|
2276
|
+
signal.removeEventListener("abort", abortBlob);
|
|
2277
|
+
signal = signal.reason;
|
|
2278
|
+
21 === request.type
|
|
2279
|
+
? (request.abortableTasks.delete(newTask),
|
|
2280
|
+
haltTask(newTask),
|
|
2281
|
+
finishHaltedTask(newTask, request))
|
|
2282
|
+
: (erroredTask(request, newTask, signal), enqueueFlush(request));
|
|
2283
|
+
reader.cancel(signal).then(error, error);
|
|
2284
|
+
}
|
|
1655
2285
|
}
|
|
1656
2286
|
var model = [blob.type],
|
|
1657
2287
|
newTask = createTask(
|
|
@@ -1659,18 +2289,20 @@
|
|
|
1659
2289
|
model,
|
|
1660
2290
|
null,
|
|
1661
2291
|
!1,
|
|
2292
|
+
0,
|
|
1662
2293
|
request.abortableTasks,
|
|
2294
|
+
performance.now(),
|
|
1663
2295
|
null,
|
|
1664
2296
|
null,
|
|
1665
2297
|
null
|
|
1666
2298
|
),
|
|
1667
|
-
reader = blob.stream().getReader()
|
|
1668
|
-
|
|
1669
|
-
request.abortListeners.add(abortBlob);
|
|
2299
|
+
reader = blob.stream().getReader();
|
|
2300
|
+
request.cacheController.signal.addEventListener("abort", abortBlob);
|
|
1670
2301
|
reader.read().then(progress).catch(error);
|
|
1671
2302
|
return "$B" + newTask.id.toString(16);
|
|
1672
2303
|
}
|
|
1673
2304
|
function renderModel(request, task, parent, key, value) {
|
|
2305
|
+
serializedSize += key.length;
|
|
1674
2306
|
var prevKeyPath = task.keyPath,
|
|
1675
2307
|
prevImplicitSlot = task.implicitSlot;
|
|
1676
2308
|
try {
|
|
@@ -1682,12 +2314,19 @@
|
|
|
1682
2314
|
null !== parent &&
|
|
1683
2315
|
(parent.$$typeof === REACT_ELEMENT_TYPE ||
|
|
1684
2316
|
parent.$$typeof === REACT_LAZY_TYPE);
|
|
1685
|
-
if (request.status === ABORTING)
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
(
|
|
1689
|
-
|
|
1690
|
-
|
|
2317
|
+
if (request.status === ABORTING) {
|
|
2318
|
+
task.status = 3;
|
|
2319
|
+
if (21 === request.type)
|
|
2320
|
+
return (
|
|
2321
|
+
(task = request.nextChunkId++),
|
|
2322
|
+
(task = parent
|
|
2323
|
+
? serializeLazyID(task)
|
|
2324
|
+
: serializeByValueID(task)),
|
|
2325
|
+
task
|
|
2326
|
+
);
|
|
2327
|
+
task = request.fatalError;
|
|
2328
|
+
return parent ? serializeLazyID(task) : serializeByValueID(task);
|
|
2329
|
+
}
|
|
1691
2330
|
key =
|
|
1692
2331
|
thrownValue === SuspenseException
|
|
1693
2332
|
? getSuspendedThenable()
|
|
@@ -1703,7 +2342,9 @@
|
|
|
1703
2342
|
task.model,
|
|
1704
2343
|
task.keyPath,
|
|
1705
2344
|
task.implicitSlot,
|
|
2345
|
+
task.formatContext,
|
|
1706
2346
|
request.abortableTasks,
|
|
2347
|
+
task.time,
|
|
1707
2348
|
task.debugOwner,
|
|
1708
2349
|
task.debugStack,
|
|
1709
2350
|
task.debugTask
|
|
@@ -1714,17 +2355,24 @@
|
|
|
1714
2355
|
(task.keyPath = prevKeyPath),
|
|
1715
2356
|
(task.implicitSlot = prevImplicitSlot),
|
|
1716
2357
|
parent
|
|
1717
|
-
?
|
|
2358
|
+
? serializeLazyID(request.id)
|
|
1718
2359
|
: serializeByValueID(request.id)
|
|
1719
2360
|
);
|
|
1720
2361
|
task.keyPath = prevKeyPath;
|
|
1721
2362
|
task.implicitSlot = prevImplicitSlot;
|
|
1722
2363
|
request.pendingChunks++;
|
|
1723
2364
|
prevKeyPath = request.nextChunkId++;
|
|
1724
|
-
|
|
1725
|
-
emitErrorChunk(
|
|
2365
|
+
prevImplicitSlot = logRecoverableError(request, key, task);
|
|
2366
|
+
emitErrorChunk(
|
|
2367
|
+
request,
|
|
2368
|
+
prevKeyPath,
|
|
2369
|
+
prevImplicitSlot,
|
|
2370
|
+
key,
|
|
2371
|
+
!1,
|
|
2372
|
+
task.debugOwner
|
|
2373
|
+
);
|
|
1726
2374
|
return parent
|
|
1727
|
-
?
|
|
2375
|
+
? serializeLazyID(prevKeyPath)
|
|
1728
2376
|
: serializeByValueID(prevKeyPath);
|
|
1729
2377
|
}
|
|
1730
2378
|
}
|
|
@@ -1756,21 +2404,37 @@
|
|
|
1756
2404
|
_existingReference + ":" + parentPropertyName),
|
|
1757
2405
|
_writtenObjects.set(value, elementReference)));
|
|
1758
2406
|
}
|
|
1759
|
-
if (
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
2407
|
+
if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task);
|
|
2408
|
+
if ((_existingReference = value._debugInfo))
|
|
2409
|
+
if (canEmitDebugInfo)
|
|
2410
|
+
forwardDebugInfo(request, task, _existingReference);
|
|
2411
|
+
else return outlineTask(request, task);
|
|
1763
2412
|
_existingReference = value.props;
|
|
1764
2413
|
var refProp = _existingReference.ref;
|
|
2414
|
+
refProp = void 0 !== refProp ? refProp : null;
|
|
1765
2415
|
task.debugOwner = value._owner;
|
|
1766
2416
|
task.debugStack = value._debugStack;
|
|
1767
2417
|
task.debugTask = value._debugTask;
|
|
1768
|
-
|
|
2418
|
+
if (
|
|
2419
|
+
void 0 === value._owner ||
|
|
2420
|
+
void 0 === value._debugStack ||
|
|
2421
|
+
void 0 === value._debugTask
|
|
2422
|
+
) {
|
|
2423
|
+
var key = "";
|
|
2424
|
+
null !== value.key && (key = ' key="' + value.key + '"');
|
|
2425
|
+
console.error(
|
|
2426
|
+
"Attempted to render <%s%s> without development properties. This is not supported. It can happen if:\n- The element is created with a production version of React but rendered in development.\n- The element was cloned with a custom function instead of `React.cloneElement`.\nThe props of this element may help locate this element: %o",
|
|
2427
|
+
value.type,
|
|
2428
|
+
key,
|
|
2429
|
+
value.props
|
|
2430
|
+
);
|
|
2431
|
+
}
|
|
2432
|
+
request = renderElement(
|
|
1769
2433
|
request,
|
|
1770
2434
|
task,
|
|
1771
2435
|
value.type,
|
|
1772
2436
|
value.key,
|
|
1773
|
-
|
|
2437
|
+
refProp,
|
|
1774
2438
|
_existingReference,
|
|
1775
2439
|
value._store.validated
|
|
1776
2440
|
);
|
|
@@ -1781,13 +2445,14 @@
|
|
|
1781
2445
|
_writtenObjects.set(request, elementReference));
|
|
1782
2446
|
return request;
|
|
1783
2447
|
case REACT_LAZY_TYPE:
|
|
2448
|
+
if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task);
|
|
1784
2449
|
task.thenableState = null;
|
|
1785
2450
|
elementReference = callLazyInitInDEV(value);
|
|
1786
2451
|
if (request.status === ABORTING) throw null;
|
|
1787
|
-
if ((_writtenObjects = value._debugInfo))
|
|
1788
|
-
if (
|
|
1789
|
-
|
|
1790
|
-
|
|
2452
|
+
if ((_writtenObjects = value._debugInfo))
|
|
2453
|
+
if (canEmitDebugInfo)
|
|
2454
|
+
forwardDebugInfo(request, task, _writtenObjects);
|
|
2455
|
+
else return outlineTask(request, task);
|
|
1791
2456
|
return renderModelDestructive(
|
|
1792
2457
|
request,
|
|
1793
2458
|
task,
|
|
@@ -1829,8 +2494,11 @@
|
|
|
1829
2494
|
return request;
|
|
1830
2495
|
}
|
|
1831
2496
|
if (void 0 !== _writtenObjects)
|
|
1832
|
-
if (modelRoot === value)
|
|
1833
|
-
|
|
2497
|
+
if (modelRoot === value) {
|
|
2498
|
+
if (_writtenObjects !== serializeByValueID(task.id))
|
|
2499
|
+
return _writtenObjects;
|
|
2500
|
+
modelRoot = null;
|
|
2501
|
+
} else return _writtenObjects;
|
|
1834
2502
|
else if (
|
|
1835
2503
|
-1 === parentPropertyName.indexOf(":") &&
|
|
1836
2504
|
((_writtenObjects = elementReference.get(parent)),
|
|
@@ -1946,14 +2614,17 @@
|
|
|
1946
2614
|
return value;
|
|
1947
2615
|
}
|
|
1948
2616
|
if ("string" === typeof value)
|
|
1949
|
-
return
|
|
2617
|
+
return (
|
|
2618
|
+
(serializedSize += value.length),
|
|
2619
|
+
"Z" === value[value.length - 1] &&
|
|
1950
2620
|
parent[parentPropertyName] instanceof Date
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
2621
|
+
? "$D" + value
|
|
2622
|
+
: 1024 <= value.length && null !== byteLengthOfChunk
|
|
2623
|
+
? serializeLargeTextString(request, value)
|
|
2624
|
+
: "$" === value[0]
|
|
2625
|
+
? "$" + value
|
|
2626
|
+
: value
|
|
2627
|
+
);
|
|
1957
2628
|
if ("boolean" === typeof value) return value;
|
|
1958
2629
|
if ("number" === typeof value) return serializeNumber(value);
|
|
1959
2630
|
if ("undefined" === typeof value) return "$undefined";
|
|
@@ -2066,7 +2737,10 @@
|
|
|
2066
2737
|
null !== request.destination
|
|
2067
2738
|
? ((request.status = CLOSED),
|
|
2068
2739
|
closeWithError(request.destination, error))
|
|
2069
|
-
: ((request.status =
|
|
2740
|
+
: ((request.status = 13), (request.fatalError = error));
|
|
2741
|
+
request.cacheController.abort(
|
|
2742
|
+
Error("The render was aborted due to a fatal error.", { cause: error })
|
|
2743
|
+
);
|
|
2070
2744
|
}
|
|
2071
2745
|
function serializeErrorValue(request, error) {
|
|
2072
2746
|
var name = "Error",
|
|
@@ -2074,7 +2748,7 @@
|
|
|
2074
2748
|
try {
|
|
2075
2749
|
name = error.name;
|
|
2076
2750
|
var message = String(error.message);
|
|
2077
|
-
var stack = filterStackTrace(request, error, 0);
|
|
2751
|
+
var stack = filterStackTrace(request, parseStackTrace(error, 0));
|
|
2078
2752
|
var errorEnv = error.environmentName;
|
|
2079
2753
|
"string" === typeof errorEnv && (env = errorEnv);
|
|
2080
2754
|
} catch (x) {
|
|
@@ -2092,14 +2766,14 @@
|
|
|
2092
2766
|
}).toString(16)
|
|
2093
2767
|
);
|
|
2094
2768
|
}
|
|
2095
|
-
function emitErrorChunk(request, id, digest, error) {
|
|
2769
|
+
function emitErrorChunk(request, id, digest, error, debug, owner) {
|
|
2096
2770
|
var name = "Error",
|
|
2097
2771
|
env = (0, request.environmentName)();
|
|
2098
2772
|
try {
|
|
2099
2773
|
if (error instanceof Error) {
|
|
2100
2774
|
name = error.name;
|
|
2101
2775
|
var message = String(error.message);
|
|
2102
|
-
var stack = filterStackTrace(request, error, 0);
|
|
2776
|
+
var stack = filterStackTrace(request, parseStackTrace(error, 0));
|
|
2103
2777
|
var errorEnv = error.environmentName;
|
|
2104
2778
|
"string" === typeof errorEnv && (env = errorEnv);
|
|
2105
2779
|
} else
|
|
@@ -2113,16 +2787,28 @@
|
|
|
2113
2787
|
"An error occurred but serializing the error message failed."),
|
|
2114
2788
|
(stack = []);
|
|
2115
2789
|
}
|
|
2790
|
+
error = null == owner ? null : outlineComponentInfo(request, owner);
|
|
2116
2791
|
digest = {
|
|
2117
2792
|
digest: digest,
|
|
2118
2793
|
name: name,
|
|
2119
2794
|
message: message,
|
|
2120
2795
|
stack: stack,
|
|
2121
|
-
env: env
|
|
2796
|
+
env: env,
|
|
2797
|
+
owner: error
|
|
2122
2798
|
};
|
|
2123
2799
|
id = id.toString(16) + ":E" + stringify(digest) + "\n";
|
|
2124
2800
|
id = stringToChunk(id);
|
|
2125
|
-
|
|
2801
|
+
debug
|
|
2802
|
+
? request.completedDebugChunks.push(id)
|
|
2803
|
+
: request.completedErrorChunks.push(id);
|
|
2804
|
+
}
|
|
2805
|
+
function emitImportChunk(request, id, clientReferenceMetadata, debug) {
|
|
2806
|
+
clientReferenceMetadata = stringify(clientReferenceMetadata);
|
|
2807
|
+
id = id.toString(16) + ":I" + clientReferenceMetadata + "\n";
|
|
2808
|
+
id = stringToChunk(id);
|
|
2809
|
+
debug
|
|
2810
|
+
? request.completedDebugChunks.push(id)
|
|
2811
|
+
: request.completedImportChunks.push(id);
|
|
2126
2812
|
}
|
|
2127
2813
|
function emitSymbolChunk(request, id, name) {
|
|
2128
2814
|
id = encodeReferenceChunk(request, id, "$S" + name);
|
|
@@ -2133,50 +2819,55 @@
|
|
|
2133
2819
|
id = stringToChunk(id);
|
|
2134
2820
|
request.completedRegularChunks.push(id);
|
|
2135
2821
|
}
|
|
2136
|
-
function
|
|
2137
|
-
|
|
2138
|
-
debugInfo = stringify(debugInfo, function (parentPropertyName, value) {
|
|
2139
|
-
return renderConsoleValue(
|
|
2140
|
-
request,
|
|
2141
|
-
counter,
|
|
2142
|
-
this,
|
|
2143
|
-
parentPropertyName,
|
|
2144
|
-
value
|
|
2145
|
-
);
|
|
2146
|
-
});
|
|
2147
|
-
id = id.toString(16) + ":D" + debugInfo + "\n";
|
|
2822
|
+
function emitDebugHaltChunk(request, id) {
|
|
2823
|
+
id = id.toString(16) + ":\n";
|
|
2148
2824
|
id = stringToChunk(id);
|
|
2149
|
-
request.
|
|
2825
|
+
request.completedDebugChunks.push(id);
|
|
2150
2826
|
}
|
|
2151
|
-
function
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
key: componentInfo.key,
|
|
2163
|
-
owner: componentInfo.owner
|
|
2164
|
-
};
|
|
2165
|
-
componentDebugInfo.stack = componentInfo.stack;
|
|
2166
|
-
componentDebugInfo.props = componentInfo.props;
|
|
2167
|
-
objectLimit = outlineConsoleValue(
|
|
2168
|
-
request,
|
|
2169
|
-
objectLimit,
|
|
2170
|
-
componentDebugInfo
|
|
2171
|
-
);
|
|
2172
|
-
request.writtenObjects.set(
|
|
2173
|
-
componentInfo,
|
|
2174
|
-
serializeByValueID(objectLimit)
|
|
2175
|
-
);
|
|
2176
|
-
}
|
|
2827
|
+
function emitDebugChunk(request, id, debugInfo) {
|
|
2828
|
+
var json = serializeDebugModel(request, 500, debugInfo);
|
|
2829
|
+
null !== request.debugDestination
|
|
2830
|
+
? ((debugInfo = request.nextChunkId++),
|
|
2831
|
+
(json = debugInfo.toString(16) + ":" + json + "\n"),
|
|
2832
|
+
request.pendingDebugChunks++,
|
|
2833
|
+
request.completedDebugChunks.push(stringToChunk(json)),
|
|
2834
|
+
(id = id.toString(16) + ':D"$' + debugInfo.toString(16) + '"\n'),
|
|
2835
|
+
request.completedRegularChunks.push(stringToChunk(id)))
|
|
2836
|
+
: ((id = id.toString(16) + ":D" + json + "\n"),
|
|
2837
|
+
request.completedRegularChunks.push(stringToChunk(id)));
|
|
2177
2838
|
}
|
|
2178
|
-
function
|
|
2179
|
-
request.
|
|
2839
|
+
function outlineComponentInfo(request, componentInfo) {
|
|
2840
|
+
var existingRef = request.writtenDebugObjects.get(componentInfo);
|
|
2841
|
+
if (void 0 !== existingRef) return existingRef;
|
|
2842
|
+
null != componentInfo.owner &&
|
|
2843
|
+
outlineComponentInfo(request, componentInfo.owner);
|
|
2844
|
+
existingRef = 10;
|
|
2845
|
+
null != componentInfo.stack &&
|
|
2846
|
+
(existingRef += componentInfo.stack.length);
|
|
2847
|
+
existingRef = { objectLimit: existingRef };
|
|
2848
|
+
var componentDebugInfo = {
|
|
2849
|
+
name: componentInfo.name,
|
|
2850
|
+
key: componentInfo.key
|
|
2851
|
+
};
|
|
2852
|
+
null != componentInfo.env && (componentDebugInfo.env = componentInfo.env);
|
|
2853
|
+
null != componentInfo.owner &&
|
|
2854
|
+
(componentDebugInfo.owner = componentInfo.owner);
|
|
2855
|
+
null == componentInfo.stack && null != componentInfo.debugStack
|
|
2856
|
+
? (componentDebugInfo.stack = filterStackTrace(
|
|
2857
|
+
request,
|
|
2858
|
+
parseStackTrace(componentInfo.debugStack, 1)
|
|
2859
|
+
))
|
|
2860
|
+
: null != componentInfo.stack &&
|
|
2861
|
+
(componentDebugInfo.stack = componentInfo.stack);
|
|
2862
|
+
componentDebugInfo.props = componentInfo.props;
|
|
2863
|
+
existingRef = outlineDebugModel(request, existingRef, componentDebugInfo);
|
|
2864
|
+
existingRef = serializeByValueID(existingRef);
|
|
2865
|
+
request.writtenDebugObjects.set(componentInfo, existingRef);
|
|
2866
|
+
request.writtenObjects.set(componentInfo, existingRef);
|
|
2867
|
+
return existingRef;
|
|
2868
|
+
}
|
|
2869
|
+
function emitTypedArrayChunk(request, id, tag, typedArray, debug) {
|
|
2870
|
+
debug ? request.pendingDebugChunks++ : request.pendingChunks++;
|
|
2180
2871
|
var buffer = new Uint8Array(
|
|
2181
2872
|
typedArray.buffer,
|
|
2182
2873
|
typedArray.byteOffset,
|
|
@@ -2186,21 +2877,25 @@
|
|
|
2186
2877
|
buffer = typedArray.byteLength;
|
|
2187
2878
|
id = id.toString(16) + ":" + tag + buffer.toString(16) + ",";
|
|
2188
2879
|
id = stringToChunk(id);
|
|
2189
|
-
|
|
2880
|
+
debug
|
|
2881
|
+
? request.completedDebugChunks.push(id, typedArray)
|
|
2882
|
+
: request.completedRegularChunks.push(id, typedArray);
|
|
2190
2883
|
}
|
|
2191
|
-
function emitTextChunk(request, id, text) {
|
|
2884
|
+
function emitTextChunk(request, id, text, debug) {
|
|
2192
2885
|
if (null === byteLengthOfChunk)
|
|
2193
2886
|
throw Error(
|
|
2194
2887
|
"Existence of byteLengthOfChunk should have already been checked. This is a bug in React."
|
|
2195
2888
|
);
|
|
2196
|
-
request.pendingChunks++;
|
|
2889
|
+
debug ? request.pendingDebugChunks++ : request.pendingChunks++;
|
|
2197
2890
|
text = stringToChunk(text);
|
|
2198
2891
|
var binaryLength = text.byteLength;
|
|
2199
2892
|
id = id.toString(16) + ":T" + binaryLength.toString(16) + ",";
|
|
2200
2893
|
id = stringToChunk(id);
|
|
2201
|
-
|
|
2894
|
+
debug
|
|
2895
|
+
? request.completedDebugChunks.push(id, text)
|
|
2896
|
+
: request.completedRegularChunks.push(id, text);
|
|
2202
2897
|
}
|
|
2203
|
-
function
|
|
2898
|
+
function renderDebugModel(
|
|
2204
2899
|
request,
|
|
2205
2900
|
counter,
|
|
2206
2901
|
parent,
|
|
@@ -2211,21 +2906,80 @@
|
|
|
2211
2906
|
if (value === REACT_ELEMENT_TYPE) return "$";
|
|
2212
2907
|
if ("object" === typeof value) {
|
|
2213
2908
|
if (isClientReference(value))
|
|
2214
|
-
return
|
|
2909
|
+
return serializeDebugClientReference(
|
|
2215
2910
|
request,
|
|
2216
2911
|
parent,
|
|
2217
2912
|
parentPropertyName,
|
|
2218
2913
|
value
|
|
2219
2914
|
);
|
|
2220
|
-
if (
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2915
|
+
if (value.$$typeof === CONSTRUCTOR_MARKER) {
|
|
2916
|
+
value = value.constructor;
|
|
2917
|
+
var ref = request.writtenDebugObjects.get(value);
|
|
2918
|
+
void 0 === ref &&
|
|
2919
|
+
((request = outlineDebugModel(request, counter, value)),
|
|
2920
|
+
(ref = serializeByValueID(request)));
|
|
2921
|
+
return "$P" + ref.slice(1);
|
|
2922
|
+
}
|
|
2923
|
+
if (void 0 !== request.temporaryReferences) {
|
|
2924
|
+
var tempRef = request.temporaryReferences.get(value);
|
|
2925
|
+
if (void 0 !== tempRef) return "$T" + tempRef;
|
|
2926
|
+
}
|
|
2927
|
+
tempRef = request.writtenDebugObjects;
|
|
2928
|
+
var existingDebugReference = tempRef.get(value);
|
|
2929
|
+
if (void 0 !== existingDebugReference)
|
|
2930
|
+
if (debugModelRoot === value) debugModelRoot = null;
|
|
2931
|
+
else return existingDebugReference;
|
|
2932
|
+
else if (-1 === parentPropertyName.indexOf(":"))
|
|
2933
|
+
if (
|
|
2934
|
+
((existingDebugReference = tempRef.get(parent)),
|
|
2935
|
+
void 0 !== existingDebugReference)
|
|
2936
|
+
) {
|
|
2937
|
+
if (0 >= counter.objectLimit && !doNotLimit.has(value))
|
|
2938
|
+
return serializeDeferredObject(request, value);
|
|
2939
|
+
var propertyName = parentPropertyName;
|
|
2940
|
+
if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE)
|
|
2941
|
+
switch (parentPropertyName) {
|
|
2942
|
+
case "1":
|
|
2943
|
+
propertyName = "type";
|
|
2944
|
+
break;
|
|
2945
|
+
case "2":
|
|
2946
|
+
propertyName = "key";
|
|
2947
|
+
break;
|
|
2948
|
+
case "3":
|
|
2949
|
+
propertyName = "props";
|
|
2950
|
+
break;
|
|
2951
|
+
case "4":
|
|
2952
|
+
propertyName = "_owner";
|
|
2953
|
+
}
|
|
2954
|
+
tempRef.set(value, existingDebugReference + ":" + propertyName);
|
|
2955
|
+
} else if (debugNoOutline !== value) {
|
|
2956
|
+
if ("function" === typeof value.then)
|
|
2957
|
+
return serializeDebugThenable(request, counter, value);
|
|
2958
|
+
request = outlineDebugModel(request, counter, value);
|
|
2959
|
+
return serializeByValueID(request);
|
|
2960
|
+
}
|
|
2225
2961
|
parent = request.writtenObjects.get(value);
|
|
2226
2962
|
if (void 0 !== parent) return parent;
|
|
2227
|
-
if (0 >= counter.objectLimit && !doNotLimit.has(value))
|
|
2963
|
+
if (0 >= counter.objectLimit && !doNotLimit.has(value))
|
|
2964
|
+
return serializeDeferredObject(request, value);
|
|
2228
2965
|
counter.objectLimit--;
|
|
2966
|
+
parent = request.deferredDebugObjects;
|
|
2967
|
+
if (
|
|
2968
|
+
null !== parent &&
|
|
2969
|
+
((parentPropertyName = parent.existing.get(value)),
|
|
2970
|
+
void 0 !== parentPropertyName)
|
|
2971
|
+
)
|
|
2972
|
+
return (
|
|
2973
|
+
parent.existing.delete(value),
|
|
2974
|
+
parent.retained.delete(parentPropertyName),
|
|
2975
|
+
emitOutlinedDebugModelChunk(
|
|
2976
|
+
request,
|
|
2977
|
+
parentPropertyName,
|
|
2978
|
+
counter,
|
|
2979
|
+
value
|
|
2980
|
+
),
|
|
2981
|
+
serializeByValueID(parentPropertyName)
|
|
2982
|
+
);
|
|
2229
2983
|
switch (value.$$typeof) {
|
|
2230
2984
|
case REACT_ELEMENT_TYPE:
|
|
2231
2985
|
null != value._owner && outlineComponentInfo(request, value._owner);
|
|
@@ -2240,7 +2994,10 @@
|
|
|
2240
2994
|
counter = null;
|
|
2241
2995
|
if (null != value._debugStack)
|
|
2242
2996
|
for (
|
|
2243
|
-
counter = filterStackTrace(
|
|
2997
|
+
counter = filterStackTrace(
|
|
2998
|
+
request,
|
|
2999
|
+
parseStackTrace(value._debugStack, 1)
|
|
3000
|
+
),
|
|
2244
3001
|
doNotLimit.add(counter),
|
|
2245
3002
|
request = 0;
|
|
2246
3003
|
request < counter.length;
|
|
@@ -2256,122 +3013,231 @@
|
|
|
2256
3013
|
counter,
|
|
2257
3014
|
value._store.validated
|
|
2258
3015
|
];
|
|
3016
|
+
case REACT_LAZY_TYPE:
|
|
3017
|
+
value = value._payload;
|
|
3018
|
+
if (null !== value && "object" === typeof value) {
|
|
3019
|
+
switch (value._status) {
|
|
3020
|
+
case 1:
|
|
3021
|
+
return (
|
|
3022
|
+
(request = outlineDebugModel(
|
|
3023
|
+
request,
|
|
3024
|
+
counter,
|
|
3025
|
+
value._result
|
|
3026
|
+
)),
|
|
3027
|
+
serializeLazyID(request)
|
|
3028
|
+
);
|
|
3029
|
+
case 2:
|
|
3030
|
+
return (
|
|
3031
|
+
(counter = request.nextChunkId++),
|
|
3032
|
+
emitErrorChunk(
|
|
3033
|
+
request,
|
|
3034
|
+
counter,
|
|
3035
|
+
"",
|
|
3036
|
+
value._result,
|
|
3037
|
+
!0,
|
|
3038
|
+
null
|
|
3039
|
+
),
|
|
3040
|
+
serializeLazyID(counter)
|
|
3041
|
+
);
|
|
3042
|
+
}
|
|
3043
|
+
switch (value.status) {
|
|
3044
|
+
case "fulfilled":
|
|
3045
|
+
return (
|
|
3046
|
+
(request = outlineDebugModel(
|
|
3047
|
+
request,
|
|
3048
|
+
counter,
|
|
3049
|
+
value.value
|
|
3050
|
+
)),
|
|
3051
|
+
serializeLazyID(request)
|
|
3052
|
+
);
|
|
3053
|
+
case "rejected":
|
|
3054
|
+
return (
|
|
3055
|
+
(counter = request.nextChunkId++),
|
|
3056
|
+
emitErrorChunk(
|
|
3057
|
+
request,
|
|
3058
|
+
counter,
|
|
3059
|
+
"",
|
|
3060
|
+
value.reason,
|
|
3061
|
+
!0,
|
|
3062
|
+
null
|
|
3063
|
+
),
|
|
3064
|
+
serializeLazyID(counter)
|
|
3065
|
+
);
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
request.pendingDebugChunks++;
|
|
3069
|
+
value = request.nextChunkId++;
|
|
3070
|
+
emitDebugHaltChunk(request, value);
|
|
3071
|
+
return serializeLazyID(value);
|
|
2259
3072
|
}
|
|
2260
|
-
if ("function" === typeof value.then)
|
|
2261
|
-
|
|
2262
|
-
case "fulfilled":
|
|
2263
|
-
return (
|
|
2264
|
-
"$@" +
|
|
2265
|
-
outlineConsoleValue(request, counter, value.value).toString(16)
|
|
2266
|
-
);
|
|
2267
|
-
case "rejected":
|
|
2268
|
-
return (
|
|
2269
|
-
(counter = value.reason),
|
|
2270
|
-
request.pendingChunks++,
|
|
2271
|
-
(value = request.nextChunkId++),
|
|
2272
|
-
emitErrorChunk(request, value, "", counter),
|
|
2273
|
-
"$@" + value.toString(16)
|
|
2274
|
-
);
|
|
2275
|
-
}
|
|
2276
|
-
return "$@";
|
|
2277
|
-
}
|
|
3073
|
+
if ("function" === typeof value.then)
|
|
3074
|
+
return serializeDebugThenable(request, counter, value);
|
|
2278
3075
|
if (isArrayImpl(value)) return value;
|
|
2279
3076
|
if (value instanceof Map) {
|
|
2280
3077
|
value = Array.from(value);
|
|
2281
3078
|
counter.objectLimit++;
|
|
2282
|
-
for (
|
|
2283
|
-
var entry = value[
|
|
3079
|
+
for (ref = 0; ref < value.length; ref++) {
|
|
3080
|
+
var entry = value[ref];
|
|
2284
3081
|
doNotLimit.add(entry);
|
|
2285
|
-
|
|
3082
|
+
var key = entry[0];
|
|
2286
3083
|
entry = entry[1];
|
|
2287
|
-
"object" === typeof
|
|
2288
|
-
null !== parentPropertyName &&
|
|
2289
|
-
doNotLimit.add(parentPropertyName);
|
|
3084
|
+
"object" === typeof key && null !== key && doNotLimit.add(key);
|
|
2290
3085
|
"object" === typeof entry &&
|
|
2291
3086
|
null !== entry &&
|
|
2292
3087
|
doNotLimit.add(entry);
|
|
2293
3088
|
}
|
|
2294
|
-
return (
|
|
2295
|
-
"$Q" + outlineConsoleValue(request, counter, value).toString(16)
|
|
2296
|
-
);
|
|
3089
|
+
return "$Q" + outlineDebugModel(request, counter, value).toString(16);
|
|
2297
3090
|
}
|
|
2298
3091
|
if (value instanceof Set) {
|
|
2299
3092
|
value = Array.from(value);
|
|
2300
3093
|
counter.objectLimit++;
|
|
2301
|
-
for (
|
|
2302
|
-
(
|
|
2303
|
-
"object" === typeof
|
|
2304
|
-
|
|
2305
|
-
|
|
3094
|
+
for (ref = 0; ref < value.length; ref++)
|
|
3095
|
+
(key = value[ref]),
|
|
3096
|
+
"object" === typeof key && null !== key && doNotLimit.add(key);
|
|
3097
|
+
return "$W" + outlineDebugModel(request, counter, value).toString(16);
|
|
3098
|
+
}
|
|
3099
|
+
if ("function" === typeof FormData && value instanceof FormData)
|
|
2306
3100
|
return (
|
|
2307
|
-
|
|
3101
|
+
(value = Array.from(value.entries())),
|
|
3102
|
+
"$K" +
|
|
3103
|
+
outlineDebugModel(
|
|
3104
|
+
request,
|
|
3105
|
+
{ objectLimit: 2 * value.length + 1 },
|
|
3106
|
+
value
|
|
3107
|
+
).toString(16)
|
|
2308
3108
|
);
|
|
3109
|
+
if (value instanceof Error) {
|
|
3110
|
+
counter = "Error";
|
|
3111
|
+
var env = (0, request.environmentName)();
|
|
3112
|
+
try {
|
|
3113
|
+
(counter = value.name),
|
|
3114
|
+
(ref = String(value.message)),
|
|
3115
|
+
(key = filterStackTrace(request, parseStackTrace(value, 0))),
|
|
3116
|
+
(entry = value.environmentName),
|
|
3117
|
+
"string" === typeof entry && (env = entry);
|
|
3118
|
+
} catch (x) {
|
|
3119
|
+
(ref =
|
|
3120
|
+
"An error occurred but serializing the error message failed."),
|
|
3121
|
+
(key = []);
|
|
3122
|
+
}
|
|
3123
|
+
request =
|
|
3124
|
+
"$Z" +
|
|
3125
|
+
outlineDebugModel(
|
|
3126
|
+
request,
|
|
3127
|
+
{ objectLimit: 2 * key.length + 1 },
|
|
3128
|
+
{ name: counter, message: ref, stack: key, env: env }
|
|
3129
|
+
).toString(16);
|
|
3130
|
+
return request;
|
|
3131
|
+
}
|
|
3132
|
+
if (value instanceof ArrayBuffer)
|
|
3133
|
+
return serializeDebugTypedArray(request, "A", new Uint8Array(value));
|
|
3134
|
+
if (value instanceof Int8Array)
|
|
3135
|
+
return serializeDebugTypedArray(request, "O", value);
|
|
3136
|
+
if (value instanceof Uint8Array)
|
|
3137
|
+
return serializeDebugTypedArray(request, "o", value);
|
|
3138
|
+
if (value instanceof Uint8ClampedArray)
|
|
3139
|
+
return serializeDebugTypedArray(request, "U", value);
|
|
3140
|
+
if (value instanceof Int16Array)
|
|
3141
|
+
return serializeDebugTypedArray(request, "S", value);
|
|
3142
|
+
if (value instanceof Uint16Array)
|
|
3143
|
+
return serializeDebugTypedArray(request, "s", value);
|
|
3144
|
+
if (value instanceof Int32Array)
|
|
3145
|
+
return serializeDebugTypedArray(request, "L", value);
|
|
3146
|
+
if (value instanceof Uint32Array)
|
|
3147
|
+
return serializeDebugTypedArray(request, "l", value);
|
|
3148
|
+
if (value instanceof Float32Array)
|
|
3149
|
+
return serializeDebugTypedArray(request, "G", value);
|
|
3150
|
+
if (value instanceof Float64Array)
|
|
3151
|
+
return serializeDebugTypedArray(request, "g", value);
|
|
3152
|
+
if (value instanceof BigInt64Array)
|
|
3153
|
+
return serializeDebugTypedArray(request, "M", value);
|
|
3154
|
+
if (value instanceof BigUint64Array)
|
|
3155
|
+
return serializeDebugTypedArray(request, "m", value);
|
|
3156
|
+
if (value instanceof DataView)
|
|
3157
|
+
return serializeDebugTypedArray(request, "V", value);
|
|
3158
|
+
if ("function" === typeof Blob && value instanceof Blob)
|
|
3159
|
+
return serializeDebugBlob(request, value);
|
|
3160
|
+
if (getIteratorFn(value)) return Array.from(value);
|
|
3161
|
+
request = getPrototypeOf(value);
|
|
3162
|
+
if (request !== ObjectPrototype && null !== request) {
|
|
3163
|
+
counter = Object.create(null);
|
|
3164
|
+
for (env in value)
|
|
3165
|
+
if (hasOwnProperty.call(value, env) || isGetter(request, env))
|
|
3166
|
+
counter[env] = value[env];
|
|
3167
|
+
ref = request.constructor;
|
|
3168
|
+
"function" !== typeof ref ||
|
|
3169
|
+
ref.prototype !== request ||
|
|
3170
|
+
hasOwnProperty.call(value, "") ||
|
|
3171
|
+
isGetter(request, "") ||
|
|
3172
|
+
(counter[""] = { $$typeof: CONSTRUCTOR_MARKER, constructor: ref });
|
|
3173
|
+
return counter;
|
|
2309
3174
|
}
|
|
2310
|
-
return
|
|
2311
|
-
? serializeFormData(request, value)
|
|
2312
|
-
: value instanceof Error
|
|
2313
|
-
? serializeErrorValue(request, value)
|
|
2314
|
-
: value instanceof ArrayBuffer
|
|
2315
|
-
? serializeTypedArray(request, "A", new Uint8Array(value))
|
|
2316
|
-
: value instanceof Int8Array
|
|
2317
|
-
? serializeTypedArray(request, "O", value)
|
|
2318
|
-
: value instanceof Uint8Array
|
|
2319
|
-
? serializeTypedArray(request, "o", value)
|
|
2320
|
-
: value instanceof Uint8ClampedArray
|
|
2321
|
-
? serializeTypedArray(request, "U", value)
|
|
2322
|
-
: value instanceof Int16Array
|
|
2323
|
-
? serializeTypedArray(request, "S", value)
|
|
2324
|
-
: value instanceof Uint16Array
|
|
2325
|
-
? serializeTypedArray(request, "s", value)
|
|
2326
|
-
: value instanceof Int32Array
|
|
2327
|
-
? serializeTypedArray(request, "L", value)
|
|
2328
|
-
: value instanceof Uint32Array
|
|
2329
|
-
? serializeTypedArray(request, "l", value)
|
|
2330
|
-
: value instanceof Float32Array
|
|
2331
|
-
? serializeTypedArray(request, "G", value)
|
|
2332
|
-
: value instanceof Float64Array
|
|
2333
|
-
? serializeTypedArray(request, "g", value)
|
|
2334
|
-
: value instanceof BigInt64Array
|
|
2335
|
-
? serializeTypedArray(request, "M", value)
|
|
2336
|
-
: value instanceof BigUint64Array
|
|
2337
|
-
? serializeTypedArray(request, "m", value)
|
|
2338
|
-
: value instanceof DataView
|
|
2339
|
-
? serializeTypedArray(request, "V", value)
|
|
2340
|
-
: "function" === typeof Blob &&
|
|
2341
|
-
value instanceof Blob
|
|
2342
|
-
? serializeBlob(request, value)
|
|
2343
|
-
: getIteratorFn(value)
|
|
2344
|
-
? Array.from(value)
|
|
2345
|
-
: value;
|
|
3175
|
+
return value;
|
|
2346
3176
|
}
|
|
2347
|
-
if ("string" === typeof value)
|
|
2348
|
-
|
|
3177
|
+
if ("string" === typeof value) {
|
|
3178
|
+
if (
|
|
3179
|
+
"Z" === value[value.length - 1] &&
|
|
2349
3180
|
parent[parentPropertyName] instanceof Date
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
3181
|
+
)
|
|
3182
|
+
return "$D" + value;
|
|
3183
|
+
if (1024 <= value.length) {
|
|
3184
|
+
if (0 >= counter.objectLimit)
|
|
3185
|
+
return serializeDeferredObject(request, value);
|
|
3186
|
+
counter.objectLimit--;
|
|
3187
|
+
request.pendingDebugChunks++;
|
|
3188
|
+
counter = request.nextChunkId++;
|
|
3189
|
+
emitTextChunk(request, counter, value, !0);
|
|
3190
|
+
return serializeByValueID(counter);
|
|
3191
|
+
}
|
|
3192
|
+
return "$" === value[0] ? "$" + value : value;
|
|
3193
|
+
}
|
|
2356
3194
|
if ("boolean" === typeof value) return value;
|
|
2357
3195
|
if ("number" === typeof value) return serializeNumber(value);
|
|
2358
3196
|
if ("undefined" === typeof value) return "$undefined";
|
|
2359
|
-
if ("function" === typeof value)
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
3197
|
+
if ("function" === typeof value) {
|
|
3198
|
+
if (isClientReference(value))
|
|
3199
|
+
return serializeDebugClientReference(
|
|
3200
|
+
request,
|
|
3201
|
+
parent,
|
|
3202
|
+
parentPropertyName,
|
|
3203
|
+
value
|
|
3204
|
+
);
|
|
3205
|
+
if (
|
|
3206
|
+
void 0 !== request.temporaryReferences &&
|
|
3207
|
+
((counter = request.temporaryReferences.get(value)),
|
|
3208
|
+
void 0 !== counter)
|
|
3209
|
+
)
|
|
3210
|
+
return "$T" + counter;
|
|
3211
|
+
counter = request.writtenDebugObjects;
|
|
3212
|
+
ref = counter.get(value);
|
|
3213
|
+
if (void 0 !== ref) return ref;
|
|
3214
|
+
ref = Function.prototype.toString.call(value);
|
|
3215
|
+
key = value.name;
|
|
3216
|
+
key =
|
|
3217
|
+
"$E" +
|
|
3218
|
+
("string" === typeof key
|
|
3219
|
+
? "Object.defineProperty(" +
|
|
3220
|
+
ref +
|
|
3221
|
+
',"name",{value:' +
|
|
3222
|
+
JSON.stringify(key) +
|
|
3223
|
+
"})"
|
|
3224
|
+
: "(" + ref + ")");
|
|
3225
|
+
request.pendingDebugChunks++;
|
|
3226
|
+
ref = request.nextChunkId++;
|
|
3227
|
+
key = encodeReferenceChunk(request, ref, key);
|
|
3228
|
+
request.completedDebugChunks.push(key);
|
|
3229
|
+
request = serializeByValueID(ref);
|
|
3230
|
+
counter.set(value, request);
|
|
3231
|
+
return request;
|
|
3232
|
+
}
|
|
2367
3233
|
if ("symbol" === typeof value) {
|
|
2368
3234
|
counter = request.writtenSymbols.get(value);
|
|
2369
3235
|
if (void 0 !== counter) return serializeByValueID(counter);
|
|
2370
|
-
|
|
3236
|
+
value = value.description;
|
|
2371
3237
|
request.pendingChunks++;
|
|
2372
|
-
|
|
2373
|
-
emitSymbolChunk(request,
|
|
2374
|
-
return serializeByValueID(
|
|
3238
|
+
counter = request.nextChunkId++;
|
|
3239
|
+
emitSymbolChunk(request, counter, value);
|
|
3240
|
+
return serializeByValueID(counter);
|
|
2375
3241
|
}
|
|
2376
3242
|
return "bigint" === typeof value
|
|
2377
3243
|
? "$n" + value.toString(10)
|
|
@@ -2379,10 +3245,10 @@
|
|
|
2379
3245
|
? "$D" + value.toJSON()
|
|
2380
3246
|
: "unknown type " + typeof value;
|
|
2381
3247
|
}
|
|
2382
|
-
function
|
|
3248
|
+
function serializeDebugModel(request, objectLimit, model) {
|
|
2383
3249
|
function replacer(parentPropertyName, value) {
|
|
2384
3250
|
try {
|
|
2385
|
-
return
|
|
3251
|
+
return renderDebugModel(
|
|
2386
3252
|
request,
|
|
2387
3253
|
counter,
|
|
2388
3254
|
this,
|
|
@@ -2396,26 +3262,24 @@
|
|
|
2396
3262
|
);
|
|
2397
3263
|
}
|
|
2398
3264
|
}
|
|
2399
|
-
|
|
3265
|
+
var counter = { objectLimit: objectLimit };
|
|
3266
|
+
objectLimit = debugNoOutline;
|
|
3267
|
+
debugNoOutline = model;
|
|
2400
3268
|
try {
|
|
2401
|
-
|
|
3269
|
+
return stringify(model, replacer);
|
|
2402
3270
|
} catch (x) {
|
|
2403
|
-
|
|
3271
|
+
return stringify(
|
|
2404
3272
|
"Unknown Value: React could not send it from the server.\n" +
|
|
2405
3273
|
x.message
|
|
2406
3274
|
);
|
|
3275
|
+
} finally {
|
|
3276
|
+
debugNoOutline = objectLimit;
|
|
2407
3277
|
}
|
|
2408
|
-
request.pendingChunks++;
|
|
2409
|
-
model = request.nextChunkId++;
|
|
2410
|
-
json = model.toString(16) + ":" + json + "\n";
|
|
2411
|
-
json = stringToChunk(json);
|
|
2412
|
-
request.completedRegularChunks.push(json);
|
|
2413
|
-
return model;
|
|
2414
3278
|
}
|
|
2415
|
-
function
|
|
3279
|
+
function emitOutlinedDebugModelChunk(request, id, counter, model) {
|
|
2416
3280
|
function replacer(parentPropertyName, value) {
|
|
2417
3281
|
try {
|
|
2418
|
-
return
|
|
3282
|
+
return renderDebugModel(
|
|
2419
3283
|
request,
|
|
2420
3284
|
counter,
|
|
2421
3285
|
this,
|
|
@@ -2429,83 +3293,209 @@
|
|
|
2429
3293
|
);
|
|
2430
3294
|
}
|
|
2431
3295
|
}
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
3296
|
+
"object" === typeof model && null !== model && doNotLimit.add(model);
|
|
3297
|
+
var prevModelRoot = debugModelRoot;
|
|
3298
|
+
debugModelRoot = model;
|
|
3299
|
+
"object" === typeof model &&
|
|
3300
|
+
null !== model &&
|
|
3301
|
+
request.writtenDebugObjects.set(model, serializeByValueID(id));
|
|
2437
3302
|
try {
|
|
2438
|
-
var json = stringify(
|
|
3303
|
+
var json = stringify(model, replacer);
|
|
2439
3304
|
} catch (x) {
|
|
2440
3305
|
json = stringify(
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
stackTrace,
|
|
2444
|
-
owner,
|
|
2445
|
-
env,
|
|
2446
|
-
"Unknown Value: React could not send it from the server.",
|
|
2447
|
-
x
|
|
2448
|
-
],
|
|
2449
|
-
replacer
|
|
3306
|
+
"Unknown Value: React could not send it from the server.\n" +
|
|
3307
|
+
x.message
|
|
2450
3308
|
);
|
|
3309
|
+
} finally {
|
|
3310
|
+
debugModelRoot = prevModelRoot;
|
|
3311
|
+
}
|
|
3312
|
+
id = id.toString(16) + ":" + json + "\n";
|
|
3313
|
+
id = stringToChunk(id);
|
|
3314
|
+
request.completedDebugChunks.push(id);
|
|
3315
|
+
}
|
|
3316
|
+
function outlineDebugModel(request, counter, model) {
|
|
3317
|
+
var id = request.nextChunkId++;
|
|
3318
|
+
request.pendingDebugChunks++;
|
|
3319
|
+
emitOutlinedDebugModelChunk(request, id, counter, model);
|
|
3320
|
+
return id;
|
|
3321
|
+
}
|
|
3322
|
+
function emitTimeOriginChunk(request, timeOrigin) {
|
|
3323
|
+
request.pendingDebugChunks++;
|
|
3324
|
+
timeOrigin = stringToChunk(":N" + timeOrigin + "\n");
|
|
3325
|
+
request.completedDebugChunks.push(timeOrigin);
|
|
3326
|
+
}
|
|
3327
|
+
function forwardDebugInfo(request$jscomp$1, task, debugInfo) {
|
|
3328
|
+
for (var id = task.id, i = 0; i < debugInfo.length; i++) {
|
|
3329
|
+
var info = debugInfo[i];
|
|
3330
|
+
if ("number" === typeof info.time)
|
|
3331
|
+
markOperationEndTime(request$jscomp$1, task, info.time);
|
|
3332
|
+
else if ("string" === typeof info.name)
|
|
3333
|
+
outlineComponentInfo(request$jscomp$1, info),
|
|
3334
|
+
request$jscomp$1.pendingChunks++,
|
|
3335
|
+
emitDebugChunk(request$jscomp$1, id, info);
|
|
3336
|
+
else if (info.awaited) {
|
|
3337
|
+
var ioInfo = info.awaited;
|
|
3338
|
+
if (!(ioInfo.end <= request$jscomp$1.timeOrigin)) {
|
|
3339
|
+
var request = request$jscomp$1,
|
|
3340
|
+
ioInfo$jscomp$0 = ioInfo;
|
|
3341
|
+
if (!request.writtenObjects.has(ioInfo$jscomp$0)) {
|
|
3342
|
+
request.pendingDebugChunks++;
|
|
3343
|
+
var id$jscomp$0 = request.nextChunkId++,
|
|
3344
|
+
owner = ioInfo$jscomp$0.owner;
|
|
3345
|
+
null != owner && outlineComponentInfo(request, owner);
|
|
3346
|
+
var debugStack =
|
|
3347
|
+
null == ioInfo$jscomp$0.stack &&
|
|
3348
|
+
null != ioInfo$jscomp$0.debugStack
|
|
3349
|
+
? filterStackTrace(
|
|
3350
|
+
request,
|
|
3351
|
+
parseStackTrace(ioInfo$jscomp$0.debugStack, 1)
|
|
3352
|
+
)
|
|
3353
|
+
: ioInfo$jscomp$0.stack;
|
|
3354
|
+
var request$jscomp$0 = request,
|
|
3355
|
+
id$jscomp$1 = id$jscomp$0,
|
|
3356
|
+
value = ioInfo$jscomp$0.value,
|
|
3357
|
+
env = ioInfo$jscomp$0.env,
|
|
3358
|
+
objectLimit = 10;
|
|
3359
|
+
debugStack && (objectLimit += debugStack.length);
|
|
3360
|
+
var debugIOInfo = {
|
|
3361
|
+
name: ioInfo$jscomp$0.name,
|
|
3362
|
+
start: ioInfo$jscomp$0.start - request$jscomp$0.timeOrigin,
|
|
3363
|
+
end: ioInfo$jscomp$0.end - request$jscomp$0.timeOrigin
|
|
3364
|
+
};
|
|
3365
|
+
null != env && (debugIOInfo.env = env);
|
|
3366
|
+
null != debugStack && (debugIOInfo.stack = debugStack);
|
|
3367
|
+
null != owner && (debugIOInfo.owner = owner);
|
|
3368
|
+
void 0 !== value && (debugIOInfo.value = value);
|
|
3369
|
+
value = serializeDebugModel(
|
|
3370
|
+
request$jscomp$0,
|
|
3371
|
+
objectLimit,
|
|
3372
|
+
debugIOInfo
|
|
3373
|
+
);
|
|
3374
|
+
id$jscomp$1 = id$jscomp$1.toString(16) + ":J" + value + "\n";
|
|
3375
|
+
id$jscomp$1 = stringToChunk(id$jscomp$1);
|
|
3376
|
+
request$jscomp$0.completedDebugChunks.push(id$jscomp$1);
|
|
3377
|
+
request.writtenDebugObjects.set(
|
|
3378
|
+
ioInfo$jscomp$0,
|
|
3379
|
+
serializeByValueID(id$jscomp$0)
|
|
3380
|
+
);
|
|
3381
|
+
}
|
|
3382
|
+
null != info.owner &&
|
|
3383
|
+
outlineComponentInfo(request$jscomp$1, info.owner);
|
|
3384
|
+
request =
|
|
3385
|
+
null == info.stack && null != info.debugStack
|
|
3386
|
+
? filterStackTrace(
|
|
3387
|
+
request$jscomp$1,
|
|
3388
|
+
parseStackTrace(info.debugStack, 1)
|
|
3389
|
+
)
|
|
3390
|
+
: info.stack;
|
|
3391
|
+
ioInfo = { awaited: ioInfo };
|
|
3392
|
+
null != info.env && (ioInfo.env = info.env);
|
|
3393
|
+
null != info.owner && (ioInfo.owner = info.owner);
|
|
3394
|
+
null != request && (ioInfo.stack = request);
|
|
3395
|
+
request$jscomp$1.pendingChunks++;
|
|
3396
|
+
emitDebugChunk(request$jscomp$1, id, ioInfo);
|
|
3397
|
+
}
|
|
3398
|
+
} else
|
|
3399
|
+
request$jscomp$1.pendingChunks++,
|
|
3400
|
+
emitDebugChunk(request$jscomp$1, id, info);
|
|
2451
3401
|
}
|
|
2452
|
-
methodName = stringToChunk(":W" + json + "\n");
|
|
2453
|
-
request.completedRegularChunks.push(methodName);
|
|
2454
3402
|
}
|
|
2455
|
-
function
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
3403
|
+
function forwardDebugInfoFromThenable(request, task, thenable) {
|
|
3404
|
+
(thenable = thenable._debugInfo) &&
|
|
3405
|
+
forwardDebugInfo(request, task, thenable);
|
|
3406
|
+
}
|
|
3407
|
+
function forwardDebugInfoFromCurrentContext(request, task, thenable) {
|
|
3408
|
+
(thenable = thenable._debugInfo) &&
|
|
3409
|
+
forwardDebugInfo(request, task, thenable);
|
|
3410
|
+
}
|
|
3411
|
+
function forwardDebugInfoFromAbortedTask(request, task) {
|
|
3412
|
+
var model = task.model;
|
|
3413
|
+
"object" === typeof model &&
|
|
3414
|
+
null !== model &&
|
|
3415
|
+
(model = model._debugInfo) &&
|
|
3416
|
+
forwardDebugInfo(request, task, model);
|
|
3417
|
+
}
|
|
3418
|
+
function emitTimingChunk(request, id, timestamp) {
|
|
3419
|
+
request.pendingChunks++;
|
|
3420
|
+
var json = '{"time":' + (timestamp - request.timeOrigin) + "}";
|
|
3421
|
+
null !== request.debugDestination
|
|
3422
|
+
? ((timestamp = request.nextChunkId++),
|
|
3423
|
+
(json = timestamp.toString(16) + ":" + json + "\n"),
|
|
3424
|
+
request.pendingDebugChunks++,
|
|
3425
|
+
request.completedDebugChunks.push(stringToChunk(json)),
|
|
3426
|
+
(id = id.toString(16) + ':D"$' + timestamp.toString(16) + '"\n'),
|
|
3427
|
+
request.completedRegularChunks.push(stringToChunk(id)))
|
|
3428
|
+
: ((id = id.toString(16) + ":D" + json + "\n"),
|
|
3429
|
+
request.completedRegularChunks.push(stringToChunk(id)));
|
|
3430
|
+
}
|
|
3431
|
+
function markOperationEndTime(request, task, timestamp) {
|
|
3432
|
+
(request.status === ABORTING && timestamp > request.abortTime) ||
|
|
3433
|
+
(timestamp > task.time
|
|
3434
|
+
? (emitTimingChunk(request, task.id, timestamp),
|
|
3435
|
+
(task.time = timestamp))
|
|
3436
|
+
: emitTimingChunk(request, task.id, task.time));
|
|
2462
3437
|
}
|
|
2463
3438
|
function emitChunk(request, task, value) {
|
|
2464
3439
|
var id = task.id;
|
|
2465
3440
|
"string" === typeof value && null !== byteLengthOfChunk
|
|
2466
|
-
? emitTextChunk(request, id, value)
|
|
3441
|
+
? emitTextChunk(request, id, value, !1)
|
|
2467
3442
|
: value instanceof ArrayBuffer
|
|
2468
|
-
? emitTypedArrayChunk(request, id, "A", new Uint8Array(value))
|
|
3443
|
+
? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1)
|
|
2469
3444
|
: value instanceof Int8Array
|
|
2470
|
-
? emitTypedArrayChunk(request, id, "O", value)
|
|
3445
|
+
? emitTypedArrayChunk(request, id, "O", value, !1)
|
|
2471
3446
|
: value instanceof Uint8Array
|
|
2472
|
-
? emitTypedArrayChunk(request, id, "o", value)
|
|
3447
|
+
? emitTypedArrayChunk(request, id, "o", value, !1)
|
|
2473
3448
|
: value instanceof Uint8ClampedArray
|
|
2474
|
-
? emitTypedArrayChunk(request, id, "U", value)
|
|
3449
|
+
? emitTypedArrayChunk(request, id, "U", value, !1)
|
|
2475
3450
|
: value instanceof Int16Array
|
|
2476
|
-
? emitTypedArrayChunk(request, id, "S", value)
|
|
3451
|
+
? emitTypedArrayChunk(request, id, "S", value, !1)
|
|
2477
3452
|
: value instanceof Uint16Array
|
|
2478
|
-
? emitTypedArrayChunk(request, id, "s", value)
|
|
3453
|
+
? emitTypedArrayChunk(request, id, "s", value, !1)
|
|
2479
3454
|
: value instanceof Int32Array
|
|
2480
|
-
? emitTypedArrayChunk(request, id, "L", value)
|
|
3455
|
+
? emitTypedArrayChunk(request, id, "L", value, !1)
|
|
2481
3456
|
: value instanceof Uint32Array
|
|
2482
|
-
? emitTypedArrayChunk(request, id, "l", value)
|
|
3457
|
+
? emitTypedArrayChunk(request, id, "l", value, !1)
|
|
2483
3458
|
: value instanceof Float32Array
|
|
2484
|
-
? emitTypedArrayChunk(request, id, "G", value)
|
|
3459
|
+
? emitTypedArrayChunk(request, id, "G", value, !1)
|
|
2485
3460
|
: value instanceof Float64Array
|
|
2486
|
-
? emitTypedArrayChunk(request, id, "g", value)
|
|
3461
|
+
? emitTypedArrayChunk(request, id, "g", value, !1)
|
|
2487
3462
|
: value instanceof BigInt64Array
|
|
2488
|
-
? emitTypedArrayChunk(request, id, "M", value)
|
|
3463
|
+
? emitTypedArrayChunk(request, id, "M", value, !1)
|
|
2489
3464
|
: value instanceof BigUint64Array
|
|
2490
|
-
? emitTypedArrayChunk(
|
|
3465
|
+
? emitTypedArrayChunk(
|
|
3466
|
+
request,
|
|
3467
|
+
id,
|
|
3468
|
+
"m",
|
|
3469
|
+
value,
|
|
3470
|
+
!1
|
|
3471
|
+
)
|
|
2491
3472
|
: value instanceof DataView
|
|
2492
|
-
? emitTypedArrayChunk(
|
|
3473
|
+
? emitTypedArrayChunk(
|
|
3474
|
+
request,
|
|
3475
|
+
id,
|
|
3476
|
+
"V",
|
|
3477
|
+
value,
|
|
3478
|
+
!1
|
|
3479
|
+
)
|
|
2493
3480
|
: ((value = stringify(value, task.toJSON)),
|
|
2494
3481
|
emitModelChunk(request, task.id, value));
|
|
2495
3482
|
}
|
|
2496
3483
|
function erroredTask(request, task, error) {
|
|
2497
|
-
request.
|
|
2498
|
-
task.status =
|
|
3484
|
+
task.timed && markOperationEndTime(request, task, performance.now());
|
|
3485
|
+
task.status = 4;
|
|
2499
3486
|
var digest = logRecoverableError(request, error, task);
|
|
2500
|
-
emitErrorChunk(request, task.id, digest, error);
|
|
3487
|
+
emitErrorChunk(request, task.id, digest, error, !1, task.debugOwner);
|
|
3488
|
+
request.abortableTasks.delete(task);
|
|
3489
|
+
callOnAllReadyIfReady(request);
|
|
2501
3490
|
}
|
|
2502
3491
|
function retryTask(request, task) {
|
|
2503
|
-
if (task.status
|
|
2504
|
-
var
|
|
2505
|
-
task.status =
|
|
3492
|
+
if (0 === task.status) {
|
|
3493
|
+
var prevCanEmitDebugInfo = canEmitDebugInfo;
|
|
3494
|
+
task.status = 5;
|
|
3495
|
+
var parentSerializedSize = serializedSize;
|
|
2506
3496
|
try {
|
|
2507
3497
|
modelRoot = task.model;
|
|
2508
|
-
|
|
3498
|
+
canEmitDebugInfo = !0;
|
|
2509
3499
|
var resolvedModel = renderModelDestructive(
|
|
2510
3500
|
request,
|
|
2511
3501
|
task,
|
|
@@ -2513,7 +3503,7 @@
|
|
|
2513
3503
|
"",
|
|
2514
3504
|
task.model
|
|
2515
3505
|
);
|
|
2516
|
-
|
|
3506
|
+
canEmitDebugInfo = !1;
|
|
2517
3507
|
modelRoot = resolvedModel;
|
|
2518
3508
|
task.keyPath = null;
|
|
2519
3509
|
task.implicitSlot = !1;
|
|
@@ -2521,6 +3511,7 @@
|
|
|
2521
3511
|
currentEnv !== task.environmentName &&
|
|
2522
3512
|
(request.pendingChunks++,
|
|
2523
3513
|
emitDebugChunk(request, task.id, { env: currentEnv }));
|
|
3514
|
+
task.timed && markOperationEndTime(request, task, performance.now());
|
|
2524
3515
|
if ("object" === typeof resolvedModel && null !== resolvedModel)
|
|
2525
3516
|
request.writtenObjects.set(
|
|
2526
3517
|
resolvedModel,
|
|
@@ -2531,15 +3522,23 @@
|
|
|
2531
3522
|
var json = stringify(resolvedModel);
|
|
2532
3523
|
emitModelChunk(request, task.id, json);
|
|
2533
3524
|
}
|
|
3525
|
+
task.status = 1;
|
|
2534
3526
|
request.abortableTasks.delete(task);
|
|
2535
|
-
|
|
3527
|
+
callOnAllReadyIfReady(request);
|
|
2536
3528
|
} catch (thrownValue) {
|
|
2537
|
-
if (request.status === ABORTING)
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
3529
|
+
if (request.status === ABORTING)
|
|
3530
|
+
if (
|
|
3531
|
+
(request.abortableTasks.delete(task),
|
|
3532
|
+
(task.status = 0),
|
|
3533
|
+
21 === request.type)
|
|
3534
|
+
)
|
|
3535
|
+
haltTask(task), finishHaltedTask(task, request);
|
|
3536
|
+
else {
|
|
3537
|
+
var errorId = request.fatalError;
|
|
3538
|
+
abortTask(task);
|
|
3539
|
+
finishAbortedTask(task, request, errorId);
|
|
3540
|
+
}
|
|
3541
|
+
else {
|
|
2543
3542
|
var x =
|
|
2544
3543
|
thrownValue === SuspenseException
|
|
2545
3544
|
? getSuspendedThenable()
|
|
@@ -2549,24 +3548,27 @@
|
|
|
2549
3548
|
null !== x &&
|
|
2550
3549
|
"function" === typeof x.then
|
|
2551
3550
|
) {
|
|
2552
|
-
task.status =
|
|
3551
|
+
task.status = 0;
|
|
2553
3552
|
task.thenableState = getThenableStateAfterSuspending();
|
|
2554
3553
|
var ping = task.ping;
|
|
2555
3554
|
x.then(ping, ping);
|
|
2556
3555
|
} else erroredTask(request, task, x);
|
|
2557
3556
|
}
|
|
2558
3557
|
} finally {
|
|
2559
|
-
|
|
3558
|
+
(canEmitDebugInfo = prevCanEmitDebugInfo),
|
|
3559
|
+
(serializedSize = parentSerializedSize);
|
|
2560
3560
|
}
|
|
2561
3561
|
}
|
|
2562
3562
|
}
|
|
2563
3563
|
function tryStreamTask(request, task) {
|
|
2564
|
-
var
|
|
2565
|
-
|
|
3564
|
+
var prevCanEmitDebugInfo = canEmitDebugInfo;
|
|
3565
|
+
canEmitDebugInfo = !1;
|
|
3566
|
+
var parentSerializedSize = serializedSize;
|
|
2566
3567
|
try {
|
|
2567
3568
|
emitChunk(request, task, task.model);
|
|
2568
3569
|
} finally {
|
|
2569
|
-
|
|
3570
|
+
(serializedSize = parentSerializedSize),
|
|
3571
|
+
(canEmitDebugInfo = prevCanEmitDebugInfo);
|
|
2570
3572
|
}
|
|
2571
3573
|
}
|
|
2572
3574
|
function performWork(request) {
|
|
@@ -2574,18 +3576,12 @@
|
|
|
2574
3576
|
ReactSharedInternalsServer.H = HooksDispatcher;
|
|
2575
3577
|
var prevRequest = currentRequest;
|
|
2576
3578
|
currentRequest$1 = currentRequest = request;
|
|
2577
|
-
var hadAbortableTasks = 0 < request.abortableTasks.size;
|
|
2578
3579
|
try {
|
|
2579
3580
|
var pingedTasks = request.pingedTasks;
|
|
2580
3581
|
request.pingedTasks = [];
|
|
2581
3582
|
for (var i = 0; i < pingedTasks.length; i++)
|
|
2582
3583
|
retryTask(request, pingedTasks[i]);
|
|
2583
|
-
|
|
2584
|
-
flushCompletedChunks(request, request.destination);
|
|
2585
|
-
if (hadAbortableTasks && 0 === request.abortableTasks.size) {
|
|
2586
|
-
var onAllReady = request.onAllReady;
|
|
2587
|
-
onAllReady();
|
|
2588
|
-
}
|
|
3584
|
+
flushCompletedChunks(request);
|
|
2589
3585
|
} catch (error) {
|
|
2590
3586
|
logRecoverableError(request, error, null), fatalError(request, error);
|
|
2591
3587
|
} finally {
|
|
@@ -2594,68 +3590,152 @@
|
|
|
2594
3590
|
(currentRequest = prevRequest);
|
|
2595
3591
|
}
|
|
2596
3592
|
}
|
|
2597
|
-
function
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
)
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
3593
|
+
function abortTask(task) {
|
|
3594
|
+
0 === task.status && (task.status = 3);
|
|
3595
|
+
}
|
|
3596
|
+
function finishAbortedTask(task, request, errorId) {
|
|
3597
|
+
3 === task.status &&
|
|
3598
|
+
(forwardDebugInfoFromAbortedTask(request, task),
|
|
3599
|
+
task.timed && markOperationEndTime(request, task, request.abortTime),
|
|
3600
|
+
(errorId = serializeByValueID(errorId)),
|
|
3601
|
+
(task = encodeReferenceChunk(request, task.id, errorId)),
|
|
3602
|
+
request.completedErrorChunks.push(task));
|
|
3603
|
+
}
|
|
3604
|
+
function haltTask(task) {
|
|
3605
|
+
0 === task.status && (task.status = 3);
|
|
3606
|
+
}
|
|
3607
|
+
function finishHaltedTask(task, request) {
|
|
3608
|
+
3 === task.status &&
|
|
3609
|
+
(forwardDebugInfoFromAbortedTask(request, task),
|
|
3610
|
+
request.pendingChunks--);
|
|
3611
|
+
}
|
|
3612
|
+
function flushCompletedChunks(request) {
|
|
3613
|
+
if (null !== request.debugDestination) {
|
|
3614
|
+
var debugDestination = request.debugDestination;
|
|
3615
|
+
currentView = new Uint8Array(2048);
|
|
3616
|
+
writtenBytes = 0;
|
|
3617
|
+
try {
|
|
3618
|
+
for (
|
|
3619
|
+
var debugChunks = request.completedDebugChunks, i = 0;
|
|
3620
|
+
i < debugChunks.length;
|
|
3621
|
+
i++
|
|
3622
|
+
)
|
|
3623
|
+
request.pendingDebugChunks--,
|
|
3624
|
+
writeChunkAndReturn(debugDestination, debugChunks[i]);
|
|
3625
|
+
debugChunks.splice(0, i);
|
|
3626
|
+
} finally {
|
|
3627
|
+
completeWriting(debugDestination);
|
|
3628
|
+
}
|
|
3629
|
+
}
|
|
3630
|
+
debugDestination = request.destination;
|
|
3631
|
+
if (null !== debugDestination) {
|
|
3632
|
+
currentView = new Uint8Array(2048);
|
|
3633
|
+
writtenBytes = 0;
|
|
3634
|
+
try {
|
|
3635
|
+
var importsChunks = request.completedImportChunks;
|
|
3636
|
+
for (
|
|
3637
|
+
debugChunks = 0;
|
|
3638
|
+
debugChunks < importsChunks.length;
|
|
3639
|
+
debugChunks++
|
|
3640
|
+
)
|
|
3641
|
+
if (
|
|
3642
|
+
(request.pendingChunks--,
|
|
3643
|
+
!writeChunkAndReturn(
|
|
3644
|
+
debugDestination,
|
|
3645
|
+
importsChunks[debugChunks]
|
|
3646
|
+
))
|
|
3647
|
+
) {
|
|
3648
|
+
request.destination = null;
|
|
3649
|
+
debugChunks++;
|
|
3650
|
+
break;
|
|
3651
|
+
}
|
|
3652
|
+
importsChunks.splice(0, debugChunks);
|
|
3653
|
+
var hintChunks = request.completedHintChunks;
|
|
3654
|
+
for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++)
|
|
3655
|
+
if (
|
|
3656
|
+
!writeChunkAndReturn(debugDestination, hintChunks[debugChunks])
|
|
3657
|
+
) {
|
|
3658
|
+
request.destination = null;
|
|
3659
|
+
debugChunks++;
|
|
3660
|
+
break;
|
|
3661
|
+
}
|
|
3662
|
+
hintChunks.splice(0, debugChunks);
|
|
3663
|
+
if (null === request.debugDestination) {
|
|
3664
|
+
var _debugChunks = request.completedDebugChunks;
|
|
3665
|
+
for (
|
|
3666
|
+
debugChunks = 0;
|
|
3667
|
+
debugChunks < _debugChunks.length;
|
|
3668
|
+
debugChunks++
|
|
3669
|
+
)
|
|
3670
|
+
if (
|
|
3671
|
+
(request.pendingDebugChunks--,
|
|
3672
|
+
!writeChunkAndReturn(
|
|
3673
|
+
debugDestination,
|
|
3674
|
+
_debugChunks[debugChunks]
|
|
3675
|
+
))
|
|
3676
|
+
) {
|
|
3677
|
+
request.destination = null;
|
|
3678
|
+
debugChunks++;
|
|
3679
|
+
break;
|
|
3680
|
+
}
|
|
3681
|
+
_debugChunks.splice(0, debugChunks);
|
|
2643
3682
|
}
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
3683
|
+
var regularChunks = request.completedRegularChunks;
|
|
3684
|
+
for (
|
|
3685
|
+
debugChunks = 0;
|
|
3686
|
+
debugChunks < regularChunks.length;
|
|
3687
|
+
debugChunks++
|
|
3688
|
+
)
|
|
3689
|
+
if (
|
|
3690
|
+
(request.pendingChunks--,
|
|
3691
|
+
!writeChunkAndReturn(
|
|
3692
|
+
debugDestination,
|
|
3693
|
+
regularChunks[debugChunks]
|
|
3694
|
+
))
|
|
3695
|
+
) {
|
|
3696
|
+
request.destination = null;
|
|
3697
|
+
debugChunks++;
|
|
3698
|
+
break;
|
|
3699
|
+
}
|
|
3700
|
+
regularChunks.splice(0, debugChunks);
|
|
3701
|
+
var errorChunks = request.completedErrorChunks;
|
|
3702
|
+
for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++)
|
|
3703
|
+
if (
|
|
3704
|
+
(request.pendingChunks--,
|
|
3705
|
+
!writeChunkAndReturn(debugDestination, errorChunks[debugChunks]))
|
|
3706
|
+
) {
|
|
3707
|
+
request.destination = null;
|
|
3708
|
+
debugChunks++;
|
|
3709
|
+
break;
|
|
3710
|
+
}
|
|
3711
|
+
errorChunks.splice(0, debugChunks);
|
|
3712
|
+
} finally {
|
|
3713
|
+
(request.flushScheduled = !1), completeWriting(debugDestination);
|
|
3714
|
+
}
|
|
2654
3715
|
}
|
|
2655
3716
|
0 === request.pendingChunks &&
|
|
2656
|
-
((
|
|
2657
|
-
|
|
2658
|
-
|
|
3717
|
+
((importsChunks = request.debugDestination),
|
|
3718
|
+
0 === request.pendingDebugChunks
|
|
3719
|
+
? (null !== importsChunks &&
|
|
3720
|
+
(importsChunks.close(), (request.debugDestination = null)),
|
|
3721
|
+
request.status < ABORTING &&
|
|
3722
|
+
request.cacheController.abort(
|
|
3723
|
+
Error(
|
|
3724
|
+
"This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources."
|
|
3725
|
+
)
|
|
3726
|
+
),
|
|
3727
|
+
null !== request.destination &&
|
|
3728
|
+
((request.status = CLOSED),
|
|
3729
|
+
request.destination.close(),
|
|
3730
|
+
(request.destination = null)),
|
|
3731
|
+
null !== request.debugDestination &&
|
|
3732
|
+
(request.debugDestination.close(),
|
|
3733
|
+
(request.debugDestination = null)))
|
|
3734
|
+
: null !== importsChunks &&
|
|
3735
|
+
null !== request.destination &&
|
|
3736
|
+
((request.status = CLOSED),
|
|
3737
|
+
request.destination.close(),
|
|
3738
|
+
(request.destination = null)));
|
|
2659
3739
|
}
|
|
2660
3740
|
function startWork(request) {
|
|
2661
3741
|
request.flushScheduled = null !== request.destination;
|
|
@@ -2667,88 +3747,125 @@
|
|
|
2667
3747
|
return performWork(request);
|
|
2668
3748
|
});
|
|
2669
3749
|
setTimeout(function () {
|
|
2670
|
-
request.status
|
|
3750
|
+
10 === request.status && (request.status = 11);
|
|
2671
3751
|
}, 0);
|
|
2672
3752
|
}
|
|
2673
3753
|
function enqueueFlush(request) {
|
|
2674
|
-
!1
|
|
2675
|
-
0
|
|
2676
|
-
null
|
|
3754
|
+
!1 !== request.flushScheduled ||
|
|
3755
|
+
0 !== request.pingedTasks.length ||
|
|
3756
|
+
(null === request.destination && null === request.debugDestination) ||
|
|
2677
3757
|
((request.flushScheduled = !0),
|
|
2678
3758
|
setTimeout(function () {
|
|
2679
3759
|
request.flushScheduled = !1;
|
|
2680
|
-
|
|
2681
|
-
destination && flushCompletedChunks(request, destination);
|
|
3760
|
+
flushCompletedChunks(request);
|
|
2682
3761
|
}, 0));
|
|
2683
3762
|
}
|
|
3763
|
+
function callOnAllReadyIfReady(request) {
|
|
3764
|
+
0 === request.abortableTasks.size &&
|
|
3765
|
+
((request = request.onAllReady), request());
|
|
3766
|
+
}
|
|
2684
3767
|
function startFlowing(request, destination) {
|
|
2685
|
-
if (request.status
|
|
3768
|
+
if (13 === request.status)
|
|
2686
3769
|
(request.status = CLOSED),
|
|
2687
3770
|
closeWithError(destination, request.fatalError);
|
|
2688
3771
|
else if (request.status !== CLOSED && null === request.destination) {
|
|
2689
3772
|
request.destination = destination;
|
|
2690
3773
|
try {
|
|
2691
|
-
flushCompletedChunks(request
|
|
3774
|
+
flushCompletedChunks(request);
|
|
2692
3775
|
} catch (error) {
|
|
2693
3776
|
logRecoverableError(request, error, null), fatalError(request, error);
|
|
2694
3777
|
}
|
|
2695
3778
|
}
|
|
2696
3779
|
}
|
|
2697
|
-
function
|
|
3780
|
+
function finishHalt(request, abortedTasks) {
|
|
2698
3781
|
try {
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
3782
|
+
abortedTasks.forEach(function (task) {
|
|
3783
|
+
return finishHaltedTask(task, request);
|
|
3784
|
+
});
|
|
3785
|
+
var onAllReady = request.onAllReady;
|
|
3786
|
+
onAllReady();
|
|
3787
|
+
flushCompletedChunks(request);
|
|
3788
|
+
} catch (error) {
|
|
3789
|
+
logRecoverableError(request, error, null), fatalError(request, error);
|
|
3790
|
+
}
|
|
3791
|
+
}
|
|
3792
|
+
function finishAbort(request, abortedTasks, errorId) {
|
|
3793
|
+
try {
|
|
3794
|
+
abortedTasks.forEach(function (task) {
|
|
3795
|
+
return finishAbortedTask(task, request, errorId);
|
|
3796
|
+
});
|
|
3797
|
+
var onAllReady = request.onAllReady;
|
|
3798
|
+
onAllReady();
|
|
3799
|
+
flushCompletedChunks(request);
|
|
3800
|
+
} catch (error) {
|
|
3801
|
+
logRecoverableError(request, error, null), fatalError(request, error);
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
3804
|
+
function abort(request, reason) {
|
|
3805
|
+
if (!(11 < request.status))
|
|
3806
|
+
try {
|
|
3807
|
+
request.status = ABORTING;
|
|
3808
|
+
request.abortTime = performance.now();
|
|
3809
|
+
request.cacheController.abort(reason);
|
|
3810
|
+
var abortableTasks = request.abortableTasks;
|
|
3811
|
+
if (0 < abortableTasks.size)
|
|
3812
|
+
if (21 === request.type)
|
|
3813
|
+
abortableTasks.forEach(function (task) {
|
|
3814
|
+
return haltTask(task, request);
|
|
3815
|
+
}),
|
|
3816
|
+
setTimeout(function () {
|
|
3817
|
+
return finishHalt(request, abortableTasks);
|
|
3818
|
+
}, 0);
|
|
3819
|
+
else {
|
|
3820
|
+
var error =
|
|
3821
|
+
void 0 === reason
|
|
3822
|
+
? Error(
|
|
3823
|
+
"The render was aborted by the server without a reason."
|
|
3824
|
+
)
|
|
3825
|
+
: "object" === typeof reason &&
|
|
3826
|
+
null !== reason &&
|
|
3827
|
+
"function" === typeof reason.then
|
|
3828
|
+
? Error(
|
|
3829
|
+
"The render was aborted by the server with a promise."
|
|
3830
|
+
)
|
|
3831
|
+
: reason,
|
|
3832
|
+
digest = logRecoverableError(request, error, null),
|
|
3833
|
+
_errorId2 = request.nextChunkId++;
|
|
3834
|
+
request.fatalError = _errorId2;
|
|
3835
|
+
request.pendingChunks++;
|
|
3836
|
+
emitErrorChunk(request, _errorId2, digest, error, !1, null);
|
|
3837
|
+
abortableTasks.forEach(function (task) {
|
|
3838
|
+
return abortTask(task, request, _errorId2);
|
|
3839
|
+
});
|
|
3840
|
+
setTimeout(function () {
|
|
3841
|
+
return finishAbort(request, abortableTasks, _errorId2);
|
|
3842
|
+
}, 0);
|
|
2725
3843
|
}
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
void 0 === reason
|
|
2735
|
-
? Error("The render was aborted by the server without a reason.")
|
|
2736
|
-
: "object" === typeof reason &&
|
|
2737
|
-
null !== reason &&
|
|
2738
|
-
"function" === typeof reason.then
|
|
2739
|
-
? Error("The render was aborted by the server with a promise.")
|
|
2740
|
-
: reason;
|
|
2741
|
-
abortListeners.forEach(function (callback) {
|
|
2742
|
-
return callback(_error);
|
|
2743
|
-
});
|
|
2744
|
-
abortListeners.clear();
|
|
3844
|
+
else {
|
|
3845
|
+
var onAllReady = request.onAllReady;
|
|
3846
|
+
onAllReady();
|
|
3847
|
+
flushCompletedChunks(request);
|
|
3848
|
+
}
|
|
3849
|
+
} catch (error$2) {
|
|
3850
|
+
logRecoverableError(request, error$2, null),
|
|
3851
|
+
fatalError(request, error$2);
|
|
2745
3852
|
}
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
3853
|
+
}
|
|
3854
|
+
function fromHex(str) {
|
|
3855
|
+
return parseInt(str, 16);
|
|
3856
|
+
}
|
|
3857
|
+
function closeDebugChannel(request) {
|
|
3858
|
+
var deferredDebugObjects = request.deferredDebugObjects;
|
|
3859
|
+
if (null === deferredDebugObjects)
|
|
3860
|
+
throw Error(
|
|
3861
|
+
"resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React."
|
|
3862
|
+
);
|
|
3863
|
+
deferredDebugObjects.retained.forEach(function (value, id) {
|
|
3864
|
+
request.pendingDebugChunks--;
|
|
3865
|
+
deferredDebugObjects.retained.delete(id);
|
|
3866
|
+
deferredDebugObjects.existing.delete(value);
|
|
3867
|
+
});
|
|
3868
|
+
enqueueFlush(request);
|
|
2752
3869
|
}
|
|
2753
3870
|
function resolveServerReference(bundlerConfig, id) {
|
|
2754
3871
|
var name = "",
|
|
@@ -3494,6 +4611,94 @@
|
|
|
3494
4611
|
if ("fulfilled" !== body.status) throw body.reason;
|
|
3495
4612
|
return body.value;
|
|
3496
4613
|
}
|
|
4614
|
+
function startReadingFromDebugChannelReadableStream(
|
|
4615
|
+
request$jscomp$0,
|
|
4616
|
+
stream
|
|
4617
|
+
) {
|
|
4618
|
+
function progress(_ref) {
|
|
4619
|
+
var done = _ref.done,
|
|
4620
|
+
buffer = _ref.value;
|
|
4621
|
+
_ref = stringBuffer;
|
|
4622
|
+
done
|
|
4623
|
+
? ((buffer = new Uint8Array(0)),
|
|
4624
|
+
(buffer = stringDecoder.decode(buffer)))
|
|
4625
|
+
: (buffer = stringDecoder.decode(buffer, decoderOptions));
|
|
4626
|
+
stringBuffer = _ref + buffer;
|
|
4627
|
+
_ref = stringBuffer.split("\n");
|
|
4628
|
+
for (buffer = 0; buffer < _ref.length - 1; buffer++) {
|
|
4629
|
+
var request = request$jscomp$0,
|
|
4630
|
+
message = _ref[buffer],
|
|
4631
|
+
deferredDebugObjects = request.deferredDebugObjects;
|
|
4632
|
+
if (null === deferredDebugObjects)
|
|
4633
|
+
throw Error(
|
|
4634
|
+
"resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React."
|
|
4635
|
+
);
|
|
4636
|
+
if ("" === message) closeDebugChannel(request);
|
|
4637
|
+
else {
|
|
4638
|
+
var command = message.charCodeAt(0);
|
|
4639
|
+
message = message.slice(2).split(",").map(fromHex);
|
|
4640
|
+
switch (command) {
|
|
4641
|
+
case 82:
|
|
4642
|
+
for (command = 0; command < message.length; command++) {
|
|
4643
|
+
var id = message[command],
|
|
4644
|
+
retainedValue = deferredDebugObjects.retained.get(id);
|
|
4645
|
+
void 0 !== retainedValue &&
|
|
4646
|
+
(request.pendingDebugChunks--,
|
|
4647
|
+
deferredDebugObjects.retained.delete(id),
|
|
4648
|
+
deferredDebugObjects.existing.delete(retainedValue),
|
|
4649
|
+
enqueueFlush(request));
|
|
4650
|
+
}
|
|
4651
|
+
break;
|
|
4652
|
+
case 81:
|
|
4653
|
+
for (command = 0; command < message.length; command++)
|
|
4654
|
+
(id = message[command]),
|
|
4655
|
+
(retainedValue = deferredDebugObjects.retained.get(id)),
|
|
4656
|
+
void 0 !== retainedValue &&
|
|
4657
|
+
(deferredDebugObjects.retained.delete(id),
|
|
4658
|
+
deferredDebugObjects.existing.delete(retainedValue),
|
|
4659
|
+
emitOutlinedDebugModelChunk(
|
|
4660
|
+
request,
|
|
4661
|
+
id,
|
|
4662
|
+
{ objectLimit: 10 },
|
|
4663
|
+
retainedValue
|
|
4664
|
+
),
|
|
4665
|
+
enqueueFlush(request));
|
|
4666
|
+
break;
|
|
4667
|
+
case 80:
|
|
4668
|
+
for (command = 0; command < message.length; command++)
|
|
4669
|
+
(id = message[command]),
|
|
4670
|
+
(retainedValue = deferredDebugObjects.retained.get(id)),
|
|
4671
|
+
void 0 !== retainedValue &&
|
|
4672
|
+
(deferredDebugObjects.retained.delete(id),
|
|
4673
|
+
emitRequestedDebugThenable(
|
|
4674
|
+
request,
|
|
4675
|
+
id,
|
|
4676
|
+
{ objectLimit: 10 },
|
|
4677
|
+
retainedValue
|
|
4678
|
+
));
|
|
4679
|
+
break;
|
|
4680
|
+
default:
|
|
4681
|
+
throw Error(
|
|
4682
|
+
"Unknown command. The debugChannel was not wired up properly."
|
|
4683
|
+
);
|
|
4684
|
+
}
|
|
4685
|
+
}
|
|
4686
|
+
}
|
|
4687
|
+
stringBuffer = _ref[_ref.length - 1];
|
|
4688
|
+
if (done) closeDebugChannel(request$jscomp$0);
|
|
4689
|
+
else return reader.read().then(progress).catch(error);
|
|
4690
|
+
}
|
|
4691
|
+
function error(e) {
|
|
4692
|
+
abort(
|
|
4693
|
+
request$jscomp$0,
|
|
4694
|
+
Error("Lost connection to the Debug Channel.", { cause: e })
|
|
4695
|
+
);
|
|
4696
|
+
}
|
|
4697
|
+
var reader = stream.getReader(),
|
|
4698
|
+
stringDecoder = new TextDecoder(),
|
|
4699
|
+
stringBuffer = "";
|
|
4700
|
+
reader.read().then(progress).catch(error);
|
|
4701
|
+
}
|
|
3497
4702
|
var ReactDOM = require("react-dom"),
|
|
3498
4703
|
React = require("react"),
|
|
3499
4704
|
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
|
|
@@ -3541,6 +4746,8 @@
|
|
|
3541
4746
|
return;
|
|
3542
4747
|
case "defaultProps":
|
|
3543
4748
|
return;
|
|
4749
|
+
case "_debugInfo":
|
|
4750
|
+
return;
|
|
3544
4751
|
case "toJSON":
|
|
3545
4752
|
return;
|
|
3546
4753
|
case Symbol.toPrimitive:
|
|
@@ -3623,46 +4830,8 @@
|
|
|
3623
4830
|
} else previousDispatcher.C(href, crossOrigin);
|
|
3624
4831
|
}
|
|
3625
4832
|
},
|
|
3626
|
-
L:
|
|
3627
|
-
|
|
3628
|
-
var request = resolveRequest();
|
|
3629
|
-
if (request) {
|
|
3630
|
-
var hints = request.hints,
|
|
3631
|
-
key = "L";
|
|
3632
|
-
if ("image" === as && options) {
|
|
3633
|
-
var imageSrcSet = options.imageSrcSet,
|
|
3634
|
-
imageSizes = options.imageSizes,
|
|
3635
|
-
uniquePart = "";
|
|
3636
|
-
"string" === typeof imageSrcSet && "" !== imageSrcSet
|
|
3637
|
-
? ((uniquePart += "[" + imageSrcSet + "]"),
|
|
3638
|
-
"string" === typeof imageSizes &&
|
|
3639
|
-
(uniquePart += "[" + imageSizes + "]"))
|
|
3640
|
-
: (uniquePart += "[][]" + href);
|
|
3641
|
-
key += "[image]" + uniquePart;
|
|
3642
|
-
} else key += "[" + as + "]" + href;
|
|
3643
|
-
hints.has(key) ||
|
|
3644
|
-
(hints.add(key),
|
|
3645
|
-
(options = trimOptions(options))
|
|
3646
|
-
? emitHint(request, "L", [href, as, options])
|
|
3647
|
-
: emitHint(request, "L", [href, as]));
|
|
3648
|
-
} else previousDispatcher.L(href, as, options);
|
|
3649
|
-
}
|
|
3650
|
-
},
|
|
3651
|
-
m: function (href, options) {
|
|
3652
|
-
if ("string" === typeof href) {
|
|
3653
|
-
var request = resolveRequest();
|
|
3654
|
-
if (request) {
|
|
3655
|
-
var hints = request.hints,
|
|
3656
|
-
key = "m|" + href;
|
|
3657
|
-
if (hints.has(key)) return;
|
|
3658
|
-
hints.add(key);
|
|
3659
|
-
return (options = trimOptions(options))
|
|
3660
|
-
? emitHint(request, "m", [href, options])
|
|
3661
|
-
: emitHint(request, "m", href);
|
|
3662
|
-
}
|
|
3663
|
-
previousDispatcher.m(href, options);
|
|
3664
|
-
}
|
|
3665
|
-
},
|
|
4833
|
+
L: preload,
|
|
4834
|
+
m: preloadModule$1,
|
|
3666
4835
|
X: function (src, options) {
|
|
3667
4836
|
if ("string" === typeof src) {
|
|
3668
4837
|
var request = resolveRequest();
|
|
@@ -3715,21 +4884,19 @@
|
|
|
3715
4884
|
}
|
|
3716
4885
|
}
|
|
3717
4886
|
};
|
|
3718
|
-
var
|
|
4887
|
+
var framesToSkip = 0,
|
|
4888
|
+
collectedStackTrace = null,
|
|
4889
|
+
identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/,
|
|
4890
|
+
frameRegExp =
|
|
3719
4891
|
/^ {3} at (?:(.+) \((?:(.+):(\d+):(\d+)|<anonymous>)\)|(?:async )?(.+):(\d+):(\d+)|<anonymous>)$/,
|
|
4892
|
+
stackTraceCache = new WeakMap(),
|
|
3720
4893
|
supportsRequestStorage = "function" === typeof AsyncLocalStorage,
|
|
3721
4894
|
requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null,
|
|
3722
4895
|
supportsComponentStorage = supportsRequestStorage,
|
|
3723
4896
|
componentStorage = supportsComponentStorage
|
|
3724
4897
|
? new AsyncLocalStorage()
|
|
3725
|
-
: null
|
|
3726
|
-
|
|
3727
|
-
? async_hooks.createHook
|
|
3728
|
-
: function () {
|
|
3729
|
-
return { enable: function () {}, disable: function () {} };
|
|
3730
|
-
};
|
|
3731
|
-
"object" === typeof async_hooks ? async_hooks.executionAsyncId : null;
|
|
3732
|
-
var TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"),
|
|
4898
|
+
: null,
|
|
4899
|
+
TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"),
|
|
3733
4900
|
proxyHandlers = {
|
|
3734
4901
|
get: function (target, name) {
|
|
3735
4902
|
switch (name) {
|
|
@@ -3741,6 +4908,8 @@
|
|
|
3741
4908
|
return;
|
|
3742
4909
|
case "defaultProps":
|
|
3743
4910
|
return;
|
|
4911
|
+
case "_debugInfo":
|
|
4912
|
+
return;
|
|
3744
4913
|
case "toJSON":
|
|
3745
4914
|
return;
|
|
3746
4915
|
case Symbol.toPrimitive:
|
|
@@ -3751,6 +4920,8 @@
|
|
|
3751
4920
|
throw Error(
|
|
3752
4921
|
"Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider."
|
|
3753
4922
|
);
|
|
4923
|
+
case "then":
|
|
4924
|
+
return;
|
|
3754
4925
|
}
|
|
3755
4926
|
throw Error(
|
|
3756
4927
|
"Cannot access " +
|
|
@@ -3824,11 +4995,11 @@
|
|
|
3824
4995
|
throw Error("useId can only be used while React is rendering");
|
|
3825
4996
|
var id = currentRequest$1.identifierCount++;
|
|
3826
4997
|
return (
|
|
3827
|
-
"
|
|
4998
|
+
"_" +
|
|
3828
4999
|
currentRequest$1.identifierPrefix +
|
|
3829
|
-
"
|
|
5000
|
+
"S_" +
|
|
3830
5001
|
id.toString(32) +
|
|
3831
|
-
"
|
|
5002
|
+
"_"
|
|
3832
5003
|
);
|
|
3833
5004
|
},
|
|
3834
5005
|
useHostTransitionStatus: unsupportedHook,
|
|
@@ -3843,8 +5014,9 @@
|
|
|
3843
5014
|
useCacheRefresh: function () {
|
|
3844
5015
|
return unsupportedRefresh;
|
|
3845
5016
|
}
|
|
3846
|
-
}
|
|
3847
|
-
|
|
5017
|
+
};
|
|
5018
|
+
HooksDispatcher.useEffectEvent = unsupportedHook;
|
|
5019
|
+
var currentOwner = null,
|
|
3848
5020
|
DefaultAsyncDispatcher = {
|
|
3849
5021
|
getCacheForType: function (resourceType) {
|
|
3850
5022
|
var cache = (cache = resolveRequest()) ? cache.cache : new Map();
|
|
@@ -3852,6 +5024,10 @@
|
|
|
3852
5024
|
void 0 === entry &&
|
|
3853
5025
|
((entry = resourceType()), cache.set(resourceType, entry));
|
|
3854
5026
|
return entry;
|
|
5027
|
+
},
|
|
5028
|
+
cacheSignal: function () {
|
|
5029
|
+
var request = resolveRequest();
|
|
5030
|
+
return request ? request.cacheController.signal : null;
|
|
3855
5031
|
}
|
|
3856
5032
|
};
|
|
3857
5033
|
DefaultAsyncDispatcher.getOwner = resolveOwner;
|
|
@@ -3914,6 +5090,7 @@
|
|
|
3914
5090
|
jsxPropsParents = new WeakMap(),
|
|
3915
5091
|
jsxChildrenParents = new WeakMap(),
|
|
3916
5092
|
CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
|
|
5093
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
3917
5094
|
doNotLimit = new WeakSet();
|
|
3918
5095
|
"object" === typeof console &&
|
|
3919
5096
|
null !== console &&
|
|
@@ -3932,22 +5109,20 @@
|
|
|
3932
5109
|
patchConsole(console, "warn"));
|
|
3933
5110
|
var ObjectPrototype = Object.prototype,
|
|
3934
5111
|
stringify = JSON.stringify,
|
|
3935
|
-
PENDING$1 = 0,
|
|
3936
|
-
COMPLETED = 1,
|
|
3937
|
-
ABORTED = 3,
|
|
3938
|
-
ERRORED$1 = 4,
|
|
3939
|
-
RENDERING = 5,
|
|
3940
|
-
OPENING = 10,
|
|
3941
5112
|
ABORTING = 12,
|
|
3942
|
-
CLOSING = 13,
|
|
3943
5113
|
CLOSED = 14,
|
|
3944
|
-
|
|
5114
|
+
defaultPostponeHandler = noop,
|
|
3945
5115
|
currentRequest = null,
|
|
3946
|
-
|
|
5116
|
+
canEmitDebugInfo = !1,
|
|
5117
|
+
serializedSize = 0,
|
|
5118
|
+
MAX_ROW_SIZE = 3200,
|
|
3947
5119
|
modelRoot = !1,
|
|
5120
|
+
CONSTRUCTOR_MARKER = Symbol(),
|
|
5121
|
+
debugModelRoot = null,
|
|
5122
|
+
debugNoOutline = null,
|
|
3948
5123
|
emptyRoot = {},
|
|
3949
|
-
|
|
3950
|
-
|
|
5124
|
+
decoderOptions = { stream: !0 },
|
|
5125
|
+
chunkCache = new Map();
|
|
3951
5126
|
Chunk.prototype = Object.create(Promise.prototype);
|
|
3952
5127
|
Chunk.prototype.then = function (resolve, reject) {
|
|
3953
5128
|
switch (this.status) {
|
|
@@ -4076,6 +5251,50 @@
|
|
|
4076
5251
|
iterator.next().then(progress, error);
|
|
4077
5252
|
return getChunk(response$jscomp$0, 0);
|
|
4078
5253
|
};
|
|
5254
|
+
exports.prerender = function (model, webpackMap, options) {
|
|
5255
|
+
return new Promise(function (resolve, reject) {
|
|
5256
|
+
var request = createPrerenderRequest(
|
|
5257
|
+
model,
|
|
5258
|
+
webpackMap,
|
|
5259
|
+
function () {
|
|
5260
|
+
var stream = new ReadableStream(
|
|
5261
|
+
{
|
|
5262
|
+
type: "bytes",
|
|
5263
|
+
pull: function (controller) {
|
|
5264
|
+
startFlowing(request, controller);
|
|
5265
|
+
},
|
|
5266
|
+
cancel: function (reason) {
|
|
5267
|
+
request.destination = null;
|
|
5268
|
+
abort(request, reason);
|
|
5269
|
+
}
|
|
5270
|
+
},
|
|
5271
|
+
{ highWaterMark: 0 }
|
|
5272
|
+
);
|
|
5273
|
+
resolve({ prelude: stream });
|
|
5274
|
+
},
|
|
5275
|
+
reject,
|
|
5276
|
+
options ? options.onError : void 0,
|
|
5277
|
+
options ? options.identifierPrefix : void 0,
|
|
5278
|
+
options ? options.onPostpone : void 0,
|
|
5279
|
+
options ? options.temporaryReferences : void 0,
|
|
5280
|
+
options ? options.environmentName : void 0,
|
|
5281
|
+
options ? options.filterStackFrame : void 0,
|
|
5282
|
+
!1
|
|
5283
|
+
);
|
|
5284
|
+
if (options && options.signal) {
|
|
5285
|
+
var signal = options.signal;
|
|
5286
|
+
if (signal.aborted) abort(request, signal.reason);
|
|
5287
|
+
else {
|
|
5288
|
+
var listener = function () {
|
|
5289
|
+
abort(request, signal.reason);
|
|
5290
|
+
signal.removeEventListener("abort", listener);
|
|
5291
|
+
};
|
|
5292
|
+
signal.addEventListener("abort", listener);
|
|
5293
|
+
}
|
|
5294
|
+
}
|
|
5295
|
+
startWork(request);
|
|
5296
|
+
});
|
|
5297
|
+
};
|
|
4079
5298
|
exports.registerClientReference = function (
|
|
4080
5299
|
proxyImplementation,
|
|
4081
5300
|
id,
|
|
@@ -4100,16 +5319,25 @@
|
|
|
4100
5319
|
});
|
|
4101
5320
|
};
|
|
4102
5321
|
exports.renderToReadableStream = function (model, webpackMap, options) {
|
|
4103
|
-
var
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
5322
|
+
var debugChannelReadable =
|
|
5323
|
+
options && options.debugChannel
|
|
5324
|
+
? options.debugChannel.readable
|
|
5325
|
+
: void 0,
|
|
5326
|
+
debugChannelWritable =
|
|
5327
|
+
options && options.debugChannel
|
|
5328
|
+
? options.debugChannel.writable
|
|
5329
|
+
: void 0,
|
|
5330
|
+
request = createRequest(
|
|
5331
|
+
model,
|
|
5332
|
+
webpackMap,
|
|
5333
|
+
options ? options.onError : void 0,
|
|
5334
|
+
options ? options.identifierPrefix : void 0,
|
|
5335
|
+
options ? options.onPostpone : void 0,
|
|
5336
|
+
options ? options.temporaryReferences : void 0,
|
|
5337
|
+
options ? options.environmentName : void 0,
|
|
5338
|
+
options ? options.filterStackFrame : void 0,
|
|
5339
|
+
void 0 !== debugChannelReadable
|
|
5340
|
+
);
|
|
4113
5341
|
if (options && options.signal) {
|
|
4114
5342
|
var signal = options.signal;
|
|
4115
5343
|
if (signal.aborted) abort(request, signal.reason);
|
|
@@ -4121,6 +5349,35 @@
|
|
|
4121
5349
|
signal.addEventListener("abort", listener);
|
|
4122
5350
|
}
|
|
4123
5351
|
}
|
|
5352
|
+
void 0 !== debugChannelWritable &&
|
|
5353
|
+
new ReadableStream(
|
|
5354
|
+
{
|
|
5355
|
+
type: "bytes",
|
|
5356
|
+
pull: function (controller) {
|
|
5357
|
+
if (13 === request.status)
|
|
5358
|
+
(request.status = CLOSED),
|
|
5359
|
+
closeWithError(controller, request.fatalError);
|
|
5360
|
+
else if (
|
|
5361
|
+
request.status !== CLOSED &&
|
|
5362
|
+
null === request.debugDestination
|
|
5363
|
+
) {
|
|
5364
|
+
request.debugDestination = controller;
|
|
5365
|
+
try {
|
|
5366
|
+
flushCompletedChunks(request);
|
|
5367
|
+
} catch (error) {
|
|
5368
|
+
logRecoverableError(request, error, null),
|
|
5369
|
+
fatalError(request, error);
|
|
5370
|
+
}
|
|
5371
|
+
}
|
|
5372
|
+
}
|
|
5373
|
+
},
|
|
5374
|
+
{ highWaterMark: 0 }
|
|
5375
|
+
).pipeTo(debugChannelWritable);
|
|
5376
|
+
void 0 !== debugChannelReadable &&
|
|
5377
|
+
startReadingFromDebugChannelReadableStream(
|
|
5378
|
+
request,
|
|
5379
|
+
debugChannelReadable
|
|
5380
|
+
);
|
|
4124
5381
|
return new ReadableStream(
|
|
4125
5382
|
{
|
|
4126
5383
|
type: "bytes",
|
|
@@ -4138,50 +5395,4 @@
|
|
|
4138
5395
|
{ highWaterMark: 0 }
|
|
4139
5396
|
);
|
|
4140
5397
|
};
|
|
4141
|
-
exports.unstable_prerender = function (model, webpackMap, options) {
|
|
4142
|
-
return new Promise(function (resolve, reject) {
|
|
4143
|
-
var request = createPrerenderRequest(
|
|
4144
|
-
model,
|
|
4145
|
-
webpackMap,
|
|
4146
|
-
function () {
|
|
4147
|
-
var stream = new ReadableStream(
|
|
4148
|
-
{
|
|
4149
|
-
type: "bytes",
|
|
4150
|
-
start: function () {
|
|
4151
|
-
startWork(request);
|
|
4152
|
-
},
|
|
4153
|
-
pull: function (controller) {
|
|
4154
|
-
startFlowing(request, controller);
|
|
4155
|
-
},
|
|
4156
|
-
cancel: function (reason) {
|
|
4157
|
-
request.destination = null;
|
|
4158
|
-
abort(request, reason);
|
|
4159
|
-
}
|
|
4160
|
-
},
|
|
4161
|
-
{ highWaterMark: 0 }
|
|
4162
|
-
);
|
|
4163
|
-
resolve({ prelude: stream });
|
|
4164
|
-
},
|
|
4165
|
-
reject,
|
|
4166
|
-
options ? options.onError : void 0,
|
|
4167
|
-
options ? options.identifierPrefix : void 0,
|
|
4168
|
-
options ? options.onPostpone : void 0,
|
|
4169
|
-
options ? options.temporaryReferences : void 0,
|
|
4170
|
-
options ? options.environmentName : void 0,
|
|
4171
|
-
options ? options.filterStackFrame : void 0
|
|
4172
|
-
);
|
|
4173
|
-
if (options && options.signal) {
|
|
4174
|
-
var signal = options.signal;
|
|
4175
|
-
if (signal.aborted) abort(request, signal.reason);
|
|
4176
|
-
else {
|
|
4177
|
-
var listener = function () {
|
|
4178
|
-
abort(request, signal.reason);
|
|
4179
|
-
signal.removeEventListener("abort", listener);
|
|
4180
|
-
};
|
|
4181
|
-
signal.addEventListener("abort", listener);
|
|
4182
|
-
}
|
|
4183
|
-
}
|
|
4184
|
-
startWork(request);
|
|
4185
|
-
});
|
|
4186
|
-
};
|
|
4187
5398
|
})();
|