@fre4x/jules 1.1.3 → 1.1.7
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.js +472 -487
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,7 +13,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
13
13
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
14
14
|
});
|
|
15
15
|
var __commonJS = (cb, mod) => function __require2() {
|
|
16
|
-
|
|
16
|
+
try {
|
|
17
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw mod = 0, e;
|
|
20
|
+
}
|
|
17
21
|
};
|
|
18
22
|
var __export = (target, all3) => {
|
|
19
23
|
for (var name in all3)
|
|
@@ -3112,6 +3116,9 @@ var require_utils = __commonJS({
|
|
|
3112
3116
|
"use strict";
|
|
3113
3117
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3114
3118
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
3119
|
+
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
3120
|
+
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
3121
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
3115
3122
|
function stringArrayToHexStripped(input) {
|
|
3116
3123
|
let acc = "";
|
|
3117
3124
|
let code = 0;
|
|
@@ -3304,27 +3311,77 @@ var require_utils = __commonJS({
|
|
|
3304
3311
|
}
|
|
3305
3312
|
return output.join("");
|
|
3306
3313
|
}
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3314
|
+
var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
|
|
3315
|
+
var HOST_DELIM_RE = /[@/?#:]/g;
|
|
3316
|
+
var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
3317
|
+
function reescapeHostDelimiters(host, isIP) {
|
|
3318
|
+
const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
|
|
3319
|
+
re.lastIndex = 0;
|
|
3320
|
+
return host.replace(re, (ch) => HOST_DELIMS[ch]);
|
|
3321
|
+
}
|
|
3322
|
+
function normalizePercentEncoding(input, decodeUnreserved = false) {
|
|
3323
|
+
if (input.indexOf("%") === -1) {
|
|
3324
|
+
return input;
|
|
3317
3325
|
}
|
|
3318
|
-
|
|
3319
|
-
|
|
3326
|
+
let output = "";
|
|
3327
|
+
for (let i = 0; i < input.length; i++) {
|
|
3328
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3329
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
3330
|
+
if (isHexPair(hex3)) {
|
|
3331
|
+
const normalizedHex = hex3.toUpperCase();
|
|
3332
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3333
|
+
if (decodeUnreserved && isUnreserved(decoded)) {
|
|
3334
|
+
output += decoded;
|
|
3335
|
+
} else {
|
|
3336
|
+
output += "%" + normalizedHex;
|
|
3337
|
+
}
|
|
3338
|
+
i += 2;
|
|
3339
|
+
continue;
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
output += input[i];
|
|
3320
3343
|
}
|
|
3321
|
-
|
|
3322
|
-
|
|
3344
|
+
return output;
|
|
3345
|
+
}
|
|
3346
|
+
function normalizePathEncoding(input) {
|
|
3347
|
+
let output = "";
|
|
3348
|
+
for (let i = 0; i < input.length; i++) {
|
|
3349
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3350
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
3351
|
+
if (isHexPair(hex3)) {
|
|
3352
|
+
const normalizedHex = hex3.toUpperCase();
|
|
3353
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3354
|
+
if (decoded !== "." && isUnreserved(decoded)) {
|
|
3355
|
+
output += decoded;
|
|
3356
|
+
} else {
|
|
3357
|
+
output += "%" + normalizedHex;
|
|
3358
|
+
}
|
|
3359
|
+
i += 2;
|
|
3360
|
+
continue;
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
if (isPathCharacter(input[i])) {
|
|
3364
|
+
output += input[i];
|
|
3365
|
+
} else {
|
|
3366
|
+
output += escape(input[i]);
|
|
3367
|
+
}
|
|
3323
3368
|
}
|
|
3324
|
-
|
|
3325
|
-
|
|
3369
|
+
return output;
|
|
3370
|
+
}
|
|
3371
|
+
function escapePreservingEscapes(input) {
|
|
3372
|
+
let output = "";
|
|
3373
|
+
for (let i = 0; i < input.length; i++) {
|
|
3374
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3375
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
3376
|
+
if (isHexPair(hex3)) {
|
|
3377
|
+
output += "%" + hex3.toUpperCase();
|
|
3378
|
+
i += 2;
|
|
3379
|
+
continue;
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
output += escape(input[i]);
|
|
3326
3383
|
}
|
|
3327
|
-
return
|
|
3384
|
+
return output;
|
|
3328
3385
|
}
|
|
3329
3386
|
function recomposeAuthority(component) {
|
|
3330
3387
|
const uriTokens = [];
|
|
@@ -3339,7 +3396,7 @@ var require_utils = __commonJS({
|
|
|
3339
3396
|
if (ipV6res.isIPV6 === true) {
|
|
3340
3397
|
host = `[${ipV6res.escapedHost}]`;
|
|
3341
3398
|
} else {
|
|
3342
|
-
host =
|
|
3399
|
+
host = reescapeHostDelimiters(host, false);
|
|
3343
3400
|
}
|
|
3344
3401
|
}
|
|
3345
3402
|
uriTokens.push(host);
|
|
@@ -3353,7 +3410,10 @@ var require_utils = __commonJS({
|
|
|
3353
3410
|
module.exports = {
|
|
3354
3411
|
nonSimpleDomain,
|
|
3355
3412
|
recomposeAuthority,
|
|
3356
|
-
|
|
3413
|
+
reescapeHostDelimiters,
|
|
3414
|
+
normalizePercentEncoding,
|
|
3415
|
+
normalizePathEncoding,
|
|
3416
|
+
escapePreservingEscapes,
|
|
3357
3417
|
removeDotSegments,
|
|
3358
3418
|
isIPv4,
|
|
3359
3419
|
isUUID,
|
|
@@ -3577,12 +3637,12 @@ var require_schemes = __commonJS({
|
|
|
3577
3637
|
var require_fast_uri = __commonJS({
|
|
3578
3638
|
"../node_modules/fast-uri/index.js"(exports, module) {
|
|
3579
3639
|
"use strict";
|
|
3580
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority,
|
|
3640
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3581
3641
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
3582
3642
|
function normalize(uri, options) {
|
|
3583
3643
|
if (typeof uri === "string") {
|
|
3584
3644
|
uri = /** @type {T} */
|
|
3585
|
-
|
|
3645
|
+
normalizeString(uri, options);
|
|
3586
3646
|
} else if (typeof uri === "object") {
|
|
3587
3647
|
uri = /** @type {T} */
|
|
3588
3648
|
parse3(serialize(uri, options), options);
|
|
@@ -3649,19 +3709,9 @@ var require_fast_uri = __commonJS({
|
|
|
3649
3709
|
return target;
|
|
3650
3710
|
}
|
|
3651
3711
|
function equal(uriA, uriB, options) {
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
} else if (typeof uriA === "object") {
|
|
3656
|
-
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
|
|
3657
|
-
}
|
|
3658
|
-
if (typeof uriB === "string") {
|
|
3659
|
-
uriB = unescape(uriB);
|
|
3660
|
-
uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });
|
|
3661
|
-
} else if (typeof uriB === "object") {
|
|
3662
|
-
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
|
|
3663
|
-
}
|
|
3664
|
-
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
3712
|
+
const normalizedA = normalizeComparableURI(uriA, options);
|
|
3713
|
+
const normalizedB = normalizeComparableURI(uriB, options);
|
|
3714
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
|
|
3665
3715
|
}
|
|
3666
3716
|
function serialize(cmpts, opts) {
|
|
3667
3717
|
const component = {
|
|
@@ -3686,12 +3736,12 @@ var require_fast_uri = __commonJS({
|
|
|
3686
3736
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
3687
3737
|
if (component.path !== void 0) {
|
|
3688
3738
|
if (!options.skipEscape) {
|
|
3689
|
-
component.path =
|
|
3739
|
+
component.path = escapePreservingEscapes(component.path);
|
|
3690
3740
|
if (component.scheme !== void 0) {
|
|
3691
3741
|
component.path = component.path.split("%3A").join(":");
|
|
3692
3742
|
}
|
|
3693
3743
|
} else {
|
|
3694
|
-
component.path =
|
|
3744
|
+
component.path = normalizePercentEncoding(component.path);
|
|
3695
3745
|
}
|
|
3696
3746
|
}
|
|
3697
3747
|
if (options.reference !== "suffix" && component.scheme) {
|
|
@@ -3726,7 +3776,16 @@ var require_fast_uri = __commonJS({
|
|
|
3726
3776
|
return uriTokens.join("");
|
|
3727
3777
|
}
|
|
3728
3778
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
3729
|
-
function
|
|
3779
|
+
function getParseError(parsed, matches) {
|
|
3780
|
+
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
3781
|
+
return 'URI path must start with "/" when authority is present.';
|
|
3782
|
+
}
|
|
3783
|
+
if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
|
|
3784
|
+
return "URI port is malformed.";
|
|
3785
|
+
}
|
|
3786
|
+
return void 0;
|
|
3787
|
+
}
|
|
3788
|
+
function parseWithStatus(uri, opts) {
|
|
3730
3789
|
const options = Object.assign({}, opts);
|
|
3731
3790
|
const parsed = {
|
|
3732
3791
|
scheme: void 0,
|
|
@@ -3737,6 +3796,7 @@ var require_fast_uri = __commonJS({
|
|
|
3737
3796
|
query: void 0,
|
|
3738
3797
|
fragment: void 0
|
|
3739
3798
|
};
|
|
3799
|
+
let malformedAuthorityOrPort = false;
|
|
3740
3800
|
let isIP = false;
|
|
3741
3801
|
if (options.reference === "suffix") {
|
|
3742
3802
|
if (options.scheme) {
|
|
@@ -3757,6 +3817,11 @@ var require_fast_uri = __commonJS({
|
|
|
3757
3817
|
if (isNaN(parsed.port)) {
|
|
3758
3818
|
parsed.port = matches[5];
|
|
3759
3819
|
}
|
|
3820
|
+
const parseError = getParseError(parsed, matches);
|
|
3821
|
+
if (parseError !== void 0) {
|
|
3822
|
+
parsed.error = parsed.error || parseError;
|
|
3823
|
+
malformedAuthorityOrPort = true;
|
|
3824
|
+
}
|
|
3760
3825
|
if (parsed.host) {
|
|
3761
3826
|
const ipv4result = isIPv4(parsed.host);
|
|
3762
3827
|
if (ipv4result === false) {
|
|
@@ -3795,14 +3860,18 @@ var require_fast_uri = __commonJS({
|
|
|
3795
3860
|
parsed.scheme = unescape(parsed.scheme);
|
|
3796
3861
|
}
|
|
3797
3862
|
if (parsed.host !== void 0) {
|
|
3798
|
-
parsed.host = unescape(parsed.host);
|
|
3863
|
+
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
3799
3864
|
}
|
|
3800
3865
|
}
|
|
3801
3866
|
if (parsed.path) {
|
|
3802
|
-
parsed.path =
|
|
3867
|
+
parsed.path = normalizePathEncoding(parsed.path);
|
|
3803
3868
|
}
|
|
3804
3869
|
if (parsed.fragment) {
|
|
3805
|
-
|
|
3870
|
+
try {
|
|
3871
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
3872
|
+
} catch {
|
|
3873
|
+
parsed.error = parsed.error || "URI malformed";
|
|
3874
|
+
}
|
|
3806
3875
|
}
|
|
3807
3876
|
}
|
|
3808
3877
|
if (schemeHandler && schemeHandler.parse) {
|
|
@@ -3811,7 +3880,29 @@ var require_fast_uri = __commonJS({
|
|
|
3811
3880
|
} else {
|
|
3812
3881
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
3813
3882
|
}
|
|
3814
|
-
return parsed;
|
|
3883
|
+
return { parsed, malformedAuthorityOrPort };
|
|
3884
|
+
}
|
|
3885
|
+
function parse3(uri, opts) {
|
|
3886
|
+
return parseWithStatus(uri, opts).parsed;
|
|
3887
|
+
}
|
|
3888
|
+
function normalizeString(uri, opts) {
|
|
3889
|
+
return normalizeStringWithStatus(uri, opts).normalized;
|
|
3890
|
+
}
|
|
3891
|
+
function normalizeStringWithStatus(uri, opts) {
|
|
3892
|
+
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
3893
|
+
return {
|
|
3894
|
+
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
3895
|
+
malformedAuthorityOrPort
|
|
3896
|
+
};
|
|
3897
|
+
}
|
|
3898
|
+
function normalizeComparableURI(uri, opts) {
|
|
3899
|
+
if (typeof uri === "string") {
|
|
3900
|
+
const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
|
|
3901
|
+
return malformedAuthorityOrPort ? void 0 : normalized;
|
|
3902
|
+
}
|
|
3903
|
+
if (typeof uri === "object") {
|
|
3904
|
+
return serialize(uri, opts);
|
|
3905
|
+
}
|
|
3815
3906
|
}
|
|
3816
3907
|
var fastUri = {
|
|
3817
3908
|
SCHEMES,
|
|
@@ -16773,6 +16864,9 @@ var require_form_data = __commonJS({
|
|
|
16773
16864
|
var setToStringTag = require_es_set_tostringtag();
|
|
16774
16865
|
var hasOwn = require_hasown();
|
|
16775
16866
|
var populate = require_populate();
|
|
16867
|
+
function escapeHeaderParam(str) {
|
|
16868
|
+
return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
|
|
16869
|
+
}
|
|
16776
16870
|
function FormData3(options) {
|
|
16777
16871
|
if (!(this instanceof FormData3)) {
|
|
16778
16872
|
return new FormData3(options);
|
|
@@ -16862,7 +16956,7 @@ var require_form_data = __commonJS({
|
|
|
16862
16956
|
var contents = "";
|
|
16863
16957
|
var headers = {
|
|
16864
16958
|
// add custom disposition as third element or keep it two elements if not
|
|
16865
|
-
"Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
|
|
16959
|
+
"Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
|
|
16866
16960
|
// if no content type. allow it to be empty array
|
|
16867
16961
|
"Content-Type": [].concat(contentType || [])
|
|
16868
16962
|
};
|
|
@@ -16896,7 +16990,7 @@ var require_form_data = __commonJS({
|
|
|
16896
16990
|
filename = path.basename(value.client._httpMessage.path || "");
|
|
16897
16991
|
}
|
|
16898
16992
|
if (filename) {
|
|
16899
|
-
return 'filename="' + filename + '"';
|
|
16993
|
+
return 'filename="' + escapeHeaderParam(filename) + '"';
|
|
16900
16994
|
}
|
|
16901
16995
|
};
|
|
16902
16996
|
FormData3.prototype._getContentType = function(value, options) {
|
|
@@ -17963,6 +18057,11 @@ var require_follow_redirects = __commonJS({
|
|
|
17963
18057
|
} catch (error48) {
|
|
17964
18058
|
useNativeURL = error48.code === "ERR_INVALID_URL";
|
|
17965
18059
|
}
|
|
18060
|
+
var sensitiveHeaders = [
|
|
18061
|
+
"Authorization",
|
|
18062
|
+
"Proxy-Authorization",
|
|
18063
|
+
"Cookie"
|
|
18064
|
+
];
|
|
17966
18065
|
var preservedUrlFields = [
|
|
17967
18066
|
"auth",
|
|
17968
18067
|
"host",
|
|
@@ -18027,6 +18126,7 @@ var require_follow_redirects = __commonJS({
|
|
|
18027
18126
|
self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
|
|
18028
18127
|
}
|
|
18029
18128
|
};
|
|
18129
|
+
this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex2).join("|") + ")$", "i");
|
|
18030
18130
|
this._performRequest();
|
|
18031
18131
|
}
|
|
18032
18132
|
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
|
@@ -18164,6 +18264,9 @@ var require_follow_redirects = __commonJS({
|
|
|
18164
18264
|
if (!options.headers) {
|
|
18165
18265
|
options.headers = {};
|
|
18166
18266
|
}
|
|
18267
|
+
if (!isArray2(options.sensitiveHeaders)) {
|
|
18268
|
+
options.sensitiveHeaders = [];
|
|
18269
|
+
}
|
|
18167
18270
|
if (options.host) {
|
|
18168
18271
|
if (!options.hostname) {
|
|
18169
18272
|
options.hostname = options.host;
|
|
@@ -18269,7 +18372,7 @@ var require_follow_redirects = __commonJS({
|
|
|
18269
18372
|
this._isRedirect = true;
|
|
18270
18373
|
spreadUrlObject(redirectUrl, this._options);
|
|
18271
18374
|
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
|
|
18272
|
-
removeMatchingHeaders(
|
|
18375
|
+
removeMatchingHeaders(this._headerFilter, this._options.headers);
|
|
18273
18376
|
}
|
|
18274
18377
|
if (isFunction3(beforeRedirect)) {
|
|
18275
18378
|
var responseDetails = {
|
|
@@ -18418,6 +18521,9 @@ var require_follow_redirects = __commonJS({
|
|
|
18418
18521
|
var dot = subdomain.length - domain2.length - 1;
|
|
18419
18522
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain2);
|
|
18420
18523
|
}
|
|
18524
|
+
function isArray2(value) {
|
|
18525
|
+
return value instanceof Array;
|
|
18526
|
+
}
|
|
18421
18527
|
function isString2(value) {
|
|
18422
18528
|
return typeof value === "string" || value instanceof String;
|
|
18423
18529
|
}
|
|
@@ -18430,6 +18536,9 @@ var require_follow_redirects = __commonJS({
|
|
|
18430
18536
|
function isURL(value) {
|
|
18431
18537
|
return URL2 && value instanceof URL2;
|
|
18432
18538
|
}
|
|
18539
|
+
function escapeRegex2(regex) {
|
|
18540
|
+
return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
|
|
18541
|
+
}
|
|
18433
18542
|
module.exports = wrap({ http: http3, https: https3 });
|
|
18434
18543
|
module.exports.wrap = wrap;
|
|
18435
18544
|
}
|
|
@@ -42236,25 +42345,12 @@ var isEmptyObject = (val) => {
|
|
|
42236
42345
|
};
|
|
42237
42346
|
var isDate = kindOfTest("Date");
|
|
42238
42347
|
var isFile = kindOfTest("File");
|
|
42239
|
-
var isReactNativeBlob = (value) => {
|
|
42240
|
-
return !!(value && typeof value.uri !== "undefined");
|
|
42241
|
-
};
|
|
42242
|
-
var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
42243
42348
|
var isBlob = kindOfTest("Blob");
|
|
42244
42349
|
var isFileList = kindOfTest("FileList");
|
|
42245
42350
|
var isStream = (val) => isObject2(val) && isFunction(val.pipe);
|
|
42246
|
-
function getGlobal() {
|
|
42247
|
-
if (typeof globalThis !== "undefined") return globalThis;
|
|
42248
|
-
if (typeof self !== "undefined") return self;
|
|
42249
|
-
if (typeof window !== "undefined") return window;
|
|
42250
|
-
if (typeof global !== "undefined") return global;
|
|
42251
|
-
return {};
|
|
42252
|
-
}
|
|
42253
|
-
var G = getGlobal();
|
|
42254
|
-
var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
|
|
42255
42351
|
var isFormData = (thing) => {
|
|
42256
42352
|
let kind;
|
|
42257
|
-
return thing && (
|
|
42353
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
|
|
42258
42354
|
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
42259
42355
|
};
|
|
42260
42356
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
@@ -42264,9 +42360,7 @@ var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
|
42264
42360
|
"Response",
|
|
42265
42361
|
"Headers"
|
|
42266
42362
|
].map(kindOfTest);
|
|
42267
|
-
var trim = (str) =>
|
|
42268
|
-
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
42269
|
-
};
|
|
42363
|
+
var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
42270
42364
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
42271
42365
|
if (obj === null || typeof obj === "undefined") {
|
|
42272
42366
|
return;
|
|
@@ -42368,7 +42462,10 @@ var stripBOM = (content) => {
|
|
|
42368
42462
|
return content;
|
|
42369
42463
|
};
|
|
42370
42464
|
var inherits = (constructor, superConstructor, props, descriptors) => {
|
|
42371
|
-
constructor.prototype = Object.create(
|
|
42465
|
+
constructor.prototype = Object.create(
|
|
42466
|
+
superConstructor.prototype,
|
|
42467
|
+
descriptors
|
|
42468
|
+
);
|
|
42372
42469
|
Object.defineProperty(constructor.prototype, "constructor", {
|
|
42373
42470
|
value: constructor,
|
|
42374
42471
|
writable: true,
|
|
@@ -42567,8 +42664,6 @@ var utils_default = {
|
|
|
42567
42664
|
isUndefined,
|
|
42568
42665
|
isDate,
|
|
42569
42666
|
isFile,
|
|
42570
|
-
isReactNativeBlob,
|
|
42571
|
-
isReactNative,
|
|
42572
42667
|
isBlob,
|
|
42573
42668
|
isRegExp,
|
|
42574
42669
|
isFunction,
|
|
@@ -42617,9 +42712,6 @@ var AxiosError = class _AxiosError extends Error {
|
|
|
42617
42712
|
const axiosError = new _AxiosError(error48.message, code || error48.code, config2, request, response);
|
|
42618
42713
|
axiosError.cause = error48;
|
|
42619
42714
|
axiosError.name = error48.name;
|
|
42620
|
-
if (error48.status != null && axiosError.status == null) {
|
|
42621
|
-
axiosError.status = error48.status;
|
|
42622
|
-
}
|
|
42623
42715
|
customProps && Object.assign(axiosError, customProps);
|
|
42624
42716
|
return axiosError;
|
|
42625
42717
|
}
|
|
@@ -42636,12 +42728,6 @@ var AxiosError = class _AxiosError extends Error {
|
|
|
42636
42728
|
*/
|
|
42637
42729
|
constructor(message, code, config2, request, response) {
|
|
42638
42730
|
super(message);
|
|
42639
|
-
Object.defineProperty(this, "message", {
|
|
42640
|
-
value: message,
|
|
42641
|
-
enumerable: true,
|
|
42642
|
-
writable: true,
|
|
42643
|
-
configurable: true
|
|
42644
|
-
});
|
|
42645
42731
|
this.name = "AxiosError";
|
|
42646
42732
|
this.isAxiosError = true;
|
|
42647
42733
|
code && (this.code = code);
|
|
@@ -42715,18 +42801,13 @@ function toFormData(obj, formData, options) {
|
|
|
42715
42801
|
throw new TypeError("target must be an object");
|
|
42716
42802
|
}
|
|
42717
42803
|
formData = formData || new (FormData_default || FormData)();
|
|
42718
|
-
options = utils_default.toFlatObject(
|
|
42719
|
-
|
|
42720
|
-
|
|
42721
|
-
|
|
42722
|
-
|
|
42723
|
-
|
|
42724
|
-
|
|
42725
|
-
false,
|
|
42726
|
-
function defined(option, source) {
|
|
42727
|
-
return !utils_default.isUndefined(source[option]);
|
|
42728
|
-
}
|
|
42729
|
-
);
|
|
42804
|
+
options = utils_default.toFlatObject(options, {
|
|
42805
|
+
metaTokens: true,
|
|
42806
|
+
dots: false,
|
|
42807
|
+
indexes: false
|
|
42808
|
+
}, false, function defined(option, source) {
|
|
42809
|
+
return !utils_default.isUndefined(source[option]);
|
|
42810
|
+
});
|
|
42730
42811
|
const metaTokens = options.metaTokens;
|
|
42731
42812
|
const visitor = options.visitor || defaultVisitor;
|
|
42732
42813
|
const dots = options.dots;
|
|
@@ -42754,10 +42835,6 @@ function toFormData(obj, formData, options) {
|
|
|
42754
42835
|
}
|
|
42755
42836
|
function defaultVisitor(value, key, path) {
|
|
42756
42837
|
let arr = value;
|
|
42757
|
-
if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
|
|
42758
|
-
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
42759
|
-
return false;
|
|
42760
|
-
}
|
|
42761
42838
|
if (value && !path && typeof value === "object") {
|
|
42762
42839
|
if (utils_default.endsWith(key, "{}")) {
|
|
42763
42840
|
key = metaTokens ? key : key.slice(0, -2);
|
|
@@ -42793,7 +42870,13 @@ function toFormData(obj, formData, options) {
|
|
|
42793
42870
|
}
|
|
42794
42871
|
stack.push(value);
|
|
42795
42872
|
utils_default.forEach(value, function each(el, key) {
|
|
42796
|
-
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
|
|
42873
|
+
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
|
|
42874
|
+
formData,
|
|
42875
|
+
el,
|
|
42876
|
+
utils_default.isString(key) ? key.trim() : key,
|
|
42877
|
+
path,
|
|
42878
|
+
exposedHelpers
|
|
42879
|
+
);
|
|
42797
42880
|
if (result === true) {
|
|
42798
42881
|
build(el, path ? path.concat(key) : [key]);
|
|
42799
42882
|
}
|
|
@@ -43088,74 +43171,70 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
43088
43171
|
var defaults = {
|
|
43089
43172
|
transitional: transitional_default,
|
|
43090
43173
|
adapter: ["xhr", "http", "fetch"],
|
|
43091
|
-
transformRequest: [
|
|
43092
|
-
|
|
43093
|
-
|
|
43094
|
-
|
|
43095
|
-
|
|
43096
|
-
|
|
43097
|
-
|
|
43098
|
-
|
|
43099
|
-
|
|
43100
|
-
|
|
43101
|
-
|
|
43102
|
-
|
|
43103
|
-
|
|
43104
|
-
|
|
43105
|
-
|
|
43106
|
-
|
|
43107
|
-
|
|
43108
|
-
|
|
43109
|
-
|
|
43110
|
-
|
|
43111
|
-
|
|
43112
|
-
|
|
43113
|
-
|
|
43114
|
-
if (
|
|
43115
|
-
|
|
43116
|
-
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
43117
|
-
}
|
|
43118
|
-
if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
43119
|
-
const _FormData = this.env && this.env.FormData;
|
|
43120
|
-
return toFormData_default(
|
|
43121
|
-
isFileList2 ? { "files[]": data } : data,
|
|
43122
|
-
_FormData && new _FormData(),
|
|
43123
|
-
this.formSerializer
|
|
43124
|
-
);
|
|
43125
|
-
}
|
|
43174
|
+
transformRequest: [function transformRequest(data, headers) {
|
|
43175
|
+
const contentType = headers.getContentType() || "";
|
|
43176
|
+
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
43177
|
+
const isObjectPayload = utils_default.isObject(data);
|
|
43178
|
+
if (isObjectPayload && utils_default.isHTMLForm(data)) {
|
|
43179
|
+
data = new FormData(data);
|
|
43180
|
+
}
|
|
43181
|
+
const isFormData2 = utils_default.isFormData(data);
|
|
43182
|
+
if (isFormData2) {
|
|
43183
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
43184
|
+
}
|
|
43185
|
+
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
|
|
43186
|
+
return data;
|
|
43187
|
+
}
|
|
43188
|
+
if (utils_default.isArrayBufferView(data)) {
|
|
43189
|
+
return data.buffer;
|
|
43190
|
+
}
|
|
43191
|
+
if (utils_default.isURLSearchParams(data)) {
|
|
43192
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
43193
|
+
return data.toString();
|
|
43194
|
+
}
|
|
43195
|
+
let isFileList2;
|
|
43196
|
+
if (isObjectPayload) {
|
|
43197
|
+
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
43198
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
43126
43199
|
}
|
|
43127
|
-
if (
|
|
43128
|
-
|
|
43129
|
-
return
|
|
43200
|
+
if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
43201
|
+
const _FormData = this.env && this.env.FormData;
|
|
43202
|
+
return toFormData_default(
|
|
43203
|
+
isFileList2 ? { "files[]": data } : data,
|
|
43204
|
+
_FormData && new _FormData(),
|
|
43205
|
+
this.formSerializer
|
|
43206
|
+
);
|
|
43130
43207
|
}
|
|
43208
|
+
}
|
|
43209
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
43210
|
+
headers.setContentType("application/json", false);
|
|
43211
|
+
return stringifySafely(data);
|
|
43212
|
+
}
|
|
43213
|
+
return data;
|
|
43214
|
+
}],
|
|
43215
|
+
transformResponse: [function transformResponse(data) {
|
|
43216
|
+
const transitional2 = this.transitional || defaults.transitional;
|
|
43217
|
+
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
43218
|
+
const JSONRequested = this.responseType === "json";
|
|
43219
|
+
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
43131
43220
|
return data;
|
|
43132
43221
|
}
|
|
43133
|
-
|
|
43134
|
-
|
|
43135
|
-
|
|
43136
|
-
|
|
43137
|
-
|
|
43138
|
-
|
|
43139
|
-
|
|
43140
|
-
|
|
43141
|
-
|
|
43142
|
-
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
43143
|
-
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
43144
|
-
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
43145
|
-
try {
|
|
43146
|
-
return JSON.parse(data, this.parseReviver);
|
|
43147
|
-
} catch (e) {
|
|
43148
|
-
if (strictJSONParsing) {
|
|
43149
|
-
if (e.name === "SyntaxError") {
|
|
43150
|
-
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
|
|
43151
|
-
}
|
|
43152
|
-
throw e;
|
|
43222
|
+
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
43223
|
+
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
43224
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
43225
|
+
try {
|
|
43226
|
+
return JSON.parse(data, this.parseReviver);
|
|
43227
|
+
} catch (e) {
|
|
43228
|
+
if (strictJSONParsing) {
|
|
43229
|
+
if (e.name === "SyntaxError") {
|
|
43230
|
+
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
|
|
43153
43231
|
}
|
|
43232
|
+
throw e;
|
|
43154
43233
|
}
|
|
43155
43234
|
}
|
|
43156
|
-
return data;
|
|
43157
43235
|
}
|
|
43158
|
-
|
|
43236
|
+
return data;
|
|
43237
|
+
}],
|
|
43159
43238
|
/**
|
|
43160
43239
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
43161
43240
|
* timeout is not created.
|
|
@@ -43174,7 +43253,7 @@ var defaults = {
|
|
|
43174
43253
|
},
|
|
43175
43254
|
headers: {
|
|
43176
43255
|
common: {
|
|
43177
|
-
Accept: "application/json, text/plain, */*",
|
|
43256
|
+
"Accept": "application/json, text/plain, */*",
|
|
43178
43257
|
"Content-Type": void 0
|
|
43179
43258
|
}
|
|
43180
43259
|
}
|
|
@@ -43445,14 +43524,7 @@ var AxiosHeaders = class {
|
|
|
43445
43524
|
return this;
|
|
43446
43525
|
}
|
|
43447
43526
|
};
|
|
43448
|
-
AxiosHeaders.accessor([
|
|
43449
|
-
"Content-Type",
|
|
43450
|
-
"Content-Length",
|
|
43451
|
-
"Accept",
|
|
43452
|
-
"Accept-Encoding",
|
|
43453
|
-
"User-Agent",
|
|
43454
|
-
"Authorization"
|
|
43455
|
-
]);
|
|
43527
|
+
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
43456
43528
|
utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
43457
43529
|
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
43458
43530
|
return {
|
|
@@ -43508,15 +43580,13 @@ function settle(resolve, reject, response) {
|
|
|
43508
43580
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
43509
43581
|
resolve(response);
|
|
43510
43582
|
} else {
|
|
43511
|
-
reject(
|
|
43512
|
-
|
|
43513
|
-
|
|
43514
|
-
|
|
43515
|
-
|
|
43516
|
-
|
|
43517
|
-
|
|
43518
|
-
)
|
|
43519
|
-
);
|
|
43583
|
+
reject(new AxiosError_default(
|
|
43584
|
+
"Request failed with status code " + response.status,
|
|
43585
|
+
[AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
43586
|
+
response.config,
|
|
43587
|
+
response.request,
|
|
43588
|
+
response
|
|
43589
|
+
));
|
|
43520
43590
|
}
|
|
43521
43591
|
}
|
|
43522
43592
|
|
|
@@ -43552,7 +43622,7 @@ import util3 from "util";
|
|
|
43552
43622
|
import zlib from "zlib";
|
|
43553
43623
|
|
|
43554
43624
|
// ../node_modules/axios/lib/env/data.js
|
|
43555
|
-
var VERSION = "1.13.
|
|
43625
|
+
var VERSION = "1.13.5";
|
|
43556
43626
|
|
|
43557
43627
|
// ../node_modules/axios/lib/helpers/parseProtocol.js
|
|
43558
43628
|
function parseProtocol(url3) {
|
|
@@ -43597,21 +43667,16 @@ import stream from "stream";
|
|
|
43597
43667
|
var kInternals = /* @__PURE__ */ Symbol("internals");
|
|
43598
43668
|
var AxiosTransformStream = class extends stream.Transform {
|
|
43599
43669
|
constructor(options) {
|
|
43600
|
-
options = utils_default.toFlatObject(
|
|
43601
|
-
|
|
43602
|
-
|
|
43603
|
-
|
|
43604
|
-
|
|
43605
|
-
|
|
43606
|
-
|
|
43607
|
-
|
|
43608
|
-
|
|
43609
|
-
|
|
43610
|
-
null,
|
|
43611
|
-
(prop, source) => {
|
|
43612
|
-
return !utils_default.isUndefined(source[prop]);
|
|
43613
|
-
}
|
|
43614
|
-
);
|
|
43670
|
+
options = utils_default.toFlatObject(options, {
|
|
43671
|
+
maxRate: 0,
|
|
43672
|
+
chunkSize: 64 * 1024,
|
|
43673
|
+
minChunkSize: 100,
|
|
43674
|
+
timeWindow: 500,
|
|
43675
|
+
ticksRate: 2,
|
|
43676
|
+
samplesCount: 15
|
|
43677
|
+
}, null, (prop, source) => {
|
|
43678
|
+
return !utils_default.isUndefined(source[prop]);
|
|
43679
|
+
});
|
|
43615
43680
|
super({
|
|
43616
43681
|
readableHighWaterMark: options.chunkSize
|
|
43617
43682
|
});
|
|
@@ -43694,12 +43759,9 @@ var AxiosTransformStream = class extends stream.Transform {
|
|
|
43694
43759
|
chunkRemainder = _chunk.subarray(maxChunkSize);
|
|
43695
43760
|
_chunk = _chunk.subarray(0, maxChunkSize);
|
|
43696
43761
|
}
|
|
43697
|
-
pushChunk(
|
|
43698
|
-
|
|
43699
|
-
|
|
43700
|
-
process.nextTick(_callback, null, chunkRemainder);
|
|
43701
|
-
} : _callback
|
|
43702
|
-
);
|
|
43762
|
+
pushChunk(_chunk, chunkRemainder ? () => {
|
|
43763
|
+
process.nextTick(_callback, null, chunkRemainder);
|
|
43764
|
+
} : _callback);
|
|
43703
43765
|
};
|
|
43704
43766
|
transformChunk(chunk, function transformNextChunk(err, _chunk) {
|
|
43705
43767
|
if (err) {
|
|
@@ -43770,14 +43832,11 @@ var FormDataPart = class {
|
|
|
43770
43832
|
yield CRLF_BYTES;
|
|
43771
43833
|
}
|
|
43772
43834
|
static escapeName(name) {
|
|
43773
|
-
return String(name).replace(
|
|
43774
|
-
|
|
43775
|
-
|
|
43776
|
-
|
|
43777
|
-
|
|
43778
|
-
'"': "%22"
|
|
43779
|
-
})[match]
|
|
43780
|
-
);
|
|
43835
|
+
return String(name).replace(/[\r\n"]/g, (match) => ({
|
|
43836
|
+
"\r": "%0D",
|
|
43837
|
+
"\n": "%0A",
|
|
43838
|
+
'"': "%22"
|
|
43839
|
+
})[match]);
|
|
43781
43840
|
}
|
|
43782
43841
|
};
|
|
43783
43842
|
var formDataToStream = (form, headersHandler, options) => {
|
|
@@ -43809,15 +43868,13 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
43809
43868
|
computedHeaders["Content-Length"] = contentLength;
|
|
43810
43869
|
}
|
|
43811
43870
|
headersHandler && headersHandler(computedHeaders);
|
|
43812
|
-
return Readable.from(
|
|
43813
|
-
(
|
|
43814
|
-
|
|
43815
|
-
|
|
43816
|
-
|
|
43817
|
-
|
|
43818
|
-
|
|
43819
|
-
})()
|
|
43820
|
-
);
|
|
43871
|
+
return Readable.from((async function* () {
|
|
43872
|
+
for (const part of parts) {
|
|
43873
|
+
yield boundaryBytes;
|
|
43874
|
+
yield* part.encode();
|
|
43875
|
+
}
|
|
43876
|
+
yield footerBytes;
|
|
43877
|
+
})());
|
|
43821
43878
|
};
|
|
43822
43879
|
var formDataToStream_default = formDataToStream;
|
|
43823
43880
|
|
|
@@ -43956,14 +44013,11 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
43956
44013
|
};
|
|
43957
44014
|
var progressEventDecorator = (total, throttled) => {
|
|
43958
44015
|
const lengthComputable = total != null;
|
|
43959
|
-
return [
|
|
43960
|
-
|
|
43961
|
-
|
|
43962
|
-
|
|
43963
|
-
|
|
43964
|
-
}),
|
|
43965
|
-
throttled[1]
|
|
43966
|
-
];
|
|
44016
|
+
return [(loaded) => throttled[0]({
|
|
44017
|
+
lengthComputable,
|
|
44018
|
+
total,
|
|
44019
|
+
loaded
|
|
44020
|
+
}), throttled[1]];
|
|
43967
44021
|
};
|
|
43968
44022
|
var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
|
43969
44023
|
|
|
@@ -44042,12 +44096,9 @@ var Http2Sessions = class {
|
|
|
44042
44096
|
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
44043
44097
|
}
|
|
44044
44098
|
getSession(authority, options) {
|
|
44045
|
-
options = Object.assign(
|
|
44046
|
-
|
|
44047
|
-
|
|
44048
|
-
},
|
|
44049
|
-
options
|
|
44050
|
-
);
|
|
44099
|
+
options = Object.assign({
|
|
44100
|
+
sessionTimeout: 1e3
|
|
44101
|
+
}, options);
|
|
44051
44102
|
let authoritySessions = this.sessions[authority];
|
|
44052
44103
|
if (authoritySessions) {
|
|
44053
44104
|
let len = authoritySessions.length;
|
|
@@ -44101,7 +44152,10 @@ var Http2Sessions = class {
|
|
|
44101
44152
|
};
|
|
44102
44153
|
}
|
|
44103
44154
|
session.once("close", removeSession);
|
|
44104
|
-
let entry = [
|
|
44155
|
+
let entry = [
|
|
44156
|
+
session,
|
|
44157
|
+
options
|
|
44158
|
+
];
|
|
44105
44159
|
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
44106
44160
|
return session;
|
|
44107
44161
|
}
|
|
@@ -44187,7 +44241,12 @@ var http2Transport = {
|
|
|
44187
44241
|
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
44188
44242
|
const { http2Options, headers } = options;
|
|
44189
44243
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
44190
|
-
const {
|
|
44244
|
+
const {
|
|
44245
|
+
HTTP2_HEADER_SCHEME,
|
|
44246
|
+
HTTP2_HEADER_METHOD,
|
|
44247
|
+
HTTP2_HEADER_PATH,
|
|
44248
|
+
HTTP2_HEADER_STATUS
|
|
44249
|
+
} = http2.constants;
|
|
44191
44250
|
const http2Headers = {
|
|
44192
44251
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
44193
44252
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -44240,10 +44299,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44240
44299
|
const abortEmitter = new EventEmitter();
|
|
44241
44300
|
function abort(reason) {
|
|
44242
44301
|
try {
|
|
44243
|
-
abortEmitter.emit(
|
|
44244
|
-
"abort",
|
|
44245
|
-
!reason || reason.type ? new CanceledError_default(null, config2, req) : reason
|
|
44246
|
-
);
|
|
44302
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config2, req) : reason);
|
|
44247
44303
|
} catch (err) {
|
|
44248
44304
|
console.warn("emit error", err);
|
|
44249
44305
|
}
|
|
@@ -44289,13 +44345,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44289
44345
|
const dataUrl = String(config2.url || fullPath || "");
|
|
44290
44346
|
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
44291
44347
|
if (estimated > config2.maxContentLength) {
|
|
44292
|
-
return reject(
|
|
44293
|
-
|
|
44294
|
-
|
|
44295
|
-
|
|
44296
|
-
|
|
44297
|
-
)
|
|
44298
|
-
);
|
|
44348
|
+
return reject(new AxiosError_default(
|
|
44349
|
+
"maxContentLength size of " + config2.maxContentLength + " exceeded",
|
|
44350
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
44351
|
+
config2
|
|
44352
|
+
));
|
|
44299
44353
|
}
|
|
44300
44354
|
}
|
|
44301
44355
|
let convertedData;
|
|
@@ -44331,9 +44385,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44331
44385
|
});
|
|
44332
44386
|
}
|
|
44333
44387
|
if (supportedProtocols.indexOf(protocol) === -1) {
|
|
44334
|
-
return reject(
|
|
44335
|
-
|
|
44336
|
-
|
|
44388
|
+
return reject(new AxiosError_default(
|
|
44389
|
+
"Unsupported protocol " + protocol,
|
|
44390
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
44391
|
+
config2
|
|
44392
|
+
));
|
|
44337
44393
|
}
|
|
44338
44394
|
const headers = AxiosHeaders_default.from(config2.headers).normalize();
|
|
44339
44395
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
@@ -44343,16 +44399,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44343
44399
|
let maxDownloadRate = void 0;
|
|
44344
44400
|
if (utils_default.isSpecCompliantForm(data)) {
|
|
44345
44401
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
44346
|
-
data = formDataToStream_default(
|
|
44347
|
-
|
|
44348
|
-
|
|
44349
|
-
|
|
44350
|
-
|
|
44351
|
-
|
|
44352
|
-
tag: `axios-${VERSION}-boundary`,
|
|
44353
|
-
boundary: userBoundary && userBoundary[1] || void 0
|
|
44354
|
-
}
|
|
44355
|
-
);
|
|
44402
|
+
data = formDataToStream_default(data, (formHeaders) => {
|
|
44403
|
+
headers.set(formHeaders);
|
|
44404
|
+
}, {
|
|
44405
|
+
tag: `axios-${VERSION}-boundary`,
|
|
44406
|
+
boundary: userBoundary && userBoundary[1] || void 0
|
|
44407
|
+
});
|
|
44356
44408
|
} else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
|
|
44357
44409
|
headers.set(data.getHeaders());
|
|
44358
44410
|
if (!headers.hasContentLength()) {
|
|
@@ -44373,23 +44425,19 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44373
44425
|
} else if (utils_default.isString(data)) {
|
|
44374
44426
|
data = Buffer.from(data, "utf-8");
|
|
44375
44427
|
} else {
|
|
44376
|
-
return reject(
|
|
44377
|
-
|
|
44378
|
-
|
|
44379
|
-
|
|
44380
|
-
|
|
44381
|
-
)
|
|
44382
|
-
);
|
|
44428
|
+
return reject(new AxiosError_default(
|
|
44429
|
+
"Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
|
|
44430
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
44431
|
+
config2
|
|
44432
|
+
));
|
|
44383
44433
|
}
|
|
44384
44434
|
headers.setContentLength(data.length, false);
|
|
44385
44435
|
if (config2.maxBodyLength > -1 && data.length > config2.maxBodyLength) {
|
|
44386
|
-
return reject(
|
|
44387
|
-
|
|
44388
|
-
|
|
44389
|
-
|
|
44390
|
-
|
|
44391
|
-
)
|
|
44392
|
-
);
|
|
44436
|
+
return reject(new AxiosError_default(
|
|
44437
|
+
"Request body larger than maxBodyLength limit",
|
|
44438
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
44439
|
+
config2
|
|
44440
|
+
));
|
|
44393
44441
|
}
|
|
44394
44442
|
}
|
|
44395
44443
|
const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
|
|
@@ -44403,25 +44451,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44403
44451
|
if (!utils_default.isStream(data)) {
|
|
44404
44452
|
data = stream3.Readable.from(data, { objectMode: false });
|
|
44405
44453
|
}
|
|
44406
|
-
data = stream3.pipeline(
|
|
44407
|
-
|
|
44408
|
-
|
|
44409
|
-
|
|
44410
|
-
|
|
44411
|
-
|
|
44412
|
-
|
|
44413
|
-
|
|
44414
|
-
);
|
|
44415
|
-
onUploadProgress && data.on(
|
|
44416
|
-
"progress",
|
|
44417
|
-
flushOnFinish(
|
|
44418
|
-
data,
|
|
44419
|
-
progressEventDecorator(
|
|
44420
|
-
contentLength,
|
|
44421
|
-
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
|
44422
|
-
)
|
|
44454
|
+
data = stream3.pipeline([data, new AxiosTransformStream_default({
|
|
44455
|
+
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
|
44456
|
+
})], utils_default.noop);
|
|
44457
|
+
onUploadProgress && data.on("progress", flushOnFinish(
|
|
44458
|
+
data,
|
|
44459
|
+
progressEventDecorator(
|
|
44460
|
+
contentLength,
|
|
44461
|
+
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
|
44423
44462
|
)
|
|
44424
|
-
);
|
|
44463
|
+
));
|
|
44425
44464
|
}
|
|
44426
44465
|
let auth = void 0;
|
|
44427
44466
|
if (config2.auth) {
|
|
@@ -44472,11 +44511,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44472
44511
|
} else {
|
|
44473
44512
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
44474
44513
|
options.port = parsed.port;
|
|
44475
|
-
setProxy(
|
|
44476
|
-
options,
|
|
44477
|
-
config2.proxy,
|
|
44478
|
-
protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
|
|
44479
|
-
);
|
|
44514
|
+
setProxy(options, config2.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
|
|
44480
44515
|
}
|
|
44481
44516
|
let transport;
|
|
44482
44517
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
@@ -44514,16 +44549,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44514
44549
|
const transformStream = new AxiosTransformStream_default({
|
|
44515
44550
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
44516
44551
|
});
|
|
44517
|
-
onDownloadProgress && transformStream.on(
|
|
44518
|
-
|
|
44519
|
-
|
|
44520
|
-
|
|
44521
|
-
|
|
44522
|
-
responseLength,
|
|
44523
|
-
progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
|
|
44524
|
-
)
|
|
44552
|
+
onDownloadProgress && transformStream.on("progress", flushOnFinish(
|
|
44553
|
+
transformStream,
|
|
44554
|
+
progressEventDecorator(
|
|
44555
|
+
responseLength,
|
|
44556
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
|
|
44525
44557
|
)
|
|
44526
|
-
);
|
|
44558
|
+
));
|
|
44527
44559
|
streams.push(transformStream);
|
|
44528
44560
|
}
|
|
44529
44561
|
let responseStream = res;
|
|
@@ -44573,14 +44605,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44573
44605
|
if (config2.maxContentLength > -1 && totalResponseBytes > config2.maxContentLength) {
|
|
44574
44606
|
rejected = true;
|
|
44575
44607
|
responseStream.destroy();
|
|
44576
|
-
abort(
|
|
44577
|
-
|
|
44578
|
-
|
|
44579
|
-
|
|
44580
|
-
|
|
44581
|
-
|
|
44582
|
-
)
|
|
44583
|
-
);
|
|
44608
|
+
abort(new AxiosError_default(
|
|
44609
|
+
"maxContentLength size of " + config2.maxContentLength + " exceeded",
|
|
44610
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
44611
|
+
config2,
|
|
44612
|
+
lastRequest
|
|
44613
|
+
));
|
|
44584
44614
|
}
|
|
44585
44615
|
});
|
|
44586
44616
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
@@ -44639,14 +44669,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44639
44669
|
if (config2.timeout) {
|
|
44640
44670
|
const timeout = parseInt(config2.timeout, 10);
|
|
44641
44671
|
if (Number.isNaN(timeout)) {
|
|
44642
|
-
abort(
|
|
44643
|
-
|
|
44644
|
-
|
|
44645
|
-
|
|
44646
|
-
|
|
44647
|
-
|
|
44648
|
-
)
|
|
44649
|
-
);
|
|
44672
|
+
abort(new AxiosError_default(
|
|
44673
|
+
"error trying to parse `config.timeout` to int",
|
|
44674
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
44675
|
+
config2,
|
|
44676
|
+
req
|
|
44677
|
+
));
|
|
44650
44678
|
return;
|
|
44651
44679
|
}
|
|
44652
44680
|
req.setTimeout(timeout, function handleRequestTimeout() {
|
|
@@ -44656,14 +44684,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
44656
44684
|
if (config2.timeoutErrorMessage) {
|
|
44657
44685
|
timeoutErrorMessage = config2.timeoutErrorMessage;
|
|
44658
44686
|
}
|
|
44659
|
-
abort(
|
|
44660
|
-
|
|
44661
|
-
|
|
44662
|
-
|
|
44663
|
-
|
|
44664
|
-
|
|
44665
|
-
)
|
|
44666
|
-
);
|
|
44687
|
+
abort(new AxiosError_default(
|
|
44688
|
+
timeoutErrorMessage,
|
|
44689
|
+
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
44690
|
+
config2,
|
|
44691
|
+
req
|
|
44692
|
+
));
|
|
44667
44693
|
});
|
|
44668
44694
|
} else {
|
|
44669
44695
|
req.setTimeout(0);
|
|
@@ -44818,12 +44844,16 @@ function mergeConfig(config1, config2) {
|
|
|
44818
44844
|
validateStatus: mergeDirectKeys,
|
|
44819
44845
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
44820
44846
|
};
|
|
44821
|
-
utils_default.forEach(
|
|
44822
|
-
|
|
44823
|
-
|
|
44824
|
-
|
|
44825
|
-
|
|
44826
|
-
|
|
44847
|
+
utils_default.forEach(
|
|
44848
|
+
Object.keys({ ...config1, ...config2 }),
|
|
44849
|
+
function computeConfigValue(prop) {
|
|
44850
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
|
|
44851
|
+
return;
|
|
44852
|
+
const merge3 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
44853
|
+
const configValue = merge3(config1[prop], config2[prop], prop);
|
|
44854
|
+
utils_default.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config3[prop] = configValue);
|
|
44855
|
+
}
|
|
44856
|
+
);
|
|
44827
44857
|
return config3;
|
|
44828
44858
|
}
|
|
44829
44859
|
|
|
@@ -44832,17 +44862,11 @@ var resolveConfig_default = (config2) => {
|
|
|
44832
44862
|
const newConfig = mergeConfig({}, config2);
|
|
44833
44863
|
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
44834
44864
|
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
44835
|
-
newConfig.url = buildURL(
|
|
44836
|
-
buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
|
|
44837
|
-
config2.params,
|
|
44838
|
-
config2.paramsSerializer
|
|
44839
|
-
);
|
|
44865
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config2.params, config2.paramsSerializer);
|
|
44840
44866
|
if (auth) {
|
|
44841
44867
|
headers.set(
|
|
44842
44868
|
"Authorization",
|
|
44843
|
-
"Basic " + btoa(
|
|
44844
|
-
(auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
|
|
44845
|
-
)
|
|
44869
|
+
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
|
|
44846
44870
|
);
|
|
44847
44871
|
}
|
|
44848
44872
|
if (utils_default.isFormData(data)) {
|
|
@@ -44906,17 +44930,13 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
|
44906
44930
|
config: config2,
|
|
44907
44931
|
request
|
|
44908
44932
|
};
|
|
44909
|
-
settle(
|
|
44910
|
-
|
|
44911
|
-
|
|
44912
|
-
|
|
44913
|
-
|
|
44914
|
-
|
|
44915
|
-
|
|
44916
|
-
done();
|
|
44917
|
-
},
|
|
44918
|
-
response
|
|
44919
|
-
);
|
|
44933
|
+
settle(function _resolve(value) {
|
|
44934
|
+
resolve(value);
|
|
44935
|
+
done();
|
|
44936
|
+
}, function _reject(err) {
|
|
44937
|
+
reject(err);
|
|
44938
|
+
done();
|
|
44939
|
+
}, response);
|
|
44920
44940
|
request = null;
|
|
44921
44941
|
}
|
|
44922
44942
|
if ("onloadend" in request) {
|
|
@@ -44952,14 +44972,12 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
|
44952
44972
|
if (_config.timeoutErrorMessage) {
|
|
44953
44973
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
44954
44974
|
}
|
|
44955
|
-
reject(
|
|
44956
|
-
|
|
44957
|
-
|
|
44958
|
-
|
|
44959
|
-
|
|
44960
|
-
|
|
44961
|
-
)
|
|
44962
|
-
);
|
|
44975
|
+
reject(new AxiosError_default(
|
|
44976
|
+
timeoutErrorMessage,
|
|
44977
|
+
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
44978
|
+
config2,
|
|
44979
|
+
request
|
|
44980
|
+
));
|
|
44963
44981
|
request = null;
|
|
44964
44982
|
};
|
|
44965
44983
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
@@ -44999,13 +45017,7 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
|
44999
45017
|
}
|
|
45000
45018
|
const protocol = parseProtocol(_config.url);
|
|
45001
45019
|
if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
|
|
45002
|
-
reject(
|
|
45003
|
-
new AxiosError_default(
|
|
45004
|
-
"Unsupported protocol " + protocol + ":",
|
|
45005
|
-
AxiosError_default.ERR_BAD_REQUEST,
|
|
45006
|
-
config2
|
|
45007
|
-
)
|
|
45008
|
-
);
|
|
45020
|
+
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config2));
|
|
45009
45021
|
return;
|
|
45010
45022
|
}
|
|
45011
45023
|
request.send(requestData || null);
|
|
@@ -45023,9 +45035,7 @@ var composeSignals = (signals, timeout) => {
|
|
|
45023
45035
|
aborted2 = true;
|
|
45024
45036
|
unsubscribe();
|
|
45025
45037
|
const err = reason instanceof Error ? reason : this.reason;
|
|
45026
|
-
controller.abort(
|
|
45027
|
-
err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)
|
|
45028
|
-
);
|
|
45038
|
+
controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
|
|
45029
45039
|
}
|
|
45030
45040
|
};
|
|
45031
45041
|
let timer = timeout && setTimeout(() => {
|
|
@@ -45098,36 +45108,33 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
|
45098
45108
|
onFinish && onFinish(e);
|
|
45099
45109
|
}
|
|
45100
45110
|
};
|
|
45101
|
-
return new ReadableStream(
|
|
45102
|
-
{
|
|
45103
|
-
|
|
45104
|
-
|
|
45105
|
-
|
|
45106
|
-
|
|
45107
|
-
|
|
45108
|
-
|
|
45109
|
-
return;
|
|
45110
|
-
}
|
|
45111
|
-
let len = value.byteLength;
|
|
45112
|
-
if (onProgress) {
|
|
45113
|
-
let loadedBytes = bytes += len;
|
|
45114
|
-
onProgress(loadedBytes);
|
|
45115
|
-
}
|
|
45116
|
-
controller.enqueue(new Uint8Array(value));
|
|
45117
|
-
} catch (err) {
|
|
45118
|
-
_onFinish(err);
|
|
45119
|
-
throw err;
|
|
45111
|
+
return new ReadableStream({
|
|
45112
|
+
async pull(controller) {
|
|
45113
|
+
try {
|
|
45114
|
+
const { done: done2, value } = await iterator2.next();
|
|
45115
|
+
if (done2) {
|
|
45116
|
+
_onFinish();
|
|
45117
|
+
controller.close();
|
|
45118
|
+
return;
|
|
45120
45119
|
}
|
|
45121
|
-
|
|
45122
|
-
|
|
45123
|
-
|
|
45124
|
-
|
|
45120
|
+
let len = value.byteLength;
|
|
45121
|
+
if (onProgress) {
|
|
45122
|
+
let loadedBytes = bytes += len;
|
|
45123
|
+
onProgress(loadedBytes);
|
|
45124
|
+
}
|
|
45125
|
+
controller.enqueue(new Uint8Array(value));
|
|
45126
|
+
} catch (err) {
|
|
45127
|
+
_onFinish(err);
|
|
45128
|
+
throw err;
|
|
45125
45129
|
}
|
|
45126
45130
|
},
|
|
45127
|
-
{
|
|
45128
|
-
|
|
45131
|
+
cancel(reason) {
|
|
45132
|
+
_onFinish(reason);
|
|
45133
|
+
return iterator2.return();
|
|
45129
45134
|
}
|
|
45130
|
-
|
|
45135
|
+
}, {
|
|
45136
|
+
highWaterMark: 2
|
|
45137
|
+
});
|
|
45131
45138
|
};
|
|
45132
45139
|
|
|
45133
45140
|
// ../node_modules/axios/lib/adapters/fetch.js
|
|
@@ -45137,7 +45144,10 @@ var globalFetchAPI = (({ Request, Response }) => ({
|
|
|
45137
45144
|
Request,
|
|
45138
45145
|
Response
|
|
45139
45146
|
}))(utils_default.global);
|
|
45140
|
-
var {
|
|
45147
|
+
var {
|
|
45148
|
+
ReadableStream: ReadableStream2,
|
|
45149
|
+
TextEncoder: TextEncoder2
|
|
45150
|
+
} = utils_default.global;
|
|
45141
45151
|
var test = (fn, ...args) => {
|
|
45142
45152
|
try {
|
|
45143
45153
|
return !!fn(...args);
|
|
@@ -45146,13 +45156,9 @@ var test = (fn, ...args) => {
|
|
|
45146
45156
|
}
|
|
45147
45157
|
};
|
|
45148
45158
|
var factory = (env) => {
|
|
45149
|
-
env = utils_default.merge.call(
|
|
45150
|
-
|
|
45151
|
-
|
|
45152
|
-
},
|
|
45153
|
-
globalFetchAPI,
|
|
45154
|
-
env
|
|
45155
|
-
);
|
|
45159
|
+
env = utils_default.merge.call({
|
|
45160
|
+
skipUndefined: true
|
|
45161
|
+
}, globalFetchAPI, env);
|
|
45156
45162
|
const { fetch: envFetch, Request, Response } = env;
|
|
45157
45163
|
const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
|
|
45158
45164
|
const isRequestSupported = isFunction2(Request);
|
|
@@ -45185,11 +45191,7 @@ var factory = (env) => {
|
|
|
45185
45191
|
if (method) {
|
|
45186
45192
|
return method.call(res);
|
|
45187
45193
|
}
|
|
45188
|
-
throw new AxiosError_default(
|
|
45189
|
-
`Response type '${type}' is not supported`,
|
|
45190
|
-
AxiosError_default.ERR_NOT_SUPPORT,
|
|
45191
|
-
config2
|
|
45192
|
-
);
|
|
45194
|
+
throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config2);
|
|
45193
45195
|
});
|
|
45194
45196
|
});
|
|
45195
45197
|
})();
|
|
@@ -45238,10 +45240,7 @@ var factory = (env) => {
|
|
|
45238
45240
|
} = resolveConfig_default(config2);
|
|
45239
45241
|
let _fetch = envFetch || fetch;
|
|
45240
45242
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
45241
|
-
let composedSignal = composeSignals_default(
|
|
45242
|
-
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
45243
|
-
timeout
|
|
45244
|
-
);
|
|
45243
|
+
let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
45245
45244
|
let request = null;
|
|
45246
45245
|
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
45247
45246
|
composedSignal.unsubscribe();
|
|
@@ -45301,10 +45300,7 @@ var factory = (env) => {
|
|
|
45301
45300
|
);
|
|
45302
45301
|
}
|
|
45303
45302
|
responseType = responseType || "text";
|
|
45304
|
-
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
|
|
45305
|
-
response,
|
|
45306
|
-
config2
|
|
45307
|
-
);
|
|
45303
|
+
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config2);
|
|
45308
45304
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
45309
45305
|
return await new Promise((resolve, reject) => {
|
|
45310
45306
|
settle(resolve, reject, {
|
|
@@ -45320,13 +45316,7 @@ var factory = (env) => {
|
|
|
45320
45316
|
unsubscribe && unsubscribe();
|
|
45321
45317
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
45322
45318
|
throw Object.assign(
|
|
45323
|
-
new AxiosError_default(
|
|
45324
|
-
"Network Error",
|
|
45325
|
-
AxiosError_default.ERR_NETWORK,
|
|
45326
|
-
config2,
|
|
45327
|
-
request,
|
|
45328
|
-
err && err.response
|
|
45329
|
-
),
|
|
45319
|
+
new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config2, request, err && err.response),
|
|
45330
45320
|
{
|
|
45331
45321
|
cause: err.cause || err
|
|
45332
45322
|
}
|
|
@@ -45340,7 +45330,11 @@ var seedCache = /* @__PURE__ */ new Map();
|
|
|
45340
45330
|
var getFetch = (config2) => {
|
|
45341
45331
|
let env = config2 && config2.env || {};
|
|
45342
45332
|
const { fetch: fetch2, Request, Response } = env;
|
|
45343
|
-
const seeds = [
|
|
45333
|
+
const seeds = [
|
|
45334
|
+
Request,
|
|
45335
|
+
Response,
|
|
45336
|
+
fetch2
|
|
45337
|
+
];
|
|
45344
45338
|
let len = seeds.length, i = len, seed, target, map2 = seedCache;
|
|
45345
45339
|
while (i--) {
|
|
45346
45340
|
seed = seeds[i];
|
|
@@ -45429,33 +45423,37 @@ function throwIfCancellationRequested(config2) {
|
|
|
45429
45423
|
function dispatchRequest(config2) {
|
|
45430
45424
|
throwIfCancellationRequested(config2);
|
|
45431
45425
|
config2.headers = AxiosHeaders_default.from(config2.headers);
|
|
45432
|
-
config2.data = transformData.call(
|
|
45426
|
+
config2.data = transformData.call(
|
|
45427
|
+
config2,
|
|
45428
|
+
config2.transformRequest
|
|
45429
|
+
);
|
|
45433
45430
|
if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
|
|
45434
45431
|
config2.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
45435
45432
|
}
|
|
45436
45433
|
const adapter2 = adapters_default.getAdapter(config2.adapter || defaults_default.adapter, config2);
|
|
45437
|
-
return adapter2(config2).then(
|
|
45438
|
-
|
|
45434
|
+
return adapter2(config2).then(function onAdapterResolution(response) {
|
|
45435
|
+
throwIfCancellationRequested(config2);
|
|
45436
|
+
response.data = transformData.call(
|
|
45437
|
+
config2,
|
|
45438
|
+
config2.transformResponse,
|
|
45439
|
+
response
|
|
45440
|
+
);
|
|
45441
|
+
response.headers = AxiosHeaders_default.from(response.headers);
|
|
45442
|
+
return response;
|
|
45443
|
+
}, function onAdapterRejection(reason) {
|
|
45444
|
+
if (!isCancel(reason)) {
|
|
45439
45445
|
throwIfCancellationRequested(config2);
|
|
45440
|
-
|
|
45441
|
-
|
|
45442
|
-
|
|
45443
|
-
|
|
45444
|
-
|
|
45445
|
-
|
|
45446
|
-
|
|
45447
|
-
if (reason && reason.response) {
|
|
45448
|
-
reason.response.data = transformData.call(
|
|
45449
|
-
config2,
|
|
45450
|
-
config2.transformResponse,
|
|
45451
|
-
reason.response
|
|
45452
|
-
);
|
|
45453
|
-
reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
|
|
45454
|
-
}
|
|
45446
|
+
if (reason && reason.response) {
|
|
45447
|
+
reason.response.data = transformData.call(
|
|
45448
|
+
config2,
|
|
45449
|
+
config2.transformResponse,
|
|
45450
|
+
reason.response
|
|
45451
|
+
);
|
|
45452
|
+
reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
|
|
45455
45453
|
}
|
|
45456
|
-
return Promise.reject(reason);
|
|
45457
45454
|
}
|
|
45458
|
-
|
|
45455
|
+
return Promise.reject(reason);
|
|
45456
|
+
});
|
|
45459
45457
|
}
|
|
45460
45458
|
|
|
45461
45459
|
// ../node_modules/axios/lib/helpers/validator.js
|
|
@@ -45508,10 +45506,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
45508
45506
|
const value = options[opt];
|
|
45509
45507
|
const result = value === void 0 || validator(value, opt, options);
|
|
45510
45508
|
if (result !== true) {
|
|
45511
|
-
throw new AxiosError_default(
|
|
45512
|
-
"option " + opt + " must be " + result,
|
|
45513
|
-
AxiosError_default.ERR_BAD_OPTION_VALUE
|
|
45514
|
-
);
|
|
45509
|
+
throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
45515
45510
|
}
|
|
45516
45511
|
continue;
|
|
45517
45512
|
}
|
|
@@ -45573,16 +45568,12 @@ var Axios = class {
|
|
|
45573
45568
|
config2 = mergeConfig(this.defaults, config2);
|
|
45574
45569
|
const { transitional: transitional2, paramsSerializer, headers } = config2;
|
|
45575
45570
|
if (transitional2 !== void 0) {
|
|
45576
|
-
validator_default.assertOptions(
|
|
45577
|
-
|
|
45578
|
-
|
|
45579
|
-
|
|
45580
|
-
|
|
45581
|
-
|
|
45582
|
-
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
|
|
45583
|
-
},
|
|
45584
|
-
false
|
|
45585
|
-
);
|
|
45571
|
+
validator_default.assertOptions(transitional2, {
|
|
45572
|
+
silentJSONParsing: validators2.transitional(validators2.boolean),
|
|
45573
|
+
forcedJSONParsing: validators2.transitional(validators2.boolean),
|
|
45574
|
+
clarifyTimeoutError: validators2.transitional(validators2.boolean),
|
|
45575
|
+
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
|
|
45576
|
+
}, false);
|
|
45586
45577
|
}
|
|
45587
45578
|
if (paramsSerializer != null) {
|
|
45588
45579
|
if (utils_default.isFunction(paramsSerializer)) {
|
|
@@ -45590,14 +45581,10 @@ var Axios = class {
|
|
|
45590
45581
|
serialize: paramsSerializer
|
|
45591
45582
|
};
|
|
45592
45583
|
} else {
|
|
45593
|
-
validator_default.assertOptions(
|
|
45594
|
-
|
|
45595
|
-
|
|
45596
|
-
|
|
45597
|
-
serialize: validators2.function
|
|
45598
|
-
},
|
|
45599
|
-
true
|
|
45600
|
-
);
|
|
45584
|
+
validator_default.assertOptions(paramsSerializer, {
|
|
45585
|
+
encode: validators2.function,
|
|
45586
|
+
serialize: validators2.function
|
|
45587
|
+
}, true);
|
|
45601
45588
|
}
|
|
45602
45589
|
}
|
|
45603
45590
|
if (config2.allowAbsoluteUrls !== void 0) {
|
|
@@ -45606,19 +45593,21 @@ var Axios = class {
|
|
|
45606
45593
|
} else {
|
|
45607
45594
|
config2.allowAbsoluteUrls = true;
|
|
45608
45595
|
}
|
|
45609
|
-
validator_default.assertOptions(
|
|
45610
|
-
|
|
45611
|
-
|
|
45612
|
-
|
|
45613
|
-
withXsrfToken: validators2.spelling("withXSRFToken")
|
|
45614
|
-
},
|
|
45615
|
-
true
|
|
45616
|
-
);
|
|
45596
|
+
validator_default.assertOptions(config2, {
|
|
45597
|
+
baseUrl: validators2.spelling("baseURL"),
|
|
45598
|
+
withXsrfToken: validators2.spelling("withXSRFToken")
|
|
45599
|
+
}, true);
|
|
45617
45600
|
config2.method = (config2.method || this.defaults.method || "get").toLowerCase();
|
|
45618
|
-
let contextHeaders = headers && utils_default.merge(
|
|
45619
|
-
|
|
45620
|
-
|
|
45621
|
-
|
|
45601
|
+
let contextHeaders = headers && utils_default.merge(
|
|
45602
|
+
headers.common,
|
|
45603
|
+
headers[config2.method]
|
|
45604
|
+
);
|
|
45605
|
+
headers && utils_default.forEach(
|
|
45606
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
45607
|
+
(method) => {
|
|
45608
|
+
delete headers[method];
|
|
45609
|
+
}
|
|
45610
|
+
);
|
|
45622
45611
|
config2.headers = AxiosHeaders_default.concat(contextHeaders, headers);
|
|
45623
45612
|
const requestInterceptorChain = [];
|
|
45624
45613
|
let synchronousRequestInterceptors = true;
|
|
@@ -45685,28 +45674,24 @@ var Axios = class {
|
|
|
45685
45674
|
};
|
|
45686
45675
|
utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
45687
45676
|
Axios.prototype[method] = function(url3, config2) {
|
|
45688
|
-
return this.request(
|
|
45689
|
-
|
|
45690
|
-
|
|
45691
|
-
|
|
45692
|
-
|
|
45693
|
-
})
|
|
45694
|
-
);
|
|
45677
|
+
return this.request(mergeConfig(config2 || {}, {
|
|
45678
|
+
method,
|
|
45679
|
+
url: url3,
|
|
45680
|
+
data: (config2 || {}).data
|
|
45681
|
+
}));
|
|
45695
45682
|
};
|
|
45696
45683
|
});
|
|
45697
45684
|
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
45698
45685
|
function generateHTTPMethod(isForm) {
|
|
45699
45686
|
return function httpMethod(url3, data, config2) {
|
|
45700
|
-
return this.request(
|
|
45701
|
-
|
|
45702
|
-
|
|
45703
|
-
|
|
45704
|
-
|
|
45705
|
-
|
|
45706
|
-
|
|
45707
|
-
|
|
45708
|
-
})
|
|
45709
|
-
);
|
|
45687
|
+
return this.request(mergeConfig(config2 || {}, {
|
|
45688
|
+
method,
|
|
45689
|
+
headers: isForm ? {
|
|
45690
|
+
"Content-Type": "multipart/form-data"
|
|
45691
|
+
} : {},
|
|
45692
|
+
url: url3,
|
|
45693
|
+
data
|
|
45694
|
+
}));
|
|
45710
45695
|
};
|
|
45711
45696
|
}
|
|
45712
45697
|
Axios.prototype[method] = generateHTTPMethod();
|