paisa-mcp 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1548 -448
- package/dist/index.js.map +51 -44
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -9846,7 +9846,15 @@ var require_es_set_tostringtag = __commonJS((exports, module) => {
|
|
|
9846
9846
|
};
|
|
9847
9847
|
});
|
|
9848
9848
|
|
|
9849
|
-
// ../../node_modules/.bun/
|
|
9849
|
+
// ../../node_modules/.bun/hasown@2.0.4/node_modules/hasown/index.js
|
|
9850
|
+
var require_hasown2 = __commonJS((exports, module) => {
|
|
9851
|
+
var call = Function.prototype.call;
|
|
9852
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
9853
|
+
var bind2 = require_function_bind();
|
|
9854
|
+
module.exports = bind2.call(call, $hasOwn);
|
|
9855
|
+
});
|
|
9856
|
+
|
|
9857
|
+
// ../../node_modules/.bun/form-data@4.0.6/node_modules/form-data/lib/populate.js
|
|
9850
9858
|
var require_populate = __commonJS((exports, module) => {
|
|
9851
9859
|
module.exports = function(dst, src) {
|
|
9852
9860
|
Object.keys(src).forEach(function(prop) {
|
|
@@ -9856,7 +9864,7 @@ var require_populate = __commonJS((exports, module) => {
|
|
|
9856
9864
|
};
|
|
9857
9865
|
});
|
|
9858
9866
|
|
|
9859
|
-
// ../../node_modules/.bun/form-data@4.0.
|
|
9867
|
+
// ../../node_modules/.bun/form-data@4.0.6/node_modules/form-data/lib/form_data.js
|
|
9860
9868
|
var require_form_data = __commonJS((exports, module) => {
|
|
9861
9869
|
var CombinedStream = require_combined_stream();
|
|
9862
9870
|
var util = __require("util");
|
|
@@ -9870,8 +9878,11 @@ var require_form_data = __commonJS((exports, module) => {
|
|
|
9870
9878
|
var mime = require_mime_types();
|
|
9871
9879
|
var asynckit = require_asynckit();
|
|
9872
9880
|
var setToStringTag = require_es_set_tostringtag();
|
|
9873
|
-
var hasOwn =
|
|
9881
|
+
var hasOwn = require_hasown2();
|
|
9874
9882
|
var populate = require_populate();
|
|
9883
|
+
function escapeHeaderParam(str) {
|
|
9884
|
+
return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
|
|
9885
|
+
}
|
|
9875
9886
|
function FormData2(options) {
|
|
9876
9887
|
if (!(this instanceof FormData2)) {
|
|
9877
9888
|
return new FormData2(options);
|
|
@@ -9961,7 +9972,7 @@ var require_form_data = __commonJS((exports, module) => {
|
|
|
9961
9972
|
var contentType = this._getContentType(value, options);
|
|
9962
9973
|
var contents = "";
|
|
9963
9974
|
var headers = {
|
|
9964
|
-
"Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
|
|
9975
|
+
"Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
|
|
9965
9976
|
"Content-Type": [].concat(contentType || [])
|
|
9966
9977
|
};
|
|
9967
9978
|
if (typeof options.header === "object") {
|
|
@@ -9994,7 +10005,7 @@ var require_form_data = __commonJS((exports, module) => {
|
|
|
9994
10005
|
filename = path.basename(value.client._httpMessage.path || "");
|
|
9995
10006
|
}
|
|
9996
10007
|
if (filename) {
|
|
9997
|
-
return 'filename="' + filename + '"';
|
|
10008
|
+
return 'filename="' + escapeHeaderParam(filename) + '"';
|
|
9998
10009
|
}
|
|
9999
10010
|
};
|
|
10000
10011
|
FormData2.prototype._getContentType = function(value, options) {
|
|
@@ -48950,17 +48961,94 @@ function toError(value) {
|
|
|
48950
48961
|
return value instanceof Error ? value : new Error(String(value));
|
|
48951
48962
|
}
|
|
48952
48963
|
|
|
48953
|
-
// ../../node_modules/.bun/axios@1.
|
|
48964
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/bind.js
|
|
48954
48965
|
function bind(fn, thisArg) {
|
|
48955
48966
|
return function wrap() {
|
|
48956
48967
|
return fn.apply(thisArg, arguments);
|
|
48957
48968
|
};
|
|
48958
48969
|
}
|
|
48959
48970
|
|
|
48960
|
-
// ../../node_modules/.bun/axios@1.
|
|
48971
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/utils.js
|
|
48961
48972
|
var { toString } = Object.prototype;
|
|
48962
48973
|
var { getPrototypeOf } = Object;
|
|
48963
48974
|
var { iterator, toStringTag } = Symbol;
|
|
48975
|
+
var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
48976
|
+
var isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype");
|
|
48977
|
+
var isPrototypeBoundary = (obj, prototype, source) => obj === Object.prototype || !source && prototype === null;
|
|
48978
|
+
var isSafeAndFullyMutable = (obj) => {
|
|
48979
|
+
if (!Object.isExtensible(obj)) {
|
|
48980
|
+
return false;
|
|
48981
|
+
}
|
|
48982
|
+
const props = Object.getOwnPropertyNames(obj);
|
|
48983
|
+
if (Object.getOwnPropertySymbols) {
|
|
48984
|
+
props.push(...Object.getOwnPropertySymbols(obj));
|
|
48985
|
+
}
|
|
48986
|
+
return props.every((prop) => {
|
|
48987
|
+
if (isUnsafeObjectKey(prop)) {
|
|
48988
|
+
return false;
|
|
48989
|
+
}
|
|
48990
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
|
48991
|
+
return !!descriptor && descriptor.configurable && descriptor.writable === true;
|
|
48992
|
+
});
|
|
48993
|
+
};
|
|
48994
|
+
var hasOwnInPrototypeChain = (thing, prop) => {
|
|
48995
|
+
let obj = thing;
|
|
48996
|
+
const seen = [];
|
|
48997
|
+
while (obj != null) {
|
|
48998
|
+
if (seen.indexOf(obj) !== -1) {
|
|
48999
|
+
return false;
|
|
49000
|
+
}
|
|
49001
|
+
seen.push(obj);
|
|
49002
|
+
const prototype = getPrototypeOf(obj);
|
|
49003
|
+
if (isPrototypeBoundary(obj, prototype, obj === thing)) {
|
|
49004
|
+
return false;
|
|
49005
|
+
}
|
|
49006
|
+
if (hasOwnProperty(obj, prop)) {
|
|
49007
|
+
return true;
|
|
49008
|
+
}
|
|
49009
|
+
obj = prototype;
|
|
49010
|
+
}
|
|
49011
|
+
return false;
|
|
49012
|
+
};
|
|
49013
|
+
var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
|
|
49014
|
+
var toSafeFlatObject = (thing) => {
|
|
49015
|
+
if (thing == null || typeof thing !== "object" && typeof thing !== "function") {
|
|
49016
|
+
return thing;
|
|
49017
|
+
}
|
|
49018
|
+
const sourcePrototype = getPrototypeOf(thing);
|
|
49019
|
+
if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
|
|
49020
|
+
return thing;
|
|
49021
|
+
}
|
|
49022
|
+
const result = Object.create(null);
|
|
49023
|
+
const merged = Object.create(null);
|
|
49024
|
+
const seen = [];
|
|
49025
|
+
let current = thing;
|
|
49026
|
+
while (current != null) {
|
|
49027
|
+
if (seen.indexOf(current) !== -1) {
|
|
49028
|
+
break;
|
|
49029
|
+
}
|
|
49030
|
+
seen.push(current);
|
|
49031
|
+
const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);
|
|
49032
|
+
if (isPrototypeBoundary(current, prototype, current === thing)) {
|
|
49033
|
+
break;
|
|
49034
|
+
}
|
|
49035
|
+
const props = Object.getOwnPropertyNames(current);
|
|
49036
|
+
if (Object.getOwnPropertySymbols) {
|
|
49037
|
+
props.push(...Object.getOwnPropertySymbols(current));
|
|
49038
|
+
}
|
|
49039
|
+
for (const prop of props) {
|
|
49040
|
+
if (isUnsafeObjectKey(prop)) {
|
|
49041
|
+
continue;
|
|
49042
|
+
}
|
|
49043
|
+
if (!hasOwnProperty(merged, prop)) {
|
|
49044
|
+
result[prop] = thing[prop];
|
|
49045
|
+
merged[prop] = true;
|
|
49046
|
+
}
|
|
49047
|
+
}
|
|
49048
|
+
current = prototype;
|
|
49049
|
+
}
|
|
49050
|
+
return result;
|
|
49051
|
+
};
|
|
48964
49052
|
var kindOf = ((cache) => (thing) => {
|
|
48965
49053
|
const str = toString.call(thing);
|
|
48966
49054
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -48991,11 +49079,11 @@ var isNumber = typeOfTest("number");
|
|
|
48991
49079
|
var isObject2 = (thing) => thing !== null && typeof thing === "object";
|
|
48992
49080
|
var isBoolean = (thing) => thing === true || thing === false;
|
|
48993
49081
|
var isPlainObject3 = (val) => {
|
|
48994
|
-
if (
|
|
49082
|
+
if (!isObject2(val)) {
|
|
48995
49083
|
return false;
|
|
48996
49084
|
}
|
|
48997
49085
|
const prototype = getPrototypeOf(val);
|
|
48998
|
-
return (prototype === null || prototype === Object.prototype ||
|
|
49086
|
+
return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
|
|
48999
49087
|
};
|
|
49000
49088
|
var isEmptyObject = (val) => {
|
|
49001
49089
|
if (!isObject2(val) || isBuffer(val)) {
|
|
@@ -49015,6 +49103,7 @@ var isReactNativeBlob = (value) => {
|
|
|
49015
49103
|
var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
49016
49104
|
var isBlob = kindOfTest("Blob");
|
|
49017
49105
|
var isFileList = kindOfTest("FileList");
|
|
49106
|
+
var isSet = kindOfTest("Set");
|
|
49018
49107
|
var isStream = (val) => isObject2(val) && isFunction(val.pipe);
|
|
49019
49108
|
function getGlobal() {
|
|
49020
49109
|
if (typeof globalThis !== "undefined")
|
|
@@ -49107,7 +49196,7 @@ function merge2(...objs) {
|
|
|
49107
49196
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
49108
49197
|
return;
|
|
49109
49198
|
}
|
|
49110
|
-
const targetKey = caseless && findKey(result, key) || key;
|
|
49199
|
+
const targetKey = caseless && typeof key === "string" && findKey(result, key) || key;
|
|
49111
49200
|
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;
|
|
49112
49201
|
if (isPlainObject3(existing) && isPlainObject3(val)) {
|
|
49113
49202
|
result[targetKey] = merge2(existing, val);
|
|
@@ -49120,7 +49209,21 @@ function merge2(...objs) {
|
|
|
49120
49209
|
}
|
|
49121
49210
|
};
|
|
49122
49211
|
for (let i = 0, l = objs.length;i < l; i++) {
|
|
49123
|
-
|
|
49212
|
+
const source = objs[i];
|
|
49213
|
+
if (!source || isBuffer(source)) {
|
|
49214
|
+
continue;
|
|
49215
|
+
}
|
|
49216
|
+
forEach(source, assignValue);
|
|
49217
|
+
if (typeof source !== "object" || isArray(source)) {
|
|
49218
|
+
continue;
|
|
49219
|
+
}
|
|
49220
|
+
const symbols = Object.getOwnPropertySymbols(source);
|
|
49221
|
+
for (let j = 0;j < symbols.length; j++) {
|
|
49222
|
+
const symbol2 = symbols[j];
|
|
49223
|
+
if (propertyIsEnumerable.call(source, symbol2)) {
|
|
49224
|
+
assignValue(source[symbol2], symbol2);
|
|
49225
|
+
}
|
|
49226
|
+
}
|
|
49124
49227
|
}
|
|
49125
49228
|
return result;
|
|
49126
49229
|
}
|
|
@@ -49240,7 +49343,7 @@ var toCamelCase = (str) => {
|
|
|
49240
49343
|
return p1.toUpperCase() + p2;
|
|
49241
49344
|
});
|
|
49242
49345
|
};
|
|
49243
|
-
var
|
|
49346
|
+
var { propertyIsEnumerable } = Object.prototype;
|
|
49244
49347
|
var isRegExp = kindOfTest("RegExp");
|
|
49245
49348
|
var reduceDescriptors = (obj, reducer) => {
|
|
49246
49349
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -49302,11 +49405,20 @@ var toJSONObject = (obj) => {
|
|
|
49302
49405
|
}
|
|
49303
49406
|
if (!("toJSON" in source)) {
|
|
49304
49407
|
visited.add(source);
|
|
49305
|
-
|
|
49306
|
-
|
|
49307
|
-
|
|
49308
|
-
|
|
49309
|
-
|
|
49408
|
+
let target;
|
|
49409
|
+
if (isSet(source)) {
|
|
49410
|
+
target = [];
|
|
49411
|
+
for (const value of source) {
|
|
49412
|
+
const reducedValue = visit2(value);
|
|
49413
|
+
!isUndefined(reducedValue) && target.push(reducedValue);
|
|
49414
|
+
}
|
|
49415
|
+
} else {
|
|
49416
|
+
target = isArray(source) ? [] : {};
|
|
49417
|
+
forEach(source, (value, key) => {
|
|
49418
|
+
const reducedValue = visit2(value);
|
|
49419
|
+
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
49420
|
+
});
|
|
49421
|
+
}
|
|
49310
49422
|
visited.delete(source);
|
|
49311
49423
|
return target;
|
|
49312
49424
|
}
|
|
@@ -49335,6 +49447,7 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
49335
49447
|
})(typeof setImmediate === "function", isFunction(_global.postMessage));
|
|
49336
49448
|
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
49337
49449
|
var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
49450
|
+
var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
|
|
49338
49451
|
var utils_default = {
|
|
49339
49452
|
isArray,
|
|
49340
49453
|
isArrayBuffer,
|
|
@@ -49379,6 +49492,9 @@ var utils_default = {
|
|
|
49379
49492
|
isHTMLForm,
|
|
49380
49493
|
hasOwnProperty,
|
|
49381
49494
|
hasOwnProp: hasOwnProperty,
|
|
49495
|
+
hasOwnInPrototypeChain,
|
|
49496
|
+
getSafeProp,
|
|
49497
|
+
toSafeFlatObject,
|
|
49382
49498
|
reduceDescriptors,
|
|
49383
49499
|
freezeMethods,
|
|
49384
49500
|
toObjectSet,
|
|
@@ -49394,10 +49510,11 @@ var utils_default = {
|
|
|
49394
49510
|
isThenable,
|
|
49395
49511
|
setImmediate: _setImmediate,
|
|
49396
49512
|
asap,
|
|
49397
|
-
isIterable
|
|
49513
|
+
isIterable,
|
|
49514
|
+
isSafeIterable
|
|
49398
49515
|
};
|
|
49399
49516
|
|
|
49400
|
-
// ../../node_modules/.bun/axios@1.
|
|
49517
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/parseHeaders.js
|
|
49401
49518
|
var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
49402
49519
|
"age",
|
|
49403
49520
|
"authorization",
|
|
@@ -49427,23 +49544,24 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
49427
49544
|
i = line.indexOf(":");
|
|
49428
49545
|
key = line.substring(0, i).trim().toLowerCase();
|
|
49429
49546
|
val = line.substring(i + 1).trim();
|
|
49430
|
-
|
|
49547
|
+
const hasKey = utils_default.hasOwnProp(parsed, key);
|
|
49548
|
+
if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) {
|
|
49431
49549
|
return;
|
|
49432
49550
|
}
|
|
49433
49551
|
if (key === "set-cookie") {
|
|
49434
|
-
if (
|
|
49552
|
+
if (hasKey) {
|
|
49435
49553
|
parsed[key].push(val);
|
|
49436
49554
|
} else {
|
|
49437
49555
|
parsed[key] = [val];
|
|
49438
49556
|
}
|
|
49439
49557
|
} else {
|
|
49440
|
-
parsed[key] =
|
|
49558
|
+
parsed[key] = hasKey ? parsed[key] + ", " + val : val;
|
|
49441
49559
|
}
|
|
49442
49560
|
});
|
|
49443
49561
|
return parsed;
|
|
49444
49562
|
};
|
|
49445
49563
|
|
|
49446
|
-
// ../../node_modules/.bun/axios@1.
|
|
49564
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
|
|
49447
49565
|
function trimSPorHTAB(str) {
|
|
49448
49566
|
let start = 0;
|
|
49449
49567
|
let end = str.length;
|
|
@@ -49481,7 +49599,7 @@ function toByteStringHeaderObject(headers) {
|
|
|
49481
49599
|
return byteStringHeaders;
|
|
49482
49600
|
}
|
|
49483
49601
|
|
|
49484
|
-
// ../../node_modules/.bun/axios@1.
|
|
49602
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/AxiosHeaders.js
|
|
49485
49603
|
var $internals = Symbol("internals");
|
|
49486
49604
|
function normalizeHeader(header) {
|
|
49487
49605
|
return header && String(header).trim().toLowerCase();
|
|
@@ -49501,6 +49619,90 @@ function parseTokens(str) {
|
|
|
49501
49619
|
}
|
|
49502
49620
|
return tokens;
|
|
49503
49621
|
}
|
|
49622
|
+
var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
49623
|
+
function trimOWS(value) {
|
|
49624
|
+
let start = 0;
|
|
49625
|
+
let end = value.length;
|
|
49626
|
+
while (start < end) {
|
|
49627
|
+
const code = value.charCodeAt(start);
|
|
49628
|
+
if (code !== 9 && code !== 32) {
|
|
49629
|
+
break;
|
|
49630
|
+
}
|
|
49631
|
+
start += 1;
|
|
49632
|
+
}
|
|
49633
|
+
while (end > start) {
|
|
49634
|
+
const code = value.charCodeAt(end - 1);
|
|
49635
|
+
if (code !== 9 && code !== 32) {
|
|
49636
|
+
break;
|
|
49637
|
+
}
|
|
49638
|
+
end -= 1;
|
|
49639
|
+
}
|
|
49640
|
+
return start === 0 && end === value.length ? value : value.slice(start, end);
|
|
49641
|
+
}
|
|
49642
|
+
function decodeQuotedString(value) {
|
|
49643
|
+
const last = value.length - 1;
|
|
49644
|
+
if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) {
|
|
49645
|
+
return value;
|
|
49646
|
+
}
|
|
49647
|
+
let decoded = "";
|
|
49648
|
+
for (let i = 1;i < last; i++) {
|
|
49649
|
+
const code = value.charCodeAt(i);
|
|
49650
|
+
if (code === 34) {
|
|
49651
|
+
return value;
|
|
49652
|
+
}
|
|
49653
|
+
if (code === 92) {
|
|
49654
|
+
i += 1;
|
|
49655
|
+
if (i >= last) {
|
|
49656
|
+
return value;
|
|
49657
|
+
}
|
|
49658
|
+
}
|
|
49659
|
+
decoded += value[i];
|
|
49660
|
+
}
|
|
49661
|
+
return decoded;
|
|
49662
|
+
}
|
|
49663
|
+
function parseParameters(value) {
|
|
49664
|
+
const parameters = Object.create(null);
|
|
49665
|
+
const str = String(value);
|
|
49666
|
+
let start = 0;
|
|
49667
|
+
let quoted = false;
|
|
49668
|
+
let escaped = false;
|
|
49669
|
+
function parseParameter(end) {
|
|
49670
|
+
const part = trimOWS(str.slice(start, end));
|
|
49671
|
+
const equals = part.indexOf("=");
|
|
49672
|
+
if (equals < 1) {
|
|
49673
|
+
return;
|
|
49674
|
+
}
|
|
49675
|
+
const name = trimOWS(part.slice(0, equals));
|
|
49676
|
+
if (!parameterNameRE.test(name)) {
|
|
49677
|
+
return;
|
|
49678
|
+
}
|
|
49679
|
+
const normalizedName = name.toLowerCase();
|
|
49680
|
+
if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
|
|
49681
|
+
return;
|
|
49682
|
+
}
|
|
49683
|
+
const parameterValue = trimOWS(part.slice(equals + 1));
|
|
49684
|
+
parameters[normalizedName] = decodeQuotedString(parameterValue);
|
|
49685
|
+
}
|
|
49686
|
+
for (let i = 0;i < str.length; i++) {
|
|
49687
|
+
const code = str.charCodeAt(i);
|
|
49688
|
+
if (quoted) {
|
|
49689
|
+
if (escaped) {
|
|
49690
|
+
escaped = false;
|
|
49691
|
+
} else if (code === 92) {
|
|
49692
|
+
escaped = true;
|
|
49693
|
+
} else if (code === 34) {
|
|
49694
|
+
quoted = false;
|
|
49695
|
+
}
|
|
49696
|
+
} else if (code === 34) {
|
|
49697
|
+
quoted = true;
|
|
49698
|
+
} else if (code === 44 || code === 59) {
|
|
49699
|
+
parseParameter(i);
|
|
49700
|
+
start = i + 1;
|
|
49701
|
+
}
|
|
49702
|
+
}
|
|
49703
|
+
parseParameter(str.length);
|
|
49704
|
+
return parameters;
|
|
49705
|
+
}
|
|
49504
49706
|
var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
49505
49707
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
49506
49708
|
if (utils_default.isFunction(filter)) {
|
|
@@ -49545,7 +49747,7 @@ class AxiosHeaders {
|
|
|
49545
49747
|
function setHeader(_value, _header, _rewrite) {
|
|
49546
49748
|
const lHeader = normalizeHeader(_header);
|
|
49547
49749
|
if (!lHeader) {
|
|
49548
|
-
|
|
49750
|
+
return;
|
|
49549
49751
|
}
|
|
49550
49752
|
const key = utils_default.findKey(self2, lHeader);
|
|
49551
49753
|
if (!key || self2[key] === undefined || _rewrite === true || _rewrite === undefined && self2[key] !== false) {
|
|
@@ -49557,13 +49759,19 @@ class AxiosHeaders {
|
|
|
49557
49759
|
setHeaders(header, valueOrRewrite);
|
|
49558
49760
|
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
49559
49761
|
setHeaders(parseHeaders_default(header), valueOrRewrite);
|
|
49560
|
-
} else if (utils_default.isObject(header) && utils_default.
|
|
49561
|
-
let obj =
|
|
49762
|
+
} else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) {
|
|
49763
|
+
let obj = Object.create(null), dest, key;
|
|
49562
49764
|
for (const entry of header) {
|
|
49563
49765
|
if (!utils_default.isArray(entry)) {
|
|
49564
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
49766
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
49767
|
+
}
|
|
49768
|
+
key = entry[0];
|
|
49769
|
+
if (utils_default.hasOwnProp(obj, key)) {
|
|
49770
|
+
dest = obj[key];
|
|
49771
|
+
obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
|
|
49772
|
+
} else {
|
|
49773
|
+
obj[key] = entry[1];
|
|
49565
49774
|
}
|
|
49566
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
49567
49775
|
}
|
|
49568
49776
|
setHeaders(obj, valueOrRewrite);
|
|
49569
49777
|
} else {
|
|
@@ -49671,7 +49879,8 @@ class AxiosHeaders {
|
|
|
49671
49879
|
`);
|
|
49672
49880
|
}
|
|
49673
49881
|
getSetCookie() {
|
|
49674
|
-
|
|
49882
|
+
const value = this.get("set-cookie");
|
|
49883
|
+
return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value];
|
|
49675
49884
|
}
|
|
49676
49885
|
get [Symbol.toStringTag]() {
|
|
49677
49886
|
return "AxiosHeaders";
|
|
@@ -49679,6 +49888,9 @@ class AxiosHeaders {
|
|
|
49679
49888
|
static from(thing) {
|
|
49680
49889
|
return thing instanceof this ? thing : new this(thing);
|
|
49681
49890
|
}
|
|
49891
|
+
static parseParameters(value) {
|
|
49892
|
+
return parseParameters(value);
|
|
49893
|
+
}
|
|
49682
49894
|
static concat(first, ...targets) {
|
|
49683
49895
|
const computed = new this(first);
|
|
49684
49896
|
targets.forEach((target) => computed.set(target));
|
|
@@ -49721,7 +49933,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
|
49721
49933
|
utils_default.freezeMethods(AxiosHeaders);
|
|
49722
49934
|
var AxiosHeaders_default = AxiosHeaders;
|
|
49723
49935
|
|
|
49724
|
-
// ../../node_modules/.bun/axios@1.
|
|
49936
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/AxiosError.js
|
|
49725
49937
|
var REDACTED = "[REDACTED ****]";
|
|
49726
49938
|
function hasOwnOrPrototypeToJSON(source) {
|
|
49727
49939
|
if (utils_default.hasOwnProp(source, "toJSON")) {
|
|
@@ -49777,11 +49989,38 @@ function redactConfig(config2, redactKeys) {
|
|
|
49777
49989
|
};
|
|
49778
49990
|
return visit2(config2);
|
|
49779
49991
|
}
|
|
49992
|
+
function stringifySafely(value) {
|
|
49993
|
+
try {
|
|
49994
|
+
return String(value);
|
|
49995
|
+
} catch (err) {
|
|
49996
|
+
return "";
|
|
49997
|
+
}
|
|
49998
|
+
}
|
|
49999
|
+
function aggregateErrorMessage(error62) {
|
|
50000
|
+
const message = error62.errors.map((entry) => {
|
|
50001
|
+
try {
|
|
50002
|
+
return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
|
|
50003
|
+
} catch (err) {
|
|
50004
|
+
return "";
|
|
50005
|
+
}
|
|
50006
|
+
}).filter(Boolean).join("; ");
|
|
50007
|
+
return message || error62.name || "AggregateError";
|
|
50008
|
+
}
|
|
49780
50009
|
|
|
49781
50010
|
class AxiosError extends Error {
|
|
49782
50011
|
static from(error62, code, config2, request, response, customProps) {
|
|
49783
|
-
|
|
49784
|
-
|
|
50012
|
+
let message = error62.message;
|
|
50013
|
+
if (!message && utils_default.isArray(error62.errors) && error62.errors.length) {
|
|
50014
|
+
message = aggregateErrorMessage(error62);
|
|
50015
|
+
}
|
|
50016
|
+
const axiosError = new AxiosError(message, code || error62.code, config2, request, response);
|
|
50017
|
+
Object.defineProperty(axiosError, "cause", {
|
|
50018
|
+
__proto__: null,
|
|
50019
|
+
value: error62,
|
|
50020
|
+
writable: true,
|
|
50021
|
+
enumerable: false,
|
|
50022
|
+
configurable: true
|
|
50023
|
+
});
|
|
49785
50024
|
axiosError.name = error62.name;
|
|
49786
50025
|
if (error62.status != null && axiosError.status == null) {
|
|
49787
50026
|
axiosError.status = error62.status;
|
|
@@ -49843,11 +50082,22 @@ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
|
49843
50082
|
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
49844
50083
|
var AxiosError_default = AxiosError;
|
|
49845
50084
|
|
|
49846
|
-
// ../../node_modules/.bun/axios@1.
|
|
50085
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/platform/node/classes/FormData.js
|
|
49847
50086
|
var import_form_data = __toESM(require_form_data(), 1);
|
|
49848
50087
|
var FormData_default = import_form_data.default;
|
|
49849
50088
|
|
|
49850
|
-
// ../../node_modules/.bun/axios@1.
|
|
50089
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/platform/node/classes/Buffer.js
|
|
50090
|
+
var Buffer_default = {
|
|
50091
|
+
isBufferAvailable() {
|
|
50092
|
+
return typeof Buffer !== "undefined";
|
|
50093
|
+
},
|
|
50094
|
+
from(value) {
|
|
50095
|
+
return Buffer.from(value);
|
|
50096
|
+
}
|
|
50097
|
+
};
|
|
50098
|
+
|
|
50099
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/toFormData.js
|
|
50100
|
+
var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
49851
50101
|
function isVisitable(thing) {
|
|
49852
50102
|
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
|
|
49853
50103
|
}
|
|
@@ -49873,20 +50123,18 @@ function toFormData(obj, formData, options) {
|
|
|
49873
50123
|
throw new TypeError("target must be an object");
|
|
49874
50124
|
}
|
|
49875
50125
|
formData = formData || new (FormData_default || FormData);
|
|
49876
|
-
|
|
49877
|
-
|
|
49878
|
-
|
|
49879
|
-
|
|
49880
|
-
|
|
49881
|
-
|
|
49882
|
-
|
|
49883
|
-
const
|
|
49884
|
-
const
|
|
49885
|
-
const
|
|
49886
|
-
const indexes = options.indexes;
|
|
49887
|
-
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
49888
|
-
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
50126
|
+
const option = (name, fallback) => {
|
|
50127
|
+
const value = utils_default.getSafeProp(options, name);
|
|
50128
|
+
return utils_default.isUndefined(value) ? fallback : value;
|
|
50129
|
+
};
|
|
50130
|
+
const metaTokens = option("metaTokens", true);
|
|
50131
|
+
const visitor = option("visitor") || defaultVisitor;
|
|
50132
|
+
const dots = option("dots", false);
|
|
50133
|
+
const indexes = option("indexes", false);
|
|
50134
|
+
const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob;
|
|
50135
|
+
const maxDepth = option("maxDepth", DEFAULT_FORM_DATA_MAX_DEPTH);
|
|
49889
50136
|
const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
|
|
50137
|
+
const stack = [];
|
|
49890
50138
|
if (!utils_default.isFunction(visitor)) {
|
|
49891
50139
|
throw new TypeError("visitor must be a function");
|
|
49892
50140
|
}
|
|
@@ -49903,10 +50151,38 @@ function toFormData(obj, formData, options) {
|
|
|
49903
50151
|
throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
|
|
49904
50152
|
}
|
|
49905
50153
|
if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
|
|
49906
|
-
|
|
50154
|
+
if (useBlob && typeof _Blob === "function") {
|
|
50155
|
+
return new _Blob([value]);
|
|
50156
|
+
}
|
|
50157
|
+
if (Buffer_default && Buffer_default.isBufferAvailable()) {
|
|
50158
|
+
return Buffer_default.from(value);
|
|
50159
|
+
}
|
|
50160
|
+
throw new AxiosError_default("Blob is not supported. Use a Buffer instead.", AxiosError_default.ERR_NOT_SUPPORT);
|
|
49907
50161
|
}
|
|
49908
50162
|
return value;
|
|
49909
50163
|
}
|
|
50164
|
+
function throwIfMaxDepthExceeded(depth) {
|
|
50165
|
+
if (depth > maxDepth) {
|
|
50166
|
+
throw new AxiosError_default("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
50167
|
+
}
|
|
50168
|
+
}
|
|
50169
|
+
function stringifyWithDepthLimit(value, depth) {
|
|
50170
|
+
if (maxDepth === Infinity) {
|
|
50171
|
+
return JSON.stringify(value);
|
|
50172
|
+
}
|
|
50173
|
+
const ancestors = [];
|
|
50174
|
+
return JSON.stringify(value, function limitDepth(_key, currentValue) {
|
|
50175
|
+
if (!utils_default.isObject(currentValue)) {
|
|
50176
|
+
return currentValue;
|
|
50177
|
+
}
|
|
50178
|
+
while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
|
|
50179
|
+
ancestors.pop();
|
|
50180
|
+
}
|
|
50181
|
+
ancestors.push(currentValue);
|
|
50182
|
+
throwIfMaxDepthExceeded(depth + ancestors.length - 1);
|
|
50183
|
+
return currentValue;
|
|
50184
|
+
});
|
|
50185
|
+
}
|
|
49910
50186
|
function defaultVisitor(value, key, path) {
|
|
49911
50187
|
let arr = value;
|
|
49912
50188
|
if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
|
|
@@ -49916,7 +50192,7 @@ function toFormData(obj, formData, options) {
|
|
|
49916
50192
|
if (value && !path && typeof value === "object") {
|
|
49917
50193
|
if (utils_default.endsWith(key, "{}")) {
|
|
49918
50194
|
key = metaTokens ? key : key.slice(0, -2);
|
|
49919
|
-
value =
|
|
50195
|
+
value = stringifyWithDepthLimit(value, 1);
|
|
49920
50196
|
} else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
|
|
49921
50197
|
key = removeBrackets(key);
|
|
49922
50198
|
arr.forEach(function each(el, index) {
|
|
@@ -49931,7 +50207,6 @@ function toFormData(obj, formData, options) {
|
|
|
49931
50207
|
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
49932
50208
|
return false;
|
|
49933
50209
|
}
|
|
49934
|
-
const stack = [];
|
|
49935
50210
|
const exposedHelpers = Object.assign(predicates, {
|
|
49936
50211
|
defaultVisitor,
|
|
49937
50212
|
convertValue,
|
|
@@ -49940,11 +50215,9 @@ function toFormData(obj, formData, options) {
|
|
|
49940
50215
|
function build2(value, path, depth = 0) {
|
|
49941
50216
|
if (utils_default.isUndefined(value))
|
|
49942
50217
|
return;
|
|
49943
|
-
|
|
49944
|
-
throw new AxiosError_default("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
49945
|
-
}
|
|
50218
|
+
throwIfMaxDepthExceeded(depth);
|
|
49946
50219
|
if (stack.indexOf(value) !== -1) {
|
|
49947
|
-
throw Error("Circular reference detected in " + path.join("."));
|
|
50220
|
+
throw new Error("Circular reference detected in " + path.join("."));
|
|
49948
50221
|
}
|
|
49949
50222
|
stack.push(value);
|
|
49950
50223
|
utils_default.forEach(value, function each(el, key) {
|
|
@@ -49963,7 +50236,7 @@ function toFormData(obj, formData, options) {
|
|
|
49963
50236
|
}
|
|
49964
50237
|
var toFormData_default = toFormData;
|
|
49965
50238
|
|
|
49966
|
-
// ../../node_modules/.bun/axios@1.
|
|
50239
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
49967
50240
|
function encode3(str) {
|
|
49968
50241
|
const charMap = {
|
|
49969
50242
|
"!": "%21",
|
|
@@ -49986,16 +50259,14 @@ prototype.append = function append(name, value) {
|
|
|
49986
50259
|
this._pairs.push([name, value]);
|
|
49987
50260
|
};
|
|
49988
50261
|
prototype.toString = function toString2(encoder) {
|
|
49989
|
-
const _encode3 = encoder ?
|
|
49990
|
-
return encoder.call(this, value, encode3);
|
|
49991
|
-
} : encode3;
|
|
50262
|
+
const _encode3 = encoder ? (value) => encoder.call(this, value, encode3) : encode3;
|
|
49992
50263
|
return this._pairs.map(function each(pair) {
|
|
49993
50264
|
return _encode3(pair[0]) + "=" + _encode3(pair[1]);
|
|
49994
50265
|
}, "").join("&");
|
|
49995
50266
|
};
|
|
49996
50267
|
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
|
49997
50268
|
|
|
49998
|
-
// ../../node_modules/.bun/axios@1.
|
|
50269
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/buildURL.js
|
|
49999
50270
|
function encode4(val) {
|
|
50000
50271
|
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
50001
50272
|
}
|
|
@@ -50003,11 +50274,12 @@ function buildURL(url2, params, options) {
|
|
|
50003
50274
|
if (!params) {
|
|
50004
50275
|
return url2;
|
|
50005
50276
|
}
|
|
50006
|
-
|
|
50277
|
+
url2 = url2 || "";
|
|
50007
50278
|
const _options = utils_default.isFunction(options) ? {
|
|
50008
50279
|
serialize: options
|
|
50009
50280
|
} : options;
|
|
50010
|
-
const
|
|
50281
|
+
const _encode3 = utils_default.getSafeProp(_options, "encode") || encode4;
|
|
50282
|
+
const serializeFn = utils_default.getSafeProp(_options, "serialize");
|
|
50011
50283
|
let serializedParams;
|
|
50012
50284
|
if (serializeFn) {
|
|
50013
50285
|
serializedParams = serializeFn(params, _options);
|
|
@@ -50024,56 +50296,132 @@ function buildURL(url2, params, options) {
|
|
|
50024
50296
|
return url2;
|
|
50025
50297
|
}
|
|
50026
50298
|
|
|
50027
|
-
// ../../node_modules/.bun/axios@1.
|
|
50299
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/InterceptorManager.js
|
|
50300
|
+
var $internals2 = Symbol("internals");
|
|
50301
|
+
function countHandlers(handlers) {
|
|
50302
|
+
return handlers ? handlers.length : 0;
|
|
50303
|
+
}
|
|
50304
|
+
function trimHandlers(handlers) {
|
|
50305
|
+
if (!handlers) {
|
|
50306
|
+
return;
|
|
50307
|
+
}
|
|
50308
|
+
while (handlers.length && handlers[handlers.length - 1] === null) {
|
|
50309
|
+
handlers.pop();
|
|
50310
|
+
}
|
|
50311
|
+
}
|
|
50312
|
+
function syncHandlerEntries(manager, internals) {
|
|
50313
|
+
const handlers = manager.handlers;
|
|
50314
|
+
const length = countHandlers(handlers);
|
|
50315
|
+
if (handlers !== internals.handlersRef) {
|
|
50316
|
+
internals.handlersRef = handlers;
|
|
50317
|
+
internals.handlerEntries.clear();
|
|
50318
|
+
} else if (length !== internals.handlersLength) {
|
|
50319
|
+
if (!length) {
|
|
50320
|
+
internals.handlerEntries.clear();
|
|
50321
|
+
} else {
|
|
50322
|
+
internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
|
|
50323
|
+
if (handlers[entry.index] !== entry.handler) {
|
|
50324
|
+
internals.handlerEntries.delete(id);
|
|
50325
|
+
}
|
|
50326
|
+
});
|
|
50327
|
+
}
|
|
50328
|
+
}
|
|
50329
|
+
internals.handlersLength = length;
|
|
50330
|
+
}
|
|
50331
|
+
|
|
50028
50332
|
class InterceptorManager {
|
|
50029
50333
|
constructor() {
|
|
50030
50334
|
this.handlers = [];
|
|
50335
|
+
this[$internals2] = {
|
|
50336
|
+
handlersRef: this.handlers,
|
|
50337
|
+
handlersLength: this.handlers.length,
|
|
50338
|
+
handlerEntries: new Map,
|
|
50339
|
+
iterationDepth: 0,
|
|
50340
|
+
nextId: 0
|
|
50341
|
+
};
|
|
50031
50342
|
}
|
|
50032
50343
|
use(fulfilled, rejected, options) {
|
|
50033
|
-
|
|
50344
|
+
const handler = {
|
|
50034
50345
|
fulfilled,
|
|
50035
50346
|
rejected,
|
|
50036
50347
|
synchronous: options ? options.synchronous : false,
|
|
50037
50348
|
runWhen: options ? options.runWhen : null
|
|
50349
|
+
};
|
|
50350
|
+
const internals = this[$internals2];
|
|
50351
|
+
if (this.handlers == null) {
|
|
50352
|
+
this.handlers = [];
|
|
50353
|
+
}
|
|
50354
|
+
syncHandlerEntries(this, internals);
|
|
50355
|
+
const id = internals.nextId++;
|
|
50356
|
+
this.handlers.push(handler);
|
|
50357
|
+
internals.handlerEntries.set(id, {
|
|
50358
|
+
handler,
|
|
50359
|
+
index: this.handlers.length - 1
|
|
50038
50360
|
});
|
|
50039
|
-
|
|
50361
|
+
internals.handlersLength = this.handlers.length;
|
|
50362
|
+
return id;
|
|
50040
50363
|
}
|
|
50041
50364
|
eject(id) {
|
|
50042
|
-
|
|
50043
|
-
|
|
50365
|
+
const internals = this[$internals2];
|
|
50366
|
+
syncHandlerEntries(this, internals);
|
|
50367
|
+
const entry = internals.handlerEntries.get(id);
|
|
50368
|
+
if (entry) {
|
|
50369
|
+
internals.handlerEntries.delete(id);
|
|
50370
|
+
if (this.handlers[entry.index] !== entry.handler) {
|
|
50371
|
+
return;
|
|
50372
|
+
}
|
|
50373
|
+
this.handlers[entry.index] = null;
|
|
50374
|
+
if (!internals.iterationDepth) {
|
|
50375
|
+
trimHandlers(this.handlers);
|
|
50376
|
+
internals.handlersLength = this.handlers.length;
|
|
50377
|
+
}
|
|
50044
50378
|
}
|
|
50045
50379
|
}
|
|
50046
50380
|
clear() {
|
|
50047
50381
|
if (this.handlers) {
|
|
50048
50382
|
this.handlers = [];
|
|
50383
|
+
syncHandlerEntries(this, this[$internals2]);
|
|
50049
50384
|
}
|
|
50050
50385
|
}
|
|
50051
50386
|
forEach(fn) {
|
|
50052
|
-
|
|
50053
|
-
|
|
50054
|
-
|
|
50387
|
+
const internals = this[$internals2];
|
|
50388
|
+
syncHandlerEntries(this, internals);
|
|
50389
|
+
internals.iterationDepth++;
|
|
50390
|
+
try {
|
|
50391
|
+
utils_default.forEach(this.handlers, function forEachHandler(h) {
|
|
50392
|
+
if (h !== null) {
|
|
50393
|
+
fn(h);
|
|
50394
|
+
}
|
|
50395
|
+
});
|
|
50396
|
+
} finally {
|
|
50397
|
+
if (!--internals.iterationDepth) {
|
|
50398
|
+
syncHandlerEntries(this, internals);
|
|
50399
|
+
trimHandlers(this.handlers);
|
|
50400
|
+
internals.handlersLength = countHandlers(this.handlers);
|
|
50055
50401
|
}
|
|
50056
|
-
}
|
|
50402
|
+
}
|
|
50057
50403
|
}
|
|
50058
50404
|
}
|
|
50059
50405
|
var InterceptorManager_default = InterceptorManager;
|
|
50060
50406
|
|
|
50061
|
-
// ../../node_modules/.bun/axios@1.
|
|
50407
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/defaults/transitional.js
|
|
50062
50408
|
var transitional_default = {
|
|
50063
50409
|
silentJSONParsing: true,
|
|
50064
50410
|
forcedJSONParsing: true,
|
|
50065
50411
|
clarifyTimeoutError: false,
|
|
50066
|
-
legacyInterceptorReqResOrdering: true
|
|
50412
|
+
legacyInterceptorReqResOrdering: true,
|
|
50413
|
+
advertiseZstdAcceptEncoding: false,
|
|
50414
|
+
validateStatusUndefinedResolves: true
|
|
50067
50415
|
};
|
|
50068
50416
|
|
|
50069
|
-
// ../../node_modules/.bun/axios@1.
|
|
50417
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/platform/node/index.js
|
|
50070
50418
|
import crypto2 from "crypto";
|
|
50071
50419
|
|
|
50072
|
-
// ../../node_modules/.bun/axios@1.
|
|
50420
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
50073
50421
|
import url2 from "url";
|
|
50074
50422
|
var URLSearchParams_default = url2.URLSearchParams;
|
|
50075
50423
|
|
|
50076
|
-
// ../../node_modules/.bun/axios@1.
|
|
50424
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/platform/node/index.js
|
|
50077
50425
|
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
50078
50426
|
var DIGIT = "0123456789";
|
|
50079
50427
|
var ALPHABET = {
|
|
@@ -50103,7 +50451,7 @@ var node_default = {
|
|
|
50103
50451
|
protocols: ["http", "https", "file", "data"]
|
|
50104
50452
|
};
|
|
50105
50453
|
|
|
50106
|
-
// ../../node_modules/.bun/axios@1.
|
|
50454
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/platform/common/utils.js
|
|
50107
50455
|
var exports_utils = {};
|
|
50108
50456
|
__export(exports_utils, {
|
|
50109
50457
|
origin: () => origin,
|
|
@@ -50120,13 +50468,13 @@ var hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
50120
50468
|
})();
|
|
50121
50469
|
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
50122
50470
|
|
|
50123
|
-
// ../../node_modules/.bun/axios@1.
|
|
50471
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/platform/index.js
|
|
50124
50472
|
var platform_default = {
|
|
50125
50473
|
...exports_utils,
|
|
50126
50474
|
...node_default
|
|
50127
50475
|
};
|
|
50128
50476
|
|
|
50129
|
-
// ../../node_modules/.bun/axios@1.
|
|
50477
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
50130
50478
|
function toURLEncodedForm(data, options) {
|
|
50131
50479
|
return toFormData_default(data, new platform_default.classes.URLSearchParams, {
|
|
50132
50480
|
visitor: function(value, key, path, helpers) {
|
|
@@ -50140,11 +50488,22 @@ function toURLEncodedForm(data, options) {
|
|
|
50140
50488
|
});
|
|
50141
50489
|
}
|
|
50142
50490
|
|
|
50143
|
-
// ../../node_modules/.bun/axios@1.
|
|
50491
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
50492
|
+
var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
|
|
50493
|
+
function throwIfDepthExceeded(index) {
|
|
50494
|
+
if (index > MAX_DEPTH) {
|
|
50495
|
+
throw new AxiosError_default("FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH, AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
50496
|
+
}
|
|
50497
|
+
}
|
|
50144
50498
|
function parsePropPath(name) {
|
|
50145
|
-
|
|
50146
|
-
|
|
50147
|
-
|
|
50499
|
+
const path = [];
|
|
50500
|
+
const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
|
|
50501
|
+
let match;
|
|
50502
|
+
while ((match = pattern.exec(name)) !== null) {
|
|
50503
|
+
throwIfDepthExceeded(path.length);
|
|
50504
|
+
path.push(match[0] === "[]" ? "" : match[1] || match[0]);
|
|
50505
|
+
}
|
|
50506
|
+
return path;
|
|
50148
50507
|
}
|
|
50149
50508
|
function arrayToObject(arr) {
|
|
50150
50509
|
const obj = {};
|
|
@@ -50160,6 +50519,7 @@ function arrayToObject(arr) {
|
|
|
50160
50519
|
}
|
|
50161
50520
|
function formDataToJSON(formData) {
|
|
50162
50521
|
function buildPath(path, value, target, index) {
|
|
50522
|
+
throwIfDepthExceeded(index);
|
|
50163
50523
|
let name = path[index++];
|
|
50164
50524
|
if (name === "__proto__")
|
|
50165
50525
|
return true;
|
|
@@ -50194,9 +50554,25 @@ function formDataToJSON(formData) {
|
|
|
50194
50554
|
}
|
|
50195
50555
|
var formDataToJSON_default = formDataToJSON;
|
|
50196
50556
|
|
|
50197
|
-
// ../../node_modules/.bun/axios@1.
|
|
50557
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/methodList.js
|
|
50558
|
+
var methodList = Object.freeze([
|
|
50559
|
+
"get",
|
|
50560
|
+
"delete",
|
|
50561
|
+
"head",
|
|
50562
|
+
"options",
|
|
50563
|
+
"post",
|
|
50564
|
+
"put",
|
|
50565
|
+
"patch",
|
|
50566
|
+
"purge",
|
|
50567
|
+
"link",
|
|
50568
|
+
"unlink",
|
|
50569
|
+
"query"
|
|
50570
|
+
]);
|
|
50571
|
+
var methodList_default = methodList;
|
|
50572
|
+
|
|
50573
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/defaults/index.js
|
|
50198
50574
|
var own2 = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : undefined;
|
|
50199
|
-
function
|
|
50575
|
+
function stringifySafely2(rawValue, parser, encoder) {
|
|
50200
50576
|
if (utils_default.isString(rawValue)) {
|
|
50201
50577
|
try {
|
|
50202
50578
|
(parser || JSON.parse)(rawValue);
|
|
@@ -50248,7 +50624,7 @@ var defaults = {
|
|
|
50248
50624
|
}
|
|
50249
50625
|
if (isObjectPayload || hasJSONContentType) {
|
|
50250
50626
|
headers.setContentType("application/json", false);
|
|
50251
|
-
return
|
|
50627
|
+
return stringifySafely2(data);
|
|
50252
50628
|
}
|
|
50253
50629
|
return data;
|
|
50254
50630
|
}
|
|
@@ -50298,12 +50674,12 @@ var defaults = {
|
|
|
50298
50674
|
}
|
|
50299
50675
|
}
|
|
50300
50676
|
};
|
|
50301
|
-
utils_default.forEach(
|
|
50677
|
+
utils_default.forEach(methodList_default, (method) => {
|
|
50302
50678
|
defaults.headers[method] = {};
|
|
50303
50679
|
});
|
|
50304
50680
|
var defaults_default = defaults;
|
|
50305
50681
|
|
|
50306
|
-
// ../../node_modules/.bun/axios@1.
|
|
50682
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/transformData.js
|
|
50307
50683
|
function transformData(fns, response) {
|
|
50308
50684
|
const config2 = this || defaults_default;
|
|
50309
50685
|
const context = response || config2;
|
|
@@ -50316,12 +50692,12 @@ function transformData(fns, response) {
|
|
|
50316
50692
|
return data;
|
|
50317
50693
|
}
|
|
50318
50694
|
|
|
50319
|
-
// ../../node_modules/.bun/axios@1.
|
|
50695
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/cancel/isCancel.js
|
|
50320
50696
|
function isCancel(value) {
|
|
50321
50697
|
return !!(value && value.__CANCEL__);
|
|
50322
50698
|
}
|
|
50323
50699
|
|
|
50324
|
-
// ../../node_modules/.bun/axios@1.
|
|
50700
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/cancel/CanceledError.js
|
|
50325
50701
|
class CanceledError extends AxiosError_default {
|
|
50326
50702
|
constructor(message, config2, request) {
|
|
50327
50703
|
super(message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config2, request);
|
|
@@ -50331,7 +50707,7 @@ class CanceledError extends AxiosError_default {
|
|
|
50331
50707
|
}
|
|
50332
50708
|
var CanceledError_default = CanceledError;
|
|
50333
50709
|
|
|
50334
|
-
// ../../node_modules/.bun/axios@1.
|
|
50710
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/settle.js
|
|
50335
50711
|
function settle2(resolve, reject, response) {
|
|
50336
50712
|
const validateStatus2 = response.config.validateStatus;
|
|
50337
50713
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
@@ -50341,7 +50717,7 @@ function settle2(resolve, reject, response) {
|
|
|
50341
50717
|
}
|
|
50342
50718
|
}
|
|
50343
50719
|
|
|
50344
|
-
// ../../node_modules/.bun/axios@1.
|
|
50720
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
50345
50721
|
function isAbsoluteURL(url3) {
|
|
50346
50722
|
if (typeof url3 !== "string") {
|
|
50347
50723
|
return false;
|
|
@@ -50349,15 +50725,64 @@ function isAbsoluteURL(url3) {
|
|
|
50349
50725
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url3);
|
|
50350
50726
|
}
|
|
50351
50727
|
|
|
50352
|
-
// ../../node_modules/.bun/axios@1.
|
|
50728
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/combineURLs.js
|
|
50353
50729
|
function combineURLs(baseURL, relativeURL) {
|
|
50354
|
-
|
|
50730
|
+
if (!relativeURL) {
|
|
50731
|
+
return baseURL;
|
|
50732
|
+
}
|
|
50733
|
+
let end = baseURL.length;
|
|
50734
|
+
while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
|
|
50735
|
+
end--;
|
|
50736
|
+
}
|
|
50737
|
+
return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
|
|
50355
50738
|
}
|
|
50356
50739
|
|
|
50357
|
-
// ../../node_modules/.bun/axios@1.
|
|
50358
|
-
|
|
50740
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js
|
|
50741
|
+
var urlParserControlCharacters = /[\t\n\r]/g;
|
|
50742
|
+
function normalizeURLForProtocolCheck(url3) {
|
|
50743
|
+
if (typeof url3 !== "string") {
|
|
50744
|
+
return url3;
|
|
50745
|
+
}
|
|
50746
|
+
let start = 0;
|
|
50747
|
+
while (start < url3.length && url3.charCodeAt(start) <= 32) {
|
|
50748
|
+
start++;
|
|
50749
|
+
}
|
|
50750
|
+
return url3.slice(start).replace(urlParserControlCharacters, "");
|
|
50751
|
+
}
|
|
50752
|
+
|
|
50753
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/buildFullPath.js
|
|
50754
|
+
var malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
50755
|
+
function redactFragment(fragment) {
|
|
50756
|
+
if (!fragment) {
|
|
50757
|
+
return fragment;
|
|
50758
|
+
}
|
|
50759
|
+
return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => {
|
|
50760
|
+
return `${separator}${parameterName}${REDACTED}`;
|
|
50761
|
+
});
|
|
50762
|
+
}
|
|
50763
|
+
function redactSensitiveURLParts(url3) {
|
|
50764
|
+
const redactedURL = url3.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
|
|
50765
|
+
const fragmentIndex = redactedURL.indexOf("#");
|
|
50766
|
+
const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
|
|
50767
|
+
const redactedURLWithoutFragment = urlWithoutFragment.replace(/([?&][^=&#]*=)[^&#]*/g, `$1${REDACTED}`);
|
|
50768
|
+
if (fragmentIndex === -1) {
|
|
50769
|
+
return redactedURLWithoutFragment;
|
|
50770
|
+
}
|
|
50771
|
+
return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
|
|
50772
|
+
}
|
|
50773
|
+
function assertValidHttpProtocolURL(url3, config2) {
|
|
50774
|
+
if (typeof url3 === "string") {
|
|
50775
|
+
const normalizedURL = normalizeURLForProtocolCheck(url3);
|
|
50776
|
+
if (malformedHttpProtocol.test(normalizedURL)) {
|
|
50777
|
+
throw new AxiosError_default(`Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, AxiosError_default.ERR_INVALID_URL, config2);
|
|
50778
|
+
}
|
|
50779
|
+
}
|
|
50780
|
+
}
|
|
50781
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config2) {
|
|
50782
|
+
assertValidHttpProtocolURL(requestedURL, config2);
|
|
50359
50783
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
50360
50784
|
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
50785
|
+
assertValidHttpProtocolURL(baseURL, config2);
|
|
50361
50786
|
return combineURLs(baseURL, requestedURL);
|
|
50362
50787
|
}
|
|
50363
50788
|
return requestedURL;
|
|
@@ -50430,27 +50855,27 @@ function getEnv(key) {
|
|
|
50430
50855
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
50431
50856
|
}
|
|
50432
50857
|
|
|
50433
|
-
// ../../node_modules/.bun/axios@1.
|
|
50858
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/adapters/http.js
|
|
50434
50859
|
var import_https_proxy_agent = __toESM(require_dist2(), 1);
|
|
50435
50860
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
50436
50861
|
import http from "http";
|
|
50437
50862
|
import https from "https";
|
|
50438
|
-
import
|
|
50439
|
-
import
|
|
50863
|
+
import http22 from "http2";
|
|
50864
|
+
import util3 from "util";
|
|
50440
50865
|
import { resolve as resolvePath } from "path";
|
|
50441
50866
|
import zlib from "zlib";
|
|
50442
50867
|
|
|
50443
|
-
// ../../node_modules/.bun/axios@1.
|
|
50444
|
-
var VERSION = "1.
|
|
50868
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/env/data.js
|
|
50869
|
+
var VERSION = "1.20.0";
|
|
50445
50870
|
|
|
50446
|
-
// ../../node_modules/.bun/axios@1.
|
|
50871
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/parseProtocol.js
|
|
50447
50872
|
function parseProtocol(url3) {
|
|
50448
50873
|
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url3);
|
|
50449
50874
|
return match && match[1] || "";
|
|
50450
50875
|
}
|
|
50451
50876
|
|
|
50452
|
-
// ../../node_modules/.bun/axios@1.
|
|
50453
|
-
var DATA_URL_PATTERN = /^([
|
|
50877
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/fromDataURI.js
|
|
50878
|
+
var DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
|
|
50454
50879
|
function fromDataURI(uri, asBlob, options) {
|
|
50455
50880
|
const _Blob = options && options.Blob || platform_default.classes.Blob;
|
|
50456
50881
|
const protocol = parseProtocol(uri);
|
|
@@ -50467,13 +50892,13 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
50467
50892
|
const params = match[2];
|
|
50468
50893
|
const encoding = match[3] ? "base64" : "utf8";
|
|
50469
50894
|
const body = match[4];
|
|
50470
|
-
let mime;
|
|
50895
|
+
let mime = "";
|
|
50471
50896
|
if (type) {
|
|
50472
50897
|
mime = params ? type + params : type;
|
|
50473
50898
|
} else if (params) {
|
|
50474
50899
|
mime = "text/plain" + params;
|
|
50475
50900
|
}
|
|
50476
|
-
const buffer = Buffer.from(decodeURIComponent(body), encoding);
|
|
50901
|
+
const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
|
|
50477
50902
|
if (asBlob) {
|
|
50478
50903
|
if (!_Blob) {
|
|
50479
50904
|
throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
|
|
@@ -50485,10 +50910,24 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
50485
50910
|
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
|
|
50486
50911
|
}
|
|
50487
50912
|
|
|
50488
|
-
// ../../node_modules/.bun/axios@1.
|
|
50913
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/adapters/http.js
|
|
50489
50914
|
import stream3 from "stream";
|
|
50490
50915
|
|
|
50491
|
-
// ../../node_modules/.bun/axios@1.
|
|
50916
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/setFormDataHeaders.js
|
|
50917
|
+
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
50918
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
50919
|
+
if (policy !== "content-only") {
|
|
50920
|
+
headers.set(formHeaders);
|
|
50921
|
+
return;
|
|
50922
|
+
}
|
|
50923
|
+
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
50924
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
50925
|
+
headers.set(key, val);
|
|
50926
|
+
}
|
|
50927
|
+
});
|
|
50928
|
+
}
|
|
50929
|
+
|
|
50930
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
50492
50931
|
import stream from "stream";
|
|
50493
50932
|
var kInternals = Symbol("internals");
|
|
50494
50933
|
|
|
@@ -50604,14 +51043,14 @@ class AxiosTransformStream extends stream.Transform {
|
|
|
50604
51043
|
}
|
|
50605
51044
|
var AxiosTransformStream_default = AxiosTransformStream;
|
|
50606
51045
|
|
|
50607
|
-
// ../../node_modules/.bun/axios@1.
|
|
51046
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/adapters/http.js
|
|
50608
51047
|
import { EventEmitter } from "events";
|
|
50609
51048
|
|
|
50610
|
-
// ../../node_modules/.bun/axios@1.
|
|
51049
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/formDataToStream.js
|
|
50611
51050
|
import util from "util";
|
|
50612
51051
|
import { Readable } from "stream";
|
|
50613
51052
|
|
|
50614
|
-
// ../../node_modules/.bun/axios@1.
|
|
51053
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/readBlob.js
|
|
50615
51054
|
var { asyncIterator } = Symbol;
|
|
50616
51055
|
var readBlob = async function* (blob) {
|
|
50617
51056
|
if (blob.stream) {
|
|
@@ -50626,7 +51065,7 @@ var readBlob = async function* (blob) {
|
|
|
50626
51065
|
};
|
|
50627
51066
|
var readBlob_default = readBlob;
|
|
50628
51067
|
|
|
50629
|
-
// ../../node_modules/.bun/axios@1.
|
|
51068
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/formDataToStream.js
|
|
50630
51069
|
var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
|
|
50631
51070
|
var textEncoder = typeof TextEncoder === "function" ? new TextEncoder : new util.TextEncoder;
|
|
50632
51071
|
var CRLF = `\r
|
|
@@ -50676,10 +51115,10 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
50676
51115
|
boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET)
|
|
50677
51116
|
} = options || {};
|
|
50678
51117
|
if (!utils_default.isFormData(form)) {
|
|
50679
|
-
throw TypeError("FormData instance required");
|
|
51118
|
+
throw new TypeError("FormData instance required");
|
|
50680
51119
|
}
|
|
50681
51120
|
if (boundary.length < 1 || boundary.length > 70) {
|
|
50682
|
-
throw Error("boundary must be 1-70 characters long");
|
|
51121
|
+
throw new Error("boundary must be 1-70 characters long");
|
|
50683
51122
|
}
|
|
50684
51123
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
50685
51124
|
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
@@ -50708,7 +51147,7 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
50708
51147
|
};
|
|
50709
51148
|
var formDataToStream_default = formDataToStream;
|
|
50710
51149
|
|
|
50711
|
-
// ../../node_modules/.bun/axios@1.
|
|
51150
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
50712
51151
|
import stream2 from "stream";
|
|
50713
51152
|
|
|
50714
51153
|
class ZlibHeaderTransformStream extends stream2.Transform {
|
|
@@ -50731,7 +51170,87 @@ class ZlibHeaderTransformStream extends stream2.Transform {
|
|
|
50731
51170
|
}
|
|
50732
51171
|
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
|
50733
51172
|
|
|
50734
|
-
// ../../node_modules/.bun/axios@1.
|
|
51173
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/Http2Sessions.js
|
|
51174
|
+
import http2 from "http2";
|
|
51175
|
+
import util2 from "util";
|
|
51176
|
+
|
|
51177
|
+
class Http2Sessions {
|
|
51178
|
+
constructor() {
|
|
51179
|
+
this.sessions = Object.create(null);
|
|
51180
|
+
}
|
|
51181
|
+
getSession(authority, options) {
|
|
51182
|
+
options = Object.assign(Object.create(null), {
|
|
51183
|
+
sessionTimeout: 1000
|
|
51184
|
+
}, options);
|
|
51185
|
+
let authoritySessions = this.sessions[authority];
|
|
51186
|
+
if (authoritySessions) {
|
|
51187
|
+
let len = authoritySessions.length;
|
|
51188
|
+
for (let i = 0;i < len; i++) {
|
|
51189
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
51190
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
|
|
51191
|
+
return sessionHandle;
|
|
51192
|
+
}
|
|
51193
|
+
}
|
|
51194
|
+
}
|
|
51195
|
+
const session = http2.connect(authority, options);
|
|
51196
|
+
let removed;
|
|
51197
|
+
let timer;
|
|
51198
|
+
const removeSession = () => {
|
|
51199
|
+
if (removed) {
|
|
51200
|
+
return;
|
|
51201
|
+
}
|
|
51202
|
+
removed = true;
|
|
51203
|
+
if (timer) {
|
|
51204
|
+
clearTimeout(timer);
|
|
51205
|
+
timer = null;
|
|
51206
|
+
}
|
|
51207
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
51208
|
+
while (i--) {
|
|
51209
|
+
if (entries[i][0] === session) {
|
|
51210
|
+
if (len === 1) {
|
|
51211
|
+
delete this.sessions[authority];
|
|
51212
|
+
} else {
|
|
51213
|
+
entries.splice(i, 1);
|
|
51214
|
+
}
|
|
51215
|
+
if (!session.closed) {
|
|
51216
|
+
session.close();
|
|
51217
|
+
}
|
|
51218
|
+
return;
|
|
51219
|
+
}
|
|
51220
|
+
}
|
|
51221
|
+
};
|
|
51222
|
+
const originalRequestFn = session.request;
|
|
51223
|
+
const { sessionTimeout } = options;
|
|
51224
|
+
if (sessionTimeout != null) {
|
|
51225
|
+
let streamsCount = 0;
|
|
51226
|
+
session.request = function() {
|
|
51227
|
+
const stream3 = originalRequestFn.apply(this, arguments);
|
|
51228
|
+
streamsCount++;
|
|
51229
|
+
if (timer) {
|
|
51230
|
+
clearTimeout(timer);
|
|
51231
|
+
timer = null;
|
|
51232
|
+
}
|
|
51233
|
+
stream3.once("close", () => {
|
|
51234
|
+
if (!--streamsCount) {
|
|
51235
|
+
timer = setTimeout(() => {
|
|
51236
|
+
timer = null;
|
|
51237
|
+
removeSession();
|
|
51238
|
+
}, sessionTimeout);
|
|
51239
|
+
}
|
|
51240
|
+
});
|
|
51241
|
+
return stream3;
|
|
51242
|
+
};
|
|
51243
|
+
}
|
|
51244
|
+
session.once("close", removeSession);
|
|
51245
|
+
session.once("error", removeSession);
|
|
51246
|
+
let entry = [session, options];
|
|
51247
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
51248
|
+
return session;
|
|
51249
|
+
}
|
|
51250
|
+
}
|
|
51251
|
+
var Http2Sessions_default = Http2Sessions;
|
|
51252
|
+
|
|
51253
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/callbackify.js
|
|
50735
51254
|
var callbackify = (fn, reducer) => {
|
|
50736
51255
|
return utils_default.isAsyncFn(fn) ? function(...args) {
|
|
50737
51256
|
const cb = args.pop();
|
|
@@ -50746,8 +51265,15 @@ var callbackify = (fn, reducer) => {
|
|
|
50746
51265
|
};
|
|
50747
51266
|
var callbackify_default = callbackify;
|
|
50748
51267
|
|
|
50749
|
-
// ../../node_modules/.bun/axios@1.
|
|
50750
|
-
var LOOPBACK_HOSTNAMES = new Set(["localhost"]);
|
|
51268
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/shouldBypassProxy.js
|
|
51269
|
+
var LOOPBACK_HOSTNAMES = new Set(["localhost", "0.0.0.0"]);
|
|
51270
|
+
var trimTrailingDots = (value) => {
|
|
51271
|
+
let end = value.length;
|
|
51272
|
+
while (end && value.charCodeAt(end - 1) === 46) {
|
|
51273
|
+
end--;
|
|
51274
|
+
}
|
|
51275
|
+
return end === value.length ? value : value.slice(0, end);
|
|
51276
|
+
};
|
|
50751
51277
|
var isIPv4Loopback = (host) => {
|
|
50752
51278
|
const parts = host.split(".");
|
|
50753
51279
|
if (parts.length !== 4)
|
|
@@ -50756,6 +51282,85 @@ var isIPv4Loopback = (host) => {
|
|
|
50756
51282
|
return false;
|
|
50757
51283
|
return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
|
|
50758
51284
|
};
|
|
51285
|
+
var parseIPv4Octet = (text) => {
|
|
51286
|
+
if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
|
|
51287
|
+
const n = parseInt(text.slice(2), 16);
|
|
51288
|
+
return Number.isFinite(n) ? n : null;
|
|
51289
|
+
}
|
|
51290
|
+
if (text.length > 1 && /^0[0-7]+$/.test(text)) {
|
|
51291
|
+
const n = parseInt(text, 8);
|
|
51292
|
+
return Number.isFinite(n) ? n : null;
|
|
51293
|
+
}
|
|
51294
|
+
if (text.length > 1 && /^0[0-9]+$/.test(text)) {
|
|
51295
|
+
return null;
|
|
51296
|
+
}
|
|
51297
|
+
if (/^[0-9]+$/.test(text)) {
|
|
51298
|
+
const n = parseInt(text, 10);
|
|
51299
|
+
return Number.isFinite(n) ? n : null;
|
|
51300
|
+
}
|
|
51301
|
+
return null;
|
|
51302
|
+
};
|
|
51303
|
+
var normalizeIPAddress = (host) => {
|
|
51304
|
+
if (typeof host !== "string" || !host || host.indexOf(":") !== -1) {
|
|
51305
|
+
return host;
|
|
51306
|
+
}
|
|
51307
|
+
let h = host;
|
|
51308
|
+
if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") {
|
|
51309
|
+
h = h.slice(1, -1);
|
|
51310
|
+
}
|
|
51311
|
+
h = trimTrailingDots(h);
|
|
51312
|
+
if (!/^[0-9.xXa-fA-F]+$/.test(h))
|
|
51313
|
+
return host;
|
|
51314
|
+
const parts = h.split(".");
|
|
51315
|
+
if (parts.some((p) => p === ""))
|
|
51316
|
+
return host;
|
|
51317
|
+
if (parts.length === 4) {
|
|
51318
|
+
const octets = parts.map(parseIPv4Octet);
|
|
51319
|
+
if (octets.some((n) => n === null || n < 0 || n > 255))
|
|
51320
|
+
return host;
|
|
51321
|
+
return octets.join(".");
|
|
51322
|
+
}
|
|
51323
|
+
if (parts.length > 4) {
|
|
51324
|
+
return host;
|
|
51325
|
+
}
|
|
51326
|
+
if (parts.length === 1)
|
|
51327
|
+
return host;
|
|
51328
|
+
const literalOctets = parts.slice(0, -1);
|
|
51329
|
+
const tail = parts[parts.length - 1];
|
|
51330
|
+
const tailSlots = 4 - literalOctets.length;
|
|
51331
|
+
const tailValue = parseIPv4Octet(tail);
|
|
51332
|
+
if (tailValue === null)
|
|
51333
|
+
return host;
|
|
51334
|
+
const maxTail = (1 << 8 * tailSlots) - 1;
|
|
51335
|
+
if (tailValue < 0 || tailValue > maxTail)
|
|
51336
|
+
return host;
|
|
51337
|
+
const tailOctets = new Array(tailSlots).fill(0);
|
|
51338
|
+
for (let i = tailSlots - 1, v = tailValue;i >= 0; i--, v >>= 8) {
|
|
51339
|
+
tailOctets[i] = v & 255;
|
|
51340
|
+
}
|
|
51341
|
+
const literal2 = literalOctets.map(parseIPv4Octet);
|
|
51342
|
+
if (literal2.some((n) => n === null || n < 0 || n > 255))
|
|
51343
|
+
return host;
|
|
51344
|
+
return [...literal2, ...tailOctets].join(".");
|
|
51345
|
+
};
|
|
51346
|
+
var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
|
|
51347
|
+
var isIPv6Unspecified = (host) => {
|
|
51348
|
+
if (host === "::")
|
|
51349
|
+
return true;
|
|
51350
|
+
const compressionIndex = host.indexOf("::");
|
|
51351
|
+
if (compressionIndex !== -1) {
|
|
51352
|
+
if (compressionIndex !== host.lastIndexOf("::"))
|
|
51353
|
+
return false;
|
|
51354
|
+
const left = host.slice(0, compressionIndex);
|
|
51355
|
+
const right = host.slice(compressionIndex + 2);
|
|
51356
|
+
const leftGroups = left ? left.split(":") : [];
|
|
51357
|
+
const rightGroups = right ? right.split(":") : [];
|
|
51358
|
+
const explicitGroups = leftGroups.length + rightGroups.length;
|
|
51359
|
+
return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
|
|
51360
|
+
}
|
|
51361
|
+
const groups = host.split(":");
|
|
51362
|
+
return groups.length === 8 && groups.every(isIPv6ZeroGroup);
|
|
51363
|
+
};
|
|
50759
51364
|
var isIPv6Loopback = (host) => {
|
|
50760
51365
|
if (host === "::1")
|
|
50761
51366
|
return true;
|
|
@@ -50784,6 +51389,8 @@ var isLoopback = (host) => {
|
|
|
50784
51389
|
return true;
|
|
50785
51390
|
if (isIPv4Loopback(host))
|
|
50786
51391
|
return true;
|
|
51392
|
+
if (isIPv6Unspecified(host))
|
|
51393
|
+
return true;
|
|
50787
51394
|
return isIPv6Loopback(host);
|
|
50788
51395
|
};
|
|
50789
51396
|
var DEFAULT_PORTS2 = {
|
|
@@ -50831,6 +51438,40 @@ var unmapIPv4MappedIPv6 = (host) => {
|
|
|
50831
51438
|
}
|
|
50832
51439
|
return host;
|
|
50833
51440
|
};
|
|
51441
|
+
var IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/;
|
|
51442
|
+
var ipv4ToBytes = (host) => {
|
|
51443
|
+
const parts = host.split(".");
|
|
51444
|
+
return parts.length === 4 && parts.every((part) => IPV4_OCTET_RE.test(part) && Number(part) <= 255) ? parts.map(Number) : null;
|
|
51445
|
+
};
|
|
51446
|
+
var IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i;
|
|
51447
|
+
var ipv6ToBytes = (host) => {
|
|
51448
|
+
const halves = host.split("::");
|
|
51449
|
+
if (halves.length > 2) {
|
|
51450
|
+
return null;
|
|
51451
|
+
}
|
|
51452
|
+
const groups = halves[0] ? halves[0].split(":") : [];
|
|
51453
|
+
if (halves.length === 2) {
|
|
51454
|
+
const rear = halves[1] ? halves[1].split(":") : [];
|
|
51455
|
+
const missing = 8 - groups.length - rear.length;
|
|
51456
|
+
if (missing < 1) {
|
|
51457
|
+
return null;
|
|
51458
|
+
}
|
|
51459
|
+
groups.push(...new Array(missing).fill("0"), ...rear);
|
|
51460
|
+
}
|
|
51461
|
+
if (groups.length !== 8 || groups.some((group) => !IPV6_GROUP_RE.test(group))) {
|
|
51462
|
+
return null;
|
|
51463
|
+
}
|
|
51464
|
+
return groups.flatMap((group) => {
|
|
51465
|
+
const value = Number.parseInt(group, 16);
|
|
51466
|
+
return [value >> 8 & 255, value & 255];
|
|
51467
|
+
});
|
|
51468
|
+
};
|
|
51469
|
+
var ipToBytes = (host) => {
|
|
51470
|
+
if (typeof host !== "string" || !host) {
|
|
51471
|
+
return null;
|
|
51472
|
+
}
|
|
51473
|
+
return host.indexOf(":") !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host);
|
|
51474
|
+
};
|
|
50834
51475
|
var normalizeNoProxyHost = (hostname3) => {
|
|
50835
51476
|
if (!hostname3) {
|
|
50836
51477
|
return hostname3;
|
|
@@ -50838,7 +51479,89 @@ var normalizeNoProxyHost = (hostname3) => {
|
|
|
50838
51479
|
if (hostname3.charAt(0) === "[" && hostname3.charAt(hostname3.length - 1) === "]") {
|
|
50839
51480
|
hostname3 = hostname3.slice(1, -1);
|
|
50840
51481
|
}
|
|
50841
|
-
|
|
51482
|
+
const trimmed = trimTrailingDots(hostname3);
|
|
51483
|
+
const ipv43 = normalizeIPAddress(trimmed);
|
|
51484
|
+
if (ipv43 !== trimmed) {
|
|
51485
|
+
return ipv43;
|
|
51486
|
+
}
|
|
51487
|
+
return unmapIPv4MappedIPv6(trimmed);
|
|
51488
|
+
};
|
|
51489
|
+
var normalizeCidrBase = (input2) => {
|
|
51490
|
+
let base = input2;
|
|
51491
|
+
const startsBracket = base.charAt(0) === "[";
|
|
51492
|
+
const endsBracket = base.charAt(base.length - 1) === "]";
|
|
51493
|
+
const hasBracket = base.includes("[") || base.includes("]");
|
|
51494
|
+
if (startsBracket || endsBracket) {
|
|
51495
|
+
if (!startsBracket || !endsBracket) {
|
|
51496
|
+
return null;
|
|
51497
|
+
}
|
|
51498
|
+
base = base.slice(1, -1);
|
|
51499
|
+
if (base.indexOf(":") === -1 || base.includes("[") || base.includes("]")) {
|
|
51500
|
+
return null;
|
|
51501
|
+
}
|
|
51502
|
+
} else if (hasBracket) {
|
|
51503
|
+
return null;
|
|
51504
|
+
}
|
|
51505
|
+
if (!base || base.charAt(base.length - 1) === ".") {
|
|
51506
|
+
return null;
|
|
51507
|
+
}
|
|
51508
|
+
const wasIPv6 = base.indexOf(":") !== -1;
|
|
51509
|
+
if (wasIPv6) {
|
|
51510
|
+
try {
|
|
51511
|
+
base = new URL(`http://[${base}]/`).hostname.slice(1, -1);
|
|
51512
|
+
} catch (_err) {
|
|
51513
|
+
return null;
|
|
51514
|
+
}
|
|
51515
|
+
} else {
|
|
51516
|
+
base = normalizeIPAddress(base);
|
|
51517
|
+
if (!ipv4ToBytes(base)) {
|
|
51518
|
+
return null;
|
|
51519
|
+
}
|
|
51520
|
+
}
|
|
51521
|
+
return { normalized: unmapIPv4MappedIPv6(base), wasIPv6 };
|
|
51522
|
+
};
|
|
51523
|
+
var CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/;
|
|
51524
|
+
var parseCidrEntry = (entry) => {
|
|
51525
|
+
if (entry.indexOf("/") === -1) {
|
|
51526
|
+
return;
|
|
51527
|
+
}
|
|
51528
|
+
const match = CIDR_ENTRY_RE.exec(entry);
|
|
51529
|
+
if (!match) {
|
|
51530
|
+
return null;
|
|
51531
|
+
}
|
|
51532
|
+
let prefix = Number(match[2]);
|
|
51533
|
+
const parsedBase = normalizeCidrBase(match[1]);
|
|
51534
|
+
if (!parsedBase) {
|
|
51535
|
+
return null;
|
|
51536
|
+
}
|
|
51537
|
+
const { normalized, wasIPv6 } = parsedBase;
|
|
51538
|
+
if (wasIPv6 && normalized.indexOf(":") === -1) {
|
|
51539
|
+
if (prefix < 96) {
|
|
51540
|
+
return null;
|
|
51541
|
+
}
|
|
51542
|
+
prefix -= 96;
|
|
51543
|
+
}
|
|
51544
|
+
const bytes = ipToBytes(normalized);
|
|
51545
|
+
if (!bytes || prefix > bytes.length * 8) {
|
|
51546
|
+
return null;
|
|
51547
|
+
}
|
|
51548
|
+
return { bytes, prefix };
|
|
51549
|
+
};
|
|
51550
|
+
var isInSubnet = (addressBytes, networkBytes, prefix) => {
|
|
51551
|
+
const fullBytes = prefix >> 3;
|
|
51552
|
+
for (let i = 0;i < fullBytes; i++) {
|
|
51553
|
+
if (addressBytes[i] !== networkBytes[i]) {
|
|
51554
|
+
return false;
|
|
51555
|
+
}
|
|
51556
|
+
}
|
|
51557
|
+
const remainingBits = prefix & 7;
|
|
51558
|
+
if (remainingBits) {
|
|
51559
|
+
const mask = 255 << 8 - remainingBits & 255;
|
|
51560
|
+
if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) {
|
|
51561
|
+
return false;
|
|
51562
|
+
}
|
|
51563
|
+
}
|
|
51564
|
+
return true;
|
|
50842
51565
|
};
|
|
50843
51566
|
function shouldBypassProxy(location) {
|
|
50844
51567
|
let parsed;
|
|
@@ -50856,10 +51579,18 @@ function shouldBypassProxy(location) {
|
|
|
50856
51579
|
}
|
|
50857
51580
|
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
|
|
50858
51581
|
const hostname3 = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
51582
|
+
const hostnameBytes = ipToBytes(hostname3);
|
|
50859
51583
|
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
50860
51584
|
if (!entry) {
|
|
50861
51585
|
return false;
|
|
50862
51586
|
}
|
|
51587
|
+
if (entry === "*") {
|
|
51588
|
+
return true;
|
|
51589
|
+
}
|
|
51590
|
+
const cidr = parseCidrEntry(entry);
|
|
51591
|
+
if (cidr !== undefined) {
|
|
51592
|
+
return cidr !== null && !!hostnameBytes && hostnameBytes.length === cidr.bytes.length && isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix);
|
|
51593
|
+
}
|
|
50863
51594
|
let [entryHost, entryPort] = parseNoProxyEntry(entry);
|
|
50864
51595
|
entryHost = normalizeNoProxyHost(entryHost);
|
|
50865
51596
|
if (!entryHost) {
|
|
@@ -50878,7 +51609,7 @@ function shouldBypassProxy(location) {
|
|
|
50878
51609
|
});
|
|
50879
51610
|
}
|
|
50880
51611
|
|
|
50881
|
-
// ../../node_modules/.bun/axios@1.
|
|
51612
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/speedometer.js
|
|
50882
51613
|
function speedometer(samplesCount, min) {
|
|
50883
51614
|
samplesCount = samplesCount || 10;
|
|
50884
51615
|
const bytes = new Array(samplesCount);
|
|
@@ -50914,7 +51645,7 @@ function speedometer(samplesCount, min) {
|
|
|
50914
51645
|
}
|
|
50915
51646
|
var speedometer_default = speedometer;
|
|
50916
51647
|
|
|
50917
|
-
// ../../node_modules/.bun/axios@1.
|
|
51648
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/throttle.js
|
|
50918
51649
|
function throttle(fn, freq) {
|
|
50919
51650
|
let timestamp = 0;
|
|
50920
51651
|
let threshold = 1000 / freq;
|
|
@@ -50945,21 +51676,22 @@ function throttle(fn, freq) {
|
|
|
50945
51676
|
}
|
|
50946
51677
|
};
|
|
50947
51678
|
const flush = () => lastArgs && invoke(lastArgs);
|
|
50948
|
-
|
|
51679
|
+
const flushWith = (...args) => invoke(args);
|
|
51680
|
+
return [throttled, flush, flushWith];
|
|
50949
51681
|
}
|
|
50950
51682
|
var throttle_default = throttle;
|
|
50951
51683
|
|
|
50952
|
-
// ../../node_modules/.bun/axios@1.
|
|
51684
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/progressEventReducer.js
|
|
50953
51685
|
var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
50954
51686
|
let bytesNotified = 0;
|
|
50955
51687
|
const _speedometer = speedometer_default(50, 250);
|
|
50956
51688
|
return throttle_default((e) => {
|
|
50957
|
-
if (!e ||
|
|
51689
|
+
if (!e || !utils_default.isNumber(e.loaded)) {
|
|
50958
51690
|
return;
|
|
50959
51691
|
}
|
|
50960
51692
|
const rawLoaded = e.loaded;
|
|
50961
51693
|
const total = e.lengthComputable ? e.total : undefined;
|
|
50962
|
-
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
51694
|
+
const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
|
|
50963
51695
|
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
50964
51696
|
const rate = _speedometer(progressBytes);
|
|
50965
51697
|
bytesNotified = Math.max(bytesNotified, loaded);
|
|
@@ -50988,10 +51720,60 @@ var progressEventDecorator = (total, throttled) => {
|
|
|
50988
51720
|
throttled[1]
|
|
50989
51721
|
];
|
|
50990
51722
|
};
|
|
50991
|
-
var asyncDecorator = (fn) => (...args) =>
|
|
51723
|
+
var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args) => scheduler(() => fn(...args));
|
|
50992
51724
|
|
|
50993
|
-
// ../../node_modules/.bun/axios@1.
|
|
50994
|
-
|
|
51725
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
|
51726
|
+
var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
|
|
51727
|
+
var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
51728
|
+
var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
|
|
51729
|
+
var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || charCode >= 97 && charCode <= 122 || charCode >= 48 && charCode <= 57 || charCode === 43 || charCode === 47 || charCode === 45 || charCode === 95;
|
|
51730
|
+
var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
|
|
51731
|
+
var base64Bytes = (significant) => {
|
|
51732
|
+
const groups = Math.floor(significant / 4);
|
|
51733
|
+
const remainder = significant % 4;
|
|
51734
|
+
return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
|
|
51735
|
+
};
|
|
51736
|
+
var estimateBase64BufferAllocation = (body) => {
|
|
51737
|
+
const len = body.length;
|
|
51738
|
+
let padding = 0;
|
|
51739
|
+
if (len > 0 && body.charCodeAt(len - 1) === 61) {
|
|
51740
|
+
padding++;
|
|
51741
|
+
if (len > 1 && body.charCodeAt(len - 2) === 61) {
|
|
51742
|
+
padding++;
|
|
51743
|
+
}
|
|
51744
|
+
}
|
|
51745
|
+
return Math.floor((len - padding) * 3 / 4);
|
|
51746
|
+
};
|
|
51747
|
+
var estimatePercentDecodedBase64Bytes = (body) => {
|
|
51748
|
+
const len = body.length;
|
|
51749
|
+
let significant = 0;
|
|
51750
|
+
let padding = 0;
|
|
51751
|
+
let invalid = false;
|
|
51752
|
+
for (let i = 0;i < len; i++) {
|
|
51753
|
+
let code = body.charCodeAt(i);
|
|
51754
|
+
if (code === 37 && isPercentEncodedByte(body, i, len)) {
|
|
51755
|
+
code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
|
|
51756
|
+
i += 2;
|
|
51757
|
+
}
|
|
51758
|
+
if (isBase64Whitespace(code)) {
|
|
51759
|
+
continue;
|
|
51760
|
+
}
|
|
51761
|
+
if (code === 61) {
|
|
51762
|
+
padding++;
|
|
51763
|
+
continue;
|
|
51764
|
+
}
|
|
51765
|
+
if (!isBase64Char(code) || padding > 0) {
|
|
51766
|
+
invalid = true;
|
|
51767
|
+
continue;
|
|
51768
|
+
}
|
|
51769
|
+
significant++;
|
|
51770
|
+
}
|
|
51771
|
+
if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
|
|
51772
|
+
return estimateBase64BufferAllocation(body);
|
|
51773
|
+
}
|
|
51774
|
+
return base64Bytes(significant);
|
|
51775
|
+
};
|
|
51776
|
+
var estimateDataURLBytes = (url3, estimateBase64) => {
|
|
50995
51777
|
if (!url3 || typeof url3 !== "string")
|
|
50996
51778
|
return 0;
|
|
50997
51779
|
if (!url3.startsWith("data:"))
|
|
@@ -51003,49 +51785,15 @@ function estimateDataURLDecodedBytes(url3) {
|
|
|
51003
51785
|
const body = url3.slice(comma + 1);
|
|
51004
51786
|
const isBase64 = /;base64/i.test(meta3);
|
|
51005
51787
|
if (isBase64) {
|
|
51006
|
-
|
|
51007
|
-
const len = body.length;
|
|
51008
|
-
for (let i = 0;i < len; i++) {
|
|
51009
|
-
if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
51010
|
-
const a = body.charCodeAt(i + 1);
|
|
51011
|
-
const b = body.charCodeAt(i + 2);
|
|
51012
|
-
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);
|
|
51013
|
-
if (isHex) {
|
|
51014
|
-
effectiveLen -= 2;
|
|
51015
|
-
i += 2;
|
|
51016
|
-
}
|
|
51017
|
-
}
|
|
51018
|
-
}
|
|
51019
|
-
let pad = 0;
|
|
51020
|
-
let idx = len - 1;
|
|
51021
|
-
const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && body.charCodeAt(j - 1) === 51 && (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
|
|
51022
|
-
if (idx >= 0) {
|
|
51023
|
-
if (body.charCodeAt(idx) === 61) {
|
|
51024
|
-
pad++;
|
|
51025
|
-
idx--;
|
|
51026
|
-
} else if (tailIsPct3D(idx)) {
|
|
51027
|
-
pad++;
|
|
51028
|
-
idx -= 3;
|
|
51029
|
-
}
|
|
51030
|
-
}
|
|
51031
|
-
if (pad === 1 && idx >= 0) {
|
|
51032
|
-
if (body.charCodeAt(idx) === 61) {
|
|
51033
|
-
pad++;
|
|
51034
|
-
} else if (tailIsPct3D(idx)) {
|
|
51035
|
-
pad++;
|
|
51036
|
-
}
|
|
51037
|
-
}
|
|
51038
|
-
const groups = Math.floor(effectiveLen / 4);
|
|
51039
|
-
const bytes2 = groups * 3 - (pad || 0);
|
|
51040
|
-
return bytes2 > 0 ? bytes2 : 0;
|
|
51041
|
-
}
|
|
51042
|
-
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
|
|
51043
|
-
return Buffer.byteLength(body, "utf8");
|
|
51788
|
+
return estimateBase64(body);
|
|
51044
51789
|
}
|
|
51045
51790
|
let bytes = 0;
|
|
51046
51791
|
for (let i = 0, len = body.length;i < len; i++) {
|
|
51047
51792
|
const c = body.charCodeAt(i);
|
|
51048
|
-
if (c
|
|
51793
|
+
if (c === 37 && isPercentEncodedByte(body, i, len)) {
|
|
51794
|
+
bytes += 1;
|
|
51795
|
+
i += 2;
|
|
51796
|
+
} else if (c < 128) {
|
|
51049
51797
|
bytes += 1;
|
|
51050
51798
|
} else if (c < 2048) {
|
|
51051
51799
|
bytes += 2;
|
|
@@ -51062,9 +51810,16 @@ function estimateDataURLDecodedBytes(url3) {
|
|
|
51062
51810
|
}
|
|
51063
51811
|
}
|
|
51064
51812
|
return bytes;
|
|
51813
|
+
};
|
|
51814
|
+
function estimateDataURLDecodedBytes(url3) {
|
|
51815
|
+
const fragmentIndex = typeof url3 === "string" ? url3.indexOf("#") : -1;
|
|
51816
|
+
return estimateDataURLBytes(fragmentIndex === -1 ? url3 : url3.slice(0, fragmentIndex), estimatePercentDecodedBase64Bytes);
|
|
51817
|
+
}
|
|
51818
|
+
function estimateDataURLBufferAllocation(url3) {
|
|
51819
|
+
return estimateDataURLBytes(url3, estimateBase64BufferAllocation);
|
|
51065
51820
|
}
|
|
51066
51821
|
|
|
51067
|
-
// ../../node_modules/.bun/axios@1.
|
|
51822
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/adapters/http.js
|
|
51068
51823
|
var zlibOptions = {
|
|
51069
51824
|
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
51070
51825
|
finishFlush: zlib.constants.Z_SYNC_FLUSH
|
|
@@ -51073,26 +51828,55 @@ var brotliOptions = {
|
|
|
51073
51828
|
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
51074
51829
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
51075
51830
|
};
|
|
51831
|
+
var zstdOptions = {
|
|
51832
|
+
flush: zlib.constants.ZSTD_e_flush,
|
|
51833
|
+
finishFlush: zlib.constants.ZSTD_e_flush
|
|
51834
|
+
};
|
|
51076
51835
|
var isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress);
|
|
51836
|
+
var isZstdSupported = utils_default.isFunction(zlib.createZstdDecompress);
|
|
51837
|
+
var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
|
|
51838
|
+
var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
|
|
51839
|
+
var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils_default.asap;
|
|
51077
51840
|
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
51078
51841
|
var isHttps = /https:?/;
|
|
51079
|
-
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
51080
|
-
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
51081
|
-
if (policy !== "content-only") {
|
|
51082
|
-
headers.set(formHeaders);
|
|
51083
|
-
return;
|
|
51084
|
-
}
|
|
51085
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
51086
|
-
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
51087
|
-
headers.set(key, val);
|
|
51088
|
-
}
|
|
51089
|
-
});
|
|
51090
|
-
}
|
|
51091
51842
|
var kAxiosSocketListener = Symbol("axios.http.socketListener");
|
|
51092
51843
|
var kAxiosCurrentReq = Symbol("axios.http.currentReq");
|
|
51844
|
+
function handleSocketError(err) {
|
|
51845
|
+
const current = this[kAxiosCurrentReq];
|
|
51846
|
+
if (current && !current.destroyed) {
|
|
51847
|
+
current.destroy(err);
|
|
51848
|
+
}
|
|
51849
|
+
}
|
|
51093
51850
|
var kAxiosInstalledTunnel = Symbol("axios.http.installedTunnel");
|
|
51094
51851
|
var tunnelingAgentCache = new Map;
|
|
51095
51852
|
var tunnelingAgentCacheUser = new WeakMap;
|
|
51853
|
+
var NODE_NATIVE_ENV_PROXY_SUPPORT = {
|
|
51854
|
+
22: 21,
|
|
51855
|
+
24: 5
|
|
51856
|
+
};
|
|
51857
|
+
function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
|
|
51858
|
+
if (!nodeVersion) {
|
|
51859
|
+
return false;
|
|
51860
|
+
}
|
|
51861
|
+
const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
|
|
51862
|
+
if (!Number.isInteger(major) || !Number.isInteger(minor)) {
|
|
51863
|
+
return false;
|
|
51864
|
+
}
|
|
51865
|
+
if (major > 24) {
|
|
51866
|
+
return true;
|
|
51867
|
+
}
|
|
51868
|
+
return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
|
|
51869
|
+
}
|
|
51870
|
+
function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
|
|
51871
|
+
if (!isNodeNativeEnvProxySupported(nodeVersion)) {
|
|
51872
|
+
return false;
|
|
51873
|
+
}
|
|
51874
|
+
const agentOptions = agent && agent.options;
|
|
51875
|
+
return Boolean(agentOptions && utils_default.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null);
|
|
51876
|
+
}
|
|
51877
|
+
function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
|
|
51878
|
+
return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
|
|
51879
|
+
}
|
|
51096
51880
|
function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
51097
51881
|
const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
|
|
51098
51882
|
const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, new Map).get(userHttpsAgent) : tunnelingAgentCache;
|
|
@@ -51101,6 +51885,13 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
|
51101
51885
|
return agent;
|
|
51102
51886
|
const merged = userHttpsAgent && userHttpsAgent.options ? { ...userHttpsAgent.options, ...agentOptions } : agentOptions;
|
|
51103
51887
|
agent = new import_https_proxy_agent.default(merged);
|
|
51888
|
+
if (userHttpsAgent && userHttpsAgent.options) {
|
|
51889
|
+
const originTLSOptions = { ...userHttpsAgent.options };
|
|
51890
|
+
const callback = agent.callback;
|
|
51891
|
+
agent.callback = function axiosTunnelingAgentCallback(req, opts) {
|
|
51892
|
+
return callback.call(this, req, { ...originTLSOptions, ...opts });
|
|
51893
|
+
};
|
|
51894
|
+
}
|
|
51104
51895
|
agent[kAxiosInstalledTunnel] = true;
|
|
51105
51896
|
cache.set(key, agent);
|
|
51106
51897
|
return agent;
|
|
@@ -51122,88 +51913,45 @@ var flushOnFinish = (stream4, [throttled, flush]) => {
|
|
|
51122
51913
|
stream4.on("end", flush).on("error", flush);
|
|
51123
51914
|
return throttled;
|
|
51124
51915
|
};
|
|
51125
|
-
|
|
51126
|
-
class Http2Sessions {
|
|
51127
|
-
constructor() {
|
|
51128
|
-
this.sessions = Object.create(null);
|
|
51129
|
-
}
|
|
51130
|
-
getSession(authority, options) {
|
|
51131
|
-
options = Object.assign({
|
|
51132
|
-
sessionTimeout: 1000
|
|
51133
|
-
}, options);
|
|
51134
|
-
let authoritySessions = this.sessions[authority];
|
|
51135
|
-
if (authoritySessions) {
|
|
51136
|
-
let len = authoritySessions.length;
|
|
51137
|
-
for (let i = 0;i < len; i++) {
|
|
51138
|
-
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
51139
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
|
|
51140
|
-
return sessionHandle;
|
|
51141
|
-
}
|
|
51142
|
-
}
|
|
51143
|
-
}
|
|
51144
|
-
const session = http2.connect(authority, options);
|
|
51145
|
-
let removed;
|
|
51146
|
-
const removeSession = () => {
|
|
51147
|
-
if (removed) {
|
|
51148
|
-
return;
|
|
51149
|
-
}
|
|
51150
|
-
removed = true;
|
|
51151
|
-
let entries = authoritySessions, len = entries.length, i = len;
|
|
51152
|
-
while (i--) {
|
|
51153
|
-
if (entries[i][0] === session) {
|
|
51154
|
-
if (len === 1) {
|
|
51155
|
-
delete this.sessions[authority];
|
|
51156
|
-
} else {
|
|
51157
|
-
entries.splice(i, 1);
|
|
51158
|
-
}
|
|
51159
|
-
if (!session.closed) {
|
|
51160
|
-
session.close();
|
|
51161
|
-
}
|
|
51162
|
-
return;
|
|
51163
|
-
}
|
|
51164
|
-
}
|
|
51165
|
-
};
|
|
51166
|
-
const originalRequestFn = session.request;
|
|
51167
|
-
const { sessionTimeout } = options;
|
|
51168
|
-
if (sessionTimeout != null) {
|
|
51169
|
-
let timer;
|
|
51170
|
-
let streamsCount = 0;
|
|
51171
|
-
session.request = function() {
|
|
51172
|
-
const stream4 = originalRequestFn.apply(this, arguments);
|
|
51173
|
-
streamsCount++;
|
|
51174
|
-
if (timer) {
|
|
51175
|
-
clearTimeout(timer);
|
|
51176
|
-
timer = null;
|
|
51177
|
-
}
|
|
51178
|
-
stream4.once("close", () => {
|
|
51179
|
-
if (!--streamsCount) {
|
|
51180
|
-
timer = setTimeout(() => {
|
|
51181
|
-
timer = null;
|
|
51182
|
-
removeSession();
|
|
51183
|
-
}, sessionTimeout);
|
|
51184
|
-
}
|
|
51185
|
-
});
|
|
51186
|
-
return stream4;
|
|
51187
|
-
};
|
|
51188
|
-
}
|
|
51189
|
-
session.once("close", removeSession);
|
|
51190
|
-
let entry = [session, options];
|
|
51191
|
-
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
51192
|
-
return session;
|
|
51193
|
-
}
|
|
51194
|
-
}
|
|
51195
|
-
var http2Sessions = new Http2Sessions;
|
|
51916
|
+
var http2Sessions = new Http2Sessions_default;
|
|
51196
51917
|
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
|
|
51197
51918
|
if (options.beforeRedirects.proxy) {
|
|
51198
51919
|
options.beforeRedirects.proxy(options);
|
|
51199
51920
|
}
|
|
51921
|
+
if (options.beforeRedirects.auth) {
|
|
51922
|
+
options.beforeRedirects.auth(options);
|
|
51923
|
+
}
|
|
51924
|
+
if (options.beforeRedirects.sensitiveHeaders) {
|
|
51925
|
+
options.beforeRedirects.sensitiveHeaders(options, requestDetails);
|
|
51926
|
+
}
|
|
51200
51927
|
if (options.beforeRedirects.config) {
|
|
51201
51928
|
options.beforeRedirects.config(options, responseDetails, requestDetails);
|
|
51202
51929
|
}
|
|
51203
51930
|
}
|
|
51204
|
-
function
|
|
51931
|
+
function stripMatchingHeaders(headers, sensitiveSet) {
|
|
51932
|
+
if (!headers) {
|
|
51933
|
+
return;
|
|
51934
|
+
}
|
|
51935
|
+
Object.keys(headers).forEach((header) => {
|
|
51936
|
+
if (sensitiveSet.has(header.toLowerCase())) {
|
|
51937
|
+
delete headers[header];
|
|
51938
|
+
}
|
|
51939
|
+
});
|
|
51940
|
+
}
|
|
51941
|
+
function isSameOriginRedirect(redirectOptions, requestDetails) {
|
|
51942
|
+
if (!requestDetails) {
|
|
51943
|
+
return false;
|
|
51944
|
+
}
|
|
51945
|
+
try {
|
|
51946
|
+
return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
|
|
51947
|
+
} catch (e) {
|
|
51948
|
+
return false;
|
|
51949
|
+
}
|
|
51950
|
+
}
|
|
51951
|
+
function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent, allowEnvProxy = true) {
|
|
51205
51952
|
let proxy = configProxy;
|
|
51206
|
-
|
|
51953
|
+
const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
|
|
51954
|
+
if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
|
|
51207
51955
|
const proxyUrl = getProxyForUrl(location);
|
|
51208
51956
|
if (proxyUrl) {
|
|
51209
51957
|
if (!shouldBypassProxy(location)) {
|
|
@@ -51292,8 +52040,9 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
|
|
|
51292
52040
|
}
|
|
51293
52041
|
}
|
|
51294
52042
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
51295
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
|
|
52043
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent, allowEnvProxy);
|
|
51296
52044
|
};
|
|
52045
|
+
return Boolean(proxy || configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent));
|
|
51297
52046
|
}
|
|
51298
52047
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
51299
52048
|
var wrapAsync = (asyncExecutor) => {
|
|
@@ -51319,7 +52068,7 @@ var wrapAsync = (asyncExecutor) => {
|
|
|
51319
52068
|
};
|
|
51320
52069
|
var resolveFamily = ({ address, family }) => {
|
|
51321
52070
|
if (!utils_default.isString(address)) {
|
|
51322
|
-
throw
|
|
52071
|
+
throw new AxiosError_default("address must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
51323
52072
|
}
|
|
51324
52073
|
return {
|
|
51325
52074
|
address,
|
|
@@ -51327,12 +52076,36 @@ var resolveFamily = ({ address, family }) => {
|
|
|
51327
52076
|
};
|
|
51328
52077
|
};
|
|
51329
52078
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
52079
|
+
var normalizedLookupCache = new WeakMap;
|
|
52080
|
+
var normalizeLookup = (lookup) => {
|
|
52081
|
+
let normalized = normalizedLookupCache.get(lookup);
|
|
52082
|
+
if (normalized) {
|
|
52083
|
+
return normalized;
|
|
52084
|
+
}
|
|
52085
|
+
const callbackLookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
52086
|
+
normalized = (hostname3, opt, cb) => {
|
|
52087
|
+
callbackLookup(hostname3, opt, (err, arg0, arg1) => {
|
|
52088
|
+
if (err) {
|
|
52089
|
+
return cb(err);
|
|
52090
|
+
}
|
|
52091
|
+
let addresses;
|
|
52092
|
+
try {
|
|
52093
|
+
addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
52094
|
+
} catch (error62) {
|
|
52095
|
+
return cb(error62);
|
|
52096
|
+
}
|
|
52097
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
52098
|
+
});
|
|
52099
|
+
};
|
|
52100
|
+
normalizedLookupCache.set(lookup, normalized);
|
|
52101
|
+
return normalized;
|
|
52102
|
+
};
|
|
51330
52103
|
var http2Transport = {
|
|
51331
52104
|
request(options, cb) {
|
|
51332
52105
|
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
51333
52106
|
const { http2Options, headers } = options;
|
|
51334
52107
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
51335
|
-
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } =
|
|
52108
|
+
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http22.constants;
|
|
51336
52109
|
const http2Headers = {
|
|
51337
52110
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
51338
52111
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -51356,48 +52129,51 @@ var http2Transport = {
|
|
|
51356
52129
|
};
|
|
51357
52130
|
var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
51358
52131
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
51359
|
-
const own3 = (key) => utils_default.
|
|
52132
|
+
const own3 = (key) => utils_default.getSafeProp(config2, key);
|
|
52133
|
+
const transitional = own3("transitional") || transitional_default;
|
|
51360
52134
|
let data = own3("data");
|
|
51361
52135
|
let lookup = own3("lookup");
|
|
51362
52136
|
let family = own3("family");
|
|
51363
52137
|
let httpVersion = own3("httpVersion");
|
|
51364
52138
|
if (httpVersion === undefined)
|
|
51365
52139
|
httpVersion = 1;
|
|
52140
|
+
const rawHttpVersion = httpVersion;
|
|
51366
52141
|
let http2Options = own3("http2Options");
|
|
52142
|
+
const httpAgent = own3("httpAgent");
|
|
52143
|
+
const httpsAgent = own3("httpsAgent");
|
|
52144
|
+
const configProxy = own3("proxy");
|
|
51367
52145
|
const responseType = own3("responseType");
|
|
51368
52146
|
const responseEncoding = own3("responseEncoding");
|
|
51369
|
-
const
|
|
52147
|
+
const socketPath = own3("socketPath");
|
|
52148
|
+
const method = own3("method").toUpperCase();
|
|
52149
|
+
const maxRedirects = own3("maxRedirects");
|
|
52150
|
+
const maxBodyLength = own3("maxBodyLength");
|
|
52151
|
+
const maxContentLength = own3("maxContentLength");
|
|
52152
|
+
const decompress = own3("decompress");
|
|
51370
52153
|
let isDone;
|
|
51371
52154
|
let rejected = false;
|
|
51372
52155
|
let req;
|
|
51373
52156
|
let connectPhaseTimer;
|
|
51374
|
-
|
|
52157
|
+
try {
|
|
52158
|
+
httpVersion = +httpVersion;
|
|
52159
|
+
} catch (err) {
|
|
52160
|
+
throw new AxiosError_default("Invalid protocol version: value is not a number", AxiosError_default.ERR_BAD_OPTION_VALUE, config2);
|
|
52161
|
+
}
|
|
51375
52162
|
if (Number.isNaN(httpVersion)) {
|
|
51376
|
-
throw
|
|
52163
|
+
throw new AxiosError_default(`Invalid protocol version: '${rawHttpVersion}' is not a number`, AxiosError_default.ERR_BAD_OPTION_VALUE, config2);
|
|
51377
52164
|
}
|
|
51378
52165
|
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
51379
|
-
throw
|
|
52166
|
+
throw new AxiosError_default(`Unsupported protocol version '${httpVersion}'`, AxiosError_default.ERR_BAD_OPTION_VALUE, config2);
|
|
51380
52167
|
}
|
|
51381
52168
|
const isHttp2 = httpVersion === 2;
|
|
51382
52169
|
if (lookup) {
|
|
51383
|
-
|
|
51384
|
-
lookup = (hostname3, opt, cb) => {
|
|
51385
|
-
_lookup(hostname3, opt, (err, arg0, arg1) => {
|
|
51386
|
-
if (err) {
|
|
51387
|
-
return cb(err);
|
|
51388
|
-
}
|
|
51389
|
-
const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
51390
|
-
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
51391
|
-
});
|
|
51392
|
-
};
|
|
52170
|
+
lookup = normalizeLookup(lookup);
|
|
51393
52171
|
}
|
|
51394
52172
|
const abortEmitter = new EventEmitter;
|
|
51395
52173
|
function abort(reason) {
|
|
51396
52174
|
try {
|
|
51397
52175
|
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config2, req) : reason);
|
|
51398
|
-
} catch (err) {
|
|
51399
|
-
console.warn("emit error", err);
|
|
51400
|
-
}
|
|
52176
|
+
} catch (err) {}
|
|
51401
52177
|
}
|
|
51402
52178
|
function clearConnectPhaseTimer() {
|
|
51403
52179
|
if (connectPhaseTimer) {
|
|
@@ -51406,10 +52182,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51406
52182
|
}
|
|
51407
52183
|
}
|
|
51408
52184
|
function createTimeoutError() {
|
|
51409
|
-
|
|
51410
|
-
|
|
51411
|
-
|
|
51412
|
-
|
|
52185
|
+
const configTimeout = own3("timeout");
|
|
52186
|
+
let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
|
|
52187
|
+
const configTimeoutErrorMessage = own3("timeoutErrorMessage");
|
|
52188
|
+
if (configTimeoutErrorMessage) {
|
|
52189
|
+
timeoutErrorMessage = configTimeoutErrorMessage;
|
|
51413
52190
|
}
|
|
51414
52191
|
return new AxiosError_default(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, config2, req);
|
|
51415
52192
|
}
|
|
@@ -51448,15 +52225,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51448
52225
|
onFinished();
|
|
51449
52226
|
}
|
|
51450
52227
|
});
|
|
51451
|
-
const fullPath = buildFullPath(
|
|
51452
|
-
const
|
|
52228
|
+
const fullPath = buildFullPath(own3("baseURL"), own3("url"), own3("allowAbsoluteUrls"), config2);
|
|
52229
|
+
const urlBase = socketPath ? "http://localhost" : platform_default.hasBrowserEnv ? platform_default.origin : undefined;
|
|
52230
|
+
const parsed = new URL(fullPath, urlBase);
|
|
51453
52231
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
51454
52232
|
if (protocol === "data:") {
|
|
51455
|
-
if (
|
|
51456
|
-
const dataUrl = String(
|
|
51457
|
-
const estimated =
|
|
51458
|
-
if (estimated >
|
|
51459
|
-
return reject(new AxiosError_default("maxContentLength size of " +
|
|
52233
|
+
if (maxContentLength > -1) {
|
|
52234
|
+
const dataUrl = String(own3("url") || fullPath || "");
|
|
52235
|
+
const estimated = estimateDataURLBufferAllocation(dataUrl);
|
|
52236
|
+
if (estimated > maxContentLength) {
|
|
52237
|
+
return reject(new AxiosError_default("maxContentLength size of " + maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config2));
|
|
51460
52238
|
}
|
|
51461
52239
|
}
|
|
51462
52240
|
let convertedData;
|
|
@@ -51469,7 +52247,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51469
52247
|
});
|
|
51470
52248
|
}
|
|
51471
52249
|
try {
|
|
51472
|
-
convertedData = fromDataURI(
|
|
52250
|
+
convertedData = fromDataURI(own3("url"), responseType === "blob", {
|
|
51473
52251
|
Blob: config2.env && config2.env.Blob
|
|
51474
52252
|
});
|
|
51475
52253
|
} catch (err) {
|
|
@@ -51512,7 +52290,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51512
52290
|
setFormDataHeaders(headers, data.getHeaders(), own3("formDataHeaderPolicy"));
|
|
51513
52291
|
if (!headers.hasContentLength()) {
|
|
51514
52292
|
try {
|
|
51515
|
-
const knownLength = await
|
|
52293
|
+
const knownLength = await util3.promisify(data.getLength).call(data);
|
|
51516
52294
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
51517
52295
|
} catch (e) {}
|
|
51518
52296
|
}
|
|
@@ -51529,7 +52307,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51529
52307
|
return reject(new AxiosError_default("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError_default.ERR_BAD_REQUEST, config2));
|
|
51530
52308
|
}
|
|
51531
52309
|
headers.setContentLength(data.length, false);
|
|
51532
|
-
if (
|
|
52310
|
+
if (maxBodyLength > -1 && data.length > maxBodyLength) {
|
|
51533
52311
|
return reject(new AxiosError_default("Request body larger than maxBodyLength limit", AxiosError_default.ERR_BAD_REQUEST, config2));
|
|
51534
52312
|
}
|
|
51535
52313
|
}
|
|
@@ -51550,16 +52328,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51550
52328
|
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
|
51551
52329
|
})
|
|
51552
52330
|
], utils_default.noop);
|
|
51553
|
-
onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
|
|
52331
|
+
onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3))));
|
|
51554
52332
|
}
|
|
51555
52333
|
let auth = undefined;
|
|
51556
52334
|
const configAuth = own3("auth");
|
|
51557
52335
|
if (configAuth) {
|
|
51558
|
-
const username = configAuth
|
|
51559
|
-
const password = configAuth
|
|
52336
|
+
const username = utils_default.getSafeProp(configAuth, "username") || "";
|
|
52337
|
+
const password = utils_default.getSafeProp(configAuth, "password") || "";
|
|
51560
52338
|
auth = username + ":" + password;
|
|
51561
52339
|
}
|
|
51562
|
-
if (!auth && parsed.username) {
|
|
52340
|
+
if (!auth && (parsed.username || parsed.password)) {
|
|
51563
52341
|
const urlUsername = decodeURIComponentSafe(parsed.username);
|
|
51564
52342
|
const urlPassword = decodeURIComponentSafe(parsed.password);
|
|
51565
52343
|
auth = urlUsername + ":" + urlPassword;
|
|
@@ -51567,74 +52345,117 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51567
52345
|
auth && headers.delete("authorization");
|
|
51568
52346
|
let path;
|
|
51569
52347
|
try {
|
|
51570
|
-
path = buildURL(parsed.pathname + parsed.search,
|
|
52348
|
+
path = buildURL(parsed.pathname + parsed.search, own3("params"), own3("paramsSerializer")).replace(/^\?/, "");
|
|
51571
52349
|
} catch (err) {
|
|
51572
|
-
|
|
51573
|
-
|
|
51574
|
-
|
|
51575
|
-
|
|
51576
|
-
|
|
52350
|
+
return reject(AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config2, null, null, {
|
|
52351
|
+
url: own3("url"),
|
|
52352
|
+
exists: true
|
|
52353
|
+
}));
|
|
52354
|
+
}
|
|
52355
|
+
headers.set("Accept-Encoding", utils_default.hasOwnProp(transitional, "advertiseZstdAcceptEncoding") && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
|
|
52356
|
+
if (isHttp2 && lookup) {
|
|
52357
|
+
http2Options = Object.assign(Object.create(null), http2Options, { lookup });
|
|
51577
52358
|
}
|
|
51578
|
-
headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
|
|
51579
52359
|
const options = Object.assign(Object.create(null), {
|
|
51580
52360
|
path,
|
|
51581
52361
|
method,
|
|
51582
52362
|
headers: toByteStringHeaderObject(headers),
|
|
51583
|
-
agents: { http:
|
|
52363
|
+
agents: { http: httpAgent, https: httpsAgent },
|
|
51584
52364
|
auth,
|
|
51585
52365
|
protocol,
|
|
51586
52366
|
family,
|
|
51587
52367
|
beforeRedirect: dispatchBeforeRedirect,
|
|
51588
52368
|
beforeRedirects: Object.create(null),
|
|
51589
|
-
http2Options
|
|
52369
|
+
http2Options,
|
|
52370
|
+
createConnection: undefined
|
|
51590
52371
|
});
|
|
51591
52372
|
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
51592
|
-
|
|
51593
|
-
|
|
52373
|
+
let proxyApplied = false;
|
|
52374
|
+
if (socketPath) {
|
|
52375
|
+
if (typeof socketPath !== "string") {
|
|
51594
52376
|
return reject(new AxiosError_default("socketPath must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE, config2));
|
|
51595
52377
|
}
|
|
51596
|
-
|
|
51597
|
-
|
|
51598
|
-
const
|
|
52378
|
+
const allowedSocketPaths = own3("allowedSocketPaths");
|
|
52379
|
+
if (allowedSocketPaths != null) {
|
|
52380
|
+
const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
|
|
52381
|
+
const resolvedSocket = resolvePath(socketPath);
|
|
51599
52382
|
const isAllowed = allowed.some((entry) => typeof entry === "string" && resolvePath(entry) === resolvedSocket);
|
|
51600
52383
|
if (!isAllowed) {
|
|
51601
|
-
return reject(new AxiosError_default(`socketPath "${
|
|
52384
|
+
return reject(new AxiosError_default(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError_default.ERR_BAD_OPTION_VALUE, config2));
|
|
51602
52385
|
}
|
|
51603
52386
|
}
|
|
51604
|
-
options.socketPath =
|
|
52387
|
+
options.socketPath = socketPath;
|
|
51605
52388
|
} else {
|
|
51606
52389
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
51607
52390
|
options.port = parsed.port;
|
|
51608
|
-
setProxy(options,
|
|
52391
|
+
proxyApplied = setProxy(options, configProxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, httpsAgent, httpAgent, !isHttp2);
|
|
51609
52392
|
}
|
|
51610
52393
|
let transport;
|
|
51611
52394
|
let isNativeTransport = false;
|
|
52395
|
+
let transportEnforcesMaxBodyLength = false;
|
|
51612
52396
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
51613
52397
|
if (options.agent == null) {
|
|
51614
|
-
options.agent = isHttpsRequest ?
|
|
52398
|
+
options.agent = isHttpsRequest ? httpsAgent : httpAgent;
|
|
51615
52399
|
}
|
|
51616
52400
|
if (isHttp2) {
|
|
52401
|
+
if (proxyApplied) {
|
|
52402
|
+
return reject(new AxiosError_default("HTTP/2 requests with a proxy are not supported", AxiosError_default.ERR_NOT_SUPPORT, config2));
|
|
52403
|
+
}
|
|
51617
52404
|
transport = http2Transport;
|
|
51618
52405
|
} else {
|
|
51619
52406
|
const configTransport = own3("transport");
|
|
51620
52407
|
if (configTransport) {
|
|
51621
52408
|
transport = configTransport;
|
|
51622
|
-
} else if (
|
|
52409
|
+
} else if (maxRedirects === 0) {
|
|
51623
52410
|
transport = isHttpsRequest ? https : http;
|
|
51624
52411
|
isNativeTransport = true;
|
|
51625
52412
|
} else {
|
|
51626
|
-
|
|
51627
|
-
|
|
52413
|
+
transportEnforcesMaxBodyLength = true;
|
|
52414
|
+
options.sensitiveHeaders = [];
|
|
52415
|
+
if (maxRedirects) {
|
|
52416
|
+
options.maxRedirects = maxRedirects;
|
|
51628
52417
|
}
|
|
51629
52418
|
const configBeforeRedirect = own3("beforeRedirect");
|
|
51630
52419
|
if (configBeforeRedirect) {
|
|
51631
52420
|
options.beforeRedirects.config = configBeforeRedirect;
|
|
51632
52421
|
}
|
|
52422
|
+
if (auth) {
|
|
52423
|
+
const requestOrigin = parsed.origin;
|
|
52424
|
+
const authToRestore = auth;
|
|
52425
|
+
options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
|
|
52426
|
+
try {
|
|
52427
|
+
if (new URL(redirectOptions.href).origin === requestOrigin) {
|
|
52428
|
+
redirectOptions.auth = authToRestore;
|
|
52429
|
+
}
|
|
52430
|
+
} catch (e) {}
|
|
52431
|
+
};
|
|
52432
|
+
}
|
|
52433
|
+
const sensitiveHeaders = own3("sensitiveHeaders");
|
|
52434
|
+
if (sensitiveHeaders != null) {
|
|
52435
|
+
if (!utils_default.isArray(sensitiveHeaders)) {
|
|
52436
|
+
return reject(new AxiosError_default("sensitiveHeaders must be an array of strings", AxiosError_default.ERR_BAD_OPTION_VALUE, config2));
|
|
52437
|
+
}
|
|
52438
|
+
const sensitiveSet = new Set;
|
|
52439
|
+
for (const header of sensitiveHeaders) {
|
|
52440
|
+
if (!utils_default.isString(header)) {
|
|
52441
|
+
return reject(new AxiosError_default("sensitiveHeaders must be an array of strings", AxiosError_default.ERR_BAD_OPTION_VALUE, config2));
|
|
52442
|
+
}
|
|
52443
|
+
sensitiveSet.add(header.toLowerCase());
|
|
52444
|
+
}
|
|
52445
|
+
if (sensitiveSet.size) {
|
|
52446
|
+
options.sensitiveHeaders = Array.from(sensitiveSet);
|
|
52447
|
+
options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
|
|
52448
|
+
if (!isSameOriginRedirect(redirectOptions, requestDetails)) {
|
|
52449
|
+
stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
|
|
52450
|
+
}
|
|
52451
|
+
};
|
|
52452
|
+
}
|
|
52453
|
+
}
|
|
51633
52454
|
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
51634
52455
|
}
|
|
51635
52456
|
}
|
|
51636
|
-
if (
|
|
51637
|
-
options.maxBodyLength =
|
|
52457
|
+
if (maxBodyLength > -1) {
|
|
52458
|
+
options.maxBodyLength = maxBodyLength;
|
|
51638
52459
|
} else {
|
|
51639
52460
|
options.maxBodyLength = Infinity;
|
|
51640
52461
|
}
|
|
@@ -51649,12 +52470,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51649
52470
|
const transformStream = new AxiosTransformStream_default({
|
|
51650
52471
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
51651
52472
|
});
|
|
51652
|
-
onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
|
|
52473
|
+
onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress, scheduleProgress), true, 3))));
|
|
51653
52474
|
streams.push(transformStream);
|
|
51654
52475
|
}
|
|
51655
52476
|
let responseStream = res;
|
|
51656
52477
|
const lastRequest = res.req || req;
|
|
51657
|
-
if (
|
|
52478
|
+
if (decompress !== false && res.headers["content-encoding"]) {
|
|
51658
52479
|
if (method === "HEAD" || res.statusCode === 204) {
|
|
51659
52480
|
delete res.headers["content-encoding"];
|
|
51660
52481
|
}
|
|
@@ -51676,6 +52497,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51676
52497
|
streams.push(zlib.createBrotliDecompress(brotliOptions));
|
|
51677
52498
|
delete res.headers["content-encoding"];
|
|
51678
52499
|
}
|
|
52500
|
+
break;
|
|
52501
|
+
case "zstd":
|
|
52502
|
+
if (isZstdSupported) {
|
|
52503
|
+
streams.push(zlib.createZstdDecompress(zstdOptions));
|
|
52504
|
+
delete res.headers["content-encoding"];
|
|
52505
|
+
}
|
|
52506
|
+
break;
|
|
51679
52507
|
}
|
|
51680
52508
|
}
|
|
51681
52509
|
responseStream = streams.length > 1 ? stream3.pipeline(streams, utils_default.noop) : streams[0];
|
|
@@ -51687,8 +52515,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51687
52515
|
request: lastRequest
|
|
51688
52516
|
};
|
|
51689
52517
|
if (responseType === "stream") {
|
|
51690
|
-
if (
|
|
51691
|
-
const limit =
|
|
52518
|
+
if (maxContentLength > -1) {
|
|
52519
|
+
const limit = maxContentLength;
|
|
51692
52520
|
const source = responseStream;
|
|
51693
52521
|
async function* enforceMaxContentLength() {
|
|
51694
52522
|
let totalResponseBytes = 0;
|
|
@@ -51712,10 +52540,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51712
52540
|
responseStream.on("data", function handleStreamData(chunk) {
|
|
51713
52541
|
responseBuffer.push(chunk);
|
|
51714
52542
|
totalResponseBytes += chunk.length;
|
|
51715
|
-
if (
|
|
52543
|
+
if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
|
|
51716
52544
|
rejected = true;
|
|
51717
52545
|
responseStream.destroy();
|
|
51718
|
-
abort(new AxiosError_default("maxContentLength size of " +
|
|
52546
|
+
abort(new AxiosError_default("maxContentLength size of " + maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config2, lastRequest));
|
|
51719
52547
|
}
|
|
51720
52548
|
});
|
|
51721
52549
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
@@ -51766,14 +52594,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51766
52594
|
});
|
|
51767
52595
|
const boundSockets = new Set;
|
|
51768
52596
|
req.on("socket", function handleRequestSocket(socket) {
|
|
51769
|
-
socket.setKeepAlive
|
|
52597
|
+
if (typeof socket.setKeepAlive === "function") {
|
|
52598
|
+
socket.setKeepAlive(true, 1000 * 60);
|
|
52599
|
+
}
|
|
51770
52600
|
if (!socket[kAxiosSocketListener]) {
|
|
51771
|
-
socket.on("error",
|
|
51772
|
-
const current = socket[kAxiosCurrentReq];
|
|
51773
|
-
if (current && !current.destroyed) {
|
|
51774
|
-
current.destroy(err);
|
|
51775
|
-
}
|
|
51776
|
-
});
|
|
52601
|
+
socket.on("error", handleSocketError);
|
|
51777
52602
|
socket[kAxiosSocketListener] = true;
|
|
51778
52603
|
}
|
|
51779
52604
|
socket[kAxiosCurrentReq] = req;
|
|
@@ -51788,8 +52613,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51788
52613
|
}
|
|
51789
52614
|
boundSockets.clear();
|
|
51790
52615
|
});
|
|
51791
|
-
if (
|
|
51792
|
-
const timeout = parseInt(
|
|
52616
|
+
if (own3("timeout")) {
|
|
52617
|
+
const timeout = parseInt(own3("timeout"), 10);
|
|
51793
52618
|
if (Number.isNaN(timeout)) {
|
|
51794
52619
|
abort(new AxiosError_default("error trying to parse `config.timeout` to int", AxiosError_default.ERR_BAD_OPTION_VALUE, config2, req));
|
|
51795
52620
|
return;
|
|
@@ -51822,8 +52647,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51822
52647
|
}
|
|
51823
52648
|
});
|
|
51824
52649
|
let uploadStream = data;
|
|
51825
|
-
if (
|
|
51826
|
-
const limit =
|
|
52650
|
+
if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) {
|
|
52651
|
+
const limit = maxBodyLength;
|
|
51827
52652
|
let bytesSent = 0;
|
|
51828
52653
|
uploadStream = stream3.pipeline([
|
|
51829
52654
|
data,
|
|
@@ -51850,13 +52675,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
51850
52675
|
});
|
|
51851
52676
|
};
|
|
51852
52677
|
|
|
51853
|
-
// ../../node_modules/.bun/axios@1.
|
|
52678
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
51854
52679
|
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin2, isMSIE) => (url3) => {
|
|
51855
52680
|
url3 = new URL(url3, platform_default.origin);
|
|
51856
52681
|
return origin2.protocol === url3.protocol && origin2.host === url3.host && (isMSIE || origin2.port === url3.port);
|
|
51857
52682
|
})(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
|
|
51858
52683
|
|
|
51859
|
-
// ../../node_modules/.bun/axios@1.
|
|
52684
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/cookies.js
|
|
51860
52685
|
var cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
51861
52686
|
write(name, value, expires, path, domain2, secure, sameSite) {
|
|
51862
52687
|
if (typeof document === "undefined")
|
|
@@ -51887,7 +52712,11 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
|
51887
52712
|
const cookie = cookies[i].replace(/^\s+/, "");
|
|
51888
52713
|
const eq = cookie.indexOf("=");
|
|
51889
52714
|
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
51890
|
-
|
|
52715
|
+
try {
|
|
52716
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
52717
|
+
} catch (e) {
|
|
52718
|
+
return cookie.slice(eq + 1);
|
|
52719
|
+
}
|
|
51891
52720
|
}
|
|
51892
52721
|
}
|
|
51893
52722
|
return null;
|
|
@@ -51903,9 +52732,16 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
|
51903
52732
|
remove() {}
|
|
51904
52733
|
};
|
|
51905
52734
|
|
|
51906
|
-
// ../../node_modules/.bun/axios@1.
|
|
52735
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/mergeConfig.js
|
|
51907
52736
|
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
|
52737
|
+
var ownEnumerableKeys = (thing) => {
|
|
52738
|
+
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
52739
|
+
return Object.keys(thing).concat(Object.getOwnPropertySymbols(thing).filter((symbol2) => Object.getOwnPropertyDescriptor(thing, symbol2).enumerable));
|
|
52740
|
+
}
|
|
52741
|
+
return Object.keys(thing);
|
|
52742
|
+
};
|
|
51908
52743
|
function mergeConfig(config1, config2) {
|
|
52744
|
+
config1 = config1 || {};
|
|
51909
52745
|
config2 = config2 || {};
|
|
51910
52746
|
const config3 = Object.create(null);
|
|
51911
52747
|
Object.defineProperty(config3, "hasOwnProperty", {
|
|
@@ -51944,6 +52780,23 @@ function mergeConfig(config1, config2) {
|
|
|
51944
52780
|
return getMergedValue(undefined, a);
|
|
51945
52781
|
}
|
|
51946
52782
|
}
|
|
52783
|
+
function getMergedTransitionalOption(prop) {
|
|
52784
|
+
const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : undefined;
|
|
52785
|
+
if (!utils_default.isUndefined(transitional2)) {
|
|
52786
|
+
if (utils_default.isPlainObject(transitional2)) {
|
|
52787
|
+
if (utils_default.hasOwnProp(transitional2, prop)) {
|
|
52788
|
+
return transitional2[prop];
|
|
52789
|
+
}
|
|
52790
|
+
} else {
|
|
52791
|
+
return;
|
|
52792
|
+
}
|
|
52793
|
+
}
|
|
52794
|
+
const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : undefined;
|
|
52795
|
+
if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) {
|
|
52796
|
+
return transitional1[prop];
|
|
52797
|
+
}
|
|
52798
|
+
return;
|
|
52799
|
+
}
|
|
51947
52800
|
function mergeDirectKeys(a, b, prop) {
|
|
51948
52801
|
if (utils_default.hasOwnProp(config2, prop)) {
|
|
51949
52802
|
return getMergedValue(a, b);
|
|
@@ -51960,7 +52813,7 @@ function mergeConfig(config1, config2) {
|
|
|
51960
52813
|
transformResponse: defaultToConfig2,
|
|
51961
52814
|
paramsSerializer: defaultToConfig2,
|
|
51962
52815
|
timeout: defaultToConfig2,
|
|
51963
|
-
|
|
52816
|
+
timeoutErrorMessage: defaultToConfig2,
|
|
51964
52817
|
withCredentials: defaultToConfig2,
|
|
51965
52818
|
withXSRFToken: defaultToConfig2,
|
|
51966
52819
|
adapter: defaultToConfig2,
|
|
@@ -51983,7 +52836,7 @@ function mergeConfig(config1, config2) {
|
|
|
51983
52836
|
validateStatus: mergeDirectKeys,
|
|
51984
52837
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
51985
52838
|
};
|
|
51986
|
-
utils_default.forEach(
|
|
52839
|
+
utils_default.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
51987
52840
|
if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
|
|
51988
52841
|
return;
|
|
51989
52842
|
const merge3 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
@@ -51992,24 +52845,19 @@ function mergeConfig(config1, config2) {
|
|
|
51992
52845
|
const configValue = merge3(a, b, prop);
|
|
51993
52846
|
utils_default.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config3[prop] = configValue);
|
|
51994
52847
|
});
|
|
52848
|
+
if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
|
|
52849
|
+
if (utils_default.hasOwnProp(config1, "validateStatus")) {
|
|
52850
|
+
config3.validateStatus = getMergedValue(undefined, config1.validateStatus);
|
|
52851
|
+
} else {
|
|
52852
|
+
delete config3.validateStatus;
|
|
52853
|
+
}
|
|
52854
|
+
}
|
|
51995
52855
|
return config3;
|
|
51996
52856
|
}
|
|
51997
52857
|
|
|
51998
|
-
// ../../node_modules/.bun/axios@1.
|
|
51999
|
-
var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
|
|
52000
|
-
function setFormDataHeaders2(headers, formHeaders, policy) {
|
|
52001
|
-
if (policy !== "content-only") {
|
|
52002
|
-
headers.set(formHeaders);
|
|
52003
|
-
return;
|
|
52004
|
-
}
|
|
52005
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
52006
|
-
if (FORM_DATA_CONTENT_HEADERS2.includes(key.toLowerCase())) {
|
|
52007
|
-
headers.set(key, val);
|
|
52008
|
-
}
|
|
52009
|
-
});
|
|
52010
|
-
}
|
|
52858
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/resolveConfig.js
|
|
52011
52859
|
var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex3) => String.fromCharCode(parseInt(hex3, 16)));
|
|
52012
|
-
|
|
52860
|
+
function resolveConfig(config2) {
|
|
52013
52861
|
const newConfig = mergeConfig({}, config2);
|
|
52014
52862
|
const own3 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : undefined;
|
|
52015
52863
|
const data = own3("data");
|
|
@@ -52022,15 +52870,22 @@ var resolveConfig_default = (config2) => {
|
|
|
52022
52870
|
const allowAbsoluteUrls = own3("allowAbsoluteUrls");
|
|
52023
52871
|
const url3 = own3("url");
|
|
52024
52872
|
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
52025
|
-
newConfig.url = buildURL(buildFullPath(baseURL, url3, allowAbsoluteUrls),
|
|
52873
|
+
newConfig.url = buildURL(buildFullPath(baseURL, url3, allowAbsoluteUrls, newConfig), own3("params"), own3("paramsSerializer"));
|
|
52026
52874
|
if (auth) {
|
|
52027
|
-
|
|
52875
|
+
const username = utils_default.getSafeProp(auth, "username") || "";
|
|
52876
|
+
const password = utils_default.getSafeProp(auth, "password") || "";
|
|
52877
|
+
try {
|
|
52878
|
+
headers.set("Authorization", "Basic " + btoa(username + ":" + (password ? encodeUTF8(password) : "")));
|
|
52879
|
+
} catch (e) {
|
|
52880
|
+
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_OPTION_VALUE, config2);
|
|
52881
|
+
}
|
|
52028
52882
|
}
|
|
52029
52883
|
if (utils_default.isFormData(data)) {
|
|
52030
|
-
|
|
52884
|
+
const getHeaders = utils_default.getSafeProp(data, "getHeaders");
|
|
52885
|
+
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) {
|
|
52031
52886
|
headers.setContentType(undefined);
|
|
52032
|
-
} else if (utils_default.isFunction(
|
|
52033
|
-
|
|
52887
|
+
} else if (utils_default.isFunction(getHeaders)) {
|
|
52888
|
+
setFormDataHeaders(headers, getHeaders.call(data), own3("formDataHeaderPolicy"));
|
|
52034
52889
|
}
|
|
52035
52890
|
}
|
|
52036
52891
|
if (platform_default.hasStandardBrowserEnv) {
|
|
@@ -52046,9 +52901,10 @@ var resolveConfig_default = (config2) => {
|
|
|
52046
52901
|
}
|
|
52047
52902
|
}
|
|
52048
52903
|
return newConfig;
|
|
52049
|
-
}
|
|
52904
|
+
}
|
|
52905
|
+
var resolveConfig_default = resolveConfig;
|
|
52050
52906
|
|
|
52051
|
-
// ../../node_modules/.bun/axios@1.
|
|
52907
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/adapters/xhr.js
|
|
52052
52908
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
52053
52909
|
var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
52054
52910
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
@@ -52058,7 +52914,7 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
|
52058
52914
|
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
52059
52915
|
let onCanceled;
|
|
52060
52916
|
let uploadThrottled, downloadThrottled;
|
|
52061
|
-
let flushUpload, flushDownload;
|
|
52917
|
+
let flushUpload, flushDownload, flushDownloadWithEvent;
|
|
52062
52918
|
function done() {
|
|
52063
52919
|
flushUpload && flushUpload();
|
|
52064
52920
|
flushDownload && flushDownload();
|
|
@@ -52068,7 +52924,27 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
|
52068
52924
|
let request = new XMLHttpRequest;
|
|
52069
52925
|
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
52070
52926
|
request.timeout = _config.timeout;
|
|
52071
|
-
function onloadend() {
|
|
52927
|
+
function onloadend(event) {
|
|
52928
|
+
if (!request) {
|
|
52929
|
+
return;
|
|
52930
|
+
}
|
|
52931
|
+
if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform_default.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) {
|
|
52932
|
+
reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config2, request));
|
|
52933
|
+
done();
|
|
52934
|
+
request = null;
|
|
52935
|
+
return;
|
|
52936
|
+
}
|
|
52937
|
+
try {
|
|
52938
|
+
if (event) {
|
|
52939
|
+
flushDownloadWithEvent && flushDownloadWithEvent(event);
|
|
52940
|
+
} else {
|
|
52941
|
+
flushDownload && flushDownload();
|
|
52942
|
+
}
|
|
52943
|
+
} catch (err) {
|
|
52944
|
+
setTimeout(() => {
|
|
52945
|
+
throw err;
|
|
52946
|
+
});
|
|
52947
|
+
}
|
|
52072
52948
|
if (!request) {
|
|
52073
52949
|
return;
|
|
52074
52950
|
}
|
|
@@ -52143,7 +53019,7 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
|
52143
53019
|
request.responseType = _config.responseType;
|
|
52144
53020
|
}
|
|
52145
53021
|
if (onDownloadProgress) {
|
|
52146
|
-
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
53022
|
+
[downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(onDownloadProgress, true);
|
|
52147
53023
|
request.addEventListener("progress", downloadThrottled);
|
|
52148
53024
|
}
|
|
52149
53025
|
if (onUploadProgress && request.upload) {
|
|
@@ -52169,13 +53045,14 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
|
52169
53045
|
const protocol = parseProtocol(_config.url);
|
|
52170
53046
|
if (protocol && !platform_default.protocols.includes(protocol)) {
|
|
52171
53047
|
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config2));
|
|
53048
|
+
done();
|
|
52172
53049
|
return;
|
|
52173
53050
|
}
|
|
52174
53051
|
request.send(requestData || null);
|
|
52175
53052
|
});
|
|
52176
53053
|
};
|
|
52177
53054
|
|
|
52178
|
-
// ../../node_modules/.bun/axios@1.
|
|
53055
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/composeSignals.js
|
|
52179
53056
|
var composeSignals = (signals, timeout) => {
|
|
52180
53057
|
signals = signals ? signals.filter(Boolean) : [];
|
|
52181
53058
|
if (!timeout && !signals.length) {
|
|
@@ -52206,14 +53083,23 @@ var composeSignals = (signals, timeout) => {
|
|
|
52206
53083
|
});
|
|
52207
53084
|
signals = null;
|
|
52208
53085
|
};
|
|
52209
|
-
signals.forEach((signal2) =>
|
|
53086
|
+
signals.forEach((signal2) => {
|
|
53087
|
+
if (aborted2) {
|
|
53088
|
+
return;
|
|
53089
|
+
}
|
|
53090
|
+
if (signal2.aborted) {
|
|
53091
|
+
onabort.call(signal2);
|
|
53092
|
+
return;
|
|
53093
|
+
}
|
|
53094
|
+
signal2.addEventListener("abort", onabort, { once: true });
|
|
53095
|
+
});
|
|
52210
53096
|
const { signal } = controller;
|
|
52211
53097
|
signal.unsubscribe = () => utils_default.asap(unsubscribe);
|
|
52212
53098
|
return signal;
|
|
52213
53099
|
};
|
|
52214
53100
|
var composeSignals_default = composeSignals;
|
|
52215
53101
|
|
|
52216
|
-
// ../../node_modules/.bun/axios@1.
|
|
53102
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/trackStream.js
|
|
52217
53103
|
var streamChunk = function* (chunk, chunkSize) {
|
|
52218
53104
|
let len = chunk.byteLength;
|
|
52219
53105
|
if (!chunkSize || len < chunkSize) {
|
|
@@ -52290,9 +53176,31 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
|
52290
53176
|
});
|
|
52291
53177
|
};
|
|
52292
53178
|
|
|
52293
|
-
// ../../node_modules/.bun/axios@1.
|
|
53179
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/adapters/fetch.js
|
|
52294
53180
|
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
53181
|
+
var DEFAULT_REQUEST_OPTIONS = {
|
|
53182
|
+
cache: "default",
|
|
53183
|
+
redirect: "follow",
|
|
53184
|
+
referrer: "about:client",
|
|
53185
|
+
referrerPolicy: "",
|
|
53186
|
+
mode: "cors",
|
|
53187
|
+
integrity: "",
|
|
53188
|
+
keepalive: false,
|
|
53189
|
+
priority: "auto",
|
|
53190
|
+
window: null
|
|
53191
|
+
};
|
|
52295
53192
|
var { isFunction: isFunction2 } = utils_default;
|
|
53193
|
+
var encodeUTF82 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex3) => String.fromCharCode(parseInt(hex3, 16)));
|
|
53194
|
+
var decodeURIComponentSafe2 = (value) => {
|
|
53195
|
+
if (!utils_default.isString(value)) {
|
|
53196
|
+
return value;
|
|
53197
|
+
}
|
|
53198
|
+
try {
|
|
53199
|
+
return decodeURIComponent(value);
|
|
53200
|
+
} catch (error62) {
|
|
53201
|
+
return value;
|
|
53202
|
+
}
|
|
53203
|
+
};
|
|
52296
53204
|
var test = (fn, ...args) => {
|
|
52297
53205
|
try {
|
|
52298
53206
|
return !!fn(...args);
|
|
@@ -52300,6 +53208,14 @@ var test = (fn, ...args) => {
|
|
|
52300
53208
|
return false;
|
|
52301
53209
|
}
|
|
52302
53210
|
};
|
|
53211
|
+
var maybeWithAuthCredentials = (url3) => {
|
|
53212
|
+
const protocolIndex = url3.indexOf("://");
|
|
53213
|
+
let urlToCheck = url3;
|
|
53214
|
+
if (protocolIndex !== -1) {
|
|
53215
|
+
urlToCheck = urlToCheck.slice(protocolIndex + 3);
|
|
53216
|
+
}
|
|
53217
|
+
return urlToCheck.includes("@") || urlToCheck.includes(":");
|
|
53218
|
+
};
|
|
52303
53219
|
var factory = (env2) => {
|
|
52304
53220
|
const globalObject = utils_default.global !== undefined && utils_default.global !== null ? utils_default.global : globalThis;
|
|
52305
53221
|
const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
|
|
@@ -52392,10 +53308,12 @@ var factory = (env2) => {
|
|
|
52392
53308
|
withCredentials = "same-origin",
|
|
52393
53309
|
fetchOptions,
|
|
52394
53310
|
maxContentLength,
|
|
52395
|
-
maxBodyLength
|
|
53311
|
+
maxBodyLength,
|
|
53312
|
+
maxRedirects
|
|
52396
53313
|
} = resolveConfig_default(config2);
|
|
52397
53314
|
const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
|
|
52398
53315
|
const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
53316
|
+
const own3 = (key) => utils_default.hasOwnProp(config2, key) ? config2[key] : undefined;
|
|
52399
53317
|
let _fetch = envFetch || fetch;
|
|
52400
53318
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
52401
53319
|
let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
@@ -52404,7 +53322,39 @@ var factory = (env2) => {
|
|
|
52404
53322
|
composedSignal.unsubscribe();
|
|
52405
53323
|
});
|
|
52406
53324
|
let requestContentLength;
|
|
53325
|
+
let pendingBodyError = null;
|
|
53326
|
+
const maxBodyLengthError = () => new AxiosError_default("Request body larger than maxBodyLength limit", AxiosError_default.ERR_BAD_REQUEST, config2, request);
|
|
52407
53327
|
try {
|
|
53328
|
+
let auth = undefined;
|
|
53329
|
+
const configAuth = own3("auth");
|
|
53330
|
+
if (configAuth) {
|
|
53331
|
+
const username = utils_default.getSafeProp(configAuth, "username") || "";
|
|
53332
|
+
const password = utils_default.getSafeProp(configAuth, "password") || "";
|
|
53333
|
+
auth = {
|
|
53334
|
+
username,
|
|
53335
|
+
password
|
|
53336
|
+
};
|
|
53337
|
+
}
|
|
53338
|
+
if (maybeWithAuthCredentials(url3)) {
|
|
53339
|
+
const parsedURL = new URL(url3, platform_default.origin);
|
|
53340
|
+
if (!auth && (parsedURL.username || parsedURL.password)) {
|
|
53341
|
+
const urlUsername = decodeURIComponentSafe2(parsedURL.username);
|
|
53342
|
+
const urlPassword = decodeURIComponentSafe2(parsedURL.password);
|
|
53343
|
+
auth = {
|
|
53344
|
+
username: urlUsername,
|
|
53345
|
+
password: urlPassword
|
|
53346
|
+
};
|
|
53347
|
+
}
|
|
53348
|
+
if (parsedURL.username || parsedURL.password) {
|
|
53349
|
+
parsedURL.username = "";
|
|
53350
|
+
parsedURL.password = "";
|
|
53351
|
+
url3 = parsedURL.href;
|
|
53352
|
+
}
|
|
53353
|
+
}
|
|
53354
|
+
if (auth) {
|
|
53355
|
+
headers.delete("authorization");
|
|
53356
|
+
headers.set("Authorization", "Basic " + btoa(encodeUTF82((auth.username || "") + ":" + (auth.password || ""))));
|
|
53357
|
+
}
|
|
52408
53358
|
if (hasMaxContentLength && typeof url3 === "string" && url3.startsWith("data:")) {
|
|
52409
53359
|
const estimated = estimateDataURLDecodedBytes(url3);
|
|
52410
53360
|
if (estimated > maxContentLength) {
|
|
@@ -52412,25 +53362,42 @@ var factory = (env2) => {
|
|
|
52412
53362
|
}
|
|
52413
53363
|
}
|
|
52414
53364
|
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
52415
|
-
const outboundLength = await
|
|
52416
|
-
if (typeof outboundLength === "number" && isFinite(outboundLength)
|
|
52417
|
-
|
|
53365
|
+
const outboundLength = await getBodyLength(data);
|
|
53366
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength)) {
|
|
53367
|
+
requestContentLength = outboundLength;
|
|
53368
|
+
if (outboundLength > maxBodyLength) {
|
|
53369
|
+
throw maxBodyLengthError();
|
|
53370
|
+
}
|
|
52418
53371
|
}
|
|
52419
53372
|
}
|
|
52420
|
-
|
|
52421
|
-
|
|
52422
|
-
|
|
52423
|
-
|
|
52424
|
-
|
|
52425
|
-
|
|
52426
|
-
|
|
52427
|
-
|
|
52428
|
-
|
|
52429
|
-
|
|
52430
|
-
|
|
52431
|
-
|
|
52432
|
-
|
|
53373
|
+
const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data));
|
|
53374
|
+
const trackRequestStream = (stream4, onProgress, flush) => trackStream(stream4, DEFAULT_CHUNK_SIZE, (loadedBytes) => {
|
|
53375
|
+
if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
|
|
53376
|
+
throw pendingBodyError = maxBodyLengthError();
|
|
53377
|
+
}
|
|
53378
|
+
onProgress && onProgress(loadedBytes);
|
|
53379
|
+
}, flush);
|
|
53380
|
+
if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
|
|
53381
|
+
requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
|
|
53382
|
+
if (requestContentLength !== 0 || mustEnforceStreamBody) {
|
|
53383
|
+
let _request = new Request(url3, {
|
|
53384
|
+
method: "POST",
|
|
53385
|
+
body: data,
|
|
53386
|
+
duplex: "half"
|
|
53387
|
+
});
|
|
53388
|
+
let contentTypeHeader;
|
|
53389
|
+
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
53390
|
+
headers.setContentType(contentTypeHeader);
|
|
53391
|
+
}
|
|
53392
|
+
if (_request.body) {
|
|
53393
|
+
const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [];
|
|
53394
|
+
data = trackRequestStream(_request.body, onProgress, flush);
|
|
53395
|
+
}
|
|
52433
53396
|
}
|
|
53397
|
+
} else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
|
|
53398
|
+
data = trackRequestStream(data);
|
|
53399
|
+
} else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
|
|
53400
|
+
throw new AxiosError_default("Stream request bodies are not supported by the current fetch implementation", AxiosError_default.ERR_NOT_SUPPORT, config2, request);
|
|
52434
53401
|
}
|
|
52435
53402
|
if (!utils_default.isString(withCredentials)) {
|
|
52436
53403
|
withCredentials = withCredentials ? "include" : "omit";
|
|
@@ -52443,19 +53410,47 @@ var factory = (env2) => {
|
|
|
52443
53410
|
}
|
|
52444
53411
|
}
|
|
52445
53412
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
52446
|
-
const
|
|
52447
|
-
|
|
53413
|
+
const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
|
|
53414
|
+
if (safeFetchOptions) {
|
|
53415
|
+
delete safeFetchOptions.body;
|
|
53416
|
+
delete safeFetchOptions.headers;
|
|
53417
|
+
delete safeFetchOptions.method;
|
|
53418
|
+
delete safeFetchOptions.signal;
|
|
53419
|
+
delete safeFetchOptions.duplex;
|
|
53420
|
+
delete safeFetchOptions.credentials;
|
|
53421
|
+
}
|
|
53422
|
+
const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
|
|
52448
53423
|
signal: composedSignal,
|
|
52449
53424
|
method: method.toUpperCase(),
|
|
52450
53425
|
headers: toByteStringHeaderObject(headers.normalize()),
|
|
52451
53426
|
body: data,
|
|
52452
53427
|
duplex: "half",
|
|
52453
53428
|
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
52454
|
-
};
|
|
53429
|
+
});
|
|
53430
|
+
if (isRequestSupported) {
|
|
53431
|
+
utils_default.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
|
|
53432
|
+
if (resolvedOptions[key] === undefined) {
|
|
53433
|
+
resolvedOptions[key] = value;
|
|
53434
|
+
}
|
|
53435
|
+
});
|
|
53436
|
+
if (resolvedOptions.signal === undefined) {
|
|
53437
|
+
resolvedOptions.signal = null;
|
|
53438
|
+
}
|
|
53439
|
+
if (resolvedOptions.body === undefined) {
|
|
53440
|
+
resolvedOptions.body = null;
|
|
53441
|
+
}
|
|
53442
|
+
}
|
|
53443
|
+
if (maxRedirects === 0) {
|
|
53444
|
+
resolvedOptions.redirect = "manual";
|
|
53445
|
+
if (safeFetchOptions) {
|
|
53446
|
+
safeFetchOptions.redirect = "manual";
|
|
53447
|
+
}
|
|
53448
|
+
}
|
|
52455
53449
|
request = isRequestSupported && new Request(url3, resolvedOptions);
|
|
52456
|
-
let response = await (isRequestSupported ? _fetch(request,
|
|
53450
|
+
let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url3, resolvedOptions));
|
|
53451
|
+
const responseHeaders = AxiosHeaders_default.from(response.headers);
|
|
52457
53452
|
if (hasMaxContentLength) {
|
|
52458
|
-
const declaredLength = utils_default.toFiniteNumber(
|
|
53453
|
+
const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
|
|
52459
53454
|
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
52460
53455
|
throw new AxiosError_default("maxContentLength size of " + maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config2, request);
|
|
52461
53456
|
}
|
|
@@ -52466,7 +53461,7 @@ var factory = (env2) => {
|
|
|
52466
53461
|
["status", "statusText", "headers"].forEach((prop) => {
|
|
52467
53462
|
options[prop] = response[prop];
|
|
52468
53463
|
});
|
|
52469
|
-
const responseContentLength = utils_default.toFiniteNumber(
|
|
53464
|
+
const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
|
|
52470
53465
|
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
52471
53466
|
let bytesRead = 0;
|
|
52472
53467
|
const onChunkProgress = (loadedBytes) => {
|
|
@@ -52517,13 +53512,35 @@ var factory = (env2) => {
|
|
|
52517
53512
|
const canceledError = composedSignal.reason;
|
|
52518
53513
|
canceledError.config = config2;
|
|
52519
53514
|
request && (canceledError.request = request);
|
|
52520
|
-
err !== canceledError
|
|
53515
|
+
if (err !== canceledError) {
|
|
53516
|
+
Object.defineProperty(canceledError, "cause", {
|
|
53517
|
+
__proto__: null,
|
|
53518
|
+
value: err,
|
|
53519
|
+
writable: true,
|
|
53520
|
+
enumerable: false,
|
|
53521
|
+
configurable: true
|
|
53522
|
+
});
|
|
53523
|
+
}
|
|
52521
53524
|
throw canceledError;
|
|
52522
53525
|
}
|
|
53526
|
+
if (pendingBodyError) {
|
|
53527
|
+
request && !pendingBodyError.request && (pendingBodyError.request = request);
|
|
53528
|
+
throw pendingBodyError;
|
|
53529
|
+
}
|
|
53530
|
+
if (err instanceof AxiosError_default) {
|
|
53531
|
+
request && !err.request && (err.request = request);
|
|
53532
|
+
throw err;
|
|
53533
|
+
}
|
|
52523
53534
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
52524
|
-
|
|
52525
|
-
|
|
53535
|
+
const networkError = new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config2, request, err && err.response);
|
|
53536
|
+
Object.defineProperty(networkError, "cause", {
|
|
53537
|
+
__proto__: null,
|
|
53538
|
+
value: err.cause || err,
|
|
53539
|
+
writable: true,
|
|
53540
|
+
enumerable: false,
|
|
53541
|
+
configurable: true
|
|
52526
53542
|
});
|
|
53543
|
+
throw networkError;
|
|
52527
53544
|
}
|
|
52528
53545
|
throw AxiosError_default.from(err, err && err.code, config2, request, err && err.response);
|
|
52529
53546
|
}
|
|
@@ -52545,7 +53562,7 @@ var getFetch = (config2) => {
|
|
|
52545
53562
|
};
|
|
52546
53563
|
var adapter = getFetch();
|
|
52547
53564
|
|
|
52548
|
-
// ../../node_modules/.bun/axios@1.
|
|
53565
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/adapters/adapters.js
|
|
52549
53566
|
var knownAdapters = {
|
|
52550
53567
|
http: http_default,
|
|
52551
53568
|
xhr: xhr_default,
|
|
@@ -52589,7 +53606,7 @@ function getAdapter(adapters, config2) {
|
|
|
52589
53606
|
let s = length ? reasons.length > 1 ? `since :
|
|
52590
53607
|
` + reasons.map(renderReason).join(`
|
|
52591
53608
|
`) : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
52592
|
-
throw new AxiosError_default(`There is no suitable adapter to dispatch the request ` + s,
|
|
53609
|
+
throw new AxiosError_default(`There is no suitable adapter to dispatch the request ` + s, AxiosError_default.ERR_NOT_SUPPORT);
|
|
52593
53610
|
}
|
|
52594
53611
|
return adapter2;
|
|
52595
53612
|
}
|
|
@@ -52598,7 +53615,7 @@ var adapters_default = {
|
|
|
52598
53615
|
adapters: knownAdapters
|
|
52599
53616
|
};
|
|
52600
53617
|
|
|
52601
|
-
// ../../node_modules/.bun/axios@1.
|
|
53618
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/dispatchRequest.js
|
|
52602
53619
|
function throwIfCancellationRequested(config2) {
|
|
52603
53620
|
if (config2.cancelToken) {
|
|
52604
53621
|
config2.cancelToken.throwIfRequested();
|
|
@@ -52607,9 +53624,10 @@ function throwIfCancellationRequested(config2) {
|
|
|
52607
53624
|
throw new CanceledError_default(null, config2);
|
|
52608
53625
|
}
|
|
52609
53626
|
}
|
|
52610
|
-
function dispatchRequest(
|
|
53627
|
+
function dispatchRequest(_config) {
|
|
53628
|
+
const config2 = utils_default.toSafeFlatObject(_config);
|
|
52611
53629
|
throwIfCancellationRequested(config2);
|
|
52612
|
-
config2.headers = AxiosHeaders_default.from(config2
|
|
53630
|
+
config2.headers = AxiosHeaders_default.from(utils_default.getSafeProp(config2, "headers"));
|
|
52613
53631
|
config2.data = transformData.call(config2, config2.transformRequest);
|
|
52614
53632
|
if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
|
|
52615
53633
|
config2.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
@@ -52642,7 +53660,7 @@ function dispatchRequest(config2) {
|
|
|
52642
53660
|
});
|
|
52643
53661
|
}
|
|
52644
53662
|
|
|
52645
|
-
// ../../node_modules/.bun/axios@1.
|
|
53663
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/validator.js
|
|
52646
53664
|
var validators = {};
|
|
52647
53665
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
52648
53666
|
validators[type] = function validator(thing) {
|
|
@@ -52672,7 +53690,7 @@ validators.spelling = function spelling(correctSpelling) {
|
|
|
52672
53690
|
};
|
|
52673
53691
|
};
|
|
52674
53692
|
function assertOptions(options, schema, allowUnknown) {
|
|
52675
|
-
if (typeof options !== "object") {
|
|
53693
|
+
if (typeof options !== "object" || options === null) {
|
|
52676
53694
|
throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
52677
53695
|
}
|
|
52678
53696
|
const keys = Object.keys(options);
|
|
@@ -52698,7 +53716,7 @@ var validator_default = {
|
|
|
52698
53716
|
validators
|
|
52699
53717
|
};
|
|
52700
53718
|
|
|
52701
|
-
// ../../node_modules/.bun/axios@1.
|
|
53719
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/core/Axios.js
|
|
52702
53720
|
var validators2 = validator_default.validators;
|
|
52703
53721
|
|
|
52704
53722
|
class Axios {
|
|
@@ -52714,17 +53732,16 @@ class Axios {
|
|
|
52714
53732
|
return await this._request(configOrUrl, config2);
|
|
52715
53733
|
} catch (err) {
|
|
52716
53734
|
if (err instanceof Error) {
|
|
52717
|
-
let dummy = {};
|
|
52718
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error;
|
|
52719
|
-
const stack = (() => {
|
|
52720
|
-
if (!dummy.stack) {
|
|
52721
|
-
return "";
|
|
52722
|
-
}
|
|
52723
|
-
const firstNewlineIndex = dummy.stack.indexOf(`
|
|
52724
|
-
`);
|
|
52725
|
-
return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
|
|
52726
|
-
})();
|
|
52727
53735
|
try {
|
|
53736
|
+
let dummy = {};
|
|
53737
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error;
|
|
53738
|
+
const dummyStack = dummy.stack;
|
|
53739
|
+
let stack = "";
|
|
53740
|
+
if (typeof dummyStack === "string") {
|
|
53741
|
+
const firstNewlineIndex = dummyStack.indexOf(`
|
|
53742
|
+
`);
|
|
53743
|
+
stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1);
|
|
53744
|
+
}
|
|
52728
53745
|
if (!err.stack) {
|
|
52729
53746
|
err.stack = stack;
|
|
52730
53747
|
} else if (stack) {
|
|
@@ -52757,7 +53774,9 @@ class Axios {
|
|
|
52757
53774
|
silentJSONParsing: validators2.transitional(validators2.boolean),
|
|
52758
53775
|
forcedJSONParsing: validators2.transitional(validators2.boolean),
|
|
52759
53776
|
clarifyTimeoutError: validators2.transitional(validators2.boolean),
|
|
52760
|
-
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
|
|
53777
|
+
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean),
|
|
53778
|
+
advertiseZstdAcceptEncoding: validators2.transitional(validators2.boolean),
|
|
53779
|
+
validateStatusUndefinedResolves: validators2.transitional(validators2.boolean)
|
|
52761
53780
|
}, false);
|
|
52762
53781
|
}
|
|
52763
53782
|
if (paramsSerializer != null) {
|
|
@@ -52781,9 +53800,9 @@ class Axios {
|
|
|
52781
53800
|
baseUrl: validators2.spelling("baseURL"),
|
|
52782
53801
|
withXsrfToken: validators2.spelling("withXSRFToken")
|
|
52783
53802
|
}, true);
|
|
52784
|
-
config2.method = (config2
|
|
53803
|
+
config2.method = (utils_default.getSafeProp(config2, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase();
|
|
52785
53804
|
let contextHeaders = headers && utils_default.merge(headers.common, headers[config2.method]);
|
|
52786
|
-
headers && utils_default.forEach(
|
|
53805
|
+
headers && utils_default.forEach(methodList_default.concat("common"), (method) => {
|
|
52787
53806
|
delete headers[method];
|
|
52788
53807
|
});
|
|
52789
53808
|
config2.headers = AxiosHeaders_default.concat(contextHeaders, headers);
|
|
@@ -52826,16 +53845,29 @@ class Axios {
|
|
|
52826
53845
|
const onFulfilled = requestInterceptorChain[i++];
|
|
52827
53846
|
const onRejected = requestInterceptorChain[i++];
|
|
52828
53847
|
try {
|
|
52829
|
-
newConfig = onFulfilled(newConfig);
|
|
53848
|
+
newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
|
|
52830
53849
|
} catch (error62) {
|
|
52831
|
-
onRejected
|
|
53850
|
+
if (!onRejected) {
|
|
53851
|
+
promise2 = Promise.reject(error62);
|
|
53852
|
+
break;
|
|
53853
|
+
}
|
|
53854
|
+
try {
|
|
53855
|
+
const rejectedResult = onRejected.call(this, error62);
|
|
53856
|
+
if (utils_default.isThenable(rejectedResult)) {
|
|
53857
|
+
promise2 = Promise.resolve(rejectedResult).then(() => dispatchRequest.call(this, newConfig));
|
|
53858
|
+
}
|
|
53859
|
+
} catch (rejectedError) {
|
|
53860
|
+
promise2 = Promise.reject(rejectedError);
|
|
53861
|
+
}
|
|
52832
53862
|
break;
|
|
52833
53863
|
}
|
|
52834
53864
|
}
|
|
52835
|
-
|
|
52836
|
-
|
|
52837
|
-
|
|
52838
|
-
|
|
53865
|
+
if (!promise2) {
|
|
53866
|
+
try {
|
|
53867
|
+
promise2 = dispatchRequest.call(this, newConfig);
|
|
53868
|
+
} catch (error62) {
|
|
53869
|
+
promise2 = Promise.reject(error62);
|
|
53870
|
+
}
|
|
52839
53871
|
}
|
|
52840
53872
|
i = 0;
|
|
52841
53873
|
len = responseInterceptorChain.length;
|
|
@@ -52846,7 +53878,7 @@ class Axios {
|
|
|
52846
53878
|
}
|
|
52847
53879
|
getUri(config2) {
|
|
52848
53880
|
config2 = mergeConfig(this.defaults, config2);
|
|
52849
|
-
const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);
|
|
53881
|
+
const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls, config2);
|
|
52850
53882
|
return buildURL(fullPath, config2.params, config2.paramsSerializer);
|
|
52851
53883
|
}
|
|
52852
53884
|
}
|
|
@@ -52855,7 +53887,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
|
|
|
52855
53887
|
return this.request(mergeConfig(config2 || {}, {
|
|
52856
53888
|
method,
|
|
52857
53889
|
url: url3,
|
|
52858
|
-
data: (config2
|
|
53890
|
+
data: config2 && utils_default.hasOwnProp(config2, "data") ? config2.data : undefined
|
|
52859
53891
|
}));
|
|
52860
53892
|
};
|
|
52861
53893
|
});
|
|
@@ -52879,7 +53911,7 @@ utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodW
|
|
|
52879
53911
|
});
|
|
52880
53912
|
var Axios_default = Axios;
|
|
52881
53913
|
|
|
52882
|
-
// ../../node_modules/.bun/axios@1.
|
|
53914
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/cancel/CancelToken.js
|
|
52883
53915
|
class CancelToken {
|
|
52884
53916
|
constructor(executor) {
|
|
52885
53917
|
if (typeof executor !== "function") {
|
|
@@ -52965,19 +53997,19 @@ class CancelToken {
|
|
|
52965
53997
|
}
|
|
52966
53998
|
var CancelToken_default = CancelToken;
|
|
52967
53999
|
|
|
52968
|
-
// ../../node_modules/.bun/axios@1.
|
|
54000
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/spread.js
|
|
52969
54001
|
function spread(callback) {
|
|
52970
54002
|
return function wrap(arr) {
|
|
52971
54003
|
return callback.apply(null, arr);
|
|
52972
54004
|
};
|
|
52973
54005
|
}
|
|
52974
54006
|
|
|
52975
|
-
// ../../node_modules/.bun/axios@1.
|
|
54007
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/isAxiosError.js
|
|
52976
54008
|
function isAxiosError(payload) {
|
|
52977
54009
|
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
|
52978
54010
|
}
|
|
52979
54011
|
|
|
52980
|
-
// ../../node_modules/.bun/axios@1.
|
|
54012
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
52981
54013
|
var HttpStatusCode = {
|
|
52982
54014
|
Continue: 100,
|
|
52983
54015
|
SwitchingProtocols: 101,
|
|
@@ -53016,6 +54048,7 @@ var HttpStatusCode = {
|
|
|
53016
54048
|
LengthRequired: 411,
|
|
53017
54049
|
PreconditionFailed: 412,
|
|
53018
54050
|
PayloadTooLarge: 413,
|
|
54051
|
+
ContentTooLarge: 413,
|
|
53019
54052
|
UriTooLong: 414,
|
|
53020
54053
|
UnsupportedMediaType: 415,
|
|
53021
54054
|
RangeNotSatisfiable: 416,
|
|
@@ -53023,6 +54056,7 @@ var HttpStatusCode = {
|
|
|
53023
54056
|
ImATeapot: 418,
|
|
53024
54057
|
MisdirectedRequest: 421,
|
|
53025
54058
|
UnprocessableEntity: 422,
|
|
54059
|
+
UnprocessableContent: 422,
|
|
53026
54060
|
Locked: 423,
|
|
53027
54061
|
FailedDependency: 424,
|
|
53028
54062
|
TooEarly: 425,
|
|
@@ -53042,6 +54076,7 @@ var HttpStatusCode = {
|
|
|
53042
54076
|
LoopDetected: 508,
|
|
53043
54077
|
NotExtended: 510,
|
|
53044
54078
|
NetworkAuthenticationRequired: 511,
|
|
54079
|
+
WebServerReturnsAnUnknownError: 520,
|
|
53045
54080
|
WebServerIsDown: 521,
|
|
53046
54081
|
ConnectionTimedOut: 522,
|
|
53047
54082
|
OriginIsUnreachable: 523,
|
|
@@ -53050,11 +54085,13 @@ var HttpStatusCode = {
|
|
|
53050
54085
|
InvalidSslCertificate: 526
|
|
53051
54086
|
};
|
|
53052
54087
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
53053
|
-
HttpStatusCode[value]
|
|
54088
|
+
if (HttpStatusCode[value] === undefined) {
|
|
54089
|
+
HttpStatusCode[value] = key;
|
|
54090
|
+
}
|
|
53054
54091
|
});
|
|
53055
54092
|
var HttpStatusCode_default = HttpStatusCode;
|
|
53056
54093
|
|
|
53057
|
-
// ../../node_modules/.bun/axios@1.
|
|
54094
|
+
// ../../node_modules/.bun/axios@1.20.0/node_modules/axios/lib/axios.js
|
|
53058
54095
|
function createInstance(defaultConfig) {
|
|
53059
54096
|
const context = new Axios_default(defaultConfig);
|
|
53060
54097
|
const instance = bind(Axios_default.prototype.request, context);
|
|
@@ -53288,6 +54325,11 @@ async function unwrapDEK(wrappedDekB64, kek) {
|
|
|
53288
54325
|
const ciphertext = combined.slice(12);
|
|
53289
54326
|
return crypto.subtle.unwrapKey("raw", ciphertext, kek, { name: "AES-GCM", iv }, { name: "AES-GCM", length: 256 }, true, ["encrypt", "decrypt"]);
|
|
53290
54327
|
}
|
|
54328
|
+
var CIPHERTEXT_CHARSET_RE = /^[A-Za-z0-9+/]+={0,2}$/;
|
|
54329
|
+
var MIN_CIPHERTEXT_B64_LEN = 40;
|
|
54330
|
+
function looksLikeCiphertext(value) {
|
|
54331
|
+
return value.length >= MIN_CIPHERTEXT_B64_LEN && CIPHERTEXT_CHARSET_RE.test(value);
|
|
54332
|
+
}
|
|
53291
54333
|
async function encryptField(plaintext, key) {
|
|
53292
54334
|
const enc = new TextEncoder;
|
|
53293
54335
|
const iv = crypto.getRandomValues(new Uint8Array(12));
|
|
@@ -53340,11 +54382,6 @@ async function encryptObjectFields(obj, fields, key) {
|
|
|
53340
54382
|
obj[field] = await encryptField(val, key);
|
|
53341
54383
|
}
|
|
53342
54384
|
}
|
|
53343
|
-
var CIPHERTEXT_CHARSET_RE = /^[A-Za-z0-9+/]+={0,2}$/;
|
|
53344
|
-
var MIN_CIPHERTEXT_B64_LEN = 40;
|
|
53345
|
-
function looksLikeCiphertext(value) {
|
|
53346
|
-
return value.length >= MIN_CIPHERTEXT_B64_LEN && CIPHERTEXT_CHARSET_RE.test(value);
|
|
53347
|
-
}
|
|
53348
54385
|
async function decryptFieldsFailClosed(input2, paths, key) {
|
|
53349
54386
|
return decryptFields(input2, paths, {
|
|
53350
54387
|
decrypt: (ciphertext) => decryptField(ciphertext, key),
|
|
@@ -53528,7 +54565,7 @@ function createRequestStateCodec(options) {
|
|
|
53528
54565
|
};
|
|
53529
54566
|
}
|
|
53530
54567
|
|
|
53531
|
-
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+
|
|
54568
|
+
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+9b084bc8a8e84b0d/node_modules/@nimit9/signet-server/dist/mcp/interaction.js
|
|
53532
54569
|
var CONFIRM_KEY = "signet_confirm";
|
|
53533
54570
|
function canonicalize(value) {
|
|
53534
54571
|
if (Array.isArray(value))
|
|
@@ -53596,7 +54633,7 @@ async function progress(ctx, done, total, message) {
|
|
|
53596
54633
|
});
|
|
53597
54634
|
} catch {}
|
|
53598
54635
|
}
|
|
53599
|
-
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+
|
|
54636
|
+
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+9b084bc8a8e84b0d/node_modules/@nimit9/signet-server/dist/http/status-codes.js
|
|
53600
54637
|
var STATUS_CODES = {
|
|
53601
54638
|
400: "BAD_REQUEST",
|
|
53602
54639
|
401: "UNAUTHORIZED",
|
|
@@ -53610,7 +54647,7 @@ var STATUS_CODES = {
|
|
|
53610
54647
|
429: "RATE_LIMITED"
|
|
53611
54648
|
};
|
|
53612
54649
|
|
|
53613
|
-
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+
|
|
54650
|
+
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+9b084bc8a8e84b0d/node_modules/@nimit9/signet-server/dist/mcp/errors.js
|
|
53614
54651
|
function isZodError(err) {
|
|
53615
54652
|
return err instanceof Error && err.name === "ZodError" && Array.isArray(err.issues);
|
|
53616
54653
|
}
|
|
@@ -53674,7 +54711,7 @@ function report(opts, err, meta3, c) {
|
|
|
53674
54711
|
} catch {}
|
|
53675
54712
|
}
|
|
53676
54713
|
|
|
53677
|
-
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+
|
|
54714
|
+
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+9b084bc8a8e84b0d/node_modules/@nimit9/signet-server/dist/mcp/primitives.js
|
|
53678
54715
|
var RAW = Symbol.for("signet.mcp.rawResult");
|
|
53679
54716
|
function protocolError(err, deps, meta3) {
|
|
53680
54717
|
if (ProtocolError.isInstance(err))
|
|
@@ -53824,7 +54861,7 @@ function registerPrompts(server, prompts, deps) {
|
|
|
53824
54861
|
}
|
|
53825
54862
|
}
|
|
53826
54863
|
|
|
53827
|
-
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+
|
|
54864
|
+
// ../../node_modules/.bun/@nimit9+signet-server@0.2.7+9b084bc8a8e84b0d/node_modules/@nimit9/signet-server/dist/mcp/server.js
|
|
53828
54865
|
var RAW2 = Symbol.for("signet.mcp.rawResult");
|
|
53829
54866
|
function toolResult(result) {
|
|
53830
54867
|
return Object.defineProperty({ ...result }, RAW2, { value: true, enumerable: false });
|
|
@@ -55433,13 +56470,19 @@ function netWorthTools(client) {
|
|
|
55433
56470
|
investments: exports_external.string().optional(),
|
|
55434
56471
|
emergencyFund: exports_external.string().optional(),
|
|
55435
56472
|
liabilities: exports_external.string().optional(),
|
|
55436
|
-
breakdown: exports_external.record(exports_external.string(), exports_external.string()).optional()
|
|
56473
|
+
breakdown: exports_external.record(exports_external.string(), exports_external.string()).optional(),
|
|
56474
|
+
overwrite: exports_external.boolean().optional().describe("mode=auto: replace this month's snapshot even if it was entered by hand")
|
|
55437
56475
|
}),
|
|
55438
56476
|
handler: async ({ mode, ...body }) => {
|
|
55439
56477
|
let data;
|
|
55440
56478
|
if (mode === "auto") {
|
|
55441
|
-
data = await client.post("/api/net-worth/auto", {
|
|
56479
|
+
data = await client.post("/api/net-worth/auto", {
|
|
56480
|
+
month: body.month,
|
|
56481
|
+
year: body.year,
|
|
56482
|
+
overwrite: body.overwrite
|
|
56483
|
+
});
|
|
55442
56484
|
} else {
|
|
56485
|
+
delete body.overwrite;
|
|
55443
56486
|
const liquidCash = parseFloat(body.liquidCash ?? "0");
|
|
55444
56487
|
const investments = parseFloat(body.investments ?? "0");
|
|
55445
56488
|
const emergencyFund = parseFloat(body.emergencyFund ?? "0");
|
|
@@ -57761,6 +58804,49 @@ function matchTransactions(existing, incoming, config2) {
|
|
|
57761
58804
|
}
|
|
57762
58805
|
return { matched, conflicts, unmatchedIndices };
|
|
57763
58806
|
}
|
|
58807
|
+
// ../reconciliation/src/merchant-defaults.ts
|
|
58808
|
+
var defaultMerchants = [
|
|
58809
|
+
{ rawId: "ZOMATO", cleanName: "Zomato", categorySlug: "food_delivery" },
|
|
58810
|
+
{ rawId: "SWIGGY", cleanName: "Swiggy", categorySlug: "food_delivery" },
|
|
58811
|
+
{ rawId: "BLINKIT", cleanName: "Blinkit", categorySlug: "quick_commerce" },
|
|
58812
|
+
{ rawId: "ZEPTO", cleanName: "Zepto", categorySlug: "quick_commerce" },
|
|
58813
|
+
{ rawId: "BIGBASKET", cleanName: "BigBasket", categorySlug: "groceries" },
|
|
58814
|
+
{ rawId: "DUNZO", cleanName: "Dunzo", categorySlug: "quick_commerce" },
|
|
58815
|
+
{ rawId: "AMAZON", cleanName: "Amazon", categorySlug: "amazon_shopping" },
|
|
58816
|
+
{ rawId: "FLIPKART", cleanName: "Flipkart", categorySlug: "electronics" },
|
|
58817
|
+
{ rawId: "MYNTRA", cleanName: "Myntra", categorySlug: "clothing" },
|
|
58818
|
+
{ rawId: "AJIO", cleanName: "Ajio", categorySlug: "clothing" },
|
|
58819
|
+
{ rawId: "UBER", cleanName: "Uber", categorySlug: "ride_hailing" },
|
|
58820
|
+
{ rawId: "OLA", cleanName: "Ola", categorySlug: "ride_hailing" },
|
|
58821
|
+
{ rawId: "RAPIDO", cleanName: "Rapido", categorySlug: "ride_hailing" },
|
|
58822
|
+
{ rawId: "BESCOM", cleanName: "BESCOM", categorySlug: "electricity", isRecurring: true },
|
|
58823
|
+
{ rawId: "BWSSB", cleanName: "BWSSB", categorySlug: "water", isRecurring: true },
|
|
58824
|
+
{ rawId: "ACTFIBERNET", cleanName: "ACT Fibernet", categorySlug: "internet", isRecurring: true },
|
|
58825
|
+
{ rawId: "JIO", cleanName: "Jio", categorySlug: "internet", isRecurring: true },
|
|
58826
|
+
{ rawId: "AIRTEL", cleanName: "Airtel", categorySlug: "internet", isRecurring: true },
|
|
58827
|
+
{ rawId: "NETFLIX", cleanName: "Netflix", categorySlug: "subscriptions", isRecurring: true },
|
|
58828
|
+
{ rawId: "SPOTIFY", cleanName: "Spotify", categorySlug: "subscriptions", isRecurring: true },
|
|
58829
|
+
{
|
|
58830
|
+
rawId: "PRIMEVIDEO",
|
|
58831
|
+
cleanName: "Prime Video",
|
|
58832
|
+
categorySlug: "subscriptions",
|
|
58833
|
+
isRecurring: true
|
|
58834
|
+
},
|
|
58835
|
+
{
|
|
58836
|
+
rawId: "YOUTUBE",
|
|
58837
|
+
cleanName: "YouTube Premium",
|
|
58838
|
+
categorySlug: "subscriptions",
|
|
58839
|
+
isRecurring: true
|
|
58840
|
+
},
|
|
58841
|
+
{ rawId: "HOTSTAR", cleanName: "Hotstar", categorySlug: "subscriptions", isRecurring: true },
|
|
58842
|
+
{ rawId: "HPCL", cleanName: "HPCL", categorySlug: "fuel" },
|
|
58843
|
+
{ rawId: "BPCL", cleanName: "BPCL", categorySlug: "fuel" },
|
|
58844
|
+
{ rawId: "IOCL", cleanName: "Indian Oil", categorySlug: "fuel" }
|
|
58845
|
+
];
|
|
58846
|
+
var slugByName = new Map(defaultMerchants.map((m2) => [m2.cleanName.toLowerCase(), m2.categorySlug]));
|
|
58847
|
+
function defaultCategorySlug(cleanName) {
|
|
58848
|
+
return slugByName.get(cleanName.toLowerCase());
|
|
58849
|
+
}
|
|
57764
58850
|
// ../reconciliation/src/settlement.ts
|
|
57765
58851
|
var SETTLEMENT_PATTERNS = [
|
|
57766
58852
|
/\bCRED\b.*\bPAYMENT\b/i,
|
|
@@ -57977,7 +59063,6 @@ async function parseAmexCreditCardPdf(data, password) {
|
|
|
57977
59063
|
const loadOptions = {
|
|
57978
59064
|
data: new Uint8Array(data),
|
|
57979
59065
|
useWorkerFetch: false,
|
|
57980
|
-
isEvalSupported: false,
|
|
57981
59066
|
useSystemFonts: true
|
|
57982
59067
|
};
|
|
57983
59068
|
if (password)
|
|
@@ -58439,7 +59524,6 @@ async function parseHdfcCreditCardPdf(data, password) {
|
|
|
58439
59524
|
const loadOptions = {
|
|
58440
59525
|
data: new Uint8Array(data),
|
|
58441
59526
|
useWorkerFetch: false,
|
|
58442
|
-
isEvalSupported: false,
|
|
58443
59527
|
useSystemFonts: true
|
|
58444
59528
|
};
|
|
58445
59529
|
if (password)
|
|
@@ -58612,7 +59696,6 @@ async function parseHdfcSavingsPdf(data, password) {
|
|
|
58612
59696
|
const loadOptions = {
|
|
58613
59697
|
data: new Uint8Array(data),
|
|
58614
59698
|
useWorkerFetch: false,
|
|
58615
|
-
isEvalSupported: false,
|
|
58616
59699
|
useSystemFonts: true
|
|
58617
59700
|
};
|
|
58618
59701
|
if (password)
|
|
@@ -58917,7 +60000,6 @@ async function parseSbiSavingsPdf(data, password) {
|
|
|
58917
60000
|
const loadOptions = {
|
|
58918
60001
|
data: new Uint8Array(data),
|
|
58919
60002
|
useWorkerFetch: false,
|
|
58920
|
-
isEvalSupported: false,
|
|
58921
60003
|
useSystemFonts: true
|
|
58922
60004
|
};
|
|
58923
60005
|
if (password)
|
|
@@ -59718,7 +60800,25 @@ async function runRescan(client, crypto4) {
|
|
|
59718
60800
|
const allMerchants = crypto4 ? (await decryptMerchantFields(allMerchants0, crypto4.key)).data : allMerchants0;
|
|
59719
60801
|
const globalMerchants = allMerchants.filter((m2) => !m2.householdId && m2.cleanName).map((m2) => ({ id: m2.id, name: m2.cleanName }));
|
|
59720
60802
|
const localMerchants = allMerchants.filter((m2) => m2.householdId && m2.cleanName).map((m2) => ({ id: m2.id, name: m2.cleanName }));
|
|
59721
|
-
const merchantCategoryById = new Map
|
|
60803
|
+
const merchantCategoryById = new Map;
|
|
60804
|
+
const needDefault = [];
|
|
60805
|
+
for (const m2 of allMerchants) {
|
|
60806
|
+
if (m2.categoryId)
|
|
60807
|
+
merchantCategoryById.set(m2.id, m2.categoryId);
|
|
60808
|
+
else {
|
|
60809
|
+
const slug = m2.cleanName ? defaultCategorySlug(m2.cleanName) : undefined;
|
|
60810
|
+
if (slug)
|
|
60811
|
+
needDefault.push({ id: m2.id, slug });
|
|
60812
|
+
}
|
|
60813
|
+
}
|
|
60814
|
+
if (needDefault.length > 0) {
|
|
60815
|
+
const catIndex = await loadCategoryIndex(client);
|
|
60816
|
+
for (const { id, slug } of needDefault) {
|
|
60817
|
+
const catId = catIndex.bySlug.get(slug)?.id;
|
|
60818
|
+
if (catId)
|
|
60819
|
+
merchantCategoryById.set(id, catId);
|
|
60820
|
+
}
|
|
60821
|
+
}
|
|
59722
60822
|
const persons = await loadDecryptedPersons(client, crypto4);
|
|
59723
60823
|
const allRows = await fetchAllRows(client, crypto4, { unresolved: "true" });
|
|
59724
60824
|
const categoryByTxn = new Map(allRows.map((r2) => [r2.id, r2.categoryId]));
|
|
@@ -61017,7 +62117,7 @@ function registerResources2(server2, tools) {
|
|
|
61017
62117
|
// package.json
|
|
61018
62118
|
var package_default = {
|
|
61019
62119
|
name: "paisa-mcp",
|
|
61020
|
-
version: "0.4.
|
|
62120
|
+
version: "0.4.7",
|
|
61021
62121
|
repository: {
|
|
61022
62122
|
type: "git",
|
|
61023
62123
|
url: "git+https://github.com/nimit9/paisa.git",
|
|
@@ -61039,7 +62139,7 @@ var package_default = {
|
|
|
61039
62139
|
typecheck: "tsc --noEmit"
|
|
61040
62140
|
},
|
|
61041
62141
|
dependencies: {
|
|
61042
|
-
"pdfjs-dist": "^
|
|
62142
|
+
"pdfjs-dist": "^6.3.289"
|
|
61043
62143
|
},
|
|
61044
62144
|
devDependencies: {
|
|
61045
62145
|
"@modelcontextprotocol/client": "^2.1.0",
|
|
@@ -61052,7 +62152,7 @@ var package_default = {
|
|
|
61052
62152
|
"@paisa/reconciliation": "workspace:*",
|
|
61053
62153
|
"@paisa/types": "workspace:*",
|
|
61054
62154
|
"@types/bun": "^1.3.14",
|
|
61055
|
-
axios: "^1.
|
|
62155
|
+
axios: "^1.20.0",
|
|
61056
62156
|
typescript: "^7.0.2",
|
|
61057
62157
|
zod: "^4.6.5"
|
|
61058
62158
|
},
|
|
@@ -61116,5 +62216,5 @@ main().catch((err) => {
|
|
|
61116
62216
|
process.exit(1);
|
|
61117
62217
|
});
|
|
61118
62218
|
|
|
61119
|
-
//# debugId=
|
|
62219
|
+
//# debugId=55A6DF6E25797A6764756E2164756E21
|
|
61120
62220
|
//# sourceMappingURL=index.js.map
|