@alpic-ai/sdk 0.0.0-dev.ged18600 → 0.0.0-dev.ged5246e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/api-key.d.ts +1 -0
- package/dist/auth/api-key.js +23 -0
- package/dist/auth/api-key.js.map +1 -0
- package/dist/auth/index.js +2 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/oauth-client.js +2 -2
- package/dist/auth/oauth-client.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/errors.d.ts +3 -0
- package/dist/lib/errors.js +7 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/project/detect-runtime.js +21 -3
- package/dist/project/detect-runtime.js.map +1 -1
- package/dist/project/python-runtime.d.ts +1 -0
- package/dist/project/python-runtime.js +71 -0
- package/dist/project/python-runtime.js.map +1 -0
- package/dist/vendor/pipenet.js +2342 -651
- package/dist/vendor/pipenet.js.map +4 -4
- package/dist/whoami.js +2 -1
- package/dist/whoami.js.map +1 -1
- package/package.json +12 -12
package/dist/vendor/pipenet.js
CHANGED
|
@@ -45,7 +45,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
45
45
|
var require_delayed_stream = __commonJS({
|
|
46
46
|
"../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js"(exports, module) {
|
|
47
47
|
var Stream = __require("stream").Stream;
|
|
48
|
-
var
|
|
48
|
+
var util4 = __require("util");
|
|
49
49
|
module.exports = DelayedStream;
|
|
50
50
|
function DelayedStream() {
|
|
51
51
|
this.source = null;
|
|
@@ -56,7 +56,7 @@ var require_delayed_stream = __commonJS({
|
|
|
56
56
|
this._released = false;
|
|
57
57
|
this._bufferedEvents = [];
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
util4.inherits(DelayedStream, Stream);
|
|
60
60
|
DelayedStream.create = function(source, options) {
|
|
61
61
|
var delayedStream = new this();
|
|
62
62
|
options = options || {};
|
|
@@ -135,7 +135,7 @@ var require_delayed_stream = __commonJS({
|
|
|
135
135
|
// ../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js
|
|
136
136
|
var require_combined_stream = __commonJS({
|
|
137
137
|
"../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js"(exports, module) {
|
|
138
|
-
var
|
|
138
|
+
var util4 = __require("util");
|
|
139
139
|
var Stream = __require("stream").Stream;
|
|
140
140
|
var DelayedStream = require_delayed_stream();
|
|
141
141
|
module.exports = CombinedStream;
|
|
@@ -151,7 +151,7 @@ var require_combined_stream = __commonJS({
|
|
|
151
151
|
this._insideLoop = false;
|
|
152
152
|
this._pendingNext = false;
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
util4.inherits(CombinedStream, Stream);
|
|
155
155
|
CombinedStream.create = function(options) {
|
|
156
156
|
var combinedStream = new this();
|
|
157
157
|
options = options || {};
|
|
@@ -9132,9 +9132,9 @@ var require_asynckit = __commonJS({
|
|
|
9132
9132
|
}
|
|
9133
9133
|
});
|
|
9134
9134
|
|
|
9135
|
-
// ../../node_modules/.pnpm/es-object-atoms@1.1.
|
|
9135
|
+
// ../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/index.js
|
|
9136
9136
|
var require_es_object_atoms = __commonJS({
|
|
9137
|
-
"../../node_modules/.pnpm/es-object-atoms@1.1.
|
|
9137
|
+
"../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/index.js"(exports, module) {
|
|
9138
9138
|
"use strict";
|
|
9139
9139
|
module.exports = Object;
|
|
9140
9140
|
}
|
|
@@ -9996,7 +9996,7 @@ var require_form_data = __commonJS({
|
|
|
9996
9996
|
"../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/form_data.js"(exports, module) {
|
|
9997
9997
|
"use strict";
|
|
9998
9998
|
var CombinedStream = require_combined_stream();
|
|
9999
|
-
var
|
|
9999
|
+
var util4 = __require("util");
|
|
10000
10000
|
var path = __require("path");
|
|
10001
10001
|
var http3 = __require("http");
|
|
10002
10002
|
var https2 = __require("https");
|
|
@@ -10025,7 +10025,7 @@ var require_form_data = __commonJS({
|
|
|
10025
10025
|
this[option] = options[option];
|
|
10026
10026
|
}
|
|
10027
10027
|
}
|
|
10028
|
-
|
|
10028
|
+
util4.inherits(FormData3, CombinedStream);
|
|
10029
10029
|
FormData3.LINE_BREAK = "\r\n";
|
|
10030
10030
|
FormData3.DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
10031
10031
|
FormData3.prototype.append = function(field, value, options) {
|
|
@@ -10907,14 +10907,14 @@ var require_supports_color = __commonJS({
|
|
|
10907
10907
|
var require_node = __commonJS({
|
|
10908
10908
|
"../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module) {
|
|
10909
10909
|
var tty = __require("tty");
|
|
10910
|
-
var
|
|
10910
|
+
var util4 = __require("util");
|
|
10911
10911
|
exports.init = init;
|
|
10912
10912
|
exports.log = log3;
|
|
10913
10913
|
exports.formatArgs = formatArgs;
|
|
10914
10914
|
exports.save = save;
|
|
10915
10915
|
exports.load = load;
|
|
10916
10916
|
exports.useColors = useColors;
|
|
10917
|
-
exports.destroy =
|
|
10917
|
+
exports.destroy = util4.deprecate(
|
|
10918
10918
|
() => {
|
|
10919
10919
|
},
|
|
10920
10920
|
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
@@ -11045,7 +11045,7 @@ var require_node = __commonJS({
|
|
|
11045
11045
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
11046
11046
|
}
|
|
11047
11047
|
function log3(...args) {
|
|
11048
|
-
return process.stderr.write(
|
|
11048
|
+
return process.stderr.write(util4.formatWithOptions(exports.inspectOpts, ...args) + "\n");
|
|
11049
11049
|
}
|
|
11050
11050
|
function save(namespaces) {
|
|
11051
11051
|
if (namespaces) {
|
|
@@ -11068,11 +11068,11 @@ var require_node = __commonJS({
|
|
|
11068
11068
|
var { formatters } = module.exports;
|
|
11069
11069
|
formatters.o = function(v) {
|
|
11070
11070
|
this.inspectOpts.colors = this.useColors;
|
|
11071
|
-
return
|
|
11071
|
+
return util4.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
11072
11072
|
};
|
|
11073
11073
|
formatters.O = function(v) {
|
|
11074
11074
|
this.inspectOpts.colors = this.useColors;
|
|
11075
|
-
return
|
|
11075
|
+
return util4.inspect(v, this.inspectOpts);
|
|
11076
11076
|
};
|
|
11077
11077
|
}
|
|
11078
11078
|
});
|
|
@@ -11538,9 +11538,9 @@ var require_dist = __commonJS({
|
|
|
11538
11538
|
}
|
|
11539
11539
|
});
|
|
11540
11540
|
|
|
11541
|
-
// ../../node_modules/.pnpm/follow-redirects@1.16.
|
|
11541
|
+
// ../../node_modules/.pnpm/follow-redirects@1.16.2_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/debug.js
|
|
11542
11542
|
var require_debug = __commonJS({
|
|
11543
|
-
"../../node_modules/.pnpm/follow-redirects@1.16.
|
|
11543
|
+
"../../node_modules/.pnpm/follow-redirects@1.16.2_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/debug.js"(exports, module) {
|
|
11544
11544
|
var debug3;
|
|
11545
11545
|
module.exports = function() {
|
|
11546
11546
|
if (!debug3) {
|
|
@@ -11558,9 +11558,9 @@ var require_debug = __commonJS({
|
|
|
11558
11558
|
}
|
|
11559
11559
|
});
|
|
11560
11560
|
|
|
11561
|
-
// ../../node_modules/.pnpm/follow-redirects@1.16.
|
|
11561
|
+
// ../../node_modules/.pnpm/follow-redirects@1.16.2_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/index.js
|
|
11562
11562
|
var require_follow_redirects = __commonJS({
|
|
11563
|
-
"../../node_modules/.pnpm/follow-redirects@1.16.
|
|
11563
|
+
"../../node_modules/.pnpm/follow-redirects@1.16.2_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/index.js"(exports, module) {
|
|
11564
11564
|
var url2 = __require("url");
|
|
11565
11565
|
var URL2 = url2.URL;
|
|
11566
11566
|
var http3 = __require("http");
|
|
@@ -11788,8 +11788,14 @@ var require_follow_redirects = __commonJS({
|
|
|
11788
11788
|
RedirectableRequest.prototype._sanitizeOptions = function(options) {
|
|
11789
11789
|
if (!options.headers) {
|
|
11790
11790
|
options.headers = {};
|
|
11791
|
+
} else if (Array.isArray(options.headers)) {
|
|
11792
|
+
var headerList = options.headers;
|
|
11793
|
+
options.headers = {};
|
|
11794
|
+
for (var i = 0; i < headerList.length; i += 2) {
|
|
11795
|
+
options.headers[headerList[i]] = headerList[i + 1];
|
|
11796
|
+
}
|
|
11791
11797
|
}
|
|
11792
|
-
if (!
|
|
11798
|
+
if (!Array.isArray(options.sensitiveHeaders)) {
|
|
11793
11799
|
options.sensitiveHeaders = [];
|
|
11794
11800
|
}
|
|
11795
11801
|
if (options.host) {
|
|
@@ -12046,9 +12052,6 @@ var require_follow_redirects = __commonJS({
|
|
|
12046
12052
|
var dot = subdomain.length - domain.length - 1;
|
|
12047
12053
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
|
12048
12054
|
}
|
|
12049
|
-
function isArray2(value) {
|
|
12050
|
-
return value instanceof Array;
|
|
12051
|
-
}
|
|
12052
12055
|
function isString2(value) {
|
|
12053
12056
|
return typeof value === "string" || value instanceof String;
|
|
12054
12057
|
}
|
|
@@ -12062,24 +12065,101 @@ var require_follow_redirects = __commonJS({
|
|
|
12062
12065
|
return URL2 && value instanceof URL2;
|
|
12063
12066
|
}
|
|
12064
12067
|
function escapeRegex(regex) {
|
|
12065
|
-
return regex.replace(/[\]\\/()
|
|
12068
|
+
return regex.replace(/[[\]\\/()*+?.^$|]/g, "\\$&");
|
|
12066
12069
|
}
|
|
12067
12070
|
module.exports = wrap({ http: http3, https: https2 });
|
|
12068
12071
|
module.exports.wrap = wrap;
|
|
12069
12072
|
}
|
|
12070
12073
|
});
|
|
12071
12074
|
|
|
12072
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12075
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/bind.js
|
|
12073
12076
|
function bind(fn, thisArg) {
|
|
12074
12077
|
return function wrap() {
|
|
12075
12078
|
return fn.apply(thisArg, arguments);
|
|
12076
12079
|
};
|
|
12077
12080
|
}
|
|
12078
12081
|
|
|
12079
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12082
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/utils.js
|
|
12080
12083
|
var { toString } = Object.prototype;
|
|
12081
12084
|
var { getPrototypeOf } = Object;
|
|
12082
12085
|
var { iterator, toStringTag } = Symbol;
|
|
12086
|
+
var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
12087
|
+
var isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype");
|
|
12088
|
+
var isPrototypeBoundary = (obj, prototype2, source) => obj === Object.prototype || !source && prototype2 === null;
|
|
12089
|
+
var isSafeAndFullyMutable = (obj) => {
|
|
12090
|
+
if (!Object.isExtensible(obj)) {
|
|
12091
|
+
return false;
|
|
12092
|
+
}
|
|
12093
|
+
const props = Object.getOwnPropertyNames(obj);
|
|
12094
|
+
if (Object.getOwnPropertySymbols) {
|
|
12095
|
+
props.push(...Object.getOwnPropertySymbols(obj));
|
|
12096
|
+
}
|
|
12097
|
+
return props.every((prop) => {
|
|
12098
|
+
if (isUnsafeObjectKey(prop)) {
|
|
12099
|
+
return false;
|
|
12100
|
+
}
|
|
12101
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
|
12102
|
+
return !!descriptor && descriptor.configurable && descriptor.writable === true;
|
|
12103
|
+
});
|
|
12104
|
+
};
|
|
12105
|
+
var hasOwnInPrototypeChain = (thing, prop) => {
|
|
12106
|
+
let obj = thing;
|
|
12107
|
+
const seen = [];
|
|
12108
|
+
while (obj != null) {
|
|
12109
|
+
if (seen.indexOf(obj) !== -1) {
|
|
12110
|
+
return false;
|
|
12111
|
+
}
|
|
12112
|
+
seen.push(obj);
|
|
12113
|
+
const prototype2 = getPrototypeOf(obj);
|
|
12114
|
+
if (isPrototypeBoundary(obj, prototype2, obj === thing)) {
|
|
12115
|
+
return false;
|
|
12116
|
+
}
|
|
12117
|
+
if (hasOwnProperty(obj, prop)) {
|
|
12118
|
+
return true;
|
|
12119
|
+
}
|
|
12120
|
+
obj = prototype2;
|
|
12121
|
+
}
|
|
12122
|
+
return false;
|
|
12123
|
+
};
|
|
12124
|
+
var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
|
|
12125
|
+
var toSafeFlatObject = (thing) => {
|
|
12126
|
+
if (thing == null || typeof thing !== "object" && typeof thing !== "function") {
|
|
12127
|
+
return thing;
|
|
12128
|
+
}
|
|
12129
|
+
const sourcePrototype = getPrototypeOf(thing);
|
|
12130
|
+
if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
|
|
12131
|
+
return thing;
|
|
12132
|
+
}
|
|
12133
|
+
const result = /* @__PURE__ */ Object.create(null);
|
|
12134
|
+
const merged = /* @__PURE__ */ Object.create(null);
|
|
12135
|
+
const seen = [];
|
|
12136
|
+
let current = thing;
|
|
12137
|
+
while (current != null) {
|
|
12138
|
+
if (seen.indexOf(current) !== -1) {
|
|
12139
|
+
break;
|
|
12140
|
+
}
|
|
12141
|
+
seen.push(current);
|
|
12142
|
+
const prototype2 = current === thing ? sourcePrototype : getPrototypeOf(current);
|
|
12143
|
+
if (isPrototypeBoundary(current, prototype2, current === thing)) {
|
|
12144
|
+
break;
|
|
12145
|
+
}
|
|
12146
|
+
const props = Object.getOwnPropertyNames(current);
|
|
12147
|
+
if (Object.getOwnPropertySymbols) {
|
|
12148
|
+
props.push(...Object.getOwnPropertySymbols(current));
|
|
12149
|
+
}
|
|
12150
|
+
for (const prop of props) {
|
|
12151
|
+
if (isUnsafeObjectKey(prop)) {
|
|
12152
|
+
continue;
|
|
12153
|
+
}
|
|
12154
|
+
if (!hasOwnProperty(merged, prop)) {
|
|
12155
|
+
result[prop] = thing[prop];
|
|
12156
|
+
merged[prop] = true;
|
|
12157
|
+
}
|
|
12158
|
+
}
|
|
12159
|
+
current = prototype2;
|
|
12160
|
+
}
|
|
12161
|
+
return result;
|
|
12162
|
+
};
|
|
12083
12163
|
var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
12084
12164
|
const str = toString.call(thing);
|
|
12085
12165
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -12110,11 +12190,20 @@ var isNumber = typeOfTest("number");
|
|
|
12110
12190
|
var isObject = (thing) => thing !== null && typeof thing === "object";
|
|
12111
12191
|
var isBoolean = (thing) => thing === true || thing === false;
|
|
12112
12192
|
var isPlainObject = (val) => {
|
|
12113
|
-
if (
|
|
12193
|
+
if (!isObject(val)) {
|
|
12114
12194
|
return false;
|
|
12115
12195
|
}
|
|
12116
12196
|
const prototype2 = getPrototypeOf(val);
|
|
12117
|
-
return (prototype2 === null || prototype2 === Object.prototype ||
|
|
12197
|
+
return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the
|
|
12198
|
+
// value is tagged/iterable, ignoring members reachable only through shared
|
|
12199
|
+
// or terminal prototype boundaries. This is exactly what
|
|
12200
|
+
// hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted
|
|
12201
|
+
// above (null, Object.prototype, or a terminal null-prototype template) is
|
|
12202
|
+
// a boundary, so the walk never inspects anything but `val`'s own members,
|
|
12203
|
+
// and stops before even those when `val` is itself the boundary
|
|
12204
|
+
// Object.prototype. Checking that inline avoids allocating the walker's
|
|
12205
|
+
// `seen` list twice per call on the mergeConfig / merge hot path.
|
|
12206
|
+
(isPrototypeBoundary(val, prototype2, true) || !hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator));
|
|
12118
12207
|
};
|
|
12119
12208
|
var isEmptyObject = (val) => {
|
|
12120
12209
|
if (!isObject(val) || isBuffer(val)) {
|
|
@@ -12134,6 +12223,7 @@ var isReactNativeBlob = (value) => {
|
|
|
12134
12223
|
var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
12135
12224
|
var isBlob = kindOfTest("Blob");
|
|
12136
12225
|
var isFileList = kindOfTest("FileList");
|
|
12226
|
+
var isSet = kindOfTest("Set");
|
|
12137
12227
|
var isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
12138
12228
|
function getGlobal() {
|
|
12139
12229
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
@@ -12214,11 +12304,21 @@ var isContextDefined = (context) => !isUndefined(context) && context !== _global
|
|
|
12214
12304
|
function merge(...objs) {
|
|
12215
12305
|
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
12216
12306
|
const result = {};
|
|
12307
|
+
const lowerCaseKeys = caseless ? /* @__PURE__ */ Object.create(null) : null;
|
|
12217
12308
|
const assignValue = (val, key) => {
|
|
12218
12309
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
12219
12310
|
return;
|
|
12220
12311
|
}
|
|
12221
|
-
|
|
12312
|
+
let targetKey = key;
|
|
12313
|
+
if (lowerCaseKeys && typeof key === "string") {
|
|
12314
|
+
const lowerKey = key.toLowerCase();
|
|
12315
|
+
const knownKey = lowerCaseKeys[lowerKey];
|
|
12316
|
+
if (knownKey !== void 0 && hasOwnProperty(result, knownKey)) {
|
|
12317
|
+
targetKey = knownKey;
|
|
12318
|
+
} else {
|
|
12319
|
+
lowerCaseKeys[lowerKey] = key;
|
|
12320
|
+
}
|
|
12321
|
+
}
|
|
12222
12322
|
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
|
|
12223
12323
|
if (isPlainObject(existing) && isPlainObject(val)) {
|
|
12224
12324
|
result[targetKey] = merge(existing, val);
|
|
@@ -12231,7 +12331,21 @@ function merge(...objs) {
|
|
|
12231
12331
|
}
|
|
12232
12332
|
};
|
|
12233
12333
|
for (let i = 0, l = objs.length; i < l; i++) {
|
|
12234
|
-
|
|
12334
|
+
const source = objs[i];
|
|
12335
|
+
if (!source || isBuffer(source)) {
|
|
12336
|
+
continue;
|
|
12337
|
+
}
|
|
12338
|
+
forEach(source, assignValue);
|
|
12339
|
+
if (typeof source !== "object" || isArray(source) || !Object.getOwnPropertySymbols) {
|
|
12340
|
+
continue;
|
|
12341
|
+
}
|
|
12342
|
+
const symbols = Object.getOwnPropertySymbols(source);
|
|
12343
|
+
for (let j = 0; j < symbols.length; j++) {
|
|
12344
|
+
const symbol = symbols[j];
|
|
12345
|
+
if (propertyIsEnumerable.call(source, symbol)) {
|
|
12346
|
+
assignValue(source[symbol], symbol);
|
|
12347
|
+
}
|
|
12348
|
+
}
|
|
12235
12349
|
}
|
|
12236
12350
|
return result;
|
|
12237
12351
|
}
|
|
@@ -12318,7 +12432,24 @@ var toArray = (thing) => {
|
|
|
12318
12432
|
if (!thing) return null;
|
|
12319
12433
|
if (isArray(thing)) return thing;
|
|
12320
12434
|
let i = thing.length;
|
|
12321
|
-
if (!
|
|
12435
|
+
if (!Number.isSafeInteger(i) || i < 0 || i > 4294967295) return null;
|
|
12436
|
+
const indexes = /* @__PURE__ */ new Set();
|
|
12437
|
+
const seen = /* @__PURE__ */ new Set();
|
|
12438
|
+
let source = thing;
|
|
12439
|
+
while (source != null && indexes.size < i) {
|
|
12440
|
+
if (seen.has(source)) return null;
|
|
12441
|
+
seen.add(source);
|
|
12442
|
+
const prototype2 = getPrototypeOf(source);
|
|
12443
|
+
if (isPrototypeBoundary(source, prototype2, source === thing)) break;
|
|
12444
|
+
Object.getOwnPropertyNames(source).forEach((key) => {
|
|
12445
|
+
const index = +key;
|
|
12446
|
+
if (Number.isInteger(index) && index >= 0 && index < i && String(index) === key && hasOwnProperty(source, key)) {
|
|
12447
|
+
indexes.add(index);
|
|
12448
|
+
}
|
|
12449
|
+
});
|
|
12450
|
+
source = prototype2;
|
|
12451
|
+
}
|
|
12452
|
+
if (indexes.size !== i) return null;
|
|
12322
12453
|
const arr = new Array(i);
|
|
12323
12454
|
while (i-- > 0) {
|
|
12324
12455
|
arr[i] = thing[i];
|
|
@@ -12353,7 +12484,7 @@ var toCamelCase = (str) => {
|
|
|
12353
12484
|
return p1.toUpperCase() + p2;
|
|
12354
12485
|
});
|
|
12355
12486
|
};
|
|
12356
|
-
var
|
|
12487
|
+
var { propertyIsEnumerable } = Object.prototype;
|
|
12357
12488
|
var isRegExp = kindOfTest("RegExp");
|
|
12358
12489
|
var reduceDescriptors = (obj, reducer) => {
|
|
12359
12490
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -12415,11 +12546,20 @@ var toJSONObject = (obj) => {
|
|
|
12415
12546
|
}
|
|
12416
12547
|
if (!("toJSON" in source)) {
|
|
12417
12548
|
visited.add(source);
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
|
|
12549
|
+
let target;
|
|
12550
|
+
if (isSet(source)) {
|
|
12551
|
+
target = [];
|
|
12552
|
+
for (const value of source) {
|
|
12553
|
+
const reducedValue = visit(value);
|
|
12554
|
+
!isUndefined(reducedValue) && target.push(reducedValue);
|
|
12555
|
+
}
|
|
12556
|
+
} else {
|
|
12557
|
+
target = isArray(source) ? [] : {};
|
|
12558
|
+
forEach(source, (value, key) => {
|
|
12559
|
+
const reducedValue = visit(value);
|
|
12560
|
+
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
12561
|
+
});
|
|
12562
|
+
}
|
|
12423
12563
|
visited.delete(source);
|
|
12424
12564
|
return target;
|
|
12425
12565
|
}
|
|
@@ -12452,6 +12592,7 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
12452
12592
|
})(typeof setImmediate === "function", isFunction(_global.postMessage));
|
|
12453
12593
|
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
12454
12594
|
var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
12595
|
+
var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
|
|
12455
12596
|
var utils_default = {
|
|
12456
12597
|
isArray,
|
|
12457
12598
|
isArrayBuffer,
|
|
@@ -12497,6 +12638,9 @@ var utils_default = {
|
|
|
12497
12638
|
hasOwnProperty,
|
|
12498
12639
|
hasOwnProp: hasOwnProperty,
|
|
12499
12640
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
12641
|
+
hasOwnInPrototypeChain,
|
|
12642
|
+
getSafeProp,
|
|
12643
|
+
toSafeFlatObject,
|
|
12500
12644
|
reduceDescriptors,
|
|
12501
12645
|
freezeMethods,
|
|
12502
12646
|
toObjectSet,
|
|
@@ -12512,10 +12656,11 @@ var utils_default = {
|
|
|
12512
12656
|
isThenable,
|
|
12513
12657
|
setImmediate: _setImmediate,
|
|
12514
12658
|
asap,
|
|
12515
|
-
isIterable
|
|
12659
|
+
isIterable,
|
|
12660
|
+
isSafeIterable
|
|
12516
12661
|
};
|
|
12517
12662
|
|
|
12518
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12663
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseHeaders.js
|
|
12519
12664
|
var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
12520
12665
|
"age",
|
|
12521
12666
|
"authorization",
|
|
@@ -12536,7 +12681,7 @@ var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
|
12536
12681
|
"user-agent"
|
|
12537
12682
|
]);
|
|
12538
12683
|
var parseHeaders_default = (rawHeaders) => {
|
|
12539
|
-
const parsed =
|
|
12684
|
+
const parsed = /* @__PURE__ */ Object.create(null);
|
|
12540
12685
|
let key;
|
|
12541
12686
|
let val;
|
|
12542
12687
|
let i;
|
|
@@ -12544,23 +12689,24 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
12544
12689
|
i = line.indexOf(":");
|
|
12545
12690
|
key = line.substring(0, i).trim().toLowerCase();
|
|
12546
12691
|
val = line.substring(i + 1).trim();
|
|
12547
|
-
|
|
12692
|
+
const hasKey = utils_default.hasOwnProp(parsed, key);
|
|
12693
|
+
if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) {
|
|
12548
12694
|
return;
|
|
12549
12695
|
}
|
|
12550
12696
|
if (key === "set-cookie") {
|
|
12551
|
-
if (
|
|
12697
|
+
if (hasKey) {
|
|
12552
12698
|
parsed[key].push(val);
|
|
12553
12699
|
} else {
|
|
12554
12700
|
parsed[key] = [val];
|
|
12555
12701
|
}
|
|
12556
12702
|
} else {
|
|
12557
|
-
parsed[key] =
|
|
12703
|
+
parsed[key] = hasKey ? parsed[key] + ", " + val : val;
|
|
12558
12704
|
}
|
|
12559
12705
|
});
|
|
12560
12706
|
return parsed;
|
|
12561
12707
|
};
|
|
12562
12708
|
|
|
12563
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12709
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
|
|
12564
12710
|
function trimSPorHTAB(str) {
|
|
12565
12711
|
let start = 0;
|
|
12566
12712
|
let end = str.length;
|
|
@@ -12598,7 +12744,7 @@ function toByteStringHeaderObject(headers) {
|
|
|
12598
12744
|
return byteStringHeaders;
|
|
12599
12745
|
}
|
|
12600
12746
|
|
|
12601
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
12747
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosHeaders.js
|
|
12602
12748
|
var $internals = /* @__PURE__ */ Symbol("internals");
|
|
12603
12749
|
function normalizeHeader(header) {
|
|
12604
12750
|
return header && String(header).trim().toLowerCase();
|
|
@@ -12618,10 +12764,96 @@ function parseTokens(str) {
|
|
|
12618
12764
|
}
|
|
12619
12765
|
return tokens;
|
|
12620
12766
|
}
|
|
12767
|
+
var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
12768
|
+
function trimOWS(value) {
|
|
12769
|
+
let start = 0;
|
|
12770
|
+
let end = value.length;
|
|
12771
|
+
while (start < end) {
|
|
12772
|
+
const code = value.charCodeAt(start);
|
|
12773
|
+
if (code !== 9 && code !== 32) {
|
|
12774
|
+
break;
|
|
12775
|
+
}
|
|
12776
|
+
start += 1;
|
|
12777
|
+
}
|
|
12778
|
+
while (end > start) {
|
|
12779
|
+
const code = value.charCodeAt(end - 1);
|
|
12780
|
+
if (code !== 9 && code !== 32) {
|
|
12781
|
+
break;
|
|
12782
|
+
}
|
|
12783
|
+
end -= 1;
|
|
12784
|
+
}
|
|
12785
|
+
return start === 0 && end === value.length ? value : value.slice(start, end);
|
|
12786
|
+
}
|
|
12787
|
+
function decodeQuotedString(value) {
|
|
12788
|
+
const last = value.length - 1;
|
|
12789
|
+
if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) {
|
|
12790
|
+
return value;
|
|
12791
|
+
}
|
|
12792
|
+
let decoded = "";
|
|
12793
|
+
for (let i = 1; i < last; i++) {
|
|
12794
|
+
const code = value.charCodeAt(i);
|
|
12795
|
+
if (code === 34) {
|
|
12796
|
+
return value;
|
|
12797
|
+
}
|
|
12798
|
+
if (code === 92) {
|
|
12799
|
+
i += 1;
|
|
12800
|
+
if (i >= last) {
|
|
12801
|
+
return value;
|
|
12802
|
+
}
|
|
12803
|
+
}
|
|
12804
|
+
decoded += value[i];
|
|
12805
|
+
}
|
|
12806
|
+
return decoded;
|
|
12807
|
+
}
|
|
12808
|
+
function parseParameters(value) {
|
|
12809
|
+
const parameters = /* @__PURE__ */ Object.create(null);
|
|
12810
|
+
const str = String(value);
|
|
12811
|
+
let start = 0;
|
|
12812
|
+
let quoted = false;
|
|
12813
|
+
let escaped = false;
|
|
12814
|
+
function parseParameter(end) {
|
|
12815
|
+
const part = trimOWS(str.slice(start, end));
|
|
12816
|
+
const equals = part.indexOf("=");
|
|
12817
|
+
if (equals < 1) {
|
|
12818
|
+
return;
|
|
12819
|
+
}
|
|
12820
|
+
const name = trimOWS(part.slice(0, equals));
|
|
12821
|
+
if (!parameterNameRE.test(name)) {
|
|
12822
|
+
return;
|
|
12823
|
+
}
|
|
12824
|
+
const normalizedName = name.toLowerCase();
|
|
12825
|
+
if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
|
|
12826
|
+
return;
|
|
12827
|
+
}
|
|
12828
|
+
const parameterValue = trimOWS(part.slice(equals + 1));
|
|
12829
|
+
parameters[normalizedName] = decodeQuotedString(parameterValue);
|
|
12830
|
+
}
|
|
12831
|
+
for (let i = 0; i < str.length; i++) {
|
|
12832
|
+
const code = str.charCodeAt(i);
|
|
12833
|
+
if (quoted) {
|
|
12834
|
+
if (escaped) {
|
|
12835
|
+
escaped = false;
|
|
12836
|
+
} else if (code === 92) {
|
|
12837
|
+
escaped = true;
|
|
12838
|
+
} else if (code === 34) {
|
|
12839
|
+
quoted = false;
|
|
12840
|
+
}
|
|
12841
|
+
} else if (code === 34) {
|
|
12842
|
+
quoted = true;
|
|
12843
|
+
} else if (code === 44 || code === 59) {
|
|
12844
|
+
parseParameter(i);
|
|
12845
|
+
start = i + 1;
|
|
12846
|
+
}
|
|
12847
|
+
}
|
|
12848
|
+
parseParameter(str.length);
|
|
12849
|
+
return parameters;
|
|
12850
|
+
}
|
|
12621
12851
|
var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
12852
|
+
var PROTO_HEADER_SLOT = "__Proto__";
|
|
12853
|
+
var headerSlot = (name) => name === "__proto__" ? PROTO_HEADER_SLOT : name;
|
|
12622
12854
|
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
12623
12855
|
if (utils_default.isFunction(filter2)) {
|
|
12624
|
-
return filter2.call(
|
|
12856
|
+
return filter2.call(context, value, header);
|
|
12625
12857
|
}
|
|
12626
12858
|
if (isHeaderNameFilter) {
|
|
12627
12859
|
value = header;
|
|
@@ -12662,11 +12894,11 @@ var AxiosHeaders = class {
|
|
|
12662
12894
|
function setHeader(_value, _header, _rewrite) {
|
|
12663
12895
|
const lHeader = normalizeHeader(_header);
|
|
12664
12896
|
if (!lHeader) {
|
|
12665
|
-
|
|
12897
|
+
return;
|
|
12666
12898
|
}
|
|
12667
12899
|
const key = utils_default.findKey(self2, lHeader);
|
|
12668
12900
|
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
12669
|
-
self2[key || _header] = normalizeValue(_value);
|
|
12901
|
+
self2[headerSlot(key || _header)] = normalizeValue(_value);
|
|
12670
12902
|
}
|
|
12671
12903
|
}
|
|
12672
12904
|
const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
@@ -12674,13 +12906,19 @@ var AxiosHeaders = class {
|
|
|
12674
12906
|
setHeaders(header, valueOrRewrite);
|
|
12675
12907
|
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
12676
12908
|
setHeaders(parseHeaders_default(header), valueOrRewrite);
|
|
12677
|
-
} else if (utils_default.isObject(header) && utils_default.
|
|
12678
|
-
let obj =
|
|
12909
|
+
} else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) {
|
|
12910
|
+
let obj = /* @__PURE__ */ Object.create(null), dest, key;
|
|
12679
12911
|
for (const entry of header) {
|
|
12680
12912
|
if (!utils_default.isArray(entry)) {
|
|
12681
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
12913
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
12914
|
+
}
|
|
12915
|
+
key = entry[0];
|
|
12916
|
+
if (utils_default.hasOwnProp(obj, key)) {
|
|
12917
|
+
dest = obj[key];
|
|
12918
|
+
obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
|
|
12919
|
+
} else {
|
|
12920
|
+
obj[key] = entry[1];
|
|
12682
12921
|
}
|
|
12683
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
12684
12922
|
}
|
|
12685
12923
|
setHeaders(obj, valueOrRewrite);
|
|
12686
12924
|
} else {
|
|
@@ -12753,7 +12991,7 @@ var AxiosHeaders = class {
|
|
|
12753
12991
|
}
|
|
12754
12992
|
normalize(format) {
|
|
12755
12993
|
const self2 = this;
|
|
12756
|
-
const headers =
|
|
12994
|
+
const headers = /* @__PURE__ */ Object.create(null);
|
|
12757
12995
|
utils_default.forEach(this, (value, header) => {
|
|
12758
12996
|
const key = utils_default.findKey(headers, header);
|
|
12759
12997
|
if (key) {
|
|
@@ -12761,7 +12999,7 @@ var AxiosHeaders = class {
|
|
|
12761
12999
|
delete self2[header];
|
|
12762
13000
|
return;
|
|
12763
13001
|
}
|
|
12764
|
-
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
13002
|
+
const normalized = headerSlot(format ? formatHeader(header) : String(header).trim());
|
|
12765
13003
|
if (normalized !== header) {
|
|
12766
13004
|
delete self2[header];
|
|
12767
13005
|
}
|
|
@@ -12787,7 +13025,8 @@ var AxiosHeaders = class {
|
|
|
12787
13025
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
12788
13026
|
}
|
|
12789
13027
|
getSetCookie() {
|
|
12790
|
-
|
|
13028
|
+
const value = this.get("set-cookie");
|
|
13029
|
+
return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value];
|
|
12791
13030
|
}
|
|
12792
13031
|
get [Symbol.toStringTag]() {
|
|
12793
13032
|
return "AxiosHeaders";
|
|
@@ -12795,6 +13034,9 @@ var AxiosHeaders = class {
|
|
|
12795
13034
|
static from(thing) {
|
|
12796
13035
|
return thing instanceof this ? thing : new this(thing);
|
|
12797
13036
|
}
|
|
13037
|
+
static parseParameters(value) {
|
|
13038
|
+
return parseParameters(value);
|
|
13039
|
+
}
|
|
12798
13040
|
static concat(first, ...targets) {
|
|
12799
13041
|
const computed = new this(first);
|
|
12800
13042
|
targets.forEach((target) => computed.set(target));
|
|
@@ -12837,7 +13079,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
|
12837
13079
|
utils_default.freezeMethods(AxiosHeaders);
|
|
12838
13080
|
var AxiosHeaders_default = AxiosHeaders;
|
|
12839
13081
|
|
|
12840
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13082
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosError.js
|
|
12841
13083
|
var REDACTED = "[REDACTED ****]";
|
|
12842
13084
|
function hasOwnOrPrototypeToJSON(source) {
|
|
12843
13085
|
if (utils_default.hasOwnProp(source, "toJSON")) {
|
|
@@ -12890,11 +13132,61 @@ function redactConfig(config, redactKeys) {
|
|
|
12890
13132
|
};
|
|
12891
13133
|
return visit(config);
|
|
12892
13134
|
}
|
|
13135
|
+
function stringifySafely(value) {
|
|
13136
|
+
try {
|
|
13137
|
+
return String(value);
|
|
13138
|
+
} catch (err) {
|
|
13139
|
+
return "";
|
|
13140
|
+
}
|
|
13141
|
+
}
|
|
13142
|
+
function aggregateErrorMessage(error) {
|
|
13143
|
+
const message = error.errors.map((entry) => {
|
|
13144
|
+
try {
|
|
13145
|
+
return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
|
|
13146
|
+
} catch (err) {
|
|
13147
|
+
return "";
|
|
13148
|
+
}
|
|
13149
|
+
}).filter(Boolean).join("; ");
|
|
13150
|
+
return message || error.name || "AggregateError";
|
|
13151
|
+
}
|
|
13152
|
+
var CAUSED_BY_SEPARATOR = "\nCaused by: ";
|
|
13153
|
+
var $causeStack = /* @__PURE__ */ Symbol("causeStack");
|
|
13154
|
+
function getCauseStackIndex(error, stack) {
|
|
13155
|
+
const causeStack = utils_default.hasOwnProp(error, $causeStack) && error[$causeStack];
|
|
13156
|
+
return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1;
|
|
13157
|
+
}
|
|
13158
|
+
function appendCauseStack(target, source) {
|
|
13159
|
+
try {
|
|
13160
|
+
const sourceStack = source && source.stack;
|
|
13161
|
+
if (typeof sourceStack !== "string" || !sourceStack) {
|
|
13162
|
+
return;
|
|
13163
|
+
}
|
|
13164
|
+
const targetStack = target.stack;
|
|
13165
|
+
if (typeof targetStack !== "string" || !targetStack) {
|
|
13166
|
+
return;
|
|
13167
|
+
}
|
|
13168
|
+
const causeStack = CAUSED_BY_SEPARATOR + sourceStack;
|
|
13169
|
+
target.stack = targetStack + causeStack;
|
|
13170
|
+
Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack });
|
|
13171
|
+
} catch (e) {
|
|
13172
|
+
}
|
|
13173
|
+
}
|
|
12893
13174
|
var AxiosError = class _AxiosError extends Error {
|
|
12894
13175
|
static from(error, code, config, request, response, customProps) {
|
|
12895
|
-
|
|
12896
|
-
|
|
13176
|
+
let message = error.message;
|
|
13177
|
+
if (!message && utils_default.isArray(error.errors) && error.errors.length) {
|
|
13178
|
+
message = aggregateErrorMessage(error);
|
|
13179
|
+
}
|
|
13180
|
+
const axiosError = new _AxiosError(message, code || error.code, config, request, response);
|
|
13181
|
+
Object.defineProperty(axiosError, "cause", {
|
|
13182
|
+
__proto__: null,
|
|
13183
|
+
value: error,
|
|
13184
|
+
writable: true,
|
|
13185
|
+
enumerable: false,
|
|
13186
|
+
configurable: true
|
|
13187
|
+
});
|
|
12897
13188
|
axiosError.name = error.name;
|
|
13189
|
+
appendCauseStack(axiosError, error);
|
|
12898
13190
|
if (error.status != null && axiosError.status == null) {
|
|
12899
13191
|
axiosError.status = error.status;
|
|
12900
13192
|
}
|
|
@@ -12972,11 +13264,22 @@ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
|
12972
13264
|
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
12973
13265
|
var AxiosError_default = AxiosError;
|
|
12974
13266
|
|
|
12975
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13267
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/FormData.js
|
|
12976
13268
|
var import_form_data = __toESM(require_form_data(), 1);
|
|
12977
13269
|
var FormData_default = import_form_data.default;
|
|
12978
13270
|
|
|
12979
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13271
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/Buffer.js
|
|
13272
|
+
var Buffer_default = {
|
|
13273
|
+
isBufferAvailable() {
|
|
13274
|
+
return typeof Buffer !== "undefined";
|
|
13275
|
+
},
|
|
13276
|
+
from(value) {
|
|
13277
|
+
return Buffer.from(value);
|
|
13278
|
+
}
|
|
13279
|
+
};
|
|
13280
|
+
|
|
13281
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toFormData.js
|
|
13282
|
+
var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
12980
13283
|
function isVisitable(thing) {
|
|
12981
13284
|
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
|
|
12982
13285
|
}
|
|
@@ -13001,25 +13304,18 @@ function toFormData(obj, formData, options) {
|
|
|
13001
13304
|
throw new TypeError("target must be an object");
|
|
13002
13305
|
}
|
|
13003
13306
|
formData = formData || new (FormData_default || FormData)();
|
|
13004
|
-
|
|
13005
|
-
options,
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
}
|
|
13015
|
-
);
|
|
13016
|
-
const metaTokens = options.metaTokens;
|
|
13017
|
-
const visitor = options.visitor || defaultVisitor;
|
|
13018
|
-
const dots = options.dots;
|
|
13019
|
-
const indexes = options.indexes;
|
|
13020
|
-
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
13021
|
-
const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
|
|
13307
|
+
const option = (name, fallback) => {
|
|
13308
|
+
const value = utils_default.getSafeProp(options, name);
|
|
13309
|
+
return utils_default.isUndefined(value) ? fallback : value;
|
|
13310
|
+
};
|
|
13311
|
+
const metaTokens = option("metaTokens", true);
|
|
13312
|
+
const visitor = option("visitor") || defaultVisitor;
|
|
13313
|
+
const dots = option("dots", false);
|
|
13314
|
+
const indexes = option("indexes", false);
|
|
13315
|
+
const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob;
|
|
13316
|
+
const maxDepth = option("maxDepth", DEFAULT_FORM_DATA_MAX_DEPTH);
|
|
13022
13317
|
const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
|
|
13318
|
+
const stack = [];
|
|
13023
13319
|
if (!utils_default.isFunction(visitor)) {
|
|
13024
13320
|
throw new TypeError("visitor must be a function");
|
|
13025
13321
|
}
|
|
@@ -13035,10 +13331,44 @@ function toFormData(obj, formData, options) {
|
|
|
13035
13331
|
throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
|
|
13036
13332
|
}
|
|
13037
13333
|
if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
|
|
13038
|
-
|
|
13334
|
+
if (useBlob && typeof _Blob === "function") {
|
|
13335
|
+
return new _Blob([value]);
|
|
13336
|
+
}
|
|
13337
|
+
if (Buffer_default && Buffer_default.isBufferAvailable()) {
|
|
13338
|
+
return Buffer_default.from(value);
|
|
13339
|
+
}
|
|
13340
|
+
throw new AxiosError_default(
|
|
13341
|
+
"Blob is not supported. Use a Buffer instead.",
|
|
13342
|
+
AxiosError_default.ERR_NOT_SUPPORT
|
|
13343
|
+
);
|
|
13039
13344
|
}
|
|
13040
13345
|
return value;
|
|
13041
13346
|
}
|
|
13347
|
+
function throwIfMaxDepthExceeded(depth) {
|
|
13348
|
+
if (depth > maxDepth) {
|
|
13349
|
+
throw new AxiosError_default(
|
|
13350
|
+
"Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
|
|
13351
|
+
AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
13352
|
+
);
|
|
13353
|
+
}
|
|
13354
|
+
}
|
|
13355
|
+
function stringifyWithDepthLimit(value, depth) {
|
|
13356
|
+
if (maxDepth === Infinity) {
|
|
13357
|
+
return JSON.stringify(value);
|
|
13358
|
+
}
|
|
13359
|
+
const ancestors = [];
|
|
13360
|
+
return JSON.stringify(value, function limitDepth(_key, currentValue) {
|
|
13361
|
+
if (!utils_default.isObject(currentValue)) {
|
|
13362
|
+
return currentValue;
|
|
13363
|
+
}
|
|
13364
|
+
while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
|
|
13365
|
+
ancestors.pop();
|
|
13366
|
+
}
|
|
13367
|
+
ancestors.push(currentValue);
|
|
13368
|
+
throwIfMaxDepthExceeded(depth + ancestors.length - 1);
|
|
13369
|
+
return currentValue;
|
|
13370
|
+
});
|
|
13371
|
+
}
|
|
13042
13372
|
function defaultVisitor(value, key, path) {
|
|
13043
13373
|
let arr = value;
|
|
13044
13374
|
if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
|
|
@@ -13048,7 +13378,7 @@ function toFormData(obj, formData, options) {
|
|
|
13048
13378
|
if (value && !path && typeof value === "object") {
|
|
13049
13379
|
if (utils_default.endsWith(key, "{}")) {
|
|
13050
13380
|
key = metaTokens ? key : key.slice(0, -2);
|
|
13051
|
-
value =
|
|
13381
|
+
value = stringifyWithDepthLimit(value, 1);
|
|
13052
13382
|
} else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
|
|
13053
13383
|
key = removeBrackets(key);
|
|
13054
13384
|
arr.forEach(function each(el, index) {
|
|
@@ -13067,7 +13397,6 @@ function toFormData(obj, formData, options) {
|
|
|
13067
13397
|
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
13068
13398
|
return false;
|
|
13069
13399
|
}
|
|
13070
|
-
const stack = [];
|
|
13071
13400
|
const exposedHelpers = Object.assign(predicates, {
|
|
13072
13401
|
defaultVisitor,
|
|
13073
13402
|
convertValue,
|
|
@@ -13075,14 +13404,9 @@ function toFormData(obj, formData, options) {
|
|
|
13075
13404
|
});
|
|
13076
13405
|
function build(value, path, depth = 0) {
|
|
13077
13406
|
if (utils_default.isUndefined(value)) return;
|
|
13078
|
-
|
|
13079
|
-
throw new AxiosError_default(
|
|
13080
|
-
"Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
|
|
13081
|
-
AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
13082
|
-
);
|
|
13083
|
-
}
|
|
13407
|
+
throwIfMaxDepthExceeded(depth);
|
|
13084
13408
|
if (stack.indexOf(value) !== -1) {
|
|
13085
|
-
throw Error("Circular reference detected in " + path.join("."));
|
|
13409
|
+
throw new Error("Circular reference detected in " + path.join("."));
|
|
13086
13410
|
}
|
|
13087
13411
|
stack.push(value);
|
|
13088
13412
|
utils_default.forEach(value, function each(el, key) {
|
|
@@ -13101,7 +13425,7 @@ function toFormData(obj, formData, options) {
|
|
|
13101
13425
|
}
|
|
13102
13426
|
var toFormData_default = toFormData;
|
|
13103
13427
|
|
|
13104
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13428
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
13105
13429
|
function encode(str) {
|
|
13106
13430
|
const charMap = {
|
|
13107
13431
|
"!": "%21",
|
|
@@ -13124,16 +13448,14 @@ prototype.append = function append(name, value) {
|
|
|
13124
13448
|
this._pairs.push([name, value]);
|
|
13125
13449
|
};
|
|
13126
13450
|
prototype.toString = function toString2(encoder) {
|
|
13127
|
-
const _encode = encoder ?
|
|
13128
|
-
return encoder.call(this, value, encode);
|
|
13129
|
-
} : encode;
|
|
13451
|
+
const _encode = encoder ? (value) => encoder.call(this, value, encode) : encode;
|
|
13130
13452
|
return this._pairs.map(function each(pair) {
|
|
13131
13453
|
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
13132
13454
|
}, "").join("&");
|
|
13133
13455
|
};
|
|
13134
13456
|
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
|
13135
13457
|
|
|
13136
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13458
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/buildURL.js
|
|
13137
13459
|
function encode2(val) {
|
|
13138
13460
|
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
13139
13461
|
}
|
|
@@ -13141,11 +13463,12 @@ function buildURL(url2, params, options) {
|
|
|
13141
13463
|
if (!params) {
|
|
13142
13464
|
return url2;
|
|
13143
13465
|
}
|
|
13144
|
-
|
|
13466
|
+
url2 = url2 || "";
|
|
13145
13467
|
const _options = utils_default.isFunction(options) ? {
|
|
13146
13468
|
serialize: options
|
|
13147
13469
|
} : options;
|
|
13148
|
-
const
|
|
13470
|
+
const _encode = utils_default.getSafeProp(_options, "encode") || encode2;
|
|
13471
|
+
const serializeFn = utils_default.getSafeProp(_options, "serialize");
|
|
13149
13472
|
let serializedParams;
|
|
13150
13473
|
if (serializeFn) {
|
|
13151
13474
|
serializedParams = serializeFn(params, _options);
|
|
@@ -13162,10 +13485,54 @@ function buildURL(url2, params, options) {
|
|
|
13162
13485
|
return url2;
|
|
13163
13486
|
}
|
|
13164
13487
|
|
|
13165
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13488
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/InterceptorManager.js
|
|
13489
|
+
var $internals2 = /* @__PURE__ */ Symbol("internals");
|
|
13490
|
+
function countHandlers(handlers) {
|
|
13491
|
+
return handlers ? handlers.length : 0;
|
|
13492
|
+
}
|
|
13493
|
+
function trimHandlers(handlers) {
|
|
13494
|
+
if (!handlers) {
|
|
13495
|
+
return;
|
|
13496
|
+
}
|
|
13497
|
+
while (handlers.length && handlers[handlers.length - 1] === null) {
|
|
13498
|
+
handlers.pop();
|
|
13499
|
+
}
|
|
13500
|
+
}
|
|
13501
|
+
function normalizeHandlerId(id) {
|
|
13502
|
+
if (typeof id === "string" && id !== "" && String(Number(id)) === id) {
|
|
13503
|
+
return Number(id);
|
|
13504
|
+
}
|
|
13505
|
+
return id;
|
|
13506
|
+
}
|
|
13507
|
+
function syncHandlerEntries(manager, internals) {
|
|
13508
|
+
const handlers = manager.handlers;
|
|
13509
|
+
const length = countHandlers(handlers);
|
|
13510
|
+
if (handlers !== internals.handlersRef) {
|
|
13511
|
+
internals.handlersRef = handlers;
|
|
13512
|
+
internals.handlerEntries.clear();
|
|
13513
|
+
} else if (length !== internals.handlersLength) {
|
|
13514
|
+
if (!length) {
|
|
13515
|
+
internals.handlerEntries.clear();
|
|
13516
|
+
} else {
|
|
13517
|
+
internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
|
|
13518
|
+
if (handlers[entry.index] !== entry.handler) {
|
|
13519
|
+
internals.handlerEntries.delete(id);
|
|
13520
|
+
}
|
|
13521
|
+
});
|
|
13522
|
+
}
|
|
13523
|
+
}
|
|
13524
|
+
internals.handlersLength = length;
|
|
13525
|
+
}
|
|
13166
13526
|
var InterceptorManager = class {
|
|
13167
13527
|
constructor() {
|
|
13168
13528
|
this.handlers = [];
|
|
13529
|
+
this[$internals2] = {
|
|
13530
|
+
handlersRef: this.handlers,
|
|
13531
|
+
handlersLength: this.handlers.length,
|
|
13532
|
+
handlerEntries: /* @__PURE__ */ new Map(),
|
|
13533
|
+
iterationDepth: 0,
|
|
13534
|
+
nextId: 0
|
|
13535
|
+
};
|
|
13169
13536
|
}
|
|
13170
13537
|
/**
|
|
13171
13538
|
* Add a new interceptor to the stack
|
|
@@ -13177,13 +13544,25 @@ var InterceptorManager = class {
|
|
|
13177
13544
|
* @return {Number} An ID used to remove interceptor later
|
|
13178
13545
|
*/
|
|
13179
13546
|
use(fulfilled, rejected, options) {
|
|
13180
|
-
|
|
13547
|
+
const handler = {
|
|
13181
13548
|
fulfilled,
|
|
13182
13549
|
rejected,
|
|
13183
13550
|
synchronous: options ? options.synchronous : false,
|
|
13184
13551
|
runWhen: options ? options.runWhen : null
|
|
13552
|
+
};
|
|
13553
|
+
const internals = this[$internals2];
|
|
13554
|
+
if (this.handlers == null) {
|
|
13555
|
+
this.handlers = [];
|
|
13556
|
+
}
|
|
13557
|
+
syncHandlerEntries(this, internals);
|
|
13558
|
+
const id = internals.nextId++;
|
|
13559
|
+
this.handlers.push(handler);
|
|
13560
|
+
internals.handlerEntries.set(id, {
|
|
13561
|
+
handler,
|
|
13562
|
+
index: this.handlers.length - 1
|
|
13185
13563
|
});
|
|
13186
|
-
|
|
13564
|
+
internals.handlersLength = this.handlers.length;
|
|
13565
|
+
return id;
|
|
13187
13566
|
}
|
|
13188
13567
|
/**
|
|
13189
13568
|
* Remove an interceptor from the stack
|
|
@@ -13193,8 +13572,20 @@ var InterceptorManager = class {
|
|
|
13193
13572
|
* @returns {void}
|
|
13194
13573
|
*/
|
|
13195
13574
|
eject(id) {
|
|
13196
|
-
|
|
13197
|
-
|
|
13575
|
+
const internals = this[$internals2];
|
|
13576
|
+
syncHandlerEntries(this, internals);
|
|
13577
|
+
const handlerId = normalizeHandlerId(id);
|
|
13578
|
+
const entry = internals.handlerEntries.get(handlerId);
|
|
13579
|
+
if (entry) {
|
|
13580
|
+
internals.handlerEntries.delete(handlerId);
|
|
13581
|
+
if (this.handlers[entry.index] !== entry.handler) {
|
|
13582
|
+
return;
|
|
13583
|
+
}
|
|
13584
|
+
this.handlers[entry.index] = null;
|
|
13585
|
+
if (!internals.iterationDepth) {
|
|
13586
|
+
trimHandlers(this.handlers);
|
|
13587
|
+
internals.handlersLength = this.handlers.length;
|
|
13588
|
+
}
|
|
13198
13589
|
}
|
|
13199
13590
|
}
|
|
13200
13591
|
/**
|
|
@@ -13205,6 +13596,7 @@ var InterceptorManager = class {
|
|
|
13205
13596
|
clear() {
|
|
13206
13597
|
if (this.handlers) {
|
|
13207
13598
|
this.handlers = [];
|
|
13599
|
+
syncHandlerEntries(this, this[$internals2]);
|
|
13208
13600
|
}
|
|
13209
13601
|
}
|
|
13210
13602
|
/**
|
|
@@ -13218,31 +13610,45 @@ var InterceptorManager = class {
|
|
|
13218
13610
|
* @returns {void}
|
|
13219
13611
|
*/
|
|
13220
13612
|
forEach(fn) {
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13613
|
+
const internals = this[$internals2];
|
|
13614
|
+
syncHandlerEntries(this, internals);
|
|
13615
|
+
internals.iterationDepth++;
|
|
13616
|
+
try {
|
|
13617
|
+
utils_default.forEach(this.handlers, function forEachHandler(h) {
|
|
13618
|
+
if (h !== null) {
|
|
13619
|
+
fn(h);
|
|
13620
|
+
}
|
|
13621
|
+
});
|
|
13622
|
+
} finally {
|
|
13623
|
+
if (!--internals.iterationDepth) {
|
|
13624
|
+
syncHandlerEntries(this, internals);
|
|
13625
|
+
trimHandlers(this.handlers);
|
|
13626
|
+
internals.handlersLength = countHandlers(this.handlers);
|
|
13224
13627
|
}
|
|
13225
|
-
}
|
|
13628
|
+
}
|
|
13226
13629
|
}
|
|
13227
13630
|
};
|
|
13228
13631
|
var InterceptorManager_default = InterceptorManager;
|
|
13229
13632
|
|
|
13230
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13633
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/transitional.js
|
|
13231
13634
|
var transitional_default = {
|
|
13232
13635
|
silentJSONParsing: true,
|
|
13233
13636
|
forcedJSONParsing: true,
|
|
13234
13637
|
clarifyTimeoutError: false,
|
|
13235
|
-
legacyInterceptorReqResOrdering: true
|
|
13638
|
+
legacyInterceptorReqResOrdering: true,
|
|
13639
|
+
advertiseZstdAcceptEncoding: false,
|
|
13640
|
+
validateStatusUndefinedResolves: true,
|
|
13641
|
+
encodeBasicAuthUsername: false
|
|
13236
13642
|
};
|
|
13237
13643
|
|
|
13238
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13644
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
|
|
13239
13645
|
import crypto from "crypto";
|
|
13240
13646
|
|
|
13241
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13647
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
13242
13648
|
import url from "url";
|
|
13243
13649
|
var URLSearchParams_default = url.URLSearchParams;
|
|
13244
13650
|
|
|
13245
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13651
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
|
|
13246
13652
|
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
13247
13653
|
var DIGIT = "0123456789";
|
|
13248
13654
|
var ALPHABET = {
|
|
@@ -13272,7 +13678,7 @@ var node_default = {
|
|
|
13272
13678
|
protocols: ["http", "https", "file", "data"]
|
|
13273
13679
|
};
|
|
13274
13680
|
|
|
13275
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13681
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/common/utils.js
|
|
13276
13682
|
var utils_exports = {};
|
|
13277
13683
|
__export(utils_exports, {
|
|
13278
13684
|
hasBrowserEnv: () => hasBrowserEnv,
|
|
@@ -13290,13 +13696,13 @@ var hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
13290
13696
|
})();
|
|
13291
13697
|
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
13292
13698
|
|
|
13293
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13699
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/index.js
|
|
13294
13700
|
var platform_default = {
|
|
13295
13701
|
...utils_exports,
|
|
13296
13702
|
...node_default
|
|
13297
13703
|
};
|
|
13298
13704
|
|
|
13299
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13705
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
13300
13706
|
function toURLEncodedForm(data, options) {
|
|
13301
13707
|
return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
|
|
13302
13708
|
visitor: function(value, key, path, helpers) {
|
|
@@ -13310,11 +13716,25 @@ function toURLEncodedForm(data, options) {
|
|
|
13310
13716
|
});
|
|
13311
13717
|
}
|
|
13312
13718
|
|
|
13313
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13719
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
13720
|
+
var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
|
|
13721
|
+
function throwIfDepthExceeded(index) {
|
|
13722
|
+
if (index > MAX_DEPTH) {
|
|
13723
|
+
throw new AxiosError_default(
|
|
13724
|
+
"FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH,
|
|
13725
|
+
AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
13726
|
+
);
|
|
13727
|
+
}
|
|
13728
|
+
}
|
|
13314
13729
|
function parsePropPath(name) {
|
|
13315
|
-
|
|
13316
|
-
|
|
13317
|
-
|
|
13730
|
+
const path = [];
|
|
13731
|
+
const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
|
|
13732
|
+
let match;
|
|
13733
|
+
while ((match = pattern.exec(name)) !== null) {
|
|
13734
|
+
throwIfDepthExceeded(path.length);
|
|
13735
|
+
path.push(match[0] === "[]" ? "" : match[1] || match[0]);
|
|
13736
|
+
}
|
|
13737
|
+
return path;
|
|
13318
13738
|
}
|
|
13319
13739
|
function arrayToObject(arr) {
|
|
13320
13740
|
const obj = {};
|
|
@@ -13328,8 +13748,27 @@ function arrayToObject(arr) {
|
|
|
13328
13748
|
}
|
|
13329
13749
|
return obj;
|
|
13330
13750
|
}
|
|
13751
|
+
function normalizeArray(value) {
|
|
13752
|
+
if (!utils_default.isArray(value)) return value;
|
|
13753
|
+
const keys = Object.keys(value);
|
|
13754
|
+
return keys.length !== value.length || keys.some((key, index) => key !== String(index)) ? arrayToObject(value) : value;
|
|
13755
|
+
}
|
|
13756
|
+
function normalizeArrays(obj) {
|
|
13757
|
+
const pending = [obj];
|
|
13758
|
+
while (pending.length) {
|
|
13759
|
+
const target = pending.pop();
|
|
13760
|
+
Object.keys(target).forEach((key) => {
|
|
13761
|
+
const value = target[key] = normalizeArray(target[key]);
|
|
13762
|
+
if (utils_default.isArray(value) || utils_default.isPlainObject(value)) {
|
|
13763
|
+
pending.push(value);
|
|
13764
|
+
}
|
|
13765
|
+
});
|
|
13766
|
+
}
|
|
13767
|
+
return obj;
|
|
13768
|
+
}
|
|
13331
13769
|
function formDataToJSON(formData) {
|
|
13332
13770
|
function buildPath(path, value, target, index) {
|
|
13771
|
+
throwIfDepthExceeded(index);
|
|
13333
13772
|
let name = path[index++];
|
|
13334
13773
|
if (name === "__proto__") return true;
|
|
13335
13774
|
const isNumericKey = Number.isFinite(+name);
|
|
@@ -13337,6 +13776,7 @@ function formDataToJSON(formData) {
|
|
|
13337
13776
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
13338
13777
|
if (isLast) {
|
|
13339
13778
|
if (utils_default.hasOwnProp(target, name)) {
|
|
13779
|
+
target[name] = normalizeArray(target[name]);
|
|
13340
13780
|
target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
|
|
13341
13781
|
} else {
|
|
13342
13782
|
target[name] = value;
|
|
@@ -13357,15 +13797,31 @@ function formDataToJSON(formData) {
|
|
|
13357
13797
|
utils_default.forEachEntry(formData, (name, value) => {
|
|
13358
13798
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
13359
13799
|
});
|
|
13360
|
-
return obj;
|
|
13800
|
+
return normalizeArrays(obj);
|
|
13361
13801
|
}
|
|
13362
13802
|
return null;
|
|
13363
13803
|
}
|
|
13364
13804
|
var formDataToJSON_default = formDataToJSON;
|
|
13365
13805
|
|
|
13366
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13806
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/methodList.js
|
|
13807
|
+
var methodList = Object.freeze([
|
|
13808
|
+
"get",
|
|
13809
|
+
"delete",
|
|
13810
|
+
"head",
|
|
13811
|
+
"options",
|
|
13812
|
+
"post",
|
|
13813
|
+
"put",
|
|
13814
|
+
"patch",
|
|
13815
|
+
"purge",
|
|
13816
|
+
"link",
|
|
13817
|
+
"unlink",
|
|
13818
|
+
"query"
|
|
13819
|
+
]);
|
|
13820
|
+
var methodList_default = methodList;
|
|
13821
|
+
|
|
13822
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/index.js
|
|
13367
13823
|
var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
|
|
13368
|
-
function
|
|
13824
|
+
function stringifySafely2(rawValue, parser, encoder) {
|
|
13369
13825
|
if (utils_default.isString(rawValue)) {
|
|
13370
13826
|
try {
|
|
13371
13827
|
(parser || JSON.parse)(rawValue);
|
|
@@ -13421,7 +13877,7 @@ var defaults = {
|
|
|
13421
13877
|
}
|
|
13422
13878
|
if (isObjectPayload || hasJSONContentType) {
|
|
13423
13879
|
headers.setContentType("application/json", false);
|
|
13424
|
-
return
|
|
13880
|
+
return stringifySafely2(data);
|
|
13425
13881
|
}
|
|
13426
13882
|
return data;
|
|
13427
13883
|
}
|
|
@@ -13475,12 +13931,12 @@ var defaults = {
|
|
|
13475
13931
|
}
|
|
13476
13932
|
}
|
|
13477
13933
|
};
|
|
13478
|
-
utils_default.forEach(
|
|
13934
|
+
utils_default.forEach(methodList_default, (method) => {
|
|
13479
13935
|
defaults.headers[method] = {};
|
|
13480
13936
|
});
|
|
13481
13937
|
var defaults_default = defaults;
|
|
13482
13938
|
|
|
13483
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13939
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/transformData.js
|
|
13484
13940
|
function transformData(fns, response) {
|
|
13485
13941
|
const config = this || defaults_default;
|
|
13486
13942
|
const context = response || config;
|
|
@@ -13493,12 +13949,12 @@ function transformData(fns, response) {
|
|
|
13493
13949
|
return data;
|
|
13494
13950
|
}
|
|
13495
13951
|
|
|
13496
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13952
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/isCancel.js
|
|
13497
13953
|
function isCancel(value) {
|
|
13498
13954
|
return !!(value && value.__CANCEL__);
|
|
13499
13955
|
}
|
|
13500
13956
|
|
|
13501
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13957
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CanceledError.js
|
|
13502
13958
|
var CanceledError = class extends AxiosError_default {
|
|
13503
13959
|
/**
|
|
13504
13960
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
@@ -13517,7 +13973,7 @@ var CanceledError = class extends AxiosError_default {
|
|
|
13517
13973
|
};
|
|
13518
13974
|
var CanceledError_default = CanceledError;
|
|
13519
13975
|
|
|
13520
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13976
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/settle.js
|
|
13521
13977
|
function settle(resolve, reject, response) {
|
|
13522
13978
|
const validateStatus2 = response.config.validateStatus;
|
|
13523
13979
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
@@ -13533,7 +13989,7 @@ function settle(resolve, reject, response) {
|
|
|
13533
13989
|
}
|
|
13534
13990
|
}
|
|
13535
13991
|
|
|
13536
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13992
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
13537
13993
|
function isAbsoluteURL(url2) {
|
|
13538
13994
|
if (typeof url2 !== "string") {
|
|
13539
13995
|
return false;
|
|
@@ -13541,15 +13997,71 @@ function isAbsoluteURL(url2) {
|
|
|
13541
13997
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
|
13542
13998
|
}
|
|
13543
13999
|
|
|
13544
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14000
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/combineURLs.js
|
|
13545
14001
|
function combineURLs(baseURL, relativeURL) {
|
|
13546
|
-
|
|
14002
|
+
if (!relativeURL) {
|
|
14003
|
+
return baseURL;
|
|
14004
|
+
}
|
|
14005
|
+
let end = baseURL.length;
|
|
14006
|
+
while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
|
|
14007
|
+
end--;
|
|
14008
|
+
}
|
|
14009
|
+
return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
|
|
14010
|
+
}
|
|
14011
|
+
|
|
14012
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js
|
|
14013
|
+
var urlParserControlCharacters = /[\t\n\r]/g;
|
|
14014
|
+
function normalizeURLForProtocolCheck(url2) {
|
|
14015
|
+
if (typeof url2 !== "string") {
|
|
14016
|
+
return url2;
|
|
14017
|
+
}
|
|
14018
|
+
let start = 0;
|
|
14019
|
+
while (start < url2.length && url2.charCodeAt(start) <= 32) {
|
|
14020
|
+
start++;
|
|
14021
|
+
}
|
|
14022
|
+
return url2.slice(start).replace(urlParserControlCharacters, "");
|
|
13547
14023
|
}
|
|
13548
14024
|
|
|
13549
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13550
|
-
|
|
14025
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/buildFullPath.js
|
|
14026
|
+
var malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
14027
|
+
function redactFragment(fragment) {
|
|
14028
|
+
if (!fragment) {
|
|
14029
|
+
return fragment;
|
|
14030
|
+
}
|
|
14031
|
+
return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => {
|
|
14032
|
+
return `${separator}${parameterName}${REDACTED}`;
|
|
14033
|
+
});
|
|
14034
|
+
}
|
|
14035
|
+
function redactSensitiveURLParts(url2) {
|
|
14036
|
+
const redactedURL = url2.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
|
|
14037
|
+
const fragmentIndex = redactedURL.indexOf("#");
|
|
14038
|
+
const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
|
|
14039
|
+
const redactedURLWithoutFragment = urlWithoutFragment.replace(
|
|
14040
|
+
/([?&][^=&#]*=)[^&#]*/g,
|
|
14041
|
+
`$1${REDACTED}`
|
|
14042
|
+
);
|
|
14043
|
+
if (fragmentIndex === -1) {
|
|
14044
|
+
return redactedURLWithoutFragment;
|
|
14045
|
+
}
|
|
14046
|
+
return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
|
|
14047
|
+
}
|
|
14048
|
+
function assertValidHttpProtocolURL(url2, config) {
|
|
14049
|
+
if (typeof url2 === "string") {
|
|
14050
|
+
const normalizedURL = normalizeURLForProtocolCheck(url2);
|
|
14051
|
+
if (malformedHttpProtocol.test(normalizedURL)) {
|
|
14052
|
+
throw new AxiosError_default(
|
|
14053
|
+
`Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
|
|
14054
|
+
AxiosError_default.ERR_INVALID_URL,
|
|
14055
|
+
config
|
|
14056
|
+
);
|
|
14057
|
+
}
|
|
14058
|
+
}
|
|
14059
|
+
}
|
|
14060
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
14061
|
+
assertValidHttpProtocolURL(requestedURL, config);
|
|
13551
14062
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
13552
14063
|
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
14064
|
+
assertValidHttpProtocolURL(baseURL, config);
|
|
13553
14065
|
return combineURLs(baseURL, requestedURL);
|
|
13554
14066
|
}
|
|
13555
14067
|
return requestedURL;
|
|
@@ -13622,27 +14134,27 @@ function getEnv(key) {
|
|
|
13622
14134
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
13623
14135
|
}
|
|
13624
14136
|
|
|
13625
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14137
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
|
|
13626
14138
|
var import_https_proxy_agent = __toESM(require_dist(), 1);
|
|
13627
14139
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
13628
14140
|
import http from "http";
|
|
13629
14141
|
import https from "https";
|
|
13630
|
-
import
|
|
13631
|
-
import
|
|
14142
|
+
import http22 from "http2";
|
|
14143
|
+
import util3 from "util";
|
|
13632
14144
|
import { resolve as resolvePath } from "path";
|
|
13633
14145
|
import zlib from "zlib";
|
|
13634
14146
|
|
|
13635
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13636
|
-
var VERSION = "1.
|
|
14147
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/env/data.js
|
|
14148
|
+
var VERSION = "1.21.0";
|
|
13637
14149
|
|
|
13638
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14150
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseProtocol.js
|
|
13639
14151
|
function parseProtocol(url2) {
|
|
13640
14152
|
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
|
|
13641
|
-
return match && match[1] || "";
|
|
14153
|
+
return match && match[1].toLowerCase() || "";
|
|
13642
14154
|
}
|
|
13643
14155
|
|
|
13644
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13645
|
-
var DATA_URL_PATTERN = /^([
|
|
14156
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/fromDataURI.js
|
|
14157
|
+
var DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/i;
|
|
13646
14158
|
function fromDataURI(uri, asBlob, options) {
|
|
13647
14159
|
const _Blob = options && options.Blob || platform_default.classes.Blob;
|
|
13648
14160
|
const protocol = parseProtocol(uri);
|
|
@@ -13659,13 +14171,16 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
13659
14171
|
const params = match[2];
|
|
13660
14172
|
const encoding = match[3] ? "base64" : "utf8";
|
|
13661
14173
|
const body = match[4];
|
|
13662
|
-
let mime;
|
|
14174
|
+
let mime = "";
|
|
13663
14175
|
if (type) {
|
|
13664
14176
|
mime = params ? type + params : type;
|
|
13665
14177
|
} else if (params) {
|
|
13666
14178
|
mime = "text/plain" + params;
|
|
13667
14179
|
}
|
|
13668
|
-
const buffer = Buffer.from(
|
|
14180
|
+
const buffer = encoding === "base64" ? Buffer.from(
|
|
14181
|
+
body.replace(/%([\da-f]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))),
|
|
14182
|
+
"base64"
|
|
14183
|
+
) : Buffer.from(decodeURIComponent(body), encoding);
|
|
13669
14184
|
if (asBlob) {
|
|
13670
14185
|
if (!_Blob) {
|
|
13671
14186
|
throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
|
|
@@ -13677,10 +14192,24 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
13677
14192
|
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
|
|
13678
14193
|
}
|
|
13679
14194
|
|
|
13680
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14195
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
|
|
13681
14196
|
import stream3 from "stream";
|
|
13682
14197
|
|
|
13683
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14198
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/setFormDataHeaders.js
|
|
14199
|
+
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
14200
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
14201
|
+
if (policy !== "content-only") {
|
|
14202
|
+
headers.set(formHeaders);
|
|
14203
|
+
return;
|
|
14204
|
+
}
|
|
14205
|
+
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
14206
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
14207
|
+
headers.set(key, val);
|
|
14208
|
+
}
|
|
14209
|
+
});
|
|
14210
|
+
}
|
|
14211
|
+
|
|
14212
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
13684
14213
|
import stream from "stream";
|
|
13685
14214
|
var kInternals = /* @__PURE__ */ Symbol("internals");
|
|
13686
14215
|
var AxiosTransformStream = class extends stream.Transform {
|
|
@@ -13737,7 +14266,10 @@ var AxiosTransformStream = class extends stream.Transform {
|
|
|
13737
14266
|
const timeWindow = internals.timeWindow;
|
|
13738
14267
|
const divider = 1e3 / timeWindow;
|
|
13739
14268
|
const bytesThreshold = maxRate / divider;
|
|
13740
|
-
|
|
14269
|
+
let minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
|
|
14270
|
+
if (maxRate) {
|
|
14271
|
+
minChunkSize = Math.min(bytesThreshold, minChunkSize);
|
|
14272
|
+
}
|
|
13741
14273
|
const pushChunk = (_chunk, _callback) => {
|
|
13742
14274
|
const bytes = Buffer.byteLength(_chunk);
|
|
13743
14275
|
internals.bytesSeen += bytes;
|
|
@@ -13753,6 +14285,9 @@ var AxiosTransformStream = class extends stream.Transform {
|
|
|
13753
14285
|
}
|
|
13754
14286
|
};
|
|
13755
14287
|
const transformChunk = (_chunk, _callback) => {
|
|
14288
|
+
if (this.destroyed) {
|
|
14289
|
+
return _callback();
|
|
14290
|
+
}
|
|
13756
14291
|
const chunkSize = Buffer.byteLength(_chunk);
|
|
13757
14292
|
let chunkRemainder = null;
|
|
13758
14293
|
let maxChunkSize = readableHighWaterMark;
|
|
@@ -13775,7 +14310,7 @@ var AxiosTransformStream = class extends stream.Transform {
|
|
|
13775
14310
|
}, timeWindow - passed);
|
|
13776
14311
|
}
|
|
13777
14312
|
if (bytesLeft < maxChunkSize) {
|
|
13778
|
-
maxChunkSize = bytesLeft;
|
|
14313
|
+
maxChunkSize = Math.max(1, Math.floor(bytesLeft));
|
|
13779
14314
|
}
|
|
13780
14315
|
}
|
|
13781
14316
|
if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) {
|
|
@@ -13803,14 +14338,14 @@ var AxiosTransformStream = class extends stream.Transform {
|
|
|
13803
14338
|
};
|
|
13804
14339
|
var AxiosTransformStream_default = AxiosTransformStream;
|
|
13805
14340
|
|
|
13806
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14341
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
|
|
13807
14342
|
import { EventEmitter } from "events";
|
|
13808
14343
|
|
|
13809
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14344
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
|
|
13810
14345
|
import util from "util";
|
|
13811
14346
|
import { Readable } from "stream";
|
|
13812
14347
|
|
|
13813
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14348
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/readBlob.js
|
|
13814
14349
|
var { asyncIterator } = Symbol;
|
|
13815
14350
|
var readBlob = async function* (blob) {
|
|
13816
14351
|
if (blob.stream) {
|
|
@@ -13825,7 +14360,7 @@ var readBlob = async function* (blob) {
|
|
|
13825
14360
|
};
|
|
13826
14361
|
var readBlob_default = readBlob;
|
|
13827
14362
|
|
|
13828
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14363
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
|
|
13829
14364
|
var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
|
|
13830
14365
|
var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
|
|
13831
14366
|
var CRLF = "\r\n";
|
|
@@ -13833,9 +14368,9 @@ var CRLF_BYTES = textEncoder.encode(CRLF);
|
|
|
13833
14368
|
var CRLF_BYTES_COUNT = 2;
|
|
13834
14369
|
var FormDataPart = class {
|
|
13835
14370
|
constructor(name, value) {
|
|
13836
|
-
const { escapeName } = this.constructor;
|
|
14371
|
+
const { escapeName: escapeName2 } = this.constructor;
|
|
13837
14372
|
const isStringValue = utils_default.isString(value);
|
|
13838
|
-
let headers = `Content-Disposition: form-data; name="${
|
|
14373
|
+
let headers = `Content-Disposition: form-data; name="${escapeName2(name)}"${!isStringValue && value.name ? `; filename="${escapeName2(value.name)}"` : ""}${CRLF}`;
|
|
13839
14374
|
if (isStringValue) {
|
|
13840
14375
|
value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
|
13841
14376
|
} else {
|
|
@@ -13876,10 +14411,10 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
13876
14411
|
boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET)
|
|
13877
14412
|
} = options || {};
|
|
13878
14413
|
if (!utils_default.isFormData(form)) {
|
|
13879
|
-
throw TypeError("FormData instance required");
|
|
14414
|
+
throw new TypeError("FormData instance required");
|
|
13880
14415
|
}
|
|
13881
14416
|
if (boundary.length < 1 || boundary.length > 70) {
|
|
13882
|
-
throw Error("boundary must be 1-70 characters long");
|
|
14417
|
+
throw new Error("boundary must be 1-70 characters long");
|
|
13883
14418
|
}
|
|
13884
14419
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
13885
14420
|
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
@@ -13910,7 +14445,7 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
13910
14445
|
};
|
|
13911
14446
|
var formDataToStream_default = formDataToStream;
|
|
13912
14447
|
|
|
13913
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14448
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
13914
14449
|
import stream2 from "stream";
|
|
13915
14450
|
var ZlibHeaderTransformStream = class extends stream2.Transform {
|
|
13916
14451
|
__transform(chunk, encoding, callback) {
|
|
@@ -13932,29 +14467,191 @@ var ZlibHeaderTransformStream = class extends stream2.Transform {
|
|
|
13932
14467
|
};
|
|
13933
14468
|
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
|
13934
14469
|
|
|
13935
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13936
|
-
|
|
13937
|
-
|
|
13938
|
-
|
|
13939
|
-
|
|
13940
|
-
|
|
13941
|
-
|
|
13942
|
-
|
|
13943
|
-
|
|
14470
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/Http2Sessions.js
|
|
14471
|
+
import http2 from "http2";
|
|
14472
|
+
import util2 from "util";
|
|
14473
|
+
var Http2Sessions = class {
|
|
14474
|
+
constructor() {
|
|
14475
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
14476
|
+
}
|
|
14477
|
+
getSession(authority, options) {
|
|
14478
|
+
options = Object.assign(
|
|
14479
|
+
/* @__PURE__ */ Object.create(null),
|
|
14480
|
+
{
|
|
14481
|
+
sessionTimeout: 1e3
|
|
14482
|
+
},
|
|
14483
|
+
options
|
|
14484
|
+
);
|
|
14485
|
+
let authoritySessions = this.sessions[authority];
|
|
14486
|
+
if (authoritySessions) {
|
|
14487
|
+
let len = authoritySessions.length;
|
|
14488
|
+
for (let i = 0; i < len; i++) {
|
|
14489
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
14490
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
|
|
14491
|
+
return sessionHandle;
|
|
14492
|
+
}
|
|
13944
14493
|
}
|
|
13945
|
-
}
|
|
13946
|
-
|
|
13947
|
-
|
|
14494
|
+
}
|
|
14495
|
+
const session = http2.connect(authority, options);
|
|
14496
|
+
let removed;
|
|
14497
|
+
let timer;
|
|
14498
|
+
const removeSession = () => {
|
|
14499
|
+
if (removed) {
|
|
14500
|
+
return;
|
|
14501
|
+
}
|
|
14502
|
+
removed = true;
|
|
14503
|
+
if (timer) {
|
|
14504
|
+
clearTimeout(timer);
|
|
14505
|
+
timer = null;
|
|
14506
|
+
}
|
|
14507
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
14508
|
+
while (i--) {
|
|
14509
|
+
if (entries[i][0] === session) {
|
|
14510
|
+
if (len === 1) {
|
|
14511
|
+
delete this.sessions[authority];
|
|
14512
|
+
} else {
|
|
14513
|
+
entries.splice(i, 1);
|
|
14514
|
+
}
|
|
14515
|
+
if (!session.closed) {
|
|
14516
|
+
session.close();
|
|
14517
|
+
}
|
|
14518
|
+
return;
|
|
14519
|
+
}
|
|
14520
|
+
}
|
|
14521
|
+
};
|
|
14522
|
+
const originalRequestFn = session.request;
|
|
14523
|
+
const { sessionTimeout } = options;
|
|
14524
|
+
if (sessionTimeout != null) {
|
|
14525
|
+
let streamsCount = 0;
|
|
14526
|
+
session.request = function() {
|
|
14527
|
+
const stream4 = originalRequestFn.apply(this, arguments);
|
|
14528
|
+
streamsCount++;
|
|
14529
|
+
if (timer) {
|
|
14530
|
+
clearTimeout(timer);
|
|
14531
|
+
timer = null;
|
|
14532
|
+
}
|
|
14533
|
+
stream4.once("close", () => {
|
|
14534
|
+
if (!--streamsCount && !removed) {
|
|
14535
|
+
timer = setTimeout(() => {
|
|
14536
|
+
timer = null;
|
|
14537
|
+
removeSession();
|
|
14538
|
+
}, sessionTimeout);
|
|
14539
|
+
}
|
|
14540
|
+
});
|
|
14541
|
+
return stream4;
|
|
14542
|
+
};
|
|
14543
|
+
}
|
|
14544
|
+
session.once("close", removeSession);
|
|
14545
|
+
session.once("error", removeSession);
|
|
14546
|
+
session.once("goaway", removeSession);
|
|
14547
|
+
let entry = [session, options];
|
|
14548
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
14549
|
+
return session;
|
|
14550
|
+
}
|
|
14551
|
+
};
|
|
14552
|
+
var Http2Sessions_default = Http2Sessions;
|
|
14553
|
+
|
|
14554
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/callbackify.js
|
|
14555
|
+
var callbackify = (fn, reducer) => {
|
|
14556
|
+
return utils_default.isAsyncFn(fn) ? function(...args) {
|
|
14557
|
+
const cb = args.pop();
|
|
14558
|
+
fn.apply(this, args).then((value) => {
|
|
14559
|
+
try {
|
|
14560
|
+
reducer ? cb(null, ...reducer(value)) : cb(null, value);
|
|
14561
|
+
} catch (err) {
|
|
14562
|
+
cb(err);
|
|
14563
|
+
}
|
|
14564
|
+
}, cb);
|
|
14565
|
+
} : fn;
|
|
14566
|
+
};
|
|
13948
14567
|
var callbackify_default = callbackify;
|
|
13949
14568
|
|
|
13950
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
13951
|
-
|
|
14569
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/shouldBypassProxy.js
|
|
14570
|
+
import { domainToASCII } from "url";
|
|
14571
|
+
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
|
|
14572
|
+
var trimTrailingDots = (value) => {
|
|
14573
|
+
let end = value.length;
|
|
14574
|
+
while (end && value.charCodeAt(end - 1) === 46) {
|
|
14575
|
+
end--;
|
|
14576
|
+
}
|
|
14577
|
+
return end === value.length ? value : value.slice(0, end);
|
|
14578
|
+
};
|
|
13952
14579
|
var isIPv4Loopback = (host) => {
|
|
13953
14580
|
const parts = host.split(".");
|
|
13954
14581
|
if (parts.length !== 4) return false;
|
|
13955
14582
|
if (parts[0] !== "127") return false;
|
|
13956
14583
|
return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
|
|
13957
14584
|
};
|
|
14585
|
+
var parseIPv4Octet = (text) => {
|
|
14586
|
+
if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
|
|
14587
|
+
const n = parseInt(text.slice(2), 16);
|
|
14588
|
+
return Number.isFinite(n) ? n : null;
|
|
14589
|
+
}
|
|
14590
|
+
if (text.length > 1 && /^0[0-7]+$/.test(text)) {
|
|
14591
|
+
const n = parseInt(text, 8);
|
|
14592
|
+
return Number.isFinite(n) ? n : null;
|
|
14593
|
+
}
|
|
14594
|
+
if (text.length > 1 && /^0[0-9]+$/.test(text)) {
|
|
14595
|
+
return null;
|
|
14596
|
+
}
|
|
14597
|
+
if (/^[0-9]+$/.test(text)) {
|
|
14598
|
+
const n = parseInt(text, 10);
|
|
14599
|
+
return Number.isFinite(n) ? n : null;
|
|
14600
|
+
}
|
|
14601
|
+
return null;
|
|
14602
|
+
};
|
|
14603
|
+
var normalizeIPAddress = (host) => {
|
|
14604
|
+
if (typeof host !== "string" || !host || host.indexOf(":") !== -1) {
|
|
14605
|
+
return host;
|
|
14606
|
+
}
|
|
14607
|
+
let h = host;
|
|
14608
|
+
if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") {
|
|
14609
|
+
h = h.slice(1, -1);
|
|
14610
|
+
}
|
|
14611
|
+
h = trimTrailingDots(h);
|
|
14612
|
+
if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
|
|
14613
|
+
const parts = h.split(".");
|
|
14614
|
+
if (parts.some((p) => p === "")) return host;
|
|
14615
|
+
if (parts.length === 4) {
|
|
14616
|
+
const octets = parts.map(parseIPv4Octet);
|
|
14617
|
+
if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
|
|
14618
|
+
return octets.join(".");
|
|
14619
|
+
}
|
|
14620
|
+
if (parts.length > 4) {
|
|
14621
|
+
return host;
|
|
14622
|
+
}
|
|
14623
|
+
if (parts.length === 1) return host;
|
|
14624
|
+
const literalOctets = parts.slice(0, -1);
|
|
14625
|
+
const tail = parts[parts.length - 1];
|
|
14626
|
+
const tailSlots = 4 - literalOctets.length;
|
|
14627
|
+
const tailValue = parseIPv4Octet(tail);
|
|
14628
|
+
if (tailValue === null) return host;
|
|
14629
|
+
const maxTail = (1 << 8 * tailSlots) - 1;
|
|
14630
|
+
if (tailValue < 0 || tailValue > maxTail) return host;
|
|
14631
|
+
const tailOctets = new Array(tailSlots).fill(0);
|
|
14632
|
+
for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) {
|
|
14633
|
+
tailOctets[i] = v & 255;
|
|
14634
|
+
}
|
|
14635
|
+
const literal = literalOctets.map(parseIPv4Octet);
|
|
14636
|
+
if (literal.some((n) => n === null || n < 0 || n > 255)) return host;
|
|
14637
|
+
return [...literal, ...tailOctets].join(".");
|
|
14638
|
+
};
|
|
14639
|
+
var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
|
|
14640
|
+
var isIPv6Unspecified = (host) => {
|
|
14641
|
+
if (host === "::") return true;
|
|
14642
|
+
const compressionIndex = host.indexOf("::");
|
|
14643
|
+
if (compressionIndex !== -1) {
|
|
14644
|
+
if (compressionIndex !== host.lastIndexOf("::")) return false;
|
|
14645
|
+
const left = host.slice(0, compressionIndex);
|
|
14646
|
+
const right = host.slice(compressionIndex + 2);
|
|
14647
|
+
const leftGroups = left ? left.split(":") : [];
|
|
14648
|
+
const rightGroups = right ? right.split(":") : [];
|
|
14649
|
+
const explicitGroups = leftGroups.length + rightGroups.length;
|
|
14650
|
+
return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
|
|
14651
|
+
}
|
|
14652
|
+
const groups = host.split(":");
|
|
14653
|
+
return groups.length === 8 && groups.every(isIPv6ZeroGroup);
|
|
14654
|
+
};
|
|
13958
14655
|
var isIPv6Loopback = (host) => {
|
|
13959
14656
|
if (host === "::1") return true;
|
|
13960
14657
|
const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
|
|
@@ -13977,6 +14674,7 @@ var isLoopback = (host) => {
|
|
|
13977
14674
|
if (!host) return false;
|
|
13978
14675
|
if (LOOPBACK_HOSTNAMES.has(host)) return true;
|
|
13979
14676
|
if (isIPv4Loopback(host)) return true;
|
|
14677
|
+
if (isIPv6Unspecified(host)) return true;
|
|
13980
14678
|
return isIPv6Loopback(host);
|
|
13981
14679
|
};
|
|
13982
14680
|
var DEFAULT_PORTS2 = {
|
|
@@ -14022,6 +14720,40 @@ var unmapIPv4MappedIPv6 = (host) => {
|
|
|
14022
14720
|
}
|
|
14023
14721
|
return host;
|
|
14024
14722
|
};
|
|
14723
|
+
var IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/;
|
|
14724
|
+
var ipv4ToBytes = (host) => {
|
|
14725
|
+
const parts = host.split(".");
|
|
14726
|
+
return parts.length === 4 && parts.every((part) => IPV4_OCTET_RE.test(part) && Number(part) <= 255) ? parts.map(Number) : null;
|
|
14727
|
+
};
|
|
14728
|
+
var IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i;
|
|
14729
|
+
var ipv6ToBytes = (host) => {
|
|
14730
|
+
const halves = host.split("::");
|
|
14731
|
+
if (halves.length > 2) {
|
|
14732
|
+
return null;
|
|
14733
|
+
}
|
|
14734
|
+
const groups = halves[0] ? halves[0].split(":") : [];
|
|
14735
|
+
if (halves.length === 2) {
|
|
14736
|
+
const rear = halves[1] ? halves[1].split(":") : [];
|
|
14737
|
+
const missing = 8 - groups.length - rear.length;
|
|
14738
|
+
if (missing < 1) {
|
|
14739
|
+
return null;
|
|
14740
|
+
}
|
|
14741
|
+
groups.push(...new Array(missing).fill("0"), ...rear);
|
|
14742
|
+
}
|
|
14743
|
+
if (groups.length !== 8 || groups.some((group) => !IPV6_GROUP_RE.test(group))) {
|
|
14744
|
+
return null;
|
|
14745
|
+
}
|
|
14746
|
+
return groups.flatMap((group) => {
|
|
14747
|
+
const value = Number.parseInt(group, 16);
|
|
14748
|
+
return [value >> 8 & 255, value & 255];
|
|
14749
|
+
});
|
|
14750
|
+
};
|
|
14751
|
+
var ipToBytes = (host) => {
|
|
14752
|
+
if (typeof host !== "string" || !host) {
|
|
14753
|
+
return null;
|
|
14754
|
+
}
|
|
14755
|
+
return host.indexOf(":") !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host);
|
|
14756
|
+
};
|
|
14025
14757
|
var normalizeNoProxyHost = (hostname) => {
|
|
14026
14758
|
if (!hostname) {
|
|
14027
14759
|
return hostname;
|
|
@@ -14029,7 +14761,102 @@ var normalizeNoProxyHost = (hostname) => {
|
|
|
14029
14761
|
if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
|
|
14030
14762
|
hostname = hostname.slice(1, -1);
|
|
14031
14763
|
}
|
|
14032
|
-
|
|
14764
|
+
let trimmed = trimTrailingDots(hostname);
|
|
14765
|
+
if (trimmed.indexOf(":") !== -1) {
|
|
14766
|
+
try {
|
|
14767
|
+
trimmed = new URL("http://[" + trimmed + "]/").hostname.slice(1, -1);
|
|
14768
|
+
} catch (_err) {
|
|
14769
|
+
return trimmed;
|
|
14770
|
+
}
|
|
14771
|
+
} else if (/[\u0080-\uffff]/.test(trimmed)) {
|
|
14772
|
+
const prefix = /^[*.]+/.exec(trimmed);
|
|
14773
|
+
const start = prefix ? prefix[0] : "";
|
|
14774
|
+
const ascii = domainToASCII(trimmed.slice(start.length));
|
|
14775
|
+
if (!ascii) return "";
|
|
14776
|
+
trimmed = start + trimTrailingDots(ascii);
|
|
14777
|
+
}
|
|
14778
|
+
const ipv4 = normalizeIPAddress(trimmed);
|
|
14779
|
+
if (ipv4 !== trimmed) {
|
|
14780
|
+
return ipv4;
|
|
14781
|
+
}
|
|
14782
|
+
return unmapIPv4MappedIPv6(trimmed);
|
|
14783
|
+
};
|
|
14784
|
+
var normalizeCidrBase = (input) => {
|
|
14785
|
+
let base = input;
|
|
14786
|
+
const startsBracket = base.charAt(0) === "[";
|
|
14787
|
+
const endsBracket = base.charAt(base.length - 1) === "]";
|
|
14788
|
+
const hasBracket = base.includes("[") || base.includes("]");
|
|
14789
|
+
if (startsBracket || endsBracket) {
|
|
14790
|
+
if (!startsBracket || !endsBracket) {
|
|
14791
|
+
return null;
|
|
14792
|
+
}
|
|
14793
|
+
base = base.slice(1, -1);
|
|
14794
|
+
if (base.indexOf(":") === -1 || base.includes("[") || base.includes("]")) {
|
|
14795
|
+
return null;
|
|
14796
|
+
}
|
|
14797
|
+
} else if (hasBracket) {
|
|
14798
|
+
return null;
|
|
14799
|
+
}
|
|
14800
|
+
if (!base || base.charAt(base.length - 1) === ".") {
|
|
14801
|
+
return null;
|
|
14802
|
+
}
|
|
14803
|
+
const wasIPv6 = base.indexOf(":") !== -1;
|
|
14804
|
+
if (wasIPv6) {
|
|
14805
|
+
try {
|
|
14806
|
+
base = new URL(`http://[${base}]/`).hostname.slice(1, -1);
|
|
14807
|
+
} catch (_err) {
|
|
14808
|
+
return null;
|
|
14809
|
+
}
|
|
14810
|
+
} else {
|
|
14811
|
+
base = normalizeIPAddress(base);
|
|
14812
|
+
if (!ipv4ToBytes(base)) {
|
|
14813
|
+
return null;
|
|
14814
|
+
}
|
|
14815
|
+
}
|
|
14816
|
+
return { normalized: unmapIPv4MappedIPv6(base), wasIPv6 };
|
|
14817
|
+
};
|
|
14818
|
+
var CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/;
|
|
14819
|
+
var parseCidrEntry = (entry) => {
|
|
14820
|
+
if (entry.indexOf("/") === -1) {
|
|
14821
|
+
return void 0;
|
|
14822
|
+
}
|
|
14823
|
+
const match = CIDR_ENTRY_RE.exec(entry);
|
|
14824
|
+
if (!match) {
|
|
14825
|
+
return null;
|
|
14826
|
+
}
|
|
14827
|
+
let prefix = Number(match[2]);
|
|
14828
|
+
const parsedBase = normalizeCidrBase(match[1]);
|
|
14829
|
+
if (!parsedBase) {
|
|
14830
|
+
return null;
|
|
14831
|
+
}
|
|
14832
|
+
const { normalized, wasIPv6 } = parsedBase;
|
|
14833
|
+
if (wasIPv6 && normalized.indexOf(":") === -1) {
|
|
14834
|
+
if (prefix < 96) {
|
|
14835
|
+
return null;
|
|
14836
|
+
}
|
|
14837
|
+
prefix -= 96;
|
|
14838
|
+
}
|
|
14839
|
+
const bytes = ipToBytes(normalized);
|
|
14840
|
+
if (!bytes || prefix > bytes.length * 8) {
|
|
14841
|
+
return null;
|
|
14842
|
+
}
|
|
14843
|
+
return { bytes, prefix };
|
|
14844
|
+
};
|
|
14845
|
+
var isInSubnet = (addressBytes, networkBytes, prefix) => {
|
|
14846
|
+
const fullBytes = prefix >> 3;
|
|
14847
|
+
for (let i = 0; i < fullBytes; i++) {
|
|
14848
|
+
if (addressBytes[i] !== networkBytes[i]) {
|
|
14849
|
+
return false;
|
|
14850
|
+
}
|
|
14851
|
+
}
|
|
14852
|
+
const remainingBits = prefix & 7;
|
|
14853
|
+
if (remainingBits) {
|
|
14854
|
+
const mask = 255 << 8 - remainingBits & 255;
|
|
14855
|
+
if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) {
|
|
14856
|
+
return false;
|
|
14857
|
+
}
|
|
14858
|
+
}
|
|
14859
|
+
return true;
|
|
14033
14860
|
};
|
|
14034
14861
|
function shouldBypassProxy(location) {
|
|
14035
14862
|
let parsed;
|
|
@@ -14047,10 +14874,18 @@ function shouldBypassProxy(location) {
|
|
|
14047
14874
|
}
|
|
14048
14875
|
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
|
|
14049
14876
|
const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
14877
|
+
const hostnameBytes = ipToBytes(hostname);
|
|
14050
14878
|
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
14051
14879
|
if (!entry) {
|
|
14052
14880
|
return false;
|
|
14053
14881
|
}
|
|
14882
|
+
if (entry === "*") {
|
|
14883
|
+
return true;
|
|
14884
|
+
}
|
|
14885
|
+
const cidr = parseCidrEntry(entry);
|
|
14886
|
+
if (cidr !== void 0) {
|
|
14887
|
+
return cidr !== null && !!hostnameBytes && hostnameBytes.length === cidr.bytes.length && isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix);
|
|
14888
|
+
}
|
|
14054
14889
|
let [entryHost, entryPort] = parseNoProxyEntry(entry);
|
|
14055
14890
|
entryHost = normalizeNoProxyHost(entryHost);
|
|
14056
14891
|
if (!entryHost) {
|
|
@@ -14069,7 +14904,7 @@ function shouldBypassProxy(location) {
|
|
|
14069
14904
|
});
|
|
14070
14905
|
}
|
|
14071
14906
|
|
|
14072
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14907
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/speedometer.js
|
|
14073
14908
|
function speedometer(samplesCount, min) {
|
|
14074
14909
|
samplesCount = samplesCount || 10;
|
|
14075
14910
|
const bytes = new Array(samplesCount);
|
|
@@ -14105,7 +14940,7 @@ function speedometer(samplesCount, min) {
|
|
|
14105
14940
|
}
|
|
14106
14941
|
var speedometer_default = speedometer;
|
|
14107
14942
|
|
|
14108
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14943
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/throttle.js
|
|
14109
14944
|
function throttle(fn, freq) {
|
|
14110
14945
|
let timestamp = 0;
|
|
14111
14946
|
let threshold = 1e3 / freq;
|
|
@@ -14136,21 +14971,22 @@ function throttle(fn, freq) {
|
|
|
14136
14971
|
}
|
|
14137
14972
|
};
|
|
14138
14973
|
const flush = () => lastArgs && invoke(lastArgs);
|
|
14139
|
-
|
|
14974
|
+
const flushWith = (...args) => invoke(args);
|
|
14975
|
+
return [throttled, flush, flushWith];
|
|
14140
14976
|
}
|
|
14141
14977
|
var throttle_default = throttle;
|
|
14142
14978
|
|
|
14143
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14979
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/progressEventReducer.js
|
|
14144
14980
|
var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
14145
14981
|
let bytesNotified = 0;
|
|
14146
14982
|
const _speedometer = speedometer_default(50, 250);
|
|
14147
14983
|
return throttle_default((e) => {
|
|
14148
|
-
if (!e ||
|
|
14984
|
+
if (!e || !utils_default.isNumber(e.loaded)) {
|
|
14149
14985
|
return;
|
|
14150
14986
|
}
|
|
14151
14987
|
const rawLoaded = e.loaded;
|
|
14152
14988
|
const total = e.lengthComputable ? e.total : void 0;
|
|
14153
|
-
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
14989
|
+
const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
|
|
14154
14990
|
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
14155
14991
|
const rate = _speedometer(progressBytes);
|
|
14156
14992
|
bytesNotified = Math.max(bytesNotified, loaded);
|
|
@@ -14179,63 +15015,103 @@ var progressEventDecorator = (total, throttled) => {
|
|
|
14179
15015
|
throttled[1]
|
|
14180
15016
|
];
|
|
14181
15017
|
};
|
|
14182
|
-
var asyncDecorator = (fn) => (...args) =>
|
|
15018
|
+
var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args) => scheduler(() => fn(...args));
|
|
14183
15019
|
|
|
14184
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
14185
|
-
|
|
15020
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
|
15021
|
+
var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
|
|
15022
|
+
var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
15023
|
+
var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
|
|
15024
|
+
var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z
|
|
15025
|
+
charCode >= 97 && charCode <= 122 || // a-z
|
|
15026
|
+
charCode >= 48 && charCode <= 57 || // 0-9
|
|
15027
|
+
charCode === 43 || // +
|
|
15028
|
+
charCode === 47 || // /
|
|
15029
|
+
charCode === 45 || // - (base64url)
|
|
15030
|
+
charCode === 95;
|
|
15031
|
+
var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
|
|
15032
|
+
var base64Bytes = (significant) => {
|
|
15033
|
+
const groups = Math.floor(significant / 4);
|
|
15034
|
+
const remainder = significant % 4;
|
|
15035
|
+
return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
|
|
15036
|
+
};
|
|
15037
|
+
var estimateBase64BufferAllocation = (body) => {
|
|
15038
|
+
const len = body.length;
|
|
15039
|
+
let padding = 0;
|
|
15040
|
+
if (len > 0 && body.charCodeAt(len - 1) === 61) {
|
|
15041
|
+
padding++;
|
|
15042
|
+
if (len > 1 && body.charCodeAt(len - 2) === 61) {
|
|
15043
|
+
padding++;
|
|
15044
|
+
}
|
|
15045
|
+
}
|
|
15046
|
+
return Math.floor((len - padding) * 3 / 4);
|
|
15047
|
+
};
|
|
15048
|
+
var estimatePercentDecodedBase64BufferAllocation = (body) => {
|
|
15049
|
+
if (body.indexOf("%") === -1) {
|
|
15050
|
+
return estimateBase64BufferAllocation(body);
|
|
15051
|
+
}
|
|
15052
|
+
let length = 0;
|
|
15053
|
+
let previous = 0;
|
|
15054
|
+
let last = 0;
|
|
15055
|
+
for (let i = 0, len = body.length; i < len; i++) {
|
|
15056
|
+
let code = body.charCodeAt(i);
|
|
15057
|
+
if (code === 37 && isPercentEncodedByte(body, i, len)) {
|
|
15058
|
+
code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
|
|
15059
|
+
i += 2;
|
|
15060
|
+
}
|
|
15061
|
+
length++;
|
|
15062
|
+
previous = last;
|
|
15063
|
+
last = code;
|
|
15064
|
+
}
|
|
15065
|
+
const padding = last === 61 ? previous === 61 ? 2 : 1 : 0;
|
|
15066
|
+
return Math.floor((length - padding) * 3 / 4);
|
|
15067
|
+
};
|
|
15068
|
+
var estimatePercentDecodedBase64Bytes = (body) => {
|
|
15069
|
+
const len = body.length;
|
|
15070
|
+
let significant = 0;
|
|
15071
|
+
let padding = 0;
|
|
15072
|
+
let invalid = false;
|
|
15073
|
+
for (let i = 0; i < len; i++) {
|
|
15074
|
+
let code = body.charCodeAt(i);
|
|
15075
|
+
if (code === 37 && isPercentEncodedByte(body, i, len)) {
|
|
15076
|
+
code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
|
|
15077
|
+
i += 2;
|
|
15078
|
+
}
|
|
15079
|
+
if (isBase64Whitespace(code)) {
|
|
15080
|
+
continue;
|
|
15081
|
+
}
|
|
15082
|
+
if (code === 61) {
|
|
15083
|
+
padding++;
|
|
15084
|
+
continue;
|
|
15085
|
+
}
|
|
15086
|
+
if (!isBase64Char(code) || padding > 0) {
|
|
15087
|
+
invalid = true;
|
|
15088
|
+
continue;
|
|
15089
|
+
}
|
|
15090
|
+
significant++;
|
|
15091
|
+
}
|
|
15092
|
+
if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
|
|
15093
|
+
return estimateBase64BufferAllocation(body);
|
|
15094
|
+
}
|
|
15095
|
+
return base64Bytes(significant);
|
|
15096
|
+
};
|
|
15097
|
+
var estimateDataURLBytes = (url2, estimateBase64, base64Pattern) => {
|
|
14186
15098
|
if (!url2 || typeof url2 !== "string") return 0;
|
|
14187
|
-
if (
|
|
15099
|
+
if (!/^data:/i.test(url2)) return 0;
|
|
14188
15100
|
const comma = url2.indexOf(",");
|
|
14189
15101
|
if (comma < 0) return 0;
|
|
14190
15102
|
const meta = url2.slice(5, comma);
|
|
14191
15103
|
const body = url2.slice(comma + 1);
|
|
14192
|
-
const isBase64 =
|
|
15104
|
+
const isBase64 = base64Pattern.test(meta);
|
|
14193
15105
|
if (isBase64) {
|
|
14194
|
-
|
|
14195
|
-
const len = body.length;
|
|
14196
|
-
for (let i = 0; i < len; i++) {
|
|
14197
|
-
if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
14198
|
-
const a = body.charCodeAt(i + 1);
|
|
14199
|
-
const b = body.charCodeAt(i + 2);
|
|
14200
|
-
const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
|
|
14201
|
-
if (isHex) {
|
|
14202
|
-
effectiveLen -= 2;
|
|
14203
|
-
i += 2;
|
|
14204
|
-
}
|
|
14205
|
-
}
|
|
14206
|
-
}
|
|
14207
|
-
let pad = 0;
|
|
14208
|
-
let idx = len - 1;
|
|
14209
|
-
const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%'
|
|
14210
|
-
body.charCodeAt(j - 1) === 51 && // '3'
|
|
14211
|
-
(body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
|
|
14212
|
-
if (idx >= 0) {
|
|
14213
|
-
if (body.charCodeAt(idx) === 61) {
|
|
14214
|
-
pad++;
|
|
14215
|
-
idx--;
|
|
14216
|
-
} else if (tailIsPct3D(idx)) {
|
|
14217
|
-
pad++;
|
|
14218
|
-
idx -= 3;
|
|
14219
|
-
}
|
|
14220
|
-
}
|
|
14221
|
-
if (pad === 1 && idx >= 0) {
|
|
14222
|
-
if (body.charCodeAt(idx) === 61) {
|
|
14223
|
-
pad++;
|
|
14224
|
-
} else if (tailIsPct3D(idx)) {
|
|
14225
|
-
pad++;
|
|
14226
|
-
}
|
|
14227
|
-
}
|
|
14228
|
-
const groups = Math.floor(effectiveLen / 4);
|
|
14229
|
-
const bytes2 = groups * 3 - (pad || 0);
|
|
14230
|
-
return bytes2 > 0 ? bytes2 : 0;
|
|
14231
|
-
}
|
|
14232
|
-
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
|
|
14233
|
-
return Buffer.byteLength(body, "utf8");
|
|
15106
|
+
return estimateBase64(body);
|
|
14234
15107
|
}
|
|
14235
15108
|
let bytes = 0;
|
|
14236
15109
|
for (let i = 0, len = body.length; i < len; i++) {
|
|
14237
15110
|
const c = body.charCodeAt(i);
|
|
14238
|
-
if (c
|
|
15111
|
+
if (c === 37 && isPercentEncodedByte(body, i, len)) {
|
|
15112
|
+
bytes += 1;
|
|
15113
|
+
i += 2;
|
|
15114
|
+
} else if (c < 128) {
|
|
14239
15115
|
bytes += 1;
|
|
14240
15116
|
} else if (c < 2048) {
|
|
14241
15117
|
bytes += 2;
|
|
@@ -14252,9 +15128,20 @@ function estimateDataURLDecodedBytes(url2) {
|
|
|
14252
15128
|
}
|
|
14253
15129
|
}
|
|
14254
15130
|
return bytes;
|
|
15131
|
+
};
|
|
15132
|
+
function estimateDataURLDecodedBytes(url2) {
|
|
15133
|
+
const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1;
|
|
15134
|
+
return estimateDataURLBytes(
|
|
15135
|
+
fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex),
|
|
15136
|
+
estimatePercentDecodedBase64Bytes,
|
|
15137
|
+
/; *base64[\t\n\f\r ]*$/i
|
|
15138
|
+
);
|
|
15139
|
+
}
|
|
15140
|
+
function estimateDataURLBufferAllocation(url2) {
|
|
15141
|
+
return estimateDataURLBytes(url2, estimatePercentDecodedBase64BufferAllocation, /;base64$/i);
|
|
14255
15142
|
}
|
|
14256
15143
|
|
|
14257
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
15144
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
|
|
14258
15145
|
var zlibOptions = {
|
|
14259
15146
|
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
14260
15147
|
finishFlush: zlib.constants.Z_SYNC_FLUSH
|
|
@@ -14263,26 +15150,112 @@ var brotliOptions = {
|
|
|
14263
15150
|
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
14264
15151
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
14265
15152
|
};
|
|
15153
|
+
var zstdOptions = {
|
|
15154
|
+
flush: zlib.constants.ZSTD_e_flush,
|
|
15155
|
+
finishFlush: zlib.constants.ZSTD_e_flush
|
|
15156
|
+
};
|
|
14266
15157
|
var isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress);
|
|
15158
|
+
var isZstdSupported = utils_default.isFunction(zlib.createZstdDecompress);
|
|
15159
|
+
var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
|
|
15160
|
+
var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
|
|
15161
|
+
var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils_default.asap;
|
|
14267
15162
|
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
14268
15163
|
var isHttps = /https:?/;
|
|
14269
|
-
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
14270
|
-
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
14271
|
-
if (policy !== "content-only") {
|
|
14272
|
-
headers.set(formHeaders);
|
|
14273
|
-
return;
|
|
14274
|
-
}
|
|
14275
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
14276
|
-
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
14277
|
-
headers.set(key, val);
|
|
14278
|
-
}
|
|
14279
|
-
});
|
|
14280
|
-
}
|
|
14281
15164
|
var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
|
|
14282
15165
|
var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
|
|
15166
|
+
function handleSocketError(err) {
|
|
15167
|
+
const current = this[kAxiosCurrentReq];
|
|
15168
|
+
if (current && !current.destroyed) {
|
|
15169
|
+
current.destroy(err);
|
|
15170
|
+
}
|
|
15171
|
+
}
|
|
14283
15172
|
var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
|
|
14284
15173
|
var tunnelingAgentCache = /* @__PURE__ */ new Map();
|
|
14285
15174
|
var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
|
|
15175
|
+
var directAgents = /* @__PURE__ */ new WeakMap();
|
|
15176
|
+
var directAgentHooks = ["createConnection", "getName"];
|
|
15177
|
+
var nativeAgentPoolHooks = [
|
|
15178
|
+
"addRequest",
|
|
15179
|
+
"createSocket",
|
|
15180
|
+
"removeSocket",
|
|
15181
|
+
"keepSocketAlive",
|
|
15182
|
+
"reuseSocket",
|
|
15183
|
+
"_getSession",
|
|
15184
|
+
"_cacheSession",
|
|
15185
|
+
"_evictSession"
|
|
15186
|
+
];
|
|
15187
|
+
var NODE_NATIVE_ENV_PROXY_SUPPORT = {
|
|
15188
|
+
22: 21,
|
|
15189
|
+
24: 5
|
|
15190
|
+
};
|
|
15191
|
+
function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
|
|
15192
|
+
if (!nodeVersion) {
|
|
15193
|
+
return false;
|
|
15194
|
+
}
|
|
15195
|
+
const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
|
|
15196
|
+
if (!Number.isInteger(major) || !Number.isInteger(minor)) {
|
|
15197
|
+
return false;
|
|
15198
|
+
}
|
|
15199
|
+
if (major > 24) {
|
|
15200
|
+
return true;
|
|
15201
|
+
}
|
|
15202
|
+
return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
|
|
15203
|
+
}
|
|
15204
|
+
function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
|
|
15205
|
+
if (!isNodeNativeEnvProxySupported(nodeVersion)) {
|
|
15206
|
+
return false;
|
|
15207
|
+
}
|
|
15208
|
+
const agentOptions = agent && agent.options;
|
|
15209
|
+
return Boolean(
|
|
15210
|
+
agentOptions && utils_default.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null
|
|
15211
|
+
);
|
|
15212
|
+
}
|
|
15213
|
+
function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
|
|
15214
|
+
return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
|
|
15215
|
+
}
|
|
15216
|
+
function getDirectAgent(configuredAgent, transport) {
|
|
15217
|
+
if (!process.allowedNodeEnvironmentFlags || !process.allowedNodeEnvironmentFlags.has("--use-env-proxy")) {
|
|
15218
|
+
return configuredAgent;
|
|
15219
|
+
}
|
|
15220
|
+
const agent = configuredAgent || transport.globalAgent;
|
|
15221
|
+
const options = agent && agent.options;
|
|
15222
|
+
if (!(agent instanceof transport.Agent) || agent.protocol !== transport.globalAgent.protocol || !options || !utils_default.hasOwnProp(options, "proxyEnv") || typeof options.proxyEnv !== "object" || options.proxyEnv === null) {
|
|
15223
|
+
return configuredAgent;
|
|
15224
|
+
}
|
|
15225
|
+
for (const hook of nativeAgentPoolHooks) {
|
|
15226
|
+
if (utils_default.isFunction(transport.Agent.prototype[hook]) && agent[hook] !== transport.Agent.prototype[hook]) {
|
|
15227
|
+
throw new AxiosError_default(
|
|
15228
|
+
"proxy: false cannot adapt an agent overriding " + hook + "; use an agent constructed without proxyEnv",
|
|
15229
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE
|
|
15230
|
+
);
|
|
15231
|
+
}
|
|
15232
|
+
}
|
|
15233
|
+
let direct = directAgents.get(agent);
|
|
15234
|
+
if (!direct) {
|
|
15235
|
+
direct = new transport.Agent({ ...options, proxyEnv: void 0 });
|
|
15236
|
+
const destroy = agent.destroy;
|
|
15237
|
+
agent.destroy = function destroyWithDirectAgent() {
|
|
15238
|
+
try {
|
|
15239
|
+
return destroy.apply(this, arguments);
|
|
15240
|
+
} finally {
|
|
15241
|
+
direct.destroy();
|
|
15242
|
+
}
|
|
15243
|
+
};
|
|
15244
|
+
directAgents.set(agent, direct);
|
|
15245
|
+
}
|
|
15246
|
+
for (const hook of directAgentHooks) {
|
|
15247
|
+
direct[hook] = agent[hook] === transport.Agent.prototype[hook] ? transport.Agent.prototype[hook] : bind(agent[hook], agent);
|
|
15248
|
+
}
|
|
15249
|
+
return direct;
|
|
15250
|
+
}
|
|
15251
|
+
function setDirectAgent(options, configHttpAgent, configHttpsAgent) {
|
|
15252
|
+
const secure = isHttps.test(options.protocol);
|
|
15253
|
+
const agent = getDirectAgent(secure ? configHttpsAgent : configHttpAgent, secure ? https : http);
|
|
15254
|
+
options.agent = agent;
|
|
15255
|
+
if (options.agents) {
|
|
15256
|
+
options.agents[secure ? "https" : "http"] = agent;
|
|
15257
|
+
}
|
|
15258
|
+
}
|
|
14286
15259
|
function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
14287
15260
|
const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
|
|
14288
15261
|
const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
|
|
@@ -14290,6 +15263,12 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
|
14290
15263
|
if (agent) return agent;
|
|
14291
15264
|
const merged = userHttpsAgent && userHttpsAgent.options ? { ...userHttpsAgent.options, ...agentOptions } : agentOptions;
|
|
14292
15265
|
agent = new import_https_proxy_agent.default(merged);
|
|
15266
|
+
const callback = agent.callback;
|
|
15267
|
+
agent.callback = function axiosTunnelingAgentCallback(req, opts) {
|
|
15268
|
+
const originTLSAgent = userHttpsAgent || https.globalAgent;
|
|
15269
|
+
const originTLSOptions = originTLSAgent && originTLSAgent.options;
|
|
15270
|
+
return callback.call(this, req, { ...originTLSOptions, ...opts });
|
|
15271
|
+
};
|
|
14293
15272
|
agent[kAxiosInstalledTunnel] = true;
|
|
14294
15273
|
cache.set(key, agent);
|
|
14295
15274
|
return agent;
|
|
@@ -14311,90 +15290,52 @@ var flushOnFinish = (stream4, [throttled, flush]) => {
|
|
|
14311
15290
|
stream4.on("end", flush).on("error", flush);
|
|
14312
15291
|
return throttled;
|
|
14313
15292
|
};
|
|
14314
|
-
var
|
|
14315
|
-
constructor() {
|
|
14316
|
-
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
14317
|
-
}
|
|
14318
|
-
getSession(authority, options) {
|
|
14319
|
-
options = Object.assign(
|
|
14320
|
-
{
|
|
14321
|
-
sessionTimeout: 1e3
|
|
14322
|
-
},
|
|
14323
|
-
options
|
|
14324
|
-
);
|
|
14325
|
-
let authoritySessions = this.sessions[authority];
|
|
14326
|
-
if (authoritySessions) {
|
|
14327
|
-
let len = authoritySessions.length;
|
|
14328
|
-
for (let i = 0; i < len; i++) {
|
|
14329
|
-
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
14330
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
|
|
14331
|
-
return sessionHandle;
|
|
14332
|
-
}
|
|
14333
|
-
}
|
|
14334
|
-
}
|
|
14335
|
-
const session = http2.connect(authority, options);
|
|
14336
|
-
let removed;
|
|
14337
|
-
const removeSession = () => {
|
|
14338
|
-
if (removed) {
|
|
14339
|
-
return;
|
|
14340
|
-
}
|
|
14341
|
-
removed = true;
|
|
14342
|
-
let entries = authoritySessions, len = entries.length, i = len;
|
|
14343
|
-
while (i--) {
|
|
14344
|
-
if (entries[i][0] === session) {
|
|
14345
|
-
if (len === 1) {
|
|
14346
|
-
delete this.sessions[authority];
|
|
14347
|
-
} else {
|
|
14348
|
-
entries.splice(i, 1);
|
|
14349
|
-
}
|
|
14350
|
-
if (!session.closed) {
|
|
14351
|
-
session.close();
|
|
14352
|
-
}
|
|
14353
|
-
return;
|
|
14354
|
-
}
|
|
14355
|
-
}
|
|
14356
|
-
};
|
|
14357
|
-
const originalRequestFn = session.request;
|
|
14358
|
-
const { sessionTimeout } = options;
|
|
14359
|
-
if (sessionTimeout != null) {
|
|
14360
|
-
let timer;
|
|
14361
|
-
let streamsCount = 0;
|
|
14362
|
-
session.request = function() {
|
|
14363
|
-
const stream4 = originalRequestFn.apply(this, arguments);
|
|
14364
|
-
streamsCount++;
|
|
14365
|
-
if (timer) {
|
|
14366
|
-
clearTimeout(timer);
|
|
14367
|
-
timer = null;
|
|
14368
|
-
}
|
|
14369
|
-
stream4.once("close", () => {
|
|
14370
|
-
if (!--streamsCount) {
|
|
14371
|
-
timer = setTimeout(() => {
|
|
14372
|
-
timer = null;
|
|
14373
|
-
removeSession();
|
|
14374
|
-
}, sessionTimeout);
|
|
14375
|
-
}
|
|
14376
|
-
});
|
|
14377
|
-
return stream4;
|
|
14378
|
-
};
|
|
14379
|
-
}
|
|
14380
|
-
session.once("close", removeSession);
|
|
14381
|
-
let entry = [session, options];
|
|
14382
|
-
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
14383
|
-
return session;
|
|
14384
|
-
}
|
|
14385
|
-
};
|
|
14386
|
-
var http2Sessions = new Http2Sessions();
|
|
15293
|
+
var http2Sessions = new Http2Sessions_default();
|
|
14387
15294
|
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
|
|
15295
|
+
if (!isSameOriginRedirect(options, requestDetails)) {
|
|
15296
|
+
stripMatchingHeaders(options.headers, /* @__PURE__ */ new Set(["authorization", "cookie"]));
|
|
15297
|
+
delete options.auth;
|
|
15298
|
+
}
|
|
14388
15299
|
if (options.beforeRedirects.proxy) {
|
|
14389
15300
|
options.beforeRedirects.proxy(options);
|
|
14390
15301
|
}
|
|
15302
|
+
if (options.beforeRedirects.auth) {
|
|
15303
|
+
options.beforeRedirects.auth(options);
|
|
15304
|
+
}
|
|
15305
|
+
if (options.beforeRedirects.sensitiveHeaders) {
|
|
15306
|
+
options.beforeRedirects.sensitiveHeaders(options, requestDetails);
|
|
15307
|
+
}
|
|
15308
|
+
if (options.beforeRedirects.direct) {
|
|
15309
|
+
options.beforeRedirects.direct(options);
|
|
15310
|
+
}
|
|
14391
15311
|
if (options.beforeRedirects.config) {
|
|
14392
15312
|
options.beforeRedirects.config(options, responseDetails, requestDetails);
|
|
14393
15313
|
}
|
|
14394
15314
|
}
|
|
14395
|
-
function
|
|
15315
|
+
function stripMatchingHeaders(headers, sensitiveSet) {
|
|
15316
|
+
if (!headers) {
|
|
15317
|
+
return;
|
|
15318
|
+
}
|
|
15319
|
+
Object.keys(headers).forEach((header) => {
|
|
15320
|
+
if (sensitiveSet.has(header.toLowerCase())) {
|
|
15321
|
+
delete headers[header];
|
|
15322
|
+
}
|
|
15323
|
+
});
|
|
15324
|
+
}
|
|
15325
|
+
function isSameOriginRedirect(redirectOptions, requestDetails) {
|
|
15326
|
+
if (!requestDetails) {
|
|
15327
|
+
return false;
|
|
15328
|
+
}
|
|
15329
|
+
try {
|
|
15330
|
+
return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
|
|
15331
|
+
} catch (e) {
|
|
15332
|
+
return false;
|
|
15333
|
+
}
|
|
15334
|
+
}
|
|
15335
|
+
function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent, allowEnvProxy = true) {
|
|
14396
15336
|
let proxy = configProxy;
|
|
14397
|
-
|
|
15337
|
+
const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
|
|
15338
|
+
if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
|
|
14398
15339
|
const proxyUrl = getProxyForUrl(location);
|
|
14399
15340
|
if (proxyUrl) {
|
|
14400
15341
|
if (!shouldBypassProxy(location)) {
|
|
@@ -14412,6 +15353,9 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
|
|
|
14412
15353
|
if (isRedirect && options.agent && options.agent[kAxiosInstalledTunnel]) {
|
|
14413
15354
|
options.agent = void 0;
|
|
14414
15355
|
}
|
|
15356
|
+
if (isRedirect && options.agents && options.agents.https && options.agents.https[kAxiosInstalledTunnel]) {
|
|
15357
|
+
options.agents.https = configHttpsAgent;
|
|
15358
|
+
}
|
|
14415
15359
|
if (proxy) {
|
|
14416
15360
|
const isProxyURL = proxy instanceof URL;
|
|
14417
15361
|
const readProxyField = (key) => isProxyURL || utils_default.hasOwnProp(proxy, key) ? proxy[key] : void 0;
|
|
@@ -14485,8 +15429,19 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
|
|
|
14485
15429
|
}
|
|
14486
15430
|
}
|
|
14487
15431
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
14488
|
-
setProxy(
|
|
15432
|
+
setProxy(
|
|
15433
|
+
redirectOptions,
|
|
15434
|
+
configProxy,
|
|
15435
|
+
redirectOptions.href,
|
|
15436
|
+
true,
|
|
15437
|
+
configHttpsAgent,
|
|
15438
|
+
configHttpAgent,
|
|
15439
|
+
allowEnvProxy
|
|
15440
|
+
);
|
|
14489
15441
|
};
|
|
15442
|
+
return Boolean(
|
|
15443
|
+
proxy || configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent)
|
|
15444
|
+
);
|
|
14490
15445
|
}
|
|
14491
15446
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
14492
15447
|
var wrapAsync = (asyncExecutor) => {
|
|
@@ -14511,7 +15466,7 @@ var wrapAsync = (asyncExecutor) => {
|
|
|
14511
15466
|
};
|
|
14512
15467
|
var resolveFamily = ({ address, family }) => {
|
|
14513
15468
|
if (!utils_default.isString(address)) {
|
|
14514
|
-
throw
|
|
15469
|
+
throw new AxiosError_default("address must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
14515
15470
|
}
|
|
14516
15471
|
return {
|
|
14517
15472
|
address,
|
|
@@ -14519,12 +15474,36 @@ var resolveFamily = ({ address, family }) => {
|
|
|
14519
15474
|
};
|
|
14520
15475
|
};
|
|
14521
15476
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
15477
|
+
var normalizedLookupCache = /* @__PURE__ */ new WeakMap();
|
|
15478
|
+
var normalizeLookup = (lookup) => {
|
|
15479
|
+
let normalized = normalizedLookupCache.get(lookup);
|
|
15480
|
+
if (normalized) {
|
|
15481
|
+
return normalized;
|
|
15482
|
+
}
|
|
15483
|
+
const callbackLookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
15484
|
+
normalized = (hostname, opt, cb) => {
|
|
15485
|
+
callbackLookup(hostname, opt, (err, arg0, arg1) => {
|
|
15486
|
+
if (err) {
|
|
15487
|
+
return cb(err);
|
|
15488
|
+
}
|
|
15489
|
+
let addresses;
|
|
15490
|
+
try {
|
|
15491
|
+
addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
15492
|
+
} catch (error) {
|
|
15493
|
+
return cb(error);
|
|
15494
|
+
}
|
|
15495
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
15496
|
+
});
|
|
15497
|
+
};
|
|
15498
|
+
normalizedLookupCache.set(lookup, normalized);
|
|
15499
|
+
return normalized;
|
|
15500
|
+
};
|
|
14522
15501
|
var http2Transport = {
|
|
14523
15502
|
request(options, cb) {
|
|
14524
15503
|
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
14525
15504
|
const { http2Options, headers } = options;
|
|
14526
15505
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
14527
|
-
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } =
|
|
15506
|
+
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http22.constants;
|
|
14528
15507
|
const http2Headers = {
|
|
14529
15508
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
14530
15509
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -14548,39 +15527,56 @@ var http2Transport = {
|
|
|
14548
15527
|
};
|
|
14549
15528
|
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
14550
15529
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
14551
|
-
const own2 = (key) => utils_default.
|
|
15530
|
+
const own2 = (key) => utils_default.getSafeProp(config, key);
|
|
15531
|
+
const transitional2 = own2("transitional") || transitional_default;
|
|
14552
15532
|
let data = own2("data");
|
|
14553
15533
|
let lookup = own2("lookup");
|
|
14554
15534
|
let family = own2("family");
|
|
14555
15535
|
let httpVersion = own2("httpVersion");
|
|
14556
15536
|
if (httpVersion === void 0) httpVersion = 1;
|
|
15537
|
+
const rawHttpVersion = httpVersion;
|
|
14557
15538
|
let http2Options = own2("http2Options");
|
|
15539
|
+
const configProxy = own2("proxy");
|
|
15540
|
+
const httpAgent = own2("httpAgent");
|
|
15541
|
+
const httpsAgent = own2("httpsAgent");
|
|
14558
15542
|
const responseType = own2("responseType");
|
|
14559
15543
|
const responseEncoding = own2("responseEncoding");
|
|
14560
|
-
const
|
|
15544
|
+
const socketPath = own2("socketPath");
|
|
15545
|
+
const method = own2("method").toUpperCase();
|
|
15546
|
+
const maxRedirects = own2("maxRedirects");
|
|
15547
|
+
const maxBodyLength = own2("maxBodyLength");
|
|
15548
|
+
const maxContentLength = own2("maxContentLength");
|
|
15549
|
+
const decompress = own2("decompress");
|
|
14561
15550
|
let isDone;
|
|
14562
15551
|
let rejected = false;
|
|
14563
15552
|
let req;
|
|
14564
15553
|
let connectPhaseTimer;
|
|
14565
|
-
|
|
15554
|
+
try {
|
|
15555
|
+
httpVersion = +httpVersion;
|
|
15556
|
+
} catch (err) {
|
|
15557
|
+
throw new AxiosError_default(
|
|
15558
|
+
"Invalid protocol version: value is not a number",
|
|
15559
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
15560
|
+
config
|
|
15561
|
+
);
|
|
15562
|
+
}
|
|
14566
15563
|
if (Number.isNaN(httpVersion)) {
|
|
14567
|
-
throw
|
|
15564
|
+
throw new AxiosError_default(
|
|
15565
|
+
`Invalid protocol version: '${rawHttpVersion}' is not a number`,
|
|
15566
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
15567
|
+
config
|
|
15568
|
+
);
|
|
14568
15569
|
}
|
|
14569
15570
|
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
14570
|
-
throw
|
|
15571
|
+
throw new AxiosError_default(
|
|
15572
|
+
`Unsupported protocol version '${httpVersion}'`,
|
|
15573
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
15574
|
+
config
|
|
15575
|
+
);
|
|
14571
15576
|
}
|
|
14572
15577
|
const isHttp2 = httpVersion === 2;
|
|
14573
15578
|
if (lookup) {
|
|
14574
|
-
|
|
14575
|
-
lookup = (hostname, opt, cb) => {
|
|
14576
|
-
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
14577
|
-
if (err) {
|
|
14578
|
-
return cb(err);
|
|
14579
|
-
}
|
|
14580
|
-
const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
14581
|
-
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
14582
|
-
});
|
|
14583
|
-
};
|
|
15579
|
+
lookup = normalizeLookup(lookup);
|
|
14584
15580
|
}
|
|
14585
15581
|
const abortEmitter = new EventEmitter();
|
|
14586
15582
|
function abort(reason) {
|
|
@@ -14590,7 +15586,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14590
15586
|
!reason || reason.type ? new CanceledError_default(null, config, req) : reason
|
|
14591
15587
|
);
|
|
14592
15588
|
} catch (err) {
|
|
14593
|
-
console.warn("emit error", err);
|
|
14594
15589
|
}
|
|
14595
15590
|
}
|
|
14596
15591
|
function clearConnectPhaseTimer() {
|
|
@@ -14600,10 +15595,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14600
15595
|
}
|
|
14601
15596
|
}
|
|
14602
15597
|
function createTimeoutError() {
|
|
14603
|
-
|
|
14604
|
-
|
|
14605
|
-
|
|
14606
|
-
|
|
15598
|
+
const configTimeout = own2("timeout");
|
|
15599
|
+
let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
|
|
15600
|
+
const configTimeoutErrorMessage = own2("timeoutErrorMessage");
|
|
15601
|
+
if (configTimeoutErrorMessage) {
|
|
15602
|
+
timeoutErrorMessage = configTimeoutErrorMessage;
|
|
14607
15603
|
}
|
|
14608
15604
|
return new AxiosError_default(
|
|
14609
15605
|
timeoutErrorMessage,
|
|
@@ -14647,17 +15643,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14647
15643
|
onFinished();
|
|
14648
15644
|
}
|
|
14649
15645
|
});
|
|
14650
|
-
const fullPath = buildFullPath(
|
|
14651
|
-
const
|
|
15646
|
+
const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
|
|
15647
|
+
const urlBase = socketPath ? "http://localhost" : platform_default.hasBrowserEnv ? platform_default.origin : void 0;
|
|
15648
|
+
const parsed = new URL(fullPath, urlBase);
|
|
14652
15649
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
14653
15650
|
if (protocol === "data:") {
|
|
14654
|
-
if (
|
|
14655
|
-
const dataUrl = String(
|
|
14656
|
-
const estimated =
|
|
14657
|
-
if (estimated >
|
|
15651
|
+
if (maxContentLength > -1) {
|
|
15652
|
+
const dataUrl = String(own2("url") || fullPath || "");
|
|
15653
|
+
const estimated = estimateDataURLBufferAllocation(dataUrl);
|
|
15654
|
+
if (estimated > maxContentLength) {
|
|
14658
15655
|
return reject(
|
|
14659
15656
|
new AxiosError_default(
|
|
14660
|
-
"maxContentLength size of " +
|
|
15657
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
14661
15658
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
14662
15659
|
config
|
|
14663
15660
|
)
|
|
@@ -14674,12 +15671,21 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14674
15671
|
});
|
|
14675
15672
|
}
|
|
14676
15673
|
try {
|
|
14677
|
-
convertedData = fromDataURI(
|
|
15674
|
+
convertedData = fromDataURI(own2("url"), responseType === "blob", {
|
|
14678
15675
|
Blob: config.env && config.env.Blob
|
|
14679
15676
|
});
|
|
14680
15677
|
} catch (err) {
|
|
14681
15678
|
throw AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config);
|
|
14682
15679
|
}
|
|
15680
|
+
if (maxContentLength > -1 && (responseType === "blob" ? convertedData.size : convertedData.length) > maxContentLength) {
|
|
15681
|
+
return reject(
|
|
15682
|
+
new AxiosError_default(
|
|
15683
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
15684
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
15685
|
+
config
|
|
15686
|
+
)
|
|
15687
|
+
);
|
|
15688
|
+
}
|
|
14683
15689
|
if (responseType === "text") {
|
|
14684
15690
|
convertedData = convertedData.toString(responseEncoding);
|
|
14685
15691
|
if (!responseEncoding || responseEncoding === "utf8") {
|
|
@@ -14723,7 +15729,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14723
15729
|
setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
|
|
14724
15730
|
if (!headers.hasContentLength()) {
|
|
14725
15731
|
try {
|
|
14726
|
-
const knownLength = await
|
|
15732
|
+
const knownLength = await util3.promisify(data.getLength).call(data);
|
|
14727
15733
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
14728
15734
|
} catch (e) {
|
|
14729
15735
|
}
|
|
@@ -14748,7 +15754,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14748
15754
|
);
|
|
14749
15755
|
}
|
|
14750
15756
|
headers.setContentLength(data.length, false);
|
|
14751
|
-
if (
|
|
15757
|
+
if (maxBodyLength > -1 && data.length > maxBodyLength) {
|
|
14752
15758
|
return reject(
|
|
14753
15759
|
new AxiosError_default(
|
|
14754
15760
|
"Request body larger than maxBodyLength limit",
|
|
@@ -14784,7 +15790,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14784
15790
|
data,
|
|
14785
15791
|
progressEventDecorator(
|
|
14786
15792
|
contentLength,
|
|
14787
|
-
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
|
15793
|
+
progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3)
|
|
14788
15794
|
)
|
|
14789
15795
|
)
|
|
14790
15796
|
);
|
|
@@ -14792,11 +15798,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14792
15798
|
let auth = void 0;
|
|
14793
15799
|
const configAuth = own2("auth");
|
|
14794
15800
|
if (configAuth) {
|
|
14795
|
-
const username = configAuth
|
|
14796
|
-
const password = configAuth
|
|
15801
|
+
const username = utils_default.getSafeProp(configAuth, "username") || "";
|
|
15802
|
+
const password = utils_default.getSafeProp(configAuth, "password") || "";
|
|
14797
15803
|
auth = username + ":" + password;
|
|
14798
15804
|
}
|
|
14799
|
-
if (!auth && parsed.username) {
|
|
15805
|
+
if (!auth && (parsed.username || parsed.password)) {
|
|
14800
15806
|
const urlUsername = decodeURIComponentSafe(parsed.username);
|
|
14801
15807
|
const urlPassword = decodeURIComponentSafe(parsed.password);
|
|
14802
15808
|
auth = urlUsername + ":" + urlPassword;
|
|
@@ -14806,96 +15812,168 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14806
15812
|
try {
|
|
14807
15813
|
path = buildURL(
|
|
14808
15814
|
parsed.pathname + parsed.search,
|
|
14809
|
-
|
|
14810
|
-
|
|
15815
|
+
own2("params"),
|
|
15816
|
+
own2("paramsSerializer")
|
|
14811
15817
|
).replace(/^\?/, "");
|
|
14812
15818
|
} catch (err) {
|
|
14813
|
-
|
|
14814
|
-
|
|
14815
|
-
|
|
14816
|
-
|
|
14817
|
-
|
|
15819
|
+
return reject(
|
|
15820
|
+
AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config, null, null, {
|
|
15821
|
+
url: own2("url"),
|
|
15822
|
+
exists: true
|
|
15823
|
+
})
|
|
15824
|
+
);
|
|
14818
15825
|
}
|
|
14819
15826
|
headers.set(
|
|
14820
15827
|
"Accept-Encoding",
|
|
14821
|
-
|
|
15828
|
+
utils_default.hasOwnProp(transitional2, "advertiseZstdAcceptEncoding") && transitional2.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING,
|
|
14822
15829
|
false
|
|
14823
15830
|
);
|
|
15831
|
+
if (isHttp2 && lookup) {
|
|
15832
|
+
http2Options = Object.assign(/* @__PURE__ */ Object.create(null), http2Options, { lookup });
|
|
15833
|
+
}
|
|
14824
15834
|
const options = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
14825
15835
|
path,
|
|
14826
15836
|
method,
|
|
14827
15837
|
headers: toByteStringHeaderObject(headers),
|
|
14828
|
-
agents: { http:
|
|
15838
|
+
agents: { http: httpAgent, https: httpsAgent },
|
|
14829
15839
|
auth,
|
|
14830
15840
|
protocol,
|
|
14831
15841
|
family,
|
|
14832
15842
|
beforeRedirect: dispatchBeforeRedirect,
|
|
14833
15843
|
beforeRedirects: /* @__PURE__ */ Object.create(null),
|
|
14834
|
-
http2Options
|
|
15844
|
+
http2Options,
|
|
15845
|
+
createConnection: void 0
|
|
14835
15846
|
});
|
|
14836
15847
|
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
14837
|
-
|
|
14838
|
-
|
|
15848
|
+
let proxyApplied = false;
|
|
15849
|
+
if (socketPath) {
|
|
15850
|
+
if (typeof socketPath !== "string") {
|
|
14839
15851
|
return reject(
|
|
14840
15852
|
new AxiosError_default("socketPath must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE, config)
|
|
14841
15853
|
);
|
|
14842
15854
|
}
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
const
|
|
15855
|
+
const allowedSocketPaths = own2("allowedSocketPaths");
|
|
15856
|
+
if (allowedSocketPaths != null) {
|
|
15857
|
+
const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
|
|
15858
|
+
const resolvedSocket = resolvePath(socketPath);
|
|
14846
15859
|
const isAllowed = allowed.some(
|
|
14847
15860
|
(entry) => typeof entry === "string" && resolvePath(entry) === resolvedSocket
|
|
14848
15861
|
);
|
|
14849
15862
|
if (!isAllowed) {
|
|
14850
15863
|
return reject(
|
|
14851
15864
|
new AxiosError_default(
|
|
14852
|
-
`socketPath "${
|
|
15865
|
+
`socketPath "${socketPath}" is not permitted by allowedSocketPaths`,
|
|
14853
15866
|
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
14854
15867
|
config
|
|
14855
15868
|
)
|
|
14856
15869
|
);
|
|
14857
15870
|
}
|
|
14858
15871
|
}
|
|
14859
|
-
options.socketPath =
|
|
15872
|
+
options.socketPath = socketPath;
|
|
14860
15873
|
} else {
|
|
14861
15874
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
14862
15875
|
options.port = parsed.port;
|
|
14863
|
-
setProxy(
|
|
15876
|
+
proxyApplied = setProxy(
|
|
14864
15877
|
options,
|
|
14865
|
-
|
|
15878
|
+
configProxy,
|
|
14866
15879
|
protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path,
|
|
14867
15880
|
false,
|
|
14868
|
-
|
|
15881
|
+
httpsAgent,
|
|
15882
|
+
httpAgent,
|
|
15883
|
+
// The HTTP/2 transport connects independently of HTTP/1 agents, so it
|
|
15884
|
+
// cannot apply either axios-resolved or agent-local environment proxies.
|
|
15885
|
+
// Explicit proxy config is still processed and rejected below.
|
|
15886
|
+
!isHttp2
|
|
14869
15887
|
);
|
|
14870
15888
|
}
|
|
14871
15889
|
let transport;
|
|
14872
15890
|
let isNativeTransport = false;
|
|
14873
15891
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
14874
|
-
if (
|
|
14875
|
-
options
|
|
15892
|
+
if (!isHttp2 && configProxy === false) {
|
|
15893
|
+
setDirectAgent(options, httpAgent, httpsAgent);
|
|
15894
|
+
options.beforeRedirects.direct = (redirectOptions) => {
|
|
15895
|
+
setDirectAgent(redirectOptions, httpAgent, httpsAgent);
|
|
15896
|
+
};
|
|
15897
|
+
} else if (options.agent == null) {
|
|
15898
|
+
options.agent = isHttpsRequest ? httpsAgent : httpAgent;
|
|
14876
15899
|
}
|
|
14877
15900
|
if (isHttp2) {
|
|
15901
|
+
if (proxyApplied) {
|
|
15902
|
+
return reject(
|
|
15903
|
+
new AxiosError_default(
|
|
15904
|
+
"HTTP/2 requests with a proxy are not supported",
|
|
15905
|
+
AxiosError_default.ERR_NOT_SUPPORT,
|
|
15906
|
+
config
|
|
15907
|
+
)
|
|
15908
|
+
);
|
|
15909
|
+
}
|
|
14878
15910
|
transport = http2Transport;
|
|
14879
15911
|
} else {
|
|
14880
15912
|
const configTransport = own2("transport");
|
|
14881
15913
|
if (configTransport) {
|
|
14882
15914
|
transport = configTransport;
|
|
14883
|
-
} else if (
|
|
15915
|
+
} else if (maxRedirects === 0) {
|
|
14884
15916
|
transport = isHttpsRequest ? https : http;
|
|
14885
15917
|
isNativeTransport = true;
|
|
14886
15918
|
} else {
|
|
14887
|
-
|
|
14888
|
-
|
|
15919
|
+
options.sensitiveHeaders = [];
|
|
15920
|
+
if (maxRedirects) {
|
|
15921
|
+
options.maxRedirects = maxRedirects;
|
|
14889
15922
|
}
|
|
14890
15923
|
const configBeforeRedirect = own2("beforeRedirect");
|
|
14891
15924
|
if (configBeforeRedirect) {
|
|
14892
15925
|
options.beforeRedirects.config = configBeforeRedirect;
|
|
14893
15926
|
}
|
|
15927
|
+
if (auth) {
|
|
15928
|
+
const requestOrigin = parsed.origin;
|
|
15929
|
+
const authToRestore = auth;
|
|
15930
|
+
options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
|
|
15931
|
+
try {
|
|
15932
|
+
if (new URL(redirectOptions.href).origin === requestOrigin) {
|
|
15933
|
+
redirectOptions.auth = authToRestore;
|
|
15934
|
+
}
|
|
15935
|
+
} catch (e) {
|
|
15936
|
+
}
|
|
15937
|
+
};
|
|
15938
|
+
}
|
|
15939
|
+
const sensitiveHeaders = own2("sensitiveHeaders");
|
|
15940
|
+
if (sensitiveHeaders != null) {
|
|
15941
|
+
if (!utils_default.isArray(sensitiveHeaders)) {
|
|
15942
|
+
return reject(
|
|
15943
|
+
new AxiosError_default(
|
|
15944
|
+
"sensitiveHeaders must be an array of strings",
|
|
15945
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
15946
|
+
config
|
|
15947
|
+
)
|
|
15948
|
+
);
|
|
15949
|
+
}
|
|
15950
|
+
const sensitiveSet = /* @__PURE__ */ new Set();
|
|
15951
|
+
for (const header of sensitiveHeaders) {
|
|
15952
|
+
if (!utils_default.isString(header)) {
|
|
15953
|
+
return reject(
|
|
15954
|
+
new AxiosError_default(
|
|
15955
|
+
"sensitiveHeaders must be an array of strings",
|
|
15956
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
15957
|
+
config
|
|
15958
|
+
)
|
|
15959
|
+
);
|
|
15960
|
+
}
|
|
15961
|
+
sensitiveSet.add(header.toLowerCase());
|
|
15962
|
+
}
|
|
15963
|
+
if (sensitiveSet.size) {
|
|
15964
|
+
options.sensitiveHeaders = Array.from(sensitiveSet);
|
|
15965
|
+
options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
|
|
15966
|
+
if (!isSameOriginRedirect(redirectOptions, requestDetails)) {
|
|
15967
|
+
stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
|
|
15968
|
+
}
|
|
15969
|
+
};
|
|
15970
|
+
}
|
|
15971
|
+
}
|
|
14894
15972
|
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
14895
15973
|
}
|
|
14896
15974
|
}
|
|
14897
|
-
if (
|
|
14898
|
-
options.maxBodyLength =
|
|
15975
|
+
if (maxBodyLength > -1) {
|
|
15976
|
+
options.maxBodyLength = maxBodyLength;
|
|
14899
15977
|
} else {
|
|
14900
15978
|
options.maxBodyLength = Infinity;
|
|
14901
15979
|
}
|
|
@@ -14915,7 +15993,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14915
15993
|
transformStream,
|
|
14916
15994
|
progressEventDecorator(
|
|
14917
15995
|
responseLength,
|
|
14918
|
-
progressEventReducer(
|
|
15996
|
+
progressEventReducer(
|
|
15997
|
+
asyncDecorator(onDownloadProgress, scheduleProgress),
|
|
15998
|
+
true,
|
|
15999
|
+
3
|
|
16000
|
+
)
|
|
14919
16001
|
)
|
|
14920
16002
|
)
|
|
14921
16003
|
);
|
|
@@ -14923,7 +16005,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14923
16005
|
}
|
|
14924
16006
|
let responseStream = res;
|
|
14925
16007
|
const lastRequest = res.req || req;
|
|
14926
|
-
if (
|
|
16008
|
+
if (decompress !== false && res.headers["content-encoding"]) {
|
|
14927
16009
|
if (method === "HEAD" || res.statusCode === 204) {
|
|
14928
16010
|
delete res.headers["content-encoding"];
|
|
14929
16011
|
}
|
|
@@ -14946,6 +16028,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14946
16028
|
streams.push(zlib.createBrotliDecompress(brotliOptions));
|
|
14947
16029
|
delete res.headers["content-encoding"];
|
|
14948
16030
|
}
|
|
16031
|
+
break;
|
|
16032
|
+
case "zstd":
|
|
16033
|
+
if (isZstdSupported) {
|
|
16034
|
+
streams.push(zlib.createZstdDecompress(zstdOptions));
|
|
16035
|
+
delete res.headers["content-encoding"];
|
|
16036
|
+
}
|
|
16037
|
+
break;
|
|
14949
16038
|
}
|
|
14950
16039
|
}
|
|
14951
16040
|
responseStream = streams.length > 1 ? stream3.pipeline(streams, utils_default.noop) : streams[0];
|
|
@@ -14957,8 +16046,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14957
16046
|
request: lastRequest
|
|
14958
16047
|
};
|
|
14959
16048
|
if (responseType === "stream") {
|
|
14960
|
-
if (
|
|
14961
|
-
const limit =
|
|
16049
|
+
if (maxContentLength > -1) {
|
|
16050
|
+
const limit = maxContentLength;
|
|
14962
16051
|
const source = responseStream;
|
|
14963
16052
|
async function* enforceMaxContentLength() {
|
|
14964
16053
|
let totalResponseBytes = 0;
|
|
@@ -14987,12 +16076,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
14987
16076
|
responseStream.on("data", function handleStreamData(chunk) {
|
|
14988
16077
|
responseBuffer.push(chunk);
|
|
14989
16078
|
totalResponseBytes += chunk.length;
|
|
14990
|
-
if (
|
|
16079
|
+
if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
|
|
14991
16080
|
rejected = true;
|
|
14992
16081
|
responseStream.destroy();
|
|
14993
16082
|
abort(
|
|
14994
16083
|
new AxiosError_default(
|
|
14995
|
-
"maxContentLength size of " +
|
|
16084
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
14996
16085
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
14997
16086
|
config,
|
|
14998
16087
|
lastRequest
|
|
@@ -15053,14 +16142,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
15053
16142
|
});
|
|
15054
16143
|
const boundSockets = /* @__PURE__ */ new Set();
|
|
15055
16144
|
req.on("socket", function handleRequestSocket(socket) {
|
|
15056
|
-
socket.setKeepAlive
|
|
16145
|
+
if (typeof socket.setKeepAlive === "function") {
|
|
16146
|
+
socket.setKeepAlive(true, 1e3 * 60);
|
|
16147
|
+
}
|
|
15057
16148
|
if (!socket[kAxiosSocketListener]) {
|
|
15058
|
-
socket.on("error",
|
|
15059
|
-
const current = socket[kAxiosCurrentReq];
|
|
15060
|
-
if (current && !current.destroyed) {
|
|
15061
|
-
current.destroy(err);
|
|
15062
|
-
}
|
|
15063
|
-
});
|
|
16149
|
+
socket.on("error", handleSocketError);
|
|
15064
16150
|
socket[kAxiosSocketListener] = true;
|
|
15065
16151
|
}
|
|
15066
16152
|
socket[kAxiosCurrentReq] = req;
|
|
@@ -15075,8 +16161,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
15075
16161
|
}
|
|
15076
16162
|
boundSockets.clear();
|
|
15077
16163
|
});
|
|
15078
|
-
if (
|
|
15079
|
-
const timeout = parseInt(
|
|
16164
|
+
if (own2("timeout")) {
|
|
16165
|
+
const timeout = parseInt(own2("timeout"), 10);
|
|
15080
16166
|
if (Number.isNaN(timeout)) {
|
|
15081
16167
|
abort(
|
|
15082
16168
|
new AxiosError_default(
|
|
@@ -15115,8 +16201,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
15115
16201
|
}
|
|
15116
16202
|
});
|
|
15117
16203
|
let uploadStream = data;
|
|
15118
|
-
if (
|
|
15119
|
-
const limit =
|
|
16204
|
+
if (maxBodyLength > -1) {
|
|
16205
|
+
const limit = maxBodyLength;
|
|
15120
16206
|
let bytesSent = 0;
|
|
15121
16207
|
uploadStream = stream3.pipeline(
|
|
15122
16208
|
[
|
|
@@ -15152,16 +16238,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
15152
16238
|
});
|
|
15153
16239
|
};
|
|
15154
16240
|
|
|
15155
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
15156
|
-
var
|
|
15157
|
-
|
|
15158
|
-
|
|
15159
|
-
})
|
|
15160
|
-
|
|
15161
|
-
|
|
15162
|
-
|
|
15163
|
-
|
|
15164
|
-
// ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/cookies.js
|
|
16241
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/cookies.js
|
|
16242
|
+
var decodeCookieValue = (value) => {
|
|
16243
|
+
try {
|
|
16244
|
+
return decodeURIComponent(value);
|
|
16245
|
+
} catch (e) {
|
|
16246
|
+
return value;
|
|
16247
|
+
}
|
|
16248
|
+
};
|
|
15165
16249
|
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
15166
16250
|
// Standard browser envs support document.cookie
|
|
15167
16251
|
{
|
|
@@ -15187,144 +16271,275 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
|
15187
16271
|
},
|
|
15188
16272
|
read(name) {
|
|
15189
16273
|
if (typeof document === "undefined") return null;
|
|
15190
|
-
const
|
|
16274
|
+
const cookieString = document.cookie;
|
|
16275
|
+
if (!cookieString) return null;
|
|
16276
|
+
const cookies = cookieString.split(";");
|
|
15191
16277
|
for (let i = 0; i < cookies.length; i++) {
|
|
15192
16278
|
const cookie = cookies[i].replace(/^\s+/, "");
|
|
15193
16279
|
const eq = cookie.indexOf("=");
|
|
15194
16280
|
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
15195
|
-
return
|
|
16281
|
+
return decodeCookieValue(cookie.slice(eq + 1));
|
|
15196
16282
|
}
|
|
15197
16283
|
}
|
|
15198
|
-
return null;
|
|
15199
|
-
},
|
|
15200
|
-
|
|
15201
|
-
|
|
16284
|
+
return null;
|
|
16285
|
+
},
|
|
16286
|
+
async readAsync(name) {
|
|
16287
|
+
try {
|
|
16288
|
+
const store = typeof window !== "undefined" && window.cookieStore;
|
|
16289
|
+
if (store && utils_default.isFunction(store.get)) {
|
|
16290
|
+
const cookie = await store.get(name);
|
|
16291
|
+
return cookie ? decodeCookieValue(cookie.value) : null;
|
|
16292
|
+
}
|
|
16293
|
+
} catch (e) {
|
|
16294
|
+
}
|
|
16295
|
+
return this.read(name);
|
|
16296
|
+
},
|
|
16297
|
+
remove(name) {
|
|
16298
|
+
this.write(name, "", Date.now() - 864e5, "/");
|
|
16299
|
+
}
|
|
16300
|
+
}
|
|
16301
|
+
) : (
|
|
16302
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
16303
|
+
{
|
|
16304
|
+
write() {
|
|
16305
|
+
},
|
|
16306
|
+
read() {
|
|
16307
|
+
return null;
|
|
16308
|
+
},
|
|
16309
|
+
async readAsync() {
|
|
16310
|
+
return null;
|
|
16311
|
+
},
|
|
16312
|
+
remove() {
|
|
16313
|
+
}
|
|
16314
|
+
}
|
|
16315
|
+
);
|
|
16316
|
+
|
|
16317
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
16318
|
+
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2) => (url2) => {
|
|
16319
|
+
url2 = new URL(url2, document.baseURI || platform_default.origin);
|
|
16320
|
+
return origin2.protocol === url2.protocol && origin2.host === url2.host && origin2.port === url2.port;
|
|
16321
|
+
})(new URL(platform_default.origin)) : () => true;
|
|
16322
|
+
|
|
16323
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/assertParamsAcyclic.js
|
|
16324
|
+
function assertParamsAcyclic(params) {
|
|
16325
|
+
const pending = [{ value: params }];
|
|
16326
|
+
const active = /* @__PURE__ */ new WeakSet();
|
|
16327
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
16328
|
+
while (pending.length) {
|
|
16329
|
+
const { value, done } = pending.pop();
|
|
16330
|
+
if (!utils_default.isPlainObject(value) && !utils_default.isArray(value)) continue;
|
|
16331
|
+
if (done) {
|
|
16332
|
+
active.delete(value);
|
|
16333
|
+
continue;
|
|
16334
|
+
}
|
|
16335
|
+
if (active.has(value)) {
|
|
16336
|
+
throw new AxiosError_default(
|
|
16337
|
+
"Circular reference detected in params",
|
|
16338
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE
|
|
16339
|
+
);
|
|
16340
|
+
}
|
|
16341
|
+
if (visited.has(value)) continue;
|
|
16342
|
+
visited.add(value);
|
|
16343
|
+
active.add(value);
|
|
16344
|
+
pending.push({ value, done: true });
|
|
16345
|
+
const keys = Object.keys(value);
|
|
16346
|
+
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
16347
|
+
Object.getOwnPropertySymbols(value).forEach((key) => {
|
|
16348
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
16349
|
+
if (descriptor && descriptor.enumerable) keys.push(key);
|
|
16350
|
+
});
|
|
16351
|
+
}
|
|
16352
|
+
keys.forEach((key) => {
|
|
16353
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
16354
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
16355
|
+
if (descriptor && utils_default.hasOwnProp(descriptor, "value")) {
|
|
16356
|
+
pending.push({ value: descriptor.value });
|
|
16357
|
+
}
|
|
16358
|
+
} else {
|
|
16359
|
+
pending.push({ value: value[key] });
|
|
16360
|
+
}
|
|
16361
|
+
});
|
|
16362
|
+
}
|
|
16363
|
+
}
|
|
16364
|
+
|
|
16365
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/mergeConfig.js
|
|
16366
|
+
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
|
16367
|
+
var ownEnumerableKeys = (thing) => {
|
|
16368
|
+
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
16369
|
+
return Object.keys(thing).concat(
|
|
16370
|
+
Object.getOwnPropertySymbols(thing).filter((symbol) => {
|
|
16371
|
+
const descriptor = Object.getOwnPropertyDescriptor(thing, symbol);
|
|
16372
|
+
return descriptor && descriptor.enumerable;
|
|
16373
|
+
})
|
|
16374
|
+
);
|
|
16375
|
+
}
|
|
16376
|
+
return Object.keys(thing);
|
|
16377
|
+
};
|
|
16378
|
+
function mergeParams(a, b) {
|
|
16379
|
+
const pending = [];
|
|
16380
|
+
const copies = /* @__PURE__ */ new WeakMap();
|
|
16381
|
+
const empty = {};
|
|
16382
|
+
function copy(target, source) {
|
|
16383
|
+
if (!utils_default.isPlainObject(source)) {
|
|
16384
|
+
return utils_default.isArray(source) ? source.slice() : source;
|
|
16385
|
+
}
|
|
16386
|
+
const base = utils_default.isPlainObject(target) ? target : empty;
|
|
16387
|
+
let bases = copies.get(source);
|
|
16388
|
+
if (!bases) {
|
|
16389
|
+
bases = /* @__PURE__ */ new WeakMap();
|
|
16390
|
+
copies.set(source, bases);
|
|
16391
|
+
}
|
|
16392
|
+
if (bases.has(base)) return bases.get(base);
|
|
16393
|
+
const result2 = {};
|
|
16394
|
+
bases.set(base, result2);
|
|
16395
|
+
pending.push({ base, source, result: result2 });
|
|
16396
|
+
return result2;
|
|
16397
|
+
}
|
|
16398
|
+
const result = utils_default.isUndefined(b) ? copy(void 0, a) : copy(a, b);
|
|
16399
|
+
while (pending.length) {
|
|
16400
|
+
const { base, source, result: target } = pending.pop();
|
|
16401
|
+
const baseKeys = new Set(ownEnumerableKeys(base));
|
|
16402
|
+
const sourceKeys = new Set(ownEnumerableKeys(source));
|
|
16403
|
+
const keys = /* @__PURE__ */ new Set([...baseKeys, ...sourceKeys]);
|
|
16404
|
+
keys.forEach((key) => {
|
|
16405
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") return;
|
|
16406
|
+
const hasSource = sourceKeys.has(key);
|
|
16407
|
+
const value = hasSource ? source[key] : void 0;
|
|
16408
|
+
const previous = (!hasSource || utils_default.isPlainObject(value)) && baseKeys.has(key) ? base[key] : void 0;
|
|
16409
|
+
target[key] = hasSource ? copy(previous, value) : copy(void 0, previous);
|
|
16410
|
+
});
|
|
16411
|
+
}
|
|
16412
|
+
assertParamsAcyclic(result);
|
|
16413
|
+
return result;
|
|
16414
|
+
}
|
|
16415
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
16416
|
+
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
16417
|
+
return utils_default.merge.call({ caseless }, target, source);
|
|
16418
|
+
} else if (utils_default.isPlainObject(source)) {
|
|
16419
|
+
return utils_default.merge({}, source);
|
|
16420
|
+
} else if (utils_default.isArray(source)) {
|
|
16421
|
+
return source.slice();
|
|
16422
|
+
}
|
|
16423
|
+
return source;
|
|
16424
|
+
}
|
|
16425
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
16426
|
+
if (!utils_default.isUndefined(b)) {
|
|
16427
|
+
return getMergedValue(a, b, prop, caseless);
|
|
16428
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
16429
|
+
return getMergedValue(void 0, a, prop, caseless);
|
|
16430
|
+
}
|
|
16431
|
+
}
|
|
16432
|
+
function valueFromConfig2(a, b) {
|
|
16433
|
+
if (!utils_default.isUndefined(b)) {
|
|
16434
|
+
return getMergedValue(void 0, b);
|
|
16435
|
+
}
|
|
16436
|
+
}
|
|
16437
|
+
function defaultToConfig2(a, b) {
|
|
16438
|
+
if (!utils_default.isUndefined(b)) {
|
|
16439
|
+
return getMergedValue(void 0, b);
|
|
16440
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
16441
|
+
return getMergedValue(void 0, a);
|
|
16442
|
+
}
|
|
16443
|
+
}
|
|
16444
|
+
function getMergedTransitionalOption(config1, config2, prop) {
|
|
16445
|
+
const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
|
|
16446
|
+
if (!utils_default.isUndefined(transitional2)) {
|
|
16447
|
+
if (utils_default.isPlainObject(transitional2)) {
|
|
16448
|
+
if (utils_default.hasOwnProp(transitional2, prop)) {
|
|
16449
|
+
return transitional2[prop];
|
|
16450
|
+
}
|
|
16451
|
+
} else {
|
|
16452
|
+
return void 0;
|
|
15202
16453
|
}
|
|
15203
16454
|
}
|
|
15204
|
-
) :
|
|
15205
|
-
|
|
15206
|
-
|
|
15207
|
-
write() {
|
|
15208
|
-
},
|
|
15209
|
-
read() {
|
|
15210
|
-
return null;
|
|
15211
|
-
},
|
|
15212
|
-
remove() {
|
|
15213
|
-
}
|
|
16455
|
+
const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
|
|
16456
|
+
if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) {
|
|
16457
|
+
return transitional1[prop];
|
|
15214
16458
|
}
|
|
15215
|
-
|
|
15216
|
-
|
|
15217
|
-
|
|
15218
|
-
|
|
16459
|
+
return void 0;
|
|
16460
|
+
}
|
|
16461
|
+
function mergeDirectKeys(a, b, prop, config1, config2) {
|
|
16462
|
+
if (utils_default.hasOwnProp(config2, prop)) {
|
|
16463
|
+
return getMergedValue(a, b);
|
|
16464
|
+
} else if (utils_default.hasOwnProp(config1, prop)) {
|
|
16465
|
+
return getMergedValue(void 0, a);
|
|
16466
|
+
}
|
|
16467
|
+
}
|
|
16468
|
+
function mergeHeaders(a, b, prop) {
|
|
16469
|
+
return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);
|
|
16470
|
+
}
|
|
16471
|
+
var hasOwnPropertyDescriptor = Object.freeze({
|
|
16472
|
+
__proto__: null,
|
|
16473
|
+
value: Object.prototype.hasOwnProperty,
|
|
16474
|
+
enumerable: false,
|
|
16475
|
+
writable: true,
|
|
16476
|
+
configurable: true
|
|
16477
|
+
});
|
|
16478
|
+
var mergeMap = {
|
|
16479
|
+
url: valueFromConfig2,
|
|
16480
|
+
method: valueFromConfig2,
|
|
16481
|
+
data: valueFromConfig2,
|
|
16482
|
+
baseURL: defaultToConfig2,
|
|
16483
|
+
transformRequest: defaultToConfig2,
|
|
16484
|
+
transformResponse: defaultToConfig2,
|
|
16485
|
+
params: mergeParams,
|
|
16486
|
+
paramsSerializer: defaultToConfig2,
|
|
16487
|
+
timeout: defaultToConfig2,
|
|
16488
|
+
timeoutErrorMessage: defaultToConfig2,
|
|
16489
|
+
withCredentials: defaultToConfig2,
|
|
16490
|
+
withXSRFToken: defaultToConfig2,
|
|
16491
|
+
adapter: defaultToConfig2,
|
|
16492
|
+
responseType: defaultToConfig2,
|
|
16493
|
+
xsrfCookieName: defaultToConfig2,
|
|
16494
|
+
xsrfHeaderName: defaultToConfig2,
|
|
16495
|
+
onUploadProgress: defaultToConfig2,
|
|
16496
|
+
onDownloadProgress: defaultToConfig2,
|
|
16497
|
+
decompress: defaultToConfig2,
|
|
16498
|
+
maxContentLength: defaultToConfig2,
|
|
16499
|
+
maxBodyLength: defaultToConfig2,
|
|
16500
|
+
beforeRedirect: defaultToConfig2,
|
|
16501
|
+
transport: defaultToConfig2,
|
|
16502
|
+
httpAgent: defaultToConfig2,
|
|
16503
|
+
httpsAgent: defaultToConfig2,
|
|
16504
|
+
cancelToken: defaultToConfig2,
|
|
16505
|
+
socketPath: defaultToConfig2,
|
|
16506
|
+
allowedSocketPaths: defaultToConfig2,
|
|
16507
|
+
responseEncoding: defaultToConfig2,
|
|
16508
|
+
validateStatus: mergeDirectKeys,
|
|
16509
|
+
headers: mergeHeaders
|
|
16510
|
+
};
|
|
15219
16511
|
function mergeConfig(config1, config2) {
|
|
16512
|
+
config1 = config1 || {};
|
|
15220
16513
|
config2 = config2 || {};
|
|
15221
16514
|
const config = /* @__PURE__ */ Object.create(null);
|
|
15222
|
-
Object.defineProperty(config, "hasOwnProperty",
|
|
15223
|
-
|
|
15224
|
-
|
|
15225
|
-
|
|
15226
|
-
|
|
15227
|
-
enumerable: false,
|
|
15228
|
-
writable: true,
|
|
15229
|
-
configurable: true
|
|
15230
|
-
});
|
|
15231
|
-
function getMergedValue(target, source, prop, caseless) {
|
|
15232
|
-
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
15233
|
-
return utils_default.merge.call({ caseless }, target, source);
|
|
15234
|
-
} else if (utils_default.isPlainObject(source)) {
|
|
15235
|
-
return utils_default.merge({}, source);
|
|
15236
|
-
} else if (utils_default.isArray(source)) {
|
|
15237
|
-
return source.slice();
|
|
15238
|
-
}
|
|
15239
|
-
return source;
|
|
15240
|
-
}
|
|
15241
|
-
function mergeDeepProperties(a, b, prop, caseless) {
|
|
15242
|
-
if (!utils_default.isUndefined(b)) {
|
|
15243
|
-
return getMergedValue(a, b, prop, caseless);
|
|
15244
|
-
} else if (!utils_default.isUndefined(a)) {
|
|
15245
|
-
return getMergedValue(void 0, a, prop, caseless);
|
|
15246
|
-
}
|
|
15247
|
-
}
|
|
15248
|
-
function valueFromConfig2(a, b) {
|
|
15249
|
-
if (!utils_default.isUndefined(b)) {
|
|
15250
|
-
return getMergedValue(void 0, b);
|
|
15251
|
-
}
|
|
15252
|
-
}
|
|
15253
|
-
function defaultToConfig2(a, b) {
|
|
15254
|
-
if (!utils_default.isUndefined(b)) {
|
|
15255
|
-
return getMergedValue(void 0, b);
|
|
15256
|
-
} else if (!utils_default.isUndefined(a)) {
|
|
15257
|
-
return getMergedValue(void 0, a);
|
|
15258
|
-
}
|
|
15259
|
-
}
|
|
15260
|
-
function mergeDirectKeys(a, b, prop) {
|
|
15261
|
-
if (utils_default.hasOwnProp(config2, prop)) {
|
|
15262
|
-
return getMergedValue(a, b);
|
|
15263
|
-
} else if (utils_default.hasOwnProp(config1, prop)) {
|
|
15264
|
-
return getMergedValue(void 0, a);
|
|
15265
|
-
}
|
|
15266
|
-
}
|
|
15267
|
-
const mergeMap = {
|
|
15268
|
-
url: valueFromConfig2,
|
|
15269
|
-
method: valueFromConfig2,
|
|
15270
|
-
data: valueFromConfig2,
|
|
15271
|
-
baseURL: defaultToConfig2,
|
|
15272
|
-
transformRequest: defaultToConfig2,
|
|
15273
|
-
transformResponse: defaultToConfig2,
|
|
15274
|
-
paramsSerializer: defaultToConfig2,
|
|
15275
|
-
timeout: defaultToConfig2,
|
|
15276
|
-
timeoutMessage: defaultToConfig2,
|
|
15277
|
-
withCredentials: defaultToConfig2,
|
|
15278
|
-
withXSRFToken: defaultToConfig2,
|
|
15279
|
-
adapter: defaultToConfig2,
|
|
15280
|
-
responseType: defaultToConfig2,
|
|
15281
|
-
xsrfCookieName: defaultToConfig2,
|
|
15282
|
-
xsrfHeaderName: defaultToConfig2,
|
|
15283
|
-
onUploadProgress: defaultToConfig2,
|
|
15284
|
-
onDownloadProgress: defaultToConfig2,
|
|
15285
|
-
decompress: defaultToConfig2,
|
|
15286
|
-
maxContentLength: defaultToConfig2,
|
|
15287
|
-
maxBodyLength: defaultToConfig2,
|
|
15288
|
-
beforeRedirect: defaultToConfig2,
|
|
15289
|
-
transport: defaultToConfig2,
|
|
15290
|
-
httpAgent: defaultToConfig2,
|
|
15291
|
-
httpsAgent: defaultToConfig2,
|
|
15292
|
-
cancelToken: defaultToConfig2,
|
|
15293
|
-
socketPath: defaultToConfig2,
|
|
15294
|
-
allowedSocketPaths: defaultToConfig2,
|
|
15295
|
-
responseEncoding: defaultToConfig2,
|
|
15296
|
-
validateStatus: mergeDirectKeys,
|
|
15297
|
-
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
15298
|
-
};
|
|
15299
|
-
utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
15300
|
-
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
|
|
16515
|
+
Object.defineProperty(config, "hasOwnProperty", hasOwnPropertyDescriptor);
|
|
16516
|
+
const keys = ownEnumerableKeys({ ...config1, ...config2 });
|
|
16517
|
+
for (let i = 0, len = keys.length; i < len; i++) {
|
|
16518
|
+
const prop = keys[i];
|
|
16519
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") continue;
|
|
15301
16520
|
const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
15302
16521
|
const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
|
|
15303
16522
|
const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0;
|
|
15304
|
-
const configValue = merge2(a, b, prop);
|
|
16523
|
+
const configValue = merge2 === mergeDirectKeys ? merge2(a, b, prop, config1, config2) : merge2(a, b, prop);
|
|
15305
16524
|
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
15306
|
-
});
|
|
15307
|
-
return config;
|
|
15308
|
-
}
|
|
15309
|
-
|
|
15310
|
-
// ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/resolveConfig.js
|
|
15311
|
-
var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
|
|
15312
|
-
function setFormDataHeaders2(headers, formHeaders, policy) {
|
|
15313
|
-
if (policy !== "content-only") {
|
|
15314
|
-
headers.set(formHeaders);
|
|
15315
|
-
return;
|
|
15316
16525
|
}
|
|
15317
|
-
|
|
15318
|
-
if (
|
|
15319
|
-
|
|
16526
|
+
if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption(config1, config2, "validateStatusUndefinedResolves") === false) {
|
|
16527
|
+
if (utils_default.hasOwnProp(config1, "validateStatus")) {
|
|
16528
|
+
config.validateStatus = getMergedValue(void 0, config1.validateStatus);
|
|
16529
|
+
} else {
|
|
16530
|
+
delete config.validateStatus;
|
|
15320
16531
|
}
|
|
15321
|
-
}
|
|
16532
|
+
}
|
|
16533
|
+
return config;
|
|
15322
16534
|
}
|
|
16535
|
+
|
|
16536
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/resolveConfig.js
|
|
15323
16537
|
var encodeUTF8 = (str) => encodeURIComponent(str).replace(
|
|
15324
16538
|
/%([0-9A-F]{2})/gi,
|
|
15325
16539
|
(_, hex) => String.fromCharCode(parseInt(hex, 16))
|
|
15326
16540
|
);
|
|
15327
|
-
var
|
|
16541
|
+
var readCookie = (name) => cookies_default.read(name);
|
|
16542
|
+
function resolveConfig(config, readXsrfCookie = readCookie) {
|
|
15328
16543
|
const newConfig = mergeConfig({}, config);
|
|
15329
16544
|
const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
|
|
15330
16545
|
const data = own2("data");
|
|
@@ -15338,21 +16553,33 @@ var resolveConfig_default = (config) => {
|
|
|
15338
16553
|
const url2 = own2("url");
|
|
15339
16554
|
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
15340
16555
|
newConfig.url = buildURL(
|
|
15341
|
-
buildFullPath(baseURL, url2, allowAbsoluteUrls),
|
|
15342
|
-
|
|
15343
|
-
|
|
16556
|
+
buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig),
|
|
16557
|
+
own2("params"),
|
|
16558
|
+
own2("paramsSerializer")
|
|
15344
16559
|
);
|
|
15345
16560
|
if (auth) {
|
|
15346
|
-
|
|
15347
|
-
|
|
15348
|
-
|
|
15349
|
-
);
|
|
16561
|
+
const username = utils_default.getSafeProp(auth, "username") || "";
|
|
16562
|
+
const password = utils_default.getSafeProp(auth, "password") || "";
|
|
16563
|
+
const transitional2 = own2("transitional");
|
|
16564
|
+
const encodeUsername = transitional2 && utils_default.hasOwnProp(transitional2, "encodeBasicAuthUsername") && transitional2.encodeBasicAuthUsername === true;
|
|
16565
|
+
try {
|
|
16566
|
+
headers.set(
|
|
16567
|
+
"Authorization",
|
|
16568
|
+
// Preserve legacy username bytes unless the caller opts in to UTF-8.
|
|
16569
|
+
"Basic " + btoa(
|
|
16570
|
+
(encodeUsername ? encodeUTF8(username) : username) + ":" + (password ? encodeUTF8(password) : "")
|
|
16571
|
+
)
|
|
16572
|
+
);
|
|
16573
|
+
} catch (e) {
|
|
16574
|
+
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_OPTION_VALUE, config);
|
|
16575
|
+
}
|
|
15350
16576
|
}
|
|
15351
16577
|
if (utils_default.isFormData(data)) {
|
|
15352
|
-
|
|
16578
|
+
const getHeaders = utils_default.getSafeProp(data, "getHeaders");
|
|
16579
|
+
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) {
|
|
15353
16580
|
headers.setContentType(void 0);
|
|
15354
|
-
} else if (utils_default.isFunction(
|
|
15355
|
-
|
|
16581
|
+
} else if (utils_default.isFunction(getHeaders)) {
|
|
16582
|
+
setFormDataHeaders(headers, getHeaders.call(data), own2("formDataHeaderPolicy"));
|
|
15356
16583
|
}
|
|
15357
16584
|
}
|
|
15358
16585
|
if (platform_default.hasStandardBrowserEnv) {
|
|
@@ -15361,36 +16588,91 @@ var resolveConfig_default = (config) => {
|
|
|
15361
16588
|
}
|
|
15362
16589
|
const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url);
|
|
15363
16590
|
if (shouldSendXSRF) {
|
|
15364
|
-
const xsrfValue = xsrfHeaderName && xsrfCookieName &&
|
|
16591
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName);
|
|
15365
16592
|
if (xsrfValue) {
|
|
15366
16593
|
headers.set(xsrfHeaderName, xsrfValue);
|
|
15367
16594
|
}
|
|
15368
16595
|
}
|
|
15369
16596
|
}
|
|
15370
16597
|
return newConfig;
|
|
15371
|
-
}
|
|
16598
|
+
}
|
|
16599
|
+
var resolveConfig_default = resolveConfig;
|
|
15372
16600
|
|
|
15373
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
16601
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/xhr.js
|
|
15374
16602
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
15375
16603
|
var xhr_default = isXHRAdapterSupported && function(config) {
|
|
15376
16604
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
15377
|
-
|
|
16605
|
+
let useAsyncXsrf;
|
|
16606
|
+
try {
|
|
16607
|
+
const store = platform_default.hasStandardBrowserEnv && typeof window !== "undefined" && window.cookieStore;
|
|
16608
|
+
useAsyncXsrf = store && utils_default.isFunction(store.get);
|
|
16609
|
+
} catch (e) {
|
|
16610
|
+
}
|
|
16611
|
+
let xsrfCookieName;
|
|
16612
|
+
const _config = resolveConfig_default(
|
|
16613
|
+
config,
|
|
16614
|
+
useAsyncXsrf ? (name) => {
|
|
16615
|
+
xsrfCookieName = name;
|
|
16616
|
+
return null;
|
|
16617
|
+
} : void 0
|
|
16618
|
+
);
|
|
15378
16619
|
let requestData = _config.data;
|
|
15379
16620
|
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
|
15380
16621
|
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
15381
16622
|
let onCanceled;
|
|
16623
|
+
let timeoutId;
|
|
15382
16624
|
let uploadThrottled, downloadThrottled;
|
|
15383
|
-
let flushUpload, flushDownload;
|
|
16625
|
+
let flushUpload, flushDownload, flushDownloadWithEvent;
|
|
15384
16626
|
function done() {
|
|
15385
|
-
|
|
15386
|
-
|
|
16627
|
+
clearTimeout(timeoutId);
|
|
16628
|
+
try {
|
|
16629
|
+
flushUpload && flushUpload();
|
|
16630
|
+
} catch (err) {
|
|
16631
|
+
setTimeout(() => {
|
|
16632
|
+
throw err;
|
|
16633
|
+
});
|
|
16634
|
+
}
|
|
16635
|
+
try {
|
|
16636
|
+
flushDownload && flushDownload();
|
|
16637
|
+
} catch (err) {
|
|
16638
|
+
setTimeout(() => {
|
|
16639
|
+
throw err;
|
|
16640
|
+
});
|
|
16641
|
+
}
|
|
16642
|
+
if (request) {
|
|
16643
|
+
downloadThrottled && request.removeEventListener("progress", downloadThrottled);
|
|
16644
|
+
if (request.upload) {
|
|
16645
|
+
uploadThrottled && request.upload.removeEventListener("progress", uploadThrottled);
|
|
16646
|
+
flushUpload && request.upload.removeEventListener("loadend", flushUpload);
|
|
16647
|
+
}
|
|
16648
|
+
}
|
|
15387
16649
|
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
15388
16650
|
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
|
15389
16651
|
}
|
|
15390
16652
|
let request = new XMLHttpRequest();
|
|
15391
16653
|
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
15392
16654
|
request.timeout = _config.timeout;
|
|
15393
|
-
function onloadend() {
|
|
16655
|
+
function onloadend(event) {
|
|
16656
|
+
if (!request) {
|
|
16657
|
+
return;
|
|
16658
|
+
}
|
|
16659
|
+
if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform_default.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) {
|
|
16660
|
+
reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
|
|
16661
|
+
done();
|
|
16662
|
+
request = null;
|
|
16663
|
+
return;
|
|
16664
|
+
}
|
|
16665
|
+
try {
|
|
16666
|
+
if (event) {
|
|
16667
|
+
flushDownloadWithEvent && flushDownloadWithEvent(event);
|
|
16668
|
+
} else {
|
|
16669
|
+
flushDownload && flushDownload();
|
|
16670
|
+
}
|
|
16671
|
+
} catch (err) {
|
|
16672
|
+
setTimeout(() => {
|
|
16673
|
+
throw err;
|
|
16674
|
+
});
|
|
16675
|
+
}
|
|
15394
16676
|
if (!request) {
|
|
15395
16677
|
return;
|
|
15396
16678
|
}
|
|
@@ -15449,6 +16731,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
15449
16731
|
request = null;
|
|
15450
16732
|
};
|
|
15451
16733
|
request.ontimeout = function handleTimeout() {
|
|
16734
|
+
if (!request) return;
|
|
15452
16735
|
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
|
15453
16736
|
const transitional2 = _config.transitional || transitional_default;
|
|
15454
16737
|
if (_config.timeoutErrorMessage) {
|
|
@@ -15466,11 +16749,6 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
15466
16749
|
request = null;
|
|
15467
16750
|
};
|
|
15468
16751
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
15469
|
-
if ("setRequestHeader" in request) {
|
|
15470
|
-
utils_default.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
|
|
15471
|
-
request.setRequestHeader(key, val);
|
|
15472
|
-
});
|
|
15473
|
-
}
|
|
15474
16752
|
if (!utils_default.isUndefined(_config.withCredentials)) {
|
|
15475
16753
|
request.withCredentials = !!_config.withCredentials;
|
|
15476
16754
|
}
|
|
@@ -15478,7 +16756,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
15478
16756
|
request.responseType = _config.responseType;
|
|
15479
16757
|
}
|
|
15480
16758
|
if (onDownloadProgress) {
|
|
15481
|
-
[downloadThrottled, flushDownload] = progressEventReducer(
|
|
16759
|
+
[downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(
|
|
16760
|
+
onDownloadProgress,
|
|
16761
|
+
true
|
|
16762
|
+
);
|
|
15482
16763
|
request.addEventListener("progress", downloadThrottled);
|
|
15483
16764
|
}
|
|
15484
16765
|
if (onUploadProgress && request.upload) {
|
|
@@ -15492,15 +16773,18 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
15492
16773
|
return;
|
|
15493
16774
|
}
|
|
15494
16775
|
reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel);
|
|
15495
|
-
request
|
|
16776
|
+
const xhr = request;
|
|
15496
16777
|
done();
|
|
15497
16778
|
request = null;
|
|
16779
|
+
xhr.abort();
|
|
15498
16780
|
};
|
|
15499
16781
|
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
16782
|
+
if (!request) return;
|
|
15500
16783
|
if (_config.signal) {
|
|
15501
16784
|
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
15502
16785
|
}
|
|
15503
16786
|
}
|
|
16787
|
+
if (!request) return;
|
|
15504
16788
|
const protocol = parseProtocol(_config.url);
|
|
15505
16789
|
if (protocol && !platform_default.protocols.includes(protocol)) {
|
|
15506
16790
|
reject(
|
|
@@ -15510,13 +16794,65 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
15510
16794
|
config
|
|
15511
16795
|
)
|
|
15512
16796
|
);
|
|
16797
|
+
done();
|
|
15513
16798
|
return;
|
|
15514
16799
|
}
|
|
15515
|
-
|
|
16800
|
+
const sendRequest = () => {
|
|
16801
|
+
if (!request) return;
|
|
16802
|
+
if ("setRequestHeader" in request) {
|
|
16803
|
+
utils_default.forEach(
|
|
16804
|
+
toByteStringHeaderObject(requestHeaders),
|
|
16805
|
+
function setRequestHeader(val, key) {
|
|
16806
|
+
request.setRequestHeader(key, val);
|
|
16807
|
+
}
|
|
16808
|
+
);
|
|
16809
|
+
}
|
|
16810
|
+
request.send(requestData || null);
|
|
16811
|
+
};
|
|
16812
|
+
if (xsrfCookieName) {
|
|
16813
|
+
const now = typeof performance !== "undefined" && utils_default.isFunction(performance.now) ? () => performance.now() : Date.now;
|
|
16814
|
+
const deadline = request.timeout > 0 ? now() + Number(request.timeout) : void 0;
|
|
16815
|
+
const abortOnTimeout = () => {
|
|
16816
|
+
if (!request) return;
|
|
16817
|
+
const xhr = request;
|
|
16818
|
+
xhr.ontimeout();
|
|
16819
|
+
xhr.abort();
|
|
16820
|
+
};
|
|
16821
|
+
if (deadline !== void 0) {
|
|
16822
|
+
const scheduleTimeout = () => {
|
|
16823
|
+
const remaining = deadline - now();
|
|
16824
|
+
if (remaining > 0) {
|
|
16825
|
+
timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 2147483647));
|
|
16826
|
+
} else {
|
|
16827
|
+
abortOnTimeout();
|
|
16828
|
+
}
|
|
16829
|
+
};
|
|
16830
|
+
scheduleTimeout();
|
|
16831
|
+
}
|
|
16832
|
+
cookies_default.readAsync(xsrfCookieName).then((value) => {
|
|
16833
|
+
if (!request) return;
|
|
16834
|
+
if (deadline !== void 0 && now() >= deadline) {
|
|
16835
|
+
abortOnTimeout();
|
|
16836
|
+
return;
|
|
16837
|
+
}
|
|
16838
|
+
if (value) {
|
|
16839
|
+
const headerName = utils_default.hasOwnProp(_config, "xsrfHeaderName") && _config.xsrfHeaderName;
|
|
16840
|
+
requestHeaders.set(headerName, value);
|
|
16841
|
+
}
|
|
16842
|
+
sendRequest();
|
|
16843
|
+
}).catch((error) => {
|
|
16844
|
+
if (!request) return;
|
|
16845
|
+
reject(AxiosError_default.from(error, null, config, request));
|
|
16846
|
+
done();
|
|
16847
|
+
request = null;
|
|
16848
|
+
});
|
|
16849
|
+
} else {
|
|
16850
|
+
sendRequest();
|
|
16851
|
+
}
|
|
15516
16852
|
});
|
|
15517
16853
|
};
|
|
15518
16854
|
|
|
15519
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
16855
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/composeSignals.js
|
|
15520
16856
|
var composeSignals = (signals, timeout) => {
|
|
15521
16857
|
signals = signals ? signals.filter(Boolean) : [];
|
|
15522
16858
|
if (!timeout && !signals.length) {
|
|
@@ -15545,18 +16881,28 @@ var composeSignals = (signals, timeout) => {
|
|
|
15545
16881
|
timer && clearTimeout(timer);
|
|
15546
16882
|
timer = null;
|
|
15547
16883
|
signals.forEach((signal2) => {
|
|
15548
|
-
|
|
16884
|
+
const unsubscribeSignal = utils_default.getSafeProp(signal2, "unsubscribe");
|
|
16885
|
+
utils_default.isFunction(unsubscribeSignal) ? unsubscribeSignal.call(signal2, onabort) : signal2.removeEventListener("abort", onabort);
|
|
15549
16886
|
});
|
|
15550
16887
|
signals = null;
|
|
15551
16888
|
};
|
|
15552
|
-
signals.forEach((signal2) =>
|
|
16889
|
+
signals.forEach((signal2) => {
|
|
16890
|
+
if (aborted) {
|
|
16891
|
+
return;
|
|
16892
|
+
}
|
|
16893
|
+
if (signal2.aborted) {
|
|
16894
|
+
onabort.call(signal2);
|
|
16895
|
+
return;
|
|
16896
|
+
}
|
|
16897
|
+
signal2.addEventListener("abort", onabort, { once: true });
|
|
16898
|
+
});
|
|
15553
16899
|
const { signal } = controller;
|
|
15554
16900
|
signal.unsubscribe = () => utils_default.asap(unsubscribe);
|
|
15555
16901
|
return signal;
|
|
15556
16902
|
};
|
|
15557
16903
|
var composeSignals_default = composeSignals;
|
|
15558
16904
|
|
|
15559
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
16905
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/trackStream.js
|
|
15560
16906
|
var streamChunk = function* (chunk, chunkSize) {
|
|
15561
16907
|
let len = chunk.byteLength;
|
|
15562
16908
|
if (!chunkSize || len < chunkSize) {
|
|
@@ -15636,9 +16982,138 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
|
15636
16982
|
);
|
|
15637
16983
|
};
|
|
15638
16984
|
|
|
15639
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
16985
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToBlob.js
|
|
16986
|
+
var CRLF2 = "\r\n";
|
|
16987
|
+
var normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF2);
|
|
16988
|
+
var escapeName = (value) => String(value).replace(
|
|
16989
|
+
/[\r\n"]/g,
|
|
16990
|
+
(char) => char === "\r" ? "%0D" : char === "\n" ? "%0A" : "%22"
|
|
16991
|
+
);
|
|
16992
|
+
var stringBytes = (value, normalize) => {
|
|
16993
|
+
let length = 0;
|
|
16994
|
+
for (let i = 0; i < value.length; i++) {
|
|
16995
|
+
const code = value.charCodeAt(i);
|
|
16996
|
+
if (normalize && (code === 13 || code === 10)) {
|
|
16997
|
+
if (code === 13 && value.charCodeAt(i + 1) === 10) i++;
|
|
16998
|
+
length += 2;
|
|
16999
|
+
} else if (code < 128) {
|
|
17000
|
+
length++;
|
|
17001
|
+
} else if (code < 2048) {
|
|
17002
|
+
length += 2;
|
|
17003
|
+
} else if (code >= 55296 && code <= 56319 && value.charCodeAt(i + 1) >= 56320 && value.charCodeAt(i + 1) <= 57343) {
|
|
17004
|
+
length += 4;
|
|
17005
|
+
i++;
|
|
17006
|
+
} else {
|
|
17007
|
+
length += 3;
|
|
17008
|
+
}
|
|
17009
|
+
}
|
|
17010
|
+
return length;
|
|
17011
|
+
};
|
|
17012
|
+
var FormDataError = class extends TypeError {
|
|
17013
|
+
constructor(message, reason) {
|
|
17014
|
+
super(message);
|
|
17015
|
+
this.name = "FormDataError";
|
|
17016
|
+
this.reason = reason;
|
|
17017
|
+
}
|
|
17018
|
+
};
|
|
17019
|
+
function formDataToBlob(form, Blob2, limit, limitError, boundary) {
|
|
17020
|
+
if (!utils_default.isFunction(Blob2)) {
|
|
17021
|
+
throw new FormDataError("Blob is not supported", "blob");
|
|
17022
|
+
}
|
|
17023
|
+
if (!utils_default.isString(boundary) || !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) || / $/.test(boundary)) {
|
|
17024
|
+
throw new FormDataError("Invalid multipart boundary", "boundary");
|
|
17025
|
+
}
|
|
17026
|
+
const footer = "--" + boundary + "--" + CRLF2;
|
|
17027
|
+
let length = footer.length;
|
|
17028
|
+
const parts = [];
|
|
17029
|
+
const checkLength = (extra) => {
|
|
17030
|
+
if (length + extra > limit) throw limitError();
|
|
17031
|
+
};
|
|
17032
|
+
checkLength(0);
|
|
17033
|
+
for (const [name, value] of form) {
|
|
17034
|
+
const isString2 = utils_default.isString(value);
|
|
17035
|
+
const valueLength = isString2 ? stringBytes(value, true) : value.size;
|
|
17036
|
+
if (!Number.isFinite(valueLength) || valueLength < 0) {
|
|
17037
|
+
throw new FormDataError("Unsupported FormData part size", "part");
|
|
17038
|
+
}
|
|
17039
|
+
checkLength(
|
|
17040
|
+
valueLength + stringBytes(name, true) + (!isString2 && value.name ? stringBytes(value.name, false) : 0) + (!isString2 && value.type ? stringBytes(value.type, false) : 0)
|
|
17041
|
+
);
|
|
17042
|
+
let header = "--" + boundary + CRLF2 + 'Content-Disposition: form-data; name="' + escapeName(normalizeLines(name)) + '"';
|
|
17043
|
+
if (!isString2) {
|
|
17044
|
+
header += '; filename="' + escapeName(utils_default.isString(value.name) ? value.name : "blob") + '"' + CRLF2 + "Content-Type: " + String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
|
|
17045
|
+
}
|
|
17046
|
+
header += CRLF2 + CRLF2;
|
|
17047
|
+
const partLength = stringBytes(header, false) + valueLength + CRLF2.length;
|
|
17048
|
+
checkLength(partLength);
|
|
17049
|
+
length += partLength;
|
|
17050
|
+
parts.push({ header, value, isString: isString2 });
|
|
17051
|
+
}
|
|
17052
|
+
const blobParts = [];
|
|
17053
|
+
for (const part of parts) {
|
|
17054
|
+
blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF2);
|
|
17055
|
+
}
|
|
17056
|
+
blobParts.push(footer);
|
|
17057
|
+
return new Blob2(blobParts, { type: "multipart/form-data; boundary=" + boundary });
|
|
17058
|
+
}
|
|
17059
|
+
|
|
17060
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/createMultipartBody.js
|
|
17061
|
+
function createMultipartBody(form, Blob2, limit, limitError, boundary) {
|
|
17062
|
+
if (!utils_default.isFunction(Blob2)) {
|
|
17063
|
+
throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
|
|
17064
|
+
}
|
|
17065
|
+
if (boundary === void 0) {
|
|
17066
|
+
if (utils_default.isFunction(platform_default.generateString)) {
|
|
17067
|
+
boundary = "axios-" + platform_default.generateString(36, "0123456789abcdef");
|
|
17068
|
+
} else {
|
|
17069
|
+
const crypto2 = utils_default.global.crypto;
|
|
17070
|
+
if (!crypto2 || !utils_default.isFunction(crypto2.getRandomValues)) {
|
|
17071
|
+
throw new AxiosError_default("Random byte generation is not supported", AxiosError_default.ERR_NOT_SUPPORT);
|
|
17072
|
+
}
|
|
17073
|
+
const random = new Uint8Array(18);
|
|
17074
|
+
crypto2.getRandomValues(random);
|
|
17075
|
+
boundary = "axios-" + Array.from(random, (value) => ("0" + value.toString(16)).slice(-2)).join("");
|
|
17076
|
+
}
|
|
17077
|
+
}
|
|
17078
|
+
try {
|
|
17079
|
+
return formDataToBlob(form, Blob2, limit, limitError, boundary);
|
|
17080
|
+
} catch (error) {
|
|
17081
|
+
if (error instanceof FormDataError) {
|
|
17082
|
+
const code = error.reason === "boundary" ? AxiosError_default.ERR_BAD_OPTION_VALUE : AxiosError_default.ERR_BAD_REQUEST;
|
|
17083
|
+
throw new AxiosError_default(error.message, code);
|
|
17084
|
+
}
|
|
17085
|
+
throw error;
|
|
17086
|
+
}
|
|
17087
|
+
}
|
|
17088
|
+
|
|
17089
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/fetch.js
|
|
15640
17090
|
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
17091
|
+
var DEFAULT_REQUEST_OPTIONS = {
|
|
17092
|
+
cache: "default",
|
|
17093
|
+
redirect: "follow",
|
|
17094
|
+
referrer: "about:client",
|
|
17095
|
+
referrerPolicy: "",
|
|
17096
|
+
mode: "cors",
|
|
17097
|
+
integrity: "",
|
|
17098
|
+
keepalive: false,
|
|
17099
|
+
priority: "auto",
|
|
17100
|
+
window: null
|
|
17101
|
+
};
|
|
15641
17102
|
var { isFunction: isFunction2 } = utils_default;
|
|
17103
|
+
var encodeUTF82 = (str) => encodeURIComponent(str).replace(
|
|
17104
|
+
/%([0-9A-F]{2})/gi,
|
|
17105
|
+
(_, hex) => String.fromCharCode(parseInt(hex, 16))
|
|
17106
|
+
);
|
|
17107
|
+
var decodeURIComponentSafe2 = (value) => {
|
|
17108
|
+
if (!utils_default.isString(value)) {
|
|
17109
|
+
return value;
|
|
17110
|
+
}
|
|
17111
|
+
try {
|
|
17112
|
+
return decodeURIComponent(value);
|
|
17113
|
+
} catch (error) {
|
|
17114
|
+
return value;
|
|
17115
|
+
}
|
|
17116
|
+
};
|
|
15642
17117
|
var test = (fn, ...args) => {
|
|
15643
17118
|
try {
|
|
15644
17119
|
return !!fn(...args);
|
|
@@ -15646,6 +17121,14 @@ var test = (fn, ...args) => {
|
|
|
15646
17121
|
return false;
|
|
15647
17122
|
}
|
|
15648
17123
|
};
|
|
17124
|
+
var maybeWithAuthCredentials = (url2) => {
|
|
17125
|
+
const protocolIndex = url2.indexOf("://");
|
|
17126
|
+
let urlToCheck = url2;
|
|
17127
|
+
if (protocolIndex !== -1) {
|
|
17128
|
+
urlToCheck = urlToCheck.slice(protocolIndex + 3);
|
|
17129
|
+
}
|
|
17130
|
+
return urlToCheck.includes("@") || urlToCheck.includes(":");
|
|
17131
|
+
};
|
|
15649
17132
|
var factory = (env) => {
|
|
15650
17133
|
const globalObject = utils_default.global !== void 0 && utils_default.global !== null ? utils_default.global : globalThis;
|
|
15651
17134
|
const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
|
|
@@ -15655,11 +17138,13 @@ var factory = (env) => {
|
|
|
15655
17138
|
},
|
|
15656
17139
|
{
|
|
15657
17140
|
Request: globalObject.Request,
|
|
15658
|
-
Response: globalObject.Response
|
|
17141
|
+
Response: globalObject.Response,
|
|
17142
|
+
Blob: globalObject.Blob
|
|
15659
17143
|
},
|
|
15660
17144
|
env
|
|
15661
17145
|
);
|
|
15662
|
-
const
|
|
17146
|
+
const envFetch = utils_default.hasOwnProp(env, "fetch") ? env.fetch : void 0;
|
|
17147
|
+
const { Request, Response, Blob: Blob2 } = env;
|
|
15663
17148
|
const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
|
|
15664
17149
|
const isRequestSupported = isFunction2(Request);
|
|
15665
17150
|
const isResponseSupported = isFunction2(Response);
|
|
@@ -15685,6 +17170,13 @@ var factory = (env) => {
|
|
|
15685
17170
|
return duplexAccessed && !hasContentType;
|
|
15686
17171
|
});
|
|
15687
17172
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
|
17173
|
+
const requestDefaults = Object.assign(/* @__PURE__ */ Object.create(null), DEFAULT_REQUEST_OPTIONS);
|
|
17174
|
+
if (isRequestSupported && !test(() => new Request(platform_default.origin, requestDefaults))) {
|
|
17175
|
+
delete requestDefaults.cache;
|
|
17176
|
+
if (!test(() => new Request(platform_default.origin, requestDefaults))) {
|
|
17177
|
+
requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache;
|
|
17178
|
+
}
|
|
17179
|
+
}
|
|
15688
17180
|
const resolvers = {
|
|
15689
17181
|
stream: supportsResponseStream && ((res) => res.body)
|
|
15690
17182
|
};
|
|
@@ -15710,13 +17202,6 @@ var factory = (env) => {
|
|
|
15710
17202
|
if (utils_default.isBlob(body)) {
|
|
15711
17203
|
return body.size;
|
|
15712
17204
|
}
|
|
15713
|
-
if (utils_default.isSpecCompliantForm(body)) {
|
|
15714
|
-
const _request = new Request(platform_default.origin, {
|
|
15715
|
-
method: "POST",
|
|
15716
|
-
body
|
|
15717
|
-
});
|
|
15718
|
-
return (await _request.arrayBuffer()).byteLength;
|
|
15719
|
-
}
|
|
15720
17205
|
if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
|
|
15721
17206
|
return body.byteLength;
|
|
15722
17207
|
}
|
|
@@ -15746,10 +17231,12 @@ var factory = (env) => {
|
|
|
15746
17231
|
withCredentials = "same-origin",
|
|
15747
17232
|
fetchOptions,
|
|
15748
17233
|
maxContentLength,
|
|
15749
|
-
maxBodyLength
|
|
17234
|
+
maxBodyLength,
|
|
17235
|
+
maxRedirects
|
|
15750
17236
|
} = resolveConfig_default(config);
|
|
15751
17237
|
const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
|
|
15752
17238
|
const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
17239
|
+
const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
|
|
15753
17240
|
let _fetch = envFetch || fetch;
|
|
15754
17241
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
15755
17242
|
let composedSignal = composeSignals_default(
|
|
@@ -15761,9 +17248,51 @@ var factory = (env) => {
|
|
|
15761
17248
|
composedSignal.unsubscribe();
|
|
15762
17249
|
});
|
|
15763
17250
|
let requestContentLength;
|
|
17251
|
+
let pendingBodyError = null;
|
|
17252
|
+
let pendingResponseError = null;
|
|
17253
|
+
const maxBodyLengthError = () => new AxiosError_default(
|
|
17254
|
+
"Request body larger than maxBodyLength limit",
|
|
17255
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
17256
|
+
config,
|
|
17257
|
+
request
|
|
17258
|
+
);
|
|
15764
17259
|
try {
|
|
15765
|
-
|
|
15766
|
-
|
|
17260
|
+
let auth = void 0;
|
|
17261
|
+
const configAuth = own2("auth");
|
|
17262
|
+
if (configAuth) {
|
|
17263
|
+
const username = utils_default.getSafeProp(configAuth, "username") || "";
|
|
17264
|
+
const password = utils_default.getSafeProp(configAuth, "password") || "";
|
|
17265
|
+
auth = {
|
|
17266
|
+
username,
|
|
17267
|
+
password
|
|
17268
|
+
};
|
|
17269
|
+
}
|
|
17270
|
+
let parsedURL;
|
|
17271
|
+
if (maybeWithAuthCredentials(url2)) {
|
|
17272
|
+
parsedURL = new URL(url2, platform_default.origin);
|
|
17273
|
+
if (!auth && (parsedURL.username || parsedURL.password)) {
|
|
17274
|
+
const urlUsername = decodeURIComponentSafe2(parsedURL.username);
|
|
17275
|
+
const urlPassword = decodeURIComponentSafe2(parsedURL.password);
|
|
17276
|
+
auth = {
|
|
17277
|
+
username: urlUsername,
|
|
17278
|
+
password: urlPassword
|
|
17279
|
+
};
|
|
17280
|
+
}
|
|
17281
|
+
if (parsedURL.username || parsedURL.password) {
|
|
17282
|
+
parsedURL.username = "";
|
|
17283
|
+
parsedURL.password = "";
|
|
17284
|
+
url2 = parsedURL.href;
|
|
17285
|
+
}
|
|
17286
|
+
}
|
|
17287
|
+
if (auth) {
|
|
17288
|
+
headers.delete("authorization");
|
|
17289
|
+
headers.set(
|
|
17290
|
+
"Authorization",
|
|
17291
|
+
"Basic " + btoa(encodeUTF82((auth.username || "") + ":" + (auth.password || "")))
|
|
17292
|
+
);
|
|
17293
|
+
}
|
|
17294
|
+
if (hasMaxContentLength && parsedURL && parsedURL.protocol === "data:") {
|
|
17295
|
+
const estimated = estimateDataURLDecodedBytes(parsedURL.href);
|
|
15767
17296
|
if (estimated > maxContentLength) {
|
|
15768
17297
|
throw new AxiosError_default(
|
|
15769
17298
|
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
@@ -15773,34 +17302,73 @@ var factory = (env) => {
|
|
|
15773
17302
|
);
|
|
15774
17303
|
}
|
|
15775
17304
|
}
|
|
17305
|
+
const formContentType = utils_default.isSpecCompliantForm(data) && AxiosHeaders_default.from(own2("headers")).getContentType();
|
|
17306
|
+
let formBoundary;
|
|
17307
|
+
if (utils_default.isString(formContentType) && /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim())) {
|
|
17308
|
+
const parameters = AxiosHeaders_default.parseParameters(formContentType);
|
|
17309
|
+
if (utils_default.hasOwnProp(parameters, "boundary")) formBoundary = parameters.boundary;
|
|
17310
|
+
}
|
|
17311
|
+
if (utils_default.isSpecCompliantForm(data) && method !== "get" && method !== "head" && (hasMaxBodyLength || onUploadProgress && supportsRequestStream || formBoundary !== void 0)) {
|
|
17312
|
+
data = createMultipartBody(
|
|
17313
|
+
data,
|
|
17314
|
+
Blob2,
|
|
17315
|
+
hasMaxBodyLength ? maxBodyLength : Infinity,
|
|
17316
|
+
maxBodyLengthError,
|
|
17317
|
+
formBoundary
|
|
17318
|
+
);
|
|
17319
|
+
headers.setContentType(formBoundary === void 0 ? data.type : formContentType);
|
|
17320
|
+
requestContentLength = data.size;
|
|
17321
|
+
}
|
|
15776
17322
|
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
15777
|
-
const outboundLength = await
|
|
15778
|
-
if (typeof outboundLength === "number" && isFinite(outboundLength)
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
request
|
|
15784
|
-
);
|
|
17323
|
+
const outboundLength = await getBodyLength(data);
|
|
17324
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength)) {
|
|
17325
|
+
requestContentLength = outboundLength;
|
|
17326
|
+
if (outboundLength > maxBodyLength) {
|
|
17327
|
+
throw maxBodyLengthError();
|
|
17328
|
+
}
|
|
15785
17329
|
}
|
|
15786
17330
|
}
|
|
15787
|
-
|
|
15788
|
-
|
|
15789
|
-
|
|
15790
|
-
|
|
15791
|
-
|
|
15792
|
-
|
|
15793
|
-
|
|
15794
|
-
|
|
15795
|
-
|
|
15796
|
-
}
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
|
|
17331
|
+
const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data));
|
|
17332
|
+
const trackRequestStream = (stream4, onProgress, flush) => trackStream(
|
|
17333
|
+
stream4,
|
|
17334
|
+
DEFAULT_CHUNK_SIZE,
|
|
17335
|
+
(loadedBytes) => {
|
|
17336
|
+
if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
|
|
17337
|
+
throw pendingBodyError = maxBodyLengthError();
|
|
17338
|
+
}
|
|
17339
|
+
onProgress && onProgress(loadedBytes);
|
|
17340
|
+
},
|
|
17341
|
+
flush
|
|
17342
|
+
);
|
|
17343
|
+
if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
|
|
17344
|
+
requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
|
|
17345
|
+
if (requestContentLength !== 0 || mustEnforceStreamBody) {
|
|
17346
|
+
let _request = new Request(url2, {
|
|
17347
|
+
method: "POST",
|
|
17348
|
+
body: data,
|
|
17349
|
+
duplex: "half"
|
|
17350
|
+
});
|
|
17351
|
+
let contentTypeHeader;
|
|
17352
|
+
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
17353
|
+
headers.setContentType(contentTypeHeader);
|
|
17354
|
+
}
|
|
17355
|
+
if (_request.body) {
|
|
17356
|
+
const [onProgress, flush] = onUploadProgress && progressEventDecorator(
|
|
17357
|
+
requestContentLength,
|
|
17358
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
17359
|
+
) || [];
|
|
17360
|
+
data = trackRequestStream(_request.body, onProgress, flush);
|
|
17361
|
+
}
|
|
15803
17362
|
}
|
|
17363
|
+
} else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
|
|
17364
|
+
data = trackRequestStream(data);
|
|
17365
|
+
} else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
|
|
17366
|
+
throw new AxiosError_default(
|
|
17367
|
+
"Stream request bodies are not supported by the current fetch implementation",
|
|
17368
|
+
AxiosError_default.ERR_NOT_SUPPORT,
|
|
17369
|
+
config,
|
|
17370
|
+
request
|
|
17371
|
+
);
|
|
15804
17372
|
}
|
|
15805
17373
|
if (!utils_default.isString(withCredentials)) {
|
|
15806
17374
|
withCredentials = withCredentials ? "include" : "omit";
|
|
@@ -15813,19 +17381,47 @@ var factory = (env) => {
|
|
|
15813
17381
|
}
|
|
15814
17382
|
}
|
|
15815
17383
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
15816
|
-
const
|
|
15817
|
-
|
|
17384
|
+
const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(/* @__PURE__ */ Object.create(null), fetchOptions);
|
|
17385
|
+
if (safeFetchOptions) {
|
|
17386
|
+
delete safeFetchOptions.body;
|
|
17387
|
+
delete safeFetchOptions.headers;
|
|
17388
|
+
delete safeFetchOptions.method;
|
|
17389
|
+
delete safeFetchOptions.signal;
|
|
17390
|
+
delete safeFetchOptions.duplex;
|
|
17391
|
+
delete safeFetchOptions.credentials;
|
|
17392
|
+
}
|
|
17393
|
+
const resolvedOptions = Object.assign(/* @__PURE__ */ Object.create(null), safeFetchOptions, {
|
|
15818
17394
|
signal: composedSignal,
|
|
15819
17395
|
method: method.toUpperCase(),
|
|
15820
17396
|
headers: toByteStringHeaderObject(headers.normalize()),
|
|
15821
17397
|
body: data,
|
|
15822
17398
|
duplex: "half",
|
|
15823
17399
|
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
15824
|
-
};
|
|
17400
|
+
});
|
|
17401
|
+
if (isRequestSupported) {
|
|
17402
|
+
utils_default.forEach(requestDefaults, (value, key) => {
|
|
17403
|
+
if (resolvedOptions[key] === void 0) {
|
|
17404
|
+
resolvedOptions[key] = value;
|
|
17405
|
+
}
|
|
17406
|
+
});
|
|
17407
|
+
if (resolvedOptions.signal === void 0) {
|
|
17408
|
+
resolvedOptions.signal = null;
|
|
17409
|
+
}
|
|
17410
|
+
if (resolvedOptions.body === void 0) {
|
|
17411
|
+
resolvedOptions.body = null;
|
|
17412
|
+
}
|
|
17413
|
+
}
|
|
17414
|
+
if (maxRedirects === 0) {
|
|
17415
|
+
resolvedOptions.redirect = "manual";
|
|
17416
|
+
if (safeFetchOptions) {
|
|
17417
|
+
safeFetchOptions.redirect = "manual";
|
|
17418
|
+
}
|
|
17419
|
+
}
|
|
15825
17420
|
request = isRequestSupported && new Request(url2, resolvedOptions);
|
|
15826
|
-
let response = await (isRequestSupported ? _fetch(request,
|
|
17421
|
+
let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url2, resolvedOptions));
|
|
17422
|
+
const responseHeaders = AxiosHeaders_default.from(response.headers);
|
|
15827
17423
|
if (hasMaxContentLength) {
|
|
15828
|
-
const declaredLength = utils_default.toFiniteNumber(
|
|
17424
|
+
const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
|
|
15829
17425
|
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
15830
17426
|
throw new AxiosError_default(
|
|
15831
17427
|
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
@@ -15841,7 +17437,7 @@ var factory = (env) => {
|
|
|
15841
17437
|
["status", "statusText", "headers"].forEach((prop) => {
|
|
15842
17438
|
options[prop] = response[prop];
|
|
15843
17439
|
});
|
|
15844
|
-
const responseContentLength = utils_default.toFiniteNumber(
|
|
17440
|
+
const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
|
|
15845
17441
|
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
15846
17442
|
responseContentLength,
|
|
15847
17443
|
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
@@ -15851,7 +17447,7 @@ var factory = (env) => {
|
|
|
15851
17447
|
if (hasMaxContentLength) {
|
|
15852
17448
|
bytesRead = loadedBytes;
|
|
15853
17449
|
if (bytesRead > maxContentLength) {
|
|
15854
|
-
throw new AxiosError_default(
|
|
17450
|
+
throw pendingResponseError = new AxiosError_default(
|
|
15855
17451
|
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
15856
17452
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
15857
17453
|
config,
|
|
@@ -15911,22 +17507,44 @@ var factory = (env) => {
|
|
|
15911
17507
|
const canceledError = composedSignal.reason;
|
|
15912
17508
|
canceledError.config = config;
|
|
15913
17509
|
request && (canceledError.request = request);
|
|
15914
|
-
err !== canceledError
|
|
17510
|
+
if (err !== canceledError) {
|
|
17511
|
+
Object.defineProperty(canceledError, "cause", {
|
|
17512
|
+
__proto__: null,
|
|
17513
|
+
value: err,
|
|
17514
|
+
writable: true,
|
|
17515
|
+
enumerable: false,
|
|
17516
|
+
configurable: true
|
|
17517
|
+
});
|
|
17518
|
+
}
|
|
15915
17519
|
throw canceledError;
|
|
15916
17520
|
}
|
|
17521
|
+
if (pendingBodyError) {
|
|
17522
|
+
request && !pendingBodyError.request && (pendingBodyError.request = request);
|
|
17523
|
+
throw pendingBodyError;
|
|
17524
|
+
}
|
|
17525
|
+
if (pendingResponseError) {
|
|
17526
|
+
throw pendingResponseError;
|
|
17527
|
+
}
|
|
17528
|
+
if (err instanceof AxiosError_default) {
|
|
17529
|
+
request && !err.request && (err.request = request);
|
|
17530
|
+
throw err;
|
|
17531
|
+
}
|
|
15917
17532
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
err && err.response
|
|
15925
|
-
),
|
|
15926
|
-
{
|
|
15927
|
-
cause: err.cause || err
|
|
15928
|
-
}
|
|
17533
|
+
const networkError = new AxiosError_default(
|
|
17534
|
+
"Network Error",
|
|
17535
|
+
AxiosError_default.ERR_NETWORK,
|
|
17536
|
+
config,
|
|
17537
|
+
request,
|
|
17538
|
+
err && err.response
|
|
15929
17539
|
);
|
|
17540
|
+
Object.defineProperty(networkError, "cause", {
|
|
17541
|
+
__proto__: null,
|
|
17542
|
+
value: err.cause || err,
|
|
17543
|
+
writable: true,
|
|
17544
|
+
enumerable: false,
|
|
17545
|
+
configurable: true
|
|
17546
|
+
});
|
|
17547
|
+
throw networkError;
|
|
15930
17548
|
}
|
|
15931
17549
|
throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
|
|
15932
17550
|
}
|
|
@@ -15934,9 +17552,15 @@ var factory = (env) => {
|
|
|
15934
17552
|
};
|
|
15935
17553
|
var seedCache = /* @__PURE__ */ new Map();
|
|
15936
17554
|
var getFetch = (config) => {
|
|
15937
|
-
|
|
15938
|
-
const
|
|
15939
|
-
|
|
17555
|
+
const env = /* @__PURE__ */ Object.create(null);
|
|
17556
|
+
const configuredEnv = config && utils_default.hasOwnProp(config, "env") && config.env;
|
|
17557
|
+
["fetch", "Request", "Response", "Blob"].forEach((key) => {
|
|
17558
|
+
if (configuredEnv && utils_default.hasOwnProp(configuredEnv, key)) {
|
|
17559
|
+
env[key] = configuredEnv[key];
|
|
17560
|
+
}
|
|
17561
|
+
});
|
|
17562
|
+
const { fetch: fetch2, Request, Response, Blob: Blob2 } = env;
|
|
17563
|
+
const seeds = [Request, Response, fetch2, Blob2];
|
|
15940
17564
|
let len = seeds.length, i = len, seed, target, map = seedCache;
|
|
15941
17565
|
while (i--) {
|
|
15942
17566
|
seed = seeds[i];
|
|
@@ -15948,7 +17572,7 @@ var getFetch = (config) => {
|
|
|
15948
17572
|
};
|
|
15949
17573
|
var adapter = getFetch();
|
|
15950
17574
|
|
|
15951
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
17575
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/adapters.js
|
|
15952
17576
|
var knownAdapters = {
|
|
15953
17577
|
http: http_default,
|
|
15954
17578
|
xhr: xhr_default,
|
|
@@ -15995,7 +17619,7 @@ function getAdapter(adapters, config) {
|
|
|
15995
17619
|
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
15996
17620
|
throw new AxiosError_default(
|
|
15997
17621
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
15998
|
-
|
|
17622
|
+
AxiosError_default.ERR_NOT_SUPPORT
|
|
15999
17623
|
);
|
|
16000
17624
|
}
|
|
16001
17625
|
return adapter2;
|
|
@@ -16013,7 +17637,7 @@ var adapters_default = {
|
|
|
16013
17637
|
adapters: knownAdapters
|
|
16014
17638
|
};
|
|
16015
17639
|
|
|
16016
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
17640
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/dispatchRequest.js
|
|
16017
17641
|
function throwIfCancellationRequested(config) {
|
|
16018
17642
|
if (config.cancelToken) {
|
|
16019
17643
|
config.cancelToken.throwIfRequested();
|
|
@@ -16022,17 +17646,23 @@ function throwIfCancellationRequested(config) {
|
|
|
16022
17646
|
throw new CanceledError_default(null, config);
|
|
16023
17647
|
}
|
|
16024
17648
|
}
|
|
16025
|
-
function
|
|
17649
|
+
function elapsedSince(start) {
|
|
17650
|
+
return Math.max(0, Date.now() - start);
|
|
17651
|
+
}
|
|
17652
|
+
function dispatchRequest(_config) {
|
|
17653
|
+
const config = utils_default.toSafeFlatObject(_config);
|
|
16026
17654
|
throwIfCancellationRequested(config);
|
|
16027
|
-
config.headers = AxiosHeaders_default.from(config
|
|
17655
|
+
config.headers = AxiosHeaders_default.from(utils_default.getSafeProp(config, "headers"));
|
|
16028
17656
|
config.data = transformData.call(config, config.transformRequest);
|
|
16029
17657
|
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
16030
17658
|
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
16031
17659
|
}
|
|
16032
17660
|
const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config);
|
|
17661
|
+
const start = Date.now();
|
|
16033
17662
|
return adapter2(config).then(
|
|
16034
17663
|
function onAdapterResolution(response) {
|
|
16035
17664
|
throwIfCancellationRequested(config);
|
|
17665
|
+
response.duration = elapsedSince(start);
|
|
16036
17666
|
config.response = response;
|
|
16037
17667
|
try {
|
|
16038
17668
|
response.data = transformData.call(config, config.transformResponse, response);
|
|
@@ -16046,6 +17676,7 @@ function dispatchRequest(config) {
|
|
|
16046
17676
|
if (!isCancel(reason)) {
|
|
16047
17677
|
throwIfCancellationRequested(config);
|
|
16048
17678
|
if (reason && reason.response) {
|
|
17679
|
+
reason.response.duration = elapsedSince(start);
|
|
16049
17680
|
config.response = reason.response;
|
|
16050
17681
|
try {
|
|
16051
17682
|
reason.response.data = transformData.call(
|
|
@@ -16064,7 +17695,7 @@ function dispatchRequest(config) {
|
|
|
16064
17695
|
);
|
|
16065
17696
|
}
|
|
16066
17697
|
|
|
16067
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
17698
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/validator.js
|
|
16068
17699
|
var validators = {};
|
|
16069
17700
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
16070
17701
|
validators[type] = function validator(thing) {
|
|
@@ -16102,7 +17733,7 @@ validators.spelling = function spelling(correctSpelling) {
|
|
|
16102
17733
|
};
|
|
16103
17734
|
};
|
|
16104
17735
|
function assertOptions(options, schema, allowUnknown) {
|
|
16105
|
-
if (typeof options !== "object") {
|
|
17736
|
+
if (typeof options !== "object" || options === null) {
|
|
16106
17737
|
throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
16107
17738
|
}
|
|
16108
17739
|
const keys = Object.keys(options);
|
|
@@ -16131,8 +17762,29 @@ var validator_default = {
|
|
|
16131
17762
|
validators
|
|
16132
17763
|
};
|
|
16133
17764
|
|
|
16134
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
17765
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/Axios.js
|
|
16135
17766
|
var validators2 = validator_default.validators;
|
|
17767
|
+
var isHeadersBucket = (value) => {
|
|
17768
|
+
if (value == null || utils_default.isPlainObject(value) || value instanceof AxiosHeaders_default) {
|
|
17769
|
+
return true;
|
|
17770
|
+
}
|
|
17771
|
+
try {
|
|
17772
|
+
return utils_default.isObject(value) && utils_default.getSafeProp(value, Symbol.toStringTag) === "AxiosHeaders" && [
|
|
17773
|
+
"toJSON",
|
|
17774
|
+
"set",
|
|
17775
|
+
"get",
|
|
17776
|
+
"has",
|
|
17777
|
+
"delete",
|
|
17778
|
+
"clear",
|
|
17779
|
+
"normalize",
|
|
17780
|
+
"concat",
|
|
17781
|
+
"toString",
|
|
17782
|
+
Symbol.iterator
|
|
17783
|
+
].every((method) => utils_default.isFunction(utils_default.getSafeProp(value, method)));
|
|
17784
|
+
} catch (e) {
|
|
17785
|
+
return false;
|
|
17786
|
+
}
|
|
17787
|
+
};
|
|
16136
17788
|
var Axios = class {
|
|
16137
17789
|
constructor(instanceConfig) {
|
|
16138
17790
|
this.defaults = instanceConfig || {};
|
|
@@ -16154,24 +17806,27 @@ var Axios = class {
|
|
|
16154
17806
|
return await this._request(configOrUrl, config);
|
|
16155
17807
|
} catch (err) {
|
|
16156
17808
|
if (err instanceof Error) {
|
|
16157
|
-
let dummy = {};
|
|
16158
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
16159
|
-
const stack = (() => {
|
|
16160
|
-
if (!dummy.stack) {
|
|
16161
|
-
return "";
|
|
16162
|
-
}
|
|
16163
|
-
const firstNewlineIndex = dummy.stack.indexOf("\n");
|
|
16164
|
-
return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
|
|
16165
|
-
})();
|
|
16166
17809
|
try {
|
|
17810
|
+
let dummy = {};
|
|
17811
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
17812
|
+
const dummyStack = dummy.stack;
|
|
17813
|
+
let stack = "";
|
|
17814
|
+
if (typeof dummyStack === "string") {
|
|
17815
|
+
const firstNewlineIndex = dummyStack.indexOf("\n");
|
|
17816
|
+
stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1);
|
|
17817
|
+
}
|
|
16167
17818
|
if (!err.stack) {
|
|
16168
17819
|
err.stack = stack;
|
|
16169
17820
|
} else if (stack) {
|
|
16170
17821
|
const firstNewlineIndex = stack.indexOf("\n");
|
|
16171
17822
|
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
|
|
16172
|
-
const
|
|
16173
|
-
|
|
16174
|
-
|
|
17823
|
+
const duplicateCheckSuffix = secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1);
|
|
17824
|
+
const currentStack = String(err.stack);
|
|
17825
|
+
const causeIndex = getCauseStackIndex(err, currentStack);
|
|
17826
|
+
const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex);
|
|
17827
|
+
const causeSection = causeIndex === -1 ? "" : currentStack.slice(causeIndex);
|
|
17828
|
+
if (!stackHead.endsWith(duplicateCheckSuffix)) {
|
|
17829
|
+
err.stack = stackHead + "\n" + stack + causeSection;
|
|
16175
17830
|
}
|
|
16176
17831
|
}
|
|
16177
17832
|
} catch (e) {
|
|
@@ -16196,7 +17851,10 @@ var Axios = class {
|
|
|
16196
17851
|
silentJSONParsing: validators2.transitional(validators2.boolean),
|
|
16197
17852
|
forcedJSONParsing: validators2.transitional(validators2.boolean),
|
|
16198
17853
|
clarifyTimeoutError: validators2.transitional(validators2.boolean),
|
|
16199
|
-
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
|
|
17854
|
+
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean),
|
|
17855
|
+
advertiseZstdAcceptEncoding: validators2.transitional(validators2.boolean),
|
|
17856
|
+
validateStatusUndefinedResolves: validators2.transitional(validators2.boolean),
|
|
17857
|
+
encodeBasicAuthUsername: validators2.transitional(validators2.boolean)
|
|
16200
17858
|
},
|
|
16201
17859
|
false
|
|
16202
17860
|
);
|
|
@@ -16218,7 +17876,7 @@ var Axios = class {
|
|
|
16218
17876
|
}
|
|
16219
17877
|
}
|
|
16220
17878
|
if (config.allowAbsoluteUrls !== void 0) {
|
|
16221
|
-
} else if (this.defaults.allowAbsoluteUrls !== void 0) {
|
|
17879
|
+
} else if (utils_default.hasOwnProp(this.defaults, "allowAbsoluteUrls") && this.defaults.allowAbsoluteUrls !== void 0) {
|
|
16222
17880
|
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
16223
17881
|
} else {
|
|
16224
17882
|
config.allowAbsoluteUrls = true;
|
|
@@ -16231,10 +17889,17 @@ var Axios = class {
|
|
|
16231
17889
|
},
|
|
16232
17890
|
true
|
|
16233
17891
|
);
|
|
16234
|
-
config.method = (config
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
17892
|
+
config.method = (utils_default.getSafeProp(config, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase();
|
|
17893
|
+
const commonHeaders = utils_default.getSafeProp(headers, "common");
|
|
17894
|
+
const methodHeaders = utils_default.getSafeProp(headers, config.method);
|
|
17895
|
+
const contextHeaders = headers && utils_default.merge(
|
|
17896
|
+
isHeadersBucket(commonHeaders) ? commonHeaders : void 0,
|
|
17897
|
+
isHeadersBucket(methodHeaders) ? methodHeaders : void 0
|
|
17898
|
+
);
|
|
17899
|
+
headers && utils_default.forEach(methodList_default.concat("common"), (method) => {
|
|
17900
|
+
if (isHeadersBucket(utils_default.getSafeProp(headers, method))) {
|
|
17901
|
+
delete headers[method];
|
|
17902
|
+
}
|
|
16238
17903
|
});
|
|
16239
17904
|
config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
|
|
16240
17905
|
const requestInterceptorChain = [];
|
|
@@ -16276,16 +17941,31 @@ var Axios = class {
|
|
|
16276
17941
|
const onFulfilled = requestInterceptorChain[i++];
|
|
16277
17942
|
const onRejected = requestInterceptorChain[i++];
|
|
16278
17943
|
try {
|
|
16279
|
-
newConfig = onFulfilled(newConfig);
|
|
17944
|
+
newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
|
|
16280
17945
|
} catch (error) {
|
|
16281
|
-
onRejected
|
|
17946
|
+
if (!onRejected) {
|
|
17947
|
+
promise = Promise.reject(error);
|
|
17948
|
+
break;
|
|
17949
|
+
}
|
|
17950
|
+
try {
|
|
17951
|
+
const rejectedResult = onRejected.call(this, error);
|
|
17952
|
+
if (utils_default.isThenable(rejectedResult)) {
|
|
17953
|
+
promise = Promise.resolve(rejectedResult).then(
|
|
17954
|
+
() => dispatchRequest.call(this, newConfig)
|
|
17955
|
+
);
|
|
17956
|
+
}
|
|
17957
|
+
} catch (rejectedError) {
|
|
17958
|
+
promise = Promise.reject(rejectedError);
|
|
17959
|
+
}
|
|
16282
17960
|
break;
|
|
16283
17961
|
}
|
|
16284
17962
|
}
|
|
16285
|
-
|
|
16286
|
-
|
|
16287
|
-
|
|
16288
|
-
|
|
17963
|
+
if (!promise) {
|
|
17964
|
+
try {
|
|
17965
|
+
promise = dispatchRequest.call(this, newConfig);
|
|
17966
|
+
} catch (error) {
|
|
17967
|
+
promise = Promise.reject(error);
|
|
17968
|
+
}
|
|
16289
17969
|
}
|
|
16290
17970
|
i = 0;
|
|
16291
17971
|
len = responseInterceptorChain.length;
|
|
@@ -16296,24 +17976,24 @@ var Axios = class {
|
|
|
16296
17976
|
}
|
|
16297
17977
|
getUri(config) {
|
|
16298
17978
|
config = mergeConfig(this.defaults, config);
|
|
16299
|
-
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
17979
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
|
|
16300
17980
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
16301
17981
|
}
|
|
16302
17982
|
};
|
|
16303
17983
|
utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
16304
|
-
Axios.prototype[method] = function(url2, config) {
|
|
17984
|
+
Axios.prototype[method] = async function(url2, config) {
|
|
16305
17985
|
return this.request(
|
|
16306
17986
|
mergeConfig(config || {}, {
|
|
16307
17987
|
method,
|
|
16308
17988
|
url: url2,
|
|
16309
|
-
data: (config
|
|
17989
|
+
data: config && utils_default.hasOwnProp(config, "data") ? config.data : void 0
|
|
16310
17990
|
})
|
|
16311
17991
|
);
|
|
16312
17992
|
};
|
|
16313
17993
|
});
|
|
16314
17994
|
utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
|
|
16315
17995
|
function generateHTTPMethod(isForm) {
|
|
16316
|
-
return function httpMethod(url2, data, config) {
|
|
17996
|
+
return async function httpMethod(url2, data, config) {
|
|
16317
17997
|
return this.request(
|
|
16318
17998
|
mergeConfig(config || {}, {
|
|
16319
17999
|
method,
|
|
@@ -16333,7 +18013,7 @@ utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodW
|
|
|
16333
18013
|
});
|
|
16334
18014
|
var Axios_default = Axios;
|
|
16335
18015
|
|
|
16336
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
18016
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CancelToken.js
|
|
16337
18017
|
var CancelToken = class _CancelToken {
|
|
16338
18018
|
constructor(executor) {
|
|
16339
18019
|
if (typeof executor !== "function") {
|
|
@@ -16431,19 +18111,19 @@ var CancelToken = class _CancelToken {
|
|
|
16431
18111
|
};
|
|
16432
18112
|
var CancelToken_default = CancelToken;
|
|
16433
18113
|
|
|
16434
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
18114
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/spread.js
|
|
16435
18115
|
function spread(callback) {
|
|
16436
18116
|
return function wrap(arr) {
|
|
16437
18117
|
return callback.apply(null, arr);
|
|
16438
18118
|
};
|
|
16439
18119
|
}
|
|
16440
18120
|
|
|
16441
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
18121
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAxiosError.js
|
|
16442
18122
|
function isAxiosError(payload) {
|
|
16443
18123
|
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
|
16444
18124
|
}
|
|
16445
18125
|
|
|
16446
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
18126
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
16447
18127
|
var HttpStatusCode = {
|
|
16448
18128
|
Continue: 100,
|
|
16449
18129
|
SwitchingProtocols: 101,
|
|
@@ -16481,14 +18161,22 @@ var HttpStatusCode = {
|
|
|
16481
18161
|
Gone: 410,
|
|
16482
18162
|
LengthRequired: 411,
|
|
16483
18163
|
PreconditionFailed: 412,
|
|
18164
|
+
/**
|
|
18165
|
+
* @deprecated Use `ContentTooLarge` instead.
|
|
18166
|
+
*/
|
|
16484
18167
|
PayloadTooLarge: 413,
|
|
18168
|
+
ContentTooLarge: 413,
|
|
16485
18169
|
UriTooLong: 414,
|
|
16486
18170
|
UnsupportedMediaType: 415,
|
|
16487
18171
|
RangeNotSatisfiable: 416,
|
|
16488
18172
|
ExpectationFailed: 417,
|
|
16489
18173
|
ImATeapot: 418,
|
|
16490
18174
|
MisdirectedRequest: 421,
|
|
18175
|
+
/**
|
|
18176
|
+
* @deprecated Use `UnprocessableContent` instead.
|
|
18177
|
+
*/
|
|
16491
18178
|
UnprocessableEntity: 422,
|
|
18179
|
+
UnprocessableContent: 422,
|
|
16492
18180
|
Locked: 423,
|
|
16493
18181
|
FailedDependency: 424,
|
|
16494
18182
|
TooEarly: 425,
|
|
@@ -16508,6 +18196,7 @@ var HttpStatusCode = {
|
|
|
16508
18196
|
LoopDetected: 508,
|
|
16509
18197
|
NotExtended: 510,
|
|
16510
18198
|
NetworkAuthenticationRequired: 511,
|
|
18199
|
+
WebServerReturnsAnUnknownError: 520,
|
|
16511
18200
|
WebServerIsDown: 521,
|
|
16512
18201
|
ConnectionTimedOut: 522,
|
|
16513
18202
|
OriginIsUnreachable: 523,
|
|
@@ -16516,11 +18205,13 @@ var HttpStatusCode = {
|
|
|
16516
18205
|
InvalidSslCertificate: 526
|
|
16517
18206
|
};
|
|
16518
18207
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
16519
|
-
HttpStatusCode[value]
|
|
18208
|
+
if (HttpStatusCode[value] === void 0) {
|
|
18209
|
+
HttpStatusCode[value] = key;
|
|
18210
|
+
}
|
|
16520
18211
|
});
|
|
16521
18212
|
var HttpStatusCode_default = HttpStatusCode;
|
|
16522
18213
|
|
|
16523
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
18214
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/axios.js
|
|
16524
18215
|
function createInstance(defaultConfig) {
|
|
16525
18216
|
const context = new Axios_default(defaultConfig);
|
|
16526
18217
|
const instance = bind(Axios_default.prototype.request, context);
|
|
@@ -16553,7 +18244,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
|
|
|
16553
18244
|
axios.default = axios;
|
|
16554
18245
|
var axios_default = axios;
|
|
16555
18246
|
|
|
16556
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
18247
|
+
// ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/index.js
|
|
16557
18248
|
var {
|
|
16558
18249
|
Axios: Axios2,
|
|
16559
18250
|
AxiosError: AxiosError2,
|
|
@@ -16574,18 +18265,18 @@ var {
|
|
|
16574
18265
|
create
|
|
16575
18266
|
} = axios_default;
|
|
16576
18267
|
|
|
16577
|
-
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=
|
|
18268
|
+
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
|
|
16578
18269
|
var import_debug2 = __toESM(require_src(), 1);
|
|
16579
18270
|
import { EventEmitter as EventEmitter3 } from "events";
|
|
16580
18271
|
|
|
16581
|
-
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=
|
|
18272
|
+
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
|
|
16582
18273
|
var import_debug = __toESM(require_src(), 1);
|
|
16583
18274
|
import { EventEmitter as EventEmitter2 } from "events";
|
|
16584
18275
|
import fs from "fs";
|
|
16585
18276
|
import net from "net";
|
|
16586
18277
|
import tls from "tls";
|
|
16587
18278
|
|
|
16588
|
-
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=
|
|
18279
|
+
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/HeaderHostTransformer.js
|
|
16589
18280
|
import { Transform } from "stream";
|
|
16590
18281
|
var HeaderHostTransformer = class extends Transform {
|
|
16591
18282
|
host;
|
|
@@ -16603,7 +18294,7 @@ var HeaderHostTransformer = class extends Transform {
|
|
|
16603
18294
|
}
|
|
16604
18295
|
};
|
|
16605
18296
|
|
|
16606
|
-
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=
|
|
18297
|
+
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
|
|
16607
18298
|
var log = (0, import_debug.default)("pipenet:client");
|
|
16608
18299
|
var TunnelCluster = class extends EventEmitter2 {
|
|
16609
18300
|
opts;
|
|
@@ -16703,7 +18394,7 @@ var TunnelCluster = class extends EventEmitter2 {
|
|
|
16703
18394
|
}
|
|
16704
18395
|
};
|
|
16705
18396
|
|
|
16706
|
-
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=
|
|
18397
|
+
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
|
|
16707
18398
|
var log2 = (0, import_debug2.default)("pipenet:client");
|
|
16708
18399
|
var Tunnel = class extends EventEmitter3 {
|
|
16709
18400
|
cachedUrl;
|
|
@@ -16851,7 +18542,7 @@ var Tunnel = class extends EventEmitter3 {
|
|
|
16851
18542
|
}
|
|
16852
18543
|
};
|
|
16853
18544
|
|
|
16854
|
-
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=
|
|
18545
|
+
// ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/pipenet.js
|
|
16855
18546
|
function pipenet(arg1, arg2, arg3) {
|
|
16856
18547
|
const options = typeof arg1 === "object" ? arg1 : { ...arg2, port: arg1 };
|
|
16857
18548
|
const callback = typeof arg1 === "object" ? arg2 : arg3;
|