react-server-dom-webpack 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-webpack-client.browser.development.js +61 -52
- package/cjs/react-server-dom-webpack-client.browser.production.js +79 -63
- package/cjs/react-server-dom-webpack-client.edge.development.js +64 -52
- package/cjs/react-server-dom-webpack-client.edge.production.js +84 -69
- package/cjs/react-server-dom-webpack-client.node.development.js +64 -52
- package/cjs/react-server-dom-webpack-client.node.production.js +84 -69
- package/cjs/react-server-dom-webpack-server.browser.development.js +214 -123
- package/cjs/react-server-dom-webpack-server.browser.production.js +209 -118
- package/cjs/react-server-dom-webpack-server.edge.development.js +253 -149
- package/cjs/react-server-dom-webpack-server.edge.production.js +244 -145
- package/cjs/react-server-dom-webpack-server.node.development.js +270 -161
- package/cjs/react-server-dom-webpack-server.node.production.js +259 -154
- package/package.json +5 -5
|
@@ -47,31 +47,39 @@
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function writeChunkAndReturn(destination, chunk) {
|
|
50
|
-
if (0
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
(
|
|
54
|
-
|
|
50
|
+
if (0 === chunk.byteLength)
|
|
51
|
+
if (supportsArrayBufferDetached) {
|
|
52
|
+
if (chunk.buffer.detached)
|
|
53
|
+
throw Error(
|
|
54
|
+
"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()`."
|
|
55
|
+
);
|
|
56
|
+
} else
|
|
57
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
58
|
+
(console.error(
|
|
59
|
+
"React encountered an empty buffer when writing in an environment that does not support ArrayBuffer.prototype.detached. This could be a security issue if the buffer was not actually empty. Please use a modern Edge runtime that supports ArrayBuffer.prototype.detached."
|
|
55
60
|
),
|
|
56
|
-
(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(currentView
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
61
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
62
|
+
else if (2048 < chunk.byteLength)
|
|
63
|
+
0 < writtenBytes &&
|
|
64
|
+
(destination.enqueue(
|
|
65
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
|
66
|
+
),
|
|
67
|
+
(currentView = new Uint8Array(2048)),
|
|
68
|
+
(writtenBytes = 0)),
|
|
69
|
+
destination.enqueue(chunk);
|
|
70
|
+
else {
|
|
71
|
+
var allowableBytes = currentView.length - writtenBytes;
|
|
72
|
+
allowableBytes < chunk.byteLength &&
|
|
73
|
+
(0 === allowableBytes
|
|
74
|
+
? destination.enqueue(currentView)
|
|
75
|
+
: (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
|
|
76
|
+
destination.enqueue(currentView),
|
|
77
|
+
(chunk = chunk.subarray(allowableBytes))),
|
|
78
|
+
(currentView = new Uint8Array(2048)),
|
|
79
|
+
(writtenBytes = 0));
|
|
80
|
+
currentView.set(chunk, writtenBytes);
|
|
81
|
+
writtenBytes += chunk.byteLength;
|
|
82
|
+
}
|
|
75
83
|
return !0;
|
|
76
84
|
}
|
|
77
85
|
function stringToChunk(content) {
|
|
@@ -253,13 +261,13 @@
|
|
|
253
261
|
temporaryReferences.set(reference, id);
|
|
254
262
|
return reference;
|
|
255
263
|
}
|
|
256
|
-
function noop$
|
|
264
|
+
function noop$2() {}
|
|
257
265
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
258
266
|
index = thenableState[index];
|
|
259
267
|
void 0 === index
|
|
260
268
|
? thenableState.push(thenable)
|
|
261
269
|
: index !== thenable &&
|
|
262
|
-
(thenable.then(noop$
|
|
270
|
+
(thenable.then(noop$2, noop$2), (thenable = index));
|
|
263
271
|
switch (thenable.status) {
|
|
264
272
|
case "fulfilled":
|
|
265
273
|
return thenable.value;
|
|
@@ -267,7 +275,7 @@
|
|
|
267
275
|
throw thenable.reason;
|
|
268
276
|
default:
|
|
269
277
|
"string" === typeof thenable.status
|
|
270
|
-
? thenable.then(noop$
|
|
278
|
+
? thenable.then(noop$2, noop$2)
|
|
271
279
|
: ((thenableState = thenable),
|
|
272
280
|
(thenableState.status = "pending"),
|
|
273
281
|
thenableState.then(
|
|
@@ -711,7 +719,7 @@
|
|
|
711
719
|
type = createTask(this, model, null, !1, abortSet, null, null, null);
|
|
712
720
|
pingedTasks.push(type);
|
|
713
721
|
}
|
|
714
|
-
function noop() {}
|
|
722
|
+
function noop$1() {}
|
|
715
723
|
function createRequest(
|
|
716
724
|
model,
|
|
717
725
|
bundlerConfig,
|
|
@@ -733,8 +741,8 @@
|
|
|
733
741
|
temporaryReferences,
|
|
734
742
|
environmentName,
|
|
735
743
|
filterStackFrame,
|
|
736
|
-
noop,
|
|
737
|
-
noop
|
|
744
|
+
noop$1,
|
|
745
|
+
noop$1
|
|
738
746
|
);
|
|
739
747
|
}
|
|
740
748
|
function createPrerenderRequest(
|
|
@@ -933,7 +941,7 @@
|
|
|
933
941
|
erroredTask(request, streamTask, reason),
|
|
934
942
|
enqueueFlush(request),
|
|
935
943
|
"function" === typeof iterator.throw &&
|
|
936
|
-
iterator.throw(reason).then(
|
|
944
|
+
iterator.throw(reason).then(noop$1, noop$1));
|
|
937
945
|
}
|
|
938
946
|
function abortIterable(reason) {
|
|
939
947
|
aborted ||
|
|
@@ -942,7 +950,7 @@
|
|
|
942
950
|
erroredTask(request, streamTask, reason),
|
|
943
951
|
enqueueFlush(request),
|
|
944
952
|
"function" === typeof iterator.throw &&
|
|
945
|
-
iterator.throw(reason).then(
|
|
953
|
+
iterator.throw(reason).then(noop$1, noop$1));
|
|
946
954
|
}
|
|
947
955
|
var isIterator = iterable === iterator,
|
|
948
956
|
streamTask = createTask(
|
|
@@ -2184,14 +2192,35 @@
|
|
|
2184
2192
|
}
|
|
2185
2193
|
function emitTypedArrayChunk(request, id, tag, typedArray) {
|
|
2186
2194
|
request.pendingChunks++;
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
+
a: {
|
|
2196
|
+
var view = new Uint8Array(
|
|
2197
|
+
typedArray.buffer,
|
|
2198
|
+
typedArray.byteOffset,
|
|
2199
|
+
typedArray.byteLength
|
|
2200
|
+
);
|
|
2201
|
+
if (2048 < typedArray.byteLength) {
|
|
2202
|
+
if (
|
|
2203
|
+
0 !== typedArray.byteOffset ||
|
|
2204
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
2205
|
+
typedArray.buffer.resizable
|
|
2206
|
+
) {
|
|
2207
|
+
typedArray = view.slice();
|
|
2208
|
+
break a;
|
|
2209
|
+
}
|
|
2210
|
+
if (!supportsArrayBufferDetached) {
|
|
2211
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
2212
|
+
(console.error(
|
|
2213
|
+
"React copied a partial view into a fresh buffer as a safety precaution because the environment does not implement ArrayBuffer.prototype.detached. This negatively impacts performance. Please upgrade to a modern Edge runtime."
|
|
2214
|
+
),
|
|
2215
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
2216
|
+
typedArray = view.slice();
|
|
2217
|
+
break a;
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
typedArray = view;
|
|
2221
|
+
}
|
|
2222
|
+
view = typedArray.byteLength;
|
|
2223
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
2195
2224
|
id = stringToChunk(id);
|
|
2196
2225
|
request.completedRegularChunks.push(id, typedArray);
|
|
2197
2226
|
}
|
|
@@ -2833,13 +2862,38 @@
|
|
|
2833
2862
|
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
2834
2863
|
return moduleExports[metadata[2]];
|
|
2835
2864
|
}
|
|
2836
|
-
function appendBackingEntry(backingStore,
|
|
2837
|
-
backingStore.
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2865
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
2866
|
+
var prefix = backingStore.prefix;
|
|
2867
|
+
if (key.startsWith(prefix)) {
|
|
2868
|
+
switch (key[prefix.length]) {
|
|
2869
|
+
case "_":
|
|
2870
|
+
prefix = backingStore.referencedEntries;
|
|
2871
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
2872
|
+
prefix.push([key, value]);
|
|
2873
|
+
return;
|
|
2874
|
+
case "S":
|
|
2875
|
+
"string" === typeof value &&
|
|
2876
|
+
((prefix = backingStore.streamChunks),
|
|
2877
|
+
null === prefix &&
|
|
2878
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
2879
|
+
(backingStore = prefix.get(key)),
|
|
2880
|
+
void 0 === backingStore
|
|
2881
|
+
? prefix.set(key, [value])
|
|
2882
|
+
: backingStore.push(value));
|
|
2883
|
+
return;
|
|
2884
|
+
}
|
|
2885
|
+
"string" === typeof value
|
|
2886
|
+
? ((prefix = backingStore.stringChunks),
|
|
2887
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
2888
|
+
prefix.set(key, value))
|
|
2889
|
+
: ((prefix = backingStore.blobs),
|
|
2890
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
2891
|
+
prefix.set(key, value));
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
function getBackingBlob(backingStore, key) {
|
|
2895
|
+
backingStore = backingStore.blobs;
|
|
2896
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
2843
2897
|
}
|
|
2844
2898
|
function ReactPromise(status, value, reason) {
|
|
2845
2899
|
this.status = status;
|
|
@@ -3152,9 +3206,11 @@
|
|
|
3152
3206
|
function getChunk(response, id) {
|
|
3153
3207
|
var chunks = response._chunks,
|
|
3154
3208
|
chunk = chunks.get(id);
|
|
3155
|
-
chunk
|
|
3156
|
-
|
|
3157
|
-
|
|
3209
|
+
if (!chunk) {
|
|
3210
|
+
chunk = response._prefix;
|
|
3211
|
+
var stringChunks = response._formData.stringChunks;
|
|
3212
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
3213
|
+
chunk =
|
|
3158
3214
|
"string" === typeof chunk
|
|
3159
3215
|
? new ReactPromise(
|
|
3160
3216
|
"resolved_model",
|
|
@@ -3163,8 +3219,9 @@
|
|
|
3163
3219
|
)
|
|
3164
3220
|
: response._closed
|
|
3165
3221
|
? new ReactPromise("rejected", null, response._closedReason)
|
|
3166
|
-
: new ReactPromise("pending", null, null)
|
|
3167
|
-
chunks.set(id, chunk)
|
|
3222
|
+
: new ReactPromise("pending", null, null);
|
|
3223
|
+
chunks.set(id, chunk);
|
|
3224
|
+
}
|
|
3168
3225
|
return chunk;
|
|
3169
3226
|
}
|
|
3170
3227
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -3411,7 +3468,7 @@
|
|
|
3411
3468
|
Error("Already initialized typed array.")
|
|
3412
3469
|
)
|
|
3413
3470
|
);
|
|
3414
|
-
reference = response._formData
|
|
3471
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
3415
3472
|
if (initializingHandler) {
|
|
3416
3473
|
var handler = initializingHandler;
|
|
3417
3474
|
handler.deps++;
|
|
@@ -3455,15 +3512,17 @@
|
|
|
3455
3512
|
var chunks = response._chunks;
|
|
3456
3513
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
3457
3514
|
chunks.set(id, stream);
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3515
|
+
chunks = response._prefix;
|
|
3516
|
+
response = response._formData.streamChunks;
|
|
3517
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
3518
|
+
if (void 0 !== id)
|
|
3519
|
+
for (response = 0; response < id.length; response++)
|
|
3520
|
+
(chunks = id[response]),
|
|
3521
|
+
"C" === chunks[0]
|
|
3463
3522
|
? controller.close(
|
|
3464
3523
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
3465
3524
|
)
|
|
3466
|
-
: controller.enqueueModel(chunks)
|
|
3525
|
+
: controller.enqueueModel(chunks);
|
|
3467
3526
|
}
|
|
3468
3527
|
function parseReadableStream(response, reference, type) {
|
|
3469
3528
|
function enqueue(value) {
|
|
@@ -3627,7 +3686,14 @@
|
|
|
3627
3686
|
});
|
|
3628
3687
|
return iterator;
|
|
3629
3688
|
}
|
|
3630
|
-
function parseModelString(
|
|
3689
|
+
function parseModelString(
|
|
3690
|
+
response,
|
|
3691
|
+
obj,
|
|
3692
|
+
key$jscomp$0,
|
|
3693
|
+
value,
|
|
3694
|
+
reference,
|
|
3695
|
+
arrayRoot
|
|
3696
|
+
) {
|
|
3631
3697
|
if ("$" === value[0]) {
|
|
3632
3698
|
switch (value[1]) {
|
|
3633
3699
|
case "$":
|
|
@@ -3647,7 +3713,7 @@
|
|
|
3647
3713
|
response,
|
|
3648
3714
|
arrayRoot,
|
|
3649
3715
|
obj,
|
|
3650
|
-
key,
|
|
3716
|
+
key$jscomp$0,
|
|
3651
3717
|
null,
|
|
3652
3718
|
loadServerReference$1
|
|
3653
3719
|
)
|
|
@@ -3667,41 +3733,44 @@
|
|
|
3667
3733
|
case "Q":
|
|
3668
3734
|
return (
|
|
3669
3735
|
(arrayRoot = value.slice(2)),
|
|
3670
|
-
getOutlinedModel(
|
|
3736
|
+
getOutlinedModel(
|
|
3737
|
+
response,
|
|
3738
|
+
arrayRoot,
|
|
3739
|
+
obj,
|
|
3740
|
+
key$jscomp$0,
|
|
3741
|
+
null,
|
|
3742
|
+
createMap
|
|
3743
|
+
)
|
|
3671
3744
|
);
|
|
3672
3745
|
case "W":
|
|
3673
3746
|
return (
|
|
3674
3747
|
(arrayRoot = value.slice(2)),
|
|
3675
|
-
getOutlinedModel(
|
|
3748
|
+
getOutlinedModel(
|
|
3749
|
+
response,
|
|
3750
|
+
arrayRoot,
|
|
3751
|
+
obj,
|
|
3752
|
+
key$jscomp$0,
|
|
3753
|
+
null,
|
|
3754
|
+
createSet
|
|
3755
|
+
)
|
|
3676
3756
|
);
|
|
3677
3757
|
case "K":
|
|
3678
|
-
key = value.slice(2);
|
|
3679
|
-
obj = response.
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
(
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
for (
|
|
3693
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
3694
|
-
i < reference.length;
|
|
3695
|
-
i++
|
|
3696
|
-
)
|
|
3697
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
3698
|
-
reference = response;
|
|
3699
|
-
reference.data.delete(value);
|
|
3700
|
-
reference.keyPointer++;
|
|
3701
|
-
} else if (value.startsWith(obj)) break;
|
|
3702
|
-
else response.keyPointer++;
|
|
3758
|
+
key$jscomp$0 = value.slice(2);
|
|
3759
|
+
obj = response._formData;
|
|
3760
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
3761
|
+
key$jscomp$0 = new FormData();
|
|
3762
|
+
arrayRoot = obj.referencedEntries;
|
|
3763
|
+
if (null !== arrayRoot) {
|
|
3764
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
3765
|
+
reference = arrayRoot[value];
|
|
3766
|
+
var key = reference[0];
|
|
3767
|
+
if (!key.startsWith(response)) break;
|
|
3768
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
3769
|
+
value++;
|
|
3770
|
+
}
|
|
3771
|
+
obj.keyPointer = value;
|
|
3703
3772
|
}
|
|
3704
|
-
return
|
|
3773
|
+
return key$jscomp$0;
|
|
3705
3774
|
case "i":
|
|
3706
3775
|
return (
|
|
3707
3776
|
(arrayRoot = value.slice(2)),
|
|
@@ -3709,7 +3778,7 @@
|
|
|
3709
3778
|
response,
|
|
3710
3779
|
arrayRoot,
|
|
3711
3780
|
obj,
|
|
3712
|
-
key,
|
|
3781
|
+
key$jscomp$0,
|
|
3713
3782
|
null,
|
|
3714
3783
|
extractIterator
|
|
3715
3784
|
)
|
|
@@ -3744,7 +3813,7 @@
|
|
|
3744
3813
|
ArrayBuffer,
|
|
3745
3814
|
1,
|
|
3746
3815
|
obj,
|
|
3747
|
-
key,
|
|
3816
|
+
key$jscomp$0,
|
|
3748
3817
|
arrayRoot
|
|
3749
3818
|
);
|
|
3750
3819
|
case "O":
|
|
@@ -3754,7 +3823,7 @@
|
|
|
3754
3823
|
Int8Array,
|
|
3755
3824
|
1,
|
|
3756
3825
|
obj,
|
|
3757
|
-
key,
|
|
3826
|
+
key$jscomp$0,
|
|
3758
3827
|
arrayRoot
|
|
3759
3828
|
);
|
|
3760
3829
|
case "o":
|
|
@@ -3764,7 +3833,7 @@
|
|
|
3764
3833
|
Uint8Array,
|
|
3765
3834
|
1,
|
|
3766
3835
|
obj,
|
|
3767
|
-
key,
|
|
3836
|
+
key$jscomp$0,
|
|
3768
3837
|
arrayRoot
|
|
3769
3838
|
);
|
|
3770
3839
|
case "U":
|
|
@@ -3774,7 +3843,7 @@
|
|
|
3774
3843
|
Uint8ClampedArray,
|
|
3775
3844
|
1,
|
|
3776
3845
|
obj,
|
|
3777
|
-
key,
|
|
3846
|
+
key$jscomp$0,
|
|
3778
3847
|
arrayRoot
|
|
3779
3848
|
);
|
|
3780
3849
|
case "S":
|
|
@@ -3784,7 +3853,7 @@
|
|
|
3784
3853
|
Int16Array,
|
|
3785
3854
|
2,
|
|
3786
3855
|
obj,
|
|
3787
|
-
key,
|
|
3856
|
+
key$jscomp$0,
|
|
3788
3857
|
arrayRoot
|
|
3789
3858
|
);
|
|
3790
3859
|
case "s":
|
|
@@ -3794,7 +3863,7 @@
|
|
|
3794
3863
|
Uint16Array,
|
|
3795
3864
|
2,
|
|
3796
3865
|
obj,
|
|
3797
|
-
key,
|
|
3866
|
+
key$jscomp$0,
|
|
3798
3867
|
arrayRoot
|
|
3799
3868
|
);
|
|
3800
3869
|
case "L":
|
|
@@ -3804,7 +3873,7 @@
|
|
|
3804
3873
|
Int32Array,
|
|
3805
3874
|
4,
|
|
3806
3875
|
obj,
|
|
3807
|
-
key,
|
|
3876
|
+
key$jscomp$0,
|
|
3808
3877
|
arrayRoot
|
|
3809
3878
|
);
|
|
3810
3879
|
case "l":
|
|
@@ -3814,7 +3883,7 @@
|
|
|
3814
3883
|
Uint32Array,
|
|
3815
3884
|
4,
|
|
3816
3885
|
obj,
|
|
3817
|
-
key,
|
|
3886
|
+
key$jscomp$0,
|
|
3818
3887
|
arrayRoot
|
|
3819
3888
|
);
|
|
3820
3889
|
case "G":
|
|
@@ -3824,7 +3893,7 @@
|
|
|
3824
3893
|
Float32Array,
|
|
3825
3894
|
4,
|
|
3826
3895
|
obj,
|
|
3827
|
-
key,
|
|
3896
|
+
key$jscomp$0,
|
|
3828
3897
|
arrayRoot
|
|
3829
3898
|
);
|
|
3830
3899
|
case "g":
|
|
@@ -3834,7 +3903,7 @@
|
|
|
3834
3903
|
Float64Array,
|
|
3835
3904
|
8,
|
|
3836
3905
|
obj,
|
|
3837
|
-
key,
|
|
3906
|
+
key$jscomp$0,
|
|
3838
3907
|
arrayRoot
|
|
3839
3908
|
);
|
|
3840
3909
|
case "M":
|
|
@@ -3844,7 +3913,7 @@
|
|
|
3844
3913
|
BigInt64Array,
|
|
3845
3914
|
8,
|
|
3846
3915
|
obj,
|
|
3847
|
-
key,
|
|
3916
|
+
key$jscomp$0,
|
|
3848
3917
|
arrayRoot
|
|
3849
3918
|
);
|
|
3850
3919
|
case "m":
|
|
@@ -3854,7 +3923,7 @@
|
|
|
3854
3923
|
BigUint64Array,
|
|
3855
3924
|
8,
|
|
3856
3925
|
obj,
|
|
3857
|
-
key,
|
|
3926
|
+
key$jscomp$0,
|
|
3858
3927
|
arrayRoot
|
|
3859
3928
|
);
|
|
3860
3929
|
case "V":
|
|
@@ -3864,13 +3933,13 @@
|
|
|
3864
3933
|
DataView,
|
|
3865
3934
|
1,
|
|
3866
3935
|
obj,
|
|
3867
|
-
key,
|
|
3936
|
+
key$jscomp$0,
|
|
3868
3937
|
arrayRoot
|
|
3869
3938
|
);
|
|
3870
3939
|
case "B":
|
|
3871
3940
|
return (
|
|
3872
3941
|
(obj = parseInt(value.slice(2), 16)),
|
|
3873
|
-
response._formData
|
|
3942
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
3874
3943
|
);
|
|
3875
3944
|
case "R":
|
|
3876
3945
|
return parseReadableStream(response, value, void 0);
|
|
@@ -3886,7 +3955,7 @@
|
|
|
3886
3955
|
response,
|
|
3887
3956
|
value,
|
|
3888
3957
|
obj,
|
|
3889
|
-
key,
|
|
3958
|
+
key$jscomp$0,
|
|
3890
3959
|
arrayRoot,
|
|
3891
3960
|
createModel
|
|
3892
3961
|
);
|
|
@@ -3905,11 +3974,20 @@
|
|
|
3905
3974
|
: new FormData(),
|
|
3906
3975
|
arraySizeLimit =
|
|
3907
3976
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
3908
|
-
chunks = new Map()
|
|
3977
|
+
chunks = new Map(),
|
|
3978
|
+
backingStore = {
|
|
3979
|
+
prefix: formFieldPrefix,
|
|
3980
|
+
referencedEntries: null,
|
|
3981
|
+
keyPointer: 0,
|
|
3982
|
+
stringChunks: null,
|
|
3983
|
+
streamChunks: null,
|
|
3984
|
+
blobs: null
|
|
3985
|
+
};
|
|
3986
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
3909
3987
|
return {
|
|
3910
3988
|
_bundlerConfig: bundlerConfig,
|
|
3911
3989
|
_prefix: formFieldPrefix,
|
|
3912
|
-
_formData:
|
|
3990
|
+
_formData: backingStore,
|
|
3913
3991
|
_chunks: chunks,
|
|
3914
3992
|
_closed: !1,
|
|
3915
3993
|
_closedReason: null,
|
|
@@ -3966,6 +4044,7 @@
|
|
|
3966
4044
|
if ("fulfilled" !== body.status) throw body.reason;
|
|
3967
4045
|
return body.value;
|
|
3968
4046
|
}
|
|
4047
|
+
function noop() {}
|
|
3969
4048
|
var ReactDOM = require("react-dom"),
|
|
3970
4049
|
React = require("react"),
|
|
3971
4050
|
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
|
|
@@ -3981,6 +4060,12 @@
|
|
|
3981
4060
|
Symbol.for("react.postpone");
|
|
3982
4061
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
3983
4062
|
ASYNC_ITERATOR = Symbol.asyncIterator,
|
|
4063
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4064
|
+
supportsArrayBufferDetached = hasOwnProperty.call(
|
|
4065
|
+
ArrayBuffer.prototype,
|
|
4066
|
+
"detached"
|
|
4067
|
+
),
|
|
4068
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
3984
4069
|
LocalPromise = Promise,
|
|
3985
4070
|
scheduleMicrotask =
|
|
3986
4071
|
"function" === typeof queueMicrotask
|
|
@@ -4426,7 +4511,6 @@
|
|
|
4426
4511
|
debugID = null,
|
|
4427
4512
|
modelRoot = !1,
|
|
4428
4513
|
emptyRoot = {},
|
|
4429
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4430
4514
|
chunkCache = new Map(),
|
|
4431
4515
|
RESPONSE_SYMBOL = Symbol();
|
|
4432
4516
|
ReactPromise.prototype = Object.create(Promise.prototype);
|
|
@@ -4494,44 +4578,44 @@
|
|
|
4494
4578
|
};
|
|
4495
4579
|
exports.decodeAction = function (body, serverManifest) {
|
|
4496
4580
|
var formData = new FormData(),
|
|
4497
|
-
|
|
4498
|
-
seenActions = new Set();
|
|
4581
|
+
maybeActionKey = null;
|
|
4499
4582
|
body.forEach(function (value, key) {
|
|
4500
4583
|
key.startsWith("$ACTION_")
|
|
4501
4584
|
? key.startsWith("$ACTION_REF_")
|
|
4502
|
-
?
|
|
4503
|
-
|
|
4504
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4505
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4506
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4507
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4508
|
-
!seenActions.has(key) &&
|
|
4509
|
-
(seenActions.add(key),
|
|
4510
|
-
(value = key.slice(11)),
|
|
4511
|
-
(action = loadServerReference(serverManifest, {
|
|
4512
|
-
id: value,
|
|
4513
|
-
bound: null
|
|
4514
|
-
})))
|
|
4585
|
+
? (maybeActionKey = key)
|
|
4586
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4515
4587
|
: formData.append(key, value);
|
|
4516
4588
|
});
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4589
|
+
if (null === maybeActionKey) return null;
|
|
4590
|
+
var actionKey = maybeActionKey,
|
|
4591
|
+
action = null;
|
|
4592
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4593
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4594
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4595
|
+
(action = loadServerReference(serverManifest, body));
|
|
4596
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4597
|
+
(body = actionKey.slice(11)),
|
|
4598
|
+
(action = loadServerReference(serverManifest, {
|
|
4599
|
+
id: body,
|
|
4600
|
+
bound: null
|
|
4601
|
+
}));
|
|
4602
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4603
|
+
return action.then(function (fn) {
|
|
4604
|
+
return fn.bind(null, formData);
|
|
4605
|
+
});
|
|
4522
4606
|
};
|
|
4523
4607
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4524
4608
|
var keyPath = body.get("$ACTION_KEY");
|
|
4525
4609
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4526
|
-
var
|
|
4610
|
+
var actionKey = null;
|
|
4527
4611
|
body.forEach(function (value, key) {
|
|
4528
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4529
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4530
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4612
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4531
4613
|
});
|
|
4532
|
-
if (null ===
|
|
4533
|
-
var
|
|
4534
|
-
|
|
4614
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4615
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4616
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4617
|
+
var referenceId = body.id;
|
|
4618
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4535
4619
|
return null === bound
|
|
4536
4620
|
? null
|
|
4537
4621
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -4562,27 +4646,47 @@
|
|
|
4562
4646
|
function progress(entry) {
|
|
4563
4647
|
if (entry.done) close(response$jscomp$0);
|
|
4564
4648
|
else {
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
if ("string" === typeof
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4649
|
+
var _entry$value = entry.value;
|
|
4650
|
+
entry = _entry$value[0];
|
|
4651
|
+
_entry$value = _entry$value[1];
|
|
4652
|
+
if ("string" === typeof _entry$value)
|
|
4653
|
+
a: {
|
|
4654
|
+
var response = response$jscomp$0,
|
|
4655
|
+
prefix = response._prefix;
|
|
4656
|
+
if (entry.startsWith(prefix)) {
|
|
4657
|
+
var chunks = response._chunks;
|
|
4658
|
+
if ("S" === entry[prefix.length]) {
|
|
4659
|
+
if (
|
|
4660
|
+
entry.length > prefix.length + 1 &&
|
|
4661
|
+
((prefix = +entry.slice(prefix.length + 1)),
|
|
4662
|
+
(chunks = chunks.get(prefix)))
|
|
4663
|
+
) {
|
|
4664
|
+
resolveModelChunk(response, chunks, _entry$value, prefix);
|
|
4665
|
+
break a;
|
|
4666
|
+
}
|
|
4667
|
+
} else if (
|
|
4668
|
+
((prefix = +entry.slice(prefix.length)),
|
|
4669
|
+
(chunks = chunks.get(prefix)))
|
|
4670
|
+
) {
|
|
4671
|
+
resolveModelChunk(response, chunks, _entry$value, prefix);
|
|
4672
|
+
break a;
|
|
4673
|
+
}
|
|
4674
|
+
}
|
|
4675
|
+
appendBackingEntry(response._formData, _entry$value, entry);
|
|
4577
4676
|
}
|
|
4578
|
-
|
|
4677
|
+
else
|
|
4678
|
+
appendBackingEntry(
|
|
4679
|
+
response$jscomp$0._formData,
|
|
4680
|
+
_entry$value,
|
|
4681
|
+
entry
|
|
4682
|
+
);
|
|
4579
4683
|
iterator.next().then(progress, error);
|
|
4580
4684
|
}
|
|
4581
4685
|
}
|
|
4582
4686
|
function error(reason) {
|
|
4583
4687
|
reportGlobalError(response$jscomp$0, reason);
|
|
4584
4688
|
"function" === typeof iterator.throw &&
|
|
4585
|
-
iterator.throw(reason).then(
|
|
4689
|
+
iterator.throw(reason).then(noop, noop);
|
|
4586
4690
|
}
|
|
4587
4691
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
4588
4692
|
response$jscomp$0 = createResponse(
|