publish-microfrontend 1.10.3 → 1.11.0-beta.1bddd86
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/lib/index.js +1988 -1228
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -20433,7 +20433,7 @@ var require_form_data = __commonJS({
|
|
|
20433
20433
|
var path = require("path");
|
|
20434
20434
|
var http3 = require("http");
|
|
20435
20435
|
var https2 = require("https");
|
|
20436
|
-
var
|
|
20436
|
+
var parseUrl2 = require("url").parse;
|
|
20437
20437
|
var fs = require("fs");
|
|
20438
20438
|
var Stream = require("stream").Stream;
|
|
20439
20439
|
var crypto2 = require("crypto");
|
|
@@ -20686,7 +20686,7 @@ var require_form_data = __commonJS({
|
|
|
20686
20686
|
var options;
|
|
20687
20687
|
var defaults2 = { method: "post" };
|
|
20688
20688
|
if (typeof params === "string") {
|
|
20689
|
-
params =
|
|
20689
|
+
params = parseUrl2(params);
|
|
20690
20690
|
options = populate({
|
|
20691
20691
|
port: params.port,
|
|
20692
20692
|
path: params.pathname,
|
|
@@ -20738,81 +20738,11 @@ var require_form_data = __commonJS({
|
|
|
20738
20738
|
FormData4.prototype.toString = function() {
|
|
20739
20739
|
return "[object FormData]";
|
|
20740
20740
|
};
|
|
20741
|
-
setToStringTag(FormData4, "FormData");
|
|
20741
|
+
setToStringTag(FormData4.prototype, "FormData");
|
|
20742
20742
|
module2.exports = FormData4;
|
|
20743
20743
|
}
|
|
20744
20744
|
});
|
|
20745
20745
|
|
|
20746
|
-
// ../../../node_modules/proxy-from-env/index.js
|
|
20747
|
-
var require_proxy_from_env = __commonJS({
|
|
20748
|
-
"../../../node_modules/proxy-from-env/index.js"(exports2) {
|
|
20749
|
-
"use strict";
|
|
20750
|
-
var parseUrl = require("url").parse;
|
|
20751
|
-
var DEFAULT_PORTS = {
|
|
20752
|
-
ftp: 21,
|
|
20753
|
-
gopher: 70,
|
|
20754
|
-
http: 80,
|
|
20755
|
-
https: 443,
|
|
20756
|
-
ws: 80,
|
|
20757
|
-
wss: 443
|
|
20758
|
-
};
|
|
20759
|
-
var stringEndsWith = String.prototype.endsWith || function(s) {
|
|
20760
|
-
return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
|
|
20761
|
-
};
|
|
20762
|
-
function getProxyForUrl(url2) {
|
|
20763
|
-
var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
|
|
20764
|
-
var proto3 = parsedUrl.protocol;
|
|
20765
|
-
var hostname = parsedUrl.host;
|
|
20766
|
-
var port = parsedUrl.port;
|
|
20767
|
-
if (typeof hostname !== "string" || !hostname || typeof proto3 !== "string") {
|
|
20768
|
-
return "";
|
|
20769
|
-
}
|
|
20770
|
-
proto3 = proto3.split(":", 1)[0];
|
|
20771
|
-
hostname = hostname.replace(/:\d*$/, "");
|
|
20772
|
-
port = parseInt(port) || DEFAULT_PORTS[proto3] || 0;
|
|
20773
|
-
if (!shouldProxy(hostname, port)) {
|
|
20774
|
-
return "";
|
|
20775
|
-
}
|
|
20776
|
-
var proxy = getEnv("npm_config_" + proto3 + "_proxy") || getEnv(proto3 + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
|
|
20777
|
-
if (proxy && proxy.indexOf("://") === -1) {
|
|
20778
|
-
proxy = proto3 + "://" + proxy;
|
|
20779
|
-
}
|
|
20780
|
-
return proxy;
|
|
20781
|
-
}
|
|
20782
|
-
function shouldProxy(hostname, port) {
|
|
20783
|
-
var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
|
|
20784
|
-
if (!NO_PROXY) {
|
|
20785
|
-
return true;
|
|
20786
|
-
}
|
|
20787
|
-
if (NO_PROXY === "*") {
|
|
20788
|
-
return false;
|
|
20789
|
-
}
|
|
20790
|
-
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
20791
|
-
if (!proxy) {
|
|
20792
|
-
return true;
|
|
20793
|
-
}
|
|
20794
|
-
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
20795
|
-
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
20796
|
-
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
20797
|
-
if (parsedProxyPort && parsedProxyPort !== port) {
|
|
20798
|
-
return true;
|
|
20799
|
-
}
|
|
20800
|
-
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
20801
|
-
return hostname !== parsedProxyHostname;
|
|
20802
|
-
}
|
|
20803
|
-
if (parsedProxyHostname.charAt(0) === "*") {
|
|
20804
|
-
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
20805
|
-
}
|
|
20806
|
-
return !stringEndsWith.call(hostname, parsedProxyHostname);
|
|
20807
|
-
});
|
|
20808
|
-
}
|
|
20809
|
-
function getEnv(key) {
|
|
20810
|
-
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
20811
|
-
}
|
|
20812
|
-
exports2.getProxyForUrl = getProxyForUrl;
|
|
20813
|
-
}
|
|
20814
|
-
});
|
|
20815
|
-
|
|
20816
20746
|
// ../../../node_modules/debug/node_modules/ms/index.js
|
|
20817
20747
|
var require_ms = __commonJS({
|
|
20818
20748
|
"../../../node_modules/debug/node_modules/ms/index.js"(exports2, module2) {
|
|
@@ -21281,6 +21211,11 @@ var require_follow_redirects = __commonJS({
|
|
|
21281
21211
|
} catch (error) {
|
|
21282
21212
|
useNativeURL = error.code === "ERR_INVALID_URL";
|
|
21283
21213
|
}
|
|
21214
|
+
var sensitiveHeaders = [
|
|
21215
|
+
"Authorization",
|
|
21216
|
+
"Proxy-Authorization",
|
|
21217
|
+
"Cookie"
|
|
21218
|
+
];
|
|
21284
21219
|
var preservedUrlFields = [
|
|
21285
21220
|
"auth",
|
|
21286
21221
|
"host",
|
|
@@ -21345,6 +21280,7 @@ var require_follow_redirects = __commonJS({
|
|
|
21345
21280
|
self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
|
|
21346
21281
|
}
|
|
21347
21282
|
};
|
|
21283
|
+
this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i");
|
|
21348
21284
|
this._performRequest();
|
|
21349
21285
|
}
|
|
21350
21286
|
RedirectableRequest.prototype = Object.create(Writable2.prototype);
|
|
@@ -21482,6 +21418,9 @@ var require_follow_redirects = __commonJS({
|
|
|
21482
21418
|
if (!options.headers) {
|
|
21483
21419
|
options.headers = {};
|
|
21484
21420
|
}
|
|
21421
|
+
if (!isArray2(options.sensitiveHeaders)) {
|
|
21422
|
+
options.sensitiveHeaders = [];
|
|
21423
|
+
}
|
|
21485
21424
|
if (options.host) {
|
|
21486
21425
|
if (!options.hostname) {
|
|
21487
21426
|
options.hostname = options.host;
|
|
@@ -21579,7 +21518,7 @@ var require_follow_redirects = __commonJS({
|
|
|
21579
21518
|
removeMatchingHeaders(/^content-/i, this._options.headers);
|
|
21580
21519
|
}
|
|
21581
21520
|
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
|
|
21582
|
-
var currentUrlParts =
|
|
21521
|
+
var currentUrlParts = parseUrl2(this._currentUrl);
|
|
21583
21522
|
var currentHost = currentHostHeader || currentUrlParts.host;
|
|
21584
21523
|
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
|
|
21585
21524
|
var redirectUrl = resolveUrl(location, currentUrl);
|
|
@@ -21587,7 +21526,7 @@ var require_follow_redirects = __commonJS({
|
|
|
21587
21526
|
this._isRedirect = true;
|
|
21588
21527
|
spreadUrlObject(redirectUrl, this._options);
|
|
21589
21528
|
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
|
|
21590
|
-
removeMatchingHeaders(
|
|
21529
|
+
removeMatchingHeaders(this._headerFilter, this._options.headers);
|
|
21591
21530
|
}
|
|
21592
21531
|
if (isFunction3(beforeRedirect)) {
|
|
21593
21532
|
var responseDetails = {
|
|
@@ -21618,7 +21557,7 @@ var require_follow_redirects = __commonJS({
|
|
|
21618
21557
|
if (isURL(input)) {
|
|
21619
21558
|
input = spreadUrlObject(input);
|
|
21620
21559
|
} else if (isString2(input)) {
|
|
21621
|
-
input = spreadUrlObject(
|
|
21560
|
+
input = spreadUrlObject(parseUrl2(input));
|
|
21622
21561
|
} else {
|
|
21623
21562
|
callback = options;
|
|
21624
21563
|
options = validateUrl(input);
|
|
@@ -21654,7 +21593,7 @@ var require_follow_redirects = __commonJS({
|
|
|
21654
21593
|
}
|
|
21655
21594
|
function noop2() {
|
|
21656
21595
|
}
|
|
21657
|
-
function
|
|
21596
|
+
function parseUrl2(input) {
|
|
21658
21597
|
var parsed;
|
|
21659
21598
|
if (useNativeURL) {
|
|
21660
21599
|
parsed = new URL2(input);
|
|
@@ -21667,7 +21606,7 @@ var require_follow_redirects = __commonJS({
|
|
|
21667
21606
|
return parsed;
|
|
21668
21607
|
}
|
|
21669
21608
|
function resolveUrl(relative, base) {
|
|
21670
|
-
return useNativeURL ? new URL2(relative, base) :
|
|
21609
|
+
return useNativeURL ? new URL2(relative, base) : parseUrl2(url2.resolve(base, relative));
|
|
21671
21610
|
}
|
|
21672
21611
|
function validateUrl(input) {
|
|
21673
21612
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -21736,6 +21675,9 @@ var require_follow_redirects = __commonJS({
|
|
|
21736
21675
|
var dot = subdomain.length - domain.length - 1;
|
|
21737
21676
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
|
21738
21677
|
}
|
|
21678
|
+
function isArray2(value) {
|
|
21679
|
+
return value instanceof Array;
|
|
21680
|
+
}
|
|
21739
21681
|
function isString2(value) {
|
|
21740
21682
|
return typeof value === "string" || value instanceof String;
|
|
21741
21683
|
}
|
|
@@ -21748,6 +21690,9 @@ var require_follow_redirects = __commonJS({
|
|
|
21748
21690
|
function isURL(value) {
|
|
21749
21691
|
return URL2 && value instanceof URL2;
|
|
21750
21692
|
}
|
|
21693
|
+
function escapeRegex(regex2) {
|
|
21694
|
+
return regex2.replace(/[\]\\/()*+?.$]/g, "\\$&");
|
|
21695
|
+
}
|
|
21751
21696
|
module2.exports = wrap({ http: http3, https: https2 });
|
|
21752
21697
|
module2.exports.wrap = wrap;
|
|
21753
21698
|
}
|
|
@@ -21795,7 +21740,7 @@ var frameworkKeys = [...frameworkLibs];
|
|
|
21795
21740
|
var forceOverwriteKeys = Object.keys(ForceOverwrite).filter((m) => typeof ForceOverwrite[m] === "number");
|
|
21796
21741
|
|
|
21797
21742
|
// src/index.ts
|
|
21798
|
-
var
|
|
21743
|
+
var import_path5 = require("path");
|
|
21799
21744
|
var import_promises2 = require("fs/promises");
|
|
21800
21745
|
|
|
21801
21746
|
// ../../../node_modules/ora/index.js
|
|
@@ -23685,7 +23630,7 @@ function fail(message, ...args2) {
|
|
|
23685
23630
|
var import_glob = __toESM(require_glob());
|
|
23686
23631
|
var import_fs2 = require("fs");
|
|
23687
23632
|
var import_promises = require("fs/promises");
|
|
23688
|
-
var
|
|
23633
|
+
var import_path4 = require("path");
|
|
23689
23634
|
|
|
23690
23635
|
// ../piral-cli/src/common/MemoryStream.ts
|
|
23691
23636
|
var import_stream = require("stream");
|
|
@@ -23748,8 +23693,8 @@ var isPlainObject = (val) => {
|
|
|
23748
23693
|
if (kindOf(val) !== "object") {
|
|
23749
23694
|
return false;
|
|
23750
23695
|
}
|
|
23751
|
-
const
|
|
23752
|
-
return (
|
|
23696
|
+
const prototype2 = getPrototypeOf(val);
|
|
23697
|
+
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
|
|
23753
23698
|
};
|
|
23754
23699
|
var isEmptyObject = (val) => {
|
|
23755
23700
|
if (!isObject(val) || isBuffer(val)) {
|
|
@@ -23763,17 +23708,42 @@ var isEmptyObject = (val) => {
|
|
|
23763
23708
|
};
|
|
23764
23709
|
var isDate = kindOfTest("Date");
|
|
23765
23710
|
var isFile = kindOfTest("File");
|
|
23711
|
+
var isReactNativeBlob = (value) => {
|
|
23712
|
+
return !!(value && typeof value.uri !== "undefined");
|
|
23713
|
+
};
|
|
23714
|
+
var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
23766
23715
|
var isBlob = kindOfTest("Blob");
|
|
23767
23716
|
var isFileList = kindOfTest("FileList");
|
|
23768
23717
|
var isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
23718
|
+
function getGlobal() {
|
|
23719
|
+
if (typeof globalThis !== "undefined") return globalThis;
|
|
23720
|
+
if (typeof self !== "undefined") return self;
|
|
23721
|
+
if (typeof window !== "undefined") return window;
|
|
23722
|
+
if (typeof global !== "undefined") return global;
|
|
23723
|
+
return {};
|
|
23724
|
+
}
|
|
23725
|
+
var G = getGlobal();
|
|
23726
|
+
var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
|
|
23769
23727
|
var isFormData = (thing) => {
|
|
23770
|
-
|
|
23771
|
-
|
|
23772
|
-
|
|
23728
|
+
if (!thing) return false;
|
|
23729
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
23730
|
+
const proto3 = getPrototypeOf(thing);
|
|
23731
|
+
if (!proto3 || proto3 === Object.prototype) return false;
|
|
23732
|
+
if (!isFunction(thing.append)) return false;
|
|
23733
|
+
const kind = kindOf(thing);
|
|
23734
|
+
return kind === "formdata" || // detect form-data instance
|
|
23735
|
+
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]";
|
|
23773
23736
|
};
|
|
23774
23737
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
23775
|
-
var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
23776
|
-
|
|
23738
|
+
var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
23739
|
+
"ReadableStream",
|
|
23740
|
+
"Request",
|
|
23741
|
+
"Response",
|
|
23742
|
+
"Headers"
|
|
23743
|
+
].map(kindOfTest);
|
|
23744
|
+
var trim = (str) => {
|
|
23745
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
23746
|
+
};
|
|
23777
23747
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
23778
23748
|
if (obj === null || typeof obj === "undefined") {
|
|
23779
23749
|
return;
|
|
@@ -23821,13 +23791,17 @@ var _global = (() => {
|
|
|
23821
23791
|
return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
|
|
23822
23792
|
})();
|
|
23823
23793
|
var isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
23824
|
-
function merge() {
|
|
23794
|
+
function merge(...objs) {
|
|
23825
23795
|
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
23826
23796
|
const result = {};
|
|
23827
23797
|
const assignValue = (val, key) => {
|
|
23798
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
23799
|
+
return;
|
|
23800
|
+
}
|
|
23828
23801
|
const targetKey = caseless && findKey(result, key) || key;
|
|
23829
|
-
|
|
23830
|
-
|
|
23802
|
+
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
|
|
23803
|
+
if (isPlainObject(existing) && isPlainObject(val)) {
|
|
23804
|
+
result[targetKey] = merge(existing, val);
|
|
23831
23805
|
} else if (isPlainObject(val)) {
|
|
23832
23806
|
result[targetKey] = merge({}, val);
|
|
23833
23807
|
} else if (isArray(val)) {
|
|
@@ -23836,19 +23810,37 @@ function merge() {
|
|
|
23836
23810
|
result[targetKey] = val;
|
|
23837
23811
|
}
|
|
23838
23812
|
};
|
|
23839
|
-
for (let i = 0, l =
|
|
23840
|
-
|
|
23813
|
+
for (let i = 0, l = objs.length; i < l; i++) {
|
|
23814
|
+
objs[i] && forEach(objs[i], assignValue);
|
|
23841
23815
|
}
|
|
23842
23816
|
return result;
|
|
23843
23817
|
}
|
|
23844
23818
|
var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
23845
|
-
forEach(
|
|
23846
|
-
|
|
23847
|
-
|
|
23848
|
-
|
|
23849
|
-
|
|
23850
|
-
|
|
23851
|
-
|
|
23819
|
+
forEach(
|
|
23820
|
+
b,
|
|
23821
|
+
(val, key) => {
|
|
23822
|
+
if (thisArg && isFunction(val)) {
|
|
23823
|
+
Object.defineProperty(a, key, {
|
|
23824
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
23825
|
+
// hijack defineProperty's accessor-vs-data resolution.
|
|
23826
|
+
__proto__: null,
|
|
23827
|
+
value: bind(val, thisArg),
|
|
23828
|
+
writable: true,
|
|
23829
|
+
enumerable: true,
|
|
23830
|
+
configurable: true
|
|
23831
|
+
});
|
|
23832
|
+
} else {
|
|
23833
|
+
Object.defineProperty(a, key, {
|
|
23834
|
+
__proto__: null,
|
|
23835
|
+
value: val,
|
|
23836
|
+
writable: true,
|
|
23837
|
+
enumerable: true,
|
|
23838
|
+
configurable: true
|
|
23839
|
+
});
|
|
23840
|
+
}
|
|
23841
|
+
},
|
|
23842
|
+
{ allOwnKeys }
|
|
23843
|
+
);
|
|
23852
23844
|
return a;
|
|
23853
23845
|
};
|
|
23854
23846
|
var stripBOM = (content) => {
|
|
@@ -23857,10 +23849,17 @@ var stripBOM = (content) => {
|
|
|
23857
23849
|
}
|
|
23858
23850
|
return content;
|
|
23859
23851
|
};
|
|
23860
|
-
var inherits = (constructor, superConstructor, props,
|
|
23861
|
-
constructor.prototype = Object.create(superConstructor.prototype,
|
|
23862
|
-
constructor.prototype
|
|
23852
|
+
var inherits = (constructor, superConstructor, props, descriptors) => {
|
|
23853
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
23854
|
+
Object.defineProperty(constructor.prototype, "constructor", {
|
|
23855
|
+
__proto__: null,
|
|
23856
|
+
value: constructor,
|
|
23857
|
+
writable: true,
|
|
23858
|
+
enumerable: false,
|
|
23859
|
+
configurable: true
|
|
23860
|
+
});
|
|
23863
23861
|
Object.defineProperty(constructor, "super", {
|
|
23862
|
+
__proto__: null,
|
|
23864
23863
|
value: superConstructor.prototype
|
|
23865
23864
|
});
|
|
23866
23865
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -23930,19 +23929,16 @@ var matchAll = (regExp, str) => {
|
|
|
23930
23929
|
};
|
|
23931
23930
|
var isHTMLForm = kindOfTest("HTMLFormElement");
|
|
23932
23931
|
var toCamelCase = (str) => {
|
|
23933
|
-
return str.toLowerCase().replace(
|
|
23934
|
-
|
|
23935
|
-
|
|
23936
|
-
return p1.toUpperCase() + p2;
|
|
23937
|
-
}
|
|
23938
|
-
);
|
|
23932
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
23933
|
+
return p1.toUpperCase() + p2;
|
|
23934
|
+
});
|
|
23939
23935
|
};
|
|
23940
23936
|
var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
23941
23937
|
var isRegExp = kindOfTest("RegExp");
|
|
23942
23938
|
var reduceDescriptors = (obj, reducer) => {
|
|
23943
|
-
const
|
|
23939
|
+
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
23944
23940
|
const reducedDescriptors = {};
|
|
23945
|
-
forEach(
|
|
23941
|
+
forEach(descriptors, (descriptor, name) => {
|
|
23946
23942
|
let ret;
|
|
23947
23943
|
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
23948
23944
|
reducedDescriptors[name] = ret || descriptor;
|
|
@@ -23952,7 +23948,7 @@ var reduceDescriptors = (obj, reducer) => {
|
|
|
23952
23948
|
};
|
|
23953
23949
|
var freezeMethods = (obj) => {
|
|
23954
23950
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
23955
|
-
if (isFunction(obj) && ["arguments", "caller", "callee"].
|
|
23951
|
+
if (isFunction(obj) && ["arguments", "caller", "callee"].includes(name)) {
|
|
23956
23952
|
return false;
|
|
23957
23953
|
}
|
|
23958
23954
|
const value = obj[name];
|
|
@@ -24019,20 +24015,21 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
24019
24015
|
return setImmediate;
|
|
24020
24016
|
}
|
|
24021
24017
|
return postMessageSupported ? ((token, callbacks) => {
|
|
24022
|
-
_global.addEventListener(
|
|
24023
|
-
|
|
24024
|
-
|
|
24025
|
-
|
|
24026
|
-
|
|
24018
|
+
_global.addEventListener(
|
|
24019
|
+
"message",
|
|
24020
|
+
({ source, data }) => {
|
|
24021
|
+
if (source === _global && data === token) {
|
|
24022
|
+
callbacks.length && callbacks.shift()();
|
|
24023
|
+
}
|
|
24024
|
+
},
|
|
24025
|
+
false
|
|
24026
|
+
);
|
|
24027
24027
|
return (cb) => {
|
|
24028
24028
|
callbacks.push(cb);
|
|
24029
24029
|
_global.postMessage(token, "*");
|
|
24030
24030
|
};
|
|
24031
24031
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
24032
|
-
})(
|
|
24033
|
-
typeof setImmediate === "function",
|
|
24034
|
-
isFunction(_global.postMessage)
|
|
24035
|
-
);
|
|
24032
|
+
})(typeof setImmediate === "function", isFunction(_global.postMessage));
|
|
24036
24033
|
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
24037
24034
|
var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
24038
24035
|
var utils_default = {
|
|
@@ -24054,6 +24051,8 @@ var utils_default = {
|
|
|
24054
24051
|
isUndefined,
|
|
24055
24052
|
isDate,
|
|
24056
24053
|
isFile,
|
|
24054
|
+
isReactNativeBlob,
|
|
24055
|
+
isReactNative,
|
|
24057
24056
|
isBlob,
|
|
24058
24057
|
isRegExp,
|
|
24059
24058
|
isFunction,
|
|
@@ -24096,849 +24095,955 @@ var utils_default = {
|
|
|
24096
24095
|
isIterable
|
|
24097
24096
|
};
|
|
24098
24097
|
|
|
24099
|
-
// ../../../node_modules/axios/lib/
|
|
24100
|
-
|
|
24101
|
-
|
|
24102
|
-
|
|
24103
|
-
|
|
24104
|
-
|
|
24105
|
-
|
|
24106
|
-
|
|
24107
|
-
|
|
24108
|
-
|
|
24109
|
-
|
|
24110
|
-
|
|
24111
|
-
|
|
24112
|
-
|
|
24113
|
-
|
|
24114
|
-
|
|
24115
|
-
|
|
24116
|
-
|
|
24117
|
-
|
|
24118
|
-
|
|
24119
|
-
|
|
24120
|
-
|
|
24121
|
-
|
|
24122
|
-
|
|
24123
|
-
|
|
24124
|
-
|
|
24125
|
-
|
|
24126
|
-
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
|
|
24130
|
-
|
|
24131
|
-
|
|
24132
|
-
|
|
24133
|
-
|
|
24134
|
-
|
|
24135
|
-
|
|
24136
|
-
|
|
24137
|
-
}
|
|
24138
|
-
|
|
24139
|
-
|
|
24140
|
-
[
|
|
24141
|
-
"ERR_BAD_OPTION_VALUE",
|
|
24142
|
-
"ERR_BAD_OPTION",
|
|
24143
|
-
"ECONNABORTED",
|
|
24144
|
-
"ETIMEDOUT",
|
|
24145
|
-
"ERR_NETWORK",
|
|
24146
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
24147
|
-
"ERR_DEPRECATED",
|
|
24148
|
-
"ERR_BAD_RESPONSE",
|
|
24149
|
-
"ERR_BAD_REQUEST",
|
|
24150
|
-
"ERR_CANCELED",
|
|
24151
|
-
"ERR_NOT_SUPPORT",
|
|
24152
|
-
"ERR_INVALID_URL"
|
|
24153
|
-
// eslint-disable-next-line func-names
|
|
24154
|
-
].forEach((code) => {
|
|
24155
|
-
descriptors[code] = { value: code };
|
|
24156
|
-
});
|
|
24157
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
24158
|
-
Object.defineProperty(prototype, "isAxiosError", { value: true });
|
|
24159
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
24160
|
-
const axiosError = Object.create(prototype);
|
|
24161
|
-
utils_default.toFlatObject(error, axiosError, function filter2(obj) {
|
|
24162
|
-
return obj !== Error.prototype;
|
|
24163
|
-
}, (prop) => {
|
|
24164
|
-
return prop !== "isAxiosError";
|
|
24098
|
+
// ../../../node_modules/axios/lib/helpers/parseHeaders.js
|
|
24099
|
+
var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
24100
|
+
"age",
|
|
24101
|
+
"authorization",
|
|
24102
|
+
"content-length",
|
|
24103
|
+
"content-type",
|
|
24104
|
+
"etag",
|
|
24105
|
+
"expires",
|
|
24106
|
+
"from",
|
|
24107
|
+
"host",
|
|
24108
|
+
"if-modified-since",
|
|
24109
|
+
"if-unmodified-since",
|
|
24110
|
+
"last-modified",
|
|
24111
|
+
"location",
|
|
24112
|
+
"max-forwards",
|
|
24113
|
+
"proxy-authorization",
|
|
24114
|
+
"referer",
|
|
24115
|
+
"retry-after",
|
|
24116
|
+
"user-agent"
|
|
24117
|
+
]);
|
|
24118
|
+
var parseHeaders_default = (rawHeaders) => {
|
|
24119
|
+
const parsed = {};
|
|
24120
|
+
let key;
|
|
24121
|
+
let val;
|
|
24122
|
+
let i;
|
|
24123
|
+
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
24124
|
+
i = line.indexOf(":");
|
|
24125
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
24126
|
+
val = line.substring(i + 1).trim();
|
|
24127
|
+
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
24128
|
+
return;
|
|
24129
|
+
}
|
|
24130
|
+
if (key === "set-cookie") {
|
|
24131
|
+
if (parsed[key]) {
|
|
24132
|
+
parsed[key].push(val);
|
|
24133
|
+
} else {
|
|
24134
|
+
parsed[key] = [val];
|
|
24135
|
+
}
|
|
24136
|
+
} else {
|
|
24137
|
+
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
24138
|
+
}
|
|
24165
24139
|
});
|
|
24166
|
-
|
|
24167
|
-
const errCode = code == null && error ? error.code : code;
|
|
24168
|
-
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
24169
|
-
if (error && axiosError.cause == null) {
|
|
24170
|
-
Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
|
|
24171
|
-
}
|
|
24172
|
-
axiosError.name = error && error.name || "Error";
|
|
24173
|
-
customProps && Object.assign(axiosError, customProps);
|
|
24174
|
-
return axiosError;
|
|
24140
|
+
return parsed;
|
|
24175
24141
|
};
|
|
24176
|
-
var AxiosError_default = AxiosError;
|
|
24177
|
-
|
|
24178
|
-
// ../../../node_modules/axios/lib/platform/node/classes/FormData.js
|
|
24179
|
-
var import_form_data = __toESM(require_form_data(), 1);
|
|
24180
|
-
var FormData_default = import_form_data.default;
|
|
24181
24142
|
|
|
24182
|
-
// ../../../node_modules/axios/lib/
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
|
|
24186
|
-
|
|
24187
|
-
|
|
24143
|
+
// ../../../node_modules/axios/lib/core/AxiosHeaders.js
|
|
24144
|
+
var $internals = /* @__PURE__ */ Symbol("internals");
|
|
24145
|
+
var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
24146
|
+
function trimSPorHTAB(str) {
|
|
24147
|
+
let start = 0;
|
|
24148
|
+
let end = str.length;
|
|
24149
|
+
while (start < end) {
|
|
24150
|
+
const code = str.charCodeAt(start);
|
|
24151
|
+
if (code !== 9 && code !== 32) {
|
|
24152
|
+
break;
|
|
24153
|
+
}
|
|
24154
|
+
start += 1;
|
|
24155
|
+
}
|
|
24156
|
+
while (end > start) {
|
|
24157
|
+
const code = str.charCodeAt(end - 1);
|
|
24158
|
+
if (code !== 9 && code !== 32) {
|
|
24159
|
+
break;
|
|
24160
|
+
}
|
|
24161
|
+
end -= 1;
|
|
24162
|
+
}
|
|
24163
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
24188
24164
|
}
|
|
24189
|
-
function
|
|
24190
|
-
|
|
24191
|
-
return path.concat(key).map(function each(token, i) {
|
|
24192
|
-
token = removeBrackets(token);
|
|
24193
|
-
return !dots && i ? "[" + token + "]" : token;
|
|
24194
|
-
}).join(dots ? "." : "");
|
|
24165
|
+
function normalizeHeader(header) {
|
|
24166
|
+
return header && String(header).trim().toLowerCase();
|
|
24195
24167
|
}
|
|
24196
|
-
function
|
|
24197
|
-
return
|
|
24168
|
+
function sanitizeHeaderValue(str) {
|
|
24169
|
+
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
|
|
24198
24170
|
}
|
|
24199
|
-
|
|
24200
|
-
|
|
24201
|
-
|
|
24202
|
-
function toFormData(obj, formData, options) {
|
|
24203
|
-
if (!utils_default.isObject(obj)) {
|
|
24204
|
-
throw new TypeError("target must be an object");
|
|
24171
|
+
function normalizeValue(value) {
|
|
24172
|
+
if (value === false || value == null) {
|
|
24173
|
+
return value;
|
|
24205
24174
|
}
|
|
24206
|
-
|
|
24207
|
-
|
|
24208
|
-
|
|
24209
|
-
|
|
24210
|
-
|
|
24211
|
-
|
|
24212
|
-
|
|
24213
|
-
|
|
24214
|
-
const metaTokens = options.metaTokens;
|
|
24215
|
-
const visitor = options.visitor || defaultVisitor;
|
|
24216
|
-
const dots = options.dots;
|
|
24217
|
-
const indexes = options.indexes;
|
|
24218
|
-
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
24219
|
-
const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
|
|
24220
|
-
if (!utils_default.isFunction(visitor)) {
|
|
24221
|
-
throw new TypeError("visitor must be a function");
|
|
24175
|
+
return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
24176
|
+
}
|
|
24177
|
+
function parseTokens(str) {
|
|
24178
|
+
const tokens = /* @__PURE__ */ Object.create(null);
|
|
24179
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
24180
|
+
let match;
|
|
24181
|
+
while (match = tokensRE.exec(str)) {
|
|
24182
|
+
tokens[match[1]] = match[2];
|
|
24222
24183
|
}
|
|
24223
|
-
|
|
24224
|
-
|
|
24225
|
-
|
|
24226
|
-
|
|
24227
|
-
|
|
24228
|
-
|
|
24229
|
-
return value.toString();
|
|
24230
|
-
}
|
|
24231
|
-
if (!useBlob && utils_default.isBlob(value)) {
|
|
24232
|
-
throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
|
|
24233
|
-
}
|
|
24234
|
-
if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
|
|
24235
|
-
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
24236
|
-
}
|
|
24237
|
-
return value;
|
|
24184
|
+
return tokens;
|
|
24185
|
+
}
|
|
24186
|
+
var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
24187
|
+
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
24188
|
+
if (utils_default.isFunction(filter2)) {
|
|
24189
|
+
return filter2.call(this, value, header);
|
|
24238
24190
|
}
|
|
24239
|
-
|
|
24240
|
-
|
|
24241
|
-
if (value && !path && typeof value === "object") {
|
|
24242
|
-
if (utils_default.endsWith(key, "{}")) {
|
|
24243
|
-
key = metaTokens ? key : key.slice(0, -2);
|
|
24244
|
-
value = JSON.stringify(value);
|
|
24245
|
-
} else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
|
|
24246
|
-
key = removeBrackets(key);
|
|
24247
|
-
arr.forEach(function each(el, index) {
|
|
24248
|
-
!(utils_default.isUndefined(el) || el === null) && formData.append(
|
|
24249
|
-
// eslint-disable-next-line no-nested-ternary
|
|
24250
|
-
indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
|
|
24251
|
-
convertValue(el)
|
|
24252
|
-
);
|
|
24253
|
-
});
|
|
24254
|
-
return false;
|
|
24255
|
-
}
|
|
24256
|
-
}
|
|
24257
|
-
if (isVisitable(value)) {
|
|
24258
|
-
return true;
|
|
24259
|
-
}
|
|
24260
|
-
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
24261
|
-
return false;
|
|
24191
|
+
if (isHeaderNameFilter) {
|
|
24192
|
+
value = header;
|
|
24262
24193
|
}
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
convertValue,
|
|
24267
|
-
isVisitable
|
|
24268
|
-
});
|
|
24269
|
-
function build(value, path) {
|
|
24270
|
-
if (utils_default.isUndefined(value)) return;
|
|
24271
|
-
if (stack.indexOf(value) !== -1) {
|
|
24272
|
-
throw Error("Circular reference detected in " + path.join("."));
|
|
24273
|
-
}
|
|
24274
|
-
stack.push(value);
|
|
24275
|
-
utils_default.forEach(value, function each(el, key) {
|
|
24276
|
-
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
|
|
24277
|
-
formData,
|
|
24278
|
-
el,
|
|
24279
|
-
utils_default.isString(key) ? key.trim() : key,
|
|
24280
|
-
path,
|
|
24281
|
-
exposedHelpers
|
|
24282
|
-
);
|
|
24283
|
-
if (result === true) {
|
|
24284
|
-
build(el, path ? path.concat(key) : [key]);
|
|
24285
|
-
}
|
|
24286
|
-
});
|
|
24287
|
-
stack.pop();
|
|
24194
|
+
if (!utils_default.isString(value)) return;
|
|
24195
|
+
if (utils_default.isString(filter2)) {
|
|
24196
|
+
return value.indexOf(filter2) !== -1;
|
|
24288
24197
|
}
|
|
24289
|
-
if (
|
|
24290
|
-
|
|
24198
|
+
if (utils_default.isRegExp(filter2)) {
|
|
24199
|
+
return filter2.test(value);
|
|
24291
24200
|
}
|
|
24292
|
-
build(obj);
|
|
24293
|
-
return formData;
|
|
24294
24201
|
}
|
|
24295
|
-
|
|
24296
|
-
|
|
24297
|
-
|
|
24298
|
-
function encode(str) {
|
|
24299
|
-
const charMap = {
|
|
24300
|
-
"!": "%21",
|
|
24301
|
-
"'": "%27",
|
|
24302
|
-
"(": "%28",
|
|
24303
|
-
")": "%29",
|
|
24304
|
-
"~": "%7E",
|
|
24305
|
-
"%20": "+",
|
|
24306
|
-
"%00": "\0"
|
|
24307
|
-
};
|
|
24308
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
24309
|
-
return charMap[match];
|
|
24202
|
+
function formatHeader(header) {
|
|
24203
|
+
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
24204
|
+
return char.toUpperCase() + str;
|
|
24310
24205
|
});
|
|
24311
24206
|
}
|
|
24312
|
-
function
|
|
24313
|
-
|
|
24314
|
-
|
|
24315
|
-
|
|
24316
|
-
|
|
24317
|
-
|
|
24318
|
-
|
|
24319
|
-
|
|
24320
|
-
|
|
24321
|
-
|
|
24322
|
-
|
|
24323
|
-
|
|
24324
|
-
|
|
24325
|
-
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
24326
|
-
}, "").join("&");
|
|
24327
|
-
};
|
|
24328
|
-
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
|
24329
|
-
|
|
24330
|
-
// ../../../node_modules/axios/lib/helpers/buildURL.js
|
|
24331
|
-
function encode2(val) {
|
|
24332
|
-
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
24207
|
+
function buildAccessors(obj, header) {
|
|
24208
|
+
const accessorName = utils_default.toCamelCase(" " + header);
|
|
24209
|
+
["get", "set", "has"].forEach((methodName) => {
|
|
24210
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
24211
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
24212
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
24213
|
+
__proto__: null,
|
|
24214
|
+
value: function(arg1, arg2, arg3) {
|
|
24215
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
24216
|
+
},
|
|
24217
|
+
configurable: true
|
|
24218
|
+
});
|
|
24219
|
+
});
|
|
24333
24220
|
}
|
|
24334
|
-
|
|
24335
|
-
|
|
24336
|
-
|
|
24337
|
-
}
|
|
24338
|
-
const _encode = options && options.encode || encode2;
|
|
24339
|
-
if (utils_default.isFunction(options)) {
|
|
24340
|
-
options = {
|
|
24341
|
-
serialize: options
|
|
24342
|
-
};
|
|
24343
|
-
}
|
|
24344
|
-
const serializeFn = options && options.serialize;
|
|
24345
|
-
let serializedParams;
|
|
24346
|
-
if (serializeFn) {
|
|
24347
|
-
serializedParams = serializeFn(params, options);
|
|
24348
|
-
} else {
|
|
24349
|
-
serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode);
|
|
24221
|
+
var AxiosHeaders = class {
|
|
24222
|
+
constructor(headers) {
|
|
24223
|
+
headers && this.set(headers);
|
|
24350
24224
|
}
|
|
24351
|
-
|
|
24352
|
-
const
|
|
24353
|
-
|
|
24354
|
-
|
|
24225
|
+
set(header, valueOrRewrite, rewrite) {
|
|
24226
|
+
const self2 = this;
|
|
24227
|
+
function setHeader(_value, _header, _rewrite) {
|
|
24228
|
+
const lHeader = normalizeHeader(_header);
|
|
24229
|
+
if (!lHeader) {
|
|
24230
|
+
throw new Error("header name must be a non-empty string");
|
|
24231
|
+
}
|
|
24232
|
+
const key = utils_default.findKey(self2, lHeader);
|
|
24233
|
+
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
24234
|
+
self2[key || _header] = normalizeValue(_value);
|
|
24235
|
+
}
|
|
24355
24236
|
}
|
|
24356
|
-
|
|
24237
|
+
const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
24238
|
+
if (utils_default.isPlainObject(header) || header instanceof this.constructor) {
|
|
24239
|
+
setHeaders(header, valueOrRewrite);
|
|
24240
|
+
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
24241
|
+
setHeaders(parseHeaders_default(header), valueOrRewrite);
|
|
24242
|
+
} else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
|
|
24243
|
+
let obj = {}, dest, key;
|
|
24244
|
+
for (const entry of header) {
|
|
24245
|
+
if (!utils_default.isArray(entry)) {
|
|
24246
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
24247
|
+
}
|
|
24248
|
+
obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
24249
|
+
}
|
|
24250
|
+
setHeaders(obj, valueOrRewrite);
|
|
24251
|
+
} else {
|
|
24252
|
+
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
24253
|
+
}
|
|
24254
|
+
return this;
|
|
24357
24255
|
}
|
|
24358
|
-
|
|
24359
|
-
|
|
24360
|
-
|
|
24361
|
-
|
|
24362
|
-
|
|
24363
|
-
|
|
24364
|
-
|
|
24256
|
+
get(header, parser) {
|
|
24257
|
+
header = normalizeHeader(header);
|
|
24258
|
+
if (header) {
|
|
24259
|
+
const key = utils_default.findKey(this, header);
|
|
24260
|
+
if (key) {
|
|
24261
|
+
const value = this[key];
|
|
24262
|
+
if (!parser) {
|
|
24263
|
+
return value;
|
|
24264
|
+
}
|
|
24265
|
+
if (parser === true) {
|
|
24266
|
+
return parseTokens(value);
|
|
24267
|
+
}
|
|
24268
|
+
if (utils_default.isFunction(parser)) {
|
|
24269
|
+
return parser.call(this, value, key);
|
|
24270
|
+
}
|
|
24271
|
+
if (utils_default.isRegExp(parser)) {
|
|
24272
|
+
return parser.exec(value);
|
|
24273
|
+
}
|
|
24274
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
24275
|
+
}
|
|
24276
|
+
}
|
|
24365
24277
|
}
|
|
24366
|
-
|
|
24367
|
-
|
|
24368
|
-
|
|
24369
|
-
|
|
24370
|
-
|
|
24371
|
-
|
|
24372
|
-
|
|
24373
|
-
*/
|
|
24374
|
-
use(fulfilled, rejected, options) {
|
|
24375
|
-
this.handlers.push({
|
|
24376
|
-
fulfilled,
|
|
24377
|
-
rejected,
|
|
24378
|
-
synchronous: options ? options.synchronous : false,
|
|
24379
|
-
runWhen: options ? options.runWhen : null
|
|
24380
|
-
});
|
|
24381
|
-
return this.handlers.length - 1;
|
|
24278
|
+
has(header, matcher) {
|
|
24279
|
+
header = normalizeHeader(header);
|
|
24280
|
+
if (header) {
|
|
24281
|
+
const key = utils_default.findKey(this, header);
|
|
24282
|
+
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
24283
|
+
}
|
|
24284
|
+
return false;
|
|
24382
24285
|
}
|
|
24383
|
-
|
|
24384
|
-
|
|
24385
|
-
|
|
24386
|
-
|
|
24387
|
-
|
|
24388
|
-
|
|
24389
|
-
|
|
24390
|
-
|
|
24391
|
-
|
|
24392
|
-
|
|
24286
|
+
delete(header, matcher) {
|
|
24287
|
+
const self2 = this;
|
|
24288
|
+
let deleted = false;
|
|
24289
|
+
function deleteHeader(_header) {
|
|
24290
|
+
_header = normalizeHeader(_header);
|
|
24291
|
+
if (_header) {
|
|
24292
|
+
const key = utils_default.findKey(self2, _header);
|
|
24293
|
+
if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
|
|
24294
|
+
delete self2[key];
|
|
24295
|
+
deleted = true;
|
|
24296
|
+
}
|
|
24297
|
+
}
|
|
24298
|
+
}
|
|
24299
|
+
if (utils_default.isArray(header)) {
|
|
24300
|
+
header.forEach(deleteHeader);
|
|
24301
|
+
} else {
|
|
24302
|
+
deleteHeader(header);
|
|
24393
24303
|
}
|
|
24304
|
+
return deleted;
|
|
24394
24305
|
}
|
|
24395
|
-
|
|
24396
|
-
|
|
24397
|
-
|
|
24398
|
-
|
|
24399
|
-
|
|
24400
|
-
|
|
24401
|
-
|
|
24402
|
-
|
|
24306
|
+
clear(matcher) {
|
|
24307
|
+
const keys = Object.keys(this);
|
|
24308
|
+
let i = keys.length;
|
|
24309
|
+
let deleted = false;
|
|
24310
|
+
while (i--) {
|
|
24311
|
+
const key = keys[i];
|
|
24312
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
24313
|
+
delete this[key];
|
|
24314
|
+
deleted = true;
|
|
24315
|
+
}
|
|
24403
24316
|
}
|
|
24317
|
+
return deleted;
|
|
24404
24318
|
}
|
|
24405
|
-
|
|
24406
|
-
|
|
24407
|
-
|
|
24408
|
-
|
|
24409
|
-
|
|
24410
|
-
|
|
24411
|
-
|
|
24412
|
-
|
|
24413
|
-
|
|
24414
|
-
|
|
24415
|
-
|
|
24416
|
-
|
|
24417
|
-
|
|
24418
|
-
fn(h);
|
|
24319
|
+
normalize(format2) {
|
|
24320
|
+
const self2 = this;
|
|
24321
|
+
const headers = {};
|
|
24322
|
+
utils_default.forEach(this, (value, header) => {
|
|
24323
|
+
const key = utils_default.findKey(headers, header);
|
|
24324
|
+
if (key) {
|
|
24325
|
+
self2[key] = normalizeValue(value);
|
|
24326
|
+
delete self2[header];
|
|
24327
|
+
return;
|
|
24328
|
+
}
|
|
24329
|
+
const normalized = format2 ? formatHeader(header) : String(header).trim();
|
|
24330
|
+
if (normalized !== header) {
|
|
24331
|
+
delete self2[header];
|
|
24419
24332
|
}
|
|
24333
|
+
self2[normalized] = normalizeValue(value);
|
|
24334
|
+
headers[normalized] = true;
|
|
24420
24335
|
});
|
|
24336
|
+
return this;
|
|
24421
24337
|
}
|
|
24422
|
-
|
|
24423
|
-
|
|
24424
|
-
|
|
24425
|
-
|
|
24426
|
-
|
|
24427
|
-
|
|
24428
|
-
|
|
24429
|
-
|
|
24430
|
-
|
|
24431
|
-
|
|
24432
|
-
|
|
24433
|
-
|
|
24434
|
-
|
|
24435
|
-
|
|
24436
|
-
|
|
24437
|
-
|
|
24438
|
-
|
|
24439
|
-
|
|
24440
|
-
|
|
24441
|
-
|
|
24442
|
-
|
|
24443
|
-
|
|
24444
|
-
|
|
24445
|
-
|
|
24446
|
-
}
|
|
24447
|
-
|
|
24448
|
-
|
|
24449
|
-
|
|
24450
|
-
|
|
24451
|
-
|
|
24452
|
-
|
|
24453
|
-
|
|
24338
|
+
concat(...targets) {
|
|
24339
|
+
return this.constructor.concat(this, ...targets);
|
|
24340
|
+
}
|
|
24341
|
+
toJSON(asStrings) {
|
|
24342
|
+
const obj = /* @__PURE__ */ Object.create(null);
|
|
24343
|
+
utils_default.forEach(this, (value, header) => {
|
|
24344
|
+
value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
|
|
24345
|
+
});
|
|
24346
|
+
return obj;
|
|
24347
|
+
}
|
|
24348
|
+
[Symbol.iterator]() {
|
|
24349
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
24350
|
+
}
|
|
24351
|
+
toString() {
|
|
24352
|
+
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
24353
|
+
}
|
|
24354
|
+
getSetCookie() {
|
|
24355
|
+
return this.get("set-cookie") || [];
|
|
24356
|
+
}
|
|
24357
|
+
get [Symbol.toStringTag]() {
|
|
24358
|
+
return "AxiosHeaders";
|
|
24359
|
+
}
|
|
24360
|
+
static from(thing) {
|
|
24361
|
+
return thing instanceof this ? thing : new this(thing);
|
|
24362
|
+
}
|
|
24363
|
+
static concat(first, ...targets) {
|
|
24364
|
+
const computed = new this(first);
|
|
24365
|
+
targets.forEach((target) => computed.set(target));
|
|
24366
|
+
return computed;
|
|
24367
|
+
}
|
|
24368
|
+
static accessor(header) {
|
|
24369
|
+
const internals = this[$internals] = this[$internals] = {
|
|
24370
|
+
accessors: {}
|
|
24371
|
+
};
|
|
24372
|
+
const accessors = internals.accessors;
|
|
24373
|
+
const prototype2 = this.prototype;
|
|
24374
|
+
function defineAccessor(_header) {
|
|
24375
|
+
const lHeader = normalizeHeader(_header);
|
|
24376
|
+
if (!accessors[lHeader]) {
|
|
24377
|
+
buildAccessors(prototype2, _header);
|
|
24378
|
+
accessors[lHeader] = true;
|
|
24379
|
+
}
|
|
24380
|
+
}
|
|
24381
|
+
utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
24382
|
+
return this;
|
|
24454
24383
|
}
|
|
24455
|
-
return str;
|
|
24456
|
-
};
|
|
24457
|
-
var node_default = {
|
|
24458
|
-
isNode: true,
|
|
24459
|
-
classes: {
|
|
24460
|
-
URLSearchParams: URLSearchParams_default,
|
|
24461
|
-
FormData: FormData_default,
|
|
24462
|
-
Blob: typeof Blob !== "undefined" && Blob || null
|
|
24463
|
-
},
|
|
24464
|
-
ALPHABET,
|
|
24465
|
-
generateString,
|
|
24466
|
-
protocols: ["http", "https", "file", "data"]
|
|
24467
24384
|
};
|
|
24468
|
-
|
|
24469
|
-
|
|
24470
|
-
|
|
24471
|
-
|
|
24472
|
-
|
|
24473
|
-
|
|
24474
|
-
|
|
24475
|
-
|
|
24476
|
-
|
|
24385
|
+
AxiosHeaders.accessor([
|
|
24386
|
+
"Content-Type",
|
|
24387
|
+
"Content-Length",
|
|
24388
|
+
"Accept",
|
|
24389
|
+
"Accept-Encoding",
|
|
24390
|
+
"User-Agent",
|
|
24391
|
+
"Authorization"
|
|
24392
|
+
]);
|
|
24393
|
+
utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
24394
|
+
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
24395
|
+
return {
|
|
24396
|
+
get: () => value,
|
|
24397
|
+
set(headerValue) {
|
|
24398
|
+
this[mapped] = headerValue;
|
|
24399
|
+
}
|
|
24400
|
+
};
|
|
24477
24401
|
});
|
|
24478
|
-
|
|
24479
|
-
var
|
|
24480
|
-
var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
24481
|
-
var hasStandardBrowserWebWorkerEnv = (() => {
|
|
24482
|
-
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
24483
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
24484
|
-
})();
|
|
24485
|
-
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
24486
|
-
|
|
24487
|
-
// ../../../node_modules/axios/lib/platform/index.js
|
|
24488
|
-
var platform_default = {
|
|
24489
|
-
...utils_exports,
|
|
24490
|
-
...node_default
|
|
24491
|
-
};
|
|
24492
|
-
|
|
24493
|
-
// ../../../node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
24494
|
-
function toURLEncodedForm(data, options) {
|
|
24495
|
-
return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
|
|
24496
|
-
visitor: function(value, key, path, helpers) {
|
|
24497
|
-
if (platform_default.isNode && utils_default.isBuffer(value)) {
|
|
24498
|
-
this.append(key, value.toString("base64"));
|
|
24499
|
-
return false;
|
|
24500
|
-
}
|
|
24501
|
-
return helpers.defaultVisitor.apply(this, arguments);
|
|
24502
|
-
},
|
|
24503
|
-
...options
|
|
24504
|
-
});
|
|
24505
|
-
}
|
|
24402
|
+
utils_default.freezeMethods(AxiosHeaders);
|
|
24403
|
+
var AxiosHeaders_default = AxiosHeaders;
|
|
24506
24404
|
|
|
24507
|
-
// ../../../node_modules/axios/lib/
|
|
24508
|
-
|
|
24509
|
-
|
|
24510
|
-
|
|
24511
|
-
|
|
24512
|
-
}
|
|
24513
|
-
function arrayToObject(arr) {
|
|
24514
|
-
const obj = {};
|
|
24515
|
-
const keys = Object.keys(arr);
|
|
24516
|
-
let i;
|
|
24517
|
-
const len = keys.length;
|
|
24518
|
-
let key;
|
|
24519
|
-
for (i = 0; i < len; i++) {
|
|
24520
|
-
key = keys[i];
|
|
24521
|
-
obj[key] = arr[key];
|
|
24405
|
+
// ../../../node_modules/axios/lib/core/AxiosError.js
|
|
24406
|
+
var REDACTED = "[REDACTED ****]";
|
|
24407
|
+
function hasOwnOrPrototypeToJSON(source) {
|
|
24408
|
+
if (utils_default.hasOwnProp(source, "toJSON")) {
|
|
24409
|
+
return true;
|
|
24522
24410
|
}
|
|
24523
|
-
|
|
24411
|
+
let prototype2 = Object.getPrototypeOf(source);
|
|
24412
|
+
while (prototype2 && prototype2 !== Object.prototype) {
|
|
24413
|
+
if (utils_default.hasOwnProp(prototype2, "toJSON")) {
|
|
24414
|
+
return true;
|
|
24415
|
+
}
|
|
24416
|
+
prototype2 = Object.getPrototypeOf(prototype2);
|
|
24417
|
+
}
|
|
24418
|
+
return false;
|
|
24524
24419
|
}
|
|
24525
|
-
function
|
|
24526
|
-
|
|
24527
|
-
|
|
24528
|
-
|
|
24529
|
-
|
|
24530
|
-
|
|
24531
|
-
|
|
24532
|
-
if (
|
|
24533
|
-
|
|
24534
|
-
|
|
24535
|
-
|
|
24536
|
-
|
|
24420
|
+
function redactConfig(config, redactKeys) {
|
|
24421
|
+
const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
|
|
24422
|
+
const seen = [];
|
|
24423
|
+
const visit = (source) => {
|
|
24424
|
+
if (source === null || typeof source !== "object") return source;
|
|
24425
|
+
if (utils_default.isBuffer(source)) return source;
|
|
24426
|
+
if (seen.indexOf(source) !== -1) return void 0;
|
|
24427
|
+
if (source instanceof AxiosHeaders_default) {
|
|
24428
|
+
source = source.toJSON();
|
|
24429
|
+
}
|
|
24430
|
+
seen.push(source);
|
|
24431
|
+
let result;
|
|
24432
|
+
if (utils_default.isArray(source)) {
|
|
24433
|
+
result = [];
|
|
24434
|
+
source.forEach((v, i) => {
|
|
24435
|
+
const reducedValue = visit(v);
|
|
24436
|
+
if (!utils_default.isUndefined(reducedValue)) {
|
|
24437
|
+
result[i] = reducedValue;
|
|
24438
|
+
}
|
|
24439
|
+
});
|
|
24440
|
+
} else {
|
|
24441
|
+
if (!utils_default.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
|
|
24442
|
+
seen.pop();
|
|
24443
|
+
return source;
|
|
24444
|
+
}
|
|
24445
|
+
result = /* @__PURE__ */ Object.create(null);
|
|
24446
|
+
for (const [key, value] of Object.entries(source)) {
|
|
24447
|
+
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
|
|
24448
|
+
if (!utils_default.isUndefined(reducedValue)) {
|
|
24449
|
+
result[key] = reducedValue;
|
|
24450
|
+
}
|
|
24537
24451
|
}
|
|
24538
|
-
return !isNumericKey;
|
|
24539
|
-
}
|
|
24540
|
-
if (!target[name] || !utils_default.isObject(target[name])) {
|
|
24541
|
-
target[name] = [];
|
|
24542
24452
|
}
|
|
24543
|
-
|
|
24544
|
-
|
|
24545
|
-
|
|
24453
|
+
seen.pop();
|
|
24454
|
+
return result;
|
|
24455
|
+
};
|
|
24456
|
+
return visit(config);
|
|
24457
|
+
}
|
|
24458
|
+
var AxiosError = class _AxiosError extends Error {
|
|
24459
|
+
static from(error, code, config, request, response, customProps) {
|
|
24460
|
+
const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
|
|
24461
|
+
axiosError.cause = error;
|
|
24462
|
+
axiosError.name = error.name;
|
|
24463
|
+
if (error.status != null && axiosError.status == null) {
|
|
24464
|
+
axiosError.status = error.status;
|
|
24546
24465
|
}
|
|
24547
|
-
|
|
24466
|
+
customProps && Object.assign(axiosError, customProps);
|
|
24467
|
+
return axiosError;
|
|
24548
24468
|
}
|
|
24549
|
-
|
|
24550
|
-
|
|
24551
|
-
|
|
24552
|
-
|
|
24469
|
+
/**
|
|
24470
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
24471
|
+
*
|
|
24472
|
+
* @param {string} message The error message.
|
|
24473
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
24474
|
+
* @param {Object} [config] The config.
|
|
24475
|
+
* @param {Object} [request] The request.
|
|
24476
|
+
* @param {Object} [response] The response.
|
|
24477
|
+
*
|
|
24478
|
+
* @returns {Error} The created error.
|
|
24479
|
+
*/
|
|
24480
|
+
constructor(message, code, config, request, response) {
|
|
24481
|
+
super(message);
|
|
24482
|
+
Object.defineProperty(this, "message", {
|
|
24483
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
24484
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
24485
|
+
__proto__: null,
|
|
24486
|
+
value: message,
|
|
24487
|
+
enumerable: true,
|
|
24488
|
+
writable: true,
|
|
24489
|
+
configurable: true
|
|
24553
24490
|
});
|
|
24554
|
-
|
|
24491
|
+
this.name = "AxiosError";
|
|
24492
|
+
this.isAxiosError = true;
|
|
24493
|
+
code && (this.code = code);
|
|
24494
|
+
config && (this.config = config);
|
|
24495
|
+
request && (this.request = request);
|
|
24496
|
+
if (response) {
|
|
24497
|
+
this.response = response;
|
|
24498
|
+
this.status = response.status;
|
|
24499
|
+
}
|
|
24500
|
+
}
|
|
24501
|
+
toJSON() {
|
|
24502
|
+
const config = this.config;
|
|
24503
|
+
const redactKeys = config && utils_default.hasOwnProp(config, "redact") ? config.redact : void 0;
|
|
24504
|
+
const serializedConfig = utils_default.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils_default.toJSONObject(config);
|
|
24505
|
+
return {
|
|
24506
|
+
// Standard
|
|
24507
|
+
message: this.message,
|
|
24508
|
+
name: this.name,
|
|
24509
|
+
// Microsoft
|
|
24510
|
+
description: this.description,
|
|
24511
|
+
number: this.number,
|
|
24512
|
+
// Mozilla
|
|
24513
|
+
fileName: this.fileName,
|
|
24514
|
+
lineNumber: this.lineNumber,
|
|
24515
|
+
columnNumber: this.columnNumber,
|
|
24516
|
+
stack: this.stack,
|
|
24517
|
+
// Axios
|
|
24518
|
+
config: serializedConfig,
|
|
24519
|
+
code: this.code,
|
|
24520
|
+
status: this.status
|
|
24521
|
+
};
|
|
24555
24522
|
}
|
|
24556
|
-
|
|
24557
|
-
|
|
24558
|
-
|
|
24523
|
+
};
|
|
24524
|
+
AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
24525
|
+
AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
24526
|
+
AxiosError.ECONNABORTED = "ECONNABORTED";
|
|
24527
|
+
AxiosError.ETIMEDOUT = "ETIMEDOUT";
|
|
24528
|
+
AxiosError.ECONNREFUSED = "ECONNREFUSED";
|
|
24529
|
+
AxiosError.ERR_NETWORK = "ERR_NETWORK";
|
|
24530
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
24531
|
+
AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
24532
|
+
AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
24533
|
+
AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
24534
|
+
AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
24535
|
+
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
24536
|
+
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
24537
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
24538
|
+
var AxiosError_default = AxiosError;
|
|
24559
24539
|
|
|
24560
|
-
// ../../../node_modules/axios/lib/
|
|
24561
|
-
|
|
24562
|
-
|
|
24563
|
-
|
|
24564
|
-
|
|
24565
|
-
|
|
24566
|
-
|
|
24567
|
-
if (e.name !== "SyntaxError") {
|
|
24568
|
-
throw e;
|
|
24569
|
-
}
|
|
24570
|
-
}
|
|
24571
|
-
}
|
|
24572
|
-
return (encoder || JSON.stringify)(rawValue);
|
|
24540
|
+
// ../../../node_modules/axios/lib/platform/node/classes/FormData.js
|
|
24541
|
+
var import_form_data = __toESM(require_form_data(), 1);
|
|
24542
|
+
var FormData_default = import_form_data.default;
|
|
24543
|
+
|
|
24544
|
+
// ../../../node_modules/axios/lib/helpers/toFormData.js
|
|
24545
|
+
function isVisitable(thing) {
|
|
24546
|
+
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
|
|
24573
24547
|
}
|
|
24574
|
-
|
|
24575
|
-
|
|
24576
|
-
|
|
24577
|
-
|
|
24578
|
-
|
|
24579
|
-
|
|
24580
|
-
|
|
24581
|
-
|
|
24582
|
-
|
|
24583
|
-
|
|
24584
|
-
|
|
24585
|
-
|
|
24586
|
-
|
|
24587
|
-
|
|
24588
|
-
|
|
24589
|
-
|
|
24590
|
-
|
|
24591
|
-
|
|
24592
|
-
|
|
24548
|
+
function removeBrackets(key) {
|
|
24549
|
+
return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
24550
|
+
}
|
|
24551
|
+
function renderKey(path, key, dots) {
|
|
24552
|
+
if (!path) return key;
|
|
24553
|
+
return path.concat(key).map(function each(token, i) {
|
|
24554
|
+
token = removeBrackets(token);
|
|
24555
|
+
return !dots && i ? "[" + token + "]" : token;
|
|
24556
|
+
}).join(dots ? "." : "");
|
|
24557
|
+
}
|
|
24558
|
+
function isFlatArray(arr) {
|
|
24559
|
+
return utils_default.isArray(arr) && !arr.some(isVisitable);
|
|
24560
|
+
}
|
|
24561
|
+
var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) {
|
|
24562
|
+
return /^is[A-Z]/.test(prop);
|
|
24563
|
+
});
|
|
24564
|
+
function toFormData(obj, formData, options) {
|
|
24565
|
+
if (!utils_default.isObject(obj)) {
|
|
24566
|
+
throw new TypeError("target must be an object");
|
|
24567
|
+
}
|
|
24568
|
+
formData = formData || new (FormData_default || FormData)();
|
|
24569
|
+
options = utils_default.toFlatObject(
|
|
24570
|
+
options,
|
|
24571
|
+
{
|
|
24572
|
+
metaTokens: true,
|
|
24573
|
+
dots: false,
|
|
24574
|
+
indexes: false
|
|
24575
|
+
},
|
|
24576
|
+
false,
|
|
24577
|
+
function defined(option, source) {
|
|
24578
|
+
return !utils_default.isUndefined(source[option]);
|
|
24593
24579
|
}
|
|
24594
|
-
|
|
24595
|
-
|
|
24596
|
-
|
|
24580
|
+
);
|
|
24581
|
+
const metaTokens = options.metaTokens;
|
|
24582
|
+
const visitor = options.visitor || defaultVisitor;
|
|
24583
|
+
const dots = options.dots;
|
|
24584
|
+
const indexes = options.indexes;
|
|
24585
|
+
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
24586
|
+
const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
|
|
24587
|
+
const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
|
|
24588
|
+
if (!utils_default.isFunction(visitor)) {
|
|
24589
|
+
throw new TypeError("visitor must be a function");
|
|
24590
|
+
}
|
|
24591
|
+
function convertValue(value) {
|
|
24592
|
+
if (value === null) return "";
|
|
24593
|
+
if (utils_default.isDate(value)) {
|
|
24594
|
+
return value.toISOString();
|
|
24597
24595
|
}
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
24601
|
-
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
24602
|
-
}
|
|
24603
|
-
if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
24604
|
-
const _FormData = this.env && this.env.FormData;
|
|
24605
|
-
return toFormData_default(
|
|
24606
|
-
isFileList2 ? { "files[]": data } : data,
|
|
24607
|
-
_FormData && new _FormData(),
|
|
24608
|
-
this.formSerializer
|
|
24609
|
-
);
|
|
24610
|
-
}
|
|
24596
|
+
if (utils_default.isBoolean(value)) {
|
|
24597
|
+
return value.toString();
|
|
24611
24598
|
}
|
|
24612
|
-
if (
|
|
24613
|
-
|
|
24614
|
-
return stringifySafely(data);
|
|
24599
|
+
if (!useBlob && utils_default.isBlob(value)) {
|
|
24600
|
+
throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
|
|
24615
24601
|
}
|
|
24616
|
-
|
|
24617
|
-
|
|
24618
|
-
transformResponse: [function transformResponse(data) {
|
|
24619
|
-
const transitional2 = this.transitional || defaults.transitional;
|
|
24620
|
-
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
24621
|
-
const JSONRequested = this.responseType === "json";
|
|
24622
|
-
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
24623
|
-
return data;
|
|
24602
|
+
if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
|
|
24603
|
+
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
24624
24604
|
}
|
|
24625
|
-
|
|
24626
|
-
|
|
24627
|
-
|
|
24628
|
-
|
|
24629
|
-
|
|
24630
|
-
|
|
24631
|
-
|
|
24632
|
-
if (e.name === "SyntaxError") {
|
|
24633
|
-
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
|
|
24634
|
-
}
|
|
24635
|
-
throw e;
|
|
24636
|
-
}
|
|
24637
|
-
}
|
|
24605
|
+
return value;
|
|
24606
|
+
}
|
|
24607
|
+
function defaultVisitor(value, key, path) {
|
|
24608
|
+
let arr = value;
|
|
24609
|
+
if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
|
|
24610
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
24611
|
+
return false;
|
|
24638
24612
|
}
|
|
24639
|
-
|
|
24640
|
-
|
|
24641
|
-
|
|
24642
|
-
|
|
24643
|
-
|
|
24644
|
-
|
|
24645
|
-
|
|
24646
|
-
|
|
24647
|
-
|
|
24648
|
-
|
|
24649
|
-
|
|
24650
|
-
|
|
24651
|
-
|
|
24652
|
-
|
|
24653
|
-
|
|
24654
|
-
validateStatus: function validateStatus(status) {
|
|
24655
|
-
return status >= 200 && status < 300;
|
|
24656
|
-
},
|
|
24657
|
-
headers: {
|
|
24658
|
-
common: {
|
|
24659
|
-
"Accept": "application/json, text/plain, */*",
|
|
24660
|
-
"Content-Type": void 0
|
|
24613
|
+
if (value && !path && typeof value === "object") {
|
|
24614
|
+
if (utils_default.endsWith(key, "{}")) {
|
|
24615
|
+
key = metaTokens ? key : key.slice(0, -2);
|
|
24616
|
+
value = JSON.stringify(value);
|
|
24617
|
+
} else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
|
|
24618
|
+
key = removeBrackets(key);
|
|
24619
|
+
arr.forEach(function each(el, index) {
|
|
24620
|
+
!(utils_default.isUndefined(el) || el === null) && formData.append(
|
|
24621
|
+
// eslint-disable-next-line no-nested-ternary
|
|
24622
|
+
indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
|
|
24623
|
+
convertValue(el)
|
|
24624
|
+
);
|
|
24625
|
+
});
|
|
24626
|
+
return false;
|
|
24627
|
+
}
|
|
24661
24628
|
}
|
|
24629
|
+
if (isVisitable(value)) {
|
|
24630
|
+
return true;
|
|
24631
|
+
}
|
|
24632
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
24633
|
+
return false;
|
|
24662
24634
|
}
|
|
24663
|
-
|
|
24664
|
-
|
|
24665
|
-
|
|
24666
|
-
|
|
24667
|
-
|
|
24668
|
-
|
|
24669
|
-
|
|
24670
|
-
|
|
24671
|
-
|
|
24672
|
-
|
|
24673
|
-
|
|
24674
|
-
|
|
24675
|
-
|
|
24676
|
-
"expires",
|
|
24677
|
-
"from",
|
|
24678
|
-
"host",
|
|
24679
|
-
"if-modified-since",
|
|
24680
|
-
"if-unmodified-since",
|
|
24681
|
-
"last-modified",
|
|
24682
|
-
"location",
|
|
24683
|
-
"max-forwards",
|
|
24684
|
-
"proxy-authorization",
|
|
24685
|
-
"referer",
|
|
24686
|
-
"retry-after",
|
|
24687
|
-
"user-agent"
|
|
24688
|
-
]);
|
|
24689
|
-
var parseHeaders_default = (rawHeaders) => {
|
|
24690
|
-
const parsed = {};
|
|
24691
|
-
let key;
|
|
24692
|
-
let val;
|
|
24693
|
-
let i;
|
|
24694
|
-
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
24695
|
-
i = line.indexOf(":");
|
|
24696
|
-
key = line.substring(0, i).trim().toLowerCase();
|
|
24697
|
-
val = line.substring(i + 1).trim();
|
|
24698
|
-
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
24699
|
-
return;
|
|
24635
|
+
const stack = [];
|
|
24636
|
+
const exposedHelpers = Object.assign(predicates, {
|
|
24637
|
+
defaultVisitor,
|
|
24638
|
+
convertValue,
|
|
24639
|
+
isVisitable
|
|
24640
|
+
});
|
|
24641
|
+
function build(value, path, depth = 0) {
|
|
24642
|
+
if (utils_default.isUndefined(value)) return;
|
|
24643
|
+
if (depth > maxDepth) {
|
|
24644
|
+
throw new AxiosError_default(
|
|
24645
|
+
"Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
|
|
24646
|
+
AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
24647
|
+
);
|
|
24700
24648
|
}
|
|
24701
|
-
if (
|
|
24702
|
-
|
|
24703
|
-
parsed[key].push(val);
|
|
24704
|
-
} else {
|
|
24705
|
-
parsed[key] = [val];
|
|
24706
|
-
}
|
|
24707
|
-
} else {
|
|
24708
|
-
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
24649
|
+
if (stack.indexOf(value) !== -1) {
|
|
24650
|
+
throw Error("Circular reference detected in " + path.join("."));
|
|
24709
24651
|
}
|
|
24710
|
-
|
|
24711
|
-
|
|
24712
|
-
|
|
24652
|
+
stack.push(value);
|
|
24653
|
+
utils_default.forEach(value, function each(el, key) {
|
|
24654
|
+
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
24655
|
+
if (result === true) {
|
|
24656
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
24657
|
+
}
|
|
24658
|
+
});
|
|
24659
|
+
stack.pop();
|
|
24660
|
+
}
|
|
24661
|
+
if (!utils_default.isObject(obj)) {
|
|
24662
|
+
throw new TypeError("data must be an object");
|
|
24663
|
+
}
|
|
24664
|
+
build(obj);
|
|
24665
|
+
return formData;
|
|
24666
|
+
}
|
|
24667
|
+
var toFormData_default = toFormData;
|
|
24713
24668
|
|
|
24714
|
-
// ../../../node_modules/axios/lib/
|
|
24715
|
-
|
|
24716
|
-
|
|
24717
|
-
|
|
24669
|
+
// ../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
24670
|
+
function encode(str) {
|
|
24671
|
+
const charMap = {
|
|
24672
|
+
"!": "%21",
|
|
24673
|
+
"'": "%27",
|
|
24674
|
+
"(": "%28",
|
|
24675
|
+
")": "%29",
|
|
24676
|
+
"~": "%7E",
|
|
24677
|
+
"%20": "+"
|
|
24678
|
+
};
|
|
24679
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
24680
|
+
return charMap[match];
|
|
24681
|
+
});
|
|
24718
24682
|
}
|
|
24719
|
-
function
|
|
24720
|
-
|
|
24721
|
-
|
|
24722
|
-
}
|
|
24723
|
-
return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
24683
|
+
function AxiosURLSearchParams(params, options) {
|
|
24684
|
+
this._pairs = [];
|
|
24685
|
+
params && toFormData_default(params, this, options);
|
|
24724
24686
|
}
|
|
24725
|
-
|
|
24726
|
-
|
|
24727
|
-
|
|
24728
|
-
|
|
24729
|
-
|
|
24730
|
-
|
|
24731
|
-
|
|
24732
|
-
|
|
24687
|
+
var prototype = AxiosURLSearchParams.prototype;
|
|
24688
|
+
prototype.append = function append(name, value) {
|
|
24689
|
+
this._pairs.push([name, value]);
|
|
24690
|
+
};
|
|
24691
|
+
prototype.toString = function toString2(encoder) {
|
|
24692
|
+
const _encode = encoder ? function(value) {
|
|
24693
|
+
return encoder.call(this, value, encode);
|
|
24694
|
+
} : encode;
|
|
24695
|
+
return this._pairs.map(function each(pair) {
|
|
24696
|
+
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
24697
|
+
}, "").join("&");
|
|
24698
|
+
};
|
|
24699
|
+
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
|
24700
|
+
|
|
24701
|
+
// ../../../node_modules/axios/lib/helpers/buildURL.js
|
|
24702
|
+
function encode2(val) {
|
|
24703
|
+
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
24733
24704
|
}
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
|
|
24737
|
-
return filter2.call(this, value, header);
|
|
24738
|
-
}
|
|
24739
|
-
if (isHeaderNameFilter) {
|
|
24740
|
-
value = header;
|
|
24705
|
+
function buildURL(url2, params, options) {
|
|
24706
|
+
if (!params) {
|
|
24707
|
+
return url2;
|
|
24741
24708
|
}
|
|
24742
|
-
|
|
24743
|
-
|
|
24744
|
-
|
|
24709
|
+
const _encode = options && options.encode || encode2;
|
|
24710
|
+
const _options = utils_default.isFunction(options) ? {
|
|
24711
|
+
serialize: options
|
|
24712
|
+
} : options;
|
|
24713
|
+
const serializeFn = _options && _options.serialize;
|
|
24714
|
+
let serializedParams;
|
|
24715
|
+
if (serializeFn) {
|
|
24716
|
+
serializedParams = serializeFn(params, _options);
|
|
24717
|
+
} else {
|
|
24718
|
+
serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode);
|
|
24745
24719
|
}
|
|
24746
|
-
if (
|
|
24747
|
-
|
|
24720
|
+
if (serializedParams) {
|
|
24721
|
+
const hashmarkIndex = url2.indexOf("#");
|
|
24722
|
+
if (hashmarkIndex !== -1) {
|
|
24723
|
+
url2 = url2.slice(0, hashmarkIndex);
|
|
24724
|
+
}
|
|
24725
|
+
url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
24748
24726
|
}
|
|
24727
|
+
return url2;
|
|
24749
24728
|
}
|
|
24750
|
-
|
|
24751
|
-
|
|
24752
|
-
|
|
24753
|
-
|
|
24754
|
-
|
|
24755
|
-
|
|
24756
|
-
|
|
24757
|
-
|
|
24758
|
-
|
|
24759
|
-
|
|
24760
|
-
|
|
24761
|
-
|
|
24762
|
-
|
|
24729
|
+
|
|
24730
|
+
// ../../../node_modules/axios/lib/core/InterceptorManager.js
|
|
24731
|
+
var InterceptorManager = class {
|
|
24732
|
+
constructor() {
|
|
24733
|
+
this.handlers = [];
|
|
24734
|
+
}
|
|
24735
|
+
/**
|
|
24736
|
+
* Add a new interceptor to the stack
|
|
24737
|
+
*
|
|
24738
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
24739
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
24740
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
24741
|
+
*
|
|
24742
|
+
* @return {Number} An ID used to remove interceptor later
|
|
24743
|
+
*/
|
|
24744
|
+
use(fulfilled, rejected, options) {
|
|
24745
|
+
this.handlers.push({
|
|
24746
|
+
fulfilled,
|
|
24747
|
+
rejected,
|
|
24748
|
+
synchronous: options ? options.synchronous : false,
|
|
24749
|
+
runWhen: options ? options.runWhen : null
|
|
24763
24750
|
});
|
|
24764
|
-
|
|
24765
|
-
}
|
|
24766
|
-
var AxiosHeaders = class {
|
|
24767
|
-
constructor(headers) {
|
|
24768
|
-
headers && this.set(headers);
|
|
24751
|
+
return this.handlers.length - 1;
|
|
24769
24752
|
}
|
|
24770
|
-
|
|
24771
|
-
|
|
24772
|
-
|
|
24773
|
-
|
|
24774
|
-
|
|
24775
|
-
|
|
24776
|
-
|
|
24777
|
-
|
|
24778
|
-
|
|
24779
|
-
|
|
24780
|
-
}
|
|
24753
|
+
/**
|
|
24754
|
+
* Remove an interceptor from the stack
|
|
24755
|
+
*
|
|
24756
|
+
* @param {Number} id The ID that was returned by `use`
|
|
24757
|
+
*
|
|
24758
|
+
* @returns {void}
|
|
24759
|
+
*/
|
|
24760
|
+
eject(id) {
|
|
24761
|
+
if (this.handlers[id]) {
|
|
24762
|
+
this.handlers[id] = null;
|
|
24781
24763
|
}
|
|
24782
|
-
|
|
24783
|
-
|
|
24784
|
-
|
|
24785
|
-
|
|
24786
|
-
|
|
24787
|
-
|
|
24788
|
-
|
|
24789
|
-
|
|
24790
|
-
|
|
24791
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
24792
|
-
}
|
|
24793
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
24794
|
-
}
|
|
24795
|
-
setHeaders(obj, valueOrRewrite);
|
|
24796
|
-
} else {
|
|
24797
|
-
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
24764
|
+
}
|
|
24765
|
+
/**
|
|
24766
|
+
* Clear all interceptors from the stack
|
|
24767
|
+
*
|
|
24768
|
+
* @returns {void}
|
|
24769
|
+
*/
|
|
24770
|
+
clear() {
|
|
24771
|
+
if (this.handlers) {
|
|
24772
|
+
this.handlers = [];
|
|
24798
24773
|
}
|
|
24799
|
-
return this;
|
|
24800
24774
|
}
|
|
24801
|
-
|
|
24802
|
-
|
|
24803
|
-
|
|
24804
|
-
|
|
24805
|
-
|
|
24806
|
-
|
|
24807
|
-
|
|
24808
|
-
|
|
24809
|
-
|
|
24810
|
-
|
|
24811
|
-
|
|
24812
|
-
|
|
24813
|
-
|
|
24814
|
-
|
|
24815
|
-
}
|
|
24816
|
-
if (utils_default.isRegExp(parser)) {
|
|
24817
|
-
return parser.exec(value);
|
|
24818
|
-
}
|
|
24819
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
24775
|
+
/**
|
|
24776
|
+
* Iterate over all the registered interceptors
|
|
24777
|
+
*
|
|
24778
|
+
* This method is particularly useful for skipping over any
|
|
24779
|
+
* interceptors that may have become `null` calling `eject`.
|
|
24780
|
+
*
|
|
24781
|
+
* @param {Function} fn The function to call for each interceptor
|
|
24782
|
+
*
|
|
24783
|
+
* @returns {void}
|
|
24784
|
+
*/
|
|
24785
|
+
forEach(fn) {
|
|
24786
|
+
utils_default.forEach(this.handlers, function forEachHandler(h) {
|
|
24787
|
+
if (h !== null) {
|
|
24788
|
+
fn(h);
|
|
24820
24789
|
}
|
|
24821
|
-
}
|
|
24790
|
+
});
|
|
24822
24791
|
}
|
|
24823
|
-
|
|
24824
|
-
|
|
24825
|
-
|
|
24826
|
-
|
|
24827
|
-
|
|
24828
|
-
|
|
24829
|
-
|
|
24792
|
+
};
|
|
24793
|
+
var InterceptorManager_default = InterceptorManager;
|
|
24794
|
+
|
|
24795
|
+
// ../../../node_modules/axios/lib/defaults/transitional.js
|
|
24796
|
+
var transitional_default = {
|
|
24797
|
+
silentJSONParsing: true,
|
|
24798
|
+
forcedJSONParsing: true,
|
|
24799
|
+
clarifyTimeoutError: false,
|
|
24800
|
+
legacyInterceptorReqResOrdering: true
|
|
24801
|
+
};
|
|
24802
|
+
|
|
24803
|
+
// ../../../node_modules/axios/lib/platform/node/index.js
|
|
24804
|
+
var import_crypto = __toESM(require("crypto"), 1);
|
|
24805
|
+
|
|
24806
|
+
// ../../../node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
24807
|
+
var import_url = __toESM(require("url"), 1);
|
|
24808
|
+
var URLSearchParams_default = import_url.default.URLSearchParams;
|
|
24809
|
+
|
|
24810
|
+
// ../../../node_modules/axios/lib/platform/node/index.js
|
|
24811
|
+
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
24812
|
+
var DIGIT = "0123456789";
|
|
24813
|
+
var ALPHABET = {
|
|
24814
|
+
DIGIT,
|
|
24815
|
+
ALPHA,
|
|
24816
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
24817
|
+
};
|
|
24818
|
+
var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
24819
|
+
let str = "";
|
|
24820
|
+
const { length } = alphabet;
|
|
24821
|
+
const randomValues = new Uint32Array(size);
|
|
24822
|
+
import_crypto.default.randomFillSync(randomValues);
|
|
24823
|
+
for (let i = 0; i < size; i++) {
|
|
24824
|
+
str += alphabet[randomValues[i] % length];
|
|
24825
|
+
}
|
|
24826
|
+
return str;
|
|
24827
|
+
};
|
|
24828
|
+
var node_default = {
|
|
24829
|
+
isNode: true,
|
|
24830
|
+
classes: {
|
|
24831
|
+
URLSearchParams: URLSearchParams_default,
|
|
24832
|
+
FormData: FormData_default,
|
|
24833
|
+
Blob: typeof Blob !== "undefined" && Blob || null
|
|
24834
|
+
},
|
|
24835
|
+
ALPHABET,
|
|
24836
|
+
generateString,
|
|
24837
|
+
protocols: ["http", "https", "file", "data"]
|
|
24838
|
+
};
|
|
24839
|
+
|
|
24840
|
+
// ../../../node_modules/axios/lib/platform/common/utils.js
|
|
24841
|
+
var utils_exports = {};
|
|
24842
|
+
__export(utils_exports, {
|
|
24843
|
+
hasBrowserEnv: () => hasBrowserEnv,
|
|
24844
|
+
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
|
24845
|
+
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
|
|
24846
|
+
navigator: () => _navigator,
|
|
24847
|
+
origin: () => origin
|
|
24848
|
+
});
|
|
24849
|
+
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
24850
|
+
var _navigator = typeof navigator === "object" && navigator || void 0;
|
|
24851
|
+
var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
24852
|
+
var hasStandardBrowserWebWorkerEnv = (() => {
|
|
24853
|
+
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
24854
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
24855
|
+
})();
|
|
24856
|
+
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
24857
|
+
|
|
24858
|
+
// ../../../node_modules/axios/lib/platform/index.js
|
|
24859
|
+
var platform_default = {
|
|
24860
|
+
...utils_exports,
|
|
24861
|
+
...node_default
|
|
24862
|
+
};
|
|
24863
|
+
|
|
24864
|
+
// ../../../node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
24865
|
+
function toURLEncodedForm(data, options) {
|
|
24866
|
+
return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
|
|
24867
|
+
visitor: function(value, key, path, helpers) {
|
|
24868
|
+
if (platform_default.isNode && utils_default.isBuffer(value)) {
|
|
24869
|
+
this.append(key, value.toString("base64"));
|
|
24870
|
+
return false;
|
|
24871
|
+
}
|
|
24872
|
+
return helpers.defaultVisitor.apply(this, arguments);
|
|
24873
|
+
},
|
|
24874
|
+
...options
|
|
24875
|
+
});
|
|
24876
|
+
}
|
|
24877
|
+
|
|
24878
|
+
// ../../../node_modules/axios/lib/helpers/formDataToJSON.js
|
|
24879
|
+
function parsePropPath(name) {
|
|
24880
|
+
return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
24881
|
+
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
24882
|
+
});
|
|
24883
|
+
}
|
|
24884
|
+
function arrayToObject(arr) {
|
|
24885
|
+
const obj = {};
|
|
24886
|
+
const keys = Object.keys(arr);
|
|
24887
|
+
let i;
|
|
24888
|
+
const len = keys.length;
|
|
24889
|
+
let key;
|
|
24890
|
+
for (i = 0; i < len; i++) {
|
|
24891
|
+
key = keys[i];
|
|
24892
|
+
obj[key] = arr[key];
|
|
24830
24893
|
}
|
|
24831
|
-
|
|
24832
|
-
|
|
24833
|
-
|
|
24834
|
-
|
|
24835
|
-
|
|
24836
|
-
|
|
24837
|
-
|
|
24838
|
-
|
|
24839
|
-
|
|
24840
|
-
|
|
24841
|
-
|
|
24894
|
+
return obj;
|
|
24895
|
+
}
|
|
24896
|
+
function formDataToJSON(formData) {
|
|
24897
|
+
function buildPath(path, value, target, index) {
|
|
24898
|
+
let name = path[index++];
|
|
24899
|
+
if (name === "__proto__") return true;
|
|
24900
|
+
const isNumericKey = Number.isFinite(+name);
|
|
24901
|
+
const isLast = index >= path.length;
|
|
24902
|
+
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
24903
|
+
if (isLast) {
|
|
24904
|
+
if (utils_default.hasOwnProp(target, name)) {
|
|
24905
|
+
target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
|
|
24906
|
+
} else {
|
|
24907
|
+
target[name] = value;
|
|
24842
24908
|
}
|
|
24909
|
+
return !isNumericKey;
|
|
24843
24910
|
}
|
|
24844
|
-
if (utils_default.
|
|
24845
|
-
|
|
24846
|
-
} else {
|
|
24847
|
-
deleteHeader(header);
|
|
24911
|
+
if (!target[name] || !utils_default.isObject(target[name])) {
|
|
24912
|
+
target[name] = [];
|
|
24848
24913
|
}
|
|
24849
|
-
|
|
24850
|
-
|
|
24851
|
-
|
|
24852
|
-
const keys = Object.keys(this);
|
|
24853
|
-
let i = keys.length;
|
|
24854
|
-
let deleted = false;
|
|
24855
|
-
while (i--) {
|
|
24856
|
-
const key = keys[i];
|
|
24857
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
24858
|
-
delete this[key];
|
|
24859
|
-
deleted = true;
|
|
24860
|
-
}
|
|
24914
|
+
const result = buildPath(path, value, target[name], index);
|
|
24915
|
+
if (result && utils_default.isArray(target[name])) {
|
|
24916
|
+
target[name] = arrayToObject(target[name]);
|
|
24861
24917
|
}
|
|
24862
|
-
return
|
|
24863
|
-
}
|
|
24864
|
-
normalize(format2) {
|
|
24865
|
-
const self2 = this;
|
|
24866
|
-
const headers = {};
|
|
24867
|
-
utils_default.forEach(this, (value, header) => {
|
|
24868
|
-
const key = utils_default.findKey(headers, header);
|
|
24869
|
-
if (key) {
|
|
24870
|
-
self2[key] = normalizeValue(value);
|
|
24871
|
-
delete self2[header];
|
|
24872
|
-
return;
|
|
24873
|
-
}
|
|
24874
|
-
const normalized = format2 ? formatHeader(header) : String(header).trim();
|
|
24875
|
-
if (normalized !== header) {
|
|
24876
|
-
delete self2[header];
|
|
24877
|
-
}
|
|
24878
|
-
self2[normalized] = normalizeValue(value);
|
|
24879
|
-
headers[normalized] = true;
|
|
24880
|
-
});
|
|
24881
|
-
return this;
|
|
24882
|
-
}
|
|
24883
|
-
concat(...targets) {
|
|
24884
|
-
return this.constructor.concat(this, ...targets);
|
|
24918
|
+
return !isNumericKey;
|
|
24885
24919
|
}
|
|
24886
|
-
|
|
24887
|
-
const obj =
|
|
24888
|
-
utils_default.
|
|
24889
|
-
|
|
24920
|
+
if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
|
|
24921
|
+
const obj = {};
|
|
24922
|
+
utils_default.forEachEntry(formData, (name, value) => {
|
|
24923
|
+
buildPath(parsePropPath(name), value, obj, 0);
|
|
24890
24924
|
});
|
|
24891
24925
|
return obj;
|
|
24892
24926
|
}
|
|
24893
|
-
|
|
24894
|
-
|
|
24895
|
-
|
|
24896
|
-
|
|
24897
|
-
|
|
24898
|
-
|
|
24899
|
-
|
|
24900
|
-
|
|
24901
|
-
|
|
24902
|
-
|
|
24903
|
-
|
|
24904
|
-
|
|
24905
|
-
|
|
24906
|
-
|
|
24907
|
-
|
|
24908
|
-
|
|
24909
|
-
const computed = new this(first);
|
|
24910
|
-
targets.forEach((target) => computed.set(target));
|
|
24911
|
-
return computed;
|
|
24927
|
+
return null;
|
|
24928
|
+
}
|
|
24929
|
+
var formDataToJSON_default = formDataToJSON;
|
|
24930
|
+
|
|
24931
|
+
// ../../../node_modules/axios/lib/defaults/index.js
|
|
24932
|
+
var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
|
|
24933
|
+
function stringifySafely(rawValue, parser, encoder) {
|
|
24934
|
+
if (utils_default.isString(rawValue)) {
|
|
24935
|
+
try {
|
|
24936
|
+
(parser || JSON.parse)(rawValue);
|
|
24937
|
+
return utils_default.trim(rawValue);
|
|
24938
|
+
} catch (e) {
|
|
24939
|
+
if (e.name !== "SyntaxError") {
|
|
24940
|
+
throw e;
|
|
24941
|
+
}
|
|
24942
|
+
}
|
|
24912
24943
|
}
|
|
24913
|
-
|
|
24914
|
-
|
|
24915
|
-
|
|
24916
|
-
|
|
24917
|
-
|
|
24918
|
-
|
|
24919
|
-
function
|
|
24920
|
-
const
|
|
24921
|
-
|
|
24922
|
-
|
|
24923
|
-
|
|
24944
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
24945
|
+
}
|
|
24946
|
+
var defaults = {
|
|
24947
|
+
transitional: transitional_default,
|
|
24948
|
+
adapter: ["xhr", "http", "fetch"],
|
|
24949
|
+
transformRequest: [
|
|
24950
|
+
function transformRequest(data, headers) {
|
|
24951
|
+
const contentType = headers.getContentType() || "";
|
|
24952
|
+
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
24953
|
+
const isObjectPayload = utils_default.isObject(data);
|
|
24954
|
+
if (isObjectPayload && utils_default.isHTMLForm(data)) {
|
|
24955
|
+
data = new FormData(data);
|
|
24956
|
+
}
|
|
24957
|
+
const isFormData2 = utils_default.isFormData(data);
|
|
24958
|
+
if (isFormData2) {
|
|
24959
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
24960
|
+
}
|
|
24961
|
+
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)) {
|
|
24962
|
+
return data;
|
|
24963
|
+
}
|
|
24964
|
+
if (utils_default.isArrayBufferView(data)) {
|
|
24965
|
+
return data.buffer;
|
|
24966
|
+
}
|
|
24967
|
+
if (utils_default.isURLSearchParams(data)) {
|
|
24968
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
24969
|
+
return data.toString();
|
|
24970
|
+
}
|
|
24971
|
+
let isFileList2;
|
|
24972
|
+
if (isObjectPayload) {
|
|
24973
|
+
const formSerializer = own(this, "formSerializer");
|
|
24974
|
+
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
24975
|
+
return toURLEncodedForm(data, formSerializer).toString();
|
|
24976
|
+
}
|
|
24977
|
+
if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
24978
|
+
const env3 = own(this, "env");
|
|
24979
|
+
const _FormData = env3 && env3.FormData;
|
|
24980
|
+
return toFormData_default(
|
|
24981
|
+
isFileList2 ? { "files[]": data } : data,
|
|
24982
|
+
_FormData && new _FormData(),
|
|
24983
|
+
formSerializer
|
|
24984
|
+
);
|
|
24985
|
+
}
|
|
24924
24986
|
}
|
|
24987
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
24988
|
+
headers.setContentType("application/json", false);
|
|
24989
|
+
return stringifySafely(data);
|
|
24990
|
+
}
|
|
24991
|
+
return data;
|
|
24992
|
+
}
|
|
24993
|
+
],
|
|
24994
|
+
transformResponse: [
|
|
24995
|
+
function transformResponse(data) {
|
|
24996
|
+
const transitional2 = own(this, "transitional") || defaults.transitional;
|
|
24997
|
+
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
24998
|
+
const responseType = own(this, "responseType");
|
|
24999
|
+
const JSONRequested = responseType === "json";
|
|
25000
|
+
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
25001
|
+
return data;
|
|
25002
|
+
}
|
|
25003
|
+
if (data && utils_default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
|
|
25004
|
+
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
25005
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
25006
|
+
try {
|
|
25007
|
+
return JSON.parse(data, own(this, "parseReviver"));
|
|
25008
|
+
} catch (e) {
|
|
25009
|
+
if (strictJSONParsing) {
|
|
25010
|
+
if (e.name === "SyntaxError") {
|
|
25011
|
+
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, own(this, "response"));
|
|
25012
|
+
}
|
|
25013
|
+
throw e;
|
|
25014
|
+
}
|
|
25015
|
+
}
|
|
25016
|
+
}
|
|
25017
|
+
return data;
|
|
25018
|
+
}
|
|
25019
|
+
],
|
|
25020
|
+
/**
|
|
25021
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
25022
|
+
* timeout is not created.
|
|
25023
|
+
*/
|
|
25024
|
+
timeout: 0,
|
|
25025
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
25026
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
25027
|
+
maxContentLength: -1,
|
|
25028
|
+
maxBodyLength: -1,
|
|
25029
|
+
env: {
|
|
25030
|
+
FormData: platform_default.classes.FormData,
|
|
25031
|
+
Blob: platform_default.classes.Blob
|
|
25032
|
+
},
|
|
25033
|
+
validateStatus: function validateStatus(status) {
|
|
25034
|
+
return status >= 200 && status < 300;
|
|
25035
|
+
},
|
|
25036
|
+
headers: {
|
|
25037
|
+
common: {
|
|
25038
|
+
Accept: "application/json, text/plain, */*",
|
|
25039
|
+
"Content-Type": void 0
|
|
24925
25040
|
}
|
|
24926
|
-
utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
24927
|
-
return this;
|
|
24928
25041
|
}
|
|
24929
25042
|
};
|
|
24930
|
-
|
|
24931
|
-
|
|
24932
|
-
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
24933
|
-
return {
|
|
24934
|
-
get: () => value,
|
|
24935
|
-
set(headerValue) {
|
|
24936
|
-
this[mapped] = headerValue;
|
|
24937
|
-
}
|
|
24938
|
-
};
|
|
25043
|
+
utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
|
|
25044
|
+
defaults.headers[method] = {};
|
|
24939
25045
|
});
|
|
24940
|
-
|
|
24941
|
-
var AxiosHeaders_default = AxiosHeaders;
|
|
25046
|
+
var defaults_default = defaults;
|
|
24942
25047
|
|
|
24943
25048
|
// ../../../node_modules/axios/lib/core/transformData.js
|
|
24944
25049
|
function transformData(fns, response) {
|
|
@@ -24959,13 +25064,22 @@ function isCancel(value) {
|
|
|
24959
25064
|
}
|
|
24960
25065
|
|
|
24961
25066
|
// ../../../node_modules/axios/lib/cancel/CanceledError.js
|
|
24962
|
-
|
|
24963
|
-
|
|
24964
|
-
|
|
24965
|
-
|
|
24966
|
-
|
|
24967
|
-
|
|
24968
|
-
}
|
|
25067
|
+
var CanceledError = class extends AxiosError_default {
|
|
25068
|
+
/**
|
|
25069
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
25070
|
+
*
|
|
25071
|
+
* @param {string=} message The message.
|
|
25072
|
+
* @param {Object=} config The config.
|
|
25073
|
+
* @param {Object=} request The request.
|
|
25074
|
+
*
|
|
25075
|
+
* @returns {CanceledError} The created error.
|
|
25076
|
+
*/
|
|
25077
|
+
constructor(message, config, request) {
|
|
25078
|
+
super(message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
|
25079
|
+
this.name = "CanceledError";
|
|
25080
|
+
this.__CANCEL__ = true;
|
|
25081
|
+
}
|
|
25082
|
+
};
|
|
24969
25083
|
var CanceledError_default = CanceledError;
|
|
24970
25084
|
|
|
24971
25085
|
// ../../../node_modules/axios/lib/core/settle.js
|
|
@@ -24976,7 +25090,7 @@ function settle(resolve3, reject, response) {
|
|
|
24976
25090
|
} else {
|
|
24977
25091
|
reject(new AxiosError_default(
|
|
24978
25092
|
"Request failed with status code " + response.status,
|
|
24979
|
-
|
|
25093
|
+
response.status >= 400 && response.status < 500 ? AxiosError_default.ERR_BAD_REQUEST : AxiosError_default.ERR_BAD_RESPONSE,
|
|
24980
25094
|
response.config,
|
|
24981
25095
|
response.request,
|
|
24982
25096
|
response
|
|
@@ -24986,6 +25100,9 @@ function settle(resolve3, reject, response) {
|
|
|
24986
25100
|
|
|
24987
25101
|
// ../../../node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
24988
25102
|
function isAbsoluteURL(url2) {
|
|
25103
|
+
if (typeof url2 !== "string") {
|
|
25104
|
+
return false;
|
|
25105
|
+
}
|
|
24989
25106
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
|
24990
25107
|
}
|
|
24991
25108
|
|
|
@@ -24997,27 +25114,94 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
24997
25114
|
// ../../../node_modules/axios/lib/core/buildFullPath.js
|
|
24998
25115
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
24999
25116
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
25000
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
25117
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
25001
25118
|
return combineURLs(baseURL, requestedURL);
|
|
25002
25119
|
}
|
|
25003
25120
|
return requestedURL;
|
|
25004
25121
|
}
|
|
25005
25122
|
|
|
25123
|
+
// ../../../node_modules/proxy-from-env/index.js
|
|
25124
|
+
var DEFAULT_PORTS = {
|
|
25125
|
+
ftp: 21,
|
|
25126
|
+
gopher: 70,
|
|
25127
|
+
http: 80,
|
|
25128
|
+
https: 443,
|
|
25129
|
+
ws: 80,
|
|
25130
|
+
wss: 443
|
|
25131
|
+
};
|
|
25132
|
+
function parseUrl(urlString) {
|
|
25133
|
+
try {
|
|
25134
|
+
return new URL(urlString);
|
|
25135
|
+
} catch {
|
|
25136
|
+
return null;
|
|
25137
|
+
}
|
|
25138
|
+
}
|
|
25139
|
+
function getProxyForUrl(url2) {
|
|
25140
|
+
var parsedUrl = (typeof url2 === "string" ? parseUrl(url2) : url2) || {};
|
|
25141
|
+
var proto3 = parsedUrl.protocol;
|
|
25142
|
+
var hostname = parsedUrl.host;
|
|
25143
|
+
var port = parsedUrl.port;
|
|
25144
|
+
if (typeof hostname !== "string" || !hostname || typeof proto3 !== "string") {
|
|
25145
|
+
return "";
|
|
25146
|
+
}
|
|
25147
|
+
proto3 = proto3.split(":", 1)[0];
|
|
25148
|
+
hostname = hostname.replace(/:\d*$/, "");
|
|
25149
|
+
port = parseInt(port) || DEFAULT_PORTS[proto3] || 0;
|
|
25150
|
+
if (!shouldProxy(hostname, port)) {
|
|
25151
|
+
return "";
|
|
25152
|
+
}
|
|
25153
|
+
var proxy = getEnv(proto3 + "_proxy") || getEnv("all_proxy");
|
|
25154
|
+
if (proxy && proxy.indexOf("://") === -1) {
|
|
25155
|
+
proxy = proto3 + "://" + proxy;
|
|
25156
|
+
}
|
|
25157
|
+
return proxy;
|
|
25158
|
+
}
|
|
25159
|
+
function shouldProxy(hostname, port) {
|
|
25160
|
+
var NO_PROXY = getEnv("no_proxy").toLowerCase();
|
|
25161
|
+
if (!NO_PROXY) {
|
|
25162
|
+
return true;
|
|
25163
|
+
}
|
|
25164
|
+
if (NO_PROXY === "*") {
|
|
25165
|
+
return false;
|
|
25166
|
+
}
|
|
25167
|
+
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
25168
|
+
if (!proxy) {
|
|
25169
|
+
return true;
|
|
25170
|
+
}
|
|
25171
|
+
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
25172
|
+
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
25173
|
+
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
25174
|
+
if (parsedProxyPort && parsedProxyPort !== port) {
|
|
25175
|
+
return true;
|
|
25176
|
+
}
|
|
25177
|
+
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
25178
|
+
return hostname !== parsedProxyHostname;
|
|
25179
|
+
}
|
|
25180
|
+
if (parsedProxyHostname.charAt(0) === "*") {
|
|
25181
|
+
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
25182
|
+
}
|
|
25183
|
+
return !hostname.endsWith(parsedProxyHostname);
|
|
25184
|
+
});
|
|
25185
|
+
}
|
|
25186
|
+
function getEnv(key) {
|
|
25187
|
+
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
25188
|
+
}
|
|
25189
|
+
|
|
25006
25190
|
// ../../../node_modules/axios/lib/adapters/http.js
|
|
25007
|
-
var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
25008
25191
|
var import_http = __toESM(require("http"), 1);
|
|
25009
25192
|
var import_https = __toESM(require("https"), 1);
|
|
25010
25193
|
var import_http2 = __toESM(require("http2"), 1);
|
|
25011
25194
|
var import_util3 = __toESM(require("util"), 1);
|
|
25195
|
+
var import_path = require("path");
|
|
25012
25196
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
25013
25197
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
25014
25198
|
|
|
25015
25199
|
// ../../../node_modules/axios/lib/env/data.js
|
|
25016
|
-
var VERSION = "1.
|
|
25200
|
+
var VERSION = "1.16.0";
|
|
25017
25201
|
|
|
25018
25202
|
// ../../../node_modules/axios/lib/helpers/parseProtocol.js
|
|
25019
25203
|
function parseProtocol(url2) {
|
|
25020
|
-
const match = /^([-+\w]{1,25})(
|
|
25204
|
+
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
|
|
25021
25205
|
return match && match[1] || "";
|
|
25022
25206
|
}
|
|
25023
25207
|
|
|
@@ -25058,16 +25242,21 @@ var import_stream2 = __toESM(require("stream"), 1);
|
|
|
25058
25242
|
var kInternals = /* @__PURE__ */ Symbol("internals");
|
|
25059
25243
|
var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
25060
25244
|
constructor(options) {
|
|
25061
|
-
options = utils_default.toFlatObject(
|
|
25062
|
-
|
|
25063
|
-
|
|
25064
|
-
|
|
25065
|
-
|
|
25066
|
-
|
|
25067
|
-
|
|
25068
|
-
|
|
25069
|
-
|
|
25070
|
-
|
|
25245
|
+
options = utils_default.toFlatObject(
|
|
25246
|
+
options,
|
|
25247
|
+
{
|
|
25248
|
+
maxRate: 0,
|
|
25249
|
+
chunkSize: 64 * 1024,
|
|
25250
|
+
minChunkSize: 100,
|
|
25251
|
+
timeWindow: 500,
|
|
25252
|
+
ticksRate: 2,
|
|
25253
|
+
samplesCount: 15
|
|
25254
|
+
},
|
|
25255
|
+
null,
|
|
25256
|
+
(prop, source) => {
|
|
25257
|
+
return !utils_default.isUndefined(source[prop]);
|
|
25258
|
+
}
|
|
25259
|
+
);
|
|
25071
25260
|
super({
|
|
25072
25261
|
readableHighWaterMark: options.chunkSize
|
|
25073
25262
|
});
|
|
@@ -25150,9 +25339,12 @@ var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
|
25150
25339
|
chunkRemainder = _chunk.subarray(maxChunkSize);
|
|
25151
25340
|
_chunk = _chunk.subarray(0, maxChunkSize);
|
|
25152
25341
|
}
|
|
25153
|
-
pushChunk(
|
|
25154
|
-
|
|
25155
|
-
|
|
25342
|
+
pushChunk(
|
|
25343
|
+
_chunk,
|
|
25344
|
+
chunkRemainder ? () => {
|
|
25345
|
+
process.nextTick(_callback, null, chunkRemainder);
|
|
25346
|
+
} : _callback
|
|
25347
|
+
);
|
|
25156
25348
|
};
|
|
25157
25349
|
transformChunk(chunk, function transformNextChunk(err, _chunk) {
|
|
25158
25350
|
if (err) {
|
|
@@ -25204,7 +25396,8 @@ var FormDataPart = class {
|
|
|
25204
25396
|
if (isStringValue) {
|
|
25205
25397
|
value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
|
25206
25398
|
} else {
|
|
25207
|
-
|
|
25399
|
+
const safeType = String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
|
|
25400
|
+
headers += `Content-Type: ${safeType}${CRLF}`;
|
|
25208
25401
|
}
|
|
25209
25402
|
this.headers = textEncoder.encode(headers + CRLF);
|
|
25210
25403
|
this.contentLength = isStringValue ? value.byteLength : value.size;
|
|
@@ -25223,11 +25416,14 @@ var FormDataPart = class {
|
|
|
25223
25416
|
yield CRLF_BYTES;
|
|
25224
25417
|
}
|
|
25225
25418
|
static escapeName(name) {
|
|
25226
|
-
return String(name).replace(
|
|
25227
|
-
|
|
25228
|
-
|
|
25229
|
-
|
|
25230
|
-
|
|
25419
|
+
return String(name).replace(
|
|
25420
|
+
/[\r\n"]/g,
|
|
25421
|
+
(match) => ({
|
|
25422
|
+
"\r": "%0D",
|
|
25423
|
+
"\n": "%0A",
|
|
25424
|
+
'"': "%22"
|
|
25425
|
+
})[match]
|
|
25426
|
+
);
|
|
25231
25427
|
}
|
|
25232
25428
|
};
|
|
25233
25429
|
var formDataToStream = (form, headersHandler, options) => {
|
|
@@ -25240,7 +25436,7 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
25240
25436
|
throw TypeError("FormData instance required");
|
|
25241
25437
|
}
|
|
25242
25438
|
if (boundary.length < 1 || boundary.length > 70) {
|
|
25243
|
-
throw Error("boundary must be
|
|
25439
|
+
throw Error("boundary must be 1-70 characters long");
|
|
25244
25440
|
}
|
|
25245
25441
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
25246
25442
|
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
@@ -25259,13 +25455,15 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
25259
25455
|
computedHeaders["Content-Length"] = contentLength;
|
|
25260
25456
|
}
|
|
25261
25457
|
headersHandler && headersHandler(computedHeaders);
|
|
25262
|
-
return import_stream3.Readable.from(
|
|
25263
|
-
|
|
25264
|
-
|
|
25265
|
-
|
|
25266
|
-
|
|
25267
|
-
|
|
25268
|
-
|
|
25458
|
+
return import_stream3.Readable.from(
|
|
25459
|
+
(async function* () {
|
|
25460
|
+
for (const part of parts) {
|
|
25461
|
+
yield boundaryBytes;
|
|
25462
|
+
yield* part.encode();
|
|
25463
|
+
}
|
|
25464
|
+
yield footerBytes;
|
|
25465
|
+
})()
|
|
25466
|
+
);
|
|
25269
25467
|
};
|
|
25270
25468
|
var formDataToStream_default = formDataToStream;
|
|
25271
25469
|
|
|
@@ -25306,6 +25504,128 @@ var callbackify = (fn, reducer) => {
|
|
|
25306
25504
|
};
|
|
25307
25505
|
var callbackify_default = callbackify;
|
|
25308
25506
|
|
|
25507
|
+
// ../../../node_modules/axios/lib/helpers/shouldBypassProxy.js
|
|
25508
|
+
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
|
|
25509
|
+
var isIPv4Loopback = (host) => {
|
|
25510
|
+
const parts = host.split(".");
|
|
25511
|
+
if (parts.length !== 4) return false;
|
|
25512
|
+
if (parts[0] !== "127") return false;
|
|
25513
|
+
return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
|
|
25514
|
+
};
|
|
25515
|
+
var isIPv6Loopback = (host) => {
|
|
25516
|
+
if (host === "::1") return true;
|
|
25517
|
+
const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
|
|
25518
|
+
if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]);
|
|
25519
|
+
const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);
|
|
25520
|
+
if (v4MappedHex) {
|
|
25521
|
+
const high = parseInt(v4MappedHex[1], 16);
|
|
25522
|
+
return high >= 32512 && high <= 32767;
|
|
25523
|
+
}
|
|
25524
|
+
const groups = host.split(":");
|
|
25525
|
+
if (groups.length === 8) {
|
|
25526
|
+
for (let i = 0; i < 7; i++) {
|
|
25527
|
+
if (!/^0+$/.test(groups[i])) return false;
|
|
25528
|
+
}
|
|
25529
|
+
return /^0*1$/.test(groups[7]);
|
|
25530
|
+
}
|
|
25531
|
+
return false;
|
|
25532
|
+
};
|
|
25533
|
+
var isLoopback = (host) => {
|
|
25534
|
+
if (!host) return false;
|
|
25535
|
+
if (LOOPBACK_HOSTNAMES.has(host)) return true;
|
|
25536
|
+
if (isIPv4Loopback(host)) return true;
|
|
25537
|
+
return isIPv6Loopback(host);
|
|
25538
|
+
};
|
|
25539
|
+
var DEFAULT_PORTS2 = {
|
|
25540
|
+
http: 80,
|
|
25541
|
+
https: 443,
|
|
25542
|
+
ws: 80,
|
|
25543
|
+
wss: 443,
|
|
25544
|
+
ftp: 21
|
|
25545
|
+
};
|
|
25546
|
+
var parseNoProxyEntry = (entry) => {
|
|
25547
|
+
let entryHost = entry;
|
|
25548
|
+
let entryPort = 0;
|
|
25549
|
+
if (entryHost.charAt(0) === "[") {
|
|
25550
|
+
const bracketIndex = entryHost.indexOf("]");
|
|
25551
|
+
if (bracketIndex !== -1) {
|
|
25552
|
+
const host = entryHost.slice(1, bracketIndex);
|
|
25553
|
+
const rest = entryHost.slice(bracketIndex + 1);
|
|
25554
|
+
if (rest.charAt(0) === ":" && /^\d+$/.test(rest.slice(1))) {
|
|
25555
|
+
entryPort = Number.parseInt(rest.slice(1), 10);
|
|
25556
|
+
}
|
|
25557
|
+
return [host, entryPort];
|
|
25558
|
+
}
|
|
25559
|
+
}
|
|
25560
|
+
const firstColon = entryHost.indexOf(":");
|
|
25561
|
+
const lastColon = entryHost.lastIndexOf(":");
|
|
25562
|
+
if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) {
|
|
25563
|
+
entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
|
|
25564
|
+
entryHost = entryHost.slice(0, lastColon);
|
|
25565
|
+
}
|
|
25566
|
+
return [entryHost, entryPort];
|
|
25567
|
+
};
|
|
25568
|
+
var IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
|
|
25569
|
+
var IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
|
|
25570
|
+
var unmapIPv4MappedIPv6 = (host) => {
|
|
25571
|
+
if (typeof host !== "string" || host.indexOf(":") === -1) return host;
|
|
25572
|
+
const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
|
|
25573
|
+
if (dotted) return dotted[1];
|
|
25574
|
+
const hex = host.match(IPV4_MAPPED_HEX_RE);
|
|
25575
|
+
if (hex) {
|
|
25576
|
+
const high = parseInt(hex[1], 16);
|
|
25577
|
+
const low = parseInt(hex[2], 16);
|
|
25578
|
+
return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
|
|
25579
|
+
}
|
|
25580
|
+
return host;
|
|
25581
|
+
};
|
|
25582
|
+
var normalizeNoProxyHost = (hostname) => {
|
|
25583
|
+
if (!hostname) {
|
|
25584
|
+
return hostname;
|
|
25585
|
+
}
|
|
25586
|
+
if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
|
|
25587
|
+
hostname = hostname.slice(1, -1);
|
|
25588
|
+
}
|
|
25589
|
+
return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
|
|
25590
|
+
};
|
|
25591
|
+
function shouldBypassProxy(location) {
|
|
25592
|
+
let parsed;
|
|
25593
|
+
try {
|
|
25594
|
+
parsed = new URL(location);
|
|
25595
|
+
} catch (_err) {
|
|
25596
|
+
return false;
|
|
25597
|
+
}
|
|
25598
|
+
const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").toLowerCase();
|
|
25599
|
+
if (!noProxy) {
|
|
25600
|
+
return false;
|
|
25601
|
+
}
|
|
25602
|
+
if (noProxy === "*") {
|
|
25603
|
+
return true;
|
|
25604
|
+
}
|
|
25605
|
+
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
|
|
25606
|
+
const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
25607
|
+
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
25608
|
+
if (!entry) {
|
|
25609
|
+
return false;
|
|
25610
|
+
}
|
|
25611
|
+
let [entryHost, entryPort] = parseNoProxyEntry(entry);
|
|
25612
|
+
entryHost = normalizeNoProxyHost(entryHost);
|
|
25613
|
+
if (!entryHost) {
|
|
25614
|
+
return false;
|
|
25615
|
+
}
|
|
25616
|
+
if (entryPort && entryPort !== port) {
|
|
25617
|
+
return false;
|
|
25618
|
+
}
|
|
25619
|
+
if (entryHost.charAt(0) === "*") {
|
|
25620
|
+
entryHost = entryHost.slice(1);
|
|
25621
|
+
}
|
|
25622
|
+
if (entryHost.charAt(0) === ".") {
|
|
25623
|
+
return hostname.endsWith(entryHost);
|
|
25624
|
+
}
|
|
25625
|
+
return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost);
|
|
25626
|
+
});
|
|
25627
|
+
}
|
|
25628
|
+
|
|
25309
25629
|
// ../../../node_modules/axios/lib/helpers/speedometer.js
|
|
25310
25630
|
function speedometer(samplesCount, min) {
|
|
25311
25631
|
samplesCount = samplesCount || 10;
|
|
@@ -25382,19 +25702,19 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
25382
25702
|
let bytesNotified = 0;
|
|
25383
25703
|
const _speedometer = speedometer_default(50, 250);
|
|
25384
25704
|
return throttle_default((e) => {
|
|
25385
|
-
const
|
|
25705
|
+
const rawLoaded = e.loaded;
|
|
25386
25706
|
const total = e.lengthComputable ? e.total : void 0;
|
|
25387
|
-
const
|
|
25707
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
25708
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
25388
25709
|
const rate = _speedometer(progressBytes);
|
|
25389
|
-
|
|
25390
|
-
bytesNotified = loaded;
|
|
25710
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
25391
25711
|
const data = {
|
|
25392
25712
|
loaded,
|
|
25393
25713
|
total,
|
|
25394
25714
|
progress: total ? loaded / total : void 0,
|
|
25395
25715
|
bytes: progressBytes,
|
|
25396
25716
|
rate: rate ? rate : void 0,
|
|
25397
|
-
estimated: rate && total
|
|
25717
|
+
estimated: rate && total ? (total - loaded) / rate : void 0,
|
|
25398
25718
|
event: e,
|
|
25399
25719
|
lengthComputable: total != null,
|
|
25400
25720
|
[isDownloadStream ? "download" : "upload"]: true
|
|
@@ -25404,11 +25724,14 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
25404
25724
|
};
|
|
25405
25725
|
var progressEventDecorator = (total, throttled) => {
|
|
25406
25726
|
const lengthComputable = total != null;
|
|
25407
|
-
return [
|
|
25408
|
-
|
|
25409
|
-
|
|
25410
|
-
|
|
25411
|
-
|
|
25727
|
+
return [
|
|
25728
|
+
(loaded) => throttled[0]({
|
|
25729
|
+
lengthComputable,
|
|
25730
|
+
total,
|
|
25731
|
+
loaded
|
|
25732
|
+
}),
|
|
25733
|
+
throttled[1]
|
|
25734
|
+
];
|
|
25412
25735
|
};
|
|
25413
25736
|
var asyncDecorator = (fn) => (...args2) => utils_default.asap(() => fn(...args2));
|
|
25414
25737
|
|
|
@@ -25457,10 +25780,32 @@ function estimateDataURLDecodedBytes(url2) {
|
|
|
25457
25780
|
}
|
|
25458
25781
|
}
|
|
25459
25782
|
const groups = Math.floor(effectiveLen / 4);
|
|
25460
|
-
const
|
|
25461
|
-
return
|
|
25783
|
+
const bytes2 = groups * 3 - (pad || 0);
|
|
25784
|
+
return bytes2 > 0 ? bytes2 : 0;
|
|
25785
|
+
}
|
|
25786
|
+
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
|
|
25787
|
+
return Buffer.byteLength(body, "utf8");
|
|
25788
|
+
}
|
|
25789
|
+
let bytes = 0;
|
|
25790
|
+
for (let i = 0, len = body.length; i < len; i++) {
|
|
25791
|
+
const c = body.charCodeAt(i);
|
|
25792
|
+
if (c < 128) {
|
|
25793
|
+
bytes += 1;
|
|
25794
|
+
} else if (c < 2048) {
|
|
25795
|
+
bytes += 2;
|
|
25796
|
+
} else if (c >= 55296 && c <= 56319 && i + 1 < len) {
|
|
25797
|
+
const next = body.charCodeAt(i + 1);
|
|
25798
|
+
if (next >= 56320 && next <= 57343) {
|
|
25799
|
+
bytes += 4;
|
|
25800
|
+
i++;
|
|
25801
|
+
} else {
|
|
25802
|
+
bytes += 3;
|
|
25803
|
+
}
|
|
25804
|
+
} else {
|
|
25805
|
+
bytes += 3;
|
|
25806
|
+
}
|
|
25462
25807
|
}
|
|
25463
|
-
return
|
|
25808
|
+
return bytes;
|
|
25464
25809
|
}
|
|
25465
25810
|
|
|
25466
25811
|
// ../../../node_modules/axios/lib/adapters/http.js
|
|
@@ -25475,9 +25820,33 @@ var brotliOptions = {
|
|
|
25475
25820
|
var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
|
|
25476
25821
|
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
25477
25822
|
var isHttps = /https:?/;
|
|
25823
|
+
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
25824
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
25825
|
+
if (policy !== "content-only") {
|
|
25826
|
+
headers.set(formHeaders);
|
|
25827
|
+
return;
|
|
25828
|
+
}
|
|
25829
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
25830
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
25831
|
+
headers.set(key, val);
|
|
25832
|
+
}
|
|
25833
|
+
});
|
|
25834
|
+
}
|
|
25835
|
+
var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
|
|
25836
|
+
var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
|
|
25478
25837
|
var supportedProtocols = platform_default.protocols.map((protocol) => {
|
|
25479
25838
|
return protocol + ":";
|
|
25480
25839
|
});
|
|
25840
|
+
var decodeURIComponentSafe = (value) => {
|
|
25841
|
+
if (!utils_default.isString(value)) {
|
|
25842
|
+
return value;
|
|
25843
|
+
}
|
|
25844
|
+
try {
|
|
25845
|
+
return decodeURIComponent(value);
|
|
25846
|
+
} catch (error) {
|
|
25847
|
+
return value;
|
|
25848
|
+
}
|
|
25849
|
+
};
|
|
25481
25850
|
var flushOnFinish = (stream4, [throttled, flush]) => {
|
|
25482
25851
|
stream4.on("end", flush).on("error", flush);
|
|
25483
25852
|
return throttled;
|
|
@@ -25487,9 +25856,12 @@ var Http2Sessions = class {
|
|
|
25487
25856
|
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
25488
25857
|
}
|
|
25489
25858
|
getSession(authority, options) {
|
|
25490
|
-
options = Object.assign(
|
|
25491
|
-
|
|
25492
|
-
|
|
25859
|
+
options = Object.assign(
|
|
25860
|
+
{
|
|
25861
|
+
sessionTimeout: 1e3
|
|
25862
|
+
},
|
|
25863
|
+
options
|
|
25864
|
+
);
|
|
25493
25865
|
let authoritySessions = this.sessions[authority];
|
|
25494
25866
|
if (authoritySessions) {
|
|
25495
25867
|
let len = authoritySessions.length;
|
|
@@ -25515,6 +25887,9 @@ var Http2Sessions = class {
|
|
|
25515
25887
|
} else {
|
|
25516
25888
|
entries.splice(i, 1);
|
|
25517
25889
|
}
|
|
25890
|
+
if (!session.closed) {
|
|
25891
|
+
session.close();
|
|
25892
|
+
}
|
|
25518
25893
|
return;
|
|
25519
25894
|
}
|
|
25520
25895
|
}
|
|
@@ -25543,54 +25918,81 @@ var Http2Sessions = class {
|
|
|
25543
25918
|
};
|
|
25544
25919
|
}
|
|
25545
25920
|
session.once("close", removeSession);
|
|
25546
|
-
let entry = [
|
|
25547
|
-
session,
|
|
25548
|
-
options
|
|
25549
|
-
];
|
|
25921
|
+
let entry = [session, options];
|
|
25550
25922
|
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
25551
25923
|
return session;
|
|
25552
25924
|
}
|
|
25553
25925
|
};
|
|
25554
25926
|
var http2Sessions = new Http2Sessions();
|
|
25555
|
-
function dispatchBeforeRedirect(options, responseDetails) {
|
|
25927
|
+
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
|
|
25556
25928
|
if (options.beforeRedirects.proxy) {
|
|
25557
25929
|
options.beforeRedirects.proxy(options);
|
|
25558
25930
|
}
|
|
25559
25931
|
if (options.beforeRedirects.config) {
|
|
25560
|
-
options.beforeRedirects.config(options, responseDetails);
|
|
25932
|
+
options.beforeRedirects.config(options, responseDetails, requestDetails);
|
|
25561
25933
|
}
|
|
25562
25934
|
}
|
|
25563
|
-
function setProxy(options, configProxy, location) {
|
|
25935
|
+
function setProxy(options, configProxy, location, isRedirect) {
|
|
25564
25936
|
let proxy = configProxy;
|
|
25565
25937
|
if (!proxy && proxy !== false) {
|
|
25566
|
-
const proxyUrl =
|
|
25938
|
+
const proxyUrl = getProxyForUrl(location);
|
|
25567
25939
|
if (proxyUrl) {
|
|
25568
|
-
|
|
25940
|
+
if (!shouldBypassProxy(location)) {
|
|
25941
|
+
proxy = new URL(proxyUrl);
|
|
25942
|
+
}
|
|
25943
|
+
}
|
|
25944
|
+
}
|
|
25945
|
+
if (isRedirect && options.headers) {
|
|
25946
|
+
for (const name of Object.keys(options.headers)) {
|
|
25947
|
+
if (name.toLowerCase() === "proxy-authorization") {
|
|
25948
|
+
delete options.headers[name];
|
|
25949
|
+
}
|
|
25569
25950
|
}
|
|
25570
25951
|
}
|
|
25571
25952
|
if (proxy) {
|
|
25572
|
-
|
|
25573
|
-
|
|
25953
|
+
const isProxyURL = proxy instanceof URL;
|
|
25954
|
+
const readProxyField = (key) => isProxyURL || utils_default.hasOwnProp(proxy, key) ? proxy[key] : void 0;
|
|
25955
|
+
const proxyUsername = readProxyField("username");
|
|
25956
|
+
const proxyPassword = readProxyField("password");
|
|
25957
|
+
let proxyAuth = utils_default.hasOwnProp(proxy, "auth") ? proxy.auth : void 0;
|
|
25958
|
+
if (proxyUsername) {
|
|
25959
|
+
proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || "");
|
|
25960
|
+
}
|
|
25961
|
+
if (proxyAuth) {
|
|
25962
|
+
const authIsObject = typeof proxyAuth === "object";
|
|
25963
|
+
const authUsername = authIsObject && utils_default.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : void 0;
|
|
25964
|
+
const authPassword = authIsObject && utils_default.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : void 0;
|
|
25965
|
+
const validProxyAuth = Boolean(authUsername || authPassword);
|
|
25966
|
+
if (validProxyAuth) {
|
|
25967
|
+
proxyAuth = (authUsername || "") + ":" + (authPassword || "");
|
|
25968
|
+
} else if (authIsObject) {
|
|
25969
|
+
throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy });
|
|
25970
|
+
}
|
|
25971
|
+
const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
|
|
25972
|
+
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
25574
25973
|
}
|
|
25575
|
-
|
|
25576
|
-
|
|
25577
|
-
|
|
25974
|
+
let hasUserHostHeader = false;
|
|
25975
|
+
for (const name of Object.keys(options.headers)) {
|
|
25976
|
+
if (name.toLowerCase() === "host") {
|
|
25977
|
+
hasUserHostHeader = true;
|
|
25978
|
+
break;
|
|
25578
25979
|
}
|
|
25579
|
-
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
25580
|
-
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
25581
25980
|
}
|
|
25582
|
-
|
|
25583
|
-
|
|
25981
|
+
if (!hasUserHostHeader) {
|
|
25982
|
+
options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
|
|
25983
|
+
}
|
|
25984
|
+
const proxyHost = readProxyField("hostname") || readProxyField("host");
|
|
25584
25985
|
options.hostname = proxyHost;
|
|
25585
25986
|
options.host = proxyHost;
|
|
25586
|
-
options.port =
|
|
25987
|
+
options.port = readProxyField("port");
|
|
25587
25988
|
options.path = location;
|
|
25588
|
-
|
|
25589
|
-
|
|
25989
|
+
const proxyProtocol = readProxyField("protocol");
|
|
25990
|
+
if (proxyProtocol) {
|
|
25991
|
+
options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
|
|
25590
25992
|
}
|
|
25591
25993
|
}
|
|
25592
25994
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
25593
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href);
|
|
25995
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href, true);
|
|
25594
25996
|
};
|
|
25595
25997
|
}
|
|
25596
25998
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
@@ -25626,15 +26028,10 @@ var resolveFamily = ({ address, family }) => {
|
|
|
25626
26028
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
25627
26029
|
var http2Transport = {
|
|
25628
26030
|
request(options, cb) {
|
|
25629
|
-
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
26031
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
25630
26032
|
const { http2Options, headers } = options;
|
|
25631
26033
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
25632
|
-
const {
|
|
25633
|
-
HTTP2_HEADER_SCHEME,
|
|
25634
|
-
HTTP2_HEADER_METHOD,
|
|
25635
|
-
HTTP2_HEADER_PATH,
|
|
25636
|
-
HTTP2_HEADER_STATUS
|
|
25637
|
-
} = import_http2.default.constants;
|
|
26034
|
+
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = import_http2.default.constants;
|
|
25638
26035
|
const http2Headers = {
|
|
25639
26036
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
25640
26037
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -25658,12 +26055,20 @@ var http2Transport = {
|
|
|
25658
26055
|
};
|
|
25659
26056
|
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
25660
26057
|
return wrapAsync(async function dispatchHttpRequest(resolve3, reject, onDone) {
|
|
25661
|
-
|
|
25662
|
-
|
|
26058
|
+
const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
|
|
26059
|
+
let data = own2("data");
|
|
26060
|
+
let lookup = own2("lookup");
|
|
26061
|
+
let family = own2("family");
|
|
26062
|
+
let httpVersion = own2("httpVersion");
|
|
26063
|
+
if (httpVersion === void 0) httpVersion = 1;
|
|
26064
|
+
let http2Options = own2("http2Options");
|
|
26065
|
+
const responseType = own2("responseType");
|
|
26066
|
+
const responseEncoding = own2("responseEncoding");
|
|
25663
26067
|
const method = config.method.toUpperCase();
|
|
25664
26068
|
let isDone;
|
|
25665
26069
|
let rejected = false;
|
|
25666
26070
|
let req;
|
|
26071
|
+
let connectPhaseTimer;
|
|
25667
26072
|
httpVersion = +httpVersion;
|
|
25668
26073
|
if (Number.isNaN(httpVersion)) {
|
|
25669
26074
|
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
@@ -25687,13 +26092,36 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25687
26092
|
const abortEmitter = new import_events.EventEmitter();
|
|
25688
26093
|
function abort(reason) {
|
|
25689
26094
|
try {
|
|
25690
|
-
abortEmitter.emit(
|
|
26095
|
+
abortEmitter.emit(
|
|
26096
|
+
"abort",
|
|
26097
|
+
!reason || reason.type ? new CanceledError_default(null, config, req) : reason
|
|
26098
|
+
);
|
|
25691
26099
|
} catch (err) {
|
|
25692
26100
|
console.warn("emit error", err);
|
|
25693
26101
|
}
|
|
25694
26102
|
}
|
|
26103
|
+
function clearConnectPhaseTimer() {
|
|
26104
|
+
if (connectPhaseTimer) {
|
|
26105
|
+
clearTimeout(connectPhaseTimer);
|
|
26106
|
+
connectPhaseTimer = null;
|
|
26107
|
+
}
|
|
26108
|
+
}
|
|
26109
|
+
function createTimeoutError() {
|
|
26110
|
+
let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
26111
|
+
const transitional2 = config.transitional || transitional_default;
|
|
26112
|
+
if (config.timeoutErrorMessage) {
|
|
26113
|
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
26114
|
+
}
|
|
26115
|
+
return new AxiosError_default(
|
|
26116
|
+
timeoutErrorMessage,
|
|
26117
|
+
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
26118
|
+
config,
|
|
26119
|
+
req
|
|
26120
|
+
);
|
|
26121
|
+
}
|
|
25695
26122
|
abortEmitter.once("abort", reject);
|
|
25696
26123
|
const onFinished = () => {
|
|
26124
|
+
clearConnectPhaseTimer();
|
|
25697
26125
|
if (config.cancelToken) {
|
|
25698
26126
|
config.cancelToken.unsubscribe(abort);
|
|
25699
26127
|
}
|
|
@@ -25710,6 +26138,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25710
26138
|
}
|
|
25711
26139
|
onDone((response, isRejected) => {
|
|
25712
26140
|
isDone = true;
|
|
26141
|
+
clearConnectPhaseTimer();
|
|
25713
26142
|
if (isRejected) {
|
|
25714
26143
|
rejected = true;
|
|
25715
26144
|
onFinished();
|
|
@@ -25733,11 +26162,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25733
26162
|
const dataUrl = String(config.url || fullPath || "");
|
|
25734
26163
|
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
25735
26164
|
if (estimated > config.maxContentLength) {
|
|
25736
|
-
return reject(
|
|
25737
|
-
|
|
25738
|
-
|
|
25739
|
-
|
|
25740
|
-
|
|
26165
|
+
return reject(
|
|
26166
|
+
new AxiosError_default(
|
|
26167
|
+
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
26168
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
26169
|
+
config
|
|
26170
|
+
)
|
|
26171
|
+
);
|
|
25741
26172
|
}
|
|
25742
26173
|
}
|
|
25743
26174
|
let convertedData;
|
|
@@ -25773,11 +26204,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25773
26204
|
});
|
|
25774
26205
|
}
|
|
25775
26206
|
if (supportedProtocols.indexOf(protocol) === -1) {
|
|
25776
|
-
return reject(
|
|
25777
|
-
"Unsupported protocol " + protocol,
|
|
25778
|
-
|
|
25779
|
-
config
|
|
25780
|
-
));
|
|
26207
|
+
return reject(
|
|
26208
|
+
new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config)
|
|
26209
|
+
);
|
|
25781
26210
|
}
|
|
25782
26211
|
const headers = AxiosHeaders_default.from(config.headers).normalize();
|
|
25783
26212
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
@@ -25787,14 +26216,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25787
26216
|
let maxDownloadRate = void 0;
|
|
25788
26217
|
if (utils_default.isSpecCompliantForm(data)) {
|
|
25789
26218
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
25790
|
-
data = formDataToStream_default(
|
|
25791
|
-
|
|
25792
|
-
|
|
25793
|
-
|
|
25794
|
-
|
|
25795
|
-
|
|
25796
|
-
|
|
25797
|
-
|
|
26219
|
+
data = formDataToStream_default(
|
|
26220
|
+
data,
|
|
26221
|
+
(formHeaders) => {
|
|
26222
|
+
headers.set(formHeaders);
|
|
26223
|
+
},
|
|
26224
|
+
{
|
|
26225
|
+
tag: `axios-${VERSION}-boundary`,
|
|
26226
|
+
boundary: userBoundary && userBoundary[1] || void 0
|
|
26227
|
+
}
|
|
26228
|
+
);
|
|
26229
|
+
} else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
|
|
26230
|
+
setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
|
|
25798
26231
|
if (!headers.hasContentLength()) {
|
|
25799
26232
|
try {
|
|
25800
26233
|
const knownLength = await import_util3.default.promisify(data.getLength).call(data);
|
|
@@ -25813,19 +26246,23 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25813
26246
|
} else if (utils_default.isString(data)) {
|
|
25814
26247
|
data = Buffer.from(data, "utf-8");
|
|
25815
26248
|
} else {
|
|
25816
|
-
return reject(
|
|
25817
|
-
|
|
25818
|
-
|
|
25819
|
-
|
|
25820
|
-
|
|
26249
|
+
return reject(
|
|
26250
|
+
new AxiosError_default(
|
|
26251
|
+
"Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
|
|
26252
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
26253
|
+
config
|
|
26254
|
+
)
|
|
26255
|
+
);
|
|
25821
26256
|
}
|
|
25822
26257
|
headers.setContentLength(data.length, false);
|
|
25823
26258
|
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
|
|
25824
|
-
return reject(
|
|
25825
|
-
|
|
25826
|
-
|
|
25827
|
-
|
|
25828
|
-
|
|
26259
|
+
return reject(
|
|
26260
|
+
new AxiosError_default(
|
|
26261
|
+
"Request body larger than maxBodyLength limit",
|
|
26262
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
26263
|
+
config
|
|
26264
|
+
)
|
|
26265
|
+
);
|
|
25829
26266
|
}
|
|
25830
26267
|
}
|
|
25831
26268
|
const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
|
|
@@ -25839,26 +26276,36 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25839
26276
|
if (!utils_default.isStream(data)) {
|
|
25840
26277
|
data = import_stream5.default.Readable.from(data, { objectMode: false });
|
|
25841
26278
|
}
|
|
25842
|
-
data = import_stream5.default.pipeline(
|
|
25843
|
-
|
|
25844
|
-
|
|
25845
|
-
|
|
25846
|
-
|
|
25847
|
-
|
|
25848
|
-
|
|
25849
|
-
|
|
26279
|
+
data = import_stream5.default.pipeline(
|
|
26280
|
+
[
|
|
26281
|
+
data,
|
|
26282
|
+
new AxiosTransformStream_default({
|
|
26283
|
+
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
|
26284
|
+
})
|
|
26285
|
+
],
|
|
26286
|
+
utils_default.noop
|
|
26287
|
+
);
|
|
26288
|
+
onUploadProgress && data.on(
|
|
26289
|
+
"progress",
|
|
26290
|
+
flushOnFinish(
|
|
26291
|
+
data,
|
|
26292
|
+
progressEventDecorator(
|
|
26293
|
+
contentLength,
|
|
26294
|
+
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
|
26295
|
+
)
|
|
25850
26296
|
)
|
|
25851
|
-
)
|
|
26297
|
+
);
|
|
25852
26298
|
}
|
|
25853
26299
|
let auth = void 0;
|
|
25854
|
-
|
|
25855
|
-
|
|
25856
|
-
const
|
|
26300
|
+
const configAuth = own2("auth");
|
|
26301
|
+
if (configAuth) {
|
|
26302
|
+
const username = configAuth.username || "";
|
|
26303
|
+
const password = configAuth.password || "";
|
|
25857
26304
|
auth = username + ":" + password;
|
|
25858
26305
|
}
|
|
25859
26306
|
if (!auth && parsed.username) {
|
|
25860
|
-
const urlUsername = parsed.username;
|
|
25861
|
-
const urlPassword = parsed.password;
|
|
26307
|
+
const urlUsername = decodeURIComponentSafe(parsed.username);
|
|
26308
|
+
const urlPassword = decodeURIComponentSafe(parsed.password);
|
|
25862
26309
|
auth = urlUsername + ":" + urlPassword;
|
|
25863
26310
|
}
|
|
25864
26311
|
auth && headers.delete("authorization");
|
|
@@ -25881,7 +26328,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25881
26328
|
"gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
|
|
25882
26329
|
false
|
|
25883
26330
|
);
|
|
25884
|
-
const options = {
|
|
26331
|
+
const options = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
25885
26332
|
path,
|
|
25886
26333
|
method,
|
|
25887
26334
|
headers: headers.toJSON(),
|
|
@@ -25890,33 +26337,62 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25890
26337
|
protocol,
|
|
25891
26338
|
family,
|
|
25892
26339
|
beforeRedirect: dispatchBeforeRedirect,
|
|
25893
|
-
beforeRedirects:
|
|
26340
|
+
beforeRedirects: /* @__PURE__ */ Object.create(null),
|
|
25894
26341
|
http2Options
|
|
25895
|
-
};
|
|
26342
|
+
});
|
|
25896
26343
|
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
25897
26344
|
if (config.socketPath) {
|
|
26345
|
+
if (typeof config.socketPath !== "string") {
|
|
26346
|
+
return reject(
|
|
26347
|
+
new AxiosError_default("socketPath must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE, config)
|
|
26348
|
+
);
|
|
26349
|
+
}
|
|
26350
|
+
if (config.allowedSocketPaths != null) {
|
|
26351
|
+
const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
|
|
26352
|
+
const resolvedSocket = (0, import_path.resolve)(config.socketPath);
|
|
26353
|
+
const isAllowed = allowed.some(
|
|
26354
|
+
(entry) => typeof entry === "string" && (0, import_path.resolve)(entry) === resolvedSocket
|
|
26355
|
+
);
|
|
26356
|
+
if (!isAllowed) {
|
|
26357
|
+
return reject(
|
|
26358
|
+
new AxiosError_default(
|
|
26359
|
+
`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
|
|
26360
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
26361
|
+
config
|
|
26362
|
+
)
|
|
26363
|
+
);
|
|
26364
|
+
}
|
|
26365
|
+
}
|
|
25898
26366
|
options.socketPath = config.socketPath;
|
|
25899
26367
|
} else {
|
|
25900
26368
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
25901
26369
|
options.port = parsed.port;
|
|
25902
|
-
setProxy(
|
|
26370
|
+
setProxy(
|
|
26371
|
+
options,
|
|
26372
|
+
config.proxy,
|
|
26373
|
+
protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
|
|
26374
|
+
);
|
|
25903
26375
|
}
|
|
25904
26376
|
let transport;
|
|
26377
|
+
let isNativeTransport = false;
|
|
25905
26378
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
25906
26379
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
25907
26380
|
if (isHttp2) {
|
|
25908
26381
|
transport = http2Transport;
|
|
25909
26382
|
} else {
|
|
25910
|
-
|
|
25911
|
-
|
|
26383
|
+
const configTransport = own2("transport");
|
|
26384
|
+
if (configTransport) {
|
|
26385
|
+
transport = configTransport;
|
|
25912
26386
|
} else if (config.maxRedirects === 0) {
|
|
25913
26387
|
transport = isHttpsRequest ? import_https.default : import_http.default;
|
|
26388
|
+
isNativeTransport = true;
|
|
25914
26389
|
} else {
|
|
25915
26390
|
if (config.maxRedirects) {
|
|
25916
26391
|
options.maxRedirects = config.maxRedirects;
|
|
25917
26392
|
}
|
|
25918
|
-
|
|
25919
|
-
|
|
26393
|
+
const configBeforeRedirect = own2("beforeRedirect");
|
|
26394
|
+
if (configBeforeRedirect) {
|
|
26395
|
+
options.beforeRedirects.config = configBeforeRedirect;
|
|
25920
26396
|
}
|
|
25921
26397
|
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
25922
26398
|
}
|
|
@@ -25926,10 +26402,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25926
26402
|
} else {
|
|
25927
26403
|
options.maxBodyLength = Infinity;
|
|
25928
26404
|
}
|
|
25929
|
-
|
|
25930
|
-
options.insecureHTTPParser = config.insecureHTTPParser;
|
|
25931
|
-
}
|
|
26405
|
+
options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
|
|
25932
26406
|
req = transport.request(options, function handleResponse(res) {
|
|
26407
|
+
clearConnectPhaseTimer();
|
|
25933
26408
|
if (req.destroyed) return;
|
|
25934
26409
|
const streams = [res];
|
|
25935
26410
|
const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]);
|
|
@@ -25937,13 +26412,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25937
26412
|
const transformStream = new AxiosTransformStream_default({
|
|
25938
26413
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
25939
26414
|
});
|
|
25940
|
-
onDownloadProgress && transformStream.on(
|
|
25941
|
-
|
|
25942
|
-
|
|
25943
|
-
|
|
25944
|
-
|
|
26415
|
+
onDownloadProgress && transformStream.on(
|
|
26416
|
+
"progress",
|
|
26417
|
+
flushOnFinish(
|
|
26418
|
+
transformStream,
|
|
26419
|
+
progressEventDecorator(
|
|
26420
|
+
responseLength,
|
|
26421
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
|
|
26422
|
+
)
|
|
25945
26423
|
)
|
|
25946
|
-
)
|
|
26424
|
+
);
|
|
25947
26425
|
streams.push(transformStream);
|
|
25948
26426
|
}
|
|
25949
26427
|
let responseStream = res;
|
|
@@ -25982,6 +26460,28 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25982
26460
|
request: lastRequest
|
|
25983
26461
|
};
|
|
25984
26462
|
if (responseType === "stream") {
|
|
26463
|
+
if (config.maxContentLength > -1) {
|
|
26464
|
+
const limit = config.maxContentLength;
|
|
26465
|
+
const source = responseStream;
|
|
26466
|
+
async function* enforceMaxContentLength() {
|
|
26467
|
+
let totalResponseBytes = 0;
|
|
26468
|
+
for await (const chunk of source) {
|
|
26469
|
+
totalResponseBytes += chunk.length;
|
|
26470
|
+
if (totalResponseBytes > limit) {
|
|
26471
|
+
throw new AxiosError_default(
|
|
26472
|
+
"maxContentLength size of " + limit + " exceeded",
|
|
26473
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
26474
|
+
config,
|
|
26475
|
+
lastRequest
|
|
26476
|
+
);
|
|
26477
|
+
}
|
|
26478
|
+
yield chunk;
|
|
26479
|
+
}
|
|
26480
|
+
}
|
|
26481
|
+
responseStream = import_stream5.default.Readable.from(enforceMaxContentLength(), {
|
|
26482
|
+
objectMode: false
|
|
26483
|
+
});
|
|
26484
|
+
}
|
|
25985
26485
|
response.data = responseStream;
|
|
25986
26486
|
settle(resolve3, reject, response);
|
|
25987
26487
|
} else {
|
|
@@ -25993,12 +26493,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
25993
26493
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
25994
26494
|
rejected = true;
|
|
25995
26495
|
responseStream.destroy();
|
|
25996
|
-
abort(
|
|
25997
|
-
|
|
25998
|
-
|
|
25999
|
-
|
|
26000
|
-
|
|
26001
|
-
|
|
26496
|
+
abort(
|
|
26497
|
+
new AxiosError_default(
|
|
26498
|
+
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
26499
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
26500
|
+
config,
|
|
26501
|
+
lastRequest
|
|
26502
|
+
)
|
|
26503
|
+
);
|
|
26002
26504
|
}
|
|
26003
26505
|
});
|
|
26004
26506
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
@@ -26009,14 +26511,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
26009
26511
|
"stream has been aborted",
|
|
26010
26512
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
26011
26513
|
config,
|
|
26012
|
-
lastRequest
|
|
26514
|
+
lastRequest,
|
|
26515
|
+
response
|
|
26013
26516
|
);
|
|
26014
26517
|
responseStream.destroy(err);
|
|
26015
26518
|
reject(err);
|
|
26016
26519
|
});
|
|
26017
26520
|
responseStream.on("error", function handleStreamError(err) {
|
|
26018
|
-
if (
|
|
26019
|
-
reject(AxiosError_default.from(err, null, config, lastRequest));
|
|
26521
|
+
if (rejected) return;
|
|
26522
|
+
reject(AxiosError_default.from(err, null, config, lastRequest, response));
|
|
26020
26523
|
});
|
|
26021
26524
|
responseStream.on("end", function handleStreamEnd() {
|
|
26022
26525
|
try {
|
|
@@ -26051,34 +26554,51 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
26051
26554
|
req.on("error", function handleRequestError(err) {
|
|
26052
26555
|
reject(AxiosError_default.from(err, null, config, req));
|
|
26053
26556
|
});
|
|
26557
|
+
const boundSockets = /* @__PURE__ */ new Set();
|
|
26054
26558
|
req.on("socket", function handleRequestSocket(socket) {
|
|
26055
26559
|
socket.setKeepAlive(true, 1e3 * 60);
|
|
26560
|
+
if (!socket[kAxiosSocketListener]) {
|
|
26561
|
+
socket.on("error", function handleSocketError(err) {
|
|
26562
|
+
const current2 = socket[kAxiosCurrentReq];
|
|
26563
|
+
if (current2 && !current2.destroyed) {
|
|
26564
|
+
current2.destroy(err);
|
|
26565
|
+
}
|
|
26566
|
+
});
|
|
26567
|
+
socket[kAxiosSocketListener] = true;
|
|
26568
|
+
}
|
|
26569
|
+
socket[kAxiosCurrentReq] = req;
|
|
26570
|
+
boundSockets.add(socket);
|
|
26571
|
+
});
|
|
26572
|
+
req.once("close", function clearCurrentReq() {
|
|
26573
|
+
clearConnectPhaseTimer();
|
|
26574
|
+
for (const socket of boundSockets) {
|
|
26575
|
+
if (socket[kAxiosCurrentReq] === req) {
|
|
26576
|
+
socket[kAxiosCurrentReq] = null;
|
|
26577
|
+
}
|
|
26578
|
+
}
|
|
26579
|
+
boundSockets.clear();
|
|
26056
26580
|
});
|
|
26057
26581
|
if (config.timeout) {
|
|
26058
26582
|
const timeout = parseInt(config.timeout, 10);
|
|
26059
26583
|
if (Number.isNaN(timeout)) {
|
|
26060
|
-
abort(
|
|
26061
|
-
|
|
26062
|
-
|
|
26063
|
-
|
|
26064
|
-
|
|
26065
|
-
|
|
26584
|
+
abort(
|
|
26585
|
+
new AxiosError_default(
|
|
26586
|
+
"error trying to parse `config.timeout` to int",
|
|
26587
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
26588
|
+
config,
|
|
26589
|
+
req
|
|
26590
|
+
)
|
|
26591
|
+
);
|
|
26066
26592
|
return;
|
|
26067
26593
|
}
|
|
26068
|
-
|
|
26594
|
+
const handleTimeout = function handleTimeout2() {
|
|
26069
26595
|
if (isDone) return;
|
|
26070
|
-
|
|
26071
|
-
|
|
26072
|
-
|
|
26073
|
-
|
|
26074
|
-
|
|
26075
|
-
|
|
26076
|
-
timeoutErrorMessage,
|
|
26077
|
-
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
26078
|
-
config,
|
|
26079
|
-
req
|
|
26080
|
-
));
|
|
26081
|
-
});
|
|
26596
|
+
abort(createTimeoutError());
|
|
26597
|
+
};
|
|
26598
|
+
if (isNativeTransport && timeout > 0) {
|
|
26599
|
+
connectPhaseTimer = setTimeout(handleTimeout, timeout);
|
|
26600
|
+
}
|
|
26601
|
+
req.setTimeout(timeout, handleTimeout);
|
|
26082
26602
|
} else {
|
|
26083
26603
|
req.setTimeout(0);
|
|
26084
26604
|
}
|
|
@@ -26097,7 +26617,37 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
26097
26617
|
abort(new CanceledError_default("Request stream has been aborted", config, req));
|
|
26098
26618
|
}
|
|
26099
26619
|
});
|
|
26100
|
-
data
|
|
26620
|
+
let uploadStream = data;
|
|
26621
|
+
if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
|
|
26622
|
+
const limit = config.maxBodyLength;
|
|
26623
|
+
let bytesSent = 0;
|
|
26624
|
+
uploadStream = import_stream5.default.pipeline(
|
|
26625
|
+
[
|
|
26626
|
+
data,
|
|
26627
|
+
new import_stream5.default.Transform({
|
|
26628
|
+
transform(chunk, _enc, cb) {
|
|
26629
|
+
bytesSent += chunk.length;
|
|
26630
|
+
if (bytesSent > limit) {
|
|
26631
|
+
return cb(
|
|
26632
|
+
new AxiosError_default(
|
|
26633
|
+
"Request body larger than maxBodyLength limit",
|
|
26634
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
26635
|
+
config,
|
|
26636
|
+
req
|
|
26637
|
+
)
|
|
26638
|
+
);
|
|
26639
|
+
}
|
|
26640
|
+
cb(null, chunk);
|
|
26641
|
+
}
|
|
26642
|
+
})
|
|
26643
|
+
],
|
|
26644
|
+
utils_default.noop
|
|
26645
|
+
);
|
|
26646
|
+
uploadStream.on("error", (err) => {
|
|
26647
|
+
if (!req.destroyed) req.destroy(err);
|
|
26648
|
+
});
|
|
26649
|
+
}
|
|
26650
|
+
uploadStream.pipe(req);
|
|
26101
26651
|
} else {
|
|
26102
26652
|
data && req.write(data);
|
|
26103
26653
|
req.end();
|
|
@@ -26140,8 +26690,15 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
|
26140
26690
|
},
|
|
26141
26691
|
read(name) {
|
|
26142
26692
|
if (typeof document === "undefined") return null;
|
|
26143
|
-
const
|
|
26144
|
-
|
|
26693
|
+
const cookies = document.cookie.split(";");
|
|
26694
|
+
for (let i = 0; i < cookies.length; i++) {
|
|
26695
|
+
const cookie = cookies[i].replace(/^\s+/, "");
|
|
26696
|
+
const eq = cookie.indexOf("=");
|
|
26697
|
+
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
26698
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
26699
|
+
}
|
|
26700
|
+
}
|
|
26701
|
+
return null;
|
|
26145
26702
|
},
|
|
26146
26703
|
remove(name) {
|
|
26147
26704
|
this.write(name, "", Date.now() - 864e5, "/");
|
|
@@ -26164,7 +26721,16 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
|
26164
26721
|
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
|
26165
26722
|
function mergeConfig(config1, config2) {
|
|
26166
26723
|
config2 = config2 || {};
|
|
26167
|
-
const config =
|
|
26724
|
+
const config = /* @__PURE__ */ Object.create(null);
|
|
26725
|
+
Object.defineProperty(config, "hasOwnProperty", {
|
|
26726
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
26727
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
26728
|
+
__proto__: null,
|
|
26729
|
+
value: Object.prototype.hasOwnProperty,
|
|
26730
|
+
enumerable: false,
|
|
26731
|
+
writable: true,
|
|
26732
|
+
configurable: true
|
|
26733
|
+
});
|
|
26168
26734
|
function getMergedValue(target, source, prop, caseless) {
|
|
26169
26735
|
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
26170
26736
|
return utils_default.merge.call({ caseless }, target, source);
|
|
@@ -26195,9 +26761,9 @@ function mergeConfig(config1, config2) {
|
|
|
26195
26761
|
}
|
|
26196
26762
|
}
|
|
26197
26763
|
function mergeDirectKeys(a, b, prop) {
|
|
26198
|
-
if (prop
|
|
26764
|
+
if (utils_default.hasOwnProp(config2, prop)) {
|
|
26199
26765
|
return getMergedValue(a, b);
|
|
26200
|
-
} else if (prop
|
|
26766
|
+
} else if (utils_default.hasOwnProp(config1, prop)) {
|
|
26201
26767
|
return getMergedValue(void 0, a);
|
|
26202
26768
|
}
|
|
26203
26769
|
}
|
|
@@ -26228,46 +26794,76 @@ function mergeConfig(config1, config2) {
|
|
|
26228
26794
|
httpsAgent: defaultToConfig2,
|
|
26229
26795
|
cancelToken: defaultToConfig2,
|
|
26230
26796
|
socketPath: defaultToConfig2,
|
|
26797
|
+
allowedSocketPaths: defaultToConfig2,
|
|
26231
26798
|
responseEncoding: defaultToConfig2,
|
|
26232
26799
|
validateStatus: mergeDirectKeys,
|
|
26233
26800
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
26234
26801
|
};
|
|
26235
26802
|
utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
26236
|
-
|
|
26237
|
-
const
|
|
26803
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
|
|
26804
|
+
const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
26805
|
+
const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
|
|
26806
|
+
const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0;
|
|
26807
|
+
const configValue = merge2(a, b, prop);
|
|
26238
26808
|
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
26239
26809
|
});
|
|
26240
26810
|
return config;
|
|
26241
26811
|
}
|
|
26242
26812
|
|
|
26243
26813
|
// ../../../node_modules/axios/lib/helpers/resolveConfig.js
|
|
26814
|
+
var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
|
|
26815
|
+
function setFormDataHeaders2(headers, formHeaders, policy) {
|
|
26816
|
+
if (policy !== "content-only") {
|
|
26817
|
+
headers.set(formHeaders);
|
|
26818
|
+
return;
|
|
26819
|
+
}
|
|
26820
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
26821
|
+
if (FORM_DATA_CONTENT_HEADERS2.includes(key.toLowerCase())) {
|
|
26822
|
+
headers.set(key, val);
|
|
26823
|
+
}
|
|
26824
|
+
});
|
|
26825
|
+
}
|
|
26826
|
+
var encodeUTF8 = (str) => encodeURIComponent(str).replace(
|
|
26827
|
+
/%([0-9A-F]{2})/gi,
|
|
26828
|
+
(_, hex) => String.fromCharCode(parseInt(hex, 16))
|
|
26829
|
+
);
|
|
26244
26830
|
var resolveConfig_default = (config) => {
|
|
26245
26831
|
const newConfig = mergeConfig({}, config);
|
|
26246
|
-
|
|
26832
|
+
const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
|
|
26833
|
+
const data = own2("data");
|
|
26834
|
+
let withXSRFToken = own2("withXSRFToken");
|
|
26835
|
+
const xsrfHeaderName = own2("xsrfHeaderName");
|
|
26836
|
+
const xsrfCookieName = own2("xsrfCookieName");
|
|
26837
|
+
let headers = own2("headers");
|
|
26838
|
+
const auth = own2("auth");
|
|
26839
|
+
const baseURL = own2("baseURL");
|
|
26840
|
+
const allowAbsoluteUrls = own2("allowAbsoluteUrls");
|
|
26841
|
+
const url2 = own2("url");
|
|
26247
26842
|
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
26248
|
-
newConfig.url = buildURL(
|
|
26843
|
+
newConfig.url = buildURL(
|
|
26844
|
+
buildFullPath(baseURL, url2, allowAbsoluteUrls),
|
|
26845
|
+
config.params,
|
|
26846
|
+
config.paramsSerializer
|
|
26847
|
+
);
|
|
26249
26848
|
if (auth) {
|
|
26250
26849
|
headers.set(
|
|
26251
26850
|
"Authorization",
|
|
26252
|
-
"Basic " + btoa((auth.username || "") + ":" + (auth.password ?
|
|
26851
|
+
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : ""))
|
|
26253
26852
|
);
|
|
26254
26853
|
}
|
|
26255
26854
|
if (utils_default.isFormData(data)) {
|
|
26256
26855
|
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
|
|
26257
26856
|
headers.setContentType(void 0);
|
|
26258
26857
|
} else if (utils_default.isFunction(data.getHeaders)) {
|
|
26259
|
-
|
|
26260
|
-
const allowedHeaders = ["content-type", "content-length"];
|
|
26261
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
26262
|
-
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
26263
|
-
headers.set(key, val);
|
|
26264
|
-
}
|
|
26265
|
-
});
|
|
26858
|
+
setFormDataHeaders2(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
|
|
26266
26859
|
}
|
|
26267
26860
|
}
|
|
26268
26861
|
if (platform_default.hasStandardBrowserEnv) {
|
|
26269
|
-
|
|
26270
|
-
|
|
26862
|
+
if (utils_default.isFunction(withXSRFToken)) {
|
|
26863
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
26864
|
+
}
|
|
26865
|
+
const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url);
|
|
26866
|
+
if (shouldSendXSRF) {
|
|
26271
26867
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
|
|
26272
26868
|
if (xsrfValue) {
|
|
26273
26869
|
headers.set(xsrfHeaderName, xsrfValue);
|
|
@@ -26313,13 +26909,17 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
26313
26909
|
config,
|
|
26314
26910
|
request
|
|
26315
26911
|
};
|
|
26316
|
-
settle(
|
|
26317
|
-
|
|
26318
|
-
|
|
26319
|
-
|
|
26320
|
-
|
|
26321
|
-
|
|
26322
|
-
|
|
26912
|
+
settle(
|
|
26913
|
+
function _resolve(value) {
|
|
26914
|
+
resolve3(value);
|
|
26915
|
+
done();
|
|
26916
|
+
},
|
|
26917
|
+
function _reject(err) {
|
|
26918
|
+
reject(err);
|
|
26919
|
+
done();
|
|
26920
|
+
},
|
|
26921
|
+
response
|
|
26922
|
+
);
|
|
26323
26923
|
request = null;
|
|
26324
26924
|
}
|
|
26325
26925
|
if ("onloadend" in request) {
|
|
@@ -26329,7 +26929,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
26329
26929
|
if (!request || request.readyState !== 4) {
|
|
26330
26930
|
return;
|
|
26331
26931
|
}
|
|
26332
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.
|
|
26932
|
+
if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
|
|
26333
26933
|
return;
|
|
26334
26934
|
}
|
|
26335
26935
|
setTimeout(onloadend);
|
|
@@ -26340,6 +26940,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
26340
26940
|
return;
|
|
26341
26941
|
}
|
|
26342
26942
|
reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
|
|
26943
|
+
done();
|
|
26343
26944
|
request = null;
|
|
26344
26945
|
};
|
|
26345
26946
|
request.onerror = function handleError(event) {
|
|
@@ -26347,6 +26948,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
26347
26948
|
const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config, request);
|
|
26348
26949
|
err.event = event || null;
|
|
26349
26950
|
reject(err);
|
|
26951
|
+
done();
|
|
26350
26952
|
request = null;
|
|
26351
26953
|
};
|
|
26352
26954
|
request.ontimeout = function handleTimeout() {
|
|
@@ -26355,12 +26957,15 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
26355
26957
|
if (_config.timeoutErrorMessage) {
|
|
26356
26958
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
26357
26959
|
}
|
|
26358
|
-
reject(
|
|
26359
|
-
|
|
26360
|
-
|
|
26361
|
-
|
|
26362
|
-
|
|
26363
|
-
|
|
26960
|
+
reject(
|
|
26961
|
+
new AxiosError_default(
|
|
26962
|
+
timeoutErrorMessage,
|
|
26963
|
+
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
26964
|
+
config,
|
|
26965
|
+
request
|
|
26966
|
+
)
|
|
26967
|
+
);
|
|
26968
|
+
done();
|
|
26364
26969
|
request = null;
|
|
26365
26970
|
};
|
|
26366
26971
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
@@ -26391,6 +26996,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
26391
26996
|
}
|
|
26392
26997
|
reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel);
|
|
26393
26998
|
request.abort();
|
|
26999
|
+
done();
|
|
26394
27000
|
request = null;
|
|
26395
27001
|
};
|
|
26396
27002
|
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
@@ -26399,8 +27005,14 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
26399
27005
|
}
|
|
26400
27006
|
}
|
|
26401
27007
|
const protocol = parseProtocol(_config.url);
|
|
26402
|
-
if (protocol && platform_default.protocols.
|
|
26403
|
-
reject(
|
|
27008
|
+
if (protocol && !platform_default.protocols.includes(protocol)) {
|
|
27009
|
+
reject(
|
|
27010
|
+
new AxiosError_default(
|
|
27011
|
+
"Unsupported protocol " + protocol + ":",
|
|
27012
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
27013
|
+
config
|
|
27014
|
+
)
|
|
27015
|
+
);
|
|
26404
27016
|
return;
|
|
26405
27017
|
}
|
|
26406
27018
|
request.send(requestData || null);
|
|
@@ -26418,12 +27030,14 @@ var composeSignals = (signals2, timeout) => {
|
|
|
26418
27030
|
aborted = true;
|
|
26419
27031
|
unsubscribe();
|
|
26420
27032
|
const err = reason instanceof Error ? reason : this.reason;
|
|
26421
|
-
controller.abort(
|
|
27033
|
+
controller.abort(
|
|
27034
|
+
err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)
|
|
27035
|
+
);
|
|
26422
27036
|
}
|
|
26423
27037
|
};
|
|
26424
27038
|
let timer = timeout && setTimeout(() => {
|
|
26425
27039
|
timer = null;
|
|
26426
|
-
onabort(new AxiosError_default(`timeout ${timeout}
|
|
27040
|
+
onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT));
|
|
26427
27041
|
}, timeout);
|
|
26428
27042
|
const unsubscribe = () => {
|
|
26429
27043
|
if (signals2) {
|
|
@@ -26491,46 +27105,41 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
|
26491
27105
|
onFinish && onFinish(e);
|
|
26492
27106
|
}
|
|
26493
27107
|
};
|
|
26494
|
-
return new ReadableStream(
|
|
26495
|
-
|
|
26496
|
-
|
|
26497
|
-
|
|
26498
|
-
|
|
26499
|
-
|
|
26500
|
-
|
|
26501
|
-
|
|
26502
|
-
|
|
26503
|
-
|
|
26504
|
-
|
|
26505
|
-
|
|
26506
|
-
|
|
27108
|
+
return new ReadableStream(
|
|
27109
|
+
{
|
|
27110
|
+
async pull(controller) {
|
|
27111
|
+
try {
|
|
27112
|
+
const { done: done2, value } = await iterator2.next();
|
|
27113
|
+
if (done2) {
|
|
27114
|
+
_onFinish();
|
|
27115
|
+
controller.close();
|
|
27116
|
+
return;
|
|
27117
|
+
}
|
|
27118
|
+
let len = value.byteLength;
|
|
27119
|
+
if (onProgress) {
|
|
27120
|
+
let loadedBytes = bytes += len;
|
|
27121
|
+
onProgress(loadedBytes);
|
|
27122
|
+
}
|
|
27123
|
+
controller.enqueue(new Uint8Array(value));
|
|
27124
|
+
} catch (err) {
|
|
27125
|
+
_onFinish(err);
|
|
27126
|
+
throw err;
|
|
26507
27127
|
}
|
|
26508
|
-
|
|
26509
|
-
|
|
26510
|
-
_onFinish(
|
|
26511
|
-
|
|
27128
|
+
},
|
|
27129
|
+
cancel(reason) {
|
|
27130
|
+
_onFinish(reason);
|
|
27131
|
+
return iterator2.return();
|
|
26512
27132
|
}
|
|
26513
27133
|
},
|
|
26514
|
-
|
|
26515
|
-
|
|
26516
|
-
return iterator2.return();
|
|
27134
|
+
{
|
|
27135
|
+
highWaterMark: 2
|
|
26517
27136
|
}
|
|
26518
|
-
|
|
26519
|
-
highWaterMark: 2
|
|
26520
|
-
});
|
|
27137
|
+
);
|
|
26521
27138
|
};
|
|
26522
27139
|
|
|
26523
27140
|
// ../../../node_modules/axios/lib/adapters/fetch.js
|
|
26524
27141
|
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
26525
27142
|
var { isFunction: isFunction2 } = utils_default;
|
|
26526
|
-
var globalFetchAPI = (({ Request, Response }) => ({
|
|
26527
|
-
Request,
|
|
26528
|
-
Response
|
|
26529
|
-
}))(utils_default.global);
|
|
26530
|
-
var {
|
|
26531
|
-
ReadableStream: ReadableStream2,
|
|
26532
|
-
TextEncoder: TextEncoder2
|
|
26533
|
-
} = utils_default.global;
|
|
26534
27143
|
var test = (fn, ...args2) => {
|
|
26535
27144
|
try {
|
|
26536
27145
|
return !!fn(...args2);
|
|
@@ -26539,9 +27148,18 @@ var test = (fn, ...args2) => {
|
|
|
26539
27148
|
}
|
|
26540
27149
|
};
|
|
26541
27150
|
var factory = (env3) => {
|
|
26542
|
-
|
|
26543
|
-
|
|
26544
|
-
|
|
27151
|
+
const globalObject = utils_default.global ?? globalThis;
|
|
27152
|
+
const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
|
|
27153
|
+
env3 = utils_default.merge.call(
|
|
27154
|
+
{
|
|
27155
|
+
skipUndefined: true
|
|
27156
|
+
},
|
|
27157
|
+
{
|
|
27158
|
+
Request: globalObject.Request,
|
|
27159
|
+
Response: globalObject.Response
|
|
27160
|
+
},
|
|
27161
|
+
env3
|
|
27162
|
+
);
|
|
26545
27163
|
const { fetch: envFetch, Request, Response } = env3;
|
|
26546
27164
|
const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
|
|
26547
27165
|
const isRequestSupported = isFunction2(Request);
|
|
@@ -26553,14 +27171,18 @@ var factory = (env3) => {
|
|
|
26553
27171
|
const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
26554
27172
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
26555
27173
|
let duplexAccessed = false;
|
|
26556
|
-
const
|
|
27174
|
+
const request = new Request(platform_default.origin, {
|
|
26557
27175
|
body: new ReadableStream2(),
|
|
26558
27176
|
method: "POST",
|
|
26559
27177
|
get duplex() {
|
|
26560
27178
|
duplexAccessed = true;
|
|
26561
27179
|
return "half";
|
|
26562
27180
|
}
|
|
26563
|
-
})
|
|
27181
|
+
});
|
|
27182
|
+
const hasContentType = request.headers.has("Content-Type");
|
|
27183
|
+
if (request.body != null) {
|
|
27184
|
+
request.body.cancel();
|
|
27185
|
+
}
|
|
26564
27186
|
return duplexAccessed && !hasContentType;
|
|
26565
27187
|
});
|
|
26566
27188
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
|
@@ -26574,7 +27196,11 @@ var factory = (env3) => {
|
|
|
26574
27196
|
if (method) {
|
|
26575
27197
|
return method.call(res);
|
|
26576
27198
|
}
|
|
26577
|
-
throw new AxiosError_default(
|
|
27199
|
+
throw new AxiosError_default(
|
|
27200
|
+
`Response type '${type}' is not supported`,
|
|
27201
|
+
AxiosError_default.ERR_NOT_SUPPORT,
|
|
27202
|
+
config
|
|
27203
|
+
);
|
|
26578
27204
|
});
|
|
26579
27205
|
});
|
|
26580
27206
|
})();
|
|
@@ -26619,17 +27245,46 @@ var factory = (env3) => {
|
|
|
26619
27245
|
responseType,
|
|
26620
27246
|
headers,
|
|
26621
27247
|
withCredentials = "same-origin",
|
|
26622
|
-
fetchOptions
|
|
27248
|
+
fetchOptions,
|
|
27249
|
+
maxContentLength,
|
|
27250
|
+
maxBodyLength
|
|
26623
27251
|
} = resolveConfig_default(config);
|
|
27252
|
+
const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
|
|
27253
|
+
const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
26624
27254
|
let _fetch = envFetch || fetch;
|
|
26625
27255
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
26626
|
-
let composedSignal = composeSignals_default(
|
|
27256
|
+
let composedSignal = composeSignals_default(
|
|
27257
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
27258
|
+
timeout
|
|
27259
|
+
);
|
|
26627
27260
|
let request = null;
|
|
26628
27261
|
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
26629
27262
|
composedSignal.unsubscribe();
|
|
26630
27263
|
});
|
|
26631
27264
|
let requestContentLength;
|
|
26632
27265
|
try {
|
|
27266
|
+
if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
|
|
27267
|
+
const estimated = estimateDataURLDecodedBytes(url2);
|
|
27268
|
+
if (estimated > maxContentLength) {
|
|
27269
|
+
throw new AxiosError_default(
|
|
27270
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
27271
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
27272
|
+
config,
|
|
27273
|
+
request
|
|
27274
|
+
);
|
|
27275
|
+
}
|
|
27276
|
+
}
|
|
27277
|
+
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
27278
|
+
const outboundLength = await resolveBodyLength(headers, data);
|
|
27279
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
|
|
27280
|
+
throw new AxiosError_default(
|
|
27281
|
+
"Request body larger than maxBodyLength limit",
|
|
27282
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
27283
|
+
config,
|
|
27284
|
+
request
|
|
27285
|
+
);
|
|
27286
|
+
}
|
|
27287
|
+
}
|
|
26633
27288
|
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
26634
27289
|
let _request = new Request(url2, {
|
|
26635
27290
|
method: "POST",
|
|
@@ -26652,6 +27307,13 @@ var factory = (env3) => {
|
|
|
26652
27307
|
withCredentials = withCredentials ? "include" : "omit";
|
|
26653
27308
|
}
|
|
26654
27309
|
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
27310
|
+
if (utils_default.isFormData(data)) {
|
|
27311
|
+
const contentType = headers.getContentType();
|
|
27312
|
+
if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
|
|
27313
|
+
headers.delete("content-type");
|
|
27314
|
+
}
|
|
27315
|
+
}
|
|
27316
|
+
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
26655
27317
|
const resolvedOptions = {
|
|
26656
27318
|
...fetchOptions,
|
|
26657
27319
|
signal: composedSignal,
|
|
@@ -26663,8 +27325,19 @@ var factory = (env3) => {
|
|
|
26663
27325
|
};
|
|
26664
27326
|
request = isRequestSupported && new Request(url2, resolvedOptions);
|
|
26665
27327
|
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
|
|
27328
|
+
if (hasMaxContentLength) {
|
|
27329
|
+
const declaredLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
|
|
27330
|
+
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
27331
|
+
throw new AxiosError_default(
|
|
27332
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
27333
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
27334
|
+
config,
|
|
27335
|
+
request
|
|
27336
|
+
);
|
|
27337
|
+
}
|
|
27338
|
+
}
|
|
26666
27339
|
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
26667
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
27340
|
+
if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
|
|
26668
27341
|
const options = {};
|
|
26669
27342
|
["status", "statusText", "headers"].forEach((prop) => {
|
|
26670
27343
|
options[prop] = response[prop];
|
|
@@ -26674,8 +27347,23 @@ var factory = (env3) => {
|
|
|
26674
27347
|
responseContentLength,
|
|
26675
27348
|
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
26676
27349
|
) || [];
|
|
27350
|
+
let bytesRead = 0;
|
|
27351
|
+
const onChunkProgress = (loadedBytes) => {
|
|
27352
|
+
if (hasMaxContentLength) {
|
|
27353
|
+
bytesRead = loadedBytes;
|
|
27354
|
+
if (bytesRead > maxContentLength) {
|
|
27355
|
+
throw new AxiosError_default(
|
|
27356
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
27357
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
27358
|
+
config,
|
|
27359
|
+
request
|
|
27360
|
+
);
|
|
27361
|
+
}
|
|
27362
|
+
}
|
|
27363
|
+
onProgress && onProgress(loadedBytes);
|
|
27364
|
+
};
|
|
26677
27365
|
response = new Response(
|
|
26678
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE,
|
|
27366
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
|
|
26679
27367
|
flush && flush();
|
|
26680
27368
|
unsubscribe && unsubscribe();
|
|
26681
27369
|
}),
|
|
@@ -26683,7 +27371,30 @@ var factory = (env3) => {
|
|
|
26683
27371
|
);
|
|
26684
27372
|
}
|
|
26685
27373
|
responseType = responseType || "text";
|
|
26686
|
-
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
|
|
27374
|
+
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
|
|
27375
|
+
response,
|
|
27376
|
+
config
|
|
27377
|
+
);
|
|
27378
|
+
if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
|
|
27379
|
+
let materializedSize;
|
|
27380
|
+
if (responseData != null) {
|
|
27381
|
+
if (typeof responseData.byteLength === "number") {
|
|
27382
|
+
materializedSize = responseData.byteLength;
|
|
27383
|
+
} else if (typeof responseData.size === "number") {
|
|
27384
|
+
materializedSize = responseData.size;
|
|
27385
|
+
} else if (typeof responseData === "string") {
|
|
27386
|
+
materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length;
|
|
27387
|
+
}
|
|
27388
|
+
}
|
|
27389
|
+
if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
|
|
27390
|
+
throw new AxiosError_default(
|
|
27391
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
27392
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
27393
|
+
config,
|
|
27394
|
+
request
|
|
27395
|
+
);
|
|
27396
|
+
}
|
|
27397
|
+
}
|
|
26687
27398
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
26688
27399
|
return await new Promise((resolve3, reject) => {
|
|
26689
27400
|
settle(resolve3, reject, {
|
|
@@ -26697,15 +27408,28 @@ var factory = (env3) => {
|
|
|
26697
27408
|
});
|
|
26698
27409
|
} catch (err) {
|
|
26699
27410
|
unsubscribe && unsubscribe();
|
|
27411
|
+
if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError_default) {
|
|
27412
|
+
const canceledError = composedSignal.reason;
|
|
27413
|
+
canceledError.config = config;
|
|
27414
|
+
request && (canceledError.request = request);
|
|
27415
|
+
err !== canceledError && (canceledError.cause = err);
|
|
27416
|
+
throw canceledError;
|
|
27417
|
+
}
|
|
26700
27418
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
26701
27419
|
throw Object.assign(
|
|
26702
|
-
new AxiosError_default(
|
|
27420
|
+
new AxiosError_default(
|
|
27421
|
+
"Network Error",
|
|
27422
|
+
AxiosError_default.ERR_NETWORK,
|
|
27423
|
+
config,
|
|
27424
|
+
request,
|
|
27425
|
+
err && err.response
|
|
27426
|
+
),
|
|
26703
27427
|
{
|
|
26704
27428
|
cause: err.cause || err
|
|
26705
27429
|
}
|
|
26706
27430
|
);
|
|
26707
27431
|
}
|
|
26708
|
-
throw AxiosError_default.from(err, err && err.code, config, request);
|
|
27432
|
+
throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
|
|
26709
27433
|
}
|
|
26710
27434
|
};
|
|
26711
27435
|
};
|
|
@@ -26713,11 +27437,7 @@ var seedCache = /* @__PURE__ */ new Map();
|
|
|
26713
27437
|
var getFetch = (config) => {
|
|
26714
27438
|
let env3 = config && config.env || {};
|
|
26715
27439
|
const { fetch: fetch2, Request, Response } = env3;
|
|
26716
|
-
const seeds = [
|
|
26717
|
-
Request,
|
|
26718
|
-
Response,
|
|
26719
|
-
fetch2
|
|
26720
|
-
];
|
|
27440
|
+
const seeds = [Request, Response, fetch2];
|
|
26721
27441
|
let len = seeds.length, i = len, seed, target, map = seedCache;
|
|
26722
27442
|
while (i--) {
|
|
26723
27443
|
seed = seeds[i];
|
|
@@ -26740,10 +27460,10 @@ var knownAdapters = {
|
|
|
26740
27460
|
utils_default.forEach(knownAdapters, (fn, value) => {
|
|
26741
27461
|
if (fn) {
|
|
26742
27462
|
try {
|
|
26743
|
-
Object.defineProperty(fn, "name", { value });
|
|
27463
|
+
Object.defineProperty(fn, "name", { __proto__: null, value });
|
|
26744
27464
|
} catch (e) {
|
|
26745
27465
|
}
|
|
26746
|
-
Object.defineProperty(fn, "adapterName", { value });
|
|
27466
|
+
Object.defineProperty(fn, "adapterName", { __proto__: null, value });
|
|
26747
27467
|
}
|
|
26748
27468
|
});
|
|
26749
27469
|
var renderReason = (reason) => `- ${reason}`;
|
|
@@ -26806,37 +27526,43 @@ function throwIfCancellationRequested(config) {
|
|
|
26806
27526
|
function dispatchRequest(config) {
|
|
26807
27527
|
throwIfCancellationRequested(config);
|
|
26808
27528
|
config.headers = AxiosHeaders_default.from(config.headers);
|
|
26809
|
-
config.data = transformData.call(
|
|
26810
|
-
config,
|
|
26811
|
-
config.transformRequest
|
|
26812
|
-
);
|
|
27529
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
26813
27530
|
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
26814
27531
|
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
26815
27532
|
}
|
|
26816
27533
|
const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config);
|
|
26817
|
-
return adapter2(config).then(
|
|
26818
|
-
|
|
26819
|
-
response.data = transformData.call(
|
|
26820
|
-
config,
|
|
26821
|
-
config.transformResponse,
|
|
26822
|
-
response
|
|
26823
|
-
);
|
|
26824
|
-
response.headers = AxiosHeaders_default.from(response.headers);
|
|
26825
|
-
return response;
|
|
26826
|
-
}, function onAdapterRejection(reason) {
|
|
26827
|
-
if (!isCancel(reason)) {
|
|
27534
|
+
return adapter2(config).then(
|
|
27535
|
+
function onAdapterResolution(response) {
|
|
26828
27536
|
throwIfCancellationRequested(config);
|
|
26829
|
-
|
|
26830
|
-
|
|
26831
|
-
|
|
26832
|
-
|
|
26833
|
-
|
|
26834
|
-
|
|
26835
|
-
|
|
27537
|
+
config.response = response;
|
|
27538
|
+
try {
|
|
27539
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
27540
|
+
} finally {
|
|
27541
|
+
delete config.response;
|
|
27542
|
+
}
|
|
27543
|
+
response.headers = AxiosHeaders_default.from(response.headers);
|
|
27544
|
+
return response;
|
|
27545
|
+
},
|
|
27546
|
+
function onAdapterRejection(reason) {
|
|
27547
|
+
if (!isCancel(reason)) {
|
|
27548
|
+
throwIfCancellationRequested(config);
|
|
27549
|
+
if (reason && reason.response) {
|
|
27550
|
+
config.response = reason.response;
|
|
27551
|
+
try {
|
|
27552
|
+
reason.response.data = transformData.call(
|
|
27553
|
+
config,
|
|
27554
|
+
config.transformResponse,
|
|
27555
|
+
reason.response
|
|
27556
|
+
);
|
|
27557
|
+
} finally {
|
|
27558
|
+
delete config.response;
|
|
27559
|
+
}
|
|
27560
|
+
reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
|
|
27561
|
+
}
|
|
26836
27562
|
}
|
|
27563
|
+
return Promise.reject(reason);
|
|
26837
27564
|
}
|
|
26838
|
-
|
|
26839
|
-
});
|
|
27565
|
+
);
|
|
26840
27566
|
}
|
|
26841
27567
|
|
|
26842
27568
|
// ../../../node_modules/axios/lib/helpers/validator.js
|
|
@@ -26884,12 +27610,15 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
26884
27610
|
let i = keys.length;
|
|
26885
27611
|
while (i-- > 0) {
|
|
26886
27612
|
const opt = keys[i];
|
|
26887
|
-
const validator = schema[opt];
|
|
27613
|
+
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
|
|
26888
27614
|
if (validator) {
|
|
26889
27615
|
const value = options[opt];
|
|
26890
27616
|
const result = value === void 0 || validator(value, opt, options);
|
|
26891
27617
|
if (result !== true) {
|
|
26892
|
-
throw new AxiosError_default(
|
|
27618
|
+
throw new AxiosError_default(
|
|
27619
|
+
"option " + opt + " must be " + result,
|
|
27620
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE
|
|
27621
|
+
);
|
|
26893
27622
|
}
|
|
26894
27623
|
continue;
|
|
26895
27624
|
}
|
|
@@ -26928,12 +27657,23 @@ var Axios = class {
|
|
|
26928
27657
|
if (err instanceof Error) {
|
|
26929
27658
|
let dummy = {};
|
|
26930
27659
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
26931
|
-
const stack =
|
|
27660
|
+
const stack = (() => {
|
|
27661
|
+
if (!dummy.stack) {
|
|
27662
|
+
return "";
|
|
27663
|
+
}
|
|
27664
|
+
const firstNewlineIndex = dummy.stack.indexOf("\n");
|
|
27665
|
+
return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
|
|
27666
|
+
})();
|
|
26932
27667
|
try {
|
|
26933
27668
|
if (!err.stack) {
|
|
26934
27669
|
err.stack = stack;
|
|
26935
|
-
} else if (stack
|
|
26936
|
-
|
|
27670
|
+
} else if (stack) {
|
|
27671
|
+
const firstNewlineIndex = stack.indexOf("\n");
|
|
27672
|
+
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
|
|
27673
|
+
const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
|
|
27674
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
27675
|
+
err.stack += "\n" + stack;
|
|
27676
|
+
}
|
|
26937
27677
|
}
|
|
26938
27678
|
} catch (e) {
|
|
26939
27679
|
}
|
|
@@ -26951,11 +27691,16 @@ var Axios = class {
|
|
|
26951
27691
|
config = mergeConfig(this.defaults, config);
|
|
26952
27692
|
const { transitional: transitional2, paramsSerializer, headers } = config;
|
|
26953
27693
|
if (transitional2 !== void 0) {
|
|
26954
|
-
validator_default.assertOptions(
|
|
26955
|
-
|
|
26956
|
-
|
|
26957
|
-
|
|
26958
|
-
|
|
27694
|
+
validator_default.assertOptions(
|
|
27695
|
+
transitional2,
|
|
27696
|
+
{
|
|
27697
|
+
silentJSONParsing: validators2.transitional(validators2.boolean),
|
|
27698
|
+
forcedJSONParsing: validators2.transitional(validators2.boolean),
|
|
27699
|
+
clarifyTimeoutError: validators2.transitional(validators2.boolean),
|
|
27700
|
+
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
|
|
27701
|
+
},
|
|
27702
|
+
false
|
|
27703
|
+
);
|
|
26959
27704
|
}
|
|
26960
27705
|
if (paramsSerializer != null) {
|
|
26961
27706
|
if (utils_default.isFunction(paramsSerializer)) {
|
|
@@ -26963,10 +27708,14 @@ var Axios = class {
|
|
|
26963
27708
|
serialize: paramsSerializer
|
|
26964
27709
|
};
|
|
26965
27710
|
} else {
|
|
26966
|
-
validator_default.assertOptions(
|
|
26967
|
-
|
|
26968
|
-
|
|
26969
|
-
|
|
27711
|
+
validator_default.assertOptions(
|
|
27712
|
+
paramsSerializer,
|
|
27713
|
+
{
|
|
27714
|
+
encode: validators2.function,
|
|
27715
|
+
serialize: validators2.function
|
|
27716
|
+
},
|
|
27717
|
+
true
|
|
27718
|
+
);
|
|
26970
27719
|
}
|
|
26971
27720
|
}
|
|
26972
27721
|
if (config.allowAbsoluteUrls !== void 0) {
|
|
@@ -26975,21 +27724,19 @@ var Axios = class {
|
|
|
26975
27724
|
} else {
|
|
26976
27725
|
config.allowAbsoluteUrls = true;
|
|
26977
27726
|
}
|
|
26978
|
-
validator_default.assertOptions(
|
|
26979
|
-
|
|
26980
|
-
|
|
26981
|
-
|
|
26982
|
-
|
|
26983
|
-
|
|
26984
|
-
|
|
26985
|
-
headers[config.method]
|
|
26986
|
-
);
|
|
26987
|
-
headers && utils_default.forEach(
|
|
26988
|
-
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
26989
|
-
(method) => {
|
|
26990
|
-
delete headers[method];
|
|
26991
|
-
}
|
|
27727
|
+
validator_default.assertOptions(
|
|
27728
|
+
config,
|
|
27729
|
+
{
|
|
27730
|
+
baseUrl: validators2.spelling("baseURL"),
|
|
27731
|
+
withXsrfToken: validators2.spelling("withXSRFToken")
|
|
27732
|
+
},
|
|
27733
|
+
true
|
|
26992
27734
|
);
|
|
27735
|
+
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
27736
|
+
let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
|
|
27737
|
+
headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
|
|
27738
|
+
delete headers[method];
|
|
27739
|
+
});
|
|
26993
27740
|
config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
|
|
26994
27741
|
const requestInterceptorChain = [];
|
|
26995
27742
|
let synchronousRequestInterceptors = true;
|
|
@@ -26998,7 +27745,13 @@ var Axios = class {
|
|
|
26998
27745
|
return;
|
|
26999
27746
|
}
|
|
27000
27747
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
27001
|
-
|
|
27748
|
+
const transitional3 = config.transitional || transitional_default;
|
|
27749
|
+
const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
|
|
27750
|
+
if (legacyInterceptorReqResOrdering) {
|
|
27751
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
27752
|
+
} else {
|
|
27753
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
27754
|
+
}
|
|
27002
27755
|
});
|
|
27003
27756
|
const responseInterceptorChain = [];
|
|
27004
27757
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
@@ -27050,28 +27803,34 @@ var Axios = class {
|
|
|
27050
27803
|
};
|
|
27051
27804
|
utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
27052
27805
|
Axios.prototype[method] = function(url2, config) {
|
|
27053
|
-
return this.request(
|
|
27054
|
-
|
|
27055
|
-
|
|
27056
|
-
|
|
27057
|
-
|
|
27806
|
+
return this.request(
|
|
27807
|
+
mergeConfig(config || {}, {
|
|
27808
|
+
method,
|
|
27809
|
+
url: url2,
|
|
27810
|
+
data: (config || {}).data
|
|
27811
|
+
})
|
|
27812
|
+
);
|
|
27058
27813
|
};
|
|
27059
27814
|
});
|
|
27060
|
-
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
27815
|
+
utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
|
|
27061
27816
|
function generateHTTPMethod(isForm) {
|
|
27062
27817
|
return function httpMethod(url2, data, config) {
|
|
27063
|
-
return this.request(
|
|
27064
|
-
|
|
27065
|
-
|
|
27066
|
-
|
|
27067
|
-
|
|
27068
|
-
|
|
27069
|
-
|
|
27070
|
-
|
|
27818
|
+
return this.request(
|
|
27819
|
+
mergeConfig(config || {}, {
|
|
27820
|
+
method,
|
|
27821
|
+
headers: isForm ? {
|
|
27822
|
+
"Content-Type": "multipart/form-data"
|
|
27823
|
+
} : {},
|
|
27824
|
+
url: url2,
|
|
27825
|
+
data
|
|
27826
|
+
})
|
|
27827
|
+
);
|
|
27071
27828
|
};
|
|
27072
27829
|
}
|
|
27073
27830
|
Axios.prototype[method] = generateHTTPMethod();
|
|
27074
|
-
|
|
27831
|
+
if (method !== "query") {
|
|
27832
|
+
Axios.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
27833
|
+
}
|
|
27075
27834
|
});
|
|
27076
27835
|
var Axios_default = Axios;
|
|
27077
27836
|
|
|
@@ -27268,7 +28027,7 @@ function createInstance(defaultConfig) {
|
|
|
27268
28027
|
const instance2 = bind(Axios_default.prototype.request, context);
|
|
27269
28028
|
utils_default.extend(instance2, Axios_default.prototype, context, { allOwnKeys: true });
|
|
27270
28029
|
utils_default.extend(instance2, context, null, { allOwnKeys: true });
|
|
27271
|
-
instance2.create = function
|
|
28030
|
+
instance2.create = function create2(instanceConfig) {
|
|
27272
28031
|
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
27273
28032
|
};
|
|
27274
28033
|
return instance2;
|
|
@@ -27312,7 +28071,8 @@ var {
|
|
|
27312
28071
|
HttpStatusCode: HttpStatusCode2,
|
|
27313
28072
|
formToJSON,
|
|
27314
28073
|
getAdapter: getAdapter2,
|
|
27315
|
-
mergeConfig: mergeConfig2
|
|
28074
|
+
mergeConfig: mergeConfig2,
|
|
28075
|
+
create
|
|
27316
28076
|
} = axios_default;
|
|
27317
28077
|
|
|
27318
28078
|
// src/http.ts
|
|
@@ -27391,7 +28151,7 @@ function getTokenInteractively(url2, httpsAgent) {
|
|
|
27391
28151
|
|
|
27392
28152
|
// src/io.ts
|
|
27393
28153
|
var import_os2 = require("os");
|
|
27394
|
-
var
|
|
28154
|
+
var import_path2 = require("path");
|
|
27395
28155
|
var import_fs = require("fs");
|
|
27396
28156
|
function streamToFile(source, target) {
|
|
27397
28157
|
const dest = (0, import_fs.createWriteStream)(target);
|
|
@@ -27403,7 +28163,7 @@ function streamToFile(source, target) {
|
|
|
27403
28163
|
}
|
|
27404
28164
|
function getRandomTempFile() {
|
|
27405
28165
|
const rid = Math.random().toString(36).split(".").pop();
|
|
27406
|
-
return (0,
|
|
28166
|
+
return (0, import_path2.join)((0, import_os2.tmpdir)(), `microfrontend_${rid}.tgz`);
|
|
27407
28167
|
}
|
|
27408
28168
|
|
|
27409
28169
|
// src/http.ts
|
|
@@ -27542,16 +28302,16 @@ function postFile(target, scheme, key, file, customFields = {}, customHeaders =
|
|
|
27542
28302
|
|
|
27543
28303
|
// src/scripts.ts
|
|
27544
28304
|
var import_child_process = require("child_process");
|
|
27545
|
-
var
|
|
28305
|
+
var import_path3 = require("path");
|
|
27546
28306
|
function resolveWinPath(specialFolder, subPath) {
|
|
27547
28307
|
const basePath = process.env[specialFolder];
|
|
27548
28308
|
if (basePath) {
|
|
27549
|
-
return (0,
|
|
28309
|
+
return (0, import_path3.resolve)(basePath, subPath);
|
|
27550
28310
|
}
|
|
27551
28311
|
return void 0;
|
|
27552
28312
|
}
|
|
27553
28313
|
function runScript(script, cwd = process.cwd(), output = process.stdout) {
|
|
27554
|
-
const bin = (0,
|
|
28314
|
+
const bin = (0, import_path3.resolve)(cwd, "./node_modules/.bin");
|
|
27555
28315
|
const sep = isWindows ? ";" : ":";
|
|
27556
28316
|
const env3 = Object.assign({}, process.env);
|
|
27557
28317
|
if (isWindows) {
|
|
@@ -27601,7 +28361,7 @@ function sanitizeCmdArgs(args2) {
|
|
|
27601
28361
|
|
|
27602
28362
|
// src/utils.ts
|
|
27603
28363
|
function runNpmProcess(args2, target, output) {
|
|
27604
|
-
const cwd = (0,
|
|
28364
|
+
const cwd = (0, import_path4.resolve)(process.cwd(), target);
|
|
27605
28365
|
return runCommand("npm", args2, cwd, output);
|
|
27606
28366
|
}
|
|
27607
28367
|
async function findTarball(packageRef, target = ".", ...flags) {
|
|
@@ -27652,9 +28412,9 @@ async function getCa(cert) {
|
|
|
27652
28412
|
if (cert && typeof cert === "string") {
|
|
27653
28413
|
const statCert = await (0, import_promises.stat)(cert).catch(() => void 0);
|
|
27654
28414
|
if (statCert?.isFile()) {
|
|
27655
|
-
const dir = (0,
|
|
27656
|
-
const file = (0,
|
|
27657
|
-
return await (0, import_promises.readFile)((0,
|
|
28415
|
+
const dir = (0, import_path4.dirname)(cert);
|
|
28416
|
+
const file = (0, import_path4.basename)(cert);
|
|
28417
|
+
return await (0, import_promises.readFile)((0, import_path4.resolve)(dir, file));
|
|
27658
28418
|
}
|
|
27659
28419
|
}
|
|
27660
28420
|
return void 0;
|
|
@@ -27665,23 +28425,23 @@ async function getFiles(baseDir, sources, from, agent) {
|
|
|
27665
28425
|
const allFiles = await Promise.all(sources.map((s) => matchFiles(baseDir, s)));
|
|
27666
28426
|
const allMatches = allFiles.reduce((result, files) => [...result, ...files], []).filter(onlyUnique);
|
|
27667
28427
|
if (allMatches.every(isDirectory)) {
|
|
27668
|
-
const dirs = allMatches.filter((m) => (0, import_fs2.existsSync)((0,
|
|
28428
|
+
const dirs = allMatches.filter((m) => (0, import_fs2.existsSync)((0, import_path4.resolve)(m, "package.json")));
|
|
27669
28429
|
const createdFiles = await Promise.all(
|
|
27670
28430
|
dirs.map(async (dir) => {
|
|
27671
|
-
const packagePath = (0,
|
|
28431
|
+
const packagePath = (0, import_path4.resolve)(dir, "package.json");
|
|
27672
28432
|
const packageContent = await (0, import_promises.readFile)(packagePath, "utf8");
|
|
27673
28433
|
try {
|
|
27674
28434
|
const { name, version } = JSON.parse(packageContent);
|
|
27675
28435
|
const proposedName = `${name.replace("@", "").replace("/", "-")}-${version}.tgz`;
|
|
27676
28436
|
const previousFiles = await (0, import_promises.readdir)(dir);
|
|
27677
28437
|
if (previousFiles.includes(proposedName)) {
|
|
27678
|
-
return (0,
|
|
28438
|
+
return (0, import_path4.resolve)(dir, proposedName);
|
|
27679
28439
|
}
|
|
27680
28440
|
await createPackage(dir);
|
|
27681
28441
|
const currentFiles = await (0, import_promises.readdir)(dir);
|
|
27682
28442
|
const tarball = currentFiles.find((m) => !previousFiles.includes(m) && m.endsWith(".tgz"));
|
|
27683
28443
|
const target = getRandomTempFile();
|
|
27684
|
-
const source = (0,
|
|
28444
|
+
const source = (0, import_path4.resolve)(dir, tarball);
|
|
27685
28445
|
await (0, import_promises.copyFile)(source, target);
|
|
27686
28446
|
await (0, import_promises.rm)(source);
|
|
27687
28447
|
return target;
|
|
@@ -27742,7 +28502,7 @@ async function run() {
|
|
|
27742
28502
|
fail("No micro frontends for publishing found: %s.", sources.join(", "));
|
|
27743
28503
|
}
|
|
27744
28504
|
for (const file of files) {
|
|
27745
|
-
const fileName = (0,
|
|
28505
|
+
const fileName = (0, import_path5.basename)(file);
|
|
27746
28506
|
const content = await (0, import_promises2.readFile)(file);
|
|
27747
28507
|
if (content) {
|
|
27748
28508
|
progress(`Publishing "%s" ...`, file, url2);
|