@gearbox-protocol/deploy-tools 4.16.1 → 4.16.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/dist/index.mjs +841 -830
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -49056,9 +49056,9 @@ var require_geturl = __commonJS({
|
|
|
49056
49056
|
var logger_1 = require_lib53();
|
|
49057
49057
|
var _version_1 = require_version52();
|
|
49058
49058
|
var logger2 = new logger_1.Logger(_version_1.version);
|
|
49059
|
-
function getResponse(
|
|
49059
|
+
function getResponse(request2) {
|
|
49060
49060
|
return new Promise(function(resolve2, reject) {
|
|
49061
|
-
|
|
49061
|
+
request2.once("response", function(resp) {
|
|
49062
49062
|
var response = {
|
|
49063
49063
|
statusCode: resp.statusCode,
|
|
49064
49064
|
statusMessage: resp.statusMessage,
|
|
@@ -49089,7 +49089,7 @@ var require_geturl = __commonJS({
|
|
|
49089
49089
|
reject(error);
|
|
49090
49090
|
});
|
|
49091
49091
|
});
|
|
49092
|
-
|
|
49092
|
+
request2.on("error", function(error) {
|
|
49093
49093
|
reject(error);
|
|
49094
49094
|
});
|
|
49095
49095
|
});
|
|
@@ -49102,7 +49102,7 @@ var require_geturl = __commonJS({
|
|
|
49102
49102
|
}
|
|
49103
49103
|
function getUrl(href, options) {
|
|
49104
49104
|
return __awaiter3(this, void 0, void 0, function() {
|
|
49105
|
-
var url,
|
|
49105
|
+
var url, request2, req, response;
|
|
49106
49106
|
return __generator3(this, function(_a) {
|
|
49107
49107
|
switch (_a.label) {
|
|
49108
49108
|
case 0:
|
|
@@ -49110,7 +49110,7 @@ var require_geturl = __commonJS({
|
|
|
49110
49110
|
options = {};
|
|
49111
49111
|
}
|
|
49112
49112
|
url = (0, url_1.parse)(href);
|
|
49113
|
-
|
|
49113
|
+
request2 = {
|
|
49114
49114
|
protocol: nonnull(url.protocol),
|
|
49115
49115
|
hostname: nonnull(url.hostname),
|
|
49116
49116
|
port: nonnull(url.port),
|
|
@@ -49119,15 +49119,15 @@ var require_geturl = __commonJS({
|
|
|
49119
49119
|
headers: (0, properties_1.shallowCopy)(options.headers || {})
|
|
49120
49120
|
};
|
|
49121
49121
|
if (options.allowGzip) {
|
|
49122
|
-
|
|
49122
|
+
request2.headers["accept-encoding"] = "gzip";
|
|
49123
49123
|
}
|
|
49124
49124
|
req = null;
|
|
49125
49125
|
switch (nonnull(url.protocol)) {
|
|
49126
49126
|
case "http:":
|
|
49127
|
-
req = http_1.default.request(
|
|
49127
|
+
req = http_1.default.request(request2);
|
|
49128
49128
|
break;
|
|
49129
49129
|
case "https:":
|
|
49130
|
-
req = https_1.default.request(
|
|
49130
|
+
req = https_1.default.request(request2);
|
|
49131
49131
|
break;
|
|
49132
49132
|
default:
|
|
49133
49133
|
logger2.throwError("unsupported protocol " + url.protocol, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
@@ -54695,7 +54695,7 @@ var require_json_rpc_provider = __commonJS({
|
|
|
54695
54695
|
};
|
|
54696
54696
|
JsonRpcProvider3.prototype.send = function(method, params) {
|
|
54697
54697
|
var _this = this;
|
|
54698
|
-
var
|
|
54698
|
+
var request2 = {
|
|
54699
54699
|
method,
|
|
54700
54700
|
params,
|
|
54701
54701
|
id: this._nextId++,
|
|
@@ -54703,17 +54703,17 @@ var require_json_rpc_provider = __commonJS({
|
|
|
54703
54703
|
};
|
|
54704
54704
|
this.emit("debug", {
|
|
54705
54705
|
action: "request",
|
|
54706
|
-
request: (0, properties_1.deepCopy)(
|
|
54706
|
+
request: (0, properties_1.deepCopy)(request2),
|
|
54707
54707
|
provider: this
|
|
54708
54708
|
});
|
|
54709
54709
|
var cache = ["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0;
|
|
54710
54710
|
if (cache && this._cache[method]) {
|
|
54711
54711
|
return this._cache[method];
|
|
54712
54712
|
}
|
|
54713
|
-
var result = (0, web_1.fetchJson)(this.connection, JSON.stringify(
|
|
54713
|
+
var result = (0, web_1.fetchJson)(this.connection, JSON.stringify(request2), getResult).then(function(result2) {
|
|
54714
54714
|
_this.emit("debug", {
|
|
54715
54715
|
action: "response",
|
|
54716
|
-
request,
|
|
54716
|
+
request: request2,
|
|
54717
54717
|
response: result2,
|
|
54718
54718
|
provider: _this
|
|
54719
54719
|
});
|
|
@@ -54722,7 +54722,7 @@ var require_json_rpc_provider = __commonJS({
|
|
|
54722
54722
|
_this.emit("debug", {
|
|
54723
54723
|
action: "response",
|
|
54724
54724
|
error,
|
|
54725
|
-
request,
|
|
54725
|
+
request: request2,
|
|
54726
54726
|
provider: _this
|
|
54727
54727
|
});
|
|
54728
54728
|
throw error;
|
|
@@ -58020,13 +58020,13 @@ var require_websocket_provider = __commonJS({
|
|
|
58020
58020
|
var result = JSON.parse(data);
|
|
58021
58021
|
if (result.id != null) {
|
|
58022
58022
|
var id3 = String(result.id);
|
|
58023
|
-
var
|
|
58023
|
+
var request2 = _this._requests[id3];
|
|
58024
58024
|
delete _this._requests[id3];
|
|
58025
58025
|
if (result.result !== void 0) {
|
|
58026
|
-
|
|
58026
|
+
request2.callback(null, result.result);
|
|
58027
58027
|
_this.emit("debug", {
|
|
58028
58028
|
action: "response",
|
|
58029
|
-
request: JSON.parse(
|
|
58029
|
+
request: JSON.parse(request2.payload),
|
|
58030
58030
|
response: result.result,
|
|
58031
58031
|
provider: _this
|
|
58032
58032
|
});
|
|
@@ -58039,11 +58039,11 @@ var require_websocket_provider = __commonJS({
|
|
|
58039
58039
|
} else {
|
|
58040
58040
|
error = new Error("unknown error");
|
|
58041
58041
|
}
|
|
58042
|
-
|
|
58042
|
+
request2.callback(error, void 0);
|
|
58043
58043
|
_this.emit("debug", {
|
|
58044
58044
|
action: "response",
|
|
58045
58045
|
error,
|
|
58046
|
-
request: JSON.parse(
|
|
58046
|
+
request: JSON.parse(request2.payload),
|
|
58047
58047
|
provider: _this
|
|
58048
58048
|
});
|
|
58049
58049
|
}
|
|
@@ -59226,15 +59226,15 @@ var require_etherscan_provider = __commonJS({
|
|
|
59226
59226
|
params.apikey = this.apiKey;
|
|
59227
59227
|
return params;
|
|
59228
59228
|
};
|
|
59229
|
-
EtherscanProvider3.prototype.fetch = function(module3, params,
|
|
59229
|
+
EtherscanProvider3.prototype.fetch = function(module3, params, post2) {
|
|
59230
59230
|
return __awaiter3(this, void 0, void 0, function() {
|
|
59231
59231
|
var url, payload, procFunc, connection, payloadStr, result;
|
|
59232
59232
|
var _this = this;
|
|
59233
59233
|
return __generator3(this, function(_a) {
|
|
59234
59234
|
switch (_a.label) {
|
|
59235
59235
|
case 0:
|
|
59236
|
-
url =
|
|
59237
|
-
payload =
|
|
59236
|
+
url = post2 ? this.getPostUrl() : this.getUrl(module3, params);
|
|
59237
|
+
payload = post2 ? this.getPostData(module3, params) : null;
|
|
59238
59238
|
procFunc = module3 === "proxy" ? getJsonResult : getResult;
|
|
59239
59239
|
this.emit("debug", {
|
|
59240
59240
|
action: "request",
|
|
@@ -60642,7 +60642,7 @@ var require_json_rpc_batch_provider = __commonJS({
|
|
|
60642
60642
|
}
|
|
60643
60643
|
JsonRpcBatchProvider2.prototype.send = function(method, params) {
|
|
60644
60644
|
var _this = this;
|
|
60645
|
-
var
|
|
60645
|
+
var request2 = {
|
|
60646
60646
|
method,
|
|
60647
60647
|
params,
|
|
60648
60648
|
id: this._nextId++,
|
|
@@ -60651,7 +60651,7 @@ var require_json_rpc_batch_provider = __commonJS({
|
|
|
60651
60651
|
if (this._pendingBatch == null) {
|
|
60652
60652
|
this._pendingBatch = [];
|
|
60653
60653
|
}
|
|
60654
|
-
var inflightRequest = { request, resolve: null, reject: null };
|
|
60654
|
+
var inflightRequest = { request: request2, resolve: null, reject: null };
|
|
60655
60655
|
var promise = new Promise(function(resolve2, reject) {
|
|
60656
60656
|
inflightRequest.resolve = resolve2;
|
|
60657
60657
|
inflightRequest.reject = reject;
|
|
@@ -60662,18 +60662,18 @@ var require_json_rpc_batch_provider = __commonJS({
|
|
|
60662
60662
|
var batch = _this._pendingBatch;
|
|
60663
60663
|
_this._pendingBatch = null;
|
|
60664
60664
|
_this._pendingBatchAggregator = null;
|
|
60665
|
-
var
|
|
60665
|
+
var request3 = batch.map(function(inflight) {
|
|
60666
60666
|
return inflight.request;
|
|
60667
60667
|
});
|
|
60668
60668
|
_this.emit("debug", {
|
|
60669
60669
|
action: "requestBatch",
|
|
60670
|
-
request: (0, properties_1.deepCopy)(
|
|
60670
|
+
request: (0, properties_1.deepCopy)(request3),
|
|
60671
60671
|
provider: _this
|
|
60672
60672
|
});
|
|
60673
|
-
return (0, web_1.fetchJson)(_this.connection, JSON.stringify(
|
|
60673
|
+
return (0, web_1.fetchJson)(_this.connection, JSON.stringify(request3)).then(function(result) {
|
|
60674
60674
|
_this.emit("debug", {
|
|
60675
60675
|
action: "response",
|
|
60676
|
-
request:
|
|
60676
|
+
request: request3,
|
|
60677
60677
|
response: result,
|
|
60678
60678
|
provider: _this
|
|
60679
60679
|
});
|
|
@@ -60692,7 +60692,7 @@ var require_json_rpc_batch_provider = __commonJS({
|
|
|
60692
60692
|
_this.emit("debug", {
|
|
60693
60693
|
action: "response",
|
|
60694
60694
|
error,
|
|
60695
|
-
request:
|
|
60695
|
+
request: request3,
|
|
60696
60696
|
provider: _this
|
|
60697
60697
|
});
|
|
60698
60698
|
batch.forEach(function(inflightRequest2) {
|
|
@@ -60960,7 +60960,7 @@ var require_web3_provider = __commonJS({
|
|
|
60960
60960
|
var fetcher = "Web3LegacyFetcher";
|
|
60961
60961
|
return function(method, params) {
|
|
60962
60962
|
var _this = this;
|
|
60963
|
-
var
|
|
60963
|
+
var request2 = {
|
|
60964
60964
|
method,
|
|
60965
60965
|
params,
|
|
60966
60966
|
id: _nextId++,
|
|
@@ -60970,16 +60970,16 @@ var require_web3_provider = __commonJS({
|
|
|
60970
60970
|
_this.emit("debug", {
|
|
60971
60971
|
action: "request",
|
|
60972
60972
|
fetcher,
|
|
60973
|
-
request: (0, properties_1.deepCopy)(
|
|
60973
|
+
request: (0, properties_1.deepCopy)(request2),
|
|
60974
60974
|
provider: _this
|
|
60975
60975
|
});
|
|
60976
|
-
sendFunc(
|
|
60976
|
+
sendFunc(request2, function(error, response) {
|
|
60977
60977
|
if (error) {
|
|
60978
60978
|
_this.emit("debug", {
|
|
60979
60979
|
action: "response",
|
|
60980
60980
|
fetcher,
|
|
60981
60981
|
error,
|
|
60982
|
-
request,
|
|
60982
|
+
request: request2,
|
|
60983
60983
|
provider: _this
|
|
60984
60984
|
});
|
|
60985
60985
|
return reject(error);
|
|
@@ -60987,7 +60987,7 @@ var require_web3_provider = __commonJS({
|
|
|
60987
60987
|
_this.emit("debug", {
|
|
60988
60988
|
action: "response",
|
|
60989
60989
|
fetcher,
|
|
60990
|
-
request,
|
|
60990
|
+
request: request2,
|
|
60991
60991
|
response,
|
|
60992
60992
|
provider: _this
|
|
60993
60993
|
});
|
|
@@ -61008,18 +61008,18 @@ var require_web3_provider = __commonJS({
|
|
|
61008
61008
|
if (params == null) {
|
|
61009
61009
|
params = [];
|
|
61010
61010
|
}
|
|
61011
|
-
var
|
|
61011
|
+
var request2 = { method, params };
|
|
61012
61012
|
this.emit("debug", {
|
|
61013
61013
|
action: "request",
|
|
61014
61014
|
fetcher: "Eip1193Fetcher",
|
|
61015
|
-
request: (0, properties_1.deepCopy)(
|
|
61015
|
+
request: (0, properties_1.deepCopy)(request2),
|
|
61016
61016
|
provider: this
|
|
61017
61017
|
});
|
|
61018
|
-
return provider.request(
|
|
61018
|
+
return provider.request(request2).then(function(response) {
|
|
61019
61019
|
_this.emit("debug", {
|
|
61020
61020
|
action: "response",
|
|
61021
61021
|
fetcher: "Eip1193Fetcher",
|
|
61022
|
-
request,
|
|
61022
|
+
request: request2,
|
|
61023
61023
|
response,
|
|
61024
61024
|
provider: _this
|
|
61025
61025
|
});
|
|
@@ -61028,7 +61028,7 @@ var require_web3_provider = __commonJS({
|
|
|
61028
61028
|
_this.emit("debug", {
|
|
61029
61029
|
action: "response",
|
|
61030
61030
|
fetcher: "Eip1193Fetcher",
|
|
61031
|
-
request,
|
|
61031
|
+
request: request2,
|
|
61032
61032
|
error,
|
|
61033
61033
|
provider: _this
|
|
61034
61034
|
});
|
|
@@ -107739,9 +107739,9 @@ var require_geturl2 = __commonJS({
|
|
|
107739
107739
|
var logger_1 = require_lib212();
|
|
107740
107740
|
var _version_1 = require_version166();
|
|
107741
107741
|
var logger2 = new logger_1.Logger(_version_1.version);
|
|
107742
|
-
function getResponse(
|
|
107742
|
+
function getResponse(request2) {
|
|
107743
107743
|
return new Promise(function(resolve2, reject) {
|
|
107744
|
-
|
|
107744
|
+
request2.once("response", function(resp) {
|
|
107745
107745
|
var response = {
|
|
107746
107746
|
statusCode: resp.statusCode,
|
|
107747
107747
|
statusMessage: resp.statusMessage,
|
|
@@ -107772,7 +107772,7 @@ var require_geturl2 = __commonJS({
|
|
|
107772
107772
|
reject(error);
|
|
107773
107773
|
});
|
|
107774
107774
|
});
|
|
107775
|
-
|
|
107775
|
+
request2.on("error", function(error) {
|
|
107776
107776
|
reject(error);
|
|
107777
107777
|
});
|
|
107778
107778
|
});
|
|
@@ -107785,7 +107785,7 @@ var require_geturl2 = __commonJS({
|
|
|
107785
107785
|
}
|
|
107786
107786
|
function getUrl(href, options) {
|
|
107787
107787
|
return __awaiter3(this, void 0, void 0, function() {
|
|
107788
|
-
var url,
|
|
107788
|
+
var url, request2, req, response;
|
|
107789
107789
|
return __generator3(this, function(_a) {
|
|
107790
107790
|
switch (_a.label) {
|
|
107791
107791
|
case 0:
|
|
@@ -107793,7 +107793,7 @@ var require_geturl2 = __commonJS({
|
|
|
107793
107793
|
options = {};
|
|
107794
107794
|
}
|
|
107795
107795
|
url = (0, url_1.parse)(href);
|
|
107796
|
-
|
|
107796
|
+
request2 = {
|
|
107797
107797
|
protocol: nonnull(url.protocol),
|
|
107798
107798
|
hostname: nonnull(url.hostname),
|
|
107799
107799
|
port: nonnull(url.port),
|
|
@@ -107802,15 +107802,15 @@ var require_geturl2 = __commonJS({
|
|
|
107802
107802
|
headers: (0, properties_1.shallowCopy)(options.headers || {})
|
|
107803
107803
|
};
|
|
107804
107804
|
if (options.allowGzip) {
|
|
107805
|
-
|
|
107805
|
+
request2.headers["accept-encoding"] = "gzip";
|
|
107806
107806
|
}
|
|
107807
107807
|
req = null;
|
|
107808
107808
|
switch (nonnull(url.protocol)) {
|
|
107809
107809
|
case "http:":
|
|
107810
|
-
req = http_1.default.request(
|
|
107810
|
+
req = http_1.default.request(request2);
|
|
107811
107811
|
break;
|
|
107812
107812
|
case "https:":
|
|
107813
|
-
req = https_1.default.request(
|
|
107813
|
+
req = https_1.default.request(request2);
|
|
107814
107814
|
break;
|
|
107815
107815
|
default:
|
|
107816
107816
|
logger2.throwError("unsupported protocol " + url.protocol, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
@@ -131110,7 +131110,7 @@ var require_form_data = __commonJS({
|
|
|
131110
131110
|
});
|
|
131111
131111
|
};
|
|
131112
131112
|
FormData2.prototype.submit = function(params, cb) {
|
|
131113
|
-
var
|
|
131113
|
+
var request2, options, defaults = { method: "post" };
|
|
131114
131114
|
if (typeof params == "string") {
|
|
131115
131115
|
params = parseUrl(params);
|
|
131116
131116
|
options = populate2({
|
|
@@ -131127,9 +131127,9 @@ var require_form_data = __commonJS({
|
|
|
131127
131127
|
}
|
|
131128
131128
|
options.headers = this.getHeaders(params.headers);
|
|
131129
131129
|
if (options.protocol == "https:") {
|
|
131130
|
-
|
|
131130
|
+
request2 = https2.request(options);
|
|
131131
131131
|
} else {
|
|
131132
|
-
|
|
131132
|
+
request2 = http2.request(options);
|
|
131133
131133
|
}
|
|
131134
131134
|
this.getLength(function(err, length) {
|
|
131135
131135
|
if (err && err !== "Unknown stream") {
|
|
@@ -131137,22 +131137,22 @@ var require_form_data = __commonJS({
|
|
|
131137
131137
|
return;
|
|
131138
131138
|
}
|
|
131139
131139
|
if (length) {
|
|
131140
|
-
|
|
131140
|
+
request2.setHeader("Content-Length", length);
|
|
131141
131141
|
}
|
|
131142
|
-
this.pipe(
|
|
131142
|
+
this.pipe(request2);
|
|
131143
131143
|
if (cb) {
|
|
131144
131144
|
var onResponse;
|
|
131145
131145
|
var callback = function(error, responce) {
|
|
131146
|
-
|
|
131147
|
-
|
|
131146
|
+
request2.removeListener("error", callback);
|
|
131147
|
+
request2.removeListener("response", onResponse);
|
|
131148
131148
|
return cb.call(this, error, responce);
|
|
131149
131149
|
};
|
|
131150
131150
|
onResponse = callback.bind(this, null);
|
|
131151
|
-
|
|
131152
|
-
|
|
131151
|
+
request2.on("error", callback);
|
|
131152
|
+
request2.on("response", onResponse);
|
|
131153
131153
|
}
|
|
131154
131154
|
}.bind(this));
|
|
131155
|
-
return
|
|
131155
|
+
return request2;
|
|
131156
131156
|
};
|
|
131157
131157
|
FormData2.prototype._error = function(err) {
|
|
131158
131158
|
if (!this.error) {
|
|
@@ -132248,10 +132248,10 @@ var require_follow_redirects = __commonJS({
|
|
|
132248
132248
|
var scheme = protocol.slice(0, -1);
|
|
132249
132249
|
this._options.agent = this._options.agents[scheme];
|
|
132250
132250
|
}
|
|
132251
|
-
var
|
|
132252
|
-
|
|
132251
|
+
var request2 = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
|
|
132252
|
+
request2._redirectable = this;
|
|
132253
132253
|
for (var event of events) {
|
|
132254
|
-
|
|
132254
|
+
request2.on(event, eventHandlers[event]);
|
|
132255
132255
|
}
|
|
132256
132256
|
this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : (
|
|
132257
132257
|
// When making a request to a proxy, […]
|
|
@@ -132263,16 +132263,16 @@ var require_follow_redirects = __commonJS({
|
|
|
132263
132263
|
var self2 = this;
|
|
132264
132264
|
var buffers = this._requestBodyBuffers;
|
|
132265
132265
|
(function writeNext(error) {
|
|
132266
|
-
if (
|
|
132266
|
+
if (request2 === self2._currentRequest) {
|
|
132267
132267
|
if (error) {
|
|
132268
132268
|
self2.emit("error", error);
|
|
132269
132269
|
} else if (i < buffers.length) {
|
|
132270
132270
|
var buffer = buffers[i++];
|
|
132271
|
-
if (!
|
|
132272
|
-
|
|
132271
|
+
if (!request2.finished) {
|
|
132272
|
+
request2.write(buffer.data, buffer.encoding, writeNext);
|
|
132273
132273
|
}
|
|
132274
132274
|
} else if (self2._ended) {
|
|
132275
|
-
|
|
132275
|
+
request2.end();
|
|
132276
132276
|
}
|
|
132277
132277
|
}
|
|
132278
132278
|
})();
|
|
@@ -132354,7 +132354,7 @@ var require_follow_redirects = __commonJS({
|
|
|
132354
132354
|
var protocol = scheme + ":";
|
|
132355
132355
|
var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
|
|
132356
132356
|
var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol);
|
|
132357
|
-
function
|
|
132357
|
+
function request2(input, options, callback) {
|
|
132358
132358
|
if (isURL(input)) {
|
|
132359
132359
|
input = spreadUrlObject(input);
|
|
132360
132360
|
} else if (isString(input)) {
|
|
@@ -132386,7 +132386,7 @@ var require_follow_redirects = __commonJS({
|
|
|
132386
132386
|
return wrappedRequest;
|
|
132387
132387
|
}
|
|
132388
132388
|
Object.defineProperties(wrappedProtocol, {
|
|
132389
|
-
request: { value:
|
|
132389
|
+
request: { value: request2, configurable: true, enumerable: true, writable: true },
|
|
132390
132390
|
get: { value: get2, configurable: true, enumerable: true, writable: true }
|
|
132391
132391
|
});
|
|
132392
132392
|
});
|
|
@@ -132462,12 +132462,12 @@ var require_follow_redirects = __commonJS({
|
|
|
132462
132462
|
});
|
|
132463
132463
|
return CustomError;
|
|
132464
132464
|
}
|
|
132465
|
-
function destroyRequest(
|
|
132465
|
+
function destroyRequest(request2, error) {
|
|
132466
132466
|
for (var event of events) {
|
|
132467
|
-
|
|
132467
|
+
request2.removeListener(event, eventHandlers[event]);
|
|
132468
132468
|
}
|
|
132469
|
-
|
|
132470
|
-
|
|
132469
|
+
request2.on("error", noop);
|
|
132470
|
+
request2.destroy(error);
|
|
132471
132471
|
}
|
|
132472
132472
|
function isSubdomain(subdomain, domain) {
|
|
132473
132473
|
assert4(isString(subdomain) && isString(domain));
|
|
@@ -132879,7 +132879,7 @@ var require_axios = __commonJS({
|
|
|
132879
132879
|
isAsyncFn,
|
|
132880
132880
|
isThenable
|
|
132881
132881
|
};
|
|
132882
|
-
function AxiosError(message, code, config,
|
|
132882
|
+
function AxiosError(message, code, config, request2, response) {
|
|
132883
132883
|
Error.call(this);
|
|
132884
132884
|
if (Error.captureStackTrace) {
|
|
132885
132885
|
Error.captureStackTrace(this, this.constructor);
|
|
@@ -132890,7 +132890,7 @@ var require_axios = __commonJS({
|
|
|
132890
132890
|
this.name = "AxiosError";
|
|
132891
132891
|
code && (this.code = code);
|
|
132892
132892
|
config && (this.config = config);
|
|
132893
|
-
|
|
132893
|
+
request2 && (this.request = request2);
|
|
132894
132894
|
response && (this.response = response);
|
|
132895
132895
|
}
|
|
132896
132896
|
utils$1.inherits(AxiosError, Error, {
|
|
@@ -132935,14 +132935,14 @@ var require_axios = __commonJS({
|
|
|
132935
132935
|
});
|
|
132936
132936
|
Object.defineProperties(AxiosError, descriptors);
|
|
132937
132937
|
Object.defineProperty(prototype$1, "isAxiosError", { value: true });
|
|
132938
|
-
AxiosError.from = (error, code, config,
|
|
132938
|
+
AxiosError.from = (error, code, config, request2, response, customProps) => {
|
|
132939
132939
|
const axiosError = Object.create(prototype$1);
|
|
132940
132940
|
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
|
132941
132941
|
return obj !== Error.prototype;
|
|
132942
132942
|
}, (prop) => {
|
|
132943
132943
|
return prop !== "isAxiosError";
|
|
132944
132944
|
});
|
|
132945
|
-
AxiosError.call(axiosError, error.message, code, config,
|
|
132945
|
+
AxiosError.call(axiosError, error.message, code, config, request2, response);
|
|
132946
132946
|
axiosError.cause = error;
|
|
132947
132947
|
axiosError.name = error.name;
|
|
132948
132948
|
customProps && Object.assign(axiosError, customProps);
|
|
@@ -133648,8 +133648,8 @@ var require_axios = __commonJS({
|
|
|
133648
133648
|
function isCancel(value) {
|
|
133649
133649
|
return !!(value && value.__CANCEL__);
|
|
133650
133650
|
}
|
|
133651
|
-
function CanceledError(message, config,
|
|
133652
|
-
AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config,
|
|
133651
|
+
function CanceledError(message, config, request2) {
|
|
133652
|
+
AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request2);
|
|
133653
133653
|
this.name = "CanceledError";
|
|
133654
133654
|
}
|
|
133655
133655
|
utils$1.inherits(CanceledError, AxiosError, {
|
|
@@ -134654,30 +134654,30 @@ var require_axios = __commonJS({
|
|
|
134654
134654
|
requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
|
134655
134655
|
}
|
|
134656
134656
|
}
|
|
134657
|
-
let
|
|
134657
|
+
let request2 = new XMLHttpRequest();
|
|
134658
134658
|
if (config.auth) {
|
|
134659
134659
|
const username = config.auth.username || "";
|
|
134660
134660
|
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
|
|
134661
134661
|
requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
|
|
134662
134662
|
}
|
|
134663
134663
|
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
134664
|
-
|
|
134665
|
-
|
|
134664
|
+
request2.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
134665
|
+
request2.timeout = config.timeout;
|
|
134666
134666
|
function onloadend() {
|
|
134667
|
-
if (!
|
|
134667
|
+
if (!request2) {
|
|
134668
134668
|
return;
|
|
134669
134669
|
}
|
|
134670
134670
|
const responseHeaders = AxiosHeaders$1.from(
|
|
134671
|
-
"getAllResponseHeaders" in
|
|
134671
|
+
"getAllResponseHeaders" in request2 && request2.getAllResponseHeaders()
|
|
134672
134672
|
);
|
|
134673
|
-
const responseData = !responseType || responseType === "text" || responseType === "json" ?
|
|
134673
|
+
const responseData = !responseType || responseType === "text" || responseType === "json" ? request2.responseText : request2.response;
|
|
134674
134674
|
const response = {
|
|
134675
134675
|
data: responseData,
|
|
134676
|
-
status:
|
|
134677
|
-
statusText:
|
|
134676
|
+
status: request2.status,
|
|
134677
|
+
statusText: request2.statusText,
|
|
134678
134678
|
headers: responseHeaders,
|
|
134679
134679
|
config,
|
|
134680
|
-
request
|
|
134680
|
+
request: request2
|
|
134681
134681
|
};
|
|
134682
134682
|
settle(function _resolve(value) {
|
|
134683
134683
|
resolve2(value);
|
|
@@ -134686,33 +134686,33 @@ var require_axios = __commonJS({
|
|
|
134686
134686
|
reject(err);
|
|
134687
134687
|
done();
|
|
134688
134688
|
}, response);
|
|
134689
|
-
|
|
134689
|
+
request2 = null;
|
|
134690
134690
|
}
|
|
134691
|
-
if ("onloadend" in
|
|
134692
|
-
|
|
134691
|
+
if ("onloadend" in request2) {
|
|
134692
|
+
request2.onloadend = onloadend;
|
|
134693
134693
|
} else {
|
|
134694
|
-
|
|
134695
|
-
if (!
|
|
134694
|
+
request2.onreadystatechange = function handleLoad() {
|
|
134695
|
+
if (!request2 || request2.readyState !== 4) {
|
|
134696
134696
|
return;
|
|
134697
134697
|
}
|
|
134698
|
-
if (
|
|
134698
|
+
if (request2.status === 0 && !(request2.responseURL && request2.responseURL.indexOf("file:") === 0)) {
|
|
134699
134699
|
return;
|
|
134700
134700
|
}
|
|
134701
134701
|
setTimeout(onloadend);
|
|
134702
134702
|
};
|
|
134703
134703
|
}
|
|
134704
|
-
|
|
134705
|
-
if (!
|
|
134704
|
+
request2.onabort = function handleAbort() {
|
|
134705
|
+
if (!request2) {
|
|
134706
134706
|
return;
|
|
134707
134707
|
}
|
|
134708
|
-
reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config,
|
|
134709
|
-
|
|
134708
|
+
reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request2));
|
|
134709
|
+
request2 = null;
|
|
134710
134710
|
};
|
|
134711
|
-
|
|
134712
|
-
reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config,
|
|
134713
|
-
|
|
134711
|
+
request2.onerror = function handleError() {
|
|
134712
|
+
reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request2));
|
|
134713
|
+
request2 = null;
|
|
134714
134714
|
};
|
|
134715
|
-
|
|
134715
|
+
request2.ontimeout = function handleTimeout() {
|
|
134716
134716
|
let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
134717
134717
|
const transitional = config.transitional || transitionalDefaults;
|
|
134718
134718
|
if (config.timeoutErrorMessage) {
|
|
@@ -134722,9 +134722,9 @@ var require_axios = __commonJS({
|
|
|
134722
134722
|
timeoutErrorMessage,
|
|
134723
134723
|
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
134724
134724
|
config,
|
|
134725
|
-
|
|
134725
|
+
request2
|
|
134726
134726
|
));
|
|
134727
|
-
|
|
134727
|
+
request2 = null;
|
|
134728
134728
|
};
|
|
134729
134729
|
if (platform.hasStandardBrowserEnv) {
|
|
134730
134730
|
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
@@ -134736,31 +134736,31 @@ var require_axios = __commonJS({
|
|
|
134736
134736
|
}
|
|
134737
134737
|
}
|
|
134738
134738
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
134739
|
-
if ("setRequestHeader" in
|
|
134739
|
+
if ("setRequestHeader" in request2) {
|
|
134740
134740
|
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
134741
|
-
|
|
134741
|
+
request2.setRequestHeader(key, val);
|
|
134742
134742
|
});
|
|
134743
134743
|
}
|
|
134744
134744
|
if (!utils$1.isUndefined(config.withCredentials)) {
|
|
134745
|
-
|
|
134745
|
+
request2.withCredentials = !!config.withCredentials;
|
|
134746
134746
|
}
|
|
134747
134747
|
if (responseType && responseType !== "json") {
|
|
134748
|
-
|
|
134748
|
+
request2.responseType = config.responseType;
|
|
134749
134749
|
}
|
|
134750
134750
|
if (typeof config.onDownloadProgress === "function") {
|
|
134751
|
-
|
|
134751
|
+
request2.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
|
|
134752
134752
|
}
|
|
134753
|
-
if (typeof config.onUploadProgress === "function" &&
|
|
134754
|
-
|
|
134753
|
+
if (typeof config.onUploadProgress === "function" && request2.upload) {
|
|
134754
|
+
request2.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
|
|
134755
134755
|
}
|
|
134756
134756
|
if (config.cancelToken || config.signal) {
|
|
134757
134757
|
onCanceled = (cancel) => {
|
|
134758
|
-
if (!
|
|
134758
|
+
if (!request2) {
|
|
134759
134759
|
return;
|
|
134760
134760
|
}
|
|
134761
|
-
reject(!cancel || cancel.type ? new CanceledError(null, config,
|
|
134762
|
-
|
|
134763
|
-
|
|
134761
|
+
reject(!cancel || cancel.type ? new CanceledError(null, config, request2) : cancel);
|
|
134762
|
+
request2.abort();
|
|
134763
|
+
request2 = null;
|
|
134764
134764
|
};
|
|
134765
134765
|
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
134766
134766
|
if (config.signal) {
|
|
@@ -134772,7 +134772,7 @@ var require_axios = __commonJS({
|
|
|
134772
134772
|
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
134773
134773
|
return;
|
|
134774
134774
|
}
|
|
134775
|
-
|
|
134775
|
+
request2.send(requestData || null);
|
|
134776
134776
|
});
|
|
134777
134777
|
};
|
|
134778
134778
|
var knownAdapters = {
|
|
@@ -135191,11 +135191,11 @@ var require_axios = __commonJS({
|
|
|
135191
135191
|
};
|
|
135192
135192
|
return promise;
|
|
135193
135193
|
};
|
|
135194
|
-
executor(function cancel(message, config,
|
|
135194
|
+
executor(function cancel(message, config, request2) {
|
|
135195
135195
|
if (token.reason) {
|
|
135196
135196
|
return;
|
|
135197
135197
|
}
|
|
135198
|
-
token.reason = new CanceledError(message, config,
|
|
135198
|
+
token.reason = new CanceledError(message, config, request2);
|
|
135199
135199
|
resolvePromise(token.reason);
|
|
135200
135200
|
});
|
|
135201
135201
|
}
|
|
@@ -142189,9 +142189,9 @@ var require_lib226 = __commonJS({
|
|
|
142189
142189
|
clone: { enumerable: true },
|
|
142190
142190
|
signal: { enumerable: true }
|
|
142191
142191
|
});
|
|
142192
|
-
function getNodeRequestOptions(
|
|
142193
|
-
const parsedURL =
|
|
142194
|
-
const headers = new Headers2(
|
|
142192
|
+
function getNodeRequestOptions(request2) {
|
|
142193
|
+
const parsedURL = request2[INTERNALS$2].parsedURL;
|
|
142194
|
+
const headers = new Headers2(request2[INTERNALS$2].headers);
|
|
142195
142195
|
if (!headers.has("Accept")) {
|
|
142196
142196
|
headers.set("Accept", "*/*");
|
|
142197
142197
|
}
|
|
@@ -142201,15 +142201,15 @@ var require_lib226 = __commonJS({
|
|
|
142201
142201
|
if (!/^https?:$/.test(parsedURL.protocol)) {
|
|
142202
142202
|
throw new TypeError("Only HTTP(S) protocols are supported");
|
|
142203
142203
|
}
|
|
142204
|
-
if (
|
|
142204
|
+
if (request2.signal && request2.body instanceof Stream.Readable && !streamDestructionSupported) {
|
|
142205
142205
|
throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");
|
|
142206
142206
|
}
|
|
142207
142207
|
let contentLengthValue = null;
|
|
142208
|
-
if (
|
|
142208
|
+
if (request2.body == null && /^(POST|PUT)$/i.test(request2.method)) {
|
|
142209
142209
|
contentLengthValue = "0";
|
|
142210
142210
|
}
|
|
142211
|
-
if (
|
|
142212
|
-
const totalBytes = getTotalBytes(
|
|
142211
|
+
if (request2.body != null) {
|
|
142212
|
+
const totalBytes = getTotalBytes(request2);
|
|
142213
142213
|
if (typeof totalBytes === "number") {
|
|
142214
142214
|
contentLengthValue = String(totalBytes);
|
|
142215
142215
|
}
|
|
@@ -142220,15 +142220,15 @@ var require_lib226 = __commonJS({
|
|
|
142220
142220
|
if (!headers.has("User-Agent")) {
|
|
142221
142221
|
headers.set("User-Agent", "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)");
|
|
142222
142222
|
}
|
|
142223
|
-
if (
|
|
142223
|
+
if (request2.compress && !headers.has("Accept-Encoding")) {
|
|
142224
142224
|
headers.set("Accept-Encoding", "gzip,deflate");
|
|
142225
142225
|
}
|
|
142226
|
-
let agent =
|
|
142226
|
+
let agent = request2.agent;
|
|
142227
142227
|
if (typeof agent === "function") {
|
|
142228
142228
|
agent = agent(parsedURL);
|
|
142229
142229
|
}
|
|
142230
142230
|
return Object.assign({}, parsedURL, {
|
|
142231
|
-
method:
|
|
142231
|
+
method: request2.method,
|
|
142232
142232
|
headers: exportNodeCompatibleHeaders(headers),
|
|
142233
142233
|
agent
|
|
142234
142234
|
});
|
|
@@ -142260,16 +142260,16 @@ var require_lib226 = __commonJS({
|
|
|
142260
142260
|
}
|
|
142261
142261
|
Body.Promise = fetch2.Promise;
|
|
142262
142262
|
return new fetch2.Promise(function(resolve2, reject) {
|
|
142263
|
-
const
|
|
142264
|
-
const options = getNodeRequestOptions(
|
|
142263
|
+
const request2 = new Request(url, opts);
|
|
142264
|
+
const options = getNodeRequestOptions(request2);
|
|
142265
142265
|
const send = (options.protocol === "https:" ? https2 : http2).request;
|
|
142266
|
-
const signal =
|
|
142266
|
+
const signal = request2.signal;
|
|
142267
142267
|
let response = null;
|
|
142268
142268
|
const abort = function abort2() {
|
|
142269
142269
|
let error = new AbortError2("The user aborted a request.");
|
|
142270
142270
|
reject(error);
|
|
142271
|
-
if (
|
|
142272
|
-
destroyStream(
|
|
142271
|
+
if (request2.body && request2.body instanceof Stream.Readable) {
|
|
142272
|
+
destroyStream(request2.body, error);
|
|
142273
142273
|
}
|
|
142274
142274
|
if (!response || !response.body)
|
|
142275
142275
|
return;
|
|
@@ -142294,16 +142294,16 @@ var require_lib226 = __commonJS({
|
|
|
142294
142294
|
signal.removeEventListener("abort", abortAndFinalize);
|
|
142295
142295
|
clearTimeout(reqTimeout);
|
|
142296
142296
|
}
|
|
142297
|
-
if (
|
|
142297
|
+
if (request2.timeout) {
|
|
142298
142298
|
req.once("socket", function(socket) {
|
|
142299
142299
|
reqTimeout = setTimeout(function() {
|
|
142300
|
-
reject(new FetchError(`network timeout at: ${
|
|
142300
|
+
reject(new FetchError(`network timeout at: ${request2.url}`, "request-timeout"));
|
|
142301
142301
|
finalize();
|
|
142302
|
-
},
|
|
142302
|
+
}, request2.timeout);
|
|
142303
142303
|
});
|
|
142304
142304
|
}
|
|
142305
142305
|
req.on("error", function(err) {
|
|
142306
|
-
reject(new FetchError(`request to ${
|
|
142306
|
+
reject(new FetchError(`request to ${request2.url} failed, reason: ${err.message}`, "system", err));
|
|
142307
142307
|
if (response && response.body) {
|
|
142308
142308
|
destroyStream(response.body, err);
|
|
142309
142309
|
}
|
|
@@ -142336,17 +142336,17 @@ var require_lib226 = __commonJS({
|
|
|
142336
142336
|
const location = headers.get("Location");
|
|
142337
142337
|
let locationURL = null;
|
|
142338
142338
|
try {
|
|
142339
|
-
locationURL = location === null ? null : new URL$1(location,
|
|
142339
|
+
locationURL = location === null ? null : new URL$1(location, request2.url).toString();
|
|
142340
142340
|
} catch (err) {
|
|
142341
|
-
if (
|
|
142341
|
+
if (request2.redirect !== "manual") {
|
|
142342
142342
|
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, "invalid-redirect"));
|
|
142343
142343
|
finalize();
|
|
142344
142344
|
return;
|
|
142345
142345
|
}
|
|
142346
142346
|
}
|
|
142347
|
-
switch (
|
|
142347
|
+
switch (request2.redirect) {
|
|
142348
142348
|
case "error":
|
|
142349
|
-
reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${
|
|
142349
|
+
reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request2.url}`, "no-redirect"));
|
|
142350
142350
|
finalize();
|
|
142351
142351
|
return;
|
|
142352
142352
|
case "manual":
|
|
@@ -142362,34 +142362,34 @@ var require_lib226 = __commonJS({
|
|
|
142362
142362
|
if (locationURL === null) {
|
|
142363
142363
|
break;
|
|
142364
142364
|
}
|
|
142365
|
-
if (
|
|
142366
|
-
reject(new FetchError(`maximum redirect reached at: ${
|
|
142365
|
+
if (request2.counter >= request2.follow) {
|
|
142366
|
+
reject(new FetchError(`maximum redirect reached at: ${request2.url}`, "max-redirect"));
|
|
142367
142367
|
finalize();
|
|
142368
142368
|
return;
|
|
142369
142369
|
}
|
|
142370
142370
|
const requestOpts = {
|
|
142371
|
-
headers: new Headers2(
|
|
142372
|
-
follow:
|
|
142373
|
-
counter:
|
|
142374
|
-
agent:
|
|
142375
|
-
compress:
|
|
142376
|
-
method:
|
|
142377
|
-
body:
|
|
142378
|
-
signal:
|
|
142379
|
-
timeout:
|
|
142380
|
-
size:
|
|
142371
|
+
headers: new Headers2(request2.headers),
|
|
142372
|
+
follow: request2.follow,
|
|
142373
|
+
counter: request2.counter + 1,
|
|
142374
|
+
agent: request2.agent,
|
|
142375
|
+
compress: request2.compress,
|
|
142376
|
+
method: request2.method,
|
|
142377
|
+
body: request2.body,
|
|
142378
|
+
signal: request2.signal,
|
|
142379
|
+
timeout: request2.timeout,
|
|
142380
|
+
size: request2.size
|
|
142381
142381
|
};
|
|
142382
|
-
if (!isDomainOrSubdomain(
|
|
142382
|
+
if (!isDomainOrSubdomain(request2.url, locationURL) || !isSameProtocol(request2.url, locationURL)) {
|
|
142383
142383
|
for (const name of ["authorization", "www-authenticate", "cookie", "cookie2"]) {
|
|
142384
142384
|
requestOpts.headers.delete(name);
|
|
142385
142385
|
}
|
|
142386
142386
|
}
|
|
142387
|
-
if (res.statusCode !== 303 &&
|
|
142387
|
+
if (res.statusCode !== 303 && request2.body && getTotalBytes(request2) === null) {
|
|
142388
142388
|
reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect"));
|
|
142389
142389
|
finalize();
|
|
142390
142390
|
return;
|
|
142391
142391
|
}
|
|
142392
|
-
if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) &&
|
|
142392
|
+
if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request2.method === "POST") {
|
|
142393
142393
|
requestOpts.method = "GET";
|
|
142394
142394
|
requestOpts.body = void 0;
|
|
142395
142395
|
requestOpts.headers.delete("content-length");
|
|
@@ -142405,16 +142405,16 @@ var require_lib226 = __commonJS({
|
|
|
142405
142405
|
});
|
|
142406
142406
|
let body = res.pipe(new PassThrough$1());
|
|
142407
142407
|
const response_options = {
|
|
142408
|
-
url:
|
|
142408
|
+
url: request2.url,
|
|
142409
142409
|
status: res.statusCode,
|
|
142410
142410
|
statusText: res.statusMessage,
|
|
142411
142411
|
headers,
|
|
142412
|
-
size:
|
|
142413
|
-
timeout:
|
|
142414
|
-
counter:
|
|
142412
|
+
size: request2.size,
|
|
142413
|
+
timeout: request2.timeout,
|
|
142414
|
+
counter: request2.counter
|
|
142415
142415
|
};
|
|
142416
142416
|
const codings = headers.get("Content-Encoding");
|
|
142417
|
-
if (!
|
|
142417
|
+
if (!request2.compress || request2.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
|
142418
142418
|
response = new Response(body, response_options);
|
|
142419
142419
|
resolve2(response);
|
|
142420
142420
|
return;
|
|
@@ -142457,15 +142457,15 @@ var require_lib226 = __commonJS({
|
|
|
142457
142457
|
response = new Response(body, response_options);
|
|
142458
142458
|
resolve2(response);
|
|
142459
142459
|
});
|
|
142460
|
-
writeToStream(req,
|
|
142460
|
+
writeToStream(req, request2);
|
|
142461
142461
|
});
|
|
142462
142462
|
}
|
|
142463
|
-
function fixResponseChunkedTransferBadEnding(
|
|
142463
|
+
function fixResponseChunkedTransferBadEnding(request2, errorCallback) {
|
|
142464
142464
|
let socket;
|
|
142465
|
-
|
|
142465
|
+
request2.on("socket", function(s) {
|
|
142466
142466
|
socket = s;
|
|
142467
142467
|
});
|
|
142468
|
-
|
|
142468
|
+
request2.on("response", function(response) {
|
|
142469
142469
|
const headers = response.headers;
|
|
142470
142470
|
if (headers["transfer-encoding"] === "chunked" && !headers["content-length"]) {
|
|
142471
142471
|
response.once("close", function(hadError) {
|
|
@@ -143915,15 +143915,15 @@ var require_geturl3 = __commonJS({
|
|
|
143915
143915
|
reqOptions.agent = options.agent;
|
|
143916
143916
|
}
|
|
143917
143917
|
}
|
|
143918
|
-
const
|
|
143919
|
-
|
|
143918
|
+
const request2 = (protocol === "http" ? http_1.default : https_1.default).request(req.url, reqOptions);
|
|
143919
|
+
request2.setTimeout(req.timeout);
|
|
143920
143920
|
const body = req.body;
|
|
143921
143921
|
if (body) {
|
|
143922
|
-
|
|
143922
|
+
request2.write(Buffer.from(body));
|
|
143923
143923
|
}
|
|
143924
|
-
|
|
143924
|
+
request2.end();
|
|
143925
143925
|
return new Promise((resolve2, reject) => {
|
|
143926
|
-
|
|
143926
|
+
request2.once("response", (resp) => {
|
|
143927
143927
|
const statusCode = resp.statusCode || 0;
|
|
143928
143928
|
const statusMessage = resp.statusMessage || "";
|
|
143929
143929
|
const headers2 = Object.keys(resp.headers || {}).reduce((accum, name) => {
|
|
@@ -143963,7 +143963,7 @@ var require_geturl3 = __commonJS({
|
|
|
143963
143963
|
reject(error);
|
|
143964
143964
|
});
|
|
143965
143965
|
});
|
|
143966
|
-
|
|
143966
|
+
request2.on("error", (error) => {
|
|
143967
143967
|
reject(error);
|
|
143968
143968
|
});
|
|
143969
143969
|
});
|
|
@@ -144032,10 +144032,10 @@ var require_fetch = __commonJS({
|
|
|
144032
144032
|
var FetchCancelSignal3 = class {
|
|
144033
144033
|
#listeners;
|
|
144034
144034
|
#cancelled;
|
|
144035
|
-
constructor(
|
|
144035
|
+
constructor(request2) {
|
|
144036
144036
|
this.#listeners = [];
|
|
144037
144037
|
this.#cancelled = false;
|
|
144038
|
-
fetchSignals2.set(
|
|
144038
|
+
fetchSignals2.set(request2, () => {
|
|
144039
144039
|
if (this.#cancelled) {
|
|
144040
144040
|
return;
|
|
144041
144041
|
}
|
|
@@ -144668,7 +144668,7 @@ var require_fetch = __commonJS({
|
|
|
144668
144668
|
}
|
|
144669
144669
|
};
|
|
144670
144670
|
}
|
|
144671
|
-
constructor(statusCode, statusMessage, headers, body,
|
|
144671
|
+
constructor(statusCode, statusMessage, headers, body, request2) {
|
|
144672
144672
|
this.#statusCode = statusCode;
|
|
144673
144673
|
this.#statusMessage = statusMessage;
|
|
144674
144674
|
this.#headers = Object.keys(headers).reduce((accum, k) => {
|
|
@@ -144676,7 +144676,7 @@ var require_fetch = __commonJS({
|
|
|
144676
144676
|
return accum;
|
|
144677
144677
|
}, {});
|
|
144678
144678
|
this.#body = body == null ? null : new Uint8Array(body);
|
|
144679
|
-
this.#request =
|
|
144679
|
+
this.#request = request2 || null;
|
|
144680
144680
|
this.#error = { message: "" };
|
|
144681
144681
|
}
|
|
144682
144682
|
/**
|
|
@@ -161073,12 +161073,12 @@ var require_network = __commonJS({
|
|
|
161073
161073
|
return BigInt(comps[0] + comps[1]);
|
|
161074
161074
|
}
|
|
161075
161075
|
function getGasStationPlugin2(url) {
|
|
161076
|
-
return new plugins_network_js_1.FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider,
|
|
161077
|
-
|
|
161076
|
+
return new plugins_network_js_1.FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request2) => {
|
|
161077
|
+
request2.setHeader("User-Agent", "ethers");
|
|
161078
161078
|
let response;
|
|
161079
161079
|
try {
|
|
161080
161080
|
const [_response, _feeData] = await Promise.all([
|
|
161081
|
-
|
|
161081
|
+
request2.send(),
|
|
161082
161082
|
fetchFeeData()
|
|
161083
161083
|
]);
|
|
161084
161084
|
response = _response;
|
|
@@ -161090,7 +161090,7 @@ var require_network = __commonJS({
|
|
|
161090
161090
|
};
|
|
161091
161091
|
return feeData;
|
|
161092
161092
|
} catch (error) {
|
|
161093
|
-
(0, index_js_2.assert)(false, `error encountered with polygon gas station (${JSON.stringify(
|
|
161093
|
+
(0, index_js_2.assert)(false, `error encountered with polygon gas station (${JSON.stringify(request2.url)})`, "SERVER_ERROR", { request: request2, response, error });
|
|
161094
161094
|
}
|
|
161095
161095
|
});
|
|
161096
161096
|
}
|
|
@@ -161699,23 +161699,23 @@ var require_abstract_provider = __commonJS({
|
|
|
161699
161699
|
for (let i = 0; i < urls.length; i++) {
|
|
161700
161700
|
const url = urls[i];
|
|
161701
161701
|
const href = url.replace("{sender}", sender).replace("{data}", data);
|
|
161702
|
-
const
|
|
161702
|
+
const request2 = new index_js_6.FetchRequest(href);
|
|
161703
161703
|
if (url.indexOf("{data}") === -1) {
|
|
161704
|
-
|
|
161704
|
+
request2.body = { data, sender };
|
|
161705
161705
|
}
|
|
161706
|
-
this.emit("debug", { action: "sendCcipReadFetchRequest", request, index: i, urls });
|
|
161706
|
+
this.emit("debug", { action: "sendCcipReadFetchRequest", request: request2, index: i, urls });
|
|
161707
161707
|
let errorMessage = "unknown error";
|
|
161708
|
-
const resp = await
|
|
161708
|
+
const resp = await request2.send();
|
|
161709
161709
|
try {
|
|
161710
161710
|
const result = resp.bodyJson;
|
|
161711
161711
|
if (result.data) {
|
|
161712
|
-
this.emit("debug", { action: "receiveCcipReadFetchResult", request, result });
|
|
161712
|
+
this.emit("debug", { action: "receiveCcipReadFetchResult", request: request2, result });
|
|
161713
161713
|
return result.data;
|
|
161714
161714
|
}
|
|
161715
161715
|
if (result.message) {
|
|
161716
161716
|
errorMessage = result.message;
|
|
161717
161717
|
}
|
|
161718
|
-
this.emit("debug", { action: "receiveCcipReadFetchError", request, result });
|
|
161718
|
+
this.emit("debug", { action: "receiveCcipReadFetchError", request: request2, result });
|
|
161719
161719
|
} catch (error) {
|
|
161720
161720
|
}
|
|
161721
161721
|
(0, index_js_6.assert)(resp.statusCode < 400 || resp.statusCode >= 500, `response not found during CCIP fetch: ${errorMessage}`, "OFFCHAIN_FAULT", { reason: "404_MISSING_RESOURCE", transaction: tx, info: { url, errorMessage } });
|
|
@@ -161917,38 +161917,38 @@ var require_abstract_provider = __commonJS({
|
|
|
161917
161917
|
* transaction.
|
|
161918
161918
|
*/
|
|
161919
161919
|
_getTransactionRequest(_request) {
|
|
161920
|
-
const
|
|
161920
|
+
const request2 = (0, provider_js_1.copyRequest)(_request);
|
|
161921
161921
|
const promises = [];
|
|
161922
161922
|
["to", "from"].forEach((key) => {
|
|
161923
|
-
if (
|
|
161923
|
+
if (request2[key] == null) {
|
|
161924
161924
|
return;
|
|
161925
161925
|
}
|
|
161926
|
-
const addr = (0, index_js_1.resolveAddress)(
|
|
161926
|
+
const addr = (0, index_js_1.resolveAddress)(request2[key], this);
|
|
161927
161927
|
if (isPromise2(addr)) {
|
|
161928
161928
|
promises.push(async function() {
|
|
161929
|
-
|
|
161929
|
+
request2[key] = await addr;
|
|
161930
161930
|
}());
|
|
161931
161931
|
} else {
|
|
161932
|
-
|
|
161932
|
+
request2[key] = addr;
|
|
161933
161933
|
}
|
|
161934
161934
|
});
|
|
161935
|
-
if (
|
|
161936
|
-
const blockTag = this._getBlockTag(
|
|
161935
|
+
if (request2.blockTag != null) {
|
|
161936
|
+
const blockTag = this._getBlockTag(request2.blockTag);
|
|
161937
161937
|
if (isPromise2(blockTag)) {
|
|
161938
161938
|
promises.push(async function() {
|
|
161939
|
-
|
|
161939
|
+
request2.blockTag = await blockTag;
|
|
161940
161940
|
}());
|
|
161941
161941
|
} else {
|
|
161942
|
-
|
|
161942
|
+
request2.blockTag = blockTag;
|
|
161943
161943
|
}
|
|
161944
161944
|
}
|
|
161945
161945
|
if (promises.length) {
|
|
161946
161946
|
return async function() {
|
|
161947
161947
|
await Promise.all(promises);
|
|
161948
|
-
return
|
|
161948
|
+
return request2;
|
|
161949
161949
|
}();
|
|
161950
161950
|
}
|
|
161951
|
-
return
|
|
161951
|
+
return request2;
|
|
161952
161952
|
}
|
|
161953
161953
|
async getNetwork() {
|
|
161954
161954
|
if (this.#networkPromise == null) {
|
|
@@ -162108,13 +162108,13 @@ var require_abstract_provider = __commonJS({
|
|
|
162108
162108
|
return await this.#checkNetwork(this.#call(tx, blockTag, _tx.enableCcipRead ? 0 : -1));
|
|
162109
162109
|
}
|
|
162110
162110
|
// Account
|
|
162111
|
-
async #getAccountValue(
|
|
162111
|
+
async #getAccountValue(request2, _address, _blockTag) {
|
|
162112
162112
|
let address = this._getAddress(_address);
|
|
162113
162113
|
let blockTag = this._getBlockTag(_blockTag);
|
|
162114
162114
|
if (typeof address !== "string" || typeof blockTag !== "string") {
|
|
162115
162115
|
[address, blockTag] = await Promise.all([address, blockTag]);
|
|
162116
162116
|
}
|
|
162117
|
-
return await this.#checkNetwork(this.#perform(Object.assign(
|
|
162117
|
+
return await this.#checkNetwork(this.#perform(Object.assign(request2, { address, blockTag })));
|
|
162118
162118
|
}
|
|
162119
162119
|
async getBalance(address, blockTag) {
|
|
162120
162120
|
return (0, index_js_6.getBigInt)(await this.#getAccountValue({ method: "getBalance" }, address, blockTag), "%response");
|
|
@@ -163473,9 +163473,9 @@ var require_provider_jsonrpc = __commonJS({
|
|
|
163473
163473
|
}
|
|
163474
163474
|
}
|
|
163475
163475
|
}
|
|
163476
|
-
const
|
|
163477
|
-
if (
|
|
163478
|
-
return await this.send(
|
|
163476
|
+
const request2 = this.getRpcRequest(req);
|
|
163477
|
+
if (request2 != null) {
|
|
163478
|
+
return await this.send(request2.method, request2.args);
|
|
163479
163479
|
}
|
|
163480
163480
|
return super._perform(req);
|
|
163481
163481
|
}
|
|
@@ -163932,10 +163932,10 @@ var require_provider_jsonrpc = __commonJS({
|
|
|
163932
163932
|
return await super.send(method, params);
|
|
163933
163933
|
}
|
|
163934
163934
|
async _send(payload) {
|
|
163935
|
-
const
|
|
163936
|
-
|
|
163937
|
-
|
|
163938
|
-
const response = await
|
|
163935
|
+
const request2 = this._getConnection();
|
|
163936
|
+
request2.body = JSON.stringify(payload);
|
|
163937
|
+
request2.setHeader("content-type", "application/json");
|
|
163938
|
+
const response = await request2.send();
|
|
163939
163939
|
response.assertOk();
|
|
163940
163940
|
let resp = response.bodyJson;
|
|
163941
163941
|
if (!Array.isArray(resp)) {
|
|
@@ -164060,8 +164060,8 @@ var require_provider_ankr = __commonJS({
|
|
|
164060
164060
|
apiKey = defaultApiKey;
|
|
164061
164061
|
}
|
|
164062
164062
|
const options = { polling: true, staticNetwork: network };
|
|
164063
|
-
const
|
|
164064
|
-
super(
|
|
164063
|
+
const request2 = _AnkrProvider.getRequest(network, apiKey);
|
|
164064
|
+
super(request2, network, options);
|
|
164065
164065
|
(0, index_js_1.defineProperties)(this, { apiKey });
|
|
164066
164066
|
}
|
|
164067
164067
|
_getProvider(chainId) {
|
|
@@ -164079,15 +164079,15 @@ var require_provider_ankr = __commonJS({
|
|
|
164079
164079
|
if (apiKey == null) {
|
|
164080
164080
|
apiKey = defaultApiKey;
|
|
164081
164081
|
}
|
|
164082
|
-
const
|
|
164083
|
-
|
|
164082
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);
|
|
164083
|
+
request2.allowGzip = true;
|
|
164084
164084
|
if (apiKey === defaultApiKey) {
|
|
164085
|
-
|
|
164085
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
164086
164086
|
(0, community_js_1.showThrottleMessage)("AnkrProvider");
|
|
164087
164087
|
return true;
|
|
164088
164088
|
};
|
|
164089
164089
|
}
|
|
164090
|
-
return
|
|
164090
|
+
return request2;
|
|
164091
164091
|
}
|
|
164092
164092
|
getRpcError(payload, error) {
|
|
164093
164093
|
if (payload.method === "eth_sendRawTransaction") {
|
|
@@ -164159,8 +164159,8 @@ var require_provider_alchemy = __commonJS({
|
|
|
164159
164159
|
if (apiKey == null) {
|
|
164160
164160
|
apiKey = defaultApiKey;
|
|
164161
164161
|
}
|
|
164162
|
-
const
|
|
164163
|
-
super(
|
|
164162
|
+
const request2 = _AlchemyProvider.getRequest(network, apiKey);
|
|
164163
|
+
super(request2, network, { staticNetwork: network });
|
|
164164
164164
|
(0, index_js_1.defineProperties)(this, { apiKey });
|
|
164165
164165
|
}
|
|
164166
164166
|
_getProvider(chainId) {
|
|
@@ -164209,15 +164209,15 @@ var require_provider_alchemy = __commonJS({
|
|
|
164209
164209
|
if (apiKey == null) {
|
|
164210
164210
|
apiKey = defaultApiKey;
|
|
164211
164211
|
}
|
|
164212
|
-
const
|
|
164213
|
-
|
|
164212
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v2/${apiKey}`);
|
|
164213
|
+
request2.allowGzip = true;
|
|
164214
164214
|
if (apiKey === defaultApiKey) {
|
|
164215
|
-
|
|
164215
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
164216
164216
|
(0, community_js_1.showThrottleMessage)("alchemy");
|
|
164217
164217
|
return true;
|
|
164218
164218
|
};
|
|
164219
164219
|
}
|
|
164220
|
-
return
|
|
164220
|
+
return request2;
|
|
164221
164221
|
}
|
|
164222
164222
|
};
|
|
164223
164223
|
exports2.AlchemyProvider = AlchemyProvider2;
|
|
@@ -164383,20 +164383,20 @@ var require_provider_etherscan = __commonJS({
|
|
|
164383
164383
|
*
|
|
164384
164384
|
* If %%post%%, the request is made as a POST request.
|
|
164385
164385
|
*/
|
|
164386
|
-
async fetch(module3, params,
|
|
164386
|
+
async fetch(module3, params, post2) {
|
|
164387
164387
|
const id3 = nextId++;
|
|
164388
|
-
const url =
|
|
164389
|
-
const payload =
|
|
164388
|
+
const url = post2 ? this.getPostUrl() : this.getUrl(module3, params);
|
|
164389
|
+
const payload = post2 ? this.getPostData(module3, params) : null;
|
|
164390
164390
|
this.emit("debug", { action: "sendRequest", id: id3, url, payload });
|
|
164391
|
-
const
|
|
164392
|
-
|
|
164393
|
-
|
|
164391
|
+
const request2 = new index_js_4.FetchRequest(url);
|
|
164392
|
+
request2.setThrottleParams({ slotInterval: 1e3 });
|
|
164393
|
+
request2.retryFunc = (req, resp, attempt) => {
|
|
164394
164394
|
if (this.isCommunityResource()) {
|
|
164395
164395
|
(0, community_js_1.showThrottleMessage)("Etherscan");
|
|
164396
164396
|
}
|
|
164397
164397
|
return Promise.resolve(true);
|
|
164398
164398
|
};
|
|
164399
|
-
|
|
164399
|
+
request2.processFunc = async (request3, response2) => {
|
|
164400
164400
|
const result2 = response2.hasBody() ? JSON.parse((0, index_js_4.toUtf8String)(response2.body)) : {};
|
|
164401
164401
|
const throttle = (typeof result2.result === "string" ? result2.result : "").toLowerCase().indexOf("rate limit") >= 0;
|
|
164402
164402
|
if (module3 === "proxy") {
|
|
@@ -164413,29 +164413,29 @@ var require_provider_etherscan = __commonJS({
|
|
|
164413
164413
|
return response2;
|
|
164414
164414
|
};
|
|
164415
164415
|
if (payload) {
|
|
164416
|
-
|
|
164417
|
-
|
|
164416
|
+
request2.setHeader("content-type", "application/x-www-form-urlencoded; charset=UTF-8");
|
|
164417
|
+
request2.body = Object.keys(payload).map((k) => `${k}=${payload[k]}`).join("&");
|
|
164418
164418
|
}
|
|
164419
|
-
const response = await
|
|
164419
|
+
const response = await request2.send();
|
|
164420
164420
|
try {
|
|
164421
164421
|
response.assertOk();
|
|
164422
164422
|
} catch (error) {
|
|
164423
164423
|
this.emit("debug", { action: "receiveError", id: id3, error, reason: "assertOk" });
|
|
164424
|
-
(0, index_js_4.assert)(false, "response error", "SERVER_ERROR", { request, response });
|
|
164424
|
+
(0, index_js_4.assert)(false, "response error", "SERVER_ERROR", { request: request2, response });
|
|
164425
164425
|
}
|
|
164426
164426
|
if (!response.hasBody()) {
|
|
164427
164427
|
this.emit("debug", { action: "receiveError", id: id3, error: "missing body", reason: "null body" });
|
|
164428
|
-
(0, index_js_4.assert)(false, "missing response", "SERVER_ERROR", { request, response });
|
|
164428
|
+
(0, index_js_4.assert)(false, "missing response", "SERVER_ERROR", { request: request2, response });
|
|
164429
164429
|
}
|
|
164430
164430
|
const result = JSON.parse((0, index_js_4.toUtf8String)(response.body));
|
|
164431
164431
|
if (module3 === "proxy") {
|
|
164432
164432
|
if (result.jsonrpc != "2.0") {
|
|
164433
164433
|
this.emit("debug", { action: "receiveError", id: id3, result, reason: "invalid JSON-RPC" });
|
|
164434
|
-
(0, index_js_4.assert)(false, "invalid JSON-RPC response (missing jsonrpc='2.0')", "SERVER_ERROR", { request, response, info: { result } });
|
|
164434
|
+
(0, index_js_4.assert)(false, "invalid JSON-RPC response (missing jsonrpc='2.0')", "SERVER_ERROR", { request: request2, response, info: { result } });
|
|
164435
164435
|
}
|
|
164436
164436
|
if (result.error) {
|
|
164437
164437
|
this.emit("debug", { action: "receiveError", id: id3, result, reason: "JSON-RPC error" });
|
|
164438
|
-
(0, index_js_4.assert)(false, "error response", "SERVER_ERROR", { request, response, info: { result } });
|
|
164438
|
+
(0, index_js_4.assert)(false, "error response", "SERVER_ERROR", { request: request2, response, info: { result } });
|
|
164439
164439
|
}
|
|
164440
164440
|
this.emit("debug", { action: "receiveRequest", id: id3, result });
|
|
164441
164441
|
return result.result;
|
|
@@ -164446,7 +164446,7 @@ var require_provider_etherscan = __commonJS({
|
|
|
164446
164446
|
}
|
|
164447
164447
|
if (result.status != 1 || typeof result.message === "string" && !result.message.match(/^OK/)) {
|
|
164448
164448
|
this.emit("debug", { action: "receiveError", id: id3, result });
|
|
164449
|
-
(0, index_js_4.assert)(false, "error response", "SERVER_ERROR", { request, response, info: { result } });
|
|
164449
|
+
(0, index_js_4.assert)(false, "error response", "SERVER_ERROR", { request: request2, response, info: { result } });
|
|
164450
164450
|
}
|
|
164451
164451
|
this.emit("debug", { action: "receiveRequest", id: id3, result });
|
|
164452
164452
|
return result.result;
|
|
@@ -165147,8 +165147,8 @@ var require_provider_infura = __commonJS({
|
|
|
165147
165147
|
if (projectSecret == null) {
|
|
165148
165148
|
projectSecret = null;
|
|
165149
165149
|
}
|
|
165150
|
-
const
|
|
165151
|
-
super(
|
|
165150
|
+
const request2 = _InfuraProvider.getRequest(network, projectId, projectSecret);
|
|
165151
|
+
super(request2, network, { staticNetwork: network });
|
|
165152
165152
|
(0, index_js_1.defineProperties)(this, { projectId, projectSecret });
|
|
165153
165153
|
}
|
|
165154
165154
|
_getProvider(chainId) {
|
|
@@ -165178,18 +165178,18 @@ var require_provider_infura = __commonJS({
|
|
|
165178
165178
|
if (projectSecret == null) {
|
|
165179
165179
|
projectSecret = null;
|
|
165180
165180
|
}
|
|
165181
|
-
const
|
|
165182
|
-
|
|
165181
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v3/${projectId}`);
|
|
165182
|
+
request2.allowGzip = true;
|
|
165183
165183
|
if (projectSecret) {
|
|
165184
|
-
|
|
165184
|
+
request2.setCredentials("", projectSecret);
|
|
165185
165185
|
}
|
|
165186
165186
|
if (projectId === defaultProjectId) {
|
|
165187
|
-
|
|
165187
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
165188
165188
|
(0, community_js_1.showThrottleMessage)("InfuraProvider");
|
|
165189
165189
|
return true;
|
|
165190
165190
|
};
|
|
165191
165191
|
}
|
|
165192
|
-
return
|
|
165192
|
+
return request2;
|
|
165193
165193
|
}
|
|
165194
165194
|
};
|
|
165195
165195
|
exports2.InfuraProvider = InfuraProvider2;
|
|
@@ -165264,8 +165264,8 @@ var require_provider_quicknode = __commonJS({
|
|
|
165264
165264
|
if (token == null) {
|
|
165265
165265
|
token = defaultToken;
|
|
165266
165266
|
}
|
|
165267
|
-
const
|
|
165268
|
-
super(
|
|
165267
|
+
const request2 = _QuickNodeProvider.getRequest(network, token);
|
|
165268
|
+
super(request2, network, { staticNetwork: network });
|
|
165269
165269
|
(0, index_js_1.defineProperties)(this, { token });
|
|
165270
165270
|
}
|
|
165271
165271
|
_getProvider(chainId) {
|
|
@@ -165286,15 +165286,15 @@ var require_provider_quicknode = __commonJS({
|
|
|
165286
165286
|
if (token == null) {
|
|
165287
165287
|
token = defaultToken;
|
|
165288
165288
|
}
|
|
165289
|
-
const
|
|
165290
|
-
|
|
165289
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${token}`);
|
|
165290
|
+
request2.allowGzip = true;
|
|
165291
165291
|
if (token === defaultToken) {
|
|
165292
|
-
|
|
165292
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
165293
165293
|
(0, community_js_1.showThrottleMessage)("QuickNodeProvider");
|
|
165294
165294
|
return true;
|
|
165295
165295
|
};
|
|
165296
165296
|
}
|
|
165297
|
-
return
|
|
165297
|
+
return request2;
|
|
165298
165298
|
}
|
|
165299
165299
|
};
|
|
165300
165300
|
exports2.QuickNodeProvider = QuickNodeProvider2;
|
|
@@ -166195,8 +166195,8 @@ var require_provider_pocket = __commonJS({
|
|
|
166195
166195
|
applicationSecret = null;
|
|
166196
166196
|
}
|
|
166197
166197
|
const options = { staticNetwork: network };
|
|
166198
|
-
const
|
|
166199
|
-
super(
|
|
166198
|
+
const request2 = _PocketProvider.getRequest(network, applicationId, applicationSecret);
|
|
166199
|
+
super(request2, network, options);
|
|
166200
166200
|
(0, index_js_1.defineProperties)(this, { applicationId, applicationSecret });
|
|
166201
166201
|
}
|
|
166202
166202
|
_getProvider(chainId) {
|
|
@@ -166214,18 +166214,18 @@ var require_provider_pocket = __commonJS({
|
|
|
166214
166214
|
if (applicationId == null) {
|
|
166215
166215
|
applicationId = defaultApplicationId;
|
|
166216
166216
|
}
|
|
166217
|
-
const
|
|
166218
|
-
|
|
166217
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v1/lb/${applicationId}`);
|
|
166218
|
+
request2.allowGzip = true;
|
|
166219
166219
|
if (applicationSecret) {
|
|
166220
|
-
|
|
166220
|
+
request2.setCredentials("", applicationSecret);
|
|
166221
166221
|
}
|
|
166222
166222
|
if (applicationId === defaultApplicationId) {
|
|
166223
|
-
|
|
166223
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
166224
166224
|
(0, community_js_1.showThrottleMessage)("PocketProvider");
|
|
166225
166225
|
return true;
|
|
166226
166226
|
};
|
|
166227
166227
|
}
|
|
166228
|
-
return
|
|
166228
|
+
return request2;
|
|
166229
166229
|
}
|
|
166230
166230
|
isCommunityResource() {
|
|
166231
166231
|
return this.applicationId === defaultApplicationId;
|
|
@@ -215150,15 +215150,15 @@ var require_geturl4 = __commonJS({
|
|
|
215150
215150
|
reqOptions.agent = options.agent;
|
|
215151
215151
|
}
|
|
215152
215152
|
}
|
|
215153
|
-
const
|
|
215154
|
-
|
|
215153
|
+
const request2 = (protocol === "http" ? http_1.default : https_1.default).request(req.url, reqOptions);
|
|
215154
|
+
request2.setTimeout(req.timeout);
|
|
215155
215155
|
const body = req.body;
|
|
215156
215156
|
if (body) {
|
|
215157
|
-
|
|
215157
|
+
request2.write(Buffer.from(body));
|
|
215158
215158
|
}
|
|
215159
|
-
|
|
215159
|
+
request2.end();
|
|
215160
215160
|
return new Promise((resolve2, reject) => {
|
|
215161
|
-
|
|
215161
|
+
request2.once("response", (resp) => {
|
|
215162
215162
|
const statusCode = resp.statusCode || 0;
|
|
215163
215163
|
const statusMessage = resp.statusMessage || "";
|
|
215164
215164
|
const headers2 = Object.keys(resp.headers || {}).reduce((accum, name) => {
|
|
@@ -215198,7 +215198,7 @@ var require_geturl4 = __commonJS({
|
|
|
215198
215198
|
reject(error);
|
|
215199
215199
|
});
|
|
215200
215200
|
});
|
|
215201
|
-
|
|
215201
|
+
request2.on("error", (error) => {
|
|
215202
215202
|
reject(error);
|
|
215203
215203
|
});
|
|
215204
215204
|
});
|
|
@@ -215267,10 +215267,10 @@ var require_fetch2 = __commonJS({
|
|
|
215267
215267
|
var FetchCancelSignal3 = class {
|
|
215268
215268
|
#listeners;
|
|
215269
215269
|
#cancelled;
|
|
215270
|
-
constructor(
|
|
215270
|
+
constructor(request2) {
|
|
215271
215271
|
this.#listeners = [];
|
|
215272
215272
|
this.#cancelled = false;
|
|
215273
|
-
fetchSignals2.set(
|
|
215273
|
+
fetchSignals2.set(request2, () => {
|
|
215274
215274
|
if (this.#cancelled) {
|
|
215275
215275
|
return;
|
|
215276
215276
|
}
|
|
@@ -215903,7 +215903,7 @@ var require_fetch2 = __commonJS({
|
|
|
215903
215903
|
}
|
|
215904
215904
|
};
|
|
215905
215905
|
}
|
|
215906
|
-
constructor(statusCode, statusMessage, headers, body,
|
|
215906
|
+
constructor(statusCode, statusMessage, headers, body, request2) {
|
|
215907
215907
|
this.#statusCode = statusCode;
|
|
215908
215908
|
this.#statusMessage = statusMessage;
|
|
215909
215909
|
this.#headers = Object.keys(headers).reduce((accum, k) => {
|
|
@@ -215911,7 +215911,7 @@ var require_fetch2 = __commonJS({
|
|
|
215911
215911
|
return accum;
|
|
215912
215912
|
}, {});
|
|
215913
215913
|
this.#body = body == null ? null : new Uint8Array(body);
|
|
215914
|
-
this.#request =
|
|
215914
|
+
this.#request = request2 || null;
|
|
215915
215915
|
this.#error = { message: "" };
|
|
215916
215916
|
}
|
|
215917
215917
|
/**
|
|
@@ -228778,12 +228778,12 @@ var require_network2 = __commonJS({
|
|
|
228778
228778
|
return BigInt(comps[0] + comps[1]);
|
|
228779
228779
|
}
|
|
228780
228780
|
function getGasStationPlugin2(url) {
|
|
228781
|
-
return new plugins_network_js_1.FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider,
|
|
228782
|
-
|
|
228781
|
+
return new plugins_network_js_1.FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request2) => {
|
|
228782
|
+
request2.setHeader("User-Agent", "ethers");
|
|
228783
228783
|
let response;
|
|
228784
228784
|
try {
|
|
228785
228785
|
const [_response, _feeData] = await Promise.all([
|
|
228786
|
-
|
|
228786
|
+
request2.send(),
|
|
228787
228787
|
fetchFeeData()
|
|
228788
228788
|
]);
|
|
228789
228789
|
response = _response;
|
|
@@ -228795,7 +228795,7 @@ var require_network2 = __commonJS({
|
|
|
228795
228795
|
};
|
|
228796
228796
|
return feeData;
|
|
228797
228797
|
} catch (error) {
|
|
228798
|
-
(0, index_js_2.assert)(false, `error encountered with polygon gas station (${JSON.stringify(
|
|
228798
|
+
(0, index_js_2.assert)(false, `error encountered with polygon gas station (${JSON.stringify(request2.url)})`, "SERVER_ERROR", { request: request2, response, error });
|
|
228799
228799
|
}
|
|
228800
228800
|
});
|
|
228801
228801
|
}
|
|
@@ -229404,23 +229404,23 @@ var require_abstract_provider2 = __commonJS({
|
|
|
229404
229404
|
for (let i = 0; i < urls.length; i++) {
|
|
229405
229405
|
const url = urls[i];
|
|
229406
229406
|
const href = url.replace("{sender}", sender).replace("{data}", data);
|
|
229407
|
-
const
|
|
229407
|
+
const request2 = new index_js_6.FetchRequest(href);
|
|
229408
229408
|
if (url.indexOf("{data}") === -1) {
|
|
229409
|
-
|
|
229409
|
+
request2.body = { data, sender };
|
|
229410
229410
|
}
|
|
229411
|
-
this.emit("debug", { action: "sendCcipReadFetchRequest", request, index: i, urls });
|
|
229411
|
+
this.emit("debug", { action: "sendCcipReadFetchRequest", request: request2, index: i, urls });
|
|
229412
229412
|
let errorMessage = "unknown error";
|
|
229413
|
-
const resp = await
|
|
229413
|
+
const resp = await request2.send();
|
|
229414
229414
|
try {
|
|
229415
229415
|
const result = resp.bodyJson;
|
|
229416
229416
|
if (result.data) {
|
|
229417
|
-
this.emit("debug", { action: "receiveCcipReadFetchResult", request, result });
|
|
229417
|
+
this.emit("debug", { action: "receiveCcipReadFetchResult", request: request2, result });
|
|
229418
229418
|
return result.data;
|
|
229419
229419
|
}
|
|
229420
229420
|
if (result.message) {
|
|
229421
229421
|
errorMessage = result.message;
|
|
229422
229422
|
}
|
|
229423
|
-
this.emit("debug", { action: "receiveCcipReadFetchError", request, result });
|
|
229423
|
+
this.emit("debug", { action: "receiveCcipReadFetchError", request: request2, result });
|
|
229424
229424
|
} catch (error) {
|
|
229425
229425
|
}
|
|
229426
229426
|
(0, index_js_6.assert)(resp.statusCode < 400 || resp.statusCode >= 500, `response not found during CCIP fetch: ${errorMessage}`, "OFFCHAIN_FAULT", { reason: "404_MISSING_RESOURCE", transaction: tx, info: { url, errorMessage } });
|
|
@@ -229622,38 +229622,38 @@ var require_abstract_provider2 = __commonJS({
|
|
|
229622
229622
|
* transaction.
|
|
229623
229623
|
*/
|
|
229624
229624
|
_getTransactionRequest(_request) {
|
|
229625
|
-
const
|
|
229625
|
+
const request2 = (0, provider_js_1.copyRequest)(_request);
|
|
229626
229626
|
const promises = [];
|
|
229627
229627
|
["to", "from"].forEach((key) => {
|
|
229628
|
-
if (
|
|
229628
|
+
if (request2[key] == null) {
|
|
229629
229629
|
return;
|
|
229630
229630
|
}
|
|
229631
|
-
const addr = (0, index_js_1.resolveAddress)(
|
|
229631
|
+
const addr = (0, index_js_1.resolveAddress)(request2[key], this);
|
|
229632
229632
|
if (isPromise2(addr)) {
|
|
229633
229633
|
promises.push(async function() {
|
|
229634
|
-
|
|
229634
|
+
request2[key] = await addr;
|
|
229635
229635
|
}());
|
|
229636
229636
|
} else {
|
|
229637
|
-
|
|
229637
|
+
request2[key] = addr;
|
|
229638
229638
|
}
|
|
229639
229639
|
});
|
|
229640
|
-
if (
|
|
229641
|
-
const blockTag = this._getBlockTag(
|
|
229640
|
+
if (request2.blockTag != null) {
|
|
229641
|
+
const blockTag = this._getBlockTag(request2.blockTag);
|
|
229642
229642
|
if (isPromise2(blockTag)) {
|
|
229643
229643
|
promises.push(async function() {
|
|
229644
|
-
|
|
229644
|
+
request2.blockTag = await blockTag;
|
|
229645
229645
|
}());
|
|
229646
229646
|
} else {
|
|
229647
|
-
|
|
229647
|
+
request2.blockTag = blockTag;
|
|
229648
229648
|
}
|
|
229649
229649
|
}
|
|
229650
229650
|
if (promises.length) {
|
|
229651
229651
|
return async function() {
|
|
229652
229652
|
await Promise.all(promises);
|
|
229653
|
-
return
|
|
229653
|
+
return request2;
|
|
229654
229654
|
}();
|
|
229655
229655
|
}
|
|
229656
|
-
return
|
|
229656
|
+
return request2;
|
|
229657
229657
|
}
|
|
229658
229658
|
async getNetwork() {
|
|
229659
229659
|
if (this.#networkPromise == null) {
|
|
@@ -229813,13 +229813,13 @@ var require_abstract_provider2 = __commonJS({
|
|
|
229813
229813
|
return await this.#checkNetwork(this.#call(tx, blockTag, _tx.enableCcipRead ? 0 : -1));
|
|
229814
229814
|
}
|
|
229815
229815
|
// Account
|
|
229816
|
-
async #getAccountValue(
|
|
229816
|
+
async #getAccountValue(request2, _address, _blockTag) {
|
|
229817
229817
|
let address = this._getAddress(_address);
|
|
229818
229818
|
let blockTag = this._getBlockTag(_blockTag);
|
|
229819
229819
|
if (typeof address !== "string" || typeof blockTag !== "string") {
|
|
229820
229820
|
[address, blockTag] = await Promise.all([address, blockTag]);
|
|
229821
229821
|
}
|
|
229822
|
-
return await this.#checkNetwork(this.#perform(Object.assign(
|
|
229822
|
+
return await this.#checkNetwork(this.#perform(Object.assign(request2, { address, blockTag })));
|
|
229823
229823
|
}
|
|
229824
229824
|
async getBalance(address, blockTag) {
|
|
229825
229825
|
return (0, index_js_6.getBigInt)(await this.#getAccountValue({ method: "getBalance" }, address, blockTag), "%response");
|
|
@@ -231178,9 +231178,9 @@ var require_provider_jsonrpc2 = __commonJS({
|
|
|
231178
231178
|
}
|
|
231179
231179
|
}
|
|
231180
231180
|
}
|
|
231181
|
-
const
|
|
231182
|
-
if (
|
|
231183
|
-
return await this.send(
|
|
231181
|
+
const request2 = this.getRpcRequest(req);
|
|
231182
|
+
if (request2 != null) {
|
|
231183
|
+
return await this.send(request2.method, request2.args);
|
|
231184
231184
|
}
|
|
231185
231185
|
return super._perform(req);
|
|
231186
231186
|
}
|
|
@@ -231637,10 +231637,10 @@ var require_provider_jsonrpc2 = __commonJS({
|
|
|
231637
231637
|
return await super.send(method, params);
|
|
231638
231638
|
}
|
|
231639
231639
|
async _send(payload) {
|
|
231640
|
-
const
|
|
231641
|
-
|
|
231642
|
-
|
|
231643
|
-
const response = await
|
|
231640
|
+
const request2 = this._getConnection();
|
|
231641
|
+
request2.body = JSON.stringify(payload);
|
|
231642
|
+
request2.setHeader("content-type", "application/json");
|
|
231643
|
+
const response = await request2.send();
|
|
231644
231644
|
response.assertOk();
|
|
231645
231645
|
let resp = response.bodyJson;
|
|
231646
231646
|
if (!Array.isArray(resp)) {
|
|
@@ -231765,8 +231765,8 @@ var require_provider_ankr2 = __commonJS({
|
|
|
231765
231765
|
apiKey = defaultApiKey;
|
|
231766
231766
|
}
|
|
231767
231767
|
const options = { polling: true, staticNetwork: network };
|
|
231768
|
-
const
|
|
231769
|
-
super(
|
|
231768
|
+
const request2 = _AnkrProvider.getRequest(network, apiKey);
|
|
231769
|
+
super(request2, network, options);
|
|
231770
231770
|
(0, index_js_1.defineProperties)(this, { apiKey });
|
|
231771
231771
|
}
|
|
231772
231772
|
_getProvider(chainId) {
|
|
@@ -231784,15 +231784,15 @@ var require_provider_ankr2 = __commonJS({
|
|
|
231784
231784
|
if (apiKey == null) {
|
|
231785
231785
|
apiKey = defaultApiKey;
|
|
231786
231786
|
}
|
|
231787
|
-
const
|
|
231788
|
-
|
|
231787
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);
|
|
231788
|
+
request2.allowGzip = true;
|
|
231789
231789
|
if (apiKey === defaultApiKey) {
|
|
231790
|
-
|
|
231790
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
231791
231791
|
(0, community_js_1.showThrottleMessage)("AnkrProvider");
|
|
231792
231792
|
return true;
|
|
231793
231793
|
};
|
|
231794
231794
|
}
|
|
231795
|
-
return
|
|
231795
|
+
return request2;
|
|
231796
231796
|
}
|
|
231797
231797
|
getRpcError(payload, error) {
|
|
231798
231798
|
if (payload.method === "eth_sendRawTransaction") {
|
|
@@ -231864,8 +231864,8 @@ var require_provider_alchemy2 = __commonJS({
|
|
|
231864
231864
|
if (apiKey == null) {
|
|
231865
231865
|
apiKey = defaultApiKey;
|
|
231866
231866
|
}
|
|
231867
|
-
const
|
|
231868
|
-
super(
|
|
231867
|
+
const request2 = _AlchemyProvider.getRequest(network, apiKey);
|
|
231868
|
+
super(request2, network, { staticNetwork: network });
|
|
231869
231869
|
(0, index_js_1.defineProperties)(this, { apiKey });
|
|
231870
231870
|
}
|
|
231871
231871
|
_getProvider(chainId) {
|
|
@@ -231914,15 +231914,15 @@ var require_provider_alchemy2 = __commonJS({
|
|
|
231914
231914
|
if (apiKey == null) {
|
|
231915
231915
|
apiKey = defaultApiKey;
|
|
231916
231916
|
}
|
|
231917
|
-
const
|
|
231918
|
-
|
|
231917
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v2/${apiKey}`);
|
|
231918
|
+
request2.allowGzip = true;
|
|
231919
231919
|
if (apiKey === defaultApiKey) {
|
|
231920
|
-
|
|
231920
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
231921
231921
|
(0, community_js_1.showThrottleMessage)("alchemy");
|
|
231922
231922
|
return true;
|
|
231923
231923
|
};
|
|
231924
231924
|
}
|
|
231925
|
-
return
|
|
231925
|
+
return request2;
|
|
231926
231926
|
}
|
|
231927
231927
|
};
|
|
231928
231928
|
exports2.AlchemyProvider = AlchemyProvider2;
|
|
@@ -232088,20 +232088,20 @@ var require_provider_etherscan2 = __commonJS({
|
|
|
232088
232088
|
*
|
|
232089
232089
|
* If %%post%%, the request is made as a POST request.
|
|
232090
232090
|
*/
|
|
232091
|
-
async fetch(module3, params,
|
|
232091
|
+
async fetch(module3, params, post2) {
|
|
232092
232092
|
const id3 = nextId++;
|
|
232093
|
-
const url =
|
|
232094
|
-
const payload =
|
|
232093
|
+
const url = post2 ? this.getPostUrl() : this.getUrl(module3, params);
|
|
232094
|
+
const payload = post2 ? this.getPostData(module3, params) : null;
|
|
232095
232095
|
this.emit("debug", { action: "sendRequest", id: id3, url, payload });
|
|
232096
|
-
const
|
|
232097
|
-
|
|
232098
|
-
|
|
232096
|
+
const request2 = new index_js_4.FetchRequest(url);
|
|
232097
|
+
request2.setThrottleParams({ slotInterval: 1e3 });
|
|
232098
|
+
request2.retryFunc = (req, resp, attempt) => {
|
|
232099
232099
|
if (this.isCommunityResource()) {
|
|
232100
232100
|
(0, community_js_1.showThrottleMessage)("Etherscan");
|
|
232101
232101
|
}
|
|
232102
232102
|
return Promise.resolve(true);
|
|
232103
232103
|
};
|
|
232104
|
-
|
|
232104
|
+
request2.processFunc = async (request3, response2) => {
|
|
232105
232105
|
const result2 = response2.hasBody() ? JSON.parse((0, index_js_4.toUtf8String)(response2.body)) : {};
|
|
232106
232106
|
const throttle = (typeof result2.result === "string" ? result2.result : "").toLowerCase().indexOf("rate limit") >= 0;
|
|
232107
232107
|
if (module3 === "proxy") {
|
|
@@ -232118,29 +232118,29 @@ var require_provider_etherscan2 = __commonJS({
|
|
|
232118
232118
|
return response2;
|
|
232119
232119
|
};
|
|
232120
232120
|
if (payload) {
|
|
232121
|
-
|
|
232122
|
-
|
|
232121
|
+
request2.setHeader("content-type", "application/x-www-form-urlencoded; charset=UTF-8");
|
|
232122
|
+
request2.body = Object.keys(payload).map((k) => `${k}=${payload[k]}`).join("&");
|
|
232123
232123
|
}
|
|
232124
|
-
const response = await
|
|
232124
|
+
const response = await request2.send();
|
|
232125
232125
|
try {
|
|
232126
232126
|
response.assertOk();
|
|
232127
232127
|
} catch (error) {
|
|
232128
232128
|
this.emit("debug", { action: "receiveError", id: id3, error, reason: "assertOk" });
|
|
232129
|
-
(0, index_js_4.assert)(false, "response error", "SERVER_ERROR", { request, response });
|
|
232129
|
+
(0, index_js_4.assert)(false, "response error", "SERVER_ERROR", { request: request2, response });
|
|
232130
232130
|
}
|
|
232131
232131
|
if (!response.hasBody()) {
|
|
232132
232132
|
this.emit("debug", { action: "receiveError", id: id3, error: "missing body", reason: "null body" });
|
|
232133
|
-
(0, index_js_4.assert)(false, "missing response", "SERVER_ERROR", { request, response });
|
|
232133
|
+
(0, index_js_4.assert)(false, "missing response", "SERVER_ERROR", { request: request2, response });
|
|
232134
232134
|
}
|
|
232135
232135
|
const result = JSON.parse((0, index_js_4.toUtf8String)(response.body));
|
|
232136
232136
|
if (module3 === "proxy") {
|
|
232137
232137
|
if (result.jsonrpc != "2.0") {
|
|
232138
232138
|
this.emit("debug", { action: "receiveError", id: id3, result, reason: "invalid JSON-RPC" });
|
|
232139
|
-
(0, index_js_4.assert)(false, "invalid JSON-RPC response (missing jsonrpc='2.0')", "SERVER_ERROR", { request, response, info: { result } });
|
|
232139
|
+
(0, index_js_4.assert)(false, "invalid JSON-RPC response (missing jsonrpc='2.0')", "SERVER_ERROR", { request: request2, response, info: { result } });
|
|
232140
232140
|
}
|
|
232141
232141
|
if (result.error) {
|
|
232142
232142
|
this.emit("debug", { action: "receiveError", id: id3, result, reason: "JSON-RPC error" });
|
|
232143
|
-
(0, index_js_4.assert)(false, "error response", "SERVER_ERROR", { request, response, info: { result } });
|
|
232143
|
+
(0, index_js_4.assert)(false, "error response", "SERVER_ERROR", { request: request2, response, info: { result } });
|
|
232144
232144
|
}
|
|
232145
232145
|
this.emit("debug", { action: "receiveRequest", id: id3, result });
|
|
232146
232146
|
return result.result;
|
|
@@ -232151,7 +232151,7 @@ var require_provider_etherscan2 = __commonJS({
|
|
|
232151
232151
|
}
|
|
232152
232152
|
if (result.status != 1 || typeof result.message === "string" && !result.message.match(/^OK/)) {
|
|
232153
232153
|
this.emit("debug", { action: "receiveError", id: id3, result });
|
|
232154
|
-
(0, index_js_4.assert)(false, "error response", "SERVER_ERROR", { request, response, info: { result } });
|
|
232154
|
+
(0, index_js_4.assert)(false, "error response", "SERVER_ERROR", { request: request2, response, info: { result } });
|
|
232155
232155
|
}
|
|
232156
232156
|
this.emit("debug", { action: "receiveRequest", id: id3, result });
|
|
232157
232157
|
return result.result;
|
|
@@ -232837,8 +232837,8 @@ var require_provider_infura2 = __commonJS({
|
|
|
232837
232837
|
if (projectSecret == null) {
|
|
232838
232838
|
projectSecret = null;
|
|
232839
232839
|
}
|
|
232840
|
-
const
|
|
232841
|
-
super(
|
|
232840
|
+
const request2 = _InfuraProvider.getRequest(network, projectId, projectSecret);
|
|
232841
|
+
super(request2, network, { staticNetwork: network });
|
|
232842
232842
|
(0, index_js_1.defineProperties)(this, { projectId, projectSecret });
|
|
232843
232843
|
}
|
|
232844
232844
|
_getProvider(chainId) {
|
|
@@ -232868,18 +232868,18 @@ var require_provider_infura2 = __commonJS({
|
|
|
232868
232868
|
if (projectSecret == null) {
|
|
232869
232869
|
projectSecret = null;
|
|
232870
232870
|
}
|
|
232871
|
-
const
|
|
232872
|
-
|
|
232871
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v3/${projectId}`);
|
|
232872
|
+
request2.allowGzip = true;
|
|
232873
232873
|
if (projectSecret) {
|
|
232874
|
-
|
|
232874
|
+
request2.setCredentials("", projectSecret);
|
|
232875
232875
|
}
|
|
232876
232876
|
if (projectId === defaultProjectId) {
|
|
232877
|
-
|
|
232877
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
232878
232878
|
(0, community_js_1.showThrottleMessage)("InfuraProvider");
|
|
232879
232879
|
return true;
|
|
232880
232880
|
};
|
|
232881
232881
|
}
|
|
232882
|
-
return
|
|
232882
|
+
return request2;
|
|
232883
232883
|
}
|
|
232884
232884
|
};
|
|
232885
232885
|
exports2.InfuraProvider = InfuraProvider2;
|
|
@@ -232954,8 +232954,8 @@ var require_provider_quicknode2 = __commonJS({
|
|
|
232954
232954
|
if (token == null) {
|
|
232955
232955
|
token = defaultToken;
|
|
232956
232956
|
}
|
|
232957
|
-
const
|
|
232958
|
-
super(
|
|
232957
|
+
const request2 = _QuickNodeProvider.getRequest(network, token);
|
|
232958
|
+
super(request2, network, { staticNetwork: network });
|
|
232959
232959
|
(0, index_js_1.defineProperties)(this, { token });
|
|
232960
232960
|
}
|
|
232961
232961
|
_getProvider(chainId) {
|
|
@@ -232976,15 +232976,15 @@ var require_provider_quicknode2 = __commonJS({
|
|
|
232976
232976
|
if (token == null) {
|
|
232977
232977
|
token = defaultToken;
|
|
232978
232978
|
}
|
|
232979
|
-
const
|
|
232980
|
-
|
|
232979
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${token}`);
|
|
232980
|
+
request2.allowGzip = true;
|
|
232981
232981
|
if (token === defaultToken) {
|
|
232982
|
-
|
|
232982
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
232983
232983
|
(0, community_js_1.showThrottleMessage)("QuickNodeProvider");
|
|
232984
232984
|
return true;
|
|
232985
232985
|
};
|
|
232986
232986
|
}
|
|
232987
|
-
return
|
|
232987
|
+
return request2;
|
|
232988
232988
|
}
|
|
232989
232989
|
};
|
|
232990
232990
|
exports2.QuickNodeProvider = QuickNodeProvider2;
|
|
@@ -233885,8 +233885,8 @@ var require_provider_pocket2 = __commonJS({
|
|
|
233885
233885
|
applicationSecret = null;
|
|
233886
233886
|
}
|
|
233887
233887
|
const options = { staticNetwork: network };
|
|
233888
|
-
const
|
|
233889
|
-
super(
|
|
233888
|
+
const request2 = _PocketProvider.getRequest(network, applicationId, applicationSecret);
|
|
233889
|
+
super(request2, network, options);
|
|
233890
233890
|
(0, index_js_1.defineProperties)(this, { applicationId, applicationSecret });
|
|
233891
233891
|
}
|
|
233892
233892
|
_getProvider(chainId) {
|
|
@@ -233904,18 +233904,18 @@ var require_provider_pocket2 = __commonJS({
|
|
|
233904
233904
|
if (applicationId == null) {
|
|
233905
233905
|
applicationId = defaultApplicationId;
|
|
233906
233906
|
}
|
|
233907
|
-
const
|
|
233908
|
-
|
|
233907
|
+
const request2 = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v1/lb/${applicationId}`);
|
|
233908
|
+
request2.allowGzip = true;
|
|
233909
233909
|
if (applicationSecret) {
|
|
233910
|
-
|
|
233910
|
+
request2.setCredentials("", applicationSecret);
|
|
233911
233911
|
}
|
|
233912
233912
|
if (applicationId === defaultApplicationId) {
|
|
233913
|
-
|
|
233913
|
+
request2.retryFunc = async (request3, response, attempt) => {
|
|
233914
233914
|
(0, community_js_1.showThrottleMessage)("PocketProvider");
|
|
233915
233915
|
return true;
|
|
233916
233916
|
};
|
|
233917
233917
|
}
|
|
233918
|
-
return
|
|
233918
|
+
return request2;
|
|
233919
233919
|
}
|
|
233920
233920
|
isCommunityResource() {
|
|
233921
233921
|
return this.applicationId === defaultApplicationId;
|
|
@@ -289595,7 +289595,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289595
289595
|
function createRequest(children, responseState, rootFormatContext, progressiveChunkSize, onError2, onAllReady, onShellReady, onShellError, onFatalError) {
|
|
289596
289596
|
var pingedTasks = [];
|
|
289597
289597
|
var abortSet = /* @__PURE__ */ new Set();
|
|
289598
|
-
var
|
|
289598
|
+
var request2 = {
|
|
289599
289599
|
destination: null,
|
|
289600
289600
|
responseState,
|
|
289601
289601
|
progressiveChunkSize: progressiveChunkSize === void 0 ? DEFAULT_PROGRESSIVE_CHUNK_SIZE : progressiveChunkSize,
|
|
@@ -289617,7 +289617,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289617
289617
|
onFatalError: onFatalError === void 0 ? noop$1 : onFatalError
|
|
289618
289618
|
};
|
|
289619
289619
|
var rootSegment = createPendingSegment(
|
|
289620
|
-
|
|
289620
|
+
request2,
|
|
289621
289621
|
0,
|
|
289622
289622
|
null,
|
|
289623
289623
|
rootFormatContext,
|
|
@@ -289626,20 +289626,20 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289626
289626
|
false
|
|
289627
289627
|
);
|
|
289628
289628
|
rootSegment.parentFlushed = true;
|
|
289629
|
-
var rootTask = createTask(
|
|
289629
|
+
var rootTask = createTask(request2, children, null, rootSegment, abortSet, emptyContextObject, rootContextSnapshot, emptyTreeContext);
|
|
289630
289630
|
pingedTasks.push(rootTask);
|
|
289631
|
-
return
|
|
289631
|
+
return request2;
|
|
289632
289632
|
}
|
|
289633
|
-
function pingTask(
|
|
289634
|
-
var pingedTasks =
|
|
289633
|
+
function pingTask(request2, task) {
|
|
289634
|
+
var pingedTasks = request2.pingedTasks;
|
|
289635
289635
|
pingedTasks.push(task);
|
|
289636
289636
|
if (pingedTasks.length === 1) {
|
|
289637
289637
|
scheduleWork(function() {
|
|
289638
|
-
return performWork(
|
|
289638
|
+
return performWork(request2);
|
|
289639
289639
|
});
|
|
289640
289640
|
}
|
|
289641
289641
|
}
|
|
289642
|
-
function createSuspenseBoundary(
|
|
289642
|
+
function createSuspenseBoundary(request2, fallbackAbortableTasks) {
|
|
289643
289643
|
return {
|
|
289644
289644
|
id: UNINITIALIZED_SUSPENSE_BOUNDARY_ID,
|
|
289645
289645
|
rootSegmentID: -1,
|
|
@@ -289652,17 +289652,17 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289652
289652
|
errorDigest: null
|
|
289653
289653
|
};
|
|
289654
289654
|
}
|
|
289655
|
-
function createTask(
|
|
289656
|
-
|
|
289655
|
+
function createTask(request2, node, blockedBoundary, blockedSegment, abortSet, legacyContext, context, treeContext) {
|
|
289656
|
+
request2.allPendingTasks++;
|
|
289657
289657
|
if (blockedBoundary === null) {
|
|
289658
|
-
|
|
289658
|
+
request2.pendingRootTasks++;
|
|
289659
289659
|
} else {
|
|
289660
289660
|
blockedBoundary.pendingTasks++;
|
|
289661
289661
|
}
|
|
289662
289662
|
var task = {
|
|
289663
289663
|
node,
|
|
289664
289664
|
ping: function() {
|
|
289665
|
-
return pingTask(
|
|
289665
|
+
return pingTask(request2, task);
|
|
289666
289666
|
},
|
|
289667
289667
|
blockedBoundary,
|
|
289668
289668
|
blockedSegment,
|
|
@@ -289677,7 +289677,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289677
289677
|
abortSet.add(task);
|
|
289678
289678
|
return task;
|
|
289679
289679
|
}
|
|
289680
|
-
function createPendingSegment(
|
|
289680
|
+
function createPendingSegment(request2, index, boundary, formatContext, lastPushedText, textEmbedded) {
|
|
289681
289681
|
return {
|
|
289682
289682
|
status: PENDING,
|
|
289683
289683
|
id: -1,
|
|
@@ -289754,37 +289754,37 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289754
289754
|
boundary.errorComponentStack = errorComponentStack;
|
|
289755
289755
|
}
|
|
289756
289756
|
}
|
|
289757
|
-
function logRecoverableError(
|
|
289758
|
-
var errorDigest =
|
|
289757
|
+
function logRecoverableError(request2, error2) {
|
|
289758
|
+
var errorDigest = request2.onError(error2);
|
|
289759
289759
|
if (errorDigest != null && typeof errorDigest !== "string") {
|
|
289760
289760
|
throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + typeof errorDigest + '" instead');
|
|
289761
289761
|
}
|
|
289762
289762
|
return errorDigest;
|
|
289763
289763
|
}
|
|
289764
|
-
function fatalError(
|
|
289765
|
-
var onShellError =
|
|
289764
|
+
function fatalError(request2, error2) {
|
|
289765
|
+
var onShellError = request2.onShellError;
|
|
289766
289766
|
onShellError(error2);
|
|
289767
|
-
var onFatalError =
|
|
289767
|
+
var onFatalError = request2.onFatalError;
|
|
289768
289768
|
onFatalError(error2);
|
|
289769
|
-
if (
|
|
289770
|
-
|
|
289771
|
-
closeWithError(
|
|
289769
|
+
if (request2.destination !== null) {
|
|
289770
|
+
request2.status = CLOSED;
|
|
289771
|
+
closeWithError(request2.destination, error2);
|
|
289772
289772
|
} else {
|
|
289773
|
-
|
|
289774
|
-
|
|
289773
|
+
request2.status = CLOSING;
|
|
289774
|
+
request2.fatalError = error2;
|
|
289775
289775
|
}
|
|
289776
289776
|
}
|
|
289777
|
-
function renderSuspenseBoundary(
|
|
289777
|
+
function renderSuspenseBoundary(request2, task, props) {
|
|
289778
289778
|
pushBuiltInComponentStackInDEV(task, "Suspense");
|
|
289779
289779
|
var parentBoundary = task.blockedBoundary;
|
|
289780
289780
|
var parentSegment = task.blockedSegment;
|
|
289781
289781
|
var fallback = props.fallback;
|
|
289782
289782
|
var content = props.children;
|
|
289783
289783
|
var fallbackAbortSet = /* @__PURE__ */ new Set();
|
|
289784
|
-
var newBoundary = createSuspenseBoundary(
|
|
289784
|
+
var newBoundary = createSuspenseBoundary(request2, fallbackAbortSet);
|
|
289785
289785
|
var insertionIndex = parentSegment.chunks.length;
|
|
289786
289786
|
var boundarySegment = createPendingSegment(
|
|
289787
|
-
|
|
289787
|
+
request2,
|
|
289788
289788
|
insertionIndex,
|
|
289789
289789
|
newBoundary,
|
|
289790
289790
|
parentSegment.formatContext,
|
|
@@ -289795,7 +289795,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289795
289795
|
parentSegment.children.push(boundarySegment);
|
|
289796
289796
|
parentSegment.lastPushedText = false;
|
|
289797
289797
|
var contentRootSegment = createPendingSegment(
|
|
289798
|
-
|
|
289798
|
+
request2,
|
|
289799
289799
|
0,
|
|
289800
289800
|
null,
|
|
289801
289801
|
parentSegment.formatContext,
|
|
@@ -289807,8 +289807,8 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289807
289807
|
task.blockedBoundary = newBoundary;
|
|
289808
289808
|
task.blockedSegment = contentRootSegment;
|
|
289809
289809
|
try {
|
|
289810
|
-
renderNode(
|
|
289811
|
-
pushSegmentFinale$1(contentRootSegment.chunks,
|
|
289810
|
+
renderNode(request2, task, content);
|
|
289811
|
+
pushSegmentFinale$1(contentRootSegment.chunks, request2.responseState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded);
|
|
289812
289812
|
contentRootSegment.status = COMPLETED;
|
|
289813
289813
|
queueCompletedSegment(newBoundary, contentRootSegment);
|
|
289814
289814
|
if (newBoundary.pendingTasks === 0) {
|
|
@@ -289818,7 +289818,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289818
289818
|
} catch (error2) {
|
|
289819
289819
|
contentRootSegment.status = ERRORED;
|
|
289820
289820
|
newBoundary.forceClientRender = true;
|
|
289821
|
-
newBoundary.errorDigest = logRecoverableError(
|
|
289821
|
+
newBoundary.errorDigest = logRecoverableError(request2, error2);
|
|
289822
289822
|
{
|
|
289823
289823
|
captureBoundaryErrorDetailsDev(newBoundary, error2);
|
|
289824
289824
|
}
|
|
@@ -289826,21 +289826,21 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289826
289826
|
task.blockedBoundary = parentBoundary;
|
|
289827
289827
|
task.blockedSegment = parentSegment;
|
|
289828
289828
|
}
|
|
289829
|
-
var suspendedFallbackTask = createTask(
|
|
289829
|
+
var suspendedFallbackTask = createTask(request2, fallback, parentBoundary, boundarySegment, fallbackAbortSet, task.legacyContext, task.context, task.treeContext);
|
|
289830
289830
|
{
|
|
289831
289831
|
suspendedFallbackTask.componentStack = task.componentStack;
|
|
289832
289832
|
}
|
|
289833
|
-
|
|
289833
|
+
request2.pingedTasks.push(suspendedFallbackTask);
|
|
289834
289834
|
popComponentStackInDEV(task);
|
|
289835
289835
|
}
|
|
289836
|
-
function renderHostElement(
|
|
289836
|
+
function renderHostElement(request2, task, type, props) {
|
|
289837
289837
|
pushBuiltInComponentStackInDEV(task, type);
|
|
289838
289838
|
var segment = task.blockedSegment;
|
|
289839
|
-
var children = pushStartInstance(segment.chunks, type, props,
|
|
289839
|
+
var children = pushStartInstance(segment.chunks, type, props, request2.responseState, segment.formatContext);
|
|
289840
289840
|
segment.lastPushedText = false;
|
|
289841
289841
|
var prevContext = segment.formatContext;
|
|
289842
289842
|
segment.formatContext = getChildFormatContext(prevContext, type, props);
|
|
289843
|
-
renderNode(
|
|
289843
|
+
renderNode(request2, task, children);
|
|
289844
289844
|
segment.formatContext = prevContext;
|
|
289845
289845
|
pushEndInstance(segment.chunks, type);
|
|
289846
289846
|
segment.lastPushedText = false;
|
|
@@ -289849,13 +289849,13 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289849
289849
|
function shouldConstruct$1(Component) {
|
|
289850
289850
|
return Component.prototype && Component.prototype.isReactComponent;
|
|
289851
289851
|
}
|
|
289852
|
-
function renderWithHooks(
|
|
289852
|
+
function renderWithHooks(request2, task, Component, props, secondArg) {
|
|
289853
289853
|
var componentIdentity = {};
|
|
289854
289854
|
prepareToUseHooks(task, componentIdentity);
|
|
289855
289855
|
var result = Component(props, secondArg);
|
|
289856
289856
|
return finishHooks(Component, props, result, secondArg);
|
|
289857
289857
|
}
|
|
289858
|
-
function finishClassComponent(
|
|
289858
|
+
function finishClassComponent(request2, task, instance, Component, props) {
|
|
289859
289859
|
var nextChildren = instance.render();
|
|
289860
289860
|
{
|
|
289861
289861
|
if (instance.props !== props) {
|
|
@@ -289871,19 +289871,19 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289871
289871
|
var previousContext = task.legacyContext;
|
|
289872
289872
|
var mergedContext = processChildContext(instance, Component, previousContext, childContextTypes);
|
|
289873
289873
|
task.legacyContext = mergedContext;
|
|
289874
|
-
renderNodeDestructive(
|
|
289874
|
+
renderNodeDestructive(request2, task, nextChildren);
|
|
289875
289875
|
task.legacyContext = previousContext;
|
|
289876
289876
|
return;
|
|
289877
289877
|
}
|
|
289878
289878
|
}
|
|
289879
|
-
renderNodeDestructive(
|
|
289879
|
+
renderNodeDestructive(request2, task, nextChildren);
|
|
289880
289880
|
}
|
|
289881
|
-
function renderClassComponent(
|
|
289881
|
+
function renderClassComponent(request2, task, Component, props) {
|
|
289882
289882
|
pushClassComponentStackInDEV(task, Component);
|
|
289883
289883
|
var maskedContext = getMaskedContext(Component, task.legacyContext);
|
|
289884
289884
|
var instance = constructClassInstance(Component, props, maskedContext);
|
|
289885
289885
|
mountClassInstance(instance, Component, props, maskedContext);
|
|
289886
|
-
finishClassComponent(
|
|
289886
|
+
finishClassComponent(request2, task, instance, Component, props);
|
|
289887
289887
|
popComponentStackInDEV(task);
|
|
289888
289888
|
}
|
|
289889
289889
|
var didWarnAboutBadClass = {};
|
|
@@ -289894,7 +289894,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289894
289894
|
var didWarnAboutGenerators = false;
|
|
289895
289895
|
var didWarnAboutMaps = false;
|
|
289896
289896
|
var hasWarnedAboutUsingContextAsConsumer = false;
|
|
289897
|
-
function renderIndeterminateComponent(
|
|
289897
|
+
function renderIndeterminateComponent(request2, task, Component, props) {
|
|
289898
289898
|
var legacyContext;
|
|
289899
289899
|
{
|
|
289900
289900
|
legacyContext = getMaskedContext(Component, task.legacyContext);
|
|
@@ -289909,7 +289909,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289909
289909
|
}
|
|
289910
289910
|
}
|
|
289911
289911
|
}
|
|
289912
|
-
var value = renderWithHooks(
|
|
289912
|
+
var value = renderWithHooks(request2, task, Component, props, legacyContext);
|
|
289913
289913
|
var hasId = checkDidRenderIdHook();
|
|
289914
289914
|
{
|
|
289915
289915
|
if (typeof value === "object" && value !== null && typeof value.render === "function" && value.$$typeof === void 0) {
|
|
@@ -289933,7 +289933,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289933
289933
|
}
|
|
289934
289934
|
}
|
|
289935
289935
|
mountClassInstance(value, Component, props, legacyContext);
|
|
289936
|
-
finishClassComponent(
|
|
289936
|
+
finishClassComponent(request2, task, value, Component, props);
|
|
289937
289937
|
} else {
|
|
289938
289938
|
{
|
|
289939
289939
|
validateFunctionComponentInDev(Component);
|
|
@@ -289944,12 +289944,12 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289944
289944
|
var index = 0;
|
|
289945
289945
|
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);
|
|
289946
289946
|
try {
|
|
289947
|
-
renderNodeDestructive(
|
|
289947
|
+
renderNodeDestructive(request2, task, value);
|
|
289948
289948
|
} finally {
|
|
289949
289949
|
task.treeContext = prevTreeContext;
|
|
289950
289950
|
}
|
|
289951
289951
|
} else {
|
|
289952
|
-
renderNodeDestructive(
|
|
289952
|
+
renderNodeDestructive(request2, task, value);
|
|
289953
289953
|
}
|
|
289954
289954
|
}
|
|
289955
289955
|
popComponentStackInDEV(task);
|
|
@@ -289990,9 +289990,9 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
289990
289990
|
}
|
|
289991
289991
|
return baseProps;
|
|
289992
289992
|
}
|
|
289993
|
-
function renderForwardRef(
|
|
289993
|
+
function renderForwardRef(request2, task, type, props, ref) {
|
|
289994
289994
|
pushFunctionComponentStackInDEV(task, type.render);
|
|
289995
|
-
var children = renderWithHooks(
|
|
289995
|
+
var children = renderWithHooks(request2, task, type.render, props, ref);
|
|
289996
289996
|
var hasId = checkDidRenderIdHook();
|
|
289997
289997
|
if (hasId) {
|
|
289998
289998
|
var prevTreeContext = task.treeContext;
|
|
@@ -290000,21 +290000,21 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290000
290000
|
var index = 0;
|
|
290001
290001
|
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);
|
|
290002
290002
|
try {
|
|
290003
|
-
renderNodeDestructive(
|
|
290003
|
+
renderNodeDestructive(request2, task, children);
|
|
290004
290004
|
} finally {
|
|
290005
290005
|
task.treeContext = prevTreeContext;
|
|
290006
290006
|
}
|
|
290007
290007
|
} else {
|
|
290008
|
-
renderNodeDestructive(
|
|
290008
|
+
renderNodeDestructive(request2, task, children);
|
|
290009
290009
|
}
|
|
290010
290010
|
popComponentStackInDEV(task);
|
|
290011
290011
|
}
|
|
290012
|
-
function renderMemo(
|
|
290012
|
+
function renderMemo(request2, task, type, props, ref) {
|
|
290013
290013
|
var innerType = type.type;
|
|
290014
290014
|
var resolvedProps = resolveDefaultProps(innerType, props);
|
|
290015
|
-
renderElement(
|
|
290015
|
+
renderElement(request2, task, innerType, resolvedProps, ref);
|
|
290016
290016
|
}
|
|
290017
|
-
function renderContextConsumer(
|
|
290017
|
+
function renderContextConsumer(request2, task, context, props) {
|
|
290018
290018
|
{
|
|
290019
290019
|
if (context._context === void 0) {
|
|
290020
290020
|
if (context !== context.Consumer) {
|
|
@@ -290035,9 +290035,9 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290035
290035
|
}
|
|
290036
290036
|
var newValue = readContext(context);
|
|
290037
290037
|
var newChildren = render(newValue);
|
|
290038
|
-
renderNodeDestructive(
|
|
290038
|
+
renderNodeDestructive(request2, task, newChildren);
|
|
290039
290039
|
}
|
|
290040
|
-
function renderContextProvider(
|
|
290040
|
+
function renderContextProvider(request2, task, type, props) {
|
|
290041
290041
|
var context = type._context;
|
|
290042
290042
|
var value = props.value;
|
|
290043
290043
|
var children = props.children;
|
|
@@ -290046,7 +290046,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290046
290046
|
prevSnapshot = task.context;
|
|
290047
290047
|
}
|
|
290048
290048
|
task.context = pushProvider(context, value);
|
|
290049
|
-
renderNodeDestructive(
|
|
290049
|
+
renderNodeDestructive(request2, task, children);
|
|
290050
290050
|
task.context = popProvider(context);
|
|
290051
290051
|
{
|
|
290052
290052
|
if (prevSnapshot !== task.context) {
|
|
@@ -290054,27 +290054,27 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290054
290054
|
}
|
|
290055
290055
|
}
|
|
290056
290056
|
}
|
|
290057
|
-
function renderLazyComponent(
|
|
290057
|
+
function renderLazyComponent(request2, task, lazyComponent, props, ref) {
|
|
290058
290058
|
pushBuiltInComponentStackInDEV(task, "Lazy");
|
|
290059
290059
|
var payload = lazyComponent._payload;
|
|
290060
290060
|
var init2 = lazyComponent._init;
|
|
290061
290061
|
var Component = init2(payload);
|
|
290062
290062
|
var resolvedProps = resolveDefaultProps(Component, props);
|
|
290063
|
-
renderElement(
|
|
290063
|
+
renderElement(request2, task, Component, resolvedProps, ref);
|
|
290064
290064
|
popComponentStackInDEV(task);
|
|
290065
290065
|
}
|
|
290066
|
-
function renderElement(
|
|
290066
|
+
function renderElement(request2, task, type, props, ref) {
|
|
290067
290067
|
if (typeof type === "function") {
|
|
290068
290068
|
if (shouldConstruct$1(type)) {
|
|
290069
|
-
renderClassComponent(
|
|
290069
|
+
renderClassComponent(request2, task, type, props);
|
|
290070
290070
|
return;
|
|
290071
290071
|
} else {
|
|
290072
|
-
renderIndeterminateComponent(
|
|
290072
|
+
renderIndeterminateComponent(request2, task, type, props);
|
|
290073
290073
|
return;
|
|
290074
290074
|
}
|
|
290075
290075
|
}
|
|
290076
290076
|
if (typeof type === "string") {
|
|
290077
|
-
renderHostElement(
|
|
290077
|
+
renderHostElement(request2, task, type, props);
|
|
290078
290078
|
return;
|
|
290079
290079
|
}
|
|
290080
290080
|
switch (type) {
|
|
@@ -290083,12 +290083,12 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290083
290083
|
case REACT_STRICT_MODE_TYPE:
|
|
290084
290084
|
case REACT_PROFILER_TYPE:
|
|
290085
290085
|
case REACT_FRAGMENT_TYPE: {
|
|
290086
|
-
renderNodeDestructive(
|
|
290086
|
+
renderNodeDestructive(request2, task, props.children);
|
|
290087
290087
|
return;
|
|
290088
290088
|
}
|
|
290089
290089
|
case REACT_SUSPENSE_LIST_TYPE: {
|
|
290090
290090
|
pushBuiltInComponentStackInDEV(task, "SuspenseList");
|
|
290091
|
-
renderNodeDestructive(
|
|
290091
|
+
renderNodeDestructive(request2, task, props.children);
|
|
290092
290092
|
popComponentStackInDEV(task);
|
|
290093
290093
|
return;
|
|
290094
290094
|
}
|
|
@@ -290097,7 +290097,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290097
290097
|
}
|
|
290098
290098
|
case REACT_SUSPENSE_TYPE: {
|
|
290099
290099
|
{
|
|
290100
|
-
renderSuspenseBoundary(
|
|
290100
|
+
renderSuspenseBoundary(request2, task, props);
|
|
290101
290101
|
}
|
|
290102
290102
|
return;
|
|
290103
290103
|
}
|
|
@@ -290105,23 +290105,23 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290105
290105
|
if (typeof type === "object" && type !== null) {
|
|
290106
290106
|
switch (type.$$typeof) {
|
|
290107
290107
|
case REACT_FORWARD_REF_TYPE: {
|
|
290108
|
-
renderForwardRef(
|
|
290108
|
+
renderForwardRef(request2, task, type, props, ref);
|
|
290109
290109
|
return;
|
|
290110
290110
|
}
|
|
290111
290111
|
case REACT_MEMO_TYPE: {
|
|
290112
|
-
renderMemo(
|
|
290112
|
+
renderMemo(request2, task, type, props, ref);
|
|
290113
290113
|
return;
|
|
290114
290114
|
}
|
|
290115
290115
|
case REACT_PROVIDER_TYPE: {
|
|
290116
|
-
renderContextProvider(
|
|
290116
|
+
renderContextProvider(request2, task, type, props);
|
|
290117
290117
|
return;
|
|
290118
290118
|
}
|
|
290119
290119
|
case REACT_CONTEXT_TYPE: {
|
|
290120
|
-
renderContextConsumer(
|
|
290120
|
+
renderContextConsumer(request2, task, type, props);
|
|
290121
290121
|
return;
|
|
290122
290122
|
}
|
|
290123
290123
|
case REACT_LAZY_TYPE: {
|
|
290124
|
-
renderLazyComponent(
|
|
290124
|
+
renderLazyComponent(request2, task, type, props);
|
|
290125
290125
|
return;
|
|
290126
290126
|
}
|
|
290127
290127
|
}
|
|
@@ -290151,10 +290151,10 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290151
290151
|
}
|
|
290152
290152
|
}
|
|
290153
290153
|
}
|
|
290154
|
-
function renderNodeDestructive(
|
|
290154
|
+
function renderNodeDestructive(request2, task, node) {
|
|
290155
290155
|
{
|
|
290156
290156
|
try {
|
|
290157
|
-
return renderNodeDestructiveImpl(
|
|
290157
|
+
return renderNodeDestructiveImpl(request2, task, node);
|
|
290158
290158
|
} catch (x) {
|
|
290159
290159
|
if (typeof x === "object" && x !== null && typeof x.then === "function")
|
|
290160
290160
|
;
|
|
@@ -290165,7 +290165,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290165
290165
|
}
|
|
290166
290166
|
}
|
|
290167
290167
|
}
|
|
290168
|
-
function renderNodeDestructiveImpl(
|
|
290168
|
+
function renderNodeDestructiveImpl(request2, task, node) {
|
|
290169
290169
|
task.node = node;
|
|
290170
290170
|
if (typeof node === "object" && node !== null) {
|
|
290171
290171
|
switch (node.$$typeof) {
|
|
@@ -290174,7 +290174,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290174
290174
|
var type = element.type;
|
|
290175
290175
|
var props = element.props;
|
|
290176
290176
|
var ref = element.ref;
|
|
290177
|
-
renderElement(
|
|
290177
|
+
renderElement(request2, task, type, props, ref);
|
|
290178
290178
|
return;
|
|
290179
290179
|
}
|
|
290180
290180
|
case REACT_PORTAL_TYPE:
|
|
@@ -290194,12 +290194,12 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290194
290194
|
throw x;
|
|
290195
290195
|
}
|
|
290196
290196
|
}
|
|
290197
|
-
renderNodeDestructive(
|
|
290197
|
+
renderNodeDestructive(request2, task, resolvedNode);
|
|
290198
290198
|
return;
|
|
290199
290199
|
}
|
|
290200
290200
|
}
|
|
290201
290201
|
if (isArray2(node)) {
|
|
290202
|
-
renderChildrenArray(
|
|
290202
|
+
renderChildrenArray(request2, task, node);
|
|
290203
290203
|
return;
|
|
290204
290204
|
}
|
|
290205
290205
|
var iteratorFn = getIteratorFn(node);
|
|
@@ -290216,7 +290216,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290216
290216
|
children.push(step.value);
|
|
290217
290217
|
step = iterator.next();
|
|
290218
290218
|
} while (!step.done);
|
|
290219
|
-
renderChildrenArray(
|
|
290219
|
+
renderChildrenArray(request2, task, children);
|
|
290220
290220
|
return;
|
|
290221
290221
|
}
|
|
290222
290222
|
return;
|
|
@@ -290227,12 +290227,12 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290227
290227
|
}
|
|
290228
290228
|
if (typeof node === "string") {
|
|
290229
290229
|
var segment = task.blockedSegment;
|
|
290230
|
-
segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, node,
|
|
290230
|
+
segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, node, request2.responseState, segment.lastPushedText);
|
|
290231
290231
|
return;
|
|
290232
290232
|
}
|
|
290233
290233
|
if (typeof node === "number") {
|
|
290234
290234
|
var _segment = task.blockedSegment;
|
|
290235
|
-
_segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, "" + node,
|
|
290235
|
+
_segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, "" + node, request2.responseState, _segment.lastPushedText);
|
|
290236
290236
|
return;
|
|
290237
290237
|
}
|
|
290238
290238
|
{
|
|
@@ -290241,23 +290241,23 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290241
290241
|
}
|
|
290242
290242
|
}
|
|
290243
290243
|
}
|
|
290244
|
-
function renderChildrenArray(
|
|
290244
|
+
function renderChildrenArray(request2, task, children) {
|
|
290245
290245
|
var totalChildren = children.length;
|
|
290246
290246
|
for (var i = 0; i < totalChildren; i++) {
|
|
290247
290247
|
var prevTreeContext = task.treeContext;
|
|
290248
290248
|
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
|
|
290249
290249
|
try {
|
|
290250
|
-
renderNode(
|
|
290250
|
+
renderNode(request2, task, children[i]);
|
|
290251
290251
|
} finally {
|
|
290252
290252
|
task.treeContext = prevTreeContext;
|
|
290253
290253
|
}
|
|
290254
290254
|
}
|
|
290255
290255
|
}
|
|
290256
|
-
function spawnNewSuspendedTask(
|
|
290256
|
+
function spawnNewSuspendedTask(request2, task, x) {
|
|
290257
290257
|
var segment = task.blockedSegment;
|
|
290258
290258
|
var insertionIndex = segment.chunks.length;
|
|
290259
290259
|
var newSegment = createPendingSegment(
|
|
290260
|
-
|
|
290260
|
+
request2,
|
|
290261
290261
|
insertionIndex,
|
|
290262
290262
|
null,
|
|
290263
290263
|
segment.formatContext,
|
|
@@ -290268,7 +290268,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290268
290268
|
);
|
|
290269
290269
|
segment.children.push(newSegment);
|
|
290270
290270
|
segment.lastPushedText = false;
|
|
290271
|
-
var newTask = createTask(
|
|
290271
|
+
var newTask = createTask(request2, task.node, task.blockedBoundary, newSegment, task.abortSet, task.legacyContext, task.context, task.treeContext);
|
|
290272
290272
|
{
|
|
290273
290273
|
if (task.componentStack !== null) {
|
|
290274
290274
|
newTask.componentStack = task.componentStack.parent;
|
|
@@ -290277,7 +290277,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290277
290277
|
var ping = newTask.ping;
|
|
290278
290278
|
x.then(ping, ping);
|
|
290279
290279
|
}
|
|
290280
|
-
function renderNode(
|
|
290280
|
+
function renderNode(request2, task, node) {
|
|
290281
290281
|
var previousFormatContext = task.blockedSegment.formatContext;
|
|
290282
290282
|
var previousLegacyContext = task.legacyContext;
|
|
290283
290283
|
var previousContext = task.context;
|
|
@@ -290286,11 +290286,11 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290286
290286
|
previousComponentStack = task.componentStack;
|
|
290287
290287
|
}
|
|
290288
290288
|
try {
|
|
290289
|
-
return renderNodeDestructive(
|
|
290289
|
+
return renderNodeDestructive(request2, task, node);
|
|
290290
290290
|
} catch (x) {
|
|
290291
290291
|
resetHooksState();
|
|
290292
290292
|
if (typeof x === "object" && x !== null && typeof x.then === "function") {
|
|
290293
|
-
spawnNewSuspendedTask(
|
|
290293
|
+
spawnNewSuspendedTask(request2, task, x);
|
|
290294
290294
|
task.blockedSegment.formatContext = previousFormatContext;
|
|
290295
290295
|
task.legacyContext = previousLegacyContext;
|
|
290296
290296
|
task.context = previousContext;
|
|
@@ -290311,10 +290311,10 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290311
290311
|
}
|
|
290312
290312
|
}
|
|
290313
290313
|
}
|
|
290314
|
-
function erroredTask(
|
|
290315
|
-
var errorDigest = logRecoverableError(
|
|
290314
|
+
function erroredTask(request2, boundary, segment, error2) {
|
|
290315
|
+
var errorDigest = logRecoverableError(request2, error2);
|
|
290316
290316
|
if (boundary === null) {
|
|
290317
|
-
fatalError(
|
|
290317
|
+
fatalError(request2, error2);
|
|
290318
290318
|
} else {
|
|
290319
290319
|
boundary.pendingTasks--;
|
|
290320
290320
|
if (!boundary.forceClientRender) {
|
|
@@ -290324,33 +290324,33 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290324
290324
|
captureBoundaryErrorDetailsDev(boundary, error2);
|
|
290325
290325
|
}
|
|
290326
290326
|
if (boundary.parentFlushed) {
|
|
290327
|
-
|
|
290327
|
+
request2.clientRenderedBoundaries.push(boundary);
|
|
290328
290328
|
}
|
|
290329
290329
|
}
|
|
290330
290330
|
}
|
|
290331
|
-
|
|
290332
|
-
if (
|
|
290333
|
-
var onAllReady =
|
|
290331
|
+
request2.allPendingTasks--;
|
|
290332
|
+
if (request2.allPendingTasks === 0) {
|
|
290333
|
+
var onAllReady = request2.onAllReady;
|
|
290334
290334
|
onAllReady();
|
|
290335
290335
|
}
|
|
290336
290336
|
}
|
|
290337
290337
|
function abortTaskSoft(task) {
|
|
290338
|
-
var
|
|
290338
|
+
var request2 = this;
|
|
290339
290339
|
var boundary = task.blockedBoundary;
|
|
290340
290340
|
var segment = task.blockedSegment;
|
|
290341
290341
|
segment.status = ABORTED;
|
|
290342
|
-
finishedTask(
|
|
290342
|
+
finishedTask(request2, boundary, segment);
|
|
290343
290343
|
}
|
|
290344
|
-
function abortTask(task,
|
|
290344
|
+
function abortTask(task, request2, reason) {
|
|
290345
290345
|
var boundary = task.blockedBoundary;
|
|
290346
290346
|
var segment = task.blockedSegment;
|
|
290347
290347
|
segment.status = ABORTED;
|
|
290348
290348
|
if (boundary === null) {
|
|
290349
|
-
|
|
290350
|
-
if (
|
|
290351
|
-
|
|
290352
|
-
if (
|
|
290353
|
-
close(
|
|
290349
|
+
request2.allPendingTasks--;
|
|
290350
|
+
if (request2.status !== CLOSED) {
|
|
290351
|
+
request2.status = CLOSED;
|
|
290352
|
+
if (request2.destination !== null) {
|
|
290353
|
+
close(request2.destination);
|
|
290354
290354
|
}
|
|
290355
290355
|
}
|
|
290356
290356
|
} else {
|
|
@@ -290358,7 +290358,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290358
290358
|
if (!boundary.forceClientRender) {
|
|
290359
290359
|
boundary.forceClientRender = true;
|
|
290360
290360
|
var _error = reason === void 0 ? new Error("The render was aborted by the server without a reason.") : reason;
|
|
290361
|
-
boundary.errorDigest =
|
|
290361
|
+
boundary.errorDigest = request2.onError(_error);
|
|
290362
290362
|
{
|
|
290363
290363
|
var errorPrefix = "The server did not finish this Suspense boundary: ";
|
|
290364
290364
|
if (_error && typeof _error.message === "string") {
|
|
@@ -290375,16 +290375,16 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290375
290375
|
}
|
|
290376
290376
|
}
|
|
290377
290377
|
if (boundary.parentFlushed) {
|
|
290378
|
-
|
|
290378
|
+
request2.clientRenderedBoundaries.push(boundary);
|
|
290379
290379
|
}
|
|
290380
290380
|
}
|
|
290381
290381
|
boundary.fallbackAbortableTasks.forEach(function(fallbackTask) {
|
|
290382
|
-
return abortTask(fallbackTask,
|
|
290382
|
+
return abortTask(fallbackTask, request2, reason);
|
|
290383
290383
|
});
|
|
290384
290384
|
boundary.fallbackAbortableTasks.clear();
|
|
290385
|
-
|
|
290386
|
-
if (
|
|
290387
|
-
var onAllReady =
|
|
290385
|
+
request2.allPendingTasks--;
|
|
290386
|
+
if (request2.allPendingTasks === 0) {
|
|
290387
|
+
var onAllReady = request2.onAllReady;
|
|
290388
290388
|
onAllReady();
|
|
290389
290389
|
}
|
|
290390
290390
|
}
|
|
@@ -290402,18 +290402,18 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290402
290402
|
completedSegments.push(segment);
|
|
290403
290403
|
}
|
|
290404
290404
|
}
|
|
290405
|
-
function finishedTask(
|
|
290405
|
+
function finishedTask(request2, boundary, segment) {
|
|
290406
290406
|
if (boundary === null) {
|
|
290407
290407
|
if (segment.parentFlushed) {
|
|
290408
|
-
if (
|
|
290408
|
+
if (request2.completedRootSegment !== null) {
|
|
290409
290409
|
throw new Error("There can only be one root segment. This is a bug in React.");
|
|
290410
290410
|
}
|
|
290411
|
-
|
|
290411
|
+
request2.completedRootSegment = segment;
|
|
290412
290412
|
}
|
|
290413
|
-
|
|
290414
|
-
if (
|
|
290415
|
-
|
|
290416
|
-
var onShellReady =
|
|
290413
|
+
request2.pendingRootTasks--;
|
|
290414
|
+
if (request2.pendingRootTasks === 0) {
|
|
290415
|
+
request2.onShellError = noop$1;
|
|
290416
|
+
var onShellReady = request2.onShellReady;
|
|
290417
290417
|
onShellReady();
|
|
290418
290418
|
}
|
|
290419
290419
|
} else {
|
|
@@ -290427,9 +290427,9 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290427
290427
|
}
|
|
290428
290428
|
}
|
|
290429
290429
|
if (boundary.parentFlushed) {
|
|
290430
|
-
|
|
290430
|
+
request2.completedBoundaries.push(boundary);
|
|
290431
290431
|
}
|
|
290432
|
-
boundary.fallbackAbortableTasks.forEach(abortTaskSoft,
|
|
290432
|
+
boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request2);
|
|
290433
290433
|
boundary.fallbackAbortableTasks.clear();
|
|
290434
290434
|
} else {
|
|
290435
290435
|
if (segment.parentFlushed) {
|
|
@@ -290438,20 +290438,20 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290438
290438
|
var completedSegments = boundary.completedSegments;
|
|
290439
290439
|
if (completedSegments.length === 1) {
|
|
290440
290440
|
if (boundary.parentFlushed) {
|
|
290441
|
-
|
|
290441
|
+
request2.partialBoundaries.push(boundary);
|
|
290442
290442
|
}
|
|
290443
290443
|
}
|
|
290444
290444
|
}
|
|
290445
290445
|
}
|
|
290446
290446
|
}
|
|
290447
290447
|
}
|
|
290448
|
-
|
|
290449
|
-
if (
|
|
290450
|
-
var onAllReady =
|
|
290448
|
+
request2.allPendingTasks--;
|
|
290449
|
+
if (request2.allPendingTasks === 0) {
|
|
290450
|
+
var onAllReady = request2.onAllReady;
|
|
290451
290451
|
onAllReady();
|
|
290452
290452
|
}
|
|
290453
290453
|
}
|
|
290454
|
-
function retryTask(
|
|
290454
|
+
function retryTask(request2, task) {
|
|
290455
290455
|
var segment = task.blockedSegment;
|
|
290456
290456
|
if (segment.status !== PENDING) {
|
|
290457
290457
|
return;
|
|
@@ -290463,11 +290463,11 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290463
290463
|
currentTaskInDEV = task;
|
|
290464
290464
|
}
|
|
290465
290465
|
try {
|
|
290466
|
-
renderNodeDestructive(
|
|
290467
|
-
pushSegmentFinale$1(segment.chunks,
|
|
290466
|
+
renderNodeDestructive(request2, task, task.node);
|
|
290467
|
+
pushSegmentFinale$1(segment.chunks, request2.responseState, segment.lastPushedText, segment.textEmbedded);
|
|
290468
290468
|
task.abortSet.delete(task);
|
|
290469
290469
|
segment.status = COMPLETED;
|
|
290470
|
-
finishedTask(
|
|
290470
|
+
finishedTask(request2, task.blockedBoundary, segment);
|
|
290471
290471
|
} catch (x) {
|
|
290472
290472
|
resetHooksState();
|
|
290473
290473
|
if (typeof x === "object" && x !== null && typeof x.then === "function") {
|
|
@@ -290476,7 +290476,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290476
290476
|
} else {
|
|
290477
290477
|
task.abortSet.delete(task);
|
|
290478
290478
|
segment.status = ERRORED;
|
|
290479
|
-
erroredTask(
|
|
290479
|
+
erroredTask(request2, task.blockedBoundary, segment, x);
|
|
290480
290480
|
}
|
|
290481
290481
|
} finally {
|
|
290482
290482
|
{
|
|
@@ -290484,8 +290484,8 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290484
290484
|
}
|
|
290485
290485
|
}
|
|
290486
290486
|
}
|
|
290487
|
-
function performWork(
|
|
290488
|
-
if (
|
|
290487
|
+
function performWork(request2) {
|
|
290488
|
+
if (request2.status === CLOSED) {
|
|
290489
290489
|
return;
|
|
290490
290490
|
}
|
|
290491
290491
|
var prevContext = getActiveContext();
|
|
@@ -290497,21 +290497,21 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290497
290497
|
ReactDebugCurrentFrame$1.getCurrentStack = getCurrentStackInDEV;
|
|
290498
290498
|
}
|
|
290499
290499
|
var prevResponseState = currentResponseState;
|
|
290500
|
-
setCurrentResponseState(
|
|
290500
|
+
setCurrentResponseState(request2.responseState);
|
|
290501
290501
|
try {
|
|
290502
|
-
var pingedTasks =
|
|
290502
|
+
var pingedTasks = request2.pingedTasks;
|
|
290503
290503
|
var i;
|
|
290504
290504
|
for (i = 0; i < pingedTasks.length; i++) {
|
|
290505
290505
|
var task = pingedTasks[i];
|
|
290506
|
-
retryTask(
|
|
290506
|
+
retryTask(request2, task);
|
|
290507
290507
|
}
|
|
290508
290508
|
pingedTasks.splice(0, i);
|
|
290509
|
-
if (
|
|
290510
|
-
flushCompletedQueues(
|
|
290509
|
+
if (request2.destination !== null) {
|
|
290510
|
+
flushCompletedQueues(request2, request2.destination);
|
|
290511
290511
|
}
|
|
290512
290512
|
} catch (error2) {
|
|
290513
|
-
logRecoverableError(
|
|
290514
|
-
fatalError(
|
|
290513
|
+
logRecoverableError(request2, error2);
|
|
290514
|
+
fatalError(request2, error2);
|
|
290515
290515
|
} finally {
|
|
290516
290516
|
setCurrentResponseState(prevResponseState);
|
|
290517
290517
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
@@ -290523,14 +290523,14 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290523
290523
|
}
|
|
290524
290524
|
}
|
|
290525
290525
|
}
|
|
290526
|
-
function flushSubtree(
|
|
290526
|
+
function flushSubtree(request2, destination, segment) {
|
|
290527
290527
|
segment.parentFlushed = true;
|
|
290528
290528
|
switch (segment.status) {
|
|
290529
290529
|
case PENDING: {
|
|
290530
|
-
var segmentID = segment.id =
|
|
290530
|
+
var segmentID = segment.id = request2.nextSegmentId++;
|
|
290531
290531
|
segment.lastPushedText = false;
|
|
290532
290532
|
segment.textEmbedded = false;
|
|
290533
|
-
return writePlaceholder(destination,
|
|
290533
|
+
return writePlaceholder(destination, request2.responseState, segmentID);
|
|
290534
290534
|
}
|
|
290535
290535
|
case COMPLETED: {
|
|
290536
290536
|
segment.status = FLUSHED;
|
|
@@ -290543,7 +290543,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290543
290543
|
for (; chunkIdx < nextChild.index; chunkIdx++) {
|
|
290544
290544
|
writeChunk(destination, chunks[chunkIdx]);
|
|
290545
290545
|
}
|
|
290546
|
-
r = flushSegment(
|
|
290546
|
+
r = flushSegment(request2, destination, nextChild);
|
|
290547
290547
|
}
|
|
290548
290548
|
for (; chunkIdx < chunks.length - 1; chunkIdx++) {
|
|
290549
290549
|
writeChunk(destination, chunks[chunkIdx]);
|
|
@@ -290558,66 +290558,66 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290558
290558
|
}
|
|
290559
290559
|
}
|
|
290560
290560
|
}
|
|
290561
|
-
function flushSegment(
|
|
290561
|
+
function flushSegment(request2, destination, segment) {
|
|
290562
290562
|
var boundary = segment.boundary;
|
|
290563
290563
|
if (boundary === null) {
|
|
290564
|
-
return flushSubtree(
|
|
290564
|
+
return flushSubtree(request2, destination, segment);
|
|
290565
290565
|
}
|
|
290566
290566
|
boundary.parentFlushed = true;
|
|
290567
290567
|
if (boundary.forceClientRender) {
|
|
290568
|
-
writeStartClientRenderedSuspenseBoundary$1(destination,
|
|
290569
|
-
flushSubtree(
|
|
290570
|
-
return writeEndClientRenderedSuspenseBoundary$1(destination,
|
|
290568
|
+
writeStartClientRenderedSuspenseBoundary$1(destination, request2.responseState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack);
|
|
290569
|
+
flushSubtree(request2, destination, segment);
|
|
290570
|
+
return writeEndClientRenderedSuspenseBoundary$1(destination, request2.responseState);
|
|
290571
290571
|
} else if (boundary.pendingTasks > 0) {
|
|
290572
|
-
boundary.rootSegmentID =
|
|
290572
|
+
boundary.rootSegmentID = request2.nextSegmentId++;
|
|
290573
290573
|
if (boundary.completedSegments.length > 0) {
|
|
290574
|
-
|
|
290575
|
-
}
|
|
290576
|
-
var id3 = boundary.id = assignSuspenseBoundaryID(
|
|
290577
|
-
writeStartPendingSuspenseBoundary(destination,
|
|
290578
|
-
flushSubtree(
|
|
290579
|
-
return writeEndPendingSuspenseBoundary(destination,
|
|
290580
|
-
} else if (boundary.byteSize >
|
|
290581
|
-
boundary.rootSegmentID =
|
|
290582
|
-
|
|
290583
|
-
writeStartPendingSuspenseBoundary(destination,
|
|
290584
|
-
flushSubtree(
|
|
290585
|
-
return writeEndPendingSuspenseBoundary(destination,
|
|
290574
|
+
request2.partialBoundaries.push(boundary);
|
|
290575
|
+
}
|
|
290576
|
+
var id3 = boundary.id = assignSuspenseBoundaryID(request2.responseState);
|
|
290577
|
+
writeStartPendingSuspenseBoundary(destination, request2.responseState, id3);
|
|
290578
|
+
flushSubtree(request2, destination, segment);
|
|
290579
|
+
return writeEndPendingSuspenseBoundary(destination, request2.responseState);
|
|
290580
|
+
} else if (boundary.byteSize > request2.progressiveChunkSize) {
|
|
290581
|
+
boundary.rootSegmentID = request2.nextSegmentId++;
|
|
290582
|
+
request2.completedBoundaries.push(boundary);
|
|
290583
|
+
writeStartPendingSuspenseBoundary(destination, request2.responseState, boundary.id);
|
|
290584
|
+
flushSubtree(request2, destination, segment);
|
|
290585
|
+
return writeEndPendingSuspenseBoundary(destination, request2.responseState);
|
|
290586
290586
|
} else {
|
|
290587
|
-
writeStartCompletedSuspenseBoundary$1(destination,
|
|
290587
|
+
writeStartCompletedSuspenseBoundary$1(destination, request2.responseState);
|
|
290588
290588
|
var completedSegments = boundary.completedSegments;
|
|
290589
290589
|
if (completedSegments.length !== 1) {
|
|
290590
290590
|
throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");
|
|
290591
290591
|
}
|
|
290592
290592
|
var contentSegment = completedSegments[0];
|
|
290593
|
-
flushSegment(
|
|
290594
|
-
return writeEndCompletedSuspenseBoundary$1(destination,
|
|
290593
|
+
flushSegment(request2, destination, contentSegment);
|
|
290594
|
+
return writeEndCompletedSuspenseBoundary$1(destination, request2.responseState);
|
|
290595
290595
|
}
|
|
290596
290596
|
}
|
|
290597
|
-
function flushClientRenderedBoundary(
|
|
290598
|
-
return writeClientRenderBoundaryInstruction(destination,
|
|
290597
|
+
function flushClientRenderedBoundary(request2, destination, boundary) {
|
|
290598
|
+
return writeClientRenderBoundaryInstruction(destination, request2.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack);
|
|
290599
290599
|
}
|
|
290600
|
-
function flushSegmentContainer(
|
|
290601
|
-
writeStartSegment(destination,
|
|
290602
|
-
flushSegment(
|
|
290600
|
+
function flushSegmentContainer(request2, destination, segment) {
|
|
290601
|
+
writeStartSegment(destination, request2.responseState, segment.formatContext, segment.id);
|
|
290602
|
+
flushSegment(request2, destination, segment);
|
|
290603
290603
|
return writeEndSegment(destination, segment.formatContext);
|
|
290604
290604
|
}
|
|
290605
|
-
function flushCompletedBoundary(
|
|
290605
|
+
function flushCompletedBoundary(request2, destination, boundary) {
|
|
290606
290606
|
var completedSegments = boundary.completedSegments;
|
|
290607
290607
|
var i = 0;
|
|
290608
290608
|
for (; i < completedSegments.length; i++) {
|
|
290609
290609
|
var segment = completedSegments[i];
|
|
290610
|
-
flushPartiallyCompletedSegment(
|
|
290610
|
+
flushPartiallyCompletedSegment(request2, destination, boundary, segment);
|
|
290611
290611
|
}
|
|
290612
290612
|
completedSegments.length = 0;
|
|
290613
|
-
return writeCompletedBoundaryInstruction(destination,
|
|
290613
|
+
return writeCompletedBoundaryInstruction(destination, request2.responseState, boundary.id, boundary.rootSegmentID);
|
|
290614
290614
|
}
|
|
290615
|
-
function flushPartialBoundary(
|
|
290615
|
+
function flushPartialBoundary(request2, destination, boundary) {
|
|
290616
290616
|
var completedSegments = boundary.completedSegments;
|
|
290617
290617
|
var i = 0;
|
|
290618
290618
|
for (; i < completedSegments.length; i++) {
|
|
290619
290619
|
var segment = completedSegments[i];
|
|
290620
|
-
if (!flushPartiallyCompletedSegment(
|
|
290620
|
+
if (!flushPartiallyCompletedSegment(request2, destination, boundary, segment)) {
|
|
290621
290621
|
i++;
|
|
290622
290622
|
completedSegments.splice(0, i);
|
|
290623
290623
|
return false;
|
|
@@ -290626,7 +290626,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290626
290626
|
completedSegments.splice(0, i);
|
|
290627
290627
|
return true;
|
|
290628
290628
|
}
|
|
290629
|
-
function flushPartiallyCompletedSegment(
|
|
290629
|
+
function flushPartiallyCompletedSegment(request2, destination, boundary, segment) {
|
|
290630
290630
|
if (segment.status === FLUSHED) {
|
|
290631
290631
|
return true;
|
|
290632
290632
|
}
|
|
@@ -290636,37 +290636,37 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290636
290636
|
if (rootSegmentID === -1) {
|
|
290637
290637
|
throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");
|
|
290638
290638
|
}
|
|
290639
|
-
return flushSegmentContainer(
|
|
290639
|
+
return flushSegmentContainer(request2, destination, segment);
|
|
290640
290640
|
} else {
|
|
290641
|
-
flushSegmentContainer(
|
|
290642
|
-
return writeCompletedSegmentInstruction(destination,
|
|
290641
|
+
flushSegmentContainer(request2, destination, segment);
|
|
290642
|
+
return writeCompletedSegmentInstruction(destination, request2.responseState, segmentID);
|
|
290643
290643
|
}
|
|
290644
290644
|
}
|
|
290645
|
-
function flushCompletedQueues(
|
|
290645
|
+
function flushCompletedQueues(request2, destination) {
|
|
290646
290646
|
try {
|
|
290647
|
-
var completedRootSegment =
|
|
290648
|
-
if (completedRootSegment !== null &&
|
|
290649
|
-
flushSegment(
|
|
290650
|
-
|
|
290651
|
-
writeCompletedRoot(destination,
|
|
290647
|
+
var completedRootSegment = request2.completedRootSegment;
|
|
290648
|
+
if (completedRootSegment !== null && request2.pendingRootTasks === 0) {
|
|
290649
|
+
flushSegment(request2, destination, completedRootSegment);
|
|
290650
|
+
request2.completedRootSegment = null;
|
|
290651
|
+
writeCompletedRoot(destination, request2.responseState);
|
|
290652
290652
|
}
|
|
290653
|
-
var clientRenderedBoundaries =
|
|
290653
|
+
var clientRenderedBoundaries = request2.clientRenderedBoundaries;
|
|
290654
290654
|
var i;
|
|
290655
290655
|
for (i = 0; i < clientRenderedBoundaries.length; i++) {
|
|
290656
290656
|
var boundary = clientRenderedBoundaries[i];
|
|
290657
|
-
if (!flushClientRenderedBoundary(
|
|
290658
|
-
|
|
290657
|
+
if (!flushClientRenderedBoundary(request2, destination, boundary)) {
|
|
290658
|
+
request2.destination = null;
|
|
290659
290659
|
i++;
|
|
290660
290660
|
clientRenderedBoundaries.splice(0, i);
|
|
290661
290661
|
return;
|
|
290662
290662
|
}
|
|
290663
290663
|
}
|
|
290664
290664
|
clientRenderedBoundaries.splice(0, i);
|
|
290665
|
-
var completedBoundaries =
|
|
290665
|
+
var completedBoundaries = request2.completedBoundaries;
|
|
290666
290666
|
for (i = 0; i < completedBoundaries.length; i++) {
|
|
290667
290667
|
var _boundary = completedBoundaries[i];
|
|
290668
|
-
if (!flushCompletedBoundary(
|
|
290669
|
-
|
|
290668
|
+
if (!flushCompletedBoundary(request2, destination, _boundary)) {
|
|
290669
|
+
request2.destination = null;
|
|
290670
290670
|
i++;
|
|
290671
290671
|
completedBoundaries.splice(0, i);
|
|
290672
290672
|
return;
|
|
@@ -290675,22 +290675,22 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290675
290675
|
completedBoundaries.splice(0, i);
|
|
290676
290676
|
completeWriting(destination);
|
|
290677
290677
|
beginWriting(destination);
|
|
290678
|
-
var partialBoundaries =
|
|
290678
|
+
var partialBoundaries = request2.partialBoundaries;
|
|
290679
290679
|
for (i = 0; i < partialBoundaries.length; i++) {
|
|
290680
290680
|
var _boundary2 = partialBoundaries[i];
|
|
290681
|
-
if (!flushPartialBoundary(
|
|
290682
|
-
|
|
290681
|
+
if (!flushPartialBoundary(request2, destination, _boundary2)) {
|
|
290682
|
+
request2.destination = null;
|
|
290683
290683
|
i++;
|
|
290684
290684
|
partialBoundaries.splice(0, i);
|
|
290685
290685
|
return;
|
|
290686
290686
|
}
|
|
290687
290687
|
}
|
|
290688
290688
|
partialBoundaries.splice(0, i);
|
|
290689
|
-
var largeBoundaries =
|
|
290689
|
+
var largeBoundaries = request2.completedBoundaries;
|
|
290690
290690
|
for (i = 0; i < largeBoundaries.length; i++) {
|
|
290691
290691
|
var _boundary3 = largeBoundaries[i];
|
|
290692
|
-
if (!flushCompletedBoundary(
|
|
290693
|
-
|
|
290692
|
+
if (!flushCompletedBoundary(request2, destination, _boundary3)) {
|
|
290693
|
+
request2.destination = null;
|
|
290694
290694
|
i++;
|
|
290695
290695
|
largeBoundaries.splice(0, i);
|
|
290696
290696
|
return;
|
|
@@ -290698,9 +290698,9 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290698
290698
|
}
|
|
290699
290699
|
largeBoundaries.splice(0, i);
|
|
290700
290700
|
} finally {
|
|
290701
|
-
if (
|
|
290701
|
+
if (request2.allPendingTasks === 0 && request2.pingedTasks.length === 0 && request2.clientRenderedBoundaries.length === 0 && request2.completedBoundaries.length === 0) {
|
|
290702
290702
|
{
|
|
290703
|
-
if (
|
|
290703
|
+
if (request2.abortableTasks.size !== 0) {
|
|
290704
290704
|
error("There was still abortable task at the root when we closed. This is a bug in React.");
|
|
290705
290705
|
}
|
|
290706
290706
|
}
|
|
@@ -290708,44 +290708,44 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290708
290708
|
}
|
|
290709
290709
|
}
|
|
290710
290710
|
}
|
|
290711
|
-
function startWork(
|
|
290711
|
+
function startWork(request2) {
|
|
290712
290712
|
scheduleWork(function() {
|
|
290713
|
-
return performWork(
|
|
290713
|
+
return performWork(request2);
|
|
290714
290714
|
});
|
|
290715
290715
|
}
|
|
290716
|
-
function startFlowing(
|
|
290717
|
-
if (
|
|
290718
|
-
|
|
290719
|
-
closeWithError(destination,
|
|
290716
|
+
function startFlowing(request2, destination) {
|
|
290717
|
+
if (request2.status === CLOSING) {
|
|
290718
|
+
request2.status = CLOSED;
|
|
290719
|
+
closeWithError(destination, request2.fatalError);
|
|
290720
290720
|
return;
|
|
290721
290721
|
}
|
|
290722
|
-
if (
|
|
290722
|
+
if (request2.status === CLOSED) {
|
|
290723
290723
|
return;
|
|
290724
290724
|
}
|
|
290725
|
-
if (
|
|
290725
|
+
if (request2.destination !== null) {
|
|
290726
290726
|
return;
|
|
290727
290727
|
}
|
|
290728
|
-
|
|
290728
|
+
request2.destination = destination;
|
|
290729
290729
|
try {
|
|
290730
|
-
flushCompletedQueues(
|
|
290730
|
+
flushCompletedQueues(request2, destination);
|
|
290731
290731
|
} catch (error2) {
|
|
290732
|
-
logRecoverableError(
|
|
290733
|
-
fatalError(
|
|
290732
|
+
logRecoverableError(request2, error2);
|
|
290733
|
+
fatalError(request2, error2);
|
|
290734
290734
|
}
|
|
290735
290735
|
}
|
|
290736
|
-
function abort(
|
|
290736
|
+
function abort(request2, reason) {
|
|
290737
290737
|
try {
|
|
290738
|
-
var abortableTasks =
|
|
290738
|
+
var abortableTasks = request2.abortableTasks;
|
|
290739
290739
|
abortableTasks.forEach(function(task) {
|
|
290740
|
-
return abortTask(task,
|
|
290740
|
+
return abortTask(task, request2, reason);
|
|
290741
290741
|
});
|
|
290742
290742
|
abortableTasks.clear();
|
|
290743
|
-
if (
|
|
290744
|
-
flushCompletedQueues(
|
|
290743
|
+
if (request2.destination !== null) {
|
|
290744
|
+
flushCompletedQueues(request2, request2.destination);
|
|
290745
290745
|
}
|
|
290746
290746
|
} catch (error2) {
|
|
290747
|
-
logRecoverableError(
|
|
290748
|
-
fatalError(
|
|
290747
|
+
logRecoverableError(request2, error2);
|
|
290748
|
+
fatalError(request2, error2);
|
|
290749
290749
|
}
|
|
290750
290750
|
}
|
|
290751
290751
|
function onError() {
|
|
@@ -290770,10 +290770,10 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290770
290770
|
function onShellReady() {
|
|
290771
290771
|
readyToStream = true;
|
|
290772
290772
|
}
|
|
290773
|
-
var
|
|
290774
|
-
startWork(
|
|
290775
|
-
abort(
|
|
290776
|
-
startFlowing(
|
|
290773
|
+
var request2 = createRequest(children, createResponseState$1(generateStaticMarkup, options ? options.identifierPrefix : void 0), createRootFormatContext(), Infinity, onError, void 0, onShellReady, void 0, void 0);
|
|
290774
|
+
startWork(request2);
|
|
290775
|
+
abort(request2, abortReason);
|
|
290776
|
+
startFlowing(request2, destination);
|
|
290777
290777
|
if (didFatal) {
|
|
290778
290778
|
throw fatalError2;
|
|
290779
290779
|
}
|
|
@@ -290813,12 +290813,12 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
290813
290813
|
function renderToNodeStreamImpl(children, options, generateStaticMarkup) {
|
|
290814
290814
|
function onAllReady() {
|
|
290815
290815
|
destination.startedFlowing = true;
|
|
290816
|
-
startFlowing(
|
|
290816
|
+
startFlowing(request2, destination);
|
|
290817
290817
|
}
|
|
290818
290818
|
var destination = new ReactMarkupReadableStream();
|
|
290819
|
-
var
|
|
290820
|
-
destination.request =
|
|
290821
|
-
startWork(
|
|
290819
|
+
var request2 = createRequest(children, createResponseState$1(false, options ? options.identifierPrefix : void 0), createRootFormatContext(), Infinity, onError$1, onAllReady, void 0, void 0);
|
|
290820
|
+
destination.request = request2;
|
|
290821
|
+
startWork(request2);
|
|
290822
290822
|
return destination;
|
|
290823
290823
|
}
|
|
290824
290824
|
function renderToNodeStream(children, options) {
|
|
@@ -295025,7 +295025,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295025
295025
|
function createRequest(children, responseState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError) {
|
|
295026
295026
|
var pingedTasks = [];
|
|
295027
295027
|
var abortSet = /* @__PURE__ */ new Set();
|
|
295028
|
-
var
|
|
295028
|
+
var request2 = {
|
|
295029
295029
|
destination: null,
|
|
295030
295030
|
responseState,
|
|
295031
295031
|
progressiveChunkSize: progressiveChunkSize === void 0 ? DEFAULT_PROGRESSIVE_CHUNK_SIZE : progressiveChunkSize,
|
|
@@ -295047,7 +295047,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295047
295047
|
onFatalError: onFatalError === void 0 ? noop$1 : onFatalError
|
|
295048
295048
|
};
|
|
295049
295049
|
var rootSegment = createPendingSegment(
|
|
295050
|
-
|
|
295050
|
+
request2,
|
|
295051
295051
|
0,
|
|
295052
295052
|
null,
|
|
295053
295053
|
rootFormatContext,
|
|
@@ -295056,20 +295056,20 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295056
295056
|
false
|
|
295057
295057
|
);
|
|
295058
295058
|
rootSegment.parentFlushed = true;
|
|
295059
|
-
var rootTask = createTask(
|
|
295059
|
+
var rootTask = createTask(request2, children, null, rootSegment, abortSet, emptyContextObject, rootContextSnapshot, emptyTreeContext);
|
|
295060
295060
|
pingedTasks.push(rootTask);
|
|
295061
|
-
return
|
|
295061
|
+
return request2;
|
|
295062
295062
|
}
|
|
295063
|
-
function pingTask(
|
|
295064
|
-
var pingedTasks =
|
|
295063
|
+
function pingTask(request2, task) {
|
|
295064
|
+
var pingedTasks = request2.pingedTasks;
|
|
295065
295065
|
pingedTasks.push(task);
|
|
295066
295066
|
if (pingedTasks.length === 1) {
|
|
295067
295067
|
scheduleWork(function() {
|
|
295068
|
-
return performWork(
|
|
295068
|
+
return performWork(request2);
|
|
295069
295069
|
});
|
|
295070
295070
|
}
|
|
295071
295071
|
}
|
|
295072
|
-
function createSuspenseBoundary(
|
|
295072
|
+
function createSuspenseBoundary(request2, fallbackAbortableTasks) {
|
|
295073
295073
|
return {
|
|
295074
295074
|
id: UNINITIALIZED_SUSPENSE_BOUNDARY_ID,
|
|
295075
295075
|
rootSegmentID: -1,
|
|
@@ -295082,17 +295082,17 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295082
295082
|
errorDigest: null
|
|
295083
295083
|
};
|
|
295084
295084
|
}
|
|
295085
|
-
function createTask(
|
|
295086
|
-
|
|
295085
|
+
function createTask(request2, node, blockedBoundary, blockedSegment, abortSet, legacyContext, context, treeContext) {
|
|
295086
|
+
request2.allPendingTasks++;
|
|
295087
295087
|
if (blockedBoundary === null) {
|
|
295088
|
-
|
|
295088
|
+
request2.pendingRootTasks++;
|
|
295089
295089
|
} else {
|
|
295090
295090
|
blockedBoundary.pendingTasks++;
|
|
295091
295091
|
}
|
|
295092
295092
|
var task = {
|
|
295093
295093
|
node,
|
|
295094
295094
|
ping: function() {
|
|
295095
|
-
return pingTask(
|
|
295095
|
+
return pingTask(request2, task);
|
|
295096
295096
|
},
|
|
295097
295097
|
blockedBoundary,
|
|
295098
295098
|
blockedSegment,
|
|
@@ -295107,7 +295107,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295107
295107
|
abortSet.add(task);
|
|
295108
295108
|
return task;
|
|
295109
295109
|
}
|
|
295110
|
-
function createPendingSegment(
|
|
295110
|
+
function createPendingSegment(request2, index, boundary, formatContext, lastPushedText, textEmbedded) {
|
|
295111
295111
|
return {
|
|
295112
295112
|
status: PENDING,
|
|
295113
295113
|
id: -1,
|
|
@@ -295184,37 +295184,37 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295184
295184
|
boundary.errorComponentStack = errorComponentStack;
|
|
295185
295185
|
}
|
|
295186
295186
|
}
|
|
295187
|
-
function logRecoverableError(
|
|
295188
|
-
var errorDigest =
|
|
295187
|
+
function logRecoverableError(request2, error2) {
|
|
295188
|
+
var errorDigest = request2.onError(error2);
|
|
295189
295189
|
if (errorDigest != null && typeof errorDigest !== "string") {
|
|
295190
295190
|
throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + typeof errorDigest + '" instead');
|
|
295191
295191
|
}
|
|
295192
295192
|
return errorDigest;
|
|
295193
295193
|
}
|
|
295194
|
-
function fatalError(
|
|
295195
|
-
var onShellError =
|
|
295194
|
+
function fatalError(request2, error2) {
|
|
295195
|
+
var onShellError = request2.onShellError;
|
|
295196
295196
|
onShellError(error2);
|
|
295197
|
-
var onFatalError =
|
|
295197
|
+
var onFatalError = request2.onFatalError;
|
|
295198
295198
|
onFatalError(error2);
|
|
295199
|
-
if (
|
|
295200
|
-
|
|
295201
|
-
closeWithError(
|
|
295199
|
+
if (request2.destination !== null) {
|
|
295200
|
+
request2.status = CLOSED;
|
|
295201
|
+
closeWithError(request2.destination, error2);
|
|
295202
295202
|
} else {
|
|
295203
|
-
|
|
295204
|
-
|
|
295203
|
+
request2.status = CLOSING;
|
|
295204
|
+
request2.fatalError = error2;
|
|
295205
295205
|
}
|
|
295206
295206
|
}
|
|
295207
|
-
function renderSuspenseBoundary(
|
|
295207
|
+
function renderSuspenseBoundary(request2, task, props) {
|
|
295208
295208
|
pushBuiltInComponentStackInDEV(task, "Suspense");
|
|
295209
295209
|
var parentBoundary = task.blockedBoundary;
|
|
295210
295210
|
var parentSegment = task.blockedSegment;
|
|
295211
295211
|
var fallback = props.fallback;
|
|
295212
295212
|
var content = props.children;
|
|
295213
295213
|
var fallbackAbortSet = /* @__PURE__ */ new Set();
|
|
295214
|
-
var newBoundary = createSuspenseBoundary(
|
|
295214
|
+
var newBoundary = createSuspenseBoundary(request2, fallbackAbortSet);
|
|
295215
295215
|
var insertionIndex = parentSegment.chunks.length;
|
|
295216
295216
|
var boundarySegment = createPendingSegment(
|
|
295217
|
-
|
|
295217
|
+
request2,
|
|
295218
295218
|
insertionIndex,
|
|
295219
295219
|
newBoundary,
|
|
295220
295220
|
parentSegment.formatContext,
|
|
@@ -295225,7 +295225,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295225
295225
|
parentSegment.children.push(boundarySegment);
|
|
295226
295226
|
parentSegment.lastPushedText = false;
|
|
295227
295227
|
var contentRootSegment = createPendingSegment(
|
|
295228
|
-
|
|
295228
|
+
request2,
|
|
295229
295229
|
0,
|
|
295230
295230
|
null,
|
|
295231
295231
|
parentSegment.formatContext,
|
|
@@ -295237,8 +295237,8 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295237
295237
|
task.blockedBoundary = newBoundary;
|
|
295238
295238
|
task.blockedSegment = contentRootSegment;
|
|
295239
295239
|
try {
|
|
295240
|
-
renderNode(
|
|
295241
|
-
pushSegmentFinale(contentRootSegment.chunks,
|
|
295240
|
+
renderNode(request2, task, content);
|
|
295241
|
+
pushSegmentFinale(contentRootSegment.chunks, request2.responseState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded);
|
|
295242
295242
|
contentRootSegment.status = COMPLETED;
|
|
295243
295243
|
queueCompletedSegment(newBoundary, contentRootSegment);
|
|
295244
295244
|
if (newBoundary.pendingTasks === 0) {
|
|
@@ -295248,7 +295248,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295248
295248
|
} catch (error2) {
|
|
295249
295249
|
contentRootSegment.status = ERRORED;
|
|
295250
295250
|
newBoundary.forceClientRender = true;
|
|
295251
|
-
newBoundary.errorDigest = logRecoverableError(
|
|
295251
|
+
newBoundary.errorDigest = logRecoverableError(request2, error2);
|
|
295252
295252
|
{
|
|
295253
295253
|
captureBoundaryErrorDetailsDev(newBoundary, error2);
|
|
295254
295254
|
}
|
|
@@ -295256,21 +295256,21 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295256
295256
|
task.blockedBoundary = parentBoundary;
|
|
295257
295257
|
task.blockedSegment = parentSegment;
|
|
295258
295258
|
}
|
|
295259
|
-
var suspendedFallbackTask = createTask(
|
|
295259
|
+
var suspendedFallbackTask = createTask(request2, fallback, parentBoundary, boundarySegment, fallbackAbortSet, task.legacyContext, task.context, task.treeContext);
|
|
295260
295260
|
{
|
|
295261
295261
|
suspendedFallbackTask.componentStack = task.componentStack;
|
|
295262
295262
|
}
|
|
295263
|
-
|
|
295263
|
+
request2.pingedTasks.push(suspendedFallbackTask);
|
|
295264
295264
|
popComponentStackInDEV(task);
|
|
295265
295265
|
}
|
|
295266
|
-
function renderHostElement(
|
|
295266
|
+
function renderHostElement(request2, task, type, props) {
|
|
295267
295267
|
pushBuiltInComponentStackInDEV(task, type);
|
|
295268
295268
|
var segment = task.blockedSegment;
|
|
295269
|
-
var children = pushStartInstance(segment.chunks, type, props,
|
|
295269
|
+
var children = pushStartInstance(segment.chunks, type, props, request2.responseState, segment.formatContext);
|
|
295270
295270
|
segment.lastPushedText = false;
|
|
295271
295271
|
var prevContext = segment.formatContext;
|
|
295272
295272
|
segment.formatContext = getChildFormatContext(prevContext, type, props);
|
|
295273
|
-
renderNode(
|
|
295273
|
+
renderNode(request2, task, children);
|
|
295274
295274
|
segment.formatContext = prevContext;
|
|
295275
295275
|
pushEndInstance(segment.chunks, type);
|
|
295276
295276
|
segment.lastPushedText = false;
|
|
@@ -295279,13 +295279,13 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295279
295279
|
function shouldConstruct$1(Component) {
|
|
295280
295280
|
return Component.prototype && Component.prototype.isReactComponent;
|
|
295281
295281
|
}
|
|
295282
|
-
function renderWithHooks(
|
|
295282
|
+
function renderWithHooks(request2, task, Component, props, secondArg) {
|
|
295283
295283
|
var componentIdentity = {};
|
|
295284
295284
|
prepareToUseHooks(task, componentIdentity);
|
|
295285
295285
|
var result = Component(props, secondArg);
|
|
295286
295286
|
return finishHooks(Component, props, result, secondArg);
|
|
295287
295287
|
}
|
|
295288
|
-
function finishClassComponent(
|
|
295288
|
+
function finishClassComponent(request2, task, instance, Component, props) {
|
|
295289
295289
|
var nextChildren = instance.render();
|
|
295290
295290
|
{
|
|
295291
295291
|
if (instance.props !== props) {
|
|
@@ -295301,19 +295301,19 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295301
295301
|
var previousContext = task.legacyContext;
|
|
295302
295302
|
var mergedContext = processChildContext(instance, Component, previousContext, childContextTypes);
|
|
295303
295303
|
task.legacyContext = mergedContext;
|
|
295304
|
-
renderNodeDestructive(
|
|
295304
|
+
renderNodeDestructive(request2, task, nextChildren);
|
|
295305
295305
|
task.legacyContext = previousContext;
|
|
295306
295306
|
return;
|
|
295307
295307
|
}
|
|
295308
295308
|
}
|
|
295309
|
-
renderNodeDestructive(
|
|
295309
|
+
renderNodeDestructive(request2, task, nextChildren);
|
|
295310
295310
|
}
|
|
295311
|
-
function renderClassComponent(
|
|
295311
|
+
function renderClassComponent(request2, task, Component, props) {
|
|
295312
295312
|
pushClassComponentStackInDEV(task, Component);
|
|
295313
295313
|
var maskedContext = getMaskedContext(Component, task.legacyContext);
|
|
295314
295314
|
var instance = constructClassInstance(Component, props, maskedContext);
|
|
295315
295315
|
mountClassInstance(instance, Component, props, maskedContext);
|
|
295316
|
-
finishClassComponent(
|
|
295316
|
+
finishClassComponent(request2, task, instance, Component, props);
|
|
295317
295317
|
popComponentStackInDEV(task);
|
|
295318
295318
|
}
|
|
295319
295319
|
var didWarnAboutBadClass = {};
|
|
@@ -295324,7 +295324,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295324
295324
|
var didWarnAboutGenerators = false;
|
|
295325
295325
|
var didWarnAboutMaps = false;
|
|
295326
295326
|
var hasWarnedAboutUsingContextAsConsumer = false;
|
|
295327
|
-
function renderIndeterminateComponent(
|
|
295327
|
+
function renderIndeterminateComponent(request2, task, Component, props) {
|
|
295328
295328
|
var legacyContext;
|
|
295329
295329
|
{
|
|
295330
295330
|
legacyContext = getMaskedContext(Component, task.legacyContext);
|
|
@@ -295339,7 +295339,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295339
295339
|
}
|
|
295340
295340
|
}
|
|
295341
295341
|
}
|
|
295342
|
-
var value = renderWithHooks(
|
|
295342
|
+
var value = renderWithHooks(request2, task, Component, props, legacyContext);
|
|
295343
295343
|
var hasId = checkDidRenderIdHook();
|
|
295344
295344
|
{
|
|
295345
295345
|
if (typeof value === "object" && value !== null && typeof value.render === "function" && value.$$typeof === void 0) {
|
|
@@ -295363,7 +295363,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295363
295363
|
}
|
|
295364
295364
|
}
|
|
295365
295365
|
mountClassInstance(value, Component, props, legacyContext);
|
|
295366
|
-
finishClassComponent(
|
|
295366
|
+
finishClassComponent(request2, task, value, Component, props);
|
|
295367
295367
|
} else {
|
|
295368
295368
|
{
|
|
295369
295369
|
validateFunctionComponentInDev(Component);
|
|
@@ -295374,12 +295374,12 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295374
295374
|
var index = 0;
|
|
295375
295375
|
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);
|
|
295376
295376
|
try {
|
|
295377
|
-
renderNodeDestructive(
|
|
295377
|
+
renderNodeDestructive(request2, task, value);
|
|
295378
295378
|
} finally {
|
|
295379
295379
|
task.treeContext = prevTreeContext;
|
|
295380
295380
|
}
|
|
295381
295381
|
} else {
|
|
295382
|
-
renderNodeDestructive(
|
|
295382
|
+
renderNodeDestructive(request2, task, value);
|
|
295383
295383
|
}
|
|
295384
295384
|
}
|
|
295385
295385
|
popComponentStackInDEV(task);
|
|
@@ -295420,9 +295420,9 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295420
295420
|
}
|
|
295421
295421
|
return baseProps;
|
|
295422
295422
|
}
|
|
295423
|
-
function renderForwardRef(
|
|
295423
|
+
function renderForwardRef(request2, task, type, props, ref) {
|
|
295424
295424
|
pushFunctionComponentStackInDEV(task, type.render);
|
|
295425
|
-
var children = renderWithHooks(
|
|
295425
|
+
var children = renderWithHooks(request2, task, type.render, props, ref);
|
|
295426
295426
|
var hasId = checkDidRenderIdHook();
|
|
295427
295427
|
if (hasId) {
|
|
295428
295428
|
var prevTreeContext = task.treeContext;
|
|
@@ -295430,21 +295430,21 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295430
295430
|
var index = 0;
|
|
295431
295431
|
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);
|
|
295432
295432
|
try {
|
|
295433
|
-
renderNodeDestructive(
|
|
295433
|
+
renderNodeDestructive(request2, task, children);
|
|
295434
295434
|
} finally {
|
|
295435
295435
|
task.treeContext = prevTreeContext;
|
|
295436
295436
|
}
|
|
295437
295437
|
} else {
|
|
295438
|
-
renderNodeDestructive(
|
|
295438
|
+
renderNodeDestructive(request2, task, children);
|
|
295439
295439
|
}
|
|
295440
295440
|
popComponentStackInDEV(task);
|
|
295441
295441
|
}
|
|
295442
|
-
function renderMemo(
|
|
295442
|
+
function renderMemo(request2, task, type, props, ref) {
|
|
295443
295443
|
var innerType = type.type;
|
|
295444
295444
|
var resolvedProps = resolveDefaultProps(innerType, props);
|
|
295445
|
-
renderElement(
|
|
295445
|
+
renderElement(request2, task, innerType, resolvedProps, ref);
|
|
295446
295446
|
}
|
|
295447
|
-
function renderContextConsumer(
|
|
295447
|
+
function renderContextConsumer(request2, task, context, props) {
|
|
295448
295448
|
{
|
|
295449
295449
|
if (context._context === void 0) {
|
|
295450
295450
|
if (context !== context.Consumer) {
|
|
@@ -295465,9 +295465,9 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295465
295465
|
}
|
|
295466
295466
|
var newValue = readContext(context);
|
|
295467
295467
|
var newChildren = render(newValue);
|
|
295468
|
-
renderNodeDestructive(
|
|
295468
|
+
renderNodeDestructive(request2, task, newChildren);
|
|
295469
295469
|
}
|
|
295470
|
-
function renderContextProvider(
|
|
295470
|
+
function renderContextProvider(request2, task, type, props) {
|
|
295471
295471
|
var context = type._context;
|
|
295472
295472
|
var value = props.value;
|
|
295473
295473
|
var children = props.children;
|
|
@@ -295476,7 +295476,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295476
295476
|
prevSnapshot = task.context;
|
|
295477
295477
|
}
|
|
295478
295478
|
task.context = pushProvider(context, value);
|
|
295479
|
-
renderNodeDestructive(
|
|
295479
|
+
renderNodeDestructive(request2, task, children);
|
|
295480
295480
|
task.context = popProvider(context);
|
|
295481
295481
|
{
|
|
295482
295482
|
if (prevSnapshot !== task.context) {
|
|
@@ -295484,27 +295484,27 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295484
295484
|
}
|
|
295485
295485
|
}
|
|
295486
295486
|
}
|
|
295487
|
-
function renderLazyComponent(
|
|
295487
|
+
function renderLazyComponent(request2, task, lazyComponent, props, ref) {
|
|
295488
295488
|
pushBuiltInComponentStackInDEV(task, "Lazy");
|
|
295489
295489
|
var payload = lazyComponent._payload;
|
|
295490
295490
|
var init2 = lazyComponent._init;
|
|
295491
295491
|
var Component = init2(payload);
|
|
295492
295492
|
var resolvedProps = resolveDefaultProps(Component, props);
|
|
295493
|
-
renderElement(
|
|
295493
|
+
renderElement(request2, task, Component, resolvedProps, ref);
|
|
295494
295494
|
popComponentStackInDEV(task);
|
|
295495
295495
|
}
|
|
295496
|
-
function renderElement(
|
|
295496
|
+
function renderElement(request2, task, type, props, ref) {
|
|
295497
295497
|
if (typeof type === "function") {
|
|
295498
295498
|
if (shouldConstruct$1(type)) {
|
|
295499
|
-
renderClassComponent(
|
|
295499
|
+
renderClassComponent(request2, task, type, props);
|
|
295500
295500
|
return;
|
|
295501
295501
|
} else {
|
|
295502
|
-
renderIndeterminateComponent(
|
|
295502
|
+
renderIndeterminateComponent(request2, task, type, props);
|
|
295503
295503
|
return;
|
|
295504
295504
|
}
|
|
295505
295505
|
}
|
|
295506
295506
|
if (typeof type === "string") {
|
|
295507
|
-
renderHostElement(
|
|
295507
|
+
renderHostElement(request2, task, type, props);
|
|
295508
295508
|
return;
|
|
295509
295509
|
}
|
|
295510
295510
|
switch (type) {
|
|
@@ -295513,12 +295513,12 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295513
295513
|
case REACT_STRICT_MODE_TYPE:
|
|
295514
295514
|
case REACT_PROFILER_TYPE:
|
|
295515
295515
|
case REACT_FRAGMENT_TYPE: {
|
|
295516
|
-
renderNodeDestructive(
|
|
295516
|
+
renderNodeDestructive(request2, task, props.children);
|
|
295517
295517
|
return;
|
|
295518
295518
|
}
|
|
295519
295519
|
case REACT_SUSPENSE_LIST_TYPE: {
|
|
295520
295520
|
pushBuiltInComponentStackInDEV(task, "SuspenseList");
|
|
295521
|
-
renderNodeDestructive(
|
|
295521
|
+
renderNodeDestructive(request2, task, props.children);
|
|
295522
295522
|
popComponentStackInDEV(task);
|
|
295523
295523
|
return;
|
|
295524
295524
|
}
|
|
@@ -295527,7 +295527,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295527
295527
|
}
|
|
295528
295528
|
case REACT_SUSPENSE_TYPE: {
|
|
295529
295529
|
{
|
|
295530
|
-
renderSuspenseBoundary(
|
|
295530
|
+
renderSuspenseBoundary(request2, task, props);
|
|
295531
295531
|
}
|
|
295532
295532
|
return;
|
|
295533
295533
|
}
|
|
@@ -295535,23 +295535,23 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295535
295535
|
if (typeof type === "object" && type !== null) {
|
|
295536
295536
|
switch (type.$$typeof) {
|
|
295537
295537
|
case REACT_FORWARD_REF_TYPE: {
|
|
295538
|
-
renderForwardRef(
|
|
295538
|
+
renderForwardRef(request2, task, type, props, ref);
|
|
295539
295539
|
return;
|
|
295540
295540
|
}
|
|
295541
295541
|
case REACT_MEMO_TYPE: {
|
|
295542
|
-
renderMemo(
|
|
295542
|
+
renderMemo(request2, task, type, props, ref);
|
|
295543
295543
|
return;
|
|
295544
295544
|
}
|
|
295545
295545
|
case REACT_PROVIDER_TYPE: {
|
|
295546
|
-
renderContextProvider(
|
|
295546
|
+
renderContextProvider(request2, task, type, props);
|
|
295547
295547
|
return;
|
|
295548
295548
|
}
|
|
295549
295549
|
case REACT_CONTEXT_TYPE: {
|
|
295550
|
-
renderContextConsumer(
|
|
295550
|
+
renderContextConsumer(request2, task, type, props);
|
|
295551
295551
|
return;
|
|
295552
295552
|
}
|
|
295553
295553
|
case REACT_LAZY_TYPE: {
|
|
295554
|
-
renderLazyComponent(
|
|
295554
|
+
renderLazyComponent(request2, task, type, props);
|
|
295555
295555
|
return;
|
|
295556
295556
|
}
|
|
295557
295557
|
}
|
|
@@ -295581,10 +295581,10 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295581
295581
|
}
|
|
295582
295582
|
}
|
|
295583
295583
|
}
|
|
295584
|
-
function renderNodeDestructive(
|
|
295584
|
+
function renderNodeDestructive(request2, task, node) {
|
|
295585
295585
|
{
|
|
295586
295586
|
try {
|
|
295587
|
-
return renderNodeDestructiveImpl(
|
|
295587
|
+
return renderNodeDestructiveImpl(request2, task, node);
|
|
295588
295588
|
} catch (x) {
|
|
295589
295589
|
if (typeof x === "object" && x !== null && typeof x.then === "function")
|
|
295590
295590
|
;
|
|
@@ -295595,7 +295595,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295595
295595
|
}
|
|
295596
295596
|
}
|
|
295597
295597
|
}
|
|
295598
|
-
function renderNodeDestructiveImpl(
|
|
295598
|
+
function renderNodeDestructiveImpl(request2, task, node) {
|
|
295599
295599
|
task.node = node;
|
|
295600
295600
|
if (typeof node === "object" && node !== null) {
|
|
295601
295601
|
switch (node.$$typeof) {
|
|
@@ -295604,7 +295604,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295604
295604
|
var type = element.type;
|
|
295605
295605
|
var props = element.props;
|
|
295606
295606
|
var ref = element.ref;
|
|
295607
|
-
renderElement(
|
|
295607
|
+
renderElement(request2, task, type, props, ref);
|
|
295608
295608
|
return;
|
|
295609
295609
|
}
|
|
295610
295610
|
case REACT_PORTAL_TYPE:
|
|
@@ -295624,12 +295624,12 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295624
295624
|
throw x;
|
|
295625
295625
|
}
|
|
295626
295626
|
}
|
|
295627
|
-
renderNodeDestructive(
|
|
295627
|
+
renderNodeDestructive(request2, task, resolvedNode);
|
|
295628
295628
|
return;
|
|
295629
295629
|
}
|
|
295630
295630
|
}
|
|
295631
295631
|
if (isArray2(node)) {
|
|
295632
|
-
renderChildrenArray(
|
|
295632
|
+
renderChildrenArray(request2, task, node);
|
|
295633
295633
|
return;
|
|
295634
295634
|
}
|
|
295635
295635
|
var iteratorFn = getIteratorFn(node);
|
|
@@ -295646,7 +295646,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295646
295646
|
children.push(step.value);
|
|
295647
295647
|
step = iterator.next();
|
|
295648
295648
|
} while (!step.done);
|
|
295649
|
-
renderChildrenArray(
|
|
295649
|
+
renderChildrenArray(request2, task, children);
|
|
295650
295650
|
return;
|
|
295651
295651
|
}
|
|
295652
295652
|
return;
|
|
@@ -295657,12 +295657,12 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295657
295657
|
}
|
|
295658
295658
|
if (typeof node === "string") {
|
|
295659
295659
|
var segment = task.blockedSegment;
|
|
295660
|
-
segment.lastPushedText = pushTextInstance(task.blockedSegment.chunks, node,
|
|
295660
|
+
segment.lastPushedText = pushTextInstance(task.blockedSegment.chunks, node, request2.responseState, segment.lastPushedText);
|
|
295661
295661
|
return;
|
|
295662
295662
|
}
|
|
295663
295663
|
if (typeof node === "number") {
|
|
295664
295664
|
var _segment = task.blockedSegment;
|
|
295665
|
-
_segment.lastPushedText = pushTextInstance(task.blockedSegment.chunks, "" + node,
|
|
295665
|
+
_segment.lastPushedText = pushTextInstance(task.blockedSegment.chunks, "" + node, request2.responseState, _segment.lastPushedText);
|
|
295666
295666
|
return;
|
|
295667
295667
|
}
|
|
295668
295668
|
{
|
|
@@ -295671,23 +295671,23 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295671
295671
|
}
|
|
295672
295672
|
}
|
|
295673
295673
|
}
|
|
295674
|
-
function renderChildrenArray(
|
|
295674
|
+
function renderChildrenArray(request2, task, children) {
|
|
295675
295675
|
var totalChildren = children.length;
|
|
295676
295676
|
for (var i = 0; i < totalChildren; i++) {
|
|
295677
295677
|
var prevTreeContext = task.treeContext;
|
|
295678
295678
|
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
|
|
295679
295679
|
try {
|
|
295680
|
-
renderNode(
|
|
295680
|
+
renderNode(request2, task, children[i]);
|
|
295681
295681
|
} finally {
|
|
295682
295682
|
task.treeContext = prevTreeContext;
|
|
295683
295683
|
}
|
|
295684
295684
|
}
|
|
295685
295685
|
}
|
|
295686
|
-
function spawnNewSuspendedTask(
|
|
295686
|
+
function spawnNewSuspendedTask(request2, task, x) {
|
|
295687
295687
|
var segment = task.blockedSegment;
|
|
295688
295688
|
var insertionIndex = segment.chunks.length;
|
|
295689
295689
|
var newSegment = createPendingSegment(
|
|
295690
|
-
|
|
295690
|
+
request2,
|
|
295691
295691
|
insertionIndex,
|
|
295692
295692
|
null,
|
|
295693
295693
|
segment.formatContext,
|
|
@@ -295698,7 +295698,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295698
295698
|
);
|
|
295699
295699
|
segment.children.push(newSegment);
|
|
295700
295700
|
segment.lastPushedText = false;
|
|
295701
|
-
var newTask = createTask(
|
|
295701
|
+
var newTask = createTask(request2, task.node, task.blockedBoundary, newSegment, task.abortSet, task.legacyContext, task.context, task.treeContext);
|
|
295702
295702
|
{
|
|
295703
295703
|
if (task.componentStack !== null) {
|
|
295704
295704
|
newTask.componentStack = task.componentStack.parent;
|
|
@@ -295707,7 +295707,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295707
295707
|
var ping = newTask.ping;
|
|
295708
295708
|
x.then(ping, ping);
|
|
295709
295709
|
}
|
|
295710
|
-
function renderNode(
|
|
295710
|
+
function renderNode(request2, task, node) {
|
|
295711
295711
|
var previousFormatContext = task.blockedSegment.formatContext;
|
|
295712
295712
|
var previousLegacyContext = task.legacyContext;
|
|
295713
295713
|
var previousContext = task.context;
|
|
@@ -295716,11 +295716,11 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295716
295716
|
previousComponentStack = task.componentStack;
|
|
295717
295717
|
}
|
|
295718
295718
|
try {
|
|
295719
|
-
return renderNodeDestructive(
|
|
295719
|
+
return renderNodeDestructive(request2, task, node);
|
|
295720
295720
|
} catch (x) {
|
|
295721
295721
|
resetHooksState();
|
|
295722
295722
|
if (typeof x === "object" && x !== null && typeof x.then === "function") {
|
|
295723
|
-
spawnNewSuspendedTask(
|
|
295723
|
+
spawnNewSuspendedTask(request2, task, x);
|
|
295724
295724
|
task.blockedSegment.formatContext = previousFormatContext;
|
|
295725
295725
|
task.legacyContext = previousLegacyContext;
|
|
295726
295726
|
task.context = previousContext;
|
|
@@ -295741,10 +295741,10 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295741
295741
|
}
|
|
295742
295742
|
}
|
|
295743
295743
|
}
|
|
295744
|
-
function erroredTask(
|
|
295745
|
-
var errorDigest = logRecoverableError(
|
|
295744
|
+
function erroredTask(request2, boundary, segment, error2) {
|
|
295745
|
+
var errorDigest = logRecoverableError(request2, error2);
|
|
295746
295746
|
if (boundary === null) {
|
|
295747
|
-
fatalError(
|
|
295747
|
+
fatalError(request2, error2);
|
|
295748
295748
|
} else {
|
|
295749
295749
|
boundary.pendingTasks--;
|
|
295750
295750
|
if (!boundary.forceClientRender) {
|
|
@@ -295754,33 +295754,33 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295754
295754
|
captureBoundaryErrorDetailsDev(boundary, error2);
|
|
295755
295755
|
}
|
|
295756
295756
|
if (boundary.parentFlushed) {
|
|
295757
|
-
|
|
295757
|
+
request2.clientRenderedBoundaries.push(boundary);
|
|
295758
295758
|
}
|
|
295759
295759
|
}
|
|
295760
295760
|
}
|
|
295761
|
-
|
|
295762
|
-
if (
|
|
295763
|
-
var onAllReady =
|
|
295761
|
+
request2.allPendingTasks--;
|
|
295762
|
+
if (request2.allPendingTasks === 0) {
|
|
295763
|
+
var onAllReady = request2.onAllReady;
|
|
295764
295764
|
onAllReady();
|
|
295765
295765
|
}
|
|
295766
295766
|
}
|
|
295767
295767
|
function abortTaskSoft(task) {
|
|
295768
|
-
var
|
|
295768
|
+
var request2 = this;
|
|
295769
295769
|
var boundary = task.blockedBoundary;
|
|
295770
295770
|
var segment = task.blockedSegment;
|
|
295771
295771
|
segment.status = ABORTED;
|
|
295772
|
-
finishedTask(
|
|
295772
|
+
finishedTask(request2, boundary, segment);
|
|
295773
295773
|
}
|
|
295774
|
-
function abortTask(task,
|
|
295774
|
+
function abortTask(task, request2, reason) {
|
|
295775
295775
|
var boundary = task.blockedBoundary;
|
|
295776
295776
|
var segment = task.blockedSegment;
|
|
295777
295777
|
segment.status = ABORTED;
|
|
295778
295778
|
if (boundary === null) {
|
|
295779
|
-
|
|
295780
|
-
if (
|
|
295781
|
-
|
|
295782
|
-
if (
|
|
295783
|
-
close(
|
|
295779
|
+
request2.allPendingTasks--;
|
|
295780
|
+
if (request2.status !== CLOSED) {
|
|
295781
|
+
request2.status = CLOSED;
|
|
295782
|
+
if (request2.destination !== null) {
|
|
295783
|
+
close(request2.destination);
|
|
295784
295784
|
}
|
|
295785
295785
|
}
|
|
295786
295786
|
} else {
|
|
@@ -295788,7 +295788,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295788
295788
|
if (!boundary.forceClientRender) {
|
|
295789
295789
|
boundary.forceClientRender = true;
|
|
295790
295790
|
var _error = reason === void 0 ? new Error("The render was aborted by the server without a reason.") : reason;
|
|
295791
|
-
boundary.errorDigest =
|
|
295791
|
+
boundary.errorDigest = request2.onError(_error);
|
|
295792
295792
|
{
|
|
295793
295793
|
var errorPrefix = "The server did not finish this Suspense boundary: ";
|
|
295794
295794
|
if (_error && typeof _error.message === "string") {
|
|
@@ -295805,16 +295805,16 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295805
295805
|
}
|
|
295806
295806
|
}
|
|
295807
295807
|
if (boundary.parentFlushed) {
|
|
295808
|
-
|
|
295808
|
+
request2.clientRenderedBoundaries.push(boundary);
|
|
295809
295809
|
}
|
|
295810
295810
|
}
|
|
295811
295811
|
boundary.fallbackAbortableTasks.forEach(function(fallbackTask) {
|
|
295812
|
-
return abortTask(fallbackTask,
|
|
295812
|
+
return abortTask(fallbackTask, request2, reason);
|
|
295813
295813
|
});
|
|
295814
295814
|
boundary.fallbackAbortableTasks.clear();
|
|
295815
|
-
|
|
295816
|
-
if (
|
|
295817
|
-
var onAllReady =
|
|
295815
|
+
request2.allPendingTasks--;
|
|
295816
|
+
if (request2.allPendingTasks === 0) {
|
|
295817
|
+
var onAllReady = request2.onAllReady;
|
|
295818
295818
|
onAllReady();
|
|
295819
295819
|
}
|
|
295820
295820
|
}
|
|
@@ -295832,18 +295832,18 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295832
295832
|
completedSegments.push(segment);
|
|
295833
295833
|
}
|
|
295834
295834
|
}
|
|
295835
|
-
function finishedTask(
|
|
295835
|
+
function finishedTask(request2, boundary, segment) {
|
|
295836
295836
|
if (boundary === null) {
|
|
295837
295837
|
if (segment.parentFlushed) {
|
|
295838
|
-
if (
|
|
295838
|
+
if (request2.completedRootSegment !== null) {
|
|
295839
295839
|
throw new Error("There can only be one root segment. This is a bug in React.");
|
|
295840
295840
|
}
|
|
295841
|
-
|
|
295841
|
+
request2.completedRootSegment = segment;
|
|
295842
295842
|
}
|
|
295843
|
-
|
|
295844
|
-
if (
|
|
295845
|
-
|
|
295846
|
-
var onShellReady =
|
|
295843
|
+
request2.pendingRootTasks--;
|
|
295844
|
+
if (request2.pendingRootTasks === 0) {
|
|
295845
|
+
request2.onShellError = noop$1;
|
|
295846
|
+
var onShellReady = request2.onShellReady;
|
|
295847
295847
|
onShellReady();
|
|
295848
295848
|
}
|
|
295849
295849
|
} else {
|
|
@@ -295857,9 +295857,9 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295857
295857
|
}
|
|
295858
295858
|
}
|
|
295859
295859
|
if (boundary.parentFlushed) {
|
|
295860
|
-
|
|
295860
|
+
request2.completedBoundaries.push(boundary);
|
|
295861
295861
|
}
|
|
295862
|
-
boundary.fallbackAbortableTasks.forEach(abortTaskSoft,
|
|
295862
|
+
boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request2);
|
|
295863
295863
|
boundary.fallbackAbortableTasks.clear();
|
|
295864
295864
|
} else {
|
|
295865
295865
|
if (segment.parentFlushed) {
|
|
@@ -295868,20 +295868,20 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295868
295868
|
var completedSegments = boundary.completedSegments;
|
|
295869
295869
|
if (completedSegments.length === 1) {
|
|
295870
295870
|
if (boundary.parentFlushed) {
|
|
295871
|
-
|
|
295871
|
+
request2.partialBoundaries.push(boundary);
|
|
295872
295872
|
}
|
|
295873
295873
|
}
|
|
295874
295874
|
}
|
|
295875
295875
|
}
|
|
295876
295876
|
}
|
|
295877
295877
|
}
|
|
295878
|
-
|
|
295879
|
-
if (
|
|
295880
|
-
var onAllReady =
|
|
295878
|
+
request2.allPendingTasks--;
|
|
295879
|
+
if (request2.allPendingTasks === 0) {
|
|
295880
|
+
var onAllReady = request2.onAllReady;
|
|
295881
295881
|
onAllReady();
|
|
295882
295882
|
}
|
|
295883
295883
|
}
|
|
295884
|
-
function retryTask(
|
|
295884
|
+
function retryTask(request2, task) {
|
|
295885
295885
|
var segment = task.blockedSegment;
|
|
295886
295886
|
if (segment.status !== PENDING) {
|
|
295887
295887
|
return;
|
|
@@ -295893,11 +295893,11 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295893
295893
|
currentTaskInDEV = task;
|
|
295894
295894
|
}
|
|
295895
295895
|
try {
|
|
295896
|
-
renderNodeDestructive(
|
|
295897
|
-
pushSegmentFinale(segment.chunks,
|
|
295896
|
+
renderNodeDestructive(request2, task, task.node);
|
|
295897
|
+
pushSegmentFinale(segment.chunks, request2.responseState, segment.lastPushedText, segment.textEmbedded);
|
|
295898
295898
|
task.abortSet.delete(task);
|
|
295899
295899
|
segment.status = COMPLETED;
|
|
295900
|
-
finishedTask(
|
|
295900
|
+
finishedTask(request2, task.blockedBoundary, segment);
|
|
295901
295901
|
} catch (x) {
|
|
295902
295902
|
resetHooksState();
|
|
295903
295903
|
if (typeof x === "object" && x !== null && typeof x.then === "function") {
|
|
@@ -295906,7 +295906,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295906
295906
|
} else {
|
|
295907
295907
|
task.abortSet.delete(task);
|
|
295908
295908
|
segment.status = ERRORED;
|
|
295909
|
-
erroredTask(
|
|
295909
|
+
erroredTask(request2, task.blockedBoundary, segment, x);
|
|
295910
295910
|
}
|
|
295911
295911
|
} finally {
|
|
295912
295912
|
{
|
|
@@ -295914,8 +295914,8 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295914
295914
|
}
|
|
295915
295915
|
}
|
|
295916
295916
|
}
|
|
295917
|
-
function performWork(
|
|
295918
|
-
if (
|
|
295917
|
+
function performWork(request2) {
|
|
295918
|
+
if (request2.status === CLOSED) {
|
|
295919
295919
|
return;
|
|
295920
295920
|
}
|
|
295921
295921
|
var prevContext = getActiveContext();
|
|
@@ -295927,21 +295927,21 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295927
295927
|
ReactDebugCurrentFrame$1.getCurrentStack = getCurrentStackInDEV;
|
|
295928
295928
|
}
|
|
295929
295929
|
var prevResponseState = currentResponseState;
|
|
295930
|
-
setCurrentResponseState(
|
|
295930
|
+
setCurrentResponseState(request2.responseState);
|
|
295931
295931
|
try {
|
|
295932
|
-
var pingedTasks =
|
|
295932
|
+
var pingedTasks = request2.pingedTasks;
|
|
295933
295933
|
var i;
|
|
295934
295934
|
for (i = 0; i < pingedTasks.length; i++) {
|
|
295935
295935
|
var task = pingedTasks[i];
|
|
295936
|
-
retryTask(
|
|
295936
|
+
retryTask(request2, task);
|
|
295937
295937
|
}
|
|
295938
295938
|
pingedTasks.splice(0, i);
|
|
295939
|
-
if (
|
|
295940
|
-
flushCompletedQueues(
|
|
295939
|
+
if (request2.destination !== null) {
|
|
295940
|
+
flushCompletedQueues(request2, request2.destination);
|
|
295941
295941
|
}
|
|
295942
295942
|
} catch (error2) {
|
|
295943
|
-
logRecoverableError(
|
|
295944
|
-
fatalError(
|
|
295943
|
+
logRecoverableError(request2, error2);
|
|
295944
|
+
fatalError(request2, error2);
|
|
295945
295945
|
} finally {
|
|
295946
295946
|
setCurrentResponseState(prevResponseState);
|
|
295947
295947
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
@@ -295953,14 +295953,14 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295953
295953
|
}
|
|
295954
295954
|
}
|
|
295955
295955
|
}
|
|
295956
|
-
function flushSubtree(
|
|
295956
|
+
function flushSubtree(request2, destination, segment) {
|
|
295957
295957
|
segment.parentFlushed = true;
|
|
295958
295958
|
switch (segment.status) {
|
|
295959
295959
|
case PENDING: {
|
|
295960
|
-
var segmentID = segment.id =
|
|
295960
|
+
var segmentID = segment.id = request2.nextSegmentId++;
|
|
295961
295961
|
segment.lastPushedText = false;
|
|
295962
295962
|
segment.textEmbedded = false;
|
|
295963
|
-
return writePlaceholder(destination,
|
|
295963
|
+
return writePlaceholder(destination, request2.responseState, segmentID);
|
|
295964
295964
|
}
|
|
295965
295965
|
case COMPLETED: {
|
|
295966
295966
|
segment.status = FLUSHED;
|
|
@@ -295973,7 +295973,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295973
295973
|
for (; chunkIdx < nextChild.index; chunkIdx++) {
|
|
295974
295974
|
writeChunk(destination, chunks[chunkIdx]);
|
|
295975
295975
|
}
|
|
295976
|
-
r = flushSegment(
|
|
295976
|
+
r = flushSegment(request2, destination, nextChild);
|
|
295977
295977
|
}
|
|
295978
295978
|
for (; chunkIdx < chunks.length - 1; chunkIdx++) {
|
|
295979
295979
|
writeChunk(destination, chunks[chunkIdx]);
|
|
@@ -295988,66 +295988,66 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
295988
295988
|
}
|
|
295989
295989
|
}
|
|
295990
295990
|
}
|
|
295991
|
-
function flushSegment(
|
|
295991
|
+
function flushSegment(request2, destination, segment) {
|
|
295992
295992
|
var boundary = segment.boundary;
|
|
295993
295993
|
if (boundary === null) {
|
|
295994
|
-
return flushSubtree(
|
|
295994
|
+
return flushSubtree(request2, destination, segment);
|
|
295995
295995
|
}
|
|
295996
295996
|
boundary.parentFlushed = true;
|
|
295997
295997
|
if (boundary.forceClientRender) {
|
|
295998
|
-
writeStartClientRenderedSuspenseBoundary(destination,
|
|
295999
|
-
flushSubtree(
|
|
296000
|
-
return writeEndClientRenderedSuspenseBoundary(destination,
|
|
295998
|
+
writeStartClientRenderedSuspenseBoundary(destination, request2.responseState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack);
|
|
295999
|
+
flushSubtree(request2, destination, segment);
|
|
296000
|
+
return writeEndClientRenderedSuspenseBoundary(destination, request2.responseState);
|
|
296001
296001
|
} else if (boundary.pendingTasks > 0) {
|
|
296002
|
-
boundary.rootSegmentID =
|
|
296002
|
+
boundary.rootSegmentID = request2.nextSegmentId++;
|
|
296003
296003
|
if (boundary.completedSegments.length > 0) {
|
|
296004
|
-
|
|
296005
|
-
}
|
|
296006
|
-
var id3 = boundary.id = assignSuspenseBoundaryID(
|
|
296007
|
-
writeStartPendingSuspenseBoundary(destination,
|
|
296008
|
-
flushSubtree(
|
|
296009
|
-
return writeEndPendingSuspenseBoundary(destination,
|
|
296010
|
-
} else if (boundary.byteSize >
|
|
296011
|
-
boundary.rootSegmentID =
|
|
296012
|
-
|
|
296013
|
-
writeStartPendingSuspenseBoundary(destination,
|
|
296014
|
-
flushSubtree(
|
|
296015
|
-
return writeEndPendingSuspenseBoundary(destination,
|
|
296004
|
+
request2.partialBoundaries.push(boundary);
|
|
296005
|
+
}
|
|
296006
|
+
var id3 = boundary.id = assignSuspenseBoundaryID(request2.responseState);
|
|
296007
|
+
writeStartPendingSuspenseBoundary(destination, request2.responseState, id3);
|
|
296008
|
+
flushSubtree(request2, destination, segment);
|
|
296009
|
+
return writeEndPendingSuspenseBoundary(destination, request2.responseState);
|
|
296010
|
+
} else if (boundary.byteSize > request2.progressiveChunkSize) {
|
|
296011
|
+
boundary.rootSegmentID = request2.nextSegmentId++;
|
|
296012
|
+
request2.completedBoundaries.push(boundary);
|
|
296013
|
+
writeStartPendingSuspenseBoundary(destination, request2.responseState, boundary.id);
|
|
296014
|
+
flushSubtree(request2, destination, segment);
|
|
296015
|
+
return writeEndPendingSuspenseBoundary(destination, request2.responseState);
|
|
296016
296016
|
} else {
|
|
296017
|
-
writeStartCompletedSuspenseBoundary(destination,
|
|
296017
|
+
writeStartCompletedSuspenseBoundary(destination, request2.responseState);
|
|
296018
296018
|
var completedSegments = boundary.completedSegments;
|
|
296019
296019
|
if (completedSegments.length !== 1) {
|
|
296020
296020
|
throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");
|
|
296021
296021
|
}
|
|
296022
296022
|
var contentSegment = completedSegments[0];
|
|
296023
|
-
flushSegment(
|
|
296024
|
-
return writeEndCompletedSuspenseBoundary(destination,
|
|
296023
|
+
flushSegment(request2, destination, contentSegment);
|
|
296024
|
+
return writeEndCompletedSuspenseBoundary(destination, request2.responseState);
|
|
296025
296025
|
}
|
|
296026
296026
|
}
|
|
296027
|
-
function flushClientRenderedBoundary(
|
|
296028
|
-
return writeClientRenderBoundaryInstruction(destination,
|
|
296027
|
+
function flushClientRenderedBoundary(request2, destination, boundary) {
|
|
296028
|
+
return writeClientRenderBoundaryInstruction(destination, request2.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack);
|
|
296029
296029
|
}
|
|
296030
|
-
function flushSegmentContainer(
|
|
296031
|
-
writeStartSegment(destination,
|
|
296032
|
-
flushSegment(
|
|
296030
|
+
function flushSegmentContainer(request2, destination, segment) {
|
|
296031
|
+
writeStartSegment(destination, request2.responseState, segment.formatContext, segment.id);
|
|
296032
|
+
flushSegment(request2, destination, segment);
|
|
296033
296033
|
return writeEndSegment(destination, segment.formatContext);
|
|
296034
296034
|
}
|
|
296035
|
-
function flushCompletedBoundary(
|
|
296035
|
+
function flushCompletedBoundary(request2, destination, boundary) {
|
|
296036
296036
|
var completedSegments = boundary.completedSegments;
|
|
296037
296037
|
var i = 0;
|
|
296038
296038
|
for (; i < completedSegments.length; i++) {
|
|
296039
296039
|
var segment = completedSegments[i];
|
|
296040
|
-
flushPartiallyCompletedSegment(
|
|
296040
|
+
flushPartiallyCompletedSegment(request2, destination, boundary, segment);
|
|
296041
296041
|
}
|
|
296042
296042
|
completedSegments.length = 0;
|
|
296043
|
-
return writeCompletedBoundaryInstruction(destination,
|
|
296043
|
+
return writeCompletedBoundaryInstruction(destination, request2.responseState, boundary.id, boundary.rootSegmentID);
|
|
296044
296044
|
}
|
|
296045
|
-
function flushPartialBoundary(
|
|
296045
|
+
function flushPartialBoundary(request2, destination, boundary) {
|
|
296046
296046
|
var completedSegments = boundary.completedSegments;
|
|
296047
296047
|
var i = 0;
|
|
296048
296048
|
for (; i < completedSegments.length; i++) {
|
|
296049
296049
|
var segment = completedSegments[i];
|
|
296050
|
-
if (!flushPartiallyCompletedSegment(
|
|
296050
|
+
if (!flushPartiallyCompletedSegment(request2, destination, boundary, segment)) {
|
|
296051
296051
|
i++;
|
|
296052
296052
|
completedSegments.splice(0, i);
|
|
296053
296053
|
return false;
|
|
@@ -296056,7 +296056,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
296056
296056
|
completedSegments.splice(0, i);
|
|
296057
296057
|
return true;
|
|
296058
296058
|
}
|
|
296059
|
-
function flushPartiallyCompletedSegment(
|
|
296059
|
+
function flushPartiallyCompletedSegment(request2, destination, boundary, segment) {
|
|
296060
296060
|
if (segment.status === FLUSHED) {
|
|
296061
296061
|
return true;
|
|
296062
296062
|
}
|
|
@@ -296066,38 +296066,38 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
296066
296066
|
if (rootSegmentID === -1) {
|
|
296067
296067
|
throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");
|
|
296068
296068
|
}
|
|
296069
|
-
return flushSegmentContainer(
|
|
296069
|
+
return flushSegmentContainer(request2, destination, segment);
|
|
296070
296070
|
} else {
|
|
296071
|
-
flushSegmentContainer(
|
|
296072
|
-
return writeCompletedSegmentInstruction(destination,
|
|
296071
|
+
flushSegmentContainer(request2, destination, segment);
|
|
296072
|
+
return writeCompletedSegmentInstruction(destination, request2.responseState, segmentID);
|
|
296073
296073
|
}
|
|
296074
296074
|
}
|
|
296075
|
-
function flushCompletedQueues(
|
|
296075
|
+
function flushCompletedQueues(request2, destination) {
|
|
296076
296076
|
beginWriting();
|
|
296077
296077
|
try {
|
|
296078
|
-
var completedRootSegment =
|
|
296079
|
-
if (completedRootSegment !== null &&
|
|
296080
|
-
flushSegment(
|
|
296081
|
-
|
|
296082
|
-
writeCompletedRoot(destination,
|
|
296078
|
+
var completedRootSegment = request2.completedRootSegment;
|
|
296079
|
+
if (completedRootSegment !== null && request2.pendingRootTasks === 0) {
|
|
296080
|
+
flushSegment(request2, destination, completedRootSegment);
|
|
296081
|
+
request2.completedRootSegment = null;
|
|
296082
|
+
writeCompletedRoot(destination, request2.responseState);
|
|
296083
296083
|
}
|
|
296084
|
-
var clientRenderedBoundaries =
|
|
296084
|
+
var clientRenderedBoundaries = request2.clientRenderedBoundaries;
|
|
296085
296085
|
var i;
|
|
296086
296086
|
for (i = 0; i < clientRenderedBoundaries.length; i++) {
|
|
296087
296087
|
var boundary = clientRenderedBoundaries[i];
|
|
296088
|
-
if (!flushClientRenderedBoundary(
|
|
296089
|
-
|
|
296088
|
+
if (!flushClientRenderedBoundary(request2, destination, boundary)) {
|
|
296089
|
+
request2.destination = null;
|
|
296090
296090
|
i++;
|
|
296091
296091
|
clientRenderedBoundaries.splice(0, i);
|
|
296092
296092
|
return;
|
|
296093
296093
|
}
|
|
296094
296094
|
}
|
|
296095
296095
|
clientRenderedBoundaries.splice(0, i);
|
|
296096
|
-
var completedBoundaries =
|
|
296096
|
+
var completedBoundaries = request2.completedBoundaries;
|
|
296097
296097
|
for (i = 0; i < completedBoundaries.length; i++) {
|
|
296098
296098
|
var _boundary = completedBoundaries[i];
|
|
296099
|
-
if (!flushCompletedBoundary(
|
|
296100
|
-
|
|
296099
|
+
if (!flushCompletedBoundary(request2, destination, _boundary)) {
|
|
296100
|
+
request2.destination = null;
|
|
296101
296101
|
i++;
|
|
296102
296102
|
completedBoundaries.splice(0, i);
|
|
296103
296103
|
return;
|
|
@@ -296106,22 +296106,22 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
296106
296106
|
completedBoundaries.splice(0, i);
|
|
296107
296107
|
completeWriting(destination);
|
|
296108
296108
|
beginWriting(destination);
|
|
296109
|
-
var partialBoundaries =
|
|
296109
|
+
var partialBoundaries = request2.partialBoundaries;
|
|
296110
296110
|
for (i = 0; i < partialBoundaries.length; i++) {
|
|
296111
296111
|
var _boundary2 = partialBoundaries[i];
|
|
296112
|
-
if (!flushPartialBoundary(
|
|
296113
|
-
|
|
296112
|
+
if (!flushPartialBoundary(request2, destination, _boundary2)) {
|
|
296113
|
+
request2.destination = null;
|
|
296114
296114
|
i++;
|
|
296115
296115
|
partialBoundaries.splice(0, i);
|
|
296116
296116
|
return;
|
|
296117
296117
|
}
|
|
296118
296118
|
}
|
|
296119
296119
|
partialBoundaries.splice(0, i);
|
|
296120
|
-
var largeBoundaries =
|
|
296120
|
+
var largeBoundaries = request2.completedBoundaries;
|
|
296121
296121
|
for (i = 0; i < largeBoundaries.length; i++) {
|
|
296122
296122
|
var _boundary3 = largeBoundaries[i];
|
|
296123
|
-
if (!flushCompletedBoundary(
|
|
296124
|
-
|
|
296123
|
+
if (!flushCompletedBoundary(request2, destination, _boundary3)) {
|
|
296124
|
+
request2.destination = null;
|
|
296125
296125
|
i++;
|
|
296126
296126
|
largeBoundaries.splice(0, i);
|
|
296127
296127
|
return;
|
|
@@ -296131,9 +296131,9 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
296131
296131
|
} finally {
|
|
296132
296132
|
completeWriting(destination);
|
|
296133
296133
|
flushBuffered(destination);
|
|
296134
|
-
if (
|
|
296134
|
+
if (request2.allPendingTasks === 0 && request2.pingedTasks.length === 0 && request2.clientRenderedBoundaries.length === 0 && request2.completedBoundaries.length === 0) {
|
|
296135
296135
|
{
|
|
296136
|
-
if (
|
|
296136
|
+
if (request2.abortableTasks.size !== 0) {
|
|
296137
296137
|
error("There was still abortable task at the root when we closed. This is a bug in React.");
|
|
296138
296138
|
}
|
|
296139
296139
|
}
|
|
@@ -296141,85 +296141,85 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
296141
296141
|
}
|
|
296142
296142
|
}
|
|
296143
296143
|
}
|
|
296144
|
-
function startWork(
|
|
296144
|
+
function startWork(request2) {
|
|
296145
296145
|
scheduleWork(function() {
|
|
296146
|
-
return performWork(
|
|
296146
|
+
return performWork(request2);
|
|
296147
296147
|
});
|
|
296148
296148
|
}
|
|
296149
|
-
function startFlowing(
|
|
296150
|
-
if (
|
|
296151
|
-
|
|
296152
|
-
closeWithError(destination,
|
|
296149
|
+
function startFlowing(request2, destination) {
|
|
296150
|
+
if (request2.status === CLOSING) {
|
|
296151
|
+
request2.status = CLOSED;
|
|
296152
|
+
closeWithError(destination, request2.fatalError);
|
|
296153
296153
|
return;
|
|
296154
296154
|
}
|
|
296155
|
-
if (
|
|
296155
|
+
if (request2.status === CLOSED) {
|
|
296156
296156
|
return;
|
|
296157
296157
|
}
|
|
296158
|
-
if (
|
|
296158
|
+
if (request2.destination !== null) {
|
|
296159
296159
|
return;
|
|
296160
296160
|
}
|
|
296161
|
-
|
|
296161
|
+
request2.destination = destination;
|
|
296162
296162
|
try {
|
|
296163
|
-
flushCompletedQueues(
|
|
296163
|
+
flushCompletedQueues(request2, destination);
|
|
296164
296164
|
} catch (error2) {
|
|
296165
|
-
logRecoverableError(
|
|
296166
|
-
fatalError(
|
|
296165
|
+
logRecoverableError(request2, error2);
|
|
296166
|
+
fatalError(request2, error2);
|
|
296167
296167
|
}
|
|
296168
296168
|
}
|
|
296169
|
-
function abort(
|
|
296169
|
+
function abort(request2, reason) {
|
|
296170
296170
|
try {
|
|
296171
|
-
var abortableTasks =
|
|
296171
|
+
var abortableTasks = request2.abortableTasks;
|
|
296172
296172
|
abortableTasks.forEach(function(task) {
|
|
296173
|
-
return abortTask(task,
|
|
296173
|
+
return abortTask(task, request2, reason);
|
|
296174
296174
|
});
|
|
296175
296175
|
abortableTasks.clear();
|
|
296176
|
-
if (
|
|
296177
|
-
flushCompletedQueues(
|
|
296176
|
+
if (request2.destination !== null) {
|
|
296177
|
+
flushCompletedQueues(request2, request2.destination);
|
|
296178
296178
|
}
|
|
296179
296179
|
} catch (error2) {
|
|
296180
|
-
logRecoverableError(
|
|
296181
|
-
fatalError(
|
|
296180
|
+
logRecoverableError(request2, error2);
|
|
296181
|
+
fatalError(request2, error2);
|
|
296182
296182
|
}
|
|
296183
296183
|
}
|
|
296184
|
-
function createDrainHandler(destination,
|
|
296184
|
+
function createDrainHandler(destination, request2) {
|
|
296185
296185
|
return function() {
|
|
296186
|
-
return startFlowing(
|
|
296186
|
+
return startFlowing(request2, destination);
|
|
296187
296187
|
};
|
|
296188
296188
|
}
|
|
296189
|
-
function createAbortHandler(
|
|
296189
|
+
function createAbortHandler(request2, reason) {
|
|
296190
296190
|
return function() {
|
|
296191
|
-
return abort(
|
|
296191
|
+
return abort(request2, reason);
|
|
296192
296192
|
};
|
|
296193
296193
|
}
|
|
296194
296194
|
function createRequestImpl(children, options) {
|
|
296195
296195
|
return createRequest(children, createResponseState(options ? options.identifierPrefix : void 0, options ? options.nonce : void 0, options ? options.bootstrapScriptContent : void 0, options ? options.bootstrapScripts : void 0, options ? options.bootstrapModules : void 0), createRootFormatContext(options ? options.namespaceURI : void 0), options ? options.progressiveChunkSize : void 0, options ? options.onError : void 0, options ? options.onAllReady : void 0, options ? options.onShellReady : void 0, options ? options.onShellError : void 0, void 0);
|
|
296196
296196
|
}
|
|
296197
296197
|
function renderToPipeableStream(children, options) {
|
|
296198
|
-
var
|
|
296198
|
+
var request2 = createRequestImpl(children, options);
|
|
296199
296199
|
var hasStartedFlowing = false;
|
|
296200
|
-
startWork(
|
|
296200
|
+
startWork(request2);
|
|
296201
296201
|
return {
|
|
296202
296202
|
pipe: function(destination) {
|
|
296203
296203
|
if (hasStartedFlowing) {
|
|
296204
296204
|
throw new Error("React currently only supports piping to one writable stream.");
|
|
296205
296205
|
}
|
|
296206
296206
|
hasStartedFlowing = true;
|
|
296207
|
-
startFlowing(
|
|
296208
|
-
destination.on("drain", createDrainHandler(destination,
|
|
296207
|
+
startFlowing(request2, destination);
|
|
296208
|
+
destination.on("drain", createDrainHandler(destination, request2));
|
|
296209
296209
|
destination.on("error", createAbortHandler(
|
|
296210
|
-
|
|
296210
|
+
request2,
|
|
296211
296211
|
// eslint-disable-next-line react-internal/prod-error-codes
|
|
296212
296212
|
new Error("The destination stream errored while writing data.")
|
|
296213
296213
|
));
|
|
296214
296214
|
destination.on("close", createAbortHandler(
|
|
296215
|
-
|
|
296215
|
+
request2,
|
|
296216
296216
|
// eslint-disable-next-line react-internal/prod-error-codes
|
|
296217
296217
|
new Error("The destination stream closed early.")
|
|
296218
296218
|
));
|
|
296219
296219
|
return destination;
|
|
296220
296220
|
},
|
|
296221
296221
|
abort: function(reason) {
|
|
296222
|
-
abort(
|
|
296222
|
+
abort(request2, reason);
|
|
296223
296223
|
}
|
|
296224
296224
|
};
|
|
296225
296225
|
}
|
|
@@ -334099,15 +334099,15 @@ function createGetUrl(options) {
|
|
|
334099
334099
|
reqOptions.agent = options.agent;
|
|
334100
334100
|
}
|
|
334101
334101
|
}
|
|
334102
|
-
const
|
|
334103
|
-
|
|
334102
|
+
const request2 = (protocol === "http" ? http : https).request(req.url, reqOptions);
|
|
334103
|
+
request2.setTimeout(req.timeout);
|
|
334104
334104
|
const body = req.body;
|
|
334105
334105
|
if (body) {
|
|
334106
|
-
|
|
334106
|
+
request2.write(Buffer.from(body));
|
|
334107
334107
|
}
|
|
334108
|
-
|
|
334108
|
+
request2.end();
|
|
334109
334109
|
return new Promise((resolve2, reject) => {
|
|
334110
|
-
|
|
334110
|
+
request2.once("response", (resp) => {
|
|
334111
334111
|
const statusCode = resp.statusCode || 0;
|
|
334112
334112
|
const statusMessage = resp.statusMessage || "";
|
|
334113
334113
|
const headers2 = Object.keys(resp.headers || {}).reduce((accum, name) => {
|
|
@@ -334147,7 +334147,7 @@ function createGetUrl(options) {
|
|
|
334147
334147
|
reject(error);
|
|
334148
334148
|
});
|
|
334149
334149
|
});
|
|
334150
|
-
|
|
334150
|
+
request2.on("error", (error) => {
|
|
334151
334151
|
reject(error);
|
|
334152
334152
|
});
|
|
334153
334153
|
});
|
|
@@ -334198,10 +334198,10 @@ var fetchSignals = /* @__PURE__ */ new WeakMap();
|
|
|
334198
334198
|
var FetchCancelSignal = class {
|
|
334199
334199
|
#listeners;
|
|
334200
334200
|
#cancelled;
|
|
334201
|
-
constructor(
|
|
334201
|
+
constructor(request2) {
|
|
334202
334202
|
this.#listeners = [];
|
|
334203
334203
|
this.#cancelled = false;
|
|
334204
|
-
fetchSignals.set(
|
|
334204
|
+
fetchSignals.set(request2, () => {
|
|
334205
334205
|
if (this.#cancelled) {
|
|
334206
334206
|
return;
|
|
334207
334207
|
}
|
|
@@ -334832,7 +334832,7 @@ var FetchResponse = class _FetchResponse {
|
|
|
334832
334832
|
}
|
|
334833
334833
|
};
|
|
334834
334834
|
}
|
|
334835
|
-
constructor(statusCode, statusMessage, headers, body,
|
|
334835
|
+
constructor(statusCode, statusMessage, headers, body, request2) {
|
|
334836
334836
|
this.#statusCode = statusCode;
|
|
334837
334837
|
this.#statusMessage = statusMessage;
|
|
334838
334838
|
this.#headers = Object.keys(headers).reduce((accum, k) => {
|
|
@@ -334840,7 +334840,7 @@ var FetchResponse = class _FetchResponse {
|
|
|
334840
334840
|
return accum;
|
|
334841
334841
|
}, {});
|
|
334842
334842
|
this.#body = body == null ? null : new Uint8Array(body);
|
|
334843
|
-
this.#request =
|
|
334843
|
+
this.#request = request2 || null;
|
|
334844
334844
|
this.#error = { message: "" };
|
|
334845
334845
|
}
|
|
334846
334846
|
/**
|
|
@@ -344595,12 +344595,12 @@ function parseUnits(_value, decimals) {
|
|
|
344595
344595
|
return BigInt(comps[0] + comps[1]);
|
|
344596
344596
|
}
|
|
344597
344597
|
function getGasStationPlugin(url) {
|
|
344598
|
-
return new FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider,
|
|
344599
|
-
|
|
344598
|
+
return new FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request2) => {
|
|
344599
|
+
request2.setHeader("User-Agent", "ethers");
|
|
344600
344600
|
let response;
|
|
344601
344601
|
try {
|
|
344602
344602
|
const [_response, _feeData] = await Promise.all([
|
|
344603
|
-
|
|
344603
|
+
request2.send(),
|
|
344604
344604
|
fetchFeeData()
|
|
344605
344605
|
]);
|
|
344606
344606
|
response = _response;
|
|
@@ -344612,7 +344612,7 @@ function getGasStationPlugin(url) {
|
|
|
344612
344612
|
};
|
|
344613
344613
|
return feeData;
|
|
344614
344614
|
} catch (error) {
|
|
344615
|
-
assert2(false, `error encountered with polygon gas station (${JSON.stringify(
|
|
344615
|
+
assert2(false, `error encountered with polygon gas station (${JSON.stringify(request2.url)})`, "SERVER_ERROR", { request: request2, response, error });
|
|
344616
344616
|
}
|
|
344617
344617
|
});
|
|
344618
344618
|
}
|
|
@@ -345175,23 +345175,23 @@ var AbstractProvider = class {
|
|
|
345175
345175
|
for (let i = 0; i < urls.length; i++) {
|
|
345176
345176
|
const url = urls[i];
|
|
345177
345177
|
const href = url.replace("{sender}", sender).replace("{data}", data);
|
|
345178
|
-
const
|
|
345178
|
+
const request2 = new FetchRequest(href);
|
|
345179
345179
|
if (url.indexOf("{data}") === -1) {
|
|
345180
|
-
|
|
345180
|
+
request2.body = { data, sender };
|
|
345181
345181
|
}
|
|
345182
|
-
this.emit("debug", { action: "sendCcipReadFetchRequest", request, index: i, urls });
|
|
345182
|
+
this.emit("debug", { action: "sendCcipReadFetchRequest", request: request2, index: i, urls });
|
|
345183
345183
|
let errorMessage = "unknown error";
|
|
345184
|
-
const resp = await
|
|
345184
|
+
const resp = await request2.send();
|
|
345185
345185
|
try {
|
|
345186
345186
|
const result = resp.bodyJson;
|
|
345187
345187
|
if (result.data) {
|
|
345188
|
-
this.emit("debug", { action: "receiveCcipReadFetchResult", request, result });
|
|
345188
|
+
this.emit("debug", { action: "receiveCcipReadFetchResult", request: request2, result });
|
|
345189
345189
|
return result.data;
|
|
345190
345190
|
}
|
|
345191
345191
|
if (result.message) {
|
|
345192
345192
|
errorMessage = result.message;
|
|
345193
345193
|
}
|
|
345194
|
-
this.emit("debug", { action: "receiveCcipReadFetchError", request, result });
|
|
345194
|
+
this.emit("debug", { action: "receiveCcipReadFetchError", request: request2, result });
|
|
345195
345195
|
} catch (error) {
|
|
345196
345196
|
}
|
|
345197
345197
|
assert2(resp.statusCode < 400 || resp.statusCode >= 500, `response not found during CCIP fetch: ${errorMessage}`, "OFFCHAIN_FAULT", { reason: "404_MISSING_RESOURCE", transaction: tx, info: { url, errorMessage } });
|
|
@@ -345393,38 +345393,38 @@ var AbstractProvider = class {
|
|
|
345393
345393
|
* transaction.
|
|
345394
345394
|
*/
|
|
345395
345395
|
_getTransactionRequest(_request) {
|
|
345396
|
-
const
|
|
345396
|
+
const request2 = copyRequest2(_request);
|
|
345397
345397
|
const promises = [];
|
|
345398
345398
|
["to", "from"].forEach((key) => {
|
|
345399
|
-
if (
|
|
345399
|
+
if (request2[key] == null) {
|
|
345400
345400
|
return;
|
|
345401
345401
|
}
|
|
345402
|
-
const addr = resolveAddress2(
|
|
345402
|
+
const addr = resolveAddress2(request2[key], this);
|
|
345403
345403
|
if (isPromise(addr)) {
|
|
345404
345404
|
promises.push(async function() {
|
|
345405
|
-
|
|
345405
|
+
request2[key] = await addr;
|
|
345406
345406
|
}());
|
|
345407
345407
|
} else {
|
|
345408
|
-
|
|
345408
|
+
request2[key] = addr;
|
|
345409
345409
|
}
|
|
345410
345410
|
});
|
|
345411
|
-
if (
|
|
345412
|
-
const blockTag = this._getBlockTag(
|
|
345411
|
+
if (request2.blockTag != null) {
|
|
345412
|
+
const blockTag = this._getBlockTag(request2.blockTag);
|
|
345413
345413
|
if (isPromise(blockTag)) {
|
|
345414
345414
|
promises.push(async function() {
|
|
345415
|
-
|
|
345415
|
+
request2.blockTag = await blockTag;
|
|
345416
345416
|
}());
|
|
345417
345417
|
} else {
|
|
345418
|
-
|
|
345418
|
+
request2.blockTag = blockTag;
|
|
345419
345419
|
}
|
|
345420
345420
|
}
|
|
345421
345421
|
if (promises.length) {
|
|
345422
345422
|
return async function() {
|
|
345423
345423
|
await Promise.all(promises);
|
|
345424
|
-
return
|
|
345424
|
+
return request2;
|
|
345425
345425
|
}();
|
|
345426
345426
|
}
|
|
345427
|
-
return
|
|
345427
|
+
return request2;
|
|
345428
345428
|
}
|
|
345429
345429
|
async getNetwork() {
|
|
345430
345430
|
if (this.#networkPromise == null) {
|
|
@@ -345584,13 +345584,13 @@ var AbstractProvider = class {
|
|
|
345584
345584
|
return await this.#checkNetwork(this.#call(tx, blockTag, _tx.enableCcipRead ? 0 : -1));
|
|
345585
345585
|
}
|
|
345586
345586
|
// Account
|
|
345587
|
-
async #getAccountValue(
|
|
345587
|
+
async #getAccountValue(request2, _address, _blockTag) {
|
|
345588
345588
|
let address = this._getAddress(_address);
|
|
345589
345589
|
let blockTag = this._getBlockTag(_blockTag);
|
|
345590
345590
|
if (typeof address !== "string" || typeof blockTag !== "string") {
|
|
345591
345591
|
[address, blockTag] = await Promise.all([address, blockTag]);
|
|
345592
345592
|
}
|
|
345593
|
-
return await this.#checkNetwork(this.#perform(Object.assign(
|
|
345593
|
+
return await this.#checkNetwork(this.#perform(Object.assign(request2, { address, blockTag })));
|
|
345594
345594
|
}
|
|
345595
345595
|
async getBalance(address, blockTag) {
|
|
345596
345596
|
return getBigInt2(await this.#getAccountValue({ method: "getBalance" }, address, blockTag), "%response");
|
|
@@ -346844,9 +346844,9 @@ var JsonRpcApiProvider = class extends AbstractProvider {
|
|
|
346844
346844
|
}
|
|
346845
346845
|
}
|
|
346846
346846
|
}
|
|
346847
|
-
const
|
|
346848
|
-
if (
|
|
346849
|
-
return await this.send(
|
|
346847
|
+
const request2 = this.getRpcRequest(req);
|
|
346848
|
+
if (request2 != null) {
|
|
346849
|
+
return await this.send(request2.method, request2.args);
|
|
346850
346850
|
}
|
|
346851
346851
|
return super._perform(req);
|
|
346852
346852
|
}
|
|
@@ -347301,10 +347301,10 @@ var JsonRpcProvider = class extends JsonRpcApiPollingProvider {
|
|
|
347301
347301
|
return await super.send(method, params);
|
|
347302
347302
|
}
|
|
347303
347303
|
async _send(payload) {
|
|
347304
|
-
const
|
|
347305
|
-
|
|
347306
|
-
|
|
347307
|
-
const response = await
|
|
347304
|
+
const request2 = this._getConnection();
|
|
347305
|
+
request2.body = JSON.stringify(payload);
|
|
347306
|
+
request2.setHeader("content-type", "application/json");
|
|
347307
|
+
const response = await request2.send();
|
|
347308
347308
|
response.assertOk();
|
|
347309
347309
|
let resp = response.bodyJson;
|
|
347310
347310
|
if (!Array.isArray(resp)) {
|
|
@@ -352464,6 +352464,7 @@ function addressTree() {
|
|
|
352464
352464
|
|
|
352465
352465
|
// src/commands/launch-forks.ts
|
|
352466
352466
|
import { readFile as readFile7 } from "node:fs/promises";
|
|
352467
|
+
import { request } from "node:https";
|
|
352467
352468
|
function launchForks() {
|
|
352468
352469
|
return new Command().name("launch-forks").description("launches anvil-manager test forks from template json file").addOption(
|
|
352469
352470
|
new Option(
|
|
@@ -352503,19 +352504,29 @@ function launchForks() {
|
|
|
352503
352504
|
);
|
|
352504
352505
|
} else {
|
|
352505
352506
|
requests.forEach((r) => {
|
|
352506
|
-
|
|
352507
|
-
method: "POST",
|
|
352508
|
-
headers: {
|
|
352509
|
-
"Content-Type": "application/json",
|
|
352510
|
-
Authorization: `Bearer ${apiKey}`
|
|
352511
|
-
},
|
|
352512
|
-
body: JSON.stringify(r)
|
|
352513
|
-
});
|
|
352507
|
+
post(endpoint, apiKey, { ...r, noWait: true });
|
|
352514
352508
|
});
|
|
352515
|
-
process.exit(0);
|
|
352516
352509
|
}
|
|
352517
352510
|
});
|
|
352518
352511
|
}
|
|
352512
|
+
function post(endpoint, apiKey, payload) {
|
|
352513
|
+
const postData = JSON.stringify(payload);
|
|
352514
|
+
const url = new URL(endpoint);
|
|
352515
|
+
const options = {
|
|
352516
|
+
hostname: url.hostname,
|
|
352517
|
+
port: url.port,
|
|
352518
|
+
path: url.pathname + url.search,
|
|
352519
|
+
method: "POST",
|
|
352520
|
+
headers: {
|
|
352521
|
+
"Content-Type": "application/json",
|
|
352522
|
+
Authorization: `Bearer ${apiKey}`,
|
|
352523
|
+
"Content-Length": Buffer.byteLength(postData)
|
|
352524
|
+
}
|
|
352525
|
+
};
|
|
352526
|
+
const req = request(options);
|
|
352527
|
+
req.write(postData);
|
|
352528
|
+
req.end();
|
|
352529
|
+
}
|
|
352519
352530
|
|
|
352520
352531
|
// src/commands/parse.ts
|
|
352521
352532
|
import { writeFile as writeFile4 } from "node:fs/promises";
|
|
@@ -353554,7 +353565,7 @@ function getRenderer(opts) {
|
|
|
353554
353565
|
}
|
|
353555
353566
|
|
|
353556
353567
|
// package.json
|
|
353557
|
-
var version3 = "4.16.
|
|
353568
|
+
var version3 = "4.16.2";
|
|
353558
353569
|
|
|
353559
353570
|
// src/version.ts
|
|
353560
353571
|
var version_default = version3;
|