react-server-dom-turbopack 19.1.8 → 19.1.10
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/cjs/react-server-dom-turbopack-client.browser.development.js +61 -52
- package/cjs/react-server-dom-turbopack-client.browser.production.js +79 -63
- package/cjs/react-server-dom-turbopack-client.edge.development.js +64 -52
- package/cjs/react-server-dom-turbopack-client.edge.production.js +84 -69
- package/cjs/react-server-dom-turbopack-client.node.development.js +64 -52
- package/cjs/react-server-dom-turbopack-client.node.production.js +84 -69
- package/cjs/react-server-dom-turbopack-server.browser.development.js +214 -123
- package/cjs/react-server-dom-turbopack-server.browser.production.js +209 -118
- package/cjs/react-server-dom-turbopack-server.edge.development.js +253 -149
- package/cjs/react-server-dom-turbopack-server.edge.production.js +244 -145
- package/cjs/react-server-dom-turbopack-server.node.development.js +270 -161
- package/cjs/react-server-dom-turbopack-server.node.production.js +259 -154
- package/package.json +5 -5
|
@@ -30,7 +30,12 @@ function getIteratorFn(maybeIterable) {
|
|
|
30
30
|
maybeIterable["@@iterator"];
|
|
31
31
|
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
32
32
|
}
|
|
33
|
-
var ASYNC_ITERATOR = Symbol.asyncIterator
|
|
33
|
+
var ASYNC_ITERATOR = Symbol.asyncIterator,
|
|
34
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
35
|
+
supportsArrayBufferDetached = hasOwnProperty.call(
|
|
36
|
+
ArrayBuffer.prototype,
|
|
37
|
+
"detached"
|
|
38
|
+
);
|
|
34
39
|
function handleErrorInNextTick(error) {
|
|
35
40
|
setTimeout(function () {
|
|
36
41
|
throw error;
|
|
@@ -48,28 +53,30 @@ var LocalPromise = Promise,
|
|
|
48
53
|
currentView = null,
|
|
49
54
|
writtenBytes = 0;
|
|
50
55
|
function writeChunkAndReturn(destination, chunk) {
|
|
51
|
-
if (0
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
currentView
|
|
71
|
-
writtenBytes
|
|
72
|
-
|
|
56
|
+
if (0 === chunk.byteLength) {
|
|
57
|
+
if (supportsArrayBufferDetached && chunk.buffer.detached)
|
|
58
|
+
throw Error(
|
|
59
|
+
"Cannot transport a detached buffer. This usually happens when trying to transport multiple buffer-spanning views on the same underyling buffer. Either reuse the exact same view by identity or copy the underlying buffer manually via `view.slice()`."
|
|
60
|
+
);
|
|
61
|
+
} else if (2048 < chunk.byteLength)
|
|
62
|
+
0 < writtenBytes &&
|
|
63
|
+
(destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes)),
|
|
64
|
+
(currentView = new Uint8Array(2048)),
|
|
65
|
+
(writtenBytes = 0)),
|
|
66
|
+
destination.enqueue(chunk);
|
|
67
|
+
else {
|
|
68
|
+
var allowableBytes = currentView.length - writtenBytes;
|
|
69
|
+
allowableBytes < chunk.byteLength &&
|
|
70
|
+
(0 === allowableBytes
|
|
71
|
+
? destination.enqueue(currentView)
|
|
72
|
+
: (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
|
|
73
|
+
destination.enqueue(currentView),
|
|
74
|
+
(chunk = chunk.subarray(allowableBytes))),
|
|
75
|
+
(currentView = new Uint8Array(2048)),
|
|
76
|
+
(writtenBytes = 0));
|
|
77
|
+
currentView.set(chunk, writtenBytes);
|
|
78
|
+
writtenBytes += chunk.byteLength;
|
|
79
|
+
}
|
|
73
80
|
return !0;
|
|
74
81
|
}
|
|
75
82
|
var textEncoder = new TextEncoder();
|
|
@@ -451,12 +458,12 @@ function createTemporaryReference(temporaryReferences, id) {
|
|
|
451
458
|
var SuspenseException = Error(
|
|
452
459
|
"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
|
|
453
460
|
);
|
|
454
|
-
function noop$
|
|
461
|
+
function noop$2() {}
|
|
455
462
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
456
463
|
index = thenableState[index];
|
|
457
464
|
void 0 === index
|
|
458
465
|
? thenableState.push(thenable)
|
|
459
|
-
: index !== thenable && (thenable.then(noop$
|
|
466
|
+
: index !== thenable && (thenable.then(noop$2, noop$2), (thenable = index));
|
|
460
467
|
switch (thenable.status) {
|
|
461
468
|
case "fulfilled":
|
|
462
469
|
return thenable.value;
|
|
@@ -464,7 +471,7 @@ function trackUsedThenable(thenableState, thenable, index) {
|
|
|
464
471
|
throw thenable.reason;
|
|
465
472
|
default:
|
|
466
473
|
"string" === typeof thenable.status
|
|
467
|
-
? thenable.then(noop$
|
|
474
|
+
? thenable.then(noop$2, noop$2)
|
|
468
475
|
: ((thenableState = thenable),
|
|
469
476
|
(thenableState.status = "pending"),
|
|
470
477
|
thenableState.then(
|
|
@@ -769,7 +776,7 @@ function RequestInstance(
|
|
|
769
776
|
type = createTask(this, model, null, !1, filterStackFrame);
|
|
770
777
|
environmentName.push(type);
|
|
771
778
|
}
|
|
772
|
-
function noop() {}
|
|
779
|
+
function noop$1() {}
|
|
773
780
|
var currentRequest = null;
|
|
774
781
|
function resolveRequest() {
|
|
775
782
|
if (currentRequest) return currentRequest;
|
|
@@ -929,7 +936,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
929
936
|
erroredTask(request, streamTask, reason),
|
|
930
937
|
enqueueFlush(request),
|
|
931
938
|
"function" === typeof iterator.throw &&
|
|
932
|
-
iterator.throw(reason).then(
|
|
939
|
+
iterator.throw(reason).then(noop$1, noop$1));
|
|
933
940
|
}
|
|
934
941
|
function abortIterable(reason) {
|
|
935
942
|
aborted ||
|
|
@@ -938,7 +945,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
938
945
|
erroredTask(request, streamTask, reason),
|
|
939
946
|
enqueueFlush(request),
|
|
940
947
|
"function" === typeof iterator.throw &&
|
|
941
|
-
iterator.throw(reason).then(
|
|
948
|
+
iterator.throw(reason).then(noop$1, noop$1));
|
|
942
949
|
}
|
|
943
950
|
iterable = iterable === iterator;
|
|
944
951
|
var streamTask = createTask(
|
|
@@ -1661,14 +1668,30 @@ function emitModelChunk(request, id, json) {
|
|
|
1661
1668
|
}
|
|
1662
1669
|
function emitTypedArrayChunk(request, id, tag, typedArray) {
|
|
1663
1670
|
request.pendingChunks++;
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1671
|
+
a: {
|
|
1672
|
+
var view = new Uint8Array(
|
|
1673
|
+
typedArray.buffer,
|
|
1674
|
+
typedArray.byteOffset,
|
|
1675
|
+
typedArray.byteLength
|
|
1676
|
+
);
|
|
1677
|
+
if (2048 < typedArray.byteLength) {
|
|
1678
|
+
if (
|
|
1679
|
+
0 !== typedArray.byteOffset ||
|
|
1680
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
1681
|
+
typedArray.buffer.resizable
|
|
1682
|
+
) {
|
|
1683
|
+
typedArray = view.slice();
|
|
1684
|
+
break a;
|
|
1685
|
+
}
|
|
1686
|
+
if (!supportsArrayBufferDetached) {
|
|
1687
|
+
typedArray = view.slice();
|
|
1688
|
+
break a;
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
typedArray = view;
|
|
1692
|
+
}
|
|
1693
|
+
view = typedArray.byteLength;
|
|
1694
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
1672
1695
|
id = stringToChunk(id);
|
|
1673
1696
|
request.completedRegularChunks.push(id, typedArray);
|
|
1674
1697
|
}
|
|
@@ -1924,7 +1947,6 @@ function abort(request, reason) {
|
|
|
1924
1947
|
logRecoverableError(request, error$26, null), fatalError(request, error$26);
|
|
1925
1948
|
}
|
|
1926
1949
|
}
|
|
1927
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1928
1950
|
function resolveServerReference(bundlerConfig, id) {
|
|
1929
1951
|
var name = "",
|
|
1930
1952
|
resolvedModuleData = bundlerConfig[id];
|
|
@@ -1995,13 +2017,37 @@ function requireModule(metadata) {
|
|
|
1995
2017
|
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
1996
2018
|
return moduleExports[metadata[2]];
|
|
1997
2019
|
}
|
|
1998
|
-
function appendBackingEntry(backingStore,
|
|
1999
|
-
backingStore.
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2020
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
2021
|
+
var prefix = backingStore.prefix;
|
|
2022
|
+
if (key.startsWith(prefix)) {
|
|
2023
|
+
switch (key[prefix.length]) {
|
|
2024
|
+
case "_":
|
|
2025
|
+
prefix = backingStore.referencedEntries;
|
|
2026
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
2027
|
+
prefix.push([key, value]);
|
|
2028
|
+
return;
|
|
2029
|
+
case "S":
|
|
2030
|
+
"string" === typeof value &&
|
|
2031
|
+
((prefix = backingStore.streamChunks),
|
|
2032
|
+
null === prefix && (prefix = backingStore.streamChunks = new Map()),
|
|
2033
|
+
(backingStore = prefix.get(key)),
|
|
2034
|
+
void 0 === backingStore
|
|
2035
|
+
? prefix.set(key, [value])
|
|
2036
|
+
: backingStore.push(value));
|
|
2037
|
+
return;
|
|
2038
|
+
}
|
|
2039
|
+
"string" === typeof value
|
|
2040
|
+
? ((prefix = backingStore.stringChunks),
|
|
2041
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
2042
|
+
prefix.set(key, value))
|
|
2043
|
+
: ((prefix = backingStore.blobs),
|
|
2044
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
2045
|
+
prefix.set(key, value));
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
function getBackingBlob(backingStore, key) {
|
|
2049
|
+
backingStore = backingStore.blobs;
|
|
2050
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
2005
2051
|
}
|
|
2006
2052
|
var RESPONSE_SYMBOL = Symbol();
|
|
2007
2053
|
function ReactPromise(status, value, reason) {
|
|
@@ -2374,15 +2420,18 @@ function reportGlobalError(response, error) {
|
|
|
2374
2420
|
function getChunk(response, id) {
|
|
2375
2421
|
var chunks = response._chunks,
|
|
2376
2422
|
chunk = chunks.get(id);
|
|
2377
|
-
chunk
|
|
2378
|
-
|
|
2379
|
-
|
|
2423
|
+
if (!chunk) {
|
|
2424
|
+
chunk = response._prefix;
|
|
2425
|
+
var stringChunks = response._formData.stringChunks;
|
|
2426
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
2427
|
+
chunk =
|
|
2380
2428
|
"string" === typeof chunk
|
|
2381
2429
|
? createResolvedModelChunk(response, chunk, id)
|
|
2382
2430
|
: response._closed
|
|
2383
2431
|
? new ReactPromise("rejected", null, response._closedReason)
|
|
2384
|
-
: new ReactPromise("pending", null, null)
|
|
2385
|
-
chunks.set(id, chunk)
|
|
2432
|
+
: new ReactPromise("pending", null, null);
|
|
2433
|
+
chunks.set(id, chunk);
|
|
2434
|
+
}
|
|
2386
2435
|
return chunk;
|
|
2387
2436
|
}
|
|
2388
2437
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -2613,7 +2662,7 @@ function parseTypedArray(
|
|
|
2613
2662
|
Error("Already initialized typed array.")
|
|
2614
2663
|
)
|
|
2615
2664
|
);
|
|
2616
|
-
reference = response._formData
|
|
2665
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
2617
2666
|
if (initializingHandler) {
|
|
2618
2667
|
var handler = initializingHandler;
|
|
2619
2668
|
handler.deps++;
|
|
@@ -2657,13 +2706,15 @@ function resolveStream(response, id, stream, controller) {
|
|
|
2657
2706
|
var chunks = response._chunks;
|
|
2658
2707
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
2659
2708
|
chunks.set(id, stream);
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2709
|
+
chunks = response._prefix;
|
|
2710
|
+
response = response._formData.streamChunks;
|
|
2711
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
2712
|
+
if (void 0 !== id)
|
|
2713
|
+
for (response = 0; response < id.length; response++)
|
|
2714
|
+
(chunks = id[response]),
|
|
2715
|
+
"C" === chunks[0]
|
|
2665
2716
|
? controller.close("C" === chunks ? '"$undefined"' : chunks.slice(1))
|
|
2666
|
-
: controller.enqueueModel(chunks)
|
|
2717
|
+
: controller.enqueueModel(chunks);
|
|
2667
2718
|
}
|
|
2668
2719
|
function parseReadableStream(response, reference, type) {
|
|
2669
2720
|
function enqueue(value) {
|
|
@@ -2829,7 +2880,14 @@ function parseAsyncIterable(response, reference, iterator) {
|
|
|
2829
2880
|
});
|
|
2830
2881
|
return iterator;
|
|
2831
2882
|
}
|
|
2832
|
-
function parseModelString(
|
|
2883
|
+
function parseModelString(
|
|
2884
|
+
response,
|
|
2885
|
+
obj,
|
|
2886
|
+
key$jscomp$0,
|
|
2887
|
+
value,
|
|
2888
|
+
reference,
|
|
2889
|
+
arrayRoot
|
|
2890
|
+
) {
|
|
2833
2891
|
if ("$" === value[0]) {
|
|
2834
2892
|
switch (value[1]) {
|
|
2835
2893
|
case "$":
|
|
@@ -2847,7 +2905,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2847
2905
|
response,
|
|
2848
2906
|
arrayRoot,
|
|
2849
2907
|
obj,
|
|
2850
|
-
key,
|
|
2908
|
+
key$jscomp$0,
|
|
2851
2909
|
null,
|
|
2852
2910
|
loadServerReference$1
|
|
2853
2911
|
)
|
|
@@ -2864,43 +2922,55 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2864
2922
|
case "Q":
|
|
2865
2923
|
return (
|
|
2866
2924
|
(arrayRoot = value.slice(2)),
|
|
2867
|
-
getOutlinedModel(
|
|
2925
|
+
getOutlinedModel(
|
|
2926
|
+
response,
|
|
2927
|
+
arrayRoot,
|
|
2928
|
+
obj,
|
|
2929
|
+
key$jscomp$0,
|
|
2930
|
+
null,
|
|
2931
|
+
createMap
|
|
2932
|
+
)
|
|
2868
2933
|
);
|
|
2869
2934
|
case "W":
|
|
2870
2935
|
return (
|
|
2871
2936
|
(arrayRoot = value.slice(2)),
|
|
2872
|
-
getOutlinedModel(
|
|
2937
|
+
getOutlinedModel(
|
|
2938
|
+
response,
|
|
2939
|
+
arrayRoot,
|
|
2940
|
+
obj,
|
|
2941
|
+
key$jscomp$0,
|
|
2942
|
+
null,
|
|
2943
|
+
createSet
|
|
2944
|
+
)
|
|
2873
2945
|
);
|
|
2874
2946
|
case "K":
|
|
2875
|
-
|
|
2876
|
-
obj = response._prefix + "_";
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
2890
|
-
i < reference.length;
|
|
2891
|
-
i++
|
|
2892
|
-
)
|
|
2893
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
2894
|
-
response.data.delete(value);
|
|
2895
|
-
response.keyPointer++;
|
|
2896
|
-
} else if (value.startsWith(obj)) break;
|
|
2897
|
-
else response.keyPointer++;
|
|
2947
|
+
obj = value.slice(2);
|
|
2948
|
+
obj = response._prefix + "_" + obj + "_";
|
|
2949
|
+
response = response._formData;
|
|
2950
|
+
key$jscomp$0 = new FormData();
|
|
2951
|
+
arrayRoot = response.referencedEntries;
|
|
2952
|
+
if (null !== arrayRoot) {
|
|
2953
|
+
for (value = response.keyPointer; value < arrayRoot.length; ) {
|
|
2954
|
+
reference = arrayRoot[value];
|
|
2955
|
+
var key = reference[0];
|
|
2956
|
+
if (!key.startsWith(obj)) break;
|
|
2957
|
+
key$jscomp$0.append(key.slice(obj.length), reference[1]);
|
|
2958
|
+
value++;
|
|
2959
|
+
}
|
|
2960
|
+
response.keyPointer = value;
|
|
2898
2961
|
}
|
|
2899
|
-
return
|
|
2962
|
+
return key$jscomp$0;
|
|
2900
2963
|
case "i":
|
|
2901
2964
|
return (
|
|
2902
2965
|
(arrayRoot = value.slice(2)),
|
|
2903
|
-
getOutlinedModel(
|
|
2966
|
+
getOutlinedModel(
|
|
2967
|
+
response,
|
|
2968
|
+
arrayRoot,
|
|
2969
|
+
obj,
|
|
2970
|
+
key$jscomp$0,
|
|
2971
|
+
null,
|
|
2972
|
+
extractIterator
|
|
2973
|
+
)
|
|
2904
2974
|
);
|
|
2905
2975
|
case "I":
|
|
2906
2976
|
return Infinity;
|
|
@@ -2929,7 +2999,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2929
2999
|
ArrayBuffer,
|
|
2930
3000
|
1,
|
|
2931
3001
|
obj,
|
|
2932
|
-
key,
|
|
3002
|
+
key$jscomp$0,
|
|
2933
3003
|
arrayRoot
|
|
2934
3004
|
);
|
|
2935
3005
|
case "O":
|
|
@@ -2939,7 +3009,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2939
3009
|
Int8Array,
|
|
2940
3010
|
1,
|
|
2941
3011
|
obj,
|
|
2942
|
-
key,
|
|
3012
|
+
key$jscomp$0,
|
|
2943
3013
|
arrayRoot
|
|
2944
3014
|
);
|
|
2945
3015
|
case "o":
|
|
@@ -2949,7 +3019,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2949
3019
|
Uint8Array,
|
|
2950
3020
|
1,
|
|
2951
3021
|
obj,
|
|
2952
|
-
key,
|
|
3022
|
+
key$jscomp$0,
|
|
2953
3023
|
arrayRoot
|
|
2954
3024
|
);
|
|
2955
3025
|
case "U":
|
|
@@ -2959,7 +3029,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2959
3029
|
Uint8ClampedArray,
|
|
2960
3030
|
1,
|
|
2961
3031
|
obj,
|
|
2962
|
-
key,
|
|
3032
|
+
key$jscomp$0,
|
|
2963
3033
|
arrayRoot
|
|
2964
3034
|
);
|
|
2965
3035
|
case "S":
|
|
@@ -2969,7 +3039,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2969
3039
|
Int16Array,
|
|
2970
3040
|
2,
|
|
2971
3041
|
obj,
|
|
2972
|
-
key,
|
|
3042
|
+
key$jscomp$0,
|
|
2973
3043
|
arrayRoot
|
|
2974
3044
|
);
|
|
2975
3045
|
case "s":
|
|
@@ -2979,7 +3049,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2979
3049
|
Uint16Array,
|
|
2980
3050
|
2,
|
|
2981
3051
|
obj,
|
|
2982
|
-
key,
|
|
3052
|
+
key$jscomp$0,
|
|
2983
3053
|
arrayRoot
|
|
2984
3054
|
);
|
|
2985
3055
|
case "L":
|
|
@@ -2989,7 +3059,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2989
3059
|
Int32Array,
|
|
2990
3060
|
4,
|
|
2991
3061
|
obj,
|
|
2992
|
-
key,
|
|
3062
|
+
key$jscomp$0,
|
|
2993
3063
|
arrayRoot
|
|
2994
3064
|
);
|
|
2995
3065
|
case "l":
|
|
@@ -2999,7 +3069,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
2999
3069
|
Uint32Array,
|
|
3000
3070
|
4,
|
|
3001
3071
|
obj,
|
|
3002
|
-
key,
|
|
3072
|
+
key$jscomp$0,
|
|
3003
3073
|
arrayRoot
|
|
3004
3074
|
);
|
|
3005
3075
|
case "G":
|
|
@@ -3009,7 +3079,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
3009
3079
|
Float32Array,
|
|
3010
3080
|
4,
|
|
3011
3081
|
obj,
|
|
3012
|
-
key,
|
|
3082
|
+
key$jscomp$0,
|
|
3013
3083
|
arrayRoot
|
|
3014
3084
|
);
|
|
3015
3085
|
case "g":
|
|
@@ -3019,7 +3089,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
3019
3089
|
Float64Array,
|
|
3020
3090
|
8,
|
|
3021
3091
|
obj,
|
|
3022
|
-
key,
|
|
3092
|
+
key$jscomp$0,
|
|
3023
3093
|
arrayRoot
|
|
3024
3094
|
);
|
|
3025
3095
|
case "M":
|
|
@@ -3029,7 +3099,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
3029
3099
|
BigInt64Array,
|
|
3030
3100
|
8,
|
|
3031
3101
|
obj,
|
|
3032
|
-
key,
|
|
3102
|
+
key$jscomp$0,
|
|
3033
3103
|
arrayRoot
|
|
3034
3104
|
);
|
|
3035
3105
|
case "m":
|
|
@@ -3039,7 +3109,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
3039
3109
|
BigUint64Array,
|
|
3040
3110
|
8,
|
|
3041
3111
|
obj,
|
|
3042
|
-
key,
|
|
3112
|
+
key$jscomp$0,
|
|
3043
3113
|
arrayRoot
|
|
3044
3114
|
);
|
|
3045
3115
|
case "V":
|
|
@@ -3049,13 +3119,13 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
3049
3119
|
DataView,
|
|
3050
3120
|
1,
|
|
3051
3121
|
obj,
|
|
3052
|
-
key,
|
|
3122
|
+
key$jscomp$0,
|
|
3053
3123
|
arrayRoot
|
|
3054
3124
|
);
|
|
3055
3125
|
case "B":
|
|
3056
3126
|
return (
|
|
3057
3127
|
(obj = parseInt(value.slice(2), 16)),
|
|
3058
|
-
response._formData
|
|
3128
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
3059
3129
|
);
|
|
3060
3130
|
case "R":
|
|
3061
3131
|
return parseReadableStream(response, value, void 0);
|
|
@@ -3067,7 +3137,14 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
|
|
|
3067
3137
|
return parseAsyncIterable(response, value, !0);
|
|
3068
3138
|
}
|
|
3069
3139
|
value = value.slice(1);
|
|
3070
|
-
return getOutlinedModel(
|
|
3140
|
+
return getOutlinedModel(
|
|
3141
|
+
response,
|
|
3142
|
+
value,
|
|
3143
|
+
obj,
|
|
3144
|
+
key$jscomp$0,
|
|
3145
|
+
arrayRoot,
|
|
3146
|
+
createModel
|
|
3147
|
+
);
|
|
3071
3148
|
}
|
|
3072
3149
|
null !== arrayRoot && bumpArrayCount(arrayRoot, value.length, response);
|
|
3073
3150
|
return value;
|
|
@@ -3079,11 +3156,20 @@ function createResponse(bundlerConfig, formFieldPrefix, temporaryReferences) {
|
|
|
3079
3156
|
: new FormData(),
|
|
3080
3157
|
arraySizeLimit =
|
|
3081
3158
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
3082
|
-
chunks = new Map()
|
|
3159
|
+
chunks = new Map(),
|
|
3160
|
+
backingStore = {
|
|
3161
|
+
prefix: formFieldPrefix,
|
|
3162
|
+
referencedEntries: null,
|
|
3163
|
+
keyPointer: 0,
|
|
3164
|
+
stringChunks: null,
|
|
3165
|
+
streamChunks: null,
|
|
3166
|
+
blobs: null
|
|
3167
|
+
};
|
|
3168
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
3083
3169
|
return {
|
|
3084
3170
|
_bundlerConfig: bundlerConfig,
|
|
3085
3171
|
_prefix: formFieldPrefix,
|
|
3086
|
-
_formData:
|
|
3172
|
+
_formData: backingStore,
|
|
3087
3173
|
_chunks: chunks,
|
|
3088
3174
|
_closed: !1,
|
|
3089
3175
|
_closedReason: null,
|
|
@@ -3138,6 +3224,7 @@ function decodeBoundActionMetaData(
|
|
|
3138
3224
|
if ("fulfilled" !== body.status) throw body.reason;
|
|
3139
3225
|
return body.value;
|
|
3140
3226
|
}
|
|
3227
|
+
function noop() {}
|
|
3141
3228
|
exports.createClientModuleProxy = function (moduleId) {
|
|
3142
3229
|
moduleId = registerClientReferenceImpl({}, moduleId, !1);
|
|
3143
3230
|
return new Proxy(moduleId, proxyHandlers$1);
|
|
@@ -3147,44 +3234,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3147
3234
|
};
|
|
3148
3235
|
exports.decodeAction = function (body, serverManifest) {
|
|
3149
3236
|
var formData = new FormData(),
|
|
3150
|
-
|
|
3151
|
-
seenActions = new Set();
|
|
3237
|
+
maybeActionKey = null;
|
|
3152
3238
|
body.forEach(function (value, key) {
|
|
3153
3239
|
key.startsWith("$ACTION_")
|
|
3154
3240
|
? key.startsWith("$ACTION_REF_")
|
|
3155
|
-
?
|
|
3156
|
-
|
|
3157
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3158
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3159
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3160
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3161
|
-
!seenActions.has(key) &&
|
|
3162
|
-
(seenActions.add(key),
|
|
3163
|
-
(value = key.slice(11)),
|
|
3164
|
-
(action = loadServerReference(serverManifest, {
|
|
3165
|
-
id: value,
|
|
3166
|
-
bound: null
|
|
3167
|
-
})))
|
|
3241
|
+
? (maybeActionKey = key)
|
|
3242
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3168
3243
|
: formData.append(key, value);
|
|
3169
3244
|
});
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3245
|
+
if (null === maybeActionKey) return null;
|
|
3246
|
+
var actionKey = maybeActionKey,
|
|
3247
|
+
action = null;
|
|
3248
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3249
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3250
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3251
|
+
(action = loadServerReference(serverManifest, body));
|
|
3252
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3253
|
+
(body = actionKey.slice(11)),
|
|
3254
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3255
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3256
|
+
return action.then(function (fn) {
|
|
3257
|
+
return fn.bind(null, formData);
|
|
3258
|
+
});
|
|
3175
3259
|
};
|
|
3176
3260
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3177
3261
|
var keyPath = body.get("$ACTION_KEY");
|
|
3178
3262
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3179
|
-
var
|
|
3263
|
+
var actionKey = null;
|
|
3180
3264
|
body.forEach(function (value, key) {
|
|
3181
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3182
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3183
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3265
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3184
3266
|
});
|
|
3185
|
-
if (null ===
|
|
3186
|
-
var
|
|
3187
|
-
|
|
3267
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3268
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3269
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3270
|
+
var referenceId = body.id;
|
|
3271
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3188
3272
|
return null === bound
|
|
3189
3273
|
? null
|
|
3190
3274
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -3215,26 +3299,41 @@ exports.decodeReplyFromAsyncIterable = function (
|
|
|
3215
3299
|
function progress(entry) {
|
|
3216
3300
|
if (entry.done) close(response);
|
|
3217
3301
|
else {
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
if ("string" === typeof
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3302
|
+
var _entry$value = entry.value;
|
|
3303
|
+
entry = _entry$value[0];
|
|
3304
|
+
_entry$value = _entry$value[1];
|
|
3305
|
+
if ("string" === typeof _entry$value)
|
|
3306
|
+
a: {
|
|
3307
|
+
var prefix = response._prefix;
|
|
3308
|
+
if (entry.startsWith(prefix)) {
|
|
3309
|
+
var chunks = response._chunks;
|
|
3310
|
+
if ("S" === entry[prefix.length]) {
|
|
3311
|
+
if (
|
|
3312
|
+
entry.length > prefix.length + 1 &&
|
|
3313
|
+
((prefix = +entry.slice(prefix.length + 1)),
|
|
3314
|
+
(chunks = chunks.get(prefix)))
|
|
3315
|
+
) {
|
|
3316
|
+
resolveModelChunk(response, chunks, _entry$value, prefix);
|
|
3317
|
+
break a;
|
|
3318
|
+
}
|
|
3319
|
+
} else if (
|
|
3320
|
+
((prefix = +entry.slice(prefix.length)),
|
|
3321
|
+
(chunks = chunks.get(prefix)))
|
|
3322
|
+
) {
|
|
3323
|
+
resolveModelChunk(response, chunks, _entry$value, prefix);
|
|
3324
|
+
break a;
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
appendBackingEntry(response._formData, _entry$value, entry);
|
|
3229
3328
|
}
|
|
3230
|
-
|
|
3329
|
+
else appendBackingEntry(response._formData, _entry$value, entry);
|
|
3231
3330
|
iterator.next().then(progress, error);
|
|
3232
3331
|
}
|
|
3233
3332
|
}
|
|
3234
3333
|
function error(reason) {
|
|
3235
3334
|
reportGlobalError(response, reason);
|
|
3236
3335
|
"function" === typeof iterator.throw &&
|
|
3237
|
-
iterator.throw(reason).then(
|
|
3336
|
+
iterator.throw(reason).then(noop, noop);
|
|
3238
3337
|
}
|
|
3239
3338
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
3240
3339
|
response = createResponse(
|
|
@@ -3281,8 +3380,8 @@ exports.renderToReadableStream = function (model, turbopackMap, options) {
|
|
|
3281
3380
|
options ? options.temporaryReferences : void 0,
|
|
3282
3381
|
void 0,
|
|
3283
3382
|
void 0,
|
|
3284
|
-
noop,
|
|
3285
|
-
noop
|
|
3383
|
+
noop$1,
|
|
3384
|
+
noop$1
|
|
3286
3385
|
);
|
|
3287
3386
|
if (options && options.signal) {
|
|
3288
3387
|
var signal = options.signal;
|