react-server-dom-webpack 19.2.7 → 19.2.9
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 +77 -46
- package/cjs/react-server-dom-webpack-client.browser.production.js +81 -66
- package/cjs/react-server-dom-webpack-client.edge.development.js +78 -43
- package/cjs/react-server-dom-webpack-client.edge.production.js +84 -69
- package/cjs/react-server-dom-webpack-client.node.development.js +78 -43
- 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 +208 -117
- package/cjs/react-server-dom-webpack-server.edge.development.js +247 -144
- package/cjs/react-server-dom-webpack-server.edge.production.js +239 -141
- package/cjs/react-server-dom-webpack-server.node.development.js +268 -162
- package/cjs/react-server-dom-webpack-server.node.production.js +258 -156
- package/package.json +5 -5
|
@@ -43,31 +43,39 @@
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
function writeChunkAndReturn(destination, chunk) {
|
|
46
|
-
if (0
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
(
|
|
50
|
-
|
|
46
|
+
if (0 === chunk.byteLength)
|
|
47
|
+
if (supportsArrayBufferDetached) {
|
|
48
|
+
if (chunk.buffer.detached)
|
|
49
|
+
throw Error(
|
|
50
|
+
"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()`."
|
|
51
|
+
);
|
|
52
|
+
} else
|
|
53
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
54
|
+
(console.error(
|
|
55
|
+
"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 browser that supports ArrayBuffer.prototype.detached."
|
|
51
56
|
),
|
|
52
|
-
(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
(currentView
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
58
|
+
else if (2048 < chunk.byteLength)
|
|
59
|
+
0 < writtenBytes &&
|
|
60
|
+
(destination.enqueue(
|
|
61
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
|
62
|
+
),
|
|
63
|
+
(currentView = new Uint8Array(2048)),
|
|
64
|
+
(writtenBytes = 0)),
|
|
65
|
+
destination.enqueue(chunk);
|
|
66
|
+
else {
|
|
67
|
+
var allowableBytes = currentView.length - writtenBytes;
|
|
68
|
+
allowableBytes < chunk.byteLength &&
|
|
69
|
+
(0 === allowableBytes
|
|
70
|
+
? destination.enqueue(currentView)
|
|
71
|
+
: (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
|
|
72
|
+
destination.enqueue(currentView),
|
|
73
|
+
(chunk = chunk.subarray(allowableBytes))),
|
|
74
|
+
(currentView = new Uint8Array(2048)),
|
|
75
|
+
(writtenBytes = 0));
|
|
76
|
+
currentView.set(chunk, writtenBytes);
|
|
77
|
+
writtenBytes += chunk.byteLength;
|
|
78
|
+
}
|
|
71
79
|
return !0;
|
|
72
80
|
}
|
|
73
81
|
function completeWriting(destination) {
|
|
@@ -1395,7 +1403,7 @@
|
|
|
1395
1403
|
erroredTask(request, streamTask, reason),
|
|
1396
1404
|
enqueueFlush(request),
|
|
1397
1405
|
"function" === typeof iterator.throw &&
|
|
1398
|
-
iterator.throw(reason).then(
|
|
1406
|
+
iterator.throw(reason).then(noop, noop));
|
|
1399
1407
|
}
|
|
1400
1408
|
function abortIterable() {
|
|
1401
1409
|
if (0 === streamTask.status) {
|
|
@@ -1409,7 +1417,7 @@
|
|
|
1409
1417
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1410
1418
|
enqueueFlush(request));
|
|
1411
1419
|
"function" === typeof iterator.throw &&
|
|
1412
|
-
iterator.throw(reason).then(
|
|
1420
|
+
iterator.throw(reason).then(noop, noop);
|
|
1413
1421
|
}
|
|
1414
1422
|
}
|
|
1415
1423
|
var isIterator = iterable === iterator,
|
|
@@ -2804,14 +2812,35 @@
|
|
|
2804
2812
|
}
|
|
2805
2813
|
function emitTypedArrayChunk(request, id, tag, typedArray, debug) {
|
|
2806
2814
|
debug ? request.pendingDebugChunks++ : request.pendingChunks++;
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
+
a: {
|
|
2816
|
+
var view = new Uint8Array(
|
|
2817
|
+
typedArray.buffer,
|
|
2818
|
+
typedArray.byteOffset,
|
|
2819
|
+
typedArray.byteLength
|
|
2820
|
+
);
|
|
2821
|
+
if (2048 < typedArray.byteLength) {
|
|
2822
|
+
if (
|
|
2823
|
+
0 !== typedArray.byteOffset ||
|
|
2824
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
2825
|
+
typedArray.buffer.resizable
|
|
2826
|
+
) {
|
|
2827
|
+
typedArray = view.slice();
|
|
2828
|
+
break a;
|
|
2829
|
+
}
|
|
2830
|
+
if (!supportsArrayBufferDetached) {
|
|
2831
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
2832
|
+
(console.error(
|
|
2833
|
+
"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 use a modern browser that supports ArrayBuffer.prototype.detached."
|
|
2834
|
+
),
|
|
2835
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
2836
|
+
typedArray = view.slice();
|
|
2837
|
+
break a;
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
typedArray = view;
|
|
2841
|
+
}
|
|
2842
|
+
view = typedArray.byteLength;
|
|
2843
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
2815
2844
|
id = stringToChunk(id);
|
|
2816
2845
|
debug
|
|
2817
2846
|
? request.completedDebugChunks.push(id, typedArray)
|
|
@@ -3879,6 +3908,39 @@
|
|
|
3879
3908
|
chunkMap.set(chunkId, filename);
|
|
3880
3909
|
return __webpack_chunk_load__(chunkId);
|
|
3881
3910
|
}
|
|
3911
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
3912
|
+
var prefix = backingStore.prefix;
|
|
3913
|
+
if (key.startsWith(prefix)) {
|
|
3914
|
+
switch (key[prefix.length]) {
|
|
3915
|
+
case "_":
|
|
3916
|
+
prefix = backingStore.referencedEntries;
|
|
3917
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
3918
|
+
prefix.push([key, value]);
|
|
3919
|
+
return;
|
|
3920
|
+
case "S":
|
|
3921
|
+
"string" === typeof value &&
|
|
3922
|
+
((prefix = backingStore.streamChunks),
|
|
3923
|
+
null === prefix &&
|
|
3924
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
3925
|
+
(backingStore = prefix.get(key)),
|
|
3926
|
+
void 0 === backingStore
|
|
3927
|
+
? prefix.set(key, [value])
|
|
3928
|
+
: backingStore.push(value));
|
|
3929
|
+
return;
|
|
3930
|
+
}
|
|
3931
|
+
"string" === typeof value
|
|
3932
|
+
? ((prefix = backingStore.stringChunks),
|
|
3933
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
3934
|
+
prefix.set(key, value))
|
|
3935
|
+
: ((prefix = backingStore.blobs),
|
|
3936
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
3937
|
+
prefix.set(key, value));
|
|
3938
|
+
}
|
|
3939
|
+
}
|
|
3940
|
+
function getBackingBlob(backingStore, key) {
|
|
3941
|
+
backingStore = backingStore.blobs;
|
|
3942
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
3943
|
+
}
|
|
3882
3944
|
function ReactPromise(status, value, reason) {
|
|
3883
3945
|
this.status = status;
|
|
3884
3946
|
this.value = value;
|
|
@@ -4190,9 +4252,11 @@
|
|
|
4190
4252
|
function getChunk(response, id) {
|
|
4191
4253
|
var chunks = response._chunks,
|
|
4192
4254
|
chunk = chunks.get(id);
|
|
4193
|
-
chunk
|
|
4194
|
-
|
|
4195
|
-
|
|
4255
|
+
if (!chunk) {
|
|
4256
|
+
chunk = response._prefix;
|
|
4257
|
+
var stringChunks = response._formData.stringChunks;
|
|
4258
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
4259
|
+
chunk =
|
|
4196
4260
|
"string" === typeof chunk
|
|
4197
4261
|
? new ReactPromise(
|
|
4198
4262
|
"resolved_model",
|
|
@@ -4201,8 +4265,9 @@
|
|
|
4201
4265
|
)
|
|
4202
4266
|
: response._closed
|
|
4203
4267
|
? new ReactPromise("rejected", null, response._closedReason)
|
|
4204
|
-
: new ReactPromise("pending", null, null)
|
|
4205
|
-
chunks.set(id, chunk)
|
|
4268
|
+
: new ReactPromise("pending", null, null);
|
|
4269
|
+
chunks.set(id, chunk);
|
|
4270
|
+
}
|
|
4206
4271
|
return chunk;
|
|
4207
4272
|
}
|
|
4208
4273
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -4449,7 +4514,7 @@
|
|
|
4449
4514
|
Error("Already initialized typed array.")
|
|
4450
4515
|
)
|
|
4451
4516
|
);
|
|
4452
|
-
reference = response._formData
|
|
4517
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
4453
4518
|
if (initializingHandler) {
|
|
4454
4519
|
var handler = initializingHandler;
|
|
4455
4520
|
handler.deps++;
|
|
@@ -4493,15 +4558,17 @@
|
|
|
4493
4558
|
var chunks = response._chunks;
|
|
4494
4559
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
4495
4560
|
chunks.set(id, stream);
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4561
|
+
chunks = response._prefix;
|
|
4562
|
+
response = response._formData.streamChunks;
|
|
4563
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
4564
|
+
if (void 0 !== id)
|
|
4565
|
+
for (response = 0; response < id.length; response++)
|
|
4566
|
+
(chunks = id[response]),
|
|
4567
|
+
"C" === chunks[0]
|
|
4501
4568
|
? controller.close(
|
|
4502
4569
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
4503
4570
|
)
|
|
4504
|
-
: controller.enqueueModel(chunks)
|
|
4571
|
+
: controller.enqueueModel(chunks);
|
|
4505
4572
|
}
|
|
4506
4573
|
function parseReadableStream(response, reference, type) {
|
|
4507
4574
|
function enqueue(value) {
|
|
@@ -4665,7 +4732,14 @@
|
|
|
4665
4732
|
});
|
|
4666
4733
|
return iterator;
|
|
4667
4734
|
}
|
|
4668
|
-
function parseModelString(
|
|
4735
|
+
function parseModelString(
|
|
4736
|
+
response,
|
|
4737
|
+
obj,
|
|
4738
|
+
key$jscomp$0,
|
|
4739
|
+
value,
|
|
4740
|
+
reference,
|
|
4741
|
+
arrayRoot
|
|
4742
|
+
) {
|
|
4669
4743
|
if ("$" === value[0]) {
|
|
4670
4744
|
switch (value[1]) {
|
|
4671
4745
|
case "$":
|
|
@@ -4685,7 +4759,7 @@
|
|
|
4685
4759
|
response,
|
|
4686
4760
|
arrayRoot,
|
|
4687
4761
|
obj,
|
|
4688
|
-
key,
|
|
4762
|
+
key$jscomp$0,
|
|
4689
4763
|
null,
|
|
4690
4764
|
loadServerReference$1
|
|
4691
4765
|
)
|
|
@@ -4705,41 +4779,44 @@
|
|
|
4705
4779
|
case "Q":
|
|
4706
4780
|
return (
|
|
4707
4781
|
(arrayRoot = value.slice(2)),
|
|
4708
|
-
getOutlinedModel(
|
|
4782
|
+
getOutlinedModel(
|
|
4783
|
+
response,
|
|
4784
|
+
arrayRoot,
|
|
4785
|
+
obj,
|
|
4786
|
+
key$jscomp$0,
|
|
4787
|
+
null,
|
|
4788
|
+
createMap
|
|
4789
|
+
)
|
|
4709
4790
|
);
|
|
4710
4791
|
case "W":
|
|
4711
4792
|
return (
|
|
4712
4793
|
(arrayRoot = value.slice(2)),
|
|
4713
|
-
getOutlinedModel(
|
|
4794
|
+
getOutlinedModel(
|
|
4795
|
+
response,
|
|
4796
|
+
arrayRoot,
|
|
4797
|
+
obj,
|
|
4798
|
+
key$jscomp$0,
|
|
4799
|
+
null,
|
|
4800
|
+
createSet
|
|
4801
|
+
)
|
|
4714
4802
|
);
|
|
4715
4803
|
case "K":
|
|
4716
|
-
key = value.slice(2);
|
|
4717
|
-
obj = response.
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
(
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
for (
|
|
4731
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
4732
|
-
i < reference.length;
|
|
4733
|
-
i++
|
|
4734
|
-
)
|
|
4735
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
4736
|
-
reference = response;
|
|
4737
|
-
reference.data.delete(value);
|
|
4738
|
-
reference.keyPointer++;
|
|
4739
|
-
} else if (value.startsWith(obj)) break;
|
|
4740
|
-
else response.keyPointer++;
|
|
4804
|
+
key$jscomp$0 = value.slice(2);
|
|
4805
|
+
obj = response._formData;
|
|
4806
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
4807
|
+
key$jscomp$0 = new FormData();
|
|
4808
|
+
arrayRoot = obj.referencedEntries;
|
|
4809
|
+
if (null !== arrayRoot) {
|
|
4810
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
4811
|
+
reference = arrayRoot[value];
|
|
4812
|
+
var key = reference[0];
|
|
4813
|
+
if (!key.startsWith(response)) break;
|
|
4814
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
4815
|
+
value++;
|
|
4816
|
+
}
|
|
4817
|
+
obj.keyPointer = value;
|
|
4741
4818
|
}
|
|
4742
|
-
return
|
|
4819
|
+
return key$jscomp$0;
|
|
4743
4820
|
case "i":
|
|
4744
4821
|
return (
|
|
4745
4822
|
(arrayRoot = value.slice(2)),
|
|
@@ -4747,7 +4824,7 @@
|
|
|
4747
4824
|
response,
|
|
4748
4825
|
arrayRoot,
|
|
4749
4826
|
obj,
|
|
4750
|
-
key,
|
|
4827
|
+
key$jscomp$0,
|
|
4751
4828
|
null,
|
|
4752
4829
|
extractIterator
|
|
4753
4830
|
)
|
|
@@ -4782,7 +4859,7 @@
|
|
|
4782
4859
|
ArrayBuffer,
|
|
4783
4860
|
1,
|
|
4784
4861
|
obj,
|
|
4785
|
-
key,
|
|
4862
|
+
key$jscomp$0,
|
|
4786
4863
|
arrayRoot
|
|
4787
4864
|
);
|
|
4788
4865
|
case "O":
|
|
@@ -4792,7 +4869,7 @@
|
|
|
4792
4869
|
Int8Array,
|
|
4793
4870
|
1,
|
|
4794
4871
|
obj,
|
|
4795
|
-
key,
|
|
4872
|
+
key$jscomp$0,
|
|
4796
4873
|
arrayRoot
|
|
4797
4874
|
);
|
|
4798
4875
|
case "o":
|
|
@@ -4802,7 +4879,7 @@
|
|
|
4802
4879
|
Uint8Array,
|
|
4803
4880
|
1,
|
|
4804
4881
|
obj,
|
|
4805
|
-
key,
|
|
4882
|
+
key$jscomp$0,
|
|
4806
4883
|
arrayRoot
|
|
4807
4884
|
);
|
|
4808
4885
|
case "U":
|
|
@@ -4812,7 +4889,7 @@
|
|
|
4812
4889
|
Uint8ClampedArray,
|
|
4813
4890
|
1,
|
|
4814
4891
|
obj,
|
|
4815
|
-
key,
|
|
4892
|
+
key$jscomp$0,
|
|
4816
4893
|
arrayRoot
|
|
4817
4894
|
);
|
|
4818
4895
|
case "S":
|
|
@@ -4822,7 +4899,7 @@
|
|
|
4822
4899
|
Int16Array,
|
|
4823
4900
|
2,
|
|
4824
4901
|
obj,
|
|
4825
|
-
key,
|
|
4902
|
+
key$jscomp$0,
|
|
4826
4903
|
arrayRoot
|
|
4827
4904
|
);
|
|
4828
4905
|
case "s":
|
|
@@ -4832,7 +4909,7 @@
|
|
|
4832
4909
|
Uint16Array,
|
|
4833
4910
|
2,
|
|
4834
4911
|
obj,
|
|
4835
|
-
key,
|
|
4912
|
+
key$jscomp$0,
|
|
4836
4913
|
arrayRoot
|
|
4837
4914
|
);
|
|
4838
4915
|
case "L":
|
|
@@ -4842,7 +4919,7 @@
|
|
|
4842
4919
|
Int32Array,
|
|
4843
4920
|
4,
|
|
4844
4921
|
obj,
|
|
4845
|
-
key,
|
|
4922
|
+
key$jscomp$0,
|
|
4846
4923
|
arrayRoot
|
|
4847
4924
|
);
|
|
4848
4925
|
case "l":
|
|
@@ -4852,7 +4929,7 @@
|
|
|
4852
4929
|
Uint32Array,
|
|
4853
4930
|
4,
|
|
4854
4931
|
obj,
|
|
4855
|
-
key,
|
|
4932
|
+
key$jscomp$0,
|
|
4856
4933
|
arrayRoot
|
|
4857
4934
|
);
|
|
4858
4935
|
case "G":
|
|
@@ -4862,7 +4939,7 @@
|
|
|
4862
4939
|
Float32Array,
|
|
4863
4940
|
4,
|
|
4864
4941
|
obj,
|
|
4865
|
-
key,
|
|
4942
|
+
key$jscomp$0,
|
|
4866
4943
|
arrayRoot
|
|
4867
4944
|
);
|
|
4868
4945
|
case "g":
|
|
@@ -4872,7 +4949,7 @@
|
|
|
4872
4949
|
Float64Array,
|
|
4873
4950
|
8,
|
|
4874
4951
|
obj,
|
|
4875
|
-
key,
|
|
4952
|
+
key$jscomp$0,
|
|
4876
4953
|
arrayRoot
|
|
4877
4954
|
);
|
|
4878
4955
|
case "M":
|
|
@@ -4882,7 +4959,7 @@
|
|
|
4882
4959
|
BigInt64Array,
|
|
4883
4960
|
8,
|
|
4884
4961
|
obj,
|
|
4885
|
-
key,
|
|
4962
|
+
key$jscomp$0,
|
|
4886
4963
|
arrayRoot
|
|
4887
4964
|
);
|
|
4888
4965
|
case "m":
|
|
@@ -4892,7 +4969,7 @@
|
|
|
4892
4969
|
BigUint64Array,
|
|
4893
4970
|
8,
|
|
4894
4971
|
obj,
|
|
4895
|
-
key,
|
|
4972
|
+
key$jscomp$0,
|
|
4896
4973
|
arrayRoot
|
|
4897
4974
|
);
|
|
4898
4975
|
case "V":
|
|
@@ -4902,13 +4979,13 @@
|
|
|
4902
4979
|
DataView,
|
|
4903
4980
|
1,
|
|
4904
4981
|
obj,
|
|
4905
|
-
key,
|
|
4982
|
+
key$jscomp$0,
|
|
4906
4983
|
arrayRoot
|
|
4907
4984
|
);
|
|
4908
4985
|
case "B":
|
|
4909
4986
|
return (
|
|
4910
4987
|
(obj = parseInt(value.slice(2), 16)),
|
|
4911
|
-
response._formData
|
|
4988
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
4912
4989
|
);
|
|
4913
4990
|
case "R":
|
|
4914
4991
|
return parseReadableStream(response, value, void 0);
|
|
@@ -4924,7 +5001,7 @@
|
|
|
4924
5001
|
response,
|
|
4925
5002
|
value,
|
|
4926
5003
|
obj,
|
|
4927
|
-
key,
|
|
5004
|
+
key$jscomp$0,
|
|
4928
5005
|
arrayRoot,
|
|
4929
5006
|
createModel
|
|
4930
5007
|
);
|
|
@@ -4943,11 +5020,20 @@
|
|
|
4943
5020
|
: new FormData(),
|
|
4944
5021
|
arraySizeLimit =
|
|
4945
5022
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
4946
|
-
chunks = new Map()
|
|
5023
|
+
chunks = new Map(),
|
|
5024
|
+
backingStore = {
|
|
5025
|
+
prefix: formFieldPrefix,
|
|
5026
|
+
referencedEntries: null,
|
|
5027
|
+
keyPointer: 0,
|
|
5028
|
+
stringChunks: null,
|
|
5029
|
+
streamChunks: null,
|
|
5030
|
+
blobs: null
|
|
5031
|
+
};
|
|
5032
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
4947
5033
|
return {
|
|
4948
5034
|
_bundlerConfig: bundlerConfig,
|
|
4949
5035
|
_prefix: formFieldPrefix,
|
|
4950
|
-
_formData:
|
|
5036
|
+
_formData: backingStore,
|
|
4951
5037
|
_chunks: chunks,
|
|
4952
5038
|
_closed: !1,
|
|
4953
5039
|
_closedReason: null,
|
|
@@ -5094,13 +5180,19 @@
|
|
|
5094
5180
|
}
|
|
5095
5181
|
var ReactDOM = require("react-dom"),
|
|
5096
5182
|
React = require("react"),
|
|
5183
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
5097
5184
|
channel = new MessageChannel(),
|
|
5098
5185
|
taskQueue = [];
|
|
5099
5186
|
channel.port1.onmessage = function () {
|
|
5100
5187
|
var task = taskQueue.shift();
|
|
5101
5188
|
task && task();
|
|
5102
5189
|
};
|
|
5103
|
-
var
|
|
5190
|
+
var supportsArrayBufferDetached = hasOwnProperty.call(
|
|
5191
|
+
ArrayBuffer.prototype,
|
|
5192
|
+
"detached"
|
|
5193
|
+
),
|
|
5194
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
5195
|
+
LocalPromise = Promise,
|
|
5104
5196
|
scheduleMicrotask =
|
|
5105
5197
|
"function" === typeof queueMicrotask
|
|
5106
5198
|
? queueMicrotask
|
|
@@ -5490,7 +5582,6 @@
|
|
|
5490
5582
|
jsxPropsParents = new WeakMap(),
|
|
5491
5583
|
jsxChildrenParents = new WeakMap(),
|
|
5492
5584
|
CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
|
|
5493
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
5494
5585
|
doNotLimit = new WeakSet();
|
|
5495
5586
|
"object" === typeof console &&
|
|
5496
5587
|
null !== console &&
|
|
@@ -5597,44 +5688,44 @@
|
|
|
5597
5688
|
};
|
|
5598
5689
|
exports.decodeAction = function (body, serverManifest) {
|
|
5599
5690
|
var formData = new FormData(),
|
|
5600
|
-
|
|
5601
|
-
seenActions = new Set();
|
|
5691
|
+
maybeActionKey = null;
|
|
5602
5692
|
body.forEach(function (value, key) {
|
|
5603
5693
|
key.startsWith("$ACTION_")
|
|
5604
5694
|
? key.startsWith("$ACTION_REF_")
|
|
5605
|
-
?
|
|
5606
|
-
|
|
5607
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
5608
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
5609
|
-
(action = loadServerReference(serverManifest, value)))
|
|
5610
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
5611
|
-
!seenActions.has(key) &&
|
|
5612
|
-
(seenActions.add(key),
|
|
5613
|
-
(value = key.slice(11)),
|
|
5614
|
-
(action = loadServerReference(serverManifest, {
|
|
5615
|
-
id: value,
|
|
5616
|
-
bound: null
|
|
5617
|
-
})))
|
|
5695
|
+
? (maybeActionKey = key)
|
|
5696
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
5618
5697
|
: formData.append(key, value);
|
|
5619
5698
|
});
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5699
|
+
if (null === maybeActionKey) return null;
|
|
5700
|
+
var actionKey = maybeActionKey,
|
|
5701
|
+
action = null;
|
|
5702
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
5703
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
5704
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
5705
|
+
(action = loadServerReference(serverManifest, body));
|
|
5706
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
5707
|
+
(body = actionKey.slice(11)),
|
|
5708
|
+
(action = loadServerReference(serverManifest, {
|
|
5709
|
+
id: body,
|
|
5710
|
+
bound: null
|
|
5711
|
+
}));
|
|
5712
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
5713
|
+
return action.then(function (fn) {
|
|
5714
|
+
return fn.bind(null, formData);
|
|
5715
|
+
});
|
|
5625
5716
|
};
|
|
5626
5717
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
5627
5718
|
var keyPath = body.get("$ACTION_KEY");
|
|
5628
5719
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
5629
|
-
var
|
|
5720
|
+
var actionKey = null;
|
|
5630
5721
|
body.forEach(function (value, key) {
|
|
5631
|
-
key.startsWith("$ACTION_REF_") &&
|
|
5632
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
5633
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
5722
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
5634
5723
|
});
|
|
5635
|
-
if (null ===
|
|
5636
|
-
var
|
|
5637
|
-
|
|
5724
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
5725
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
5726
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
5727
|
+
var referenceId = body.id;
|
|
5728
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
5638
5729
|
return null === bound
|
|
5639
5730
|
? null
|
|
5640
5731
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|