react-server-dom-parcel 19.2.0 → 19.2.2
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-parcel-client.browser.development.js +198 -155
- package/cjs/react-server-dom-parcel-client.browser.production.js +200 -147
- package/cjs/react-server-dom-parcel-client.edge.development.js +196 -153
- package/cjs/react-server-dom-parcel-client.edge.production.js +200 -147
- package/cjs/react-server-dom-parcel-client.node.development.js +196 -153
- package/cjs/react-server-dom-parcel-client.node.production.js +200 -147
- package/cjs/react-server-dom-parcel-server.browser.development.js +466 -239
- package/cjs/react-server-dom-parcel-server.browser.production.js +463 -244
- package/cjs/react-server-dom-parcel-server.edge.development.js +472 -244
- package/cjs/react-server-dom-parcel-server.edge.production.js +465 -245
- package/cjs/react-server-dom-parcel-server.node.development.js +508 -267
- package/cjs/react-server-dom-parcel-server.node.production.js +503 -266
- package/package.json +3 -3
|
@@ -31,7 +31,9 @@
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
function requireModule(metadata) {
|
|
34
|
-
|
|
34
|
+
var moduleExports = parcelRequire(metadata[0]);
|
|
35
|
+
if (hasOwnProperty.call(moduleExports, metadata[1]))
|
|
36
|
+
return moduleExports[metadata[1]];
|
|
35
37
|
}
|
|
36
38
|
function _defineProperty(obj, key, value) {
|
|
37
39
|
a: if ("object" == typeof key && key) {
|
|
@@ -2022,7 +2024,7 @@
|
|
|
2022
2024
|
function serializeServerReference(request, serverReference) {
|
|
2023
2025
|
var writtenServerReferences = request.writtenServerReferences,
|
|
2024
2026
|
existingId = writtenServerReferences.get(serverReference);
|
|
2025
|
-
if (void 0 !== existingId) return "$
|
|
2027
|
+
if (void 0 !== existingId) return "$h" + existingId.toString(16);
|
|
2026
2028
|
existingId = serverReference.$$bound;
|
|
2027
2029
|
existingId = null === existingId ? null : Promise.resolve(existingId);
|
|
2028
2030
|
var id = serverReference.$$id,
|
|
@@ -2048,7 +2050,7 @@
|
|
|
2048
2050
|
: { id: id, bound: existingId };
|
|
2049
2051
|
request = outlineModel(request, existingId);
|
|
2050
2052
|
writtenServerReferences.set(serverReference, request);
|
|
2051
|
-
return "$
|
|
2053
|
+
return "$h" + request.toString(16);
|
|
2052
2054
|
}
|
|
2053
2055
|
function serializeLargeTextString(request, text) {
|
|
2054
2056
|
request.pendingChunks++;
|
|
@@ -3713,29 +3715,59 @@
|
|
|
3713
3715
|
});
|
|
3714
3716
|
enqueueFlush(request);
|
|
3715
3717
|
}
|
|
3716
|
-
function
|
|
3718
|
+
function ReactPromise(status, value, reason) {
|
|
3717
3719
|
this.status = status;
|
|
3718
3720
|
this.value = value;
|
|
3719
3721
|
this.reason = reason;
|
|
3720
|
-
this._response = response;
|
|
3721
3722
|
}
|
|
3722
|
-
function
|
|
3723
|
-
|
|
3723
|
+
function wakeChunk(response, listeners, value) {
|
|
3724
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
3725
|
+
var listener = listeners[i];
|
|
3726
|
+
"function" === typeof listener
|
|
3727
|
+
? listener(value)
|
|
3728
|
+
: fulfillReference(response, listener, value);
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3731
|
+
function rejectChunk(response, listeners, error) {
|
|
3732
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
3733
|
+
var listener = listeners[i];
|
|
3734
|
+
"function" === typeof listener
|
|
3735
|
+
? listener(error)
|
|
3736
|
+
: rejectReference(response, listener.handler, error);
|
|
3737
|
+
}
|
|
3724
3738
|
}
|
|
3725
|
-
function
|
|
3726
|
-
|
|
3739
|
+
function resolveBlockedCycle(resolvedChunk, reference) {
|
|
3740
|
+
var referencedChunk = reference.handler.chunk;
|
|
3741
|
+
if (null === referencedChunk) return null;
|
|
3742
|
+
if (referencedChunk === resolvedChunk) return reference.handler;
|
|
3743
|
+
reference = referencedChunk.value;
|
|
3744
|
+
if (null !== reference)
|
|
3745
|
+
for (
|
|
3746
|
+
referencedChunk = 0;
|
|
3747
|
+
referencedChunk < reference.length;
|
|
3748
|
+
referencedChunk++
|
|
3749
|
+
) {
|
|
3750
|
+
var listener = reference[referencedChunk];
|
|
3751
|
+
if (
|
|
3752
|
+
"function" !== typeof listener &&
|
|
3753
|
+
((listener = resolveBlockedCycle(resolvedChunk, listener)),
|
|
3754
|
+
null !== listener)
|
|
3755
|
+
)
|
|
3756
|
+
return listener;
|
|
3757
|
+
}
|
|
3758
|
+
return null;
|
|
3727
3759
|
}
|
|
3728
|
-
function triggerErrorOnChunk(chunk, error) {
|
|
3760
|
+
function triggerErrorOnChunk(response, chunk, error) {
|
|
3729
3761
|
if ("pending" !== chunk.status && "blocked" !== chunk.status)
|
|
3730
3762
|
chunk.reason.error(error);
|
|
3731
3763
|
else {
|
|
3732
3764
|
var listeners = chunk.reason;
|
|
3733
3765
|
chunk.status = "rejected";
|
|
3734
3766
|
chunk.reason = error;
|
|
3735
|
-
null !== listeners &&
|
|
3767
|
+
null !== listeners && rejectChunk(response, listeners, error);
|
|
3736
3768
|
}
|
|
3737
3769
|
}
|
|
3738
|
-
function resolveModelChunk(chunk, value, id) {
|
|
3770
|
+
function resolveModelChunk(response, chunk, value, id) {
|
|
3739
3771
|
if ("pending" !== chunk.status)
|
|
3740
3772
|
(chunk = chunk.reason),
|
|
3741
3773
|
"C" === value[0]
|
|
@@ -3746,42 +3778,74 @@
|
|
|
3746
3778
|
rejectListeners = chunk.reason;
|
|
3747
3779
|
chunk.status = "resolved_model";
|
|
3748
3780
|
chunk.value = value;
|
|
3749
|
-
chunk.reason = id;
|
|
3781
|
+
chunk.reason = _defineProperty({ id: id }, RESPONSE_SYMBOL, response);
|
|
3750
3782
|
if (null !== resolveListeners)
|
|
3751
|
-
switch ((initializeModelChunk(chunk), chunk.status)) {
|
|
3783
|
+
a: switch ((initializeModelChunk(chunk), chunk.status)) {
|
|
3752
3784
|
case "fulfilled":
|
|
3753
|
-
wakeChunk(resolveListeners, chunk.value);
|
|
3785
|
+
wakeChunk(response, resolveListeners, chunk.value);
|
|
3754
3786
|
break;
|
|
3755
|
-
case "pending":
|
|
3756
3787
|
case "blocked":
|
|
3757
|
-
|
|
3788
|
+
for (value = 0; value < resolveListeners.length; value++)
|
|
3789
|
+
if (
|
|
3790
|
+
((id = resolveListeners[value]), "function" !== typeof id)
|
|
3791
|
+
) {
|
|
3792
|
+
var cyclicHandler = resolveBlockedCycle(chunk, id);
|
|
3793
|
+
if (null !== cyclicHandler)
|
|
3794
|
+
switch (
|
|
3795
|
+
(fulfillReference(response, id, cyclicHandler.value),
|
|
3796
|
+
resolveListeners.splice(value, 1),
|
|
3797
|
+
value--,
|
|
3798
|
+
null !== rejectListeners &&
|
|
3799
|
+
((id = rejectListeners.indexOf(id)),
|
|
3800
|
+
-1 !== id && rejectListeners.splice(id, 1)),
|
|
3801
|
+
chunk.status)
|
|
3802
|
+
) {
|
|
3803
|
+
case "fulfilled":
|
|
3804
|
+
wakeChunk(response, resolveListeners, chunk.value);
|
|
3805
|
+
break a;
|
|
3806
|
+
case "rejected":
|
|
3807
|
+
null !== rejectListeners &&
|
|
3808
|
+
rejectChunk(response, rejectListeners, chunk.reason);
|
|
3809
|
+
break a;
|
|
3810
|
+
}
|
|
3811
|
+
}
|
|
3812
|
+
case "pending":
|
|
3758
3813
|
if (chunk.value)
|
|
3759
|
-
for (
|
|
3760
|
-
|
|
3814
|
+
for (
|
|
3815
|
+
response = 0;
|
|
3816
|
+
response < resolveListeners.length;
|
|
3817
|
+
response++
|
|
3818
|
+
)
|
|
3819
|
+
chunk.value.push(resolveListeners[response]);
|
|
3761
3820
|
else chunk.value = resolveListeners;
|
|
3762
3821
|
if (chunk.reason) {
|
|
3763
3822
|
if (rejectListeners)
|
|
3764
|
-
for (
|
|
3765
|
-
|
|
3823
|
+
for (
|
|
3824
|
+
resolveListeners = 0;
|
|
3825
|
+
resolveListeners < rejectListeners.length;
|
|
3826
|
+
resolveListeners++
|
|
3827
|
+
)
|
|
3828
|
+
chunk.reason.push(rejectListeners[resolveListeners]);
|
|
3766
3829
|
} else chunk.reason = rejectListeners;
|
|
3767
3830
|
break;
|
|
3768
3831
|
case "rejected":
|
|
3769
|
-
rejectListeners &&
|
|
3832
|
+
rejectListeners &&
|
|
3833
|
+
wakeChunk(response, rejectListeners, chunk.reason);
|
|
3770
3834
|
}
|
|
3771
3835
|
}
|
|
3772
3836
|
}
|
|
3773
3837
|
function createResolvedIteratorResultChunk(response, value, done) {
|
|
3774
|
-
return new
|
|
3838
|
+
return new ReactPromise(
|
|
3775
3839
|
"resolved_model",
|
|
3776
3840
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') +
|
|
3777
3841
|
value +
|
|
3778
3842
|
"}",
|
|
3779
|
-
-1,
|
|
3780
|
-
response
|
|
3843
|
+
_defineProperty({ id: -1 }, RESPONSE_SYMBOL, response)
|
|
3781
3844
|
);
|
|
3782
3845
|
}
|
|
3783
|
-
function resolveIteratorResultChunk(chunk, value, done) {
|
|
3846
|
+
function resolveIteratorResultChunk(response, chunk, value, done) {
|
|
3784
3847
|
resolveModelChunk(
|
|
3848
|
+
response,
|
|
3785
3849
|
chunk,
|
|
3786
3850
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') +
|
|
3787
3851
|
value +
|
|
@@ -3789,38 +3853,68 @@
|
|
|
3789
3853
|
-1
|
|
3790
3854
|
);
|
|
3791
3855
|
}
|
|
3792
|
-
function loadServerReference$1(
|
|
3793
|
-
|
|
3794
|
-
id
|
|
3795
|
-
bound,
|
|
3796
|
-
parentChunk,
|
|
3797
|
-
parentObject,
|
|
3798
|
-
key
|
|
3799
|
-
) {
|
|
3856
|
+
function loadServerReference$1(response, metaData, parentObject, key) {
|
|
3857
|
+
var id = metaData.id;
|
|
3858
|
+
if ("string" !== typeof id || "then" === key) return null;
|
|
3800
3859
|
var serverReference = resolveServerReference(response._bundlerConfig, id);
|
|
3801
|
-
id =
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
return fn.bind.apply(fn, [null].concat(_ref));
|
|
3807
|
-
});
|
|
3808
|
-
else if (id)
|
|
3809
|
-
bound = Promise.resolve(id).then(function () {
|
|
3810
|
-
return requireModule(serverReference);
|
|
3811
|
-
});
|
|
3860
|
+
id = metaData.bound;
|
|
3861
|
+
var promise = preloadModule$1(serverReference);
|
|
3862
|
+
if (promise)
|
|
3863
|
+
id instanceof ReactPromise && (promise = Promise.all([promise, id]));
|
|
3864
|
+
else if (id instanceof ReactPromise) promise = Promise.resolve(id);
|
|
3812
3865
|
else return requireModule(serverReference);
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3866
|
+
if (initializingHandler) {
|
|
3867
|
+
var handler = initializingHandler;
|
|
3868
|
+
handler.deps++;
|
|
3869
|
+
} else
|
|
3870
|
+
handler = initializingHandler = {
|
|
3871
|
+
chunk: null,
|
|
3872
|
+
value: null,
|
|
3873
|
+
reason: null,
|
|
3874
|
+
deps: 1,
|
|
3875
|
+
errored: !1
|
|
3876
|
+
};
|
|
3877
|
+
promise.then(
|
|
3878
|
+
function () {
|
|
3879
|
+
var resolvedValue = requireModule(serverReference);
|
|
3880
|
+
if (metaData.bound) {
|
|
3881
|
+
var promiseValue = metaData.bound.value;
|
|
3882
|
+
promiseValue = Array.isArray(promiseValue)
|
|
3883
|
+
? promiseValue.slice(0)
|
|
3884
|
+
: [];
|
|
3885
|
+
promiseValue.unshift(null);
|
|
3886
|
+
resolvedValue = resolvedValue.bind.apply(
|
|
3887
|
+
resolvedValue,
|
|
3888
|
+
promiseValue
|
|
3889
|
+
);
|
|
3890
|
+
}
|
|
3891
|
+
parentObject[key] = resolvedValue;
|
|
3892
|
+
"" === key &&
|
|
3893
|
+
null === handler.value &&
|
|
3894
|
+
(handler.value = resolvedValue);
|
|
3895
|
+
handler.deps--;
|
|
3896
|
+
0 === handler.deps &&
|
|
3897
|
+
((resolvedValue = handler.chunk),
|
|
3898
|
+
null !== resolvedValue &&
|
|
3899
|
+
"blocked" === resolvedValue.status &&
|
|
3900
|
+
((promiseValue = resolvedValue.value),
|
|
3901
|
+
(resolvedValue.status = "fulfilled"),
|
|
3902
|
+
(resolvedValue.value = handler.value),
|
|
3903
|
+
(resolvedValue.reason = null),
|
|
3904
|
+
null !== promiseValue &&
|
|
3905
|
+
wakeChunk(response, promiseValue, handler.value)));
|
|
3906
|
+
},
|
|
3907
|
+
function (error) {
|
|
3908
|
+
if (!handler.errored) {
|
|
3909
|
+
handler.errored = !0;
|
|
3910
|
+
handler.value = null;
|
|
3911
|
+
handler.reason = error;
|
|
3912
|
+
var chunk = handler.chunk;
|
|
3913
|
+
null !== chunk &&
|
|
3914
|
+
"blocked" === chunk.status &&
|
|
3915
|
+
triggerErrorOnChunk(response, chunk, error);
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3824
3918
|
);
|
|
3825
3919
|
return null;
|
|
3826
3920
|
}
|
|
@@ -3862,53 +3956,70 @@
|
|
|
3862
3956
|
value[i],
|
|
3863
3957
|
parentObj
|
|
3864
3958
|
)),
|
|
3865
|
-
void 0 !== parentObj
|
|
3959
|
+
void 0 !== parentObj || "__proto__" === i
|
|
3960
|
+
? (value[i] = parentObj)
|
|
3961
|
+
: delete value[i]);
|
|
3866
3962
|
return value;
|
|
3867
3963
|
}
|
|
3868
3964
|
function initializeModelChunk(chunk) {
|
|
3869
|
-
var
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3965
|
+
var prevHandler = initializingHandler;
|
|
3966
|
+
initializingHandler = null;
|
|
3967
|
+
var _chunk$reason = chunk.reason,
|
|
3968
|
+
response = _chunk$reason[RESPONSE_SYMBOL];
|
|
3969
|
+
_chunk$reason = _chunk$reason.id;
|
|
3970
|
+
_chunk$reason =
|
|
3971
|
+
-1 === _chunk$reason ? void 0 : _chunk$reason.toString(16);
|
|
3972
|
+
var resolvedModel = chunk.value;
|
|
3973
|
+
chunk.status = "blocked";
|
|
3877
3974
|
chunk.value = null;
|
|
3878
3975
|
chunk.reason = null;
|
|
3879
3976
|
try {
|
|
3880
3977
|
var rawModel = JSON.parse(resolvedModel),
|
|
3881
3978
|
value = reviveModel(
|
|
3882
|
-
|
|
3979
|
+
response,
|
|
3883
3980
|
{ "": rawModel },
|
|
3884
3981
|
"",
|
|
3885
3982
|
rawModel,
|
|
3886
|
-
|
|
3887
|
-
)
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3983
|
+
_chunk$reason
|
|
3984
|
+
),
|
|
3985
|
+
resolveListeners = chunk.value;
|
|
3986
|
+
if (null !== resolveListeners)
|
|
3987
|
+
for (
|
|
3988
|
+
chunk.value = null, chunk.reason = null, rawModel = 0;
|
|
3989
|
+
rawModel < resolveListeners.length;
|
|
3990
|
+
rawModel++
|
|
3991
|
+
) {
|
|
3992
|
+
var listener = resolveListeners[rawModel];
|
|
3993
|
+
"function" === typeof listener
|
|
3994
|
+
? listener(value)
|
|
3995
|
+
: fulfillReference(response, listener, value);
|
|
3996
|
+
}
|
|
3997
|
+
if (null !== initializingHandler) {
|
|
3998
|
+
if (initializingHandler.errored) throw initializingHandler.reason;
|
|
3999
|
+
if (0 < initializingHandler.deps) {
|
|
4000
|
+
initializingHandler.value = value;
|
|
4001
|
+
initializingHandler.chunk = chunk;
|
|
4002
|
+
return;
|
|
4003
|
+
}
|
|
3899
4004
|
}
|
|
4005
|
+
chunk.status = "fulfilled";
|
|
4006
|
+
chunk.value = value;
|
|
4007
|
+
chunk.reason = null;
|
|
3900
4008
|
} catch (error) {
|
|
3901
4009
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
3902
4010
|
} finally {
|
|
3903
|
-
|
|
3904
|
-
(initializingChunkBlockedModel = prevBlocked);
|
|
4011
|
+
initializingHandler = prevHandler;
|
|
3905
4012
|
}
|
|
3906
4013
|
}
|
|
3907
4014
|
function reportGlobalError(response, error) {
|
|
3908
4015
|
response._closed = !0;
|
|
3909
4016
|
response._closedReason = error;
|
|
3910
4017
|
response._chunks.forEach(function (chunk) {
|
|
3911
|
-
"pending" === chunk.status
|
|
4018
|
+
"pending" === chunk.status
|
|
4019
|
+
? triggerErrorOnChunk(response, chunk, error)
|
|
4020
|
+
: "fulfilled" === chunk.status &&
|
|
4021
|
+
null !== chunk.reason &&
|
|
4022
|
+
chunk.reason.error(error);
|
|
3912
4023
|
});
|
|
3913
4024
|
}
|
|
3914
4025
|
function getChunk(response, id) {
|
|
@@ -3917,50 +4028,62 @@
|
|
|
3917
4028
|
chunk ||
|
|
3918
4029
|
((chunk = response._formData.get(response._prefix + id)),
|
|
3919
4030
|
(chunk =
|
|
3920
|
-
|
|
3921
|
-
? new
|
|
4031
|
+
"string" === typeof chunk
|
|
4032
|
+
? new ReactPromise(
|
|
4033
|
+
"resolved_model",
|
|
4034
|
+
chunk,
|
|
4035
|
+
_defineProperty({ id: id }, RESPONSE_SYMBOL, response)
|
|
4036
|
+
)
|
|
3922
4037
|
: response._closed
|
|
3923
|
-
? new
|
|
3924
|
-
:
|
|
4038
|
+
? new ReactPromise("rejected", null, response._closedReason)
|
|
4039
|
+
: new ReactPromise("pending", null, null)),
|
|
3925
4040
|
chunks.set(id, chunk));
|
|
3926
4041
|
return chunk;
|
|
3927
4042
|
}
|
|
3928
|
-
function
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
value
|
|
3944
|
-
}
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
4043
|
+
function fulfillReference(response, reference, value) {
|
|
4044
|
+
var handler = reference.handler,
|
|
4045
|
+
parentObject = reference.parentObject,
|
|
4046
|
+
key = reference.key,
|
|
4047
|
+
map = reference.map,
|
|
4048
|
+
path = reference.path;
|
|
4049
|
+
try {
|
|
4050
|
+
for (var i = 1; i < path.length; i++) {
|
|
4051
|
+
var name = path[i];
|
|
4052
|
+
if (
|
|
4053
|
+
"object" !== typeof value ||
|
|
4054
|
+
!hasOwnProperty.call(value, name) ||
|
|
4055
|
+
value instanceof Promise
|
|
4056
|
+
)
|
|
4057
|
+
throw Error("Invalid reference.");
|
|
4058
|
+
value = value[name];
|
|
4059
|
+
}
|
|
4060
|
+
var mappedValue = map(response, value, parentObject, key);
|
|
4061
|
+
parentObject[key] = mappedValue;
|
|
4062
|
+
"" === key && null === handler.value && (handler.value = mappedValue);
|
|
4063
|
+
} catch (error) {
|
|
4064
|
+
rejectReference(response, reference.handler, error);
|
|
4065
|
+
return;
|
|
4066
|
+
}
|
|
4067
|
+
handler.deps--;
|
|
4068
|
+
0 === handler.deps &&
|
|
4069
|
+
((reference = handler.chunk),
|
|
4070
|
+
null !== reference &&
|
|
4071
|
+
"blocked" === reference.status &&
|
|
4072
|
+
((value = reference.value),
|
|
4073
|
+
(reference.status = "fulfilled"),
|
|
4074
|
+
(reference.value = handler.value),
|
|
4075
|
+
(reference.reason = handler.reason),
|
|
4076
|
+
null !== value && wakeChunk(response, value, handler.value)));
|
|
4077
|
+
}
|
|
4078
|
+
function rejectReference(response, handler, error) {
|
|
4079
|
+
handler.errored ||
|
|
4080
|
+
((handler.errored = !0),
|
|
4081
|
+
(handler.value = null),
|
|
4082
|
+
(handler.reason = error),
|
|
4083
|
+
(handler = handler.chunk),
|
|
4084
|
+
null !== handler &&
|
|
4085
|
+
"blocked" === handler.status &&
|
|
4086
|
+
triggerErrorOnChunk(response, handler, error));
|
|
3964
4087
|
}
|
|
3965
4088
|
function getOutlinedModel(response, reference, parentObject, key, map) {
|
|
3966
4089
|
reference = reference.split(":");
|
|
@@ -3972,29 +4095,61 @@
|
|
|
3972
4095
|
}
|
|
3973
4096
|
switch (id.status) {
|
|
3974
4097
|
case "fulfilled":
|
|
3975
|
-
|
|
3976
|
-
for (
|
|
3977
|
-
|
|
3978
|
-
|
|
4098
|
+
id = id.value;
|
|
4099
|
+
for (var i = 1; i < reference.length; i++) {
|
|
4100
|
+
var name = reference[i];
|
|
4101
|
+
if (
|
|
4102
|
+
"object" !== typeof id ||
|
|
4103
|
+
!hasOwnProperty.call(id, name) ||
|
|
4104
|
+
id instanceof Promise
|
|
4105
|
+
)
|
|
4106
|
+
throw Error("Invalid reference.");
|
|
4107
|
+
id = id[name];
|
|
4108
|
+
}
|
|
4109
|
+
return map(response, id, parentObject, key);
|
|
3979
4110
|
case "pending":
|
|
3980
4111
|
case "blocked":
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
4112
|
+
return (
|
|
4113
|
+
initializingHandler
|
|
4114
|
+
? ((response = initializingHandler), response.deps++)
|
|
4115
|
+
: (response = initializingHandler =
|
|
4116
|
+
{
|
|
4117
|
+
chunk: null,
|
|
4118
|
+
value: null,
|
|
4119
|
+
reason: null,
|
|
4120
|
+
deps: 1,
|
|
4121
|
+
errored: !1
|
|
4122
|
+
}),
|
|
4123
|
+
(parentObject = {
|
|
4124
|
+
handler: response,
|
|
4125
|
+
parentObject: parentObject,
|
|
4126
|
+
key: key,
|
|
4127
|
+
map: map,
|
|
4128
|
+
path: reference
|
|
4129
|
+
}),
|
|
4130
|
+
null === id.value
|
|
4131
|
+
? (id.value = [parentObject])
|
|
4132
|
+
: id.value.push(parentObject),
|
|
4133
|
+
null === id.reason
|
|
4134
|
+
? (id.reason = [parentObject])
|
|
4135
|
+
: id.reason.push(parentObject),
|
|
4136
|
+
null
|
|
3994
4137
|
);
|
|
3995
|
-
return null;
|
|
3996
4138
|
default:
|
|
3997
|
-
|
|
4139
|
+
return (
|
|
4140
|
+
initializingHandler
|
|
4141
|
+
? ((initializingHandler.errored = !0),
|
|
4142
|
+
(initializingHandler.value = null),
|
|
4143
|
+
(initializingHandler.reason = id.reason))
|
|
4144
|
+
: (initializingHandler = {
|
|
4145
|
+
chunk: null,
|
|
4146
|
+
value: null,
|
|
4147
|
+
reason: id.reason,
|
|
4148
|
+
deps: 0,
|
|
4149
|
+
errored: !0
|
|
4150
|
+
}),
|
|
4151
|
+
null
|
|
4152
|
+
);
|
|
3998
4153
|
}
|
|
3999
4154
|
}
|
|
4000
4155
|
function createMap(response, model) {
|
|
@@ -4006,8 +4161,8 @@
|
|
|
4006
4161
|
function extractIterator(response, model) {
|
|
4007
4162
|
return model[Symbol.iterator]();
|
|
4008
4163
|
}
|
|
4009
|
-
function createModel(response, model) {
|
|
4010
|
-
return model;
|
|
4164
|
+
function createModel(response, model, parentObject, key) {
|
|
4165
|
+
return "then" === key && "function" === typeof model ? null : model;
|
|
4011
4166
|
}
|
|
4012
4167
|
function parseTypedArray(
|
|
4013
4168
|
response,
|
|
@@ -4018,44 +4173,77 @@
|
|
|
4018
4173
|
parentKey
|
|
4019
4174
|
) {
|
|
4020
4175
|
reference = parseInt(reference.slice(2), 16);
|
|
4021
|
-
|
|
4022
|
-
reference
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4176
|
+
bytesPerElement = response._prefix + reference;
|
|
4177
|
+
if (response._chunks.has(reference))
|
|
4178
|
+
throw Error("Already initialized typed array.");
|
|
4179
|
+
reference = response._formData.get(bytesPerElement).arrayBuffer();
|
|
4180
|
+
if (initializingHandler) {
|
|
4181
|
+
var handler = initializingHandler;
|
|
4182
|
+
handler.deps++;
|
|
4183
|
+
} else
|
|
4184
|
+
handler = initializingHandler = {
|
|
4185
|
+
chunk: null,
|
|
4186
|
+
value: null,
|
|
4187
|
+
reason: null,
|
|
4188
|
+
deps: 1,
|
|
4189
|
+
errored: !1
|
|
4190
|
+
};
|
|
4029
4191
|
reference.then(
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
parentKey
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4192
|
+
function (buffer) {
|
|
4193
|
+
buffer =
|
|
4194
|
+
constructor === ArrayBuffer ? buffer : new constructor(buffer);
|
|
4195
|
+
parentObject[parentKey] = buffer;
|
|
4196
|
+
"" === parentKey &&
|
|
4197
|
+
null === handler.value &&
|
|
4198
|
+
(handler.value = buffer);
|
|
4199
|
+
handler.deps--;
|
|
4200
|
+
if (
|
|
4201
|
+
0 === handler.deps &&
|
|
4202
|
+
((buffer = handler.chunk),
|
|
4203
|
+
null !== buffer && "blocked" === buffer.status)
|
|
4204
|
+
) {
|
|
4205
|
+
var resolveListeners = buffer.value;
|
|
4206
|
+
buffer.status = "fulfilled";
|
|
4207
|
+
buffer.value = handler.value;
|
|
4208
|
+
buffer.reason = null;
|
|
4209
|
+
null !== resolveListeners &&
|
|
4210
|
+
wakeChunk(response, resolveListeners, handler.value);
|
|
4211
|
+
}
|
|
4212
|
+
},
|
|
4213
|
+
function (error) {
|
|
4214
|
+
if (!handler.errored) {
|
|
4215
|
+
handler.errored = !0;
|
|
4216
|
+
handler.value = null;
|
|
4217
|
+
handler.reason = error;
|
|
4218
|
+
var chunk = handler.chunk;
|
|
4219
|
+
null !== chunk &&
|
|
4220
|
+
"blocked" === chunk.status &&
|
|
4221
|
+
triggerErrorOnChunk(response, chunk, error);
|
|
4222
|
+
}
|
|
4223
|
+
}
|
|
4040
4224
|
);
|
|
4041
4225
|
return null;
|
|
4042
4226
|
}
|
|
4043
4227
|
function resolveStream(response, id, stream, controller) {
|
|
4044
4228
|
var chunks = response._chunks;
|
|
4045
|
-
stream = new
|
|
4229
|
+
stream = new ReactPromise("fulfilled", stream, controller);
|
|
4046
4230
|
chunks.set(id, stream);
|
|
4047
4231
|
response = response._formData.getAll(response._prefix + id);
|
|
4048
4232
|
for (id = 0; id < response.length; id++)
|
|
4049
4233
|
(chunks = response[id]),
|
|
4050
|
-
"
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4234
|
+
"string" === typeof chunks &&
|
|
4235
|
+
("C" === chunks[0]
|
|
4236
|
+
? controller.close(
|
|
4237
|
+
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
4238
|
+
)
|
|
4239
|
+
: controller.enqueueModel(chunks));
|
|
4055
4240
|
}
|
|
4056
4241
|
function parseReadableStream(response, reference, type) {
|
|
4057
4242
|
reference = parseInt(reference.slice(2), 16);
|
|
4058
|
-
|
|
4243
|
+
if (response._chunks.has(reference))
|
|
4244
|
+
throw Error("Already initialized stream.");
|
|
4245
|
+
var controller = null,
|
|
4246
|
+
closed = !1;
|
|
4059
4247
|
type = new ReadableStream({
|
|
4060
4248
|
type: type,
|
|
4061
4249
|
start: function (c) {
|
|
@@ -4066,7 +4254,11 @@
|
|
|
4066
4254
|
resolveStream(response, reference, type, {
|
|
4067
4255
|
enqueueModel: function (json) {
|
|
4068
4256
|
if (null === previousBlockedChunk) {
|
|
4069
|
-
var chunk = new
|
|
4257
|
+
var chunk = new ReactPromise(
|
|
4258
|
+
"resolved_model",
|
|
4259
|
+
json,
|
|
4260
|
+
_defineProperty({ id: -1 }, RESPONSE_SYMBOL, response)
|
|
4261
|
+
);
|
|
4070
4262
|
initializeModelChunk(chunk);
|
|
4071
4263
|
"fulfilled" === chunk.status
|
|
4072
4264
|
? controller.enqueue(chunk.value)
|
|
@@ -4081,7 +4273,7 @@
|
|
|
4081
4273
|
(previousBlockedChunk = chunk));
|
|
4082
4274
|
} else {
|
|
4083
4275
|
chunk = previousBlockedChunk;
|
|
4084
|
-
var _chunk =
|
|
4276
|
+
var _chunk = new ReactPromise("pending", null, null);
|
|
4085
4277
|
_chunk.then(
|
|
4086
4278
|
function (v) {
|
|
4087
4279
|
return controller.enqueue(v);
|
|
@@ -4093,29 +4285,33 @@
|
|
|
4093
4285
|
previousBlockedChunk = _chunk;
|
|
4094
4286
|
chunk.then(function () {
|
|
4095
4287
|
previousBlockedChunk === _chunk && (previousBlockedChunk = null);
|
|
4096
|
-
resolveModelChunk(_chunk, json, -1);
|
|
4288
|
+
resolveModelChunk(response, _chunk, json, -1);
|
|
4097
4289
|
});
|
|
4098
4290
|
}
|
|
4099
4291
|
},
|
|
4100
4292
|
close: function () {
|
|
4101
|
-
if (
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4293
|
+
if (!closed)
|
|
4294
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
4295
|
+
controller.close();
|
|
4296
|
+
else {
|
|
4297
|
+
var blockedChunk = previousBlockedChunk;
|
|
4298
|
+
previousBlockedChunk = null;
|
|
4299
|
+
blockedChunk.then(function () {
|
|
4300
|
+
return controller.close();
|
|
4301
|
+
});
|
|
4302
|
+
}
|
|
4109
4303
|
},
|
|
4110
4304
|
error: function (error) {
|
|
4111
|
-
if (
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4305
|
+
if (!closed)
|
|
4306
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
4307
|
+
controller.error(error);
|
|
4308
|
+
else {
|
|
4309
|
+
var blockedChunk = previousBlockedChunk;
|
|
4310
|
+
previousBlockedChunk = null;
|
|
4311
|
+
blockedChunk.then(function () {
|
|
4312
|
+
return controller.error(error);
|
|
4313
|
+
});
|
|
4314
|
+
}
|
|
4119
4315
|
}
|
|
4120
4316
|
});
|
|
4121
4317
|
return type;
|
|
@@ -4130,6 +4326,8 @@
|
|
|
4130
4326
|
}
|
|
4131
4327
|
function parseAsyncIterable(response, reference, iterator) {
|
|
4132
4328
|
reference = parseInt(reference.slice(2), 16);
|
|
4329
|
+
if (response._chunks.has(reference))
|
|
4330
|
+
throw Error("Already initialized stream.");
|
|
4133
4331
|
var buffer = [],
|
|
4134
4332
|
closed = !1,
|
|
4135
4333
|
nextWriteIndex = 0,
|
|
@@ -4142,13 +4340,12 @@
|
|
|
4142
4340
|
);
|
|
4143
4341
|
if (nextReadIndex === buffer.length) {
|
|
4144
4342
|
if (closed)
|
|
4145
|
-
return new
|
|
4343
|
+
return new ReactPromise(
|
|
4146
4344
|
"fulfilled",
|
|
4147
4345
|
{ done: !0, value: void 0 },
|
|
4148
|
-
null
|
|
4149
|
-
response
|
|
4346
|
+
null
|
|
4150
4347
|
);
|
|
4151
|
-
buffer[nextReadIndex] =
|
|
4348
|
+
buffer[nextReadIndex] = new ReactPromise("pending", null, null);
|
|
4152
4349
|
}
|
|
4153
4350
|
return buffer[nextReadIndex++];
|
|
4154
4351
|
});
|
|
@@ -4162,34 +4359,55 @@
|
|
|
4162
4359
|
value,
|
|
4163
4360
|
!1
|
|
4164
4361
|
))
|
|
4165
|
-
: resolveIteratorResultChunk(
|
|
4362
|
+
: resolveIteratorResultChunk(
|
|
4363
|
+
response,
|
|
4364
|
+
buffer[nextWriteIndex],
|
|
4365
|
+
value,
|
|
4366
|
+
!1
|
|
4367
|
+
);
|
|
4166
4368
|
nextWriteIndex++;
|
|
4167
4369
|
},
|
|
4168
4370
|
close: function (value) {
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4371
|
+
if (!closed)
|
|
4372
|
+
for (
|
|
4373
|
+
closed = !0,
|
|
4374
|
+
nextWriteIndex === buffer.length
|
|
4375
|
+
? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(
|
|
4376
|
+
response,
|
|
4377
|
+
value,
|
|
4378
|
+
!0
|
|
4379
|
+
))
|
|
4380
|
+
: resolveIteratorResultChunk(
|
|
4381
|
+
response,
|
|
4382
|
+
buffer[nextWriteIndex],
|
|
4383
|
+
value,
|
|
4384
|
+
!0
|
|
4385
|
+
),
|
|
4386
|
+
nextWriteIndex++;
|
|
4387
|
+
nextWriteIndex < buffer.length;
|
|
4388
|
+
|
|
4389
|
+
)
|
|
4390
|
+
resolveIteratorResultChunk(
|
|
4172
4391
|
response,
|
|
4173
|
-
|
|
4392
|
+
buffer[nextWriteIndex++],
|
|
4393
|
+
'"$undefined"',
|
|
4174
4394
|
!0
|
|
4175
|
-
)
|
|
4176
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
4177
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
4178
|
-
resolveIteratorResultChunk(
|
|
4179
|
-
buffer[nextWriteIndex++],
|
|
4180
|
-
'"$undefined"',
|
|
4181
|
-
!0
|
|
4182
|
-
);
|
|
4395
|
+
);
|
|
4183
4396
|
},
|
|
4184
4397
|
error: function (error) {
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4398
|
+
if (!closed)
|
|
4399
|
+
for (
|
|
4400
|
+
closed = !0,
|
|
4401
|
+
nextWriteIndex === buffer.length &&
|
|
4402
|
+
(buffer[nextWriteIndex] = new ReactPromise(
|
|
4403
|
+
"pending",
|
|
4404
|
+
null,
|
|
4405
|
+
null
|
|
4406
|
+
));
|
|
4407
|
+
nextWriteIndex < buffer.length;
|
|
4190
4408
|
|
|
4191
|
-
|
|
4192
|
-
|
|
4409
|
+
)
|
|
4410
|
+
triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);
|
|
4193
4411
|
}
|
|
4194
4412
|
});
|
|
4195
4413
|
return iterator;
|
|
@@ -4203,24 +4421,10 @@
|
|
|
4203
4421
|
return (
|
|
4204
4422
|
(obj = parseInt(value.slice(2), 16)), getChunk(response, obj)
|
|
4205
4423
|
);
|
|
4206
|
-
case "
|
|
4424
|
+
case "h":
|
|
4207
4425
|
return (
|
|
4208
4426
|
(value = value.slice(2)),
|
|
4209
|
-
(value
|
|
4210
|
-
response,
|
|
4211
|
-
value,
|
|
4212
|
-
obj,
|
|
4213
|
-
key,
|
|
4214
|
-
createModel
|
|
4215
|
-
)),
|
|
4216
|
-
loadServerReference$1(
|
|
4217
|
-
response,
|
|
4218
|
-
value.id,
|
|
4219
|
-
value.bound,
|
|
4220
|
-
initializingChunk,
|
|
4221
|
-
obj,
|
|
4222
|
-
key
|
|
4223
|
-
)
|
|
4427
|
+
getOutlinedModel(response, value, obj, key, loadServerReference$1)
|
|
4224
4428
|
);
|
|
4225
4429
|
case "T":
|
|
4226
4430
|
if (
|
|
@@ -4513,6 +4717,7 @@
|
|
|
4513
4717
|
decoderOptions = { stream: !0 },
|
|
4514
4718
|
ReactDOMSharedInternals =
|
|
4515
4719
|
ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
4720
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4516
4721
|
channel = new MessageChannel(),
|
|
4517
4722
|
taskQueue = [];
|
|
4518
4723
|
channel.port1.onmessage = function () {
|
|
@@ -4535,6 +4740,13 @@
|
|
|
4535
4740
|
SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"),
|
|
4536
4741
|
FunctionBind = Function.prototype.bind,
|
|
4537
4742
|
ArraySlice = Array.prototype.slice,
|
|
4743
|
+
serverReferenceToString = {
|
|
4744
|
+
value: function () {
|
|
4745
|
+
return "function () { [omitted code] }";
|
|
4746
|
+
},
|
|
4747
|
+
configurable: !0,
|
|
4748
|
+
writable: !0
|
|
4749
|
+
},
|
|
4538
4750
|
previousDispatcher = ReactDOMSharedInternals.d;
|
|
4539
4751
|
ReactDOMSharedInternals.d = {
|
|
4540
4752
|
f: previousDispatcher.f,
|
|
@@ -4834,7 +5046,6 @@
|
|
|
4834
5046
|
jsxPropsParents = new WeakMap(),
|
|
4835
5047
|
jsxChildrenParents = new WeakMap(),
|
|
4836
5048
|
CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
|
|
4837
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4838
5049
|
doNotLimit = new WeakSet();
|
|
4839
5050
|
"object" === typeof console &&
|
|
4840
5051
|
null !== console &&
|
|
@@ -4864,33 +5075,48 @@
|
|
|
4864
5075
|
CONSTRUCTOR_MARKER = Symbol(),
|
|
4865
5076
|
debugModelRoot = null,
|
|
4866
5077
|
debugNoOutline = null,
|
|
4867
|
-
emptyRoot = {}
|
|
4868
|
-
|
|
4869
|
-
|
|
5078
|
+
emptyRoot = {},
|
|
5079
|
+
RESPONSE_SYMBOL = Symbol();
|
|
5080
|
+
ReactPromise.prototype = Object.create(Promise.prototype);
|
|
5081
|
+
ReactPromise.prototype.then = function (resolve, reject) {
|
|
4870
5082
|
switch (this.status) {
|
|
4871
5083
|
case "resolved_model":
|
|
4872
5084
|
initializeModelChunk(this);
|
|
4873
5085
|
}
|
|
4874
5086
|
switch (this.status) {
|
|
4875
5087
|
case "fulfilled":
|
|
4876
|
-
resolve
|
|
5088
|
+
if ("function" === typeof resolve) {
|
|
5089
|
+
for (
|
|
5090
|
+
var inspectedValue = this.value;
|
|
5091
|
+
inspectedValue instanceof ReactPromise;
|
|
5092
|
+
|
|
5093
|
+
) {
|
|
5094
|
+
if (inspectedValue === this) {
|
|
5095
|
+
"function" === typeof reject &&
|
|
5096
|
+
reject(Error("Cannot have cyclic thenables."));
|
|
5097
|
+
return;
|
|
5098
|
+
}
|
|
5099
|
+
if ("fulfilled" === inspectedValue.status)
|
|
5100
|
+
inspectedValue = inspectedValue.value;
|
|
5101
|
+
else break;
|
|
5102
|
+
}
|
|
5103
|
+
resolve(this.value);
|
|
5104
|
+
}
|
|
4877
5105
|
break;
|
|
4878
5106
|
case "pending":
|
|
4879
5107
|
case "blocked":
|
|
4880
|
-
|
|
4881
|
-
resolve &&
|
|
5108
|
+
"function" === typeof resolve &&
|
|
4882
5109
|
(null === this.value && (this.value = []),
|
|
4883
5110
|
this.value.push(resolve));
|
|
4884
|
-
reject &&
|
|
5111
|
+
"function" === typeof reject &&
|
|
4885
5112
|
(null === this.reason && (this.reason = []),
|
|
4886
5113
|
this.reason.push(reject));
|
|
4887
5114
|
break;
|
|
4888
5115
|
default:
|
|
4889
|
-
reject(this.reason);
|
|
5116
|
+
"function" === typeof reject && reject(this.reason);
|
|
4890
5117
|
}
|
|
4891
5118
|
};
|
|
4892
|
-
var
|
|
4893
|
-
initializingChunkBlockedModel = null,
|
|
5119
|
+
var initializingHandler = null,
|
|
4894
5120
|
serverManifest = {};
|
|
4895
5121
|
exports.createClientReference = function (
|
|
4896
5122
|
id,
|
|
@@ -4997,7 +5223,8 @@
|
|
|
4997
5223
|
$$id: { value: id + "#" + exportName, configurable: !0 },
|
|
4998
5224
|
$$bound: { value: null, configurable: !0 },
|
|
4999
5225
|
$$location: { value: Error("react-stack-top-frame"), configurable: !0 },
|
|
5000
|
-
bind: { value: bind, configurable: !0 }
|
|
5226
|
+
bind: { value: bind, configurable: !0 },
|
|
5227
|
+
toString: serverReferenceToString
|
|
5001
5228
|
});
|
|
5002
5229
|
};
|
|
5003
5230
|
exports.renderToReadableStream = function (model, options) {
|